Documente Academic
Documente Profesional
Documente Cultură
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
Version 4.02
iii
Version 4.02
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.
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
Version 4.02
Figure T1.0-1
Version 4.02
1-1
Figure T1.0-2
1-2
Version 4.02
Tutorial 1.1
Pre-Processing
Preliminaries
Tutorial 1.1
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.
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
Mesh Checking
Mesh
Checking
Click Apply
A simple, but often effective, method of checking the mesh is to display it on screen
and examine it visually:
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
Tutorial 1.1
Pre-Processing
Mesh Checking
Click the button at the bottom of the rotate slider to reset the view angle
The varying size of cells within the trimmed mesh is clearly shown.
Version 4.02
1-5
Tutorial 1.1
Pre-Processing
Basic Problem Settings
Figure T1.1-1
Basic
Problem
Settings
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:
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
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:
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:
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
Tutorial 1.1
Pre-Processing
Boundary Locations
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:
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:
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
Boundary Locations
Figure T1.1-2
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
1-9
Tutorial 1.1
Pre-Processing
Boundary Locations
Figure T1.1-3
Figure T1.1-4
1-10
Version 4.02
Tutorial 1.1
Pre-Processing
Boundary Locations
Figure T1.1-5
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.
Version 4.02
1-11
Tutorial 1.1
Pre-Processing
Boundary Conditions
Figure T1.1-6
Boundary
Conditions
1-12
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
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
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
CFD Analysis
Set Run Time Controls
Figure T1.1-7
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:
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
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
STAR GUIdes Run Analysis Interactively panel activates the STAR solver through
the pro-STAR interface:
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
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.
Contour
Plots
The first plot to be drawn is a contour plot of temperature on the surface of the
mixing pipe:
Version 4.02
1-17
Tutorial 1.1
POST-PROCESSING
Post-Processing
Contour Plots
1-18
Under the 3-D Surface tab, select options Contour (filled) and Edge
Version 4.02
Tutorial 1.1
POST-PROCESSING
Post-Processing
Contour Plots
Figure T1.1-8
Now plot contours of velocity magnitude on an x-z plane passing through the origin:
Version 4.02
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
Version 4.02
Tutorial 1.1
POST-PROCESSING
Post-Processing
Velocity Vector Plots
Velocity
Vector Plots
Figure T1.1-10
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
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
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
Figure T1.1-12
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
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
Version 4.02
Tutorial 1.1
POST-PROCESSING
Post-Processing
Particle Tracks
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:
Figure T1.1-14
Version 4.02
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
Figure T1.1-15
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
Version 4.02
Tutorial 1.1
POST-PROCESSING
Post-Processing
Particle Tracks
Figure T1.1-16
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
1-27
Tutorial 1.1
POST-PROCESSING
Post-Processing
Particle Tracks
Figure T1.1-17
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
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
2-1
methods. Comparisons are then drawn between the accuracy and speed of each type
of mesh.
2-2
Version 4.02
Tutorial 2.1
Pre-Processing
Preliminaries
Tutorial 2.1
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:
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
Tutorial 2.1
Pre-Processing
Material Properties
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:
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.
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
Tutorial 2.1
Pre-Processing
Boundary Conditions
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:
Choose a cell just above the obstacle (say cell no. 801) as the monitoring location.
Boundary
Conditions
Having imported the boundary location definitions and their associated region
numbers, boundary conditions are specified as follows:
For the wall (region 0):
Version 4.02
Tutorial 2.1
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
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
CFD Analysis
Preliminaries
CFD Analysis
To perform the analysis interactively, proceed as follows:
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
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
Post-Processing
Basic Plots
Figure T2.1-2
2-8
Version 4.02
Tutorial 2.1
Post-Processing
Basic Plots
Figure T2.1-3
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
2-9
Tutorial 2.1
Post-Processing
Validation of Results
Figure T2.1-4
Figure T2.1-5
Validation of
Results
2-10
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
Post-Processing
Validation of Results
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:
Figure T2.1-6
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
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:
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
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
Post-Processing
Simple Graphs
The following operations are normally necessary for producing an x-y graph:
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
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
2-13
Tutorial 2.1
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
Tutorial 2.1
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:
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:
Unfortunately, the colours of the two graphs are the same. To change one of them
and add a legend:
Version 4.02
2-15
Tutorial 2.1
Post-Processing
Wall Shear Force
Figure T2.1-9
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
Version 4.02
Tutorial 2.1
Post-Processing
Final Operations
Figure T2.1-10
Version 4.02
2-17
Tutorial 2.2
Tutorial 2.2
Pre-Processing
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:
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:
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
Version 4.02
Tutorial 2.2
Pre-Processing
Material Properties
Figure T2.2-1
Tetrahedral mesh
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
Tutorial 2.2
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:
Choose a fluid cell just above the obstacle (say cell no. 69732) as the monitoring
location:
Boundary
Conditions
Having imported the boundary location definitions and their associated region
numbers, boundary conditions are imposed as follows:
For the wall (region 0):
No user input is required for the last (symmetry plane) boundary region.
Analysis
Controls
Version 4.02
2-21
Tutorial 2.2
CFD Analysis
Final Operations
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
Go to the Analysis Preparation/Running folder and open the Set Run Time
Controls panel
Change the Number of Iterations to 200
Click Apply
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
Tutorial 2.2
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
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
Post-Processing
Basic Plots
Figure T2.2-2
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
Version 4.02
Tutorial 2.2
Post-Processing
Basic Plots
Figure T2.2-3
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
Post-Processing
Validation of Results
Validation of
Results
Figure T2.2-4
Figure T2.2-5
Plot the y+ values at the wall boundaries to help verify the suitability of the mesh
for the turbulence model employed:
2-26
Tutorial 2.2
Post-Processing
Validation of Results
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:
Figure T2.2-6
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
Post-Processing
Simple Graphs
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
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
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
Tutorial 2.2
Post-Processing
Customizing Graphs
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:
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:
To add a legend:
2-30
Version 4.02
Tutorial 2.2
Post-Processing
Wall Shear Force
Figure T2.2-8
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
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
Version 4.02
Tutorial 2.2
Post-Processing
Final Operations
Figure T2.2-9
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
Version 4.02
Tutorial 2.3
Tutorial 2.3
Pre-Processing
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:
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
Pre-Processing
Material Properties
Figure T2.3-1
Material
Properties
Polyhedral Mesh
Set the monitoring and pressure reference cell locations to be equivalent to those
chosen in the previous two tutorials:
Boundary
Conditions
2-34
Version 4.02
Tutorial 2.3
Pre-Processing
Analysis Controls
Analysis
Controls
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
2-35
Tutorial 2.3
CFD Analysis
Preliminaries
CFD Analysis
To perform the analysis interactively, proceed as follows:
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
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
Post-Processing
Basic Plots
Figure T2.3-2
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
2-37
Tutorial 2.3
Post-Processing
Basic Plots
Figure T2.3-3
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
Post-Processing
Validation of Results
Validation of
Results
Figure T2.3-4
Figure T2.3-5
Plot the y+ values at the wall boundaries to help verify the suitability of the mesh
for the turbulence model employed:
Version 4.02
Tutorial 2.3
Post-Processing
Validation of Results
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
Figure T2.3-6
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
Post-Processing
Comparative Graphs
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
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
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
Tutorial 2.3
Post-Processing
Comparative Graphs
Figure T2.3-8
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
Post-Processing
Comparative Graphs
2-44
Figure T2.3-9
Figure T2.3-10
Version 4.02
Tutorial 2.3
Post-Processing
Final Operations
Figure T2.3-11
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
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
2-45
Figure T3.0-1
Version 4.02
Mesh geometry
3-1
Tutorial 3.1
Tutorial 3.1
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.
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
Pre-Processing
Mesh Checking
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
This part of the model building is conveniently handled through a series of panels
under the Thermophysical Models and Properties folder.
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.
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
Tutorial 3.1
Pre-Processing
Material Properties
Collect all cells that will take on porous properties into a set:
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
Version 4.02
Tutorial 3.1
Pre-Processing
Material Properties
Figure T3.1-1
Catalyst ring
Assign the selected cells to the currently active cell type (no. 2) and plot:
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
3-5
Tutorial 3.1
Pre-Processing
Boundary conditions
Figure T3.1-2
Boundary
conditions
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
Version 4.02
Tutorial 3.1
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:
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:
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
Post-Processing
Post- processing
Figure T3.1-3
3-8
Version 4.02
Tutorial 3.1
Post-Processing
Post- processing
Figure T3.1-4
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
3-9
Tutorial 3.1
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
Version 4.02
Tutorial 3.1
Post-Processing
Analysis of Results
Figure T3.1-6
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
3-11
Tutorial 3.1
Post-Processing
Analysis of Results
Figure T3.1-7
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
Post-Processing
Analysis of Results
Porous
subdomain
Pressure
Actual surface
value
Values at
adjacent
cells
Vertex value
y-coordinate
Figure T3.1-8
Load the pressure values and their corresponding cell volumes into pro-STARs
post registers:
Version 4.02
Tutorial 3.1
Post-Processing
Analysis of Results
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
Version 4.02
Tutorial 3.1
Post-Processing
Analysis of Results
Figure T3.1-9
Figure T3.1-10
3-15
Tutorial 3.1
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
Version 4.02
Tutorial 3.2
Tutorial 3.2
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
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
Tutorial 3.2
Pre-Processing
Material Properties
Click Apply
Figure T3.2-1
Material
Properties
Enter appropriate resistance coefficients for the porous medium in the Cartesian
coordinate system:
3-18
Mesh Geometry
Tutorial 3.2
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
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:
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:
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
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
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
Version 4.02
Tutorial 3.2
Post-Processing
Post- processing
Figure T3.2-3
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
3-21
Tutorial 3.2
Post-Processing
Post- processing
Figure T3.2-4
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
Post-Processing
Post- processing
Figure T3.2-5
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
Tutorial 3.2
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
Version 4.02
Tutorial 3.2
Post-Processing
Analysis of Results
Version 4.02
Figure T3.2-6
Figure T3.2-7
3-25
Tutorial 3.2
Post-Processing
Analysis of Results
3-26
Version 4.02
Tutorial 3.3
Tutorial 3.3
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
3-27
Tutorial 3.3
Pre-Processing
Material Properties
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.
Click Apply
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
Tutorial 3.3
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
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
Tutorial 3.3
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
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:
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:
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
Post-Processing
Post- processing
Figure T3.3-2
To examine the velocity vectors in the region where the momentum sink is applied:
Figure T3.3-3
3-32
Tutorial 3.3
Post-Processing
Results analysis
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
3-33
Tutorial 3.3
Post-Processing
Results analysis
Figure T3.3-5
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:
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
Post-Processing
Results analysis
Figure T3.3-6
Figure T3.3-7
Version 4.02
3-35
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
Tutorial 4.1
Define a transient simulation of a free surface flow and give the case a title:
4-2
Tutorial 4.1
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
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
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
Pre-Processing
Initialization
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 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
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
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
4-4
Version 4.02
Tutorial 4.1
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
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:
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
Pre-Processing
Run Time Controls
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
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
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
Post-Processing
Basic Plots
Figure T4.1-1
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
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
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
Post-Processing
Animations
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:
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
4-10
Version 4.02
Tutorial 4.2
Tutorial 4.2
Define a transient simulation of a free surface flow and give the case a title:
Mesh Import
& Checking
Version 4.02
Click Apply
Tutorial 4.2
Pre-Processing
Material Properties
Material
Properties
Examine the free-surface flow modelling options and material property settings:
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
4-12
Version 4.02
Tutorial 4.2
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
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
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
Pre-Processing
Run Time Controls
equation solver for all free surface problems. To specify these settings:
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
Tutorial 4.2
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
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
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
Turn off the overlay mode by selecting Plot > Display > Overlay
Version 4.02
Tutorial 4.2
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
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
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
Tutorial 4.3
Define a transient simulation and activate the free surface and cavitation modelling
options:
Mesh Import
& Checking
Version 4.02
Click Apply
Tutorial 4.3
Pre-Processing
Material Properties
Material
Properties
Examine the free-surface flow modelling options and material property settings:
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
4-20
Tutorial 4.3
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
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
Version 4.02
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
Pre-Processing
Analysis Controls
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:
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
Pre-Processing
Run Time Controls
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
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
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
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
Post-Processing
Basic Plots
Figure T4.3-1
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:
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
Post-Processing
Basic Plots
Figure T4.3-2
Contour plot showing VOF and CAV distributions after 500 time steps
4-26
Version 4.02
28.96
1.205
1.81 105
1006.0
2.637 102
kg/kmole
kg/m3
Pa s
J/kg K
W/m K
Figure T5.0-1
Version 4.02
Tutorial 5.1
Pre-Processing
Preliminaries
Tutorial 5.1
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.
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.
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
Pre-Processing
Material Properties
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):
5-3
Tutorial 5.1
Pre-Processing
Scalar Properties
Scalar
Properties
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.
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
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
Pre-Processing
Boundary Conditions
Version 4.02
Click Apply
Click Apply
5-5
Tutorial 5.1
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.
5-6
Version 4.02
Tutorial 5.1
Pre-Processing
Control Parameters
Figure T5.1-2
Control
Parameters
Check the scalar control parameters and then modify some of them:
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
Version 4.02
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
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:
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
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
Post-Processing
Post- processing
Figure T5.1-3
Figure T5.1-3
Load vertex-based pressure values, select the contour plotting option and plot in
Hidden Surface mode:
Version 4.02
5-9
Tutorial 5.1
Post-Processing
Post- processing
Figure T5.1-4
Pressure plot
Figure T5.1-5
5-10
Temperature plot
Version 4.02
Tutorial 5.1
Post-Processing
Post- processing
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:
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
5-11
Tutorial 5.1
Post-Processing
Final Operations
Figure T5.1-6
Final
Operations
5-12
Version 4.02
Tutorial 5.2
Pre-Processing
Preliminaries
Tutorial 5.2
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:
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
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.
Click Apply
Check the geometry and boundary conditions visually to confirm that the model has
been read in correctly:
Version 4.02
5-13
Tutorial 5.2
Pre-Processing
Transient Solution Setting
Transient
Solution
Setting
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
Velocity (m/s)
10
Outer Inlet
9
8
7
6
5
4
3
Inner Inlet
2
1
Time (sec)
1
Figure T5.2-1
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
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
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:
Boundary
Apply the time variation in velocity defined above to the inner inlet:
Re-definition
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
Tutorial 5.2
Pre-Processing
Analysis Controls
Analysis
Controls
Run Time
Controls
Check the status of the run time controls and then specify the simulated elapsed time
and the time step to be used:
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
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
CFD Analysis
Preliminaries
CFD Analysis
To perform the analysis interactively, proceed as follows:
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
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
Post-Processing
Post- processing
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
5-18
Version 4.02
Tutorial 5.2
Post-Processing
Post- processing
Figure T5.2-3
The results after 2.0 seconds (80 time steps) may be plotted in the same manner:
Version 4.02
5-19
Tutorial 5.2
Post-Processing
Post- processing
Figure T5.2-4
5-20
Version 4.02
Tutorial 5.2
Post-Processing
Final Operations
Figure T5.2-5
Final
Operations
Version 4.02
5-21
inflow
Figure T6.0-1
Version 4.02
9 cm
6-1
Tutorial 6.1
Tutorial 6.1
6-2
Tutorial 6.1
Pre-Processing
Material Properties
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.
Figure T6.1-1
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:
6-3
Tutorial 6.1
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
The boundary locations and types have already been specified in the coded file
super.bnd. To display them on the screen:
Figure T6.1-2
Version 4.02
Tutorial 6.1
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
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.
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
Mesh Refinement
Preliminaries
Mesh Refinement
Preliminaries In order to perform mesh refinement, the current analysis results need to be read into
pro-STAR:
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
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
Tutorial 6.1
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
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:
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
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:
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:
Figure T6.1-5
6-8
Tutorial 6.1
Final
Operations
Write the geometry and problem files and save the model file:
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:
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:
Version 4.02
Tutorial 6.1
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.
Figure T6.1-6
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
Tutorial 6.1
Post-Processing
Running the Analysis
Running the
Analysis
In the Problem File Write dialog, click Apply and then Close
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:
Version 4.02
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
Post-Processing
Post- processing
Figure T6.1-7
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
Version 4.02
Tutorial 6.1
Post-Processing
Post- processing
Figure T6.1-8
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
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
Tutorial 6.1
Post-Processing
Post- processing
Click Apply
Select the Y-Axis Parameters tab and enter the details shown below:
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
Version 4.02
Tutorial 6.1
Post-Processing
Post- processing
Figure T6.1-9
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
6-15
Tutorial 6.1
Post-Processing
Post- processing
6-16
Version 4.02
Introduction
Figure T7.0-1
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
Pre-Processing
Preliminaries
Tutorial 7.1
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.
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
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
Pre-Processing
Mesh Import
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
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
Pre-Processing
Cell Type Properties
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:
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
Pre-Processing
Cell Type Properties
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:
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:
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
7-5
Tutorial 7.1
Pre-Processing
Mesh Structure
Figure T7.1-3
Mesh
Structure
7-6
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
Pre-Processing
Mesh Structure
Figure T7.1-4
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).
Next, repeat the steps above in order to couple the rotating region to the stationary
inlet region (cell type 4):
Version 4.02
Tutorial 7.1
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
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
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
Pre-Processing
Boundary Location
Now isolate the edge vertices of the above cell set and display them on screen:
Figure T7.1-6
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
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
Tutorial 7.1
Pre-Processing
Boundary Location
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:
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
7-10
Version 4.02
Tutorial 7.1
Pre-Processing
Boundary Location
Select a Vertex
Here
Figure T7.1-7
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
7-11
Tutorial 7.1
Pre-Processing
Spin Parameters
Turn off the boundary display by clicking the Bound button again
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
Tutorial 7.1
Pre-Processing
Boundary Conditions
Boundary
Conditions
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
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
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.
CFD Analysis
To perform the analysis interactively, proceed as follows:
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
Tutorial 7.1
Post-Processing
Final Operations
Figure T7.1-9
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
Post-Processing
Final Operations
Figure T7.1-10
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
Version 4.02
Tutorial 7.1
Post-Processing
Final Operations
Figure T7.1-11
Note that the relative pressure at the pressure boundary is roughly zero.
Now display the turbulence kinetic energy distribution:
Version 4.02
7-17
Tutorial 7.1
Post-Processing
Final Operations
Figure T7.1-12
Final
Operations
7-18
Version 4.02
Injector
Inlet
Pressure
boundary
Figure T8.0-1
Version 4.02
8-1
Tutorial 8.1
Tutorial 8.1
This will read in the mesh geometry and boundary locations, plus some basic
problem settings. Now name the model:
8-2
Tutorial 8.1
Pre-Processing
Mesh Checking
Mesh
Checking
Figure T8.1-1
Mesh geometry
Analysis
Features
Material
Properties
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
Pre-Processing
Scalar Definition
specified:
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
Now specify the properties of the dispersed phase using the Lagrangian
Multi-Phase folder:
8-4
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
Pre-Processing
Injector Properties
Injector
Properties
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:
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
Version 4.02
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
CFD Analysis
Run Time Controls
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:
Run Time
Controls
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.
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:
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
Post-Processing
Preliminaries
Post-Processing
Preliminaries Read in the analysis results:
Continuous
Phase
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
Version 4.02
Tutorial 8.1
Post-Processing
Continuous Phase
Figure T8.1-3
8-8
Version 4.02
Tutorial 8.1
Post-Processing
Dispersed Phase
Figure T8.1-4
Dispersed
Phase
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:
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
Post-Processing
Dispersed Phase
Figure T8.1-5
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
Post-Processing
Dispersed Phase
Figure T8.1-6
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
Post-Processing
Final Operations
Figure T8.1-7
Final
Operations
8-12
Version 4.02
Tutorial 8.2
Tutorial 8.2
Analysis
Features
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
Tutorial 8.2
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:
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
Tutorial 8.2
CFD Analysis
Set Run Time Controls
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.
CFD Analysis
To perform the analysis interactively, proceed as follows:
Version 4.02
8-15
Tutorial 8.2
Post-Processing
Preliminaries
Post-Processing
Preliminaries Read in the results of the analysis:
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:
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.
8-16
Version 4.02
Tutorial 8.2
Post-Processing
Final Operations
Version 4.02
8-17
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
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
Figure T9.0-1
9-2
Version 4.02
Tutorial 9.1
Pre-Processing
Preliminaries
Tutorial 9.1
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:
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.
This will read default problem settings from file combustor.inp plus the
problems cell, vertex and boundary location definitions from the remaining three
files.
Version 4.02
9-3
Tutorial 9.1
Pre-Processing
Material Properties
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 Open STAR
GUIde panel button shown below:
Specify the key feature of this case, i.e. chemically reacting flow:
Material
Properties
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
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:
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
Tutorial 9.1
Pre-Processing
Combustion Model
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:
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
Version 4.02
Tutorial 9.1
Pre-Processing
Scalar Properties
Figure T9.1-1
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
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.
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:
Click Apply
9-8
Version 4.02
Tutorial 9.1
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
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:
Modify the air inlet boundary values (regions 4, 5 and 6) for the O2 and N2 scalars
as follows:
Check the solution control parameters and then change the under-relaxation factor
and residual tolerance for the mixture fraction and variance:
9-10
Tutorial 9.1
CFD Analysis
Run Time Controls
Run Time
Controls
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:
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
Post-Processing
Preliminaries
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
Define a section whose plane bisects the mesh and passes through the axis of
9-12
Version 4.02
Tutorial 9.1
Post-Processing
Preliminaries
symmetry:
Use the Pgetc panel to create a cell-averaged temperature profile in the section:
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
Tutorial 9.1
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:
Figure T9.1-4
9-14
Propane distribution
Version 4.02
Tutorial 9.1
Post-Processing
Analysis of Results
Figure T9.1-5
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:
Load the variance in post register no. 1 and take its square root:
Version 4.02
Tutorial 9.1
Post-Processing
Analysis of Results
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
Figure T9.1-6
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
Panel Definition
Analysis of Results
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:
Specify the basic panel appearance via the panel menu options, as follows:
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
9-17
Tutorial 9.1
Panel Definition
Analysis of Results
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
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
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
Panel Definition
Analysis of Results
trload {name}.pstt
Complete the panel definition as follows:
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:
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
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
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
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
Tutorial 9.2
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
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
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
C p C p( T )
for all i
Numerical Considerations
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
Tutorial 9.2
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.
Click Apply
Specify the key feature of this case, i.e. chemically reacting flow:
Ignition
Region
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
Tutorial 9.2
Pre-processing
Material Properties
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-28
Tutorial 9.2
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
Use STAR GUIdes Reacting Flow folder to set up the combustion model as
follows:
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
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
Assign the chemical reaction scheme just defined to the models fluid domain:
Scalar
Properties
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
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
Check the current boundary definitions and specify boundary conditions where
appropriate.
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
Click Apply
9-31
Tutorial 9.2
Pre-processing
Boundary Conditions
9-32
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
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
Control
Parameters
Check the solution control parameter settings and specify new values for
under-relaxation factors and tolerances where appropriate:
Version 4.02
Tutorial 9.2
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
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:
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
Version 4.02
Tutorial 9.2
Post-Processing
Basic Plots
Basic Plots
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:
Figure T9.2-1
Define a section whose plane bisects the mesh and passes through the axis of
symmetry:
Version 4.02
Tutorial 9.2
Post-Processing
Basic Plots
Open panel Pgetv and plot the vertex-based temperature profile in the section:
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
Version 4.02
Tutorial 9.2
Post-Processing
Basic Plots
Figure T9.2-3
Figure T9.2-4
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
Post-Processing
Basic Plots
9-38
Version 4.02
Tutorial 9.3
Pre-processing
Preliminaries
Tutorial 9.3
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:
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.
Version 4.02
Tutorial 9.3
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.
Click Apply
Specify the key features of this case, i.e. chemically reacting flow in the presence
of droplets:
Ignition
Region
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:
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
Tutorial 9.3
Pre-processing
Thermal Options
Thermal
Options
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:
The above loop will create 535 patches. Display the patches to confirm that the
operation has been carried out correctly:
Version 4.02
Tutorial 9.3
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
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:
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
Pre-processing
Droplet Properties
Assign the chemical reaction scheme defined earlier (no. 1) to the models fluid
domain:.
Check the properties of the scalar variables set up as a result of the scalar mapping
described earlier:
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
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:
Version 4.02
Tutorial 9.3
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.
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
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
Tutorial 9.3
Pre-processing
Boundary Conditions
Select the parcel group (set no. 1) in the Injection Points list
Click Plot points in set
Boundary
Conditions
Check the current boundary definitions and specify boundary conditions where
appropriate.
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:
Specify conditions at the air inlet boundaries, including surface radiative data such
as emissivity and reflectivity:
Version 4.02
Tutorial 9.3
Pre-processing
Boundary Conditions
9-48
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
Pre-processing
Boundary Conditions
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.
Finally, define the baffles as thermally conducting boundaries having the same
radiation properties as the walls.
Version 4.02
Tutorial 9.3
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
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
Tutorial 9.3
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
Tutorial 9.3
User Subroutines
Final Operations
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
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
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:
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
Version 4.02
Tutorial 9.3
Post-Processing
Preliminaries
Figure T9.3-1
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
Tutorial 9.3
Post-Processing
Preliminaries
Figure T9.3-2
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
Tutorial 9.3
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:
Open panel Pgetv and use it to plot the vertex-based temperature profile in the
section:
Figure T9.3-4
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
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:
Figure T9.3-5
9-58
Toluene distribution
Version 4.02
Tutorial 9.3
Post-Processing
Preliminaries
Figure T9.3-6
CO2 distribution
Version 4.02
9-59
Tutorial 9.4
Pre-Processing
Preliminaries
Tutorial 9.4
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.
This will read default problem settings from file combustor.inp, plus the
problems cell, vertex and boundary location definitions from the remaining three
files.
Click Apply
Plot the mesh to confirm that the data have been read in correctly:
Version 4.02
Tutorial 9.4
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
Use STAR GUIdes Reacting Flow folder to set up the combustion model, as
follows:
9-62
Tutorial 9.4
Pre-Processing
Combustion Model
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:
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
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:
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
Tutorial 9.4
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:
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
Tutorial 9.4
Pre-Processing
Boundary Conditions
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
Tutorial 9.4
Pre-Processing
Analysis Controls
Analysis
Controls
Run Time
Controls
Version 4.02
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
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:
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:
Now load the solution results and plot velocity vectors on an x-z plane bisecting the
model geometry:
9-68
Version 4.02
Tutorial 9.4
Post-Processing
Preliminaries
Figure T9.4-2
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
Post-Processing
Preliminaries
Figure T9.4-3
Figure T9.4-4
9-70
Version 4.02
Introduction
T = 293 K
T = 293 K
1
10
4
T = 343 K
Figure T10.0-1
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
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
Pre-Processing
Preliminaries
Tutorial 10.1
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.
This will read default problem settings from file fin.inp plus the problems cell,
vertex and boundary location definitions from the remaining three files.
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
Pre-Processing
Cell Type Properties
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
Tutorial 10.1
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
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 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:
Specify a datum location and density for the purpose of calculating buoyancy
effects:
Version 4.02
Tutorial 10.1
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
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
Pre-Processing
Boundary Conditions
Figure T10.1-2
Boundary
Conditions
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:
Version 4.02
Tutorial 10.1
Pre-Processing
Run Time Controls
Algorithm menu
Click Apply
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.
Choose the MARS differencing scheme for some of the variables to be solved. This
gives an optimum combination of stability and accuracy.
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
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
CFD Analysis
Preliminaries
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:
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
First look at the velocity field in the fluid surrounding the fin:
Tutorial 10.1
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
10-10
Version 4.02
Tutorial 10.1
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
10-11
Tutorial 10.1
Post-Processing
Post- processing
Figure T10.1-5
Figure T10.1-6
10-12
Tutorial 10.1
Post-Processing
Final Operations
Collect the shells created by pro-STAR at the walls (i.e. cells of type 5) and plot:
Figure T10.1-7
Final
Operations
Version 4.02
10-13
Tutorial 10.2
SURFACE-TO-SURFACE RADIATION
Pre-Processing
Preliminaries
Tutorial 10.2
SURFACE-TO-SURFACE RADIATION
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
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.
New
Boundary
Definitions
Click Apply
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
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
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
Similarly, the top and bottom walls will be adiabatic radiative walls with emissivity
and reflectivity of 0.5:
Version 4.02
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
Figure T10.2-2
Version 4.02
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.
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:
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
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
To compare the temperatures of the radiation and no-radiation cases, first load the
no-radiation solution file:
10-21
Tutorial 10.2
SURFACE-TO-SURFACE RADIATION
Post-Processing
Post- processing
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
10-22
Version 4.02
Tutorial 10.2
SURFACE-TO-SURFACE RADIATION
Post-Processing
Final Operations
Figure T10.2-4
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
10-23
Tutorial 10.3
Pre-Processing
Preliminaries
Tutorial 10.3
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:
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
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.
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
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
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
In the main window, turn off the Bound option in the Cell Plot Display
Version 4.02
Tutorial 10.3
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
Version 4.02
Tutorial 10.3
Pre-Processing
Final Operations
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
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.
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
CFD Analysis
Preliminaries
CFD Analysis
To perform the analysis interactively, proceed as follows:
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
10-29
Tutorial 10.3
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
Version 4.02
Tutorial 10.3
Post-Processing
Final Operations
Final
Operations
Version 4.02
Figure T10.3-2
Figure T10.3-3
10-31
Version 4.02
11-1
11-2
Version 4.02
Version 4.02
12-1
Tutorial 12.1
Tutorial 12.1
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
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
Pre-Processing
Preliminaries
0.1 m
Outlet
gy
1.0 m
Slip wall on
all side walls
x
Inlet
Figure T12.1-1
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.
This will read default problem settings from file channel.inp plus the
problems cell, vertex and boundary location definitions from the remaining three
files.
Version 4.02
12-3
Tutorial 12.1
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:
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. For this tutorial, the
following special settings are required:
Material
Properties
and
Thermofluid
Models
12-4
Tutorial 12.1
Pre-Processing
Boundary Conditions
Click Apply
Select locations for the pressure reference and monitoring cells as follows:
Boundary
Conditions
Version 4.02
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
Pre-Processing
Analysis Controls
We will now specify various solver parameters required for this case:
Run Time
Controls
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:
12-6
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
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:
Figure T12.1-2
Version 4.02
Tutorial 12.1
Figure T12.1-3
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
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.
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
Click Apply
Verify that the correct mesh has been imported by selecting all cells and plotting the
mesh in Hidden Surface mode:
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.
Specify that the flow is turbulent and set up the turbulence drag force:
12-10
Tutorial 12.2
AERATION TANK
Pre-Processing
Boundary Conditions
Select locations for the pressure reference and monitoring cells as follows:
Boundary
Conditions
Version 4.02
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
No user input is needed for Reg#2 in the scroll list which is already defined as the
Degassing outlet.
Analysis
Controls
Run Time
Controls
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:
12-12
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
Version 4.02
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
12-14
Version 4.02
Tutorial 12.2
AERATION TANK
Post-Processing
Post- processing
Figure T12.2-3
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
Figure T12.2-4
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
Pre-Processing
Preliminaries
Tutorial 12.3
gy
1m
Fluidised bed
y
x
Air inlet
Figure T12.3-1
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.
Version 4.02
Tutorial 12.3
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.
Click Apply
Verify that the correct mesh has been imported by selecting all cells and plotting the
mesh in Hidden Surface mode:
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. For this tutorial, the
following special settings are required:
Material
Properties
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
Pre-Processing
Initialisation
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
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:
Version 4.02
Tutorial 12.3
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
Boundary
Conditions
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
Analysis
Controls
Output
Controls
Set the frequency of outputting calculated transient data during the analysis:
12-20
Select the Output Controls folder and then open the Analysis Output panel
Version 4.02
Tutorial 12.3
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.
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:
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
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
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
12-23
Tutorial 12.3
Post-Processing
Final Operations
Figure T12.3-2
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
gy
2m
y
x
Superheated water
Figure T12.4-1
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.
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.
Click Apply
Verify that the correct mesh has been imported by selecting all cells and plotting the
mesh in Hidden Surface mode:
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. For this tutorial, the
following special settings are required:
Material
Properties
and
Thermofluid
Models
12-26
Tutorial 12.4
BOILING SIMULATION
Pre-Processing
Material Properties and Thermofluid Models
Select locations for the pressure reference and monitoring cells as follows:
Version 4.02
Tutorial 12.4
BOILING SIMULATION
Pre-Processing
Boundary Conditions
Interphase heat transfer will be defined later via a user subroutine, so the Nusselt
Number shown in STAR GUIde may be set to zero:
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
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
12-28
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
Run Time
Controls
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:
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
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
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
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.
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
The steam volume fraction at the exit should be about 0.85. Now plot the
temperature as follows:
12-36
Version 4.02
Tutorial 12.4
BOILING SIMULATION
Post-Processing
Final Operations
Figure T12.4-3
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
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
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
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
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
Tutorial 12.4
BOILING SIMULATION
Version 4.02
12-41
Introduction
inflow
Figure T13.0-1
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
Pre-Processing
Preliminaries
Tutorial 13.1
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
Tutorial 13.1
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
Note that an additional folder called Aeroacoustic Analysis now appears in the
NavCenter tree.
Material
Properties
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.
Tutorial 13.1
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
Run Time
Controls
Select folder Analysis Preparation/Running and open the Set Run Time
Version 4.02
Tutorial 13.1
CFD Analysis
Final Operations
Final
Operations
Controls panel
Enter 600 for the maximum Number of Iterations
Click Apply
CFD Analysis
To perform the analysis interactively, proceed as follows:
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
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
Post-Processing
Monitor History Plots
Figure T13.1-2
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:
By default, the graph frame fills only half the screen. To make it larger:
13-6
Version 4.02
Tutorial 13.1
Post-Processing
Turbulence Energy
Figure T13.1-3
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
13-7
Tutorial 13.1
Post-Processing
Aeroacoustic Source Term
Figure T13.1-4
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
Version 4.02
Tutorial 13.1
Post-Processing
Aeroacoustic Source Term
Figure T13.1-5
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
13-9
Tutorial 13.2
Tutorial 13.2
Version 4.02
13-11
Tutorial 13.2
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:
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
Material
Properties
The monitoring and pressure reference cells must be redefined, as those used in the
steady-state analysis no longer exist:
13-12
Tutorial 13.2
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
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:
13-13
Tutorial 13.2
Pre-Processing
Run Time Controls
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
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
13-14
Version 4.02
Tutorial 13.2
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
13-15
Tutorial 13.2
User Subroutines
Final Operations
Figure T13.2-1
You must now specify that the transient run should restart from the above mapped
solution:
The geometry file has already been written but it is also necessary to write the
problem file:
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
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
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
User Subroutines
Pressure boundary
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 )
13-19
Tutorial 13.2
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
CFD Analysis
Preliminaries
13
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
Tutorial 13.2
Post-Processing
Animated Plots
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
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
Post-Processing
Pressure Trace
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:
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
13-23
Tutorial 13.2
Post-Processing
Pressure Trace
Figure T13.2-2
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
Version 4.02
Version 4.02
14-1
Tutorial 14.1
Tutorial 14.1
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
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
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:
Make sure that the STAR GUIde window is displayed on your screen, next to the
main pro-STAR window:
Mesh Import
& Checking
Version 4.02
Click Apply
14-3
Tutorial 14.1
Pre-Processing
Boundary Locations
Figure T14.1-2
Boundary
Locations
2D hexahedral mesh
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
Pre-Processing
Material Properties and Physical Models
Figure T14.1-3
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 locations for the pressure reference and monitoring cells as follows:
14-5
Tutorial 14.1
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 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
Tutorial 14.1
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.
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
Post-Processing
Preliminaries
Post-Processing
Preliminaries When the simulation is complete and whilst in the tut14-1 sub-directory:
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
Post-Processing
Animations
Figure T14.1-4
Animations
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
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:
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
Figure T14.1-5
The data saved in file fthick.grf may then be used for comparison against
analytical solutions.
Version 4.02
14-11
Tutorial 14.2
Problem Description
Preliminaries
Tutorial 14.2
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
Tutorial 14.2
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
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
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:
14-14
Tutorial 14.2
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:
Version 4.02
14-15
Tutorial 14.2
Pre-Processing
Boundary Specification
Figure T14.2-3
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
Tutorial 14.2
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
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:
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
Tutorial 14.2
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
Tutorial 14.2
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
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
Version 4.02
Tutorial 14.2
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
Version 4.02
Tutorial 14.2
CFD Analysis
Run Time Controls
Run Time
Controls
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:
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):
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
Post-Processing
Animations
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
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
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
14-23
Primary Inlet
Outlet
Furnace Wall
Secondary Inlet
Tertiary Inlet
Figure T15.0-1
Modelling Strategy
The following modelling strategy was adopted:
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
Pre-Processing
Preliminaries
Tutorial 15.1
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:
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
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
Tutorial 15.1
Pre-Processing
Model Specification
Figure T15.1-1
Model
Set up the basic models used in the isothermal case:
Specification
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
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
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
Pre-Processing
Analysis Controls
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
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
CFD Analysis
Preliminaries
CFD Analysis
To perform the analysis interactively, proceed as follows:
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
15-7
Tutorial 15.1
Post-Processing
Post- Processing
Figure T15.1-2
Next, plot velocity vectors on the surface of the furnace to show the swirling nature
of the flow:
15-8
Version 4.02
Tutorial 15.1
Post-Processing
Final Operations
Figure T15.1-3
Final
Operations
Version 4.02
Exit from pro-STAR by choosing File > Quit > Quit, Nosave from the main
window menu.
15-9
Tutorial 15.2
Pre-Processing
Preliminaries
Tutorial 15.2
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:
Click Apply
Thermal
Options
Version 4.02
Tutorial 15.2
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
Pre-Processing
Other Settings
Figure T15.2-1
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
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:
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
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 NOx and particle radiation model options and coal particle solution controls are
specified next:
15-14
Tutorial 15.2
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
Particle
The following steps define the particle properties and the injection rate and location:
Properties
Check that Use Gradient is selected for the Interpolation Method and that
Explicitly defined parcel injection is selected at the bottom of the panel
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
Pre-Processing
Particle Properties and Injection Location
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:
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
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
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
Pre-Processing
Scalar Boundaries
Scalar
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
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
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.
CFD Analysis
To perform the analysis interactively proceed as follows:
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
Tutorial 15.2
Post-Processing
Preliminaries
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
Figure T15.2-3
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
Post-Processing
Preliminaries
Figure T15.2-4
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
Post-Processing
Preliminaries
Figure T15.2-5
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
Version 4.02
Tutorial 15.2
Post-Processing
Preliminaries
Figure T15.2-6
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
Tutorial 15.2
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
Coal
Combustion
Model Setup
Click Apply
Open the Thermophysical Models and Properties > Reacting Flow > Coal
Combustion > Sub Models sub-folder
Select the Volatiles tab
Select the 2 Competing Scheme
Version 4.02
Tutorial 15.3
TWO-COMPETING-STEPS DEVOLATILISATION
Pre-Processing
Analysis Controls
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
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
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.
CFD Analysis
To perform the analysis interactively proceed as follows:
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:
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
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
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
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
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
Version 4.02
Tutorial 15.3
TWO-COMPETING-STEPS DEVOLATILISATION
Post-Processing
Preliminaries
Figure T15.3-4
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
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
Finally, exit from pro-STAR by choosing File > Quit > Quit, Nosave from
the main window.
Version 4.02
Channel Walls
y
2
x
Figure T16.0-1
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
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:
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
Version 4.02
Tutorial 16.1
STEADY-STATE ANALYSIS
Pre-processing
Preliminaries
Tutorial 16.1
STEADY-STATE ANALYSIS
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
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:
Figure T16.1-1
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
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
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
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:
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
Version 4.02
Tutorial 16.1
STEADY-STATE ANALYSIS
Macro
Problem set-up
16-9
Tutorial 16.1
STEADY-STATE ANALYSIS
Macro
Problem set-up
16-10
Version 4.02
Tutorial 16.2
Pre-Processing
Preliminaries
Tutorial 16.2
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
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
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
Pre-Processing
Flow initialisation
Flow
initialisation
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:
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
Tutorial 16.2
Pre-Processing
Final operations
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:
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
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
User Subroutine
Final operations
Finally, before exiting from pro-STAR, make sure that the model file
(channel_les.mdl) is saved for possible future modification.
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
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
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
Preliminaries The first post-processing task is to load file channel_les.ccm, containing the
analysis results:
Inst. results
16-16
Tutorial 16.2
Post-Processing
Inst. results
Figure T16.2-2
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
16-17
Tutorial 16.2
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
Tutorial 16.2
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
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
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
Post-Processing
Averaged results
Figure T16.2-6
16-20
Version 4.02
Tutorial 16.2
Post-Processing
Averaged results
Figure T16.2-7
Figure T16.2-8
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
Bibliography
Final operations
Figure T16.2-9
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
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
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
register 1
,,, 0.0 R1
,,, 0.0 R2
,,, 0.0 R3
,,, 0.0 R4
Tutorial 16.2
Macros
Spatial averaging of LES data
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
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
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
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
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
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