Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
© 2008 CD-adapco
TABLE OF CONTENTS
INTRODUCTION
ii Version 4.06
Pre-Processing ................................................................................................. 6-2
CFD Analysis - Coarse Mesh .......................................................................... 6-5
Mesh Refinement ............................................................................................ 6-6
CFD Analysis - Refined Mesh ...................................................................... 6-10
Post-Processing ............................................................................................. 6-12
Tutorial 9 - COMBUSTION
Physical Problem Description ......................................................................... 9-1
Tutorial 9.1 PROPANE COMBUSTION (ADIABATIC PPDF) ............................. 9-3
Pre-Processing ................................................................................................. 9-3
CFD Analysis ................................................................................................ 9-12
Post-Processing ............................................................................................. 9-13
Panel Definition ............................................................................................. 9-18
Tutorial 9.2 PROPANE COMBUSTION (THREE-STEP EDBR) ........................ 9-27
Additional Modelling Notes .......................................................................... 9-27
Numerical Considerations ............................................................................. 9-28
Pre-processing ............................................................................................... 9-28
CFD Analysis ................................................................................................ 9-37
iv Version 4.06
Tutorial 12 - EULERIAN TWO-PHASE FLOW
Tutorial 12.1 TERMINAL VELOCITY OF BUBBLES ........................................ 12-2
Pre-Processing ............................................................................................... 12-3
CFD Analysis ................................................................................................ 12-6
Post-Processing ............................................................................................. 12-7
Suggestions for Further Exercises ................................................................. 12-8
Tutorial 12.2 AERATION TANK ........................................................................ 12-11
Pre-Processing ............................................................................................. 12-11
CFD Analysis .............................................................................................. 12-15
Post-Processing ........................................................................................... 12-15
Suggestions for Further Exercises ............................................................... 12-18
Tutorial 12.3 FLUIDISED BED RISER .............................................................. 12-19
Pre-Processing ............................................................................................. 12-19
User Subroutine ........................................................................................... 12-23
CFD Analysis .............................................................................................. 12-25
Post-Processing ........................................................................................... 12-25
Tutorial 12.4 BOILING SIMULATION .............................................................. 12-29
Pre-Processing ............................................................................................. 12-29
User Subroutines ......................................................................................... 12-33
CFD Analysis .............................................................................................. 12-39
Post-Processing ........................................................................................... 12-39
Discussion of Results .................................................................................. 12-43
Validation Check ......................................................................................... 12-43
Suggestions for Further Exercises ............................................................... 12-44
Basic Definitions
Throughout this volume, it is assumed that you will be using STAR-CD’s 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-STAR’s I/O window. Most GUI facilities are incorporated in the
pro-STAR Model Guide panel 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 panels are arranged as
shown below. This consists of:
• The pro-STAR Model Guide on the right — this displays a tree structure for
finding your way around the system, plus various panels for detailed
specification of a particular operation. It may be collapsed or expanded using
the GUIde button.
• The main pro-STAR window on the left — 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. It
may be moved to the right using the Attach Output Right button, , when
the pro-STAR Model Guide is collapsed.
Version 4.06 1
Working with commands
Throughout the document, “>” signs denote successive mouse clicks on menu
names, menu list items, dialog box buttons, etc. For example
means click Tools on the main pro-STAR window’s menu bar, then click the Cell...
item in the drop-down list, then click the Set Active Type button on the displayed
Cell Tool 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
2 Version 4.06
Using tutorial command files
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
the session in place of the original commands.
A comprehensive discussion of the various facilities for customising or
abbreviating command-mode input is given in Chapter 1 of the Commands
volume (section on “pro-STAR Commands”).
3. Repeat all commands in a single action, by making use of the tutorial
command files supplied in your STAR-CD installation CD-ROM (see the
STAR-CD Installation and Systems Guide for more information). The files
are written in separate sub-directories for each tutorial and are called either
prep.inp (for pre-processing) or post.inp (for post-processing). Also
included are auxiliary files needed by particular cases, e.g. user-defined
subroutines, cgrid files containing grid-changing commands, etc. The
tutorial command files and auxiliary files may be copied from the directory
$STARDIR/STARCDTUTS/../star.
ifile prep.inp
Important Note: When running tutorials involving use of the screen cursor,
make sure that both the main pro-STAR window and the graphics area within
it remain at their normal (default) sizes. Altering these in any way will
invalidate the screen coordinate information stored in file prep.inp and the
tutorial will fail.
4. Following the automatic execution of all commands, terminate the pro-STAR
session by typing.
quit, save
quit, nosave
Version 4.06 3
Physical Problem Description
Pre-Processing
Preliminaries Create a sub-directory for the tutorial called tut1-1. If you have completed
Tutorial 2.1and 2.2 of the Meshing Tutorials volume, copy the model file created at
the end of Meshing Tutorial 2.2 (mixing_pipe.mdl) into this directory.
Alternatively, copy the coded files mixing_pipe.cel, mixing_pipe.vrt,
mixing_pipe.bnd and mixing_pipe.inp supplied with the STAR-CD
installation into it.
• Start pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Enter the case name (mixing_pipe) in the Case Name text box
If you have chosen to start from the coded files provided with STAR-CD:
• Click Continue
• Select File > Read Input Code File... in the main pro-STAR window, as
shown below:
• In the Read Input Coded File dialog select the File name
mixing_pipe.inp
• Click OK
The next step is to give the model a name:
• In the main window, select File > Model Title...
• In the Title text box type:
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:
• Select Plot > Up Axis > Z
• 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.
Basic Most pre-processing operations are performed using various panels of the
Problem pro-STAR Model Guide. The first panel to check is Analysis Features at the top of
Settings the pro-STAR Model Guide folder tree:
• Open the Analysis Features panel
This case is a steady-state problem and includes none of the other analysis features
listed here, so no changes are required.
Material Before any boundary conditions can be applied, appropriate fluid properties must
Properties be specified. The panel to check for this is Molecular Properties, located inside the
Thermophysical Models and Properties and Liquids and Gases folders:
• Select the Thermophysical Models and Properties folder
• Select the Liquids and Gases sub-folder
• Open the Molecular Properties (Fluids) panel
The default fluid material is air so this does not need to be changed. However, since
the air temperature (and hence density) of each inlet stream is different, the Density
option must be re-specified:
• Select Ideal-f(T,P) from the Density list
The rest of this panel’s options are suitable for the analysis so:
• Click Apply
1-8 Version 4.06
Tutorial 1.1 PRE-PROCESSING AND CFD SOLUTION Pre-Processing
Boundary Locations
The next set of parameters requiring attention are those describing the application
of a turbulence model:
• Open the Turbulence Models panel
• Select On for the Turbulence option
• Under the Turbulence tab, select the k-Epsilon/High Reynolds Number
model. This is the default k-ε model in STAR-CD and will be used in most of
the tutorials provided.
All default parameter settings are suitable for this model so:
• Click Apply
Since the problem in hand is non-isothermal, the energy equation must be activated:
• Open the Thermal Models panel
• Select On for the Temperature Calculation option
• Click Apply
This completes the specification of physical properties and models for the fluid. The
next step is to locate the boundary regions and specify boundary conditions.
Boundary Meshes such as this one created using pro-STAR’s Automated Meshing module
Locations automatically include boundary definitions on all mesh surfaces. To display these
boundaries:
• Select B > All in the main window
• Click the Display Boundaries button, , to display Figure T1.1-2
Observe that there is one boundary for every cell face on the mesh surface.
Depending on the features of that surface, these boundaries are split into different
regions; in this case there are nine such regions numbered 14 — 22.
Figure T1.1-2 Default boundaries displayed on a clipped hidden view of the mesh
Most of these regions correspond to parts of the mixing pipe wall and are redundant
for the purposes of this tutorial. They may therefore be combined into a single
region and assigned the appropriate wall boundary conditions. In doing this, one can
take advantage of a useful pro-STAR feature that
(a) assigns all cell faces on the mesh surface for which no boundaries have
been specified to a default region (known as region no. 0) and
(b) sets up a default set of boundary conditions (adiabatic, no-slip, stationary,
smooth wall) to it.
In this case, the default conditions are appropriate to the pipe wall and they may
therefore be applied indirectly simply by deleting most of the boundaries shown in
Figure T1.1-2.
To start this process, first remove the boundaries on the inlet and outlet faces
from the current boundary set:
• Select B > Unselect > Region Cursor Select
• Using the screen cursor, click on any boundary lying on the pipe’s first inlet
plane, as shown in Figure T1.1-3. The information displayed on the I/O
window will indicate that the region number corresponding to this inlet is 14.
COUNT BOUNDARY
The resulting I/O window output should be as shown below, indicating that all
inlet/outlet boundaries have been excluded; hence all those remaining in the set are
the (redundant) wall boundaries created by the AutoMesh Module.
BDEL BSET
Version 4.06 1-13
Tutorial 1.1 PRE-PROCESSING AND CFD SOLUTION Pre-Processing
Boundary Conditions
Figure T1.1-6 Boundary display with a single (default) wall boundary region
• Click Apply
• Select region 22, the second inlet, from the boundary regions list
• Choose Inlet from the Region Type drop-down menu
• Click Apply
• Select region 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.
Set Run Time Before the analysis can be run in STAR-CD, the maximum number of iterations to
Controls be performed and the maximum residual tolerance acceptable for convergence need
to be specified:
• In the pro-STAR Model Guide, select the Analysis Preparation folder
• Open the Run Time Controls panel
• Change the Maximum Number of Iterations to 300
• The default Maximum Residual Tolerance of 0.001 is acceptable so click
Apply
The pre-processing task is now complete. The next section details how to prepare
and run the analysis in STAR-CD.
CFD Analysis
There are two ways of running a STAR-CD analysis:
1. Save the geometry and problem files in pro-STAR, then quit pro-STAR and
run the STAR solver from the command line
2. Run STAR interactively from within pro-STAR using the pro-STAR Model
Guide
star
The analysis will start and the results will be displayed in your session’s window.
Once it is complete, pro-STAR may be restarted and the results post-processed as
described in the second part of this tutorial.
Running The pro-STAR Model Guide’s Run Analysis Interactively panel activates the STAR
Interactively solver through the pro-STAR interface:
• Select File > Save Model
• Open the Run Analysis Interactively panel in the Analysis Preparation folder
• Select Other for Model Units and set the Scale Factor to 0.01
• Check that Write Geometry File is set to Yes
• Click Start
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.
Post-Processing
Preliminaries Begin by checking that the model file, mixing_pipe.mdl, and the results file,
mixing_pipe.ccmp, generated during the first part of this tutorial exist in your
current working directory.
• Start pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Check that the case name (mixing_pipe) is displayed in the Case Name text
box and that the Resume From Existing .mdl File option is selected
• Click Continue
• Click Cplot
Contour The first plot to be drawn is a contour plot of temperature on the surface of the
Plots mixing pipe:
• Select the Data tab in the Load Data panel
• Turn On the Smooth option
• Select item Temperature from the Scalar Data list
• Under the 3-D Surface tab, select options Contour (filled) and Edge
Now plot contours of velocity magnitude on an x-z plane passing through the origin:
• Return to the Load Data panel
• Select item Velocity Magnitude from the Calculated Scalar Data list
• Click Get Data
• Open the Create Plots panel
• Under the Section/Clipped tab, select options Contour (filled) and Edge
• Change the Normal coordinates to 0, 1, 0
• Click Apply
• Click Plot to Screen to display Figure T1.1-9
Figure T1.1-9 Velocity magnitude contours on an x-z plane through the origin
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:
• Select the Vectors tab in the Create Plots panel
• Adjust the Thin Vectors slider so that it is at approximately 0.25
• Change the Scale Factor to 0.7 to make each vector arrow shorter
• Change the Fraction Length of Arrow Head to 0.3 to make each arrow head
larger
• Click Apply
• Click Replot in the pro-STAR window to display Figure T1.1-11
Figure T1.1-11 Thinned out velocity vectors displayed on the mesh surface
The revised plot now clearly shows the flow swirling through the mixing pipe.
Next, plot velocity vectors on the plane that was previously used for the velocity
magnitude contour plot:
• Select the Section/Clipped tab in the Create Plots panel
• Select options Vector and Edge
• Click Plot to Screen to display Figure T1.1-12
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:
• Select the Vectors tab in the Create Plots panel
• Turn On the Presentation Grid facility
• The presentation grid is defined by the number of grid points in each direction
across the entire plot window. For this case, specify the number of points in
the x- and y- directions as 75 and 66, respectively.
• Click Apply
• Click Replot in the pro-STAR window to display Figure T1.1-13
Figure T1.1-13 Velocity vectors displayed on an x-z plane using a presentation grid
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
• Select the Display Boundaries option by clicking the button in the
toolbar at the top of the main window
• Hold the middle mouse button and drag to zoom in on the smaller inlet
• Select B > New > Cursor
• Select 6 inlet boundary faces as indicated below:
• 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
that the exact boundaries chosen are not important in this case
• Click the Zoom Off button, , in the pro-STAR window to display 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:
• Turn off the Display Boundaries option by clicking the button,
• Return to the Load Data pro-STAR Model Guide panel
• Select Data Type Cell & Wall/Bound (Smooth)
• Select Temperature from the Scalar Data list
• Click Get Data
• Select the Create Plots panel
• In the Section/Clipped tab of the Create Plots panel select options Contour
(filled) and Edge
• Click Plot to Screen to display Figure T1.1-17
Note that in order to produce further plots of vectors or contours without the particle
tracks, you will need to return to the Plot Particles panel and click the Clear Tracks
button.
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.
The fluid enters the solution domain at standard pressure and temperature (1 bar and
293 K) with a maximum 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
40 Wall
320 870
10
All units in mm.
The depth of the solution domain is 300 mm throughout.
methods. Comparisons are then drawn between the accuracy and speed of each type
of mesh.
Pre-Processing
Preliminaries Begin by creating a directory for this tutorial (called tut2-1) and copy the cell,
vertex and boundary files supplied with STAR-CD (hex.cel, hex.vrt and
hex.bnd) into it. Also copy the table file inlet.tbl and the text file
exp230.xy. The table describes the inlet velocity profile while the text file
contains the experimental data and is used for comparing them to the analysis
results.
Start up pro-STAR in this directory:
• Type prostar at the command line
• Specify the graphics driver (mesa or gl)
• Type hex in the Case Name text box
• Click Continue
• In the main pro-STAR window, select File > Model Title...
• In the Title text box type
AIR FLOW OVER AN OBSTACLE (HEXAHEDRAL MESH)
• Click Apply and Close
The pro-STAR Model Guide 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.
• Select folder 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 Apply
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:
• In the main pro-STAR window, choose C > All
• Select View > Isometric > -1,1,1
• Click Cplot to display Figure T2.1-1
There are currently no boundaries attached to the grid as only the cell and vertex
data have been imported. To import boundary definitions from the boundary file:
• Select folder Locate Boundaries in the pro-STAR Model Guide and open the
Import Boundaries panel
• The boundary file is hex.bnd. This should be displayed in the File Name box
• Click Apply
Material Check the default fluid property settings. The only property data needed for an
Properties isothermal and incompressible flow are fluid density and molecular viscosity.
• Select folder Thermophysical Models and Properties in the pro-STAR Model
Guide
• Select sub-folder Liquids and Gases
• Open the Molecular Properties (Fluids) panel
Given that the default property values are those of air at standard temperature and
pressure, no change is necessary. Turn on the standard k-ε turbulence model:
2-4 Version 4.06
Tutorial 2.1 HEXAHEDRAL MESH ANALYSIS 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:
• Select the Near-Wall Treatment tab
• Turn On the Standard Two-Layer model
• Select option Wolfstein from the Model menu in the Two-Layer Model
section
• Change the Near-Wall Thickness Distance to 0.04 m. The suitability of this
value will be checked in the “Post-Processing” section
• Click Apply
Boundary Having imported the boundary location definitions and their associated region
Conditions numbers, boundary conditions are specified as follows:
For the wall (region 0):
• Select folder Define Boundaries
• Open the Define Boundary Regions panel
• Select region 0 in the region scroll list
• Select Active from the Two-Layer drop-down menu under Wall Parameters
• 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.
• In the main pro-STAR window, select Utility > Count > All
• Select File > Save Model
Analysis Use of a second-order differencing scheme can significantly increase the accuracy
Controls of the solution. Select MARS as the differencing scheme for this analysis:
• Select folder Analysis Controls in the pro-STAR Model Guide and select the
Primary Variables panel
• Under the Differencing Schemes tab, select MARS as the momentum and
turbulence Differencing Scheme
• Click Apply
Set the frequency of outputting data to the solution (post-processing) file and
specify that wall data (shear force coefficients and y+ values) are to be stored in it.
Also specify the maximum number of iterations:
• Select the Analysis Output panel under the Analysis Controls folder
• In the Solution File section, type 10 in the Output Frequency box
• In the Additional Output Data section, select item Shear Force from the list
• Enable the Post option checkbox
• Repeat the above process for item Yplus
• Choose to Show Selected to display a summary of the chosen items
• Click Apply
• Go to the Analysis Preparation folder and open the Run Time Controls panel
• Change the Maximum Number of Iterations to 200
• Click Apply
Final The pre-processing task is now complete. If you wish to terminate the session at this
Operations 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 pro-STAR Model Guide facilities for running
STAR interactively. This process is described in the next section.
• In the main pro-STAR window, select File > Save Geometry...
• Type 0.001 in the Geometry Scale Factor text box to convert the geometry
units from metres to millimetres
• Click Apply and then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
• Select File > Quit > Save & Quit
CFD Analysis
To perform the analysis interactively, proceed as follows:
• Select File > Save Model
• In the Analysis Preparation folder, open the Run Analysis Interactively panel
• Ensure that the units in which the model was built are correctly selected
(option button Millimeters). Leave all other settings at their default values.
• Click Start
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.ccmp:
• Select folder Post-Processing
• Open the Load Data panel and display the File(s) tab
• Click Open Post file
Basic Plots Select the cell-based velocity vectors for plotting. Also scale down the vector size
and switch on the edge display mode:
• Go to the Data tab and check that Data Type Cell is selected
• In the Vector Data list, select item Velocity Components UVW
• In the Scalar Data list, ensure that None is selected
• Click Get Data
• Open the Create Plots panel
• In the Section/Clipped tab, choose Vector from the Option menu and Edge
from the Edge/Mesh menu
• Check that the Normal parameter is set to 0, 0, 1 and the Point parameter is set
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 to the right of the Vectors 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 Reset View button, which is the small
button at the bottom right of the orientation cube, as shown below:
Figure T2.1-4 Contour plot of turbulence kinetic energy on the symmetry plane
S
Figure T2.1-5 Contour plot of turbulence dissipation rate on the symmetry plane
Validation of In Tutorial 2.2 and 2.3, tetrahedral and polyhedral cells will be used to mesh the
Results 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.
• Go to the Options tab in the Create Plots panel
• Choose Auto for Range and click Apply
• In the Load Data panel, select option Wall from the Data Type menu
• Ensure the Smooth option is turned Off
• Select item YPLUS from the Scalar Data list
• Click Get Data
Since wall data are stored in specially created shells at the wall surfaces (cell type
no. 5), it is necessary to assemble a new cell set that contains only these shells:
• Change the plot type to a Hidden Surface plot
• Select View > Axis > +Y
• Ensure edge plotting is off by clicking the Display Edges button, , in the
main pro-STAR window
• Select Plot > Wplot from the menu bar
• Select C > New > Type and click anywhere on the visible surface
• Select Post > Caverage > Cset
• Click Wplot
• Type the following in the I/O window
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.
To check whether the near-wall layer thickness in the turbulence model (see page
2-5) was given a reasonable value:
• In the Load Data panel, select Data Type Cell
• Ensure the Smooth option is turned Off
• Choose Two Layer from the Scalar Data list
• Click Get Data
• Go to the Create Plots panel
• In the Section/Clipped tab select Contour (filled) and None
• Click Plot to Screen
• In the main pro-STAR window, select C > All
• Click Cplot and reset the view by clicking the Reset View button at the bottom
right of the orientation cube to display Figure T2.1-7.
The red region in this plot represents cells in the boundary layer, the green region
cells that are outside the boundary layer but still inside the near-wall layer and the
blue region cells outside the near-wall layer. The plot shows that the two-layer
model has been implemented correctly as there are no places at which the blue and
red regions are in contact. In other words, the near-wall layer encompasses the
whole boundary layer, as required. The green region also has minimal thickness,
hence the computational cost is minimal.
Graph It is sometimes useful to display the results of the analysis as x-y graphs, bar charts
Plotting 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 code’s x-y graph plotting capabilities are
demonstrated in this part of the tutorial.
The following operations are normally necessary for producing an x-y graph:
• Extract and prepare the data to be plotted
• Store the data in graph registers
• Create graphs by plotting the contents of any register against those of another
register
• Combine several graphs into pro-STAR’s basic graph entity, called a ‘frame’
• Define essential information for each frame, such as axis scaling, legends and
graph labels
• Display the frame
One does not need to follow the entire procedure outlined above. Default settings
can often be used, as shown in the examples below.
Simple The first requirement is to assemble a set of U velocity magnitude values along a
Graphs line on the symmetry plane located at x = 230 mm. The graph will plot the U
velocity (the abscissa) against the y-coordinate (the ordinate).
To do this, and produce a default graph, proceed as follows:
• Not all the graph specification options are available when a section plot is
displayed. To avoid this, ensure that Hidden Surface plot is selected using
the drop-down menu in the main pro-STAR window.
• In the pro-STAR Model Guide, select sub-folder Graphs followed by
sub-folder Extract Data
• Open the Field Data panel
• Click Reset Graph at the bottom of the panel and choose Yes
• Check that the Select data along option at the top of the panel is set to Line
• Enter 300 as the Number of data points
• To increase the number of allowed data points, type
T2.1-8
Customizing It is clear that the default graph is not exactly what is required. To swap the axes and
Graphs adjust their scales:
• Open the Customize Graphs panel
• Go to the Pairs tab
• Click Clear at the bottom of the Register Pairs list and choose Yes to remove
the existing graph
• Choose SU (which should be Register # 9) from the X-Axis Register list
• Choose Y LOCATION (which should be Register # 4) from the Y-Axis
Register list
• Click Add Register Pair and then click Apply
• Click Draw All Frames
• Go to the Axis tab
• For the X-Axis Parameters option, change the Title to U - m/s
• Change the axis end-points by entering 0 and 1.4 in the Xmin and Xmax
boxes, respectively
• Change the axis annotations by entering 0.1, the required segment length for
major tick marks, in the Xmajor box
• Click Apply
• In the Y-Axis Parameters options, change the Title to Y - mm. Also, change
the axis end-points by entering 0 and 300 in the Ymin, Ymax boxes,
respectively
• Change the format for Numbers to Integer
• Click Apply
• Go to the Options sub-tab
• In the Additional Graph Labels section, select label no. 1 in the scroll list and
then enter the desired label, U velocity profile at x = 230 mm, in the text box
underneath.
• Specify the label’s 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:
• Open the External Data panel
• The required File Name is exp230.xy. Find it using pro-STAR’s built-in
file manager
• Select xyxyxy from the Establish X-Y pairs list
• Click Create Graph
The External Data panel can also be used to save graph register data to an external
file. To save the data displayed in Figure T2.1-8:
• Change the File Name to hex230.xy
• Choose to Specify the Register to store data as 4
• Change the Increment in register to 5
• Click Save Registers
The colours of the two graphs are the same. To change one of them and add a
legend:
• Return to the Customize Graphs panel
• In the Display tab select Legend from the Display Options menu
• Specify the Location as X1 = 7.35, Y1 = 8.85, X2 = 9.85, Y2 =9.85
• Click Apply
• Select the Registers tab
• Click on Register 4 in the Registers list and change its label to Numerical
• Click Apply
• Click on Register 11 in the Registers list and change its label to
Experimental
• Change the Color under Line Parameters to number 7, i.e., yellow
• Click Apply
• Click Redraw in the main pro-STAR window to display Figure T2.1-9
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 In this case, wall shear force is a useful quantity for judging the length of the
Force 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 Reset Graph and then Yes to remove the existing graph data
• Go to the Field Data panel
• Change the 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
• Go to the Load Data panel
• Select Data Type Wall and Smooth option On
• Select Shear Force (X-Dir) from the Scalar Data list and click Get Data
• Return to the Field Data panel
Figure T2.1-10 Graph of wall shear force along the ‘bottom’ wall
Pre-Processing
Create a directory for this tutorial (called tut2-2) and copy the coded files
provided supplied with the STAR-CD installation (tet.cel, tet.vrt and
tet.bnd) into it. Also copy the table file inlet.tbl and the text file
exp230.xy., containing the inlet velocity profile and experimental data.
Start up pro-STAR in this directory:
• Type prostar at the command line
• Choose the graphics driver (mesa or gl)
• Type tet in the Case Name box
• Click Continue
• Select File > Model Title...
• In the Title text box type
AIR FLOW OVER AN OBSTACLE (TETRAHEDRAL MESH)
• Click Apply and Close
Now, import the grid into pro-STAR using the pro-STAR Model Guide:
• In the pro-STAR Model Guide, select folder 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 Apply
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
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... from the pro-STAR window menu
• Select Connectivity from the Check list
• Click Apply
• Click Close
In this case, the cells are all connected and belong to one group so the mesh is OK.
Material The default fluid property values are those of air at standard temperature and
Properties pressure. No change to these is necessary. Turn on the standard k-ε turbulence
model:
• Select folder Thermophysical Models and Properties in the pro-STAR Model
Guide
• Select sub-folder Liquids and Gases
2-20 Version 4.06
Tutorial 2.2 TETRAHEDRAL MESH ANALYSIS 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. To define the two-layer model:
• Select the Near-Wall Treatment tab
• Turn On the Standard Two-Layer model
• Select option Wolfstein as the Two-Layer Model
• Change the Near Wall Thickness Distance to 0.035 m. The suitability of this
value will be checked in the “Post-Processing” section
• Click Apply
Choose a fluid cell just above the obstacle as the monitoring location:
• Open the Monitoring and Reference Data (Fluids) panel
• Type 66638 in the Monitoring Cell Number box
• Type 158 in the Pressure Cell Number box. This cell is in the same position as
the one specified in Tutorial 2.1
• Click Apply
Boundary Having imported the boundary location definitions and their associated region
Conditions numbers, boundary conditions are imposed as follows:
For the wall (region 0):
• Select folder Define Boundaries
• Open the Define Boundary Regions panel
• Select region no. 0 in the region scroll list
• Select Active from the Two-Layer pull-down menu
• Click Apply
Analysis Use of a second-order differencing scheme can significantly increase the accuracy
Controls of the solution. Select MARS as the differencing scheme for this analysis:
• Open folder Analysis Controls in the pro-STAR Model Guide and select the
Primary Variables panel
• Under the Differencing Schemes tab, select MARS as the momentum and
turbulence Differencing Scheme
• Click Apply
Set the frequency of data output to the solution file and specify that wall data,
specifically shear force coefficients and y+ values, are to be stored in it:
• Select the Analysis Output panel
• In the Solution File section, type 10 in the Output Frequency box
• In the Additional Output Data section, select item Shear Force from the list
• Enable the Post option checkbox
• Repeat the above process for item Yplus
• Choose to Show Selected to display a summary of the chosen items
• Click Apply
Specify the maximum number of iterations:
• Go to the Analysis Preparation folder and open the Run Time Controls panel
• Change the Maximum Number of Iterations to 200
• Click Apply
Final The pre-processing task is now complete. If you wish to terminate the session at this
Operations 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 pro-STAR Model Guide facilities for running
STAR interactively. This process is described in the next section.
• In the main pro-STAR window, select File > Save Geometry...
• Enter 0.001 for the Geometry Scale Factor
• Click Apply and then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
• Select File > Quit > Save & Quit
CFD Analysis
To perform the analysis interactively, proceed as follows:
• Select File > Save Model
• In the Analysis Preparation folder, open the Run Analysis Interactively panel.
• Check that the units in which the model was built are correctly selected
(option button Millimeters). Leave all other settings at their default values.
• Click Start
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.ccmp:
• Select folder Post-Processing
• Open the Load Data panel and display the File(s) tab
• Click Open Post file
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:
• Go to the Data tab and check that Data Type Cell is selected
• In the Vector Data list, select item Velocity Components UVW
• Click Get Data
• Open the Create Plots panel
• In the Section/Clipped tab, choose Vector from the Option menu and Edge
from the Edge/Mesh menu
• Check that the Normal parameter is set to 0, 0, 1 and the Point parameter is set
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
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:
• Return to the Load Data panel
• In the Data tab, select Cell & Wall/Bound (Smooth) from the Data Type
menu
• In the Scalar Data list, select item Pressure and then click Get Data
• Go to the Create Plots panel
• In the Section/Clipped tab choose options Contour (filled) and Edge
• In the Options tab, enter a Range of -1.9 to 0.6
• Click Apply
• Under the Section/Clipped tab, click Plot to Screen to display Figure T2.2-3
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:
• In the Options tab enter values From 0 To 0.2 for the User Range
• Click Apply
• Go to the Load Data panel
• 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
• Go to the Create Plots panel
• In the Options tab enter values from 0 to 2 for the User Range
• Click Apply
• In the main window, click Replot to display Figure T2.2-5
Validation of Plot the y+ values at the wall boundaries to help verify the suitability of the mesh
Results for the turbulence model employed:
• Go to the Options tab in the Create Plots panel
• Choose Auto Range and click Apply
• In the Load Data panel, select option Wall from the Data Type menu
• Ensure Smooth option is turned Off
• Select item YPLUS from the Scalar Data list
• Click Get Data
Since wall data are stored in specially created shells at the wall surfaces (cell type
no. 5), it is necessary to assemble a new cell set that contains only these shells:
• Change the plot type to a Hidden Surface plot
• Select View > Axis > +Y
• Turn off edge plotting by clicking the button in the main pro-STAR
window
• Select Plot > Wplot
• Select C > New > Type and click anywhere on the visible surface
• Select Post > Caverage > Cset
• Select Plot > Wplot
• Type
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
2-21) was given a reasonable value:
• In the Load Data panel, select Data Type Cell
• Ensure the Smooth option is turned Off
• Choose Two Layer from the Scalar Data list
• Click Get Data
• Go to the Create Plots panel
• In the Section/Clipped tab select Contour (filled) and None
• Click Plot to Screen
• In the main pro-STAR window, select C > All and then click Cplot
• Display Figure T2.2-7 by clicking the Reset View button, as shown below:
The plot shows that the two-layer model has been implemented correctly. In
addition, the tetrahedral mesh has permitted the use of a smaller near-wall layer
thickness compared to that in Tutorial 2.1. This saves some computational time,
though the greater number of cells in the tetrahedral model is a much more
significant factor.
Simple Graphs similar to those in Tutorial 2.1 will be created next. The first requirement is
Graphs 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
(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, ensure that Hidden Surface plot is selected in the
drop-down menu in the main pro-STAR window.
• In the pro-STAR Model Guide, open sub-folder Graphs followed by
sub-folder Extract Data
• Open the Field Data panel
• Click Reset Graph at the bottom of the panel and choose Yes
• Check that the Select data along option at the top of the panel is set to Line
• Enter 100 as the Number of data points
• Ensure that Line defined by End points is selected
• Specify these end points to be 230, 0, 0 and 230, 300, 0
• Choose Post 4 from the Post data to load menu
• Go to the Load Data panel
• Ensure option Cell is selected from the Data Type menu
• Turn On the Smooth option
• Select item Velocity Component U from the Scalar Data list
• Click Get Data
• Return to the Field Data panel. The Register Data box will show that the U
velocity component (SU) is now loaded in post register no. 4
• For the Graph Data Vs option, choose to plot the graph data against the
Y-axis
• Type
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
Customizing The default graph presentation needs to be adjusted. To do this we swap the axes
Graphs and adjust their scales:
• Open the Customize Graphs panel
• Go to the Pairs tab
• Click Clear at the bottom of the Register Pairs list and choose Yes to remove
the existing graph
• Choose SU (which should be Register # 9) from the X-Axis Register list
• Choose Y LOCATION (which should be Register # 4) from the Y-Axis
Register list
• Click Add Register Pair and then click Apply
• Go to the Axis tab
• For the X-Axis Parameters option, change the Title to U - m/s
• Enter 0 and 1.4 in the Xmin, Xmax boxes, respectively
• Enter 0.1 in the Xmajor box and then click Apply
• For the Y-Axis Parameters option, 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 tab
• In the Additional Graph Labels section, select label no. 1 in the scroll list and
then enter U velocity profile at x = 230 mm in the text box underneath.
• Enter coordinates (3.5, 9.0) in the Sx and Sy boxes
• Click Apply
• In the main window, click Redraw to display the modified graph
Experimental results are provided in a coded (text) file. To plot these on the same
graph and hence check the validity of the numerical results:
• Open the External Data panel
• The required File Name is exp230.xy. Find it using pro-STAR’s built-in
file manager
• Select xyxyxy from the Establish X-Y pairs list
• Click Create Graph
The External Data panel can also be used to save graph register data to an external
file. To save the data displayed in the graph:
• Change the File Name to tet230.xy
• Choose to Specify the Register to store data as 4
• Change the Increment in register to 5
• Click Save Registers
To add a legend:
• Return to the Customize Graphs panel
• In the Display tab select Legend from the Display Options menu
• Specify the Location as X1 = 7.35, Y1 = 8.85, X2 = 9.85, Y2 =9.85
• Click Apply
• Select the Registers tab
• Click on Register 4 in the Registers list and change its label to Numerical
• Click Apply
• Click on Register 11 in the Registers list and change its label to
Experimental
• Change the Color under Line Parameters to number 7, i.e., yellow
• Click Apply
• Click Redraw in the main pro-STAR window to display Figure T2.2-8
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 To produce a graph of wall shear force:
Force
• Click Reset Graph and then Yes to remove the existing graph data
• Go to the Field Data panel
• Change the Number of data points to 175
• Check that Line is selected for the Select data along option and Specify the
End points as 330, 0, 0 and 1200, 0, 0
• Select Post 4 from the Post data to load menu
• Go to the Load Data panel
• Select Data Type Wall and Smooth option On
• Select Shear Force (X-Dir) from the Scalar Data list and click Get Data
• Return to the Field Data panel
• Choose to plot the graph data against the X-axis
• Click Create Graph
Figure T2.2-9 Graph of wall shear force along the ‘bottom’ wall
The irregularity of the tetrahedral mesh leads to a less smooth shear stress profile
compared to that for the hexahedral mesh. Even so, the predicted recirculation zone
length can easily be measured.
Final This tutorial is now complete. Exit pro-STAR by selecting:
Operations
• File > Quit > Quit, Nosave
Pre-Processing
Create a directory for this tutorial (called tut2-3) and copy the files provided with
STAR-CD (poly.cel, poly.vrt and poly.bnd) into it. Also copy the table
file inlet.tbl and the text files exp330.xy, hex330.xy, and tet330.xy,
which will be used to draw comparisons between the results produced by the three
meshes in this tutorial group.
Start up pro-STAR in this directory:
• Type prostar at the command line
• Choose the graphics driver (mesa or gl)
• Type poly in the Case Name box
• Click Continue
• Select File > Model Title...
• In the Title text box type
AIR FLOW OVER AN OBSTACLE (POLYHEDRAL MESH)
• Click Apply and Close
Import the cell, vertex and boundary data into pro-STAR using the pro-STAR
Model Guide and display the grid and boundaries:
• In the pro-STAR Model Guide, select folder 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 Apply
• In the main pro-STAR window, select C > All
• Select View > Isometric > -1,1,1
• Click Cplot to display Figure T2.3-1
• In the pro-STAR Model Guide, 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 and
• Click the Display Boundaries button to display all boundaries,
• Check the boundary locations visually and then click off the Display
Boundaries button
Set the monitoring and pressure reference cell locations to be equivalent to those
chosen in the previous two tutorials:
• Select the Monitoring and Reference Data (Fluids) panel
• Change the Monitoring Cell Number to 27774
• Change the Pressure Cell Number to 9
• Click Apply
Set the frequency of data output to the solution file and specify that wall data are to
be stored in it:
• Select the Analysis Output panel
• In the Solution File section, type 10 in the Output Frequency box
• In the Additional Output Data section, select item Shear Force from the list
• Enable the Post option checkbox
• Repeat the above process for item Yplus
• Choose to Show Selected to display a summary of the chosen items
• Click Apply
Final The pre-processing task is now complete. If you wish to terminate the session at this
Operations 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 pro-STAR Model Guide facilities for running
STAR interactively. This process is described in the next section.
• Select File > Save Geometry...
• Enter 0.001 as the Geometry Scale Factor
• Click Apply and then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
• Select File > Quit > Save & Quit
CFD Analysis
To perform the analysis interactively, proceed as follows:
• Select File > Save Model
• In the Analysis Preparation folder, open the Run Analysis Interactively panel.
• Check that the units in which the model was built are correctly selected
(option button Millimeters). Leave all other settings at their default values.
• Click Start
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.ccmp:
• Select folder Post-Processing
• Open the Load Data panel and display the File(s) tab
• Click Open Post file
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:
• Go to the Data tab and check that Data Type Cell is selected
• In the Vector Data list, select item Velocity Components UVW
• Click Get Data
• Open the Create Plots panel
• In the Section/Clipped tab, choose options Vector and Edge
• Check that the Normal parameter is set to 0, 0, 1 and the Point parameter is set
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
• Under the Section/Clipped tab, click Plot to Screen
• Display Figure T2.3-2 by selecting View > Axis > +Z
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:
• Return to the Load Data panel
• In the Data tab, select Cell & Wall/Bound (Smooth) from the Data Type
menu
• In the Scalar Data list, select item Pressure and then click Get Data
• Go to the Create Plots panel
• In the Section/Clipped tab choose options Contour (filled) and Edge
• In the Options tab, enter a Range of -1.9 to 0.6
• Click Apply
• Under the Section/Clipped tab, click Plot to Screen to display Figure T2.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:
• In the Options tab enter values from 0 to 0.2 for the User Range
• Click Apply
• Go to the Load Data panel
• 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
• Go to the Create Plots panel
• In the Options tab enter values from 0 to 2 for the User Range
• Click Apply
• In the main window, click Replot to display Figure T2.3-5
Validation of Plot the y+ values at the wall boundaries to help verify the suitability of the mesh
Results for the turbulence model employed:
• Go to the Options tab in the Create Plots panel
• Choose Auto Range and click Apply
• In the Load Data panel, select option Wall from the Data Type menu
• Ensure Smooth option is turned Off
• Select item YPLUS from the Scalar Data list
• Click Get Data
Since wall data are stored in specially created shells at the wall surfaces (cell type
no. 5), it is necessary to assemble a new cell set that contains only these shells:
• Type
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:
• In the Load Data panel, select Data Type Cell
• Ensure the Smooth option is turned Off
• Choose Two Layer from the Scalar Data list
• Click Get Data
• Go to the Create Plots panel
• In the Section/Clipped tab select Contour (filled) and None
• Click Plot to Screen
• In the main pro-STAR window, select C > All
• Click Cplot and reset the view by clicking the Reset View button at the bottom
right of the orientation cube to display Figure T2.3-7
The plot shows that the two-layer model has been implemented correctly.
Comparative Instead of plotting graphs showing just the current results, as in Tutorial 2.1 and
Graphs 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:
• Not all the graph specification options are available when a section plot is
displayed. To avoid this, ensure that Hidden Surface plot is selected in the
drop-down menu in the main pro-STAR window.
• In the pro-STAR Model Guide, open sub-folder Graphs followed by
sub-folder Extract Data
• Open the Field Data panel
• Click Reset Graph at the bottom of the panel and choose Yes
• Check that the Select data along option at the top of the panel is set to Line
• Enter 300 as the Number of data points
• Ensure that Line defined by End points is selected
• Specify these end points to be 330, 0, 0 and 330, 300, 0
• Choose Post 4 for the Post data to load
• Go to the Load Data panel
• Ensure option Cell is selected from the Data Type menu
• Turn On the Smooth option
• Select item Velocity Component U from the Scalar Data list
• Click Get Data
• Return to the Field Data panel. The Register Data box will show that the U
velocity component (SU) is now loaded in post register no. 4
• For the Graph Data Vs option, choose to plot the graph data against the
Y-axis
• Type
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
• Open the Customize Graphs panel
• Go to the Pairs tab
• Click Clear at the bottom of the Register Pairs list and choose Yes to remove
the existing graph
• Choose SU (which should be Register # 9) from the X-Axis Register list
• Choose Y LOCATION (which should be Register # 4) from the Y-Axis
Register list
• Click Add Register Pair and then click Apply
• Go to the Axis tab
• For the X-Axis Parameters option, 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
• For the Y-Axis Parameters option, 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 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
Now import the experimental data and the data sets from the previous two tutorials
and plot them all on the same graph:
• Open the External Data panel in the Extract Data folder
• The File containing data from the hexahedral mesh is hex330.xy. Find it
using the file manager
• Select xyxyxy from the Establish X-Y pairs list
• Click Create Graph
• The File containing data from the tetrahedral mesh is tet330.xy. Find it
using the file manager
• Select xyxyxy from the Establish X-Y pairs list
• Click Create Graph
• Select File exp330.xy using the file manager
• Select xyxyxy from the Establish X-Y pairs list
• Select Create Graph
Using the same technique as described in Tutorial 2.1, add a legend to the plot. Note
that you will need to rename the graph registers containing the y-axis data. The
result is displayed in 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.
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.
No. of No. of
Mesh Time (s)a
cells iterations
Hexahedral 67699 180 412
Tetrahedral 140141 170 644
Polyhedral 60838 96 277
a.Run time will vary with computer speed
The polyhedral mesh fills the problem geometry much more efficiently, allowing
fewer cells to be used and run times to be reduced without significantly degrading
the solution accuracy. Conversely, a polyhedral mesh with as many cells as the
tetrahedral mesh in Tutorial 2.2 would be expected to produce a significant increase
in accuracy with little increase in run time.
Final This tutorial is now complete. Exit pro-STAR by selecting:
Operations
• File > Quit > Quit, Nosave
∆p
------ = – ( αv + β )v
L
where v is the superficial velocity through the medium and α, β are coefficients
defining the porous resistance.
Values for the resistance coefficients can be measured experimentally or derived
using various empirical relationships, depending on the exact nature of the problem
(see Chapter 8 of the Methodology volume). In this case α = 25 and β = 1500. These
values are roughly what would be expected from a porous catalyst.
Modelling Strategy
The following steps are taken to set up the model:
• In the cell table list, define a porosity index for the porous medium
• Define porous properties pertaining to that porosity index
• Select a cell range for the porous medium
• Modify the cell type of the selected cell range
Pre-Processing
Preliminaries Create a sub-directory for this tutorial called tut3-1. Copy the coded files
catalyst.cel, catalyst.vrt, catalyst.bnd and catalyst.inp
supplied with the STAR-CD installation into it.
• Start pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Enter the case name (cat_iso) in the Case Name text box
• Click Continue
• Select File > Read Input Code File... in the main pro-STAR window
• In the Read Input Coded File dialog, select the File name catalyst.inp
• Click OK
This will read default problem settings from file catalyst.inp as well as
problem geometry and boundary location definitions from the remaining three files.
• In the main window, select File > Model Title...
In this tutorial, the fluid is air at standard pressure and temperature and its
temperature, density and viscosity are assumed to be constant. These conditions are
also the pro-STAR defaults, so the properties shown on the panel are acceptable.
• Open the Turbulence Models panel
• Select On for Turbulence to set up a turbulent flow
• Select the desired turbulence model, K-Epsilon/High Reynolds Number,
from the Model menu in the Turbulence tab
• Click Apply to save your settings
• Open the Monitoring and Reference Data (Fluids) panel to check the cell
whose flow variable values will be sent to the solution monitoring file
(cat_iso.run). The cell number appears in the Monitoring Cell Number
box and can be left at its default value of 1. The displayed Reference Data
defaults for pressure and reference pressure cell location are also acceptable.
Next, define the porous subdomain. In the cell table list, define cells of type 2 as
belonging to a porous medium (called POR1 and identified by colour 3 and porosity
index 1):
• In the Utilities toolbar, click the Cell Editor button,
• Select cell row no. 2 in the Cell Editor’s scroll list
• Select Fluid from the Cell Type menu
• Change the value in the Porosity Index box to 1
• Type POR1 in the Name box
• Click Apply and then Close
Collect all cells that will take on porous properties into a set:
• Select View > Axis > -X
• Select C > Unselect > Type and click on any of the blue extrusion-layer cells
• Click Cplot
• Select C > New > Zone
• Carefully draw a box enclosing only the central block of cells, i.e., those
within the catalyst ring. 4,101 cells will be selected
• If any cells outside the ring are accidentally selected, they may be removed
from the cell set by selecting C > Unselect > Zone and drawing a box around
them
• Click Cplot
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:
• Select V > New > Cell Set
• Select C > New > Vertex Set Face
• Select V > New > Cell Set
• Select C > New > Vertex Set Face
• Select V > New > Cell Set
• Select C > New > Vertex Set Face
• Click Cplot to display Figure T3.1-1
• Change the viewpoint by selecting View > Isometric > -1, 1, 1
Assign the selected cells to the currently active cell type (no. 2) and plot:
• In the main window, select Tools > Cell...
• In the Cell Tool scroll list, highlight cell type number 2 and then choose
Modify > Modify Type (Cell Set)
• Click Replot. You will see that the colour of the chosen cells is now green
(colour 3), confirming the change to porous cells.
• Close the Cell Tool
Finally, select the whole mesh and display it as shown in Figure T3.1-2 to confirm
visually that the correct cells have become porous.
• In the main window, select C > All
• Click Cplot
• Select View > Isometric > -1, 1, 1
Boundary Specify boundary conditions for the inlet and outlet boundary regions:
conditions
• Select folder Define Boundaries and then open the Define Boundary Regions
panel
• Select region no. 1 (the inlet) in the scroll list
• Select option TI/Length from the Turbulence 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
CFD Analysis
To perform the analysis interactively, proceed as follows:
• In the main pro-STAR panel, select File > Save Model
• In the Analysis Preparation folder, open the Run Analysis Interactively panel
• Select Other for the Model Units option and enter a Scale Factor of 0.1
• Click Start
The analysis will then start automatically. The solution should satisfy the
convergence criteria within the specified maximum number of iterations. Check file
cat_iso.info for error messages during the run. There should be none.
Post-Processing
Preliminaries Read in the results of the analysis:
• Select folder Post-Processing
• Open the Load Data panel to display the File(s) tab
• Click Open Post file
Figure T3.1-4 Velocity vectors on the y-z plane in the porous region
Note that the mean velocity magnitude through the porous cells is approximately
3.2 m/s.
Now inspect the pressure variation throughout the model:
• Select C > All
• Go back to the Load Data panel
• In the Data tab, select option Cell & Wall/Bound (Smooth) from the Data
Type menu
• In the Scalar Data list, select item Pressure and then click Get Data
• Open the Create Plots panel
• In the 3-D Surface tab, select plot options Contour (filled) and Edge
• Click Plot to Screen
• Click Cplot to display Figure T3.1-5
Analysis of Figure T3.1-5 shows that the largest pressure drop occurs across the porous cells.
Results 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.
• In the main window, select C > New > Porosity
• When the cursor appears on your screen, click any cell in the porous region.
The I/O window message should indicate that 9,621 cells have been selected
• Select View > Isometric > -1,1,1
• Click Cplot to display Figure T3.1-6
Figure T3.1-6 Filled contour plot of pressure on the surface of the porous medium
Figure T3.1-6 shows that the pressure across the upstream interface of the porous
medium is non-uniform, so an average needs to be calculated. To do this, it is
necessary to collect all cells on each of the porous interfaces into a set:
• Select V > New > Cell Set Surface
• Select Tools > Cell...
• In the Cell Tool, select number 11 from the list and click Set Active Type
• Select C > New > Type Current
• Select V > Subset > Cell Set Surface
• Select C > New > Vertex Set Face
• Click Cplot
• Select View > Axis > -X
• Ensure the Display Edges and Display Mesh Lines buttons are turned off to
display Figure T3.1-7
• Select C > Subset > Zone
• Draw a box around the left-hand (upstream) group of cells
Figure T3.1-7 Vertex set on the upstream boundary of the porous medium
The pressure values at the fluid cells adjacent to the porous medium can be
reasonably used to approximate the pressure values on the upstream surface of the
porous medium, given that the pressure drop across this medium is much greater
than that in the unresisted flow. In addition, cell values are more suitable than
surface vertex values since the latter are averages of cell values on either side of the
surface separating the porous from the non-porous subdomain, and may lead to a
possible underestimate of the pressure drop. This point is illustrated in Figure
T3.1-8.
Porous
sub-
domain
Actual surface
value
Values at
Pressure
adjacent
cells
Vertex value
y-coordinate
Figure T3.1-8 Diagram illustrating the reason for choosing cell-centred pressure values
Load the pressure values and their corresponding cell volumes into pro-STAR’s
post registers:
• Select Post > Operate...
• In the Post Register Operations dialog, select Function Category Load cell
data > Pressure
• Choose to Load cell pressure into Register 5 Using Relative Values
• Click Apply
• Select Function Category Load cell data > Volume
• Select Register 6
• Click Apply
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:
• Select C > All
• Select View > SNormal View
• Go back to the Load Data panel
• Check Data Type Cell & Wall/Bound (Smooth) is selected
• Select item Turb Kinetic Energy from the Scalar Data list
• Click Get Data
• Go to the Create Plots panel
• Under the Section/Clipped tab, select options Contour (filled) and Edge
• Click Plot To Screen and Cplot to display Figure T3.1-9
• In the Load Data panel, select item Dissipation Rate from the Scalar Data
list
• Click Get Data
• In the main window, click Replot to display Figure T3.1-10
α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:
αy = 25 and βy = 1500
Modelling Strategy
The modelling steps used in setting up this case are identical to those described in
Tutorial 3.1, except that the porous medium now has orthotropic properties.
Pre-Processing
Preliminaries A number of preliminary file-copying operations are needed for proper operation of
this tutorial, as follows:
• Create a sub-directory for the tutorial called tut3-2 and copy the model file
generated in Tutorial 3.1 (i.e., cat_iso.mdl) into it
• Rename this file cat_ortho.mdl
• Since the solution obtained in Tutorial 3.1 will act as the starting point of the
current analysis, it is also necessary to copy the solution file for that case
(cat_iso.ccmp) 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.
• In the main window, select File > Model Title...
Material Enter appropriate resistance coefficients for the porous medium in the Cartesian
Properties coordinate system:
• Go to the pro-STAR Model Guide and select folder Thermophysical Models
and Properties
• Select sub-folder Porosity
• Open the Porous Resistance and Porosity panel
• Check that option By Local Coordinate System is selected from the Define
(X1,X2,X3) menu and 1 is entered in the Coordinate System box
• Type 1e6 in the X1 boxes for Alpha and Beta
• Check that 25 is entered in the X2 box for Alpha and 1500 is entered in the X2
box for Beta
• Type 1e6 in the X3 boxes for Alpha and Beta
• Click Apply
Run Time Set restart options so that the analysis will restart from the solution file of Tutorial
Controls 3.1:
• Select folder Analysis Preparation and open the Restart panel
• Select Standard Restart from the Restart File Option list
• Click the browser button next to the Restart File box, select file
cat_iso.ccmp from the browser dialog and then click Open
• Click Apply
Final The pre-processing task is now complete. If you wish to terminate the session at this
Operations 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 > Save Geometry...
• Ensure that the default value for the Geometry Scale Factor is 0.1
• Click Apply and then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
• Select File > Quit > Save & Quit
CFD Analysis
To perform the analysis interactively, proceed as follows:
• In the main pro-STAR panel, select File > Save Model
• In the Analysis Preparation folder, open the Run Analysis Interactively panel
• Check that the Scale Factor is set to 0.1 then click Start
The analysis will then start automatically. The solution should converge within the
specified maximum number of iterations. Check file cat_ortho.info for error
messages during the run.
Post-Processing
Preliminaries Read in the results of the analysis:
• Select folder Post-Processing
• Open the Load Data panel to display the File(s) tab
• Click Open Post file
You are now ready to start the post-processing session
Post- Load the velocity vector components and plot the vectors:
processing
• 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
• Click Get Data
• Open the Create Plots panel
• In the Section/Clipped tab, check that Vector is selected from the Option
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:
• Open the Cell Tool and select Cell Type number 2
• Select C > New > Type Current and click Cplot to display Figure T3.2-3
• Close the Cell Tool
Figure T3.2-3 Velocity vectors on the y-z plane in the porous subdomain
The significant difference between Figure T3.2-3 and the equivalent plot for the
isotropic porous medium, Figure T3.1-4, is that the orthotropic property prevents
the bulk of the fluid flowing through the centre of the model from spreading
outwards and slowing down, as it does in the isotropic case. Note that the mean
velocity magnitude in the porous subdomain is approximately 3.2 m/s.
Now inspect the cell-based pressure variation:
• Select C > All
• Go back to the Load Data panel
• Select Data Type Cell & Wall/Bound (Smooth)
• In the Scalar Data list, select item Pressure
• Click Get Data
• Open the Create Plots panel
• In the 3-D Surface tab, select plot options Contour (filled) and Edge
• Click Plot to Screen
• Click Cplot to display Figure T3.2-4
Before calculating the pressure drop across the catalyst, plot the cell-centred
pressure in the porous subdomain:
• Select C > New > Porosity and click anywhere inside the porous subdomain
• Select View > Isometric > -1,1,1
• Click Cplot to display 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:
• Select V > New > Cell Set Surface
• Select Tools > Cell...
• In the Cell Tool, select number 11 from the list and click Set Active Type
• Select C > New > Type Current
• Select V > Subset > Cell Set Surface
• Select C > New > Vertex Set Face
• Click Cplot
• Select View > Axis > -X
• Ensure Display Edges and Display Mesh Lines buttons are turned off
• Select C > Subset > Zone
• Draw a box around the right-hand (downstream) group of cells
• Select Post > Operate...
• Select Function Category Load cell data > Pressure
• Select Register 5 using Relative Values
• Click Apply
• Select Function Category Load cell data > Volume
• Select Register 6
• Click Apply
• Select Function Category Multi-register > Multiply
• Select Register 4 = Register 5 * Register 6
• Click Apply then Close
• In the I/O window type *get prs2 rtot 4. A value of 0.280 should be
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 The above figures give an average pressure drop of 148.78 Pa. This may be
Results 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:
• Select C > All
• Select View > SNormal View
• Go back to the Load Data panel
• Check Data Type Cell & Wall/Bound (Smooth) is selected
• Select item Turb Kinetic Energy from the Scalar Data list
• Click Get Data
• Go to the Create Plots panel
• Under the Section/Clipped tab, select options Contour (filled) and Edge
• Click Plot To Screen
• Click Cplot to display Figure T3.2-6
• In the Load Data panel, select item Dissipation Rate from the Scalar Data
list
• Click Get Data
• In the main window, click Replot to display Figure T3.2-7
Figure T4.0-1 Geometry plot showing the mesh, distribution of cell types and generic
boundary region names
Modelling Strategy
During mesh generation, the cells on the right vessel were assigned to cell type 1
and those on the left to cell type 2. This was done in order to facilitate definition of
the initial liquid and air distribution within the model. Note that in some cases (e.g.
when inlet boundary conditions are present), one may start with the whole solution
domain filled by a single fluid phase. However, if pressure boundary conditions and
gravity are used to drive the flow, both phases need to be present within the domain.
Cell typing then offers a convenient way of assigning “heavy” and “light” fluid
characteristics to cells and thus make for a simple initialization process.
Pre-Processing
Preliminaries Create a directory for the tutorial called tut4-1 and copy file gridfs.ccmg
supplied with the STAR-CD installation into it. In this directory:
• Start pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Enter the case name (gravfs) in the Case Name text box
• Click Continue
Define a transient simulation of a free-surface flow and give the case a title:
• Open the Analysis Features panel in the pro-STAR Model Guide
• Select Transient for the Time Domain option
• Select On for the Free Surface option
• Click Apply
• In the main window, select File > Model Title...
• In the Title text box type:
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:
• Select the Locate Boundaries folder in the pro-STAR Model Guide
• Open the Create Boundaries panel
• Select each region shown on the list in turn (except no. 0) and then click Plot
Region to display its location
• Turn off the Display Boundaries option by clicking the button,
Material To examine the free-surface flow modelling options:
Properties
• Select the Free Surface folder in the pro-STAR Model Guide
• Open the Controls panel to inspect the default settings and confirm that they
are suitable for the current problem
• Open the Molecular Properties (Free Surface) panel
• Note that, by default, the Light Fluid is AIR and the Heavy Fluid is H2O.
Alternative fluids may be selected from the database, if required, but the
defaults are suitable for this case.
The remaining material properties are specified using panels in the Liquids and
Gases folder. These panels feature a Material # option, 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
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 material selected at the top of the panel is set to Material # 1
• Select On for the Turbulence option
• Select the k-Epsilon/High Reynolds Number from the Model list
• Click Apply
To turn on buoyancy:
• Open the Buoyancy panel
• Tick the checkbox to enable Buoyancy
• The default values for Location and Density are suitable so click Apply
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:
• Click the button in the main pro-STAR window to open the Cell Editor
• Select row no 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 row no 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
Boundary First, define the wall boundary conditions:
Conditions
• Select the Define Boundaries folder and open the Define Boundary Regions
panel
• In the region list, select region 1 named Wall
• Change the Region Type to Wall and click Apply
• Repeat this operation for the regions named Left, Right, and Bottom
Next, define the pressure boundary conditions:
• Select region 5 named TopRight
Specify what data should be written to the results (.ccmp) file and the transient
post data (.ccmt) file:
• Open the Analysis Output panel
• Under the Post tab, check that the Write Solution File option is selected with
an Output Frequency of 100 time steps
• Click Apply
• Under the Transient tab, set the Output interval to 0.25 seconds
• Select the Turb Kinetic Energy output variable from the list and enable the
Post option
• Repeat for the VOF variable
• Click Apply
Run Time To specify the run time and time step size:
Controls
• Select the Analysis Preparation folder
• Open the Run Time Controls panel
• Set the Run time control for the analysis to Run for a Time of 5 seconds
• Click Apply
• In the Time Step Option section, specify the Time step for period as 0.005
seconds. This means that the run will continue for 1,000 time steps.
• Click Set
Although you can run the simulation interactively from the pro-STAR Model
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 > Save Geometry...
• In the Save Geometry File dialog, check that 1 is entered as the Geometry
Scale Factor
• Click Apply and then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
• 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 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 the pro-STAR Model Guide, select the Post-Processing folder and then
open the Load Data panel
• Under the File(s) tab, select Transient as the Analysis option
• Click Add File
• Select file gravfs.ccmt from the Transient list
• Click Open Transient 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 variable, the latter
showing the distribution of air and water in the solution domain:
• Under the File(s) tab of the Load Data panel, select the first time step from
the Time Step list and click Store 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
• Go to the Create Plots panel
• Under the 3-D Surface tab, select plot Option Vector & Contour and Edge
for the Edge/Mesh option
• 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
Figure T4.1-1 Volume fraction and velocity vectors after 50 time steps (0.25 s)
In some situations, usually when the mesh density varies significantly within the
domain, it may be useful to use a presentation grid. This prevents overcrowding of
velocity vectors in regions where the mesh is very fine. A description of how to do
this is given in Tutorial 1.1.
Figure T4.1-1 shows water flowing into the domain through the left pressure
boundary (TopLeft) and moving towards the right chamber, displacing air through
the right pressure boundary (TopRight) as it progresses. This is expected and, since
the results look plausible, you may continue plotting contours of VOF alone, or in
combination with vectors, or vectors alone for subsequent time steps. You may also
plot other quantities such as pressure or turbulent kinetic energy, since these were
also stored in the transient post data file. To do this, repeat the steps listed above
changing the time step selected in the File(s) tab and the variables selected in the
Data tab as desired. Pressure contours after 100, 600, and 1000 time steps are shown
in Figure T4.1-2. This type of plot was created by selecting options Contour (filled)
and Edge on the 3-D Surface tab.
Figure T4.1-2 Pressure contours after 100 (top), 600 (middle) and 1000 (bottom) time
steps
Note how, over time, the pressure profile becomes increasingly stratified. If the run
duration is sufficiently extended, an equilibrium point will be reached at which the
fluids become stationary and the pressure contours appear horizontal and evenly
spaced.
Animations pro-STAR loops can be used to produce on-screen animations, as described in
Tutorial 8.2 and Tutorial 12.3. However, animations can also be produced by
writing data to a neutral plot file and using a command to replay them. The
advantage of this method is primarily in improved presentation, as an animation
replayed from a neutral plot file will usually run faster and more smoothly than one
created directly on screen. The animation created here uses contours of the VOF
variable, which must first be displayed as static contour plots:
• Under the File(s) tab of the Load Data panel, select the first time step in the
Time Step list
• Click Store Time
• Under the Data tab, select VOF from the Scalar Data list
• Click Get Data
• Click Replot in the main pro-STAR window to display a plot similar to
Figure T4.1-1 but without the vectors. If such a plot does not appear, check
that Contour plot option and Hidden Surface plot type are selected.
A command sequence is now used to set up, write and play back an animation
sequence showing how the VOF distribution changes during the analysis. Enter the
following commands in the I/O window for the animation:
nfil,gravfs.plot
term,,file,rast
SURFSEL,ON
REPL
*define
STORE NEXT
GETV CONC 1
REPL
*end
*loop,0,20
distance,auto
center,auto
term,,x
play,gravfs.plot,1,20,1,1
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 Time the analysis is Run for specified in the Run Time Controls
panel
• Writing a new problem file
• Running STAR again
Pre-Processing
Create a directory for the tutorial called tut4-2 and copy file gridfs.ccmg
supplied with the STAR-CD installation into it. In this directory:
• Start pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Enter the case name (forcfs) in the Case Name text box
• Click Continue
Define a transient simulation of a free-surface flow and give the case a title:
• Open the Analysis Features panel in the pro-STAR Model Guide
• Select Transient in the Time Domain section
• Select On in the Free Surface section
• Click Apply
• In the main window, select File > Model Title...
• In the Title text box type:
To turn on buoyancy:
• Open the Buoyancy panel
• Tick the checkbox to enable Buoyancy
• The default values for Location and Density are suitable so click Apply
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:
• Click the button in the main pro-STAR window to open the Cell Editor
• Select row no 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 row no 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
Boundary To define boundary conditions for this simulation:
Conditions
• Select the Define Boundaries folder and open the Define Boundary Regions
panel
• In the region list, select region number 1 named Wall
• Change the Region Type to Wall and click Apply
• Repeat this operation for the regions named TopRight and TopLeft
• Select region 3, named Right, from the list
• Change the Region Type to Pressure
• Change the Pressure Option to Static
• Ensure that None is selected for Turbulence Switch and UVW is Off
• Click Apply
• Select region 2, named Left
• Change the Region Type to Inlet
• Change the U velocity to 0.001 m/s
• Ensure that 1 is selected for Coordinate System and Density is set to 1.205
• Select Velocity for the Flow Switch option
• 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:
• Open the Scalar Boundaries panel and ensure that the currently selected
Scalar is VOF
• Select region 2, Inlet from the Boundary Region list
• Check that the Boundary Condition is set to Constant
• Change the boundary Value to 1
• Click Apply
• The boundary Value for Boundary Region 3, Pressure is set to 0 by default so
no change is required
Analysis The transient SIMPLE solution algorithm must be used for free-surface problems.
Controls This tutorial will also use the AMG solver. To specify these settings:
• Select the Analysis Controls folder
• Open the Solution Method panel
• Change the Maximum Number of Outer Iterations to 10
• Change the Scalar Method menu setting to AMG and check that the Temporal
Discretization option is set as Euler Implicit, the only supported temporal
discretization scheme for free-surface flow problems
• Click Apply
Specify what data should be written to the results (.ccmp) file and the transient
post data (.ccmt) file:
• Open the Analysis Output panel
• Under the Post tab, check that the Write Solution File option is selected with
an Output Frequency of 100 time steps
• Click Apply
• Under the Transient tab, set the Output interval to 0.1 seconds
• Select the VOF output variable from the list and enable the Post option
• Click Apply
Run Time To specify the run time and time step size:
Controls
• Select the Analysis Preparation folder
• Open the Run Time Controls panel
• Set the Run time control for the analysis to Run for a Time of 2 seconds
• Click Apply
• In the Time Step Option section, check that the Time step for period is 0.001
seconds. This means that the run will continue for 2,000 time steps
4-14 Version 4.06
Tutorial 4.2 FORCED FREE-SURFACE FLOW WITH CAPILLARY EFFECTS CFD Analysis
Preliminaries
• Click Set
Although you can run the simulation interactively from the pro-STAR Model
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 > Save Geometry...
• In the Save Geometry File dialog, change the Geometry Scale Factor to 0.001
to convert the model units to millimetres
• Click Apply and then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
• 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 the pro-STAR Model Guide, select the Post-Processing folder and then
open the Load Data panel
• Under the File(s) tab, select Transient as the Analysis option
• Click Add File
• Select file forcfs.ccmt from the Transient list
• Click Open Transient file
The remainder of this tutorial demonstrates how to create static plots of flow
variables at specified times. Animated plots are not 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:
• Under the File(s) tab of the Load Data panel, select the file for step number
1700 from the Time Step list
• Click Store Time to load the data
• Under the Data tab, select Data Type Cell & Wall/Bound (Smooth)
• Select VOF from the Scalar Data list
• Click Replot
• Select Plot > Display > Overlay
• Type the following command in the I/O window:
• Under the Data tab of the Load Data panel, select Velocity Components UV
(2D vectors) from the Vector Data list
• Click Get Data
• Go to the Create Plots panel
• Under the Options tab, ensure that Auto Range is selected and click Apply
• 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 Distribution of volume fraction (upper) and velocity vectors (lower) for a
contact angle of 45 degrees, after 1,700 time steps
• Turn off the overlay mode by selecting Plot > Display > Overlay
To examine how changing the contact angle affects the resulting free surface:
• Select the Free Surface folder in the pro-STAR Model Guide and open the
Molecular Properties (Free Surface) panel
• Select Define Heavy Fluid material from the Action menu and change
Contact Angle at Wall to 150
• Click Apply
• Write the problem file and re-run the analysis
• Follow the procedure described above to plot contours of volume fraction and
velocity vectors after 1,700 time steps. The resulting plot is shown in Figure
T4.2-2
Figure T4.2-2 Distribution of volume fraction (upper) and velocity vectors (lower) for a
contact angle of 150 degrees, after 1,700 time steps (with
interface-sharpening)
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
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. The velocity vector field shows abnormally high velocity vectors at a cell
close to the wall boundary. This is caused by numerical inaccuracies arising from
poor cell quality close to this boundary. Using a few layers of hexahedral cells next
Pre-Processing
Preliminaries Create a directory for the tutorial called tut4-3 and copy file gridfs.ccmg
supplied with the STAR-CD installation into it. In this directory:
• Start pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Enter the case name (cavit) in the Case Name text box
• Click Continue
Define a transient simulation and activate the free-surface and cavitation modelling
options:
• Open the Analysis Features panel in the pro-STAR Model Guide
• Select Transient for the Time Domain option
• Select On for the Free Surface option
• Select On for the Cavitation option
• Click Apply
The remaining material property settings are specified using panels in the Liquids
and Gases folder. These panels feature a Material option, 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 Thermophysical Models and Properties, then Liquids and Gases
folders and open the Turbulence Models panel
• Check that the material selected at the top of the panel is set to Material # 1
• Select On for the Turbulence option
• Select k-Epsilon/High Reynolds Number from the Model list
• Click Apply
• In the Reference Data section, click the mouse icon to select the reference
pressure cell number
• In the main pro-STAR window, click on a cell at the top right-hand corner.
This location is chosen because this corner will always contain air and so the
pressure variations are likely to be minimal.
• Click Apply
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:
• Click the button in the main pro-STAR window to open the Cell Editor
• Select row no 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 row no 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
No action is needed for the regions named “Front”, “Bottom” and “Back” as these
were 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 ensure that VOF is currently selected
in the Scalars list
• Select region 2 Pressure from the Boundary Region list
• Check that the Boundary Condition is set to Constant
• Change the boundary Value to 1
• Click Apply
• The VOF boundary Value 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 The transient SIMPLE solution algorithm must be used for free-surface problems.
Controls This tutorial will also use the AMG solver. To specify these settings:
• Select the Analysis Controls folder
• Open the Solution Method panel
• Change the Maximum Number of Outer Iterations to 10
• Change the Scalar Method menu setting to AMG and check that the Temporal
Discretization option is set as Euler Implicit, the only supported temporal
discretization scheme for free-surface flow problems
• Click Apply
• Click Apply
• Under the Differencing Schemes tab, change the differencing scheme for the
momentum equations to MARS
• Click Apply
• Open the Additional Scalars (Controls) panel
• Select scalar no. 1 (VOF) and check that the Under-Relaxation Factor is 0.8
• Leave all other settings at their default values and click Apply
• Select scalar no. 2 (CAV) and check that the Under-Relaxation Factor is 0.8
• Leave all other settings at their default values and click Apply
Specify what data should be written to the results (.ccmp) file and the transient
post data (.ccmt) file:
• Open the Analysis Output panel
• Under the Post tab, check that the Write Solution File option is selected with
an Output Frequency of 100 time steps
• Click Apply
• Under the Transient tab, set the Output interval to 1e-4 seconds
• Select the VOF output variable from the list and enable the Post option
• Enable the Post option for the CAV output variable also
• Click Apply
Run Time To specify the run time and time step size:
Controls
• Select the Analysis Preparation folder
• Open the Run Time Controls panel
• Set the Run time control for the analysis to Run for a Time of 5e-4 seconds
• Click Apply
• In the Time Step Option section, specify the Time step for period as 1e-6
seconds. This means that the run will continue for 500 time steps
• Click Set
Although you can run the simulation interactively from the pro-STAR Model
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 > Save Geometry...
• In the Save Geometry File dialog, change the Geometry Scale Factor to 0.001
to convert the model units to millimetres
• Click Apply and then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
• 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 the pro-STAR Model Guide, select the Post-Processing folder and then
open the Load Data panel
• Under the File(s) tab, select Transient as the Analysis option
• Click Add File
• Select file cavit.ccmt from the Transient list
• Click Open Transient file
The remainder of this tutorial demonstrates how to create static plots of flow
variables at specified times. Animated plots are not produced here as the methods
for creating them are described in detail in other tutorials, namely Tutorial 4.1,
Tutorial 8.2 and Tutorial 12.3.
Basic Plots First, plot velocity vectors after 500 time steps:
• Under the File(s) tab of the Load Data panel, select the file for step number
500 from the Time Step list and click Store 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
• Go to the Create Plots panel
• Under the 3-D Surface tab, select options Vector and Edge
• Click Plot To Screen to display Figure T4.3-1
As in Tutorial 4.2, we see an abnormally high velocity vector at a cell close to one
of the wall boundary corners. This is caused by numerical inaccuracies due to poor
mesh quality.
Next plot the VOF distribution (volume fraction of liquid water) after 500 time
steps:
• Return to the Data tab of the Load Data panel and select Data Type
Cell & Wall/Bound (Smooth)
• Select VOF (the volume fraction of liquid water) from the Scalar Data list
• Click Get Data
• Go to the Create Plots panel
• Under the 3-D Surface tab, select options Contour (filled) and Edge
• Click Plot To Screen to display Figure T4.3-2
Now plot the distribution of water vapour, CAV, after 500 time steps:
• On the Data tab of the Load Data panel, select CAV (the volume fraction of
water vapour) from the Scalar Data list
• Click Get Data and Replot to display Figure T4.3-3
Figure T4.3-2 Contour plot showing liquid water distribution after 500 time steps
Figure T4.3-3 Contour plot showing water vapour distribution after 500 time steps
As expected, cavitation occurs at the nozzle entrance as a result of the low pressure
region produced by the sharp corner and the accelerating flow.
It is possible to create a contour plot that approximately shows both the CAV and
VOF 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 data in post registers
5 and 6, respectively:
• Enter the following commands in the I/O window:
• In the main pro-STAR window, select Post > Operate... to open the Post
Register Operations dialog
• Select Function Category Scalar/Vector > Multiply
• Choose Register 6 = 2 * Register 6
• Click Apply
• Select Function Category 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
Color Map menu. Note that the colours displayed under the 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, check that options Contour (filled) and Edge are
selected
• Click Plot To Screen to display Figure T4.3-4
Figure T4.3-4 Contour plot showing VOF and CAV distributions after 500 time steps
Figure T5.0-1 Mesh structure for the dilution pipe model (back elevation)
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 1.1) and the
relevant cell, vertex, boundary and problem setup files are already available (files
dil_pipe.cel, dil_pipe.vrt, dil_pipe.bnd and dil_pipe.inp,
respectively). Therefore, before starting the tutorial, make sure that the supplied
files are copied into your current directory.
• Start up pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Enter the case name (dil_pipe_ss) in the Case Name text box
• Click Continue
This will read default problem settings from file dil_pipe.inp plus the
problem’s cell, vertex and boundary location definitions from the remaining three
files.
• In the main window, select File > Model Title...
• In the Title text box type:
Mesh Verify that the mesh data are correct by selecting all cells and vertices and plotting
Checking the mesh in ‘Hidden Surface’ mode:
• 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 Cplot
• Change the viewpoint to approximately (-1, 0.5, -1) using the orientation
cube’s slider controls to display Figure T5.1-1
It will be seen that the mesh is in fact the same as the one created in Meshing
Tutorial 1.1.
Material Check the default fluid properties and then choose the ideal gas law for density
Properties variations, making it a function of temperature only (incompressible flow):
• In the pro-STAR Model Guide, select folder Thermophysical Models and
Properties
• Select sub-folder Liquids and Gases
• Open the Molecular Properties (Fluids) panel
• Choose option Ideal-f(T) from the Density menu
• Click Apply
It will be seen that no scalar entities have been defined yet. The required scalar is
methane and its properties can be retrieved from the built-in property database.
However, in this tutorial, methane is treated as a user-defined scalar and its
properties are supplied manually for the purposes of illustration.
• Type the following property data in the corresponding dialog boxes:
Scalar # 1 — CH4
Density — 0.669
Molecular Weight — 16
Molecular Viscosity — 1.175e-5
Specific Heat — 2230.0
Conductivity — 0.038
Heat of Formation — -4.68e6
Temp. of Formation — 298.15
• Click Apply
The details of the scalar’s properties will be shown in the I/O window as follows:
Note that the scalar’s 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:
• In the main window, select File > Save Model
Boundary Specify boundary conditions for each region, including turbulence parameters at the
Conditions two inlets in terms of turbulence intensity and length scale:
• Select folder Define Boundaries and then open the Define Boundary Regions
panel
• Select region no. 1 (the inner inlet) in the scroll list
• Click Apply
• Select region no. 2 in the scroll list
• Select option TI/Length in the Turbulence Switch menu
• Enter inlet conditions in the appropriate boxes, as shown below:
• Click Apply
• Select region no. 3 in the boundary regions scroll list
• Select option TI/Length in the Turbulence Switch menu
• Enter pressure boundary conditions in the appropriate boxes, as shown below:
• Click Apply
Specify boundary conditions for the scalar (CH4) mass fraction, ensuring that its
value is 1.0 at the inner pipe inlet and 0.0 at all other boundaries.
• Open the Scalar Boundaries panel
• Select region no. 1 (the inner pipe inlet) in the Boundary Region scroll list.
Ensure CH4 is selected in the Scalars list.
• Enter the required boundary value, 1, in the Value box and then click Apply
• Select region no. 2 (the outer pipe inlet) and then region no. 3 (the outflow
boundary) in the list to confirm that the scalar mass fraction at both
boundaries is 0
Check the scalar control parameters and then modify some of them:
• Open the Additional Scalars (Controls) panel
• Check that CH4 is selected in the Scalar scroll list and then type 0.95 in the
Under-Relaxation Factor box
• Type 0.0001 in the Residual Tolerance box
• Click Apply
Make the residual error tolerances for the temperature and scalar equations the
same. This ensures that both equations are solved to the same level of accuracy:
Run Time Check the status of the run time control parameters:
Controls
• Select folder Analysis Preparation and open the Run Time Controls panel
• Enter 200 for the Maximum Number of Iterations
• Click Apply
Final The pre-processing task is now complete. If you wish to terminate the session at this
Operations 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 pro-STAR
Model Guide facilities for running STAR interactively. This process is described in
the next section.
• In the main pro-STAR panel, select File > Save Geometry...
• In the Save Geometry File dialog, enter 0.0254 in the Geometry Scale Factor
box
• Click Apply and then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
• Select File > Quit > Save & Quit
CFD Analysis
To perform the analysis interactively, proceed as follows:
• In the main pro-STAR panel, select File > Save Model
• In the Analysis Preparation folder, open the Run Analysis Interactively panel
• Ensure that the units in which the model was built are correctly selected
(option button Inches). Leave all other settings at their default values
• Click Start
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 dil_pipe_ss.ccmp:
• Select folder Post-Processing
• Open the Load Data panel to display the File(s) tab
• Click Open Post file
Post- Load velocity vector components for plotting and then display them on your screen
processing using the ‘Quick Hidden Line’ mode:
• 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
• Click Get Data
• Open the Create Plots panel
• In the 3-D Surface tab, check that Vector is selected from the Option menu
and select Grid from the Edge/Mesh menu
• Click Plot to Screen
• In the main window, select cell plot type Quick Hidden Line to display
Figure T5.1-3
Load vertex-based pressure values, select the contour plotting option and plot in
‘Hidden Surface’ mode:
• Go back to the Load Data panel
• In the Data tab, select option Cell & Wall/Bound (Smooth) from the Data
Type menu
• In the Vector Data list, check that the default setting is None
• In the Scalar Data list, select item Pressure and then click Get Data
• Go to the Create Plots panel
• In the 3-D Surface tab, select plot options Contour (filled) and Edge
• Click Plot to Screen to display Figure T5.1-4
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:
• Go to the Load Data panel
• Check that option Cell & Wall/Bound (Smooth) is selected from the Data
Type menu
• In the Calculated Scalar Data list, select item Velocity Magnitude and then
click Get Data
• Go to the Create Plots panel
• In the Section/Clipped tab, check that Contour (filled) is selected from the
Option menu and Edge is selected from the Edge/Mesh menu
• Click Sweep to see the velocity magnitude distribution plotted on a series of
cross-sections through the model
To produce the best display of the calculated methane mass fraction distribution,
load cell-based values and then average them at the vertex positions:
• Go to the Load Data panel
• In the Data tab, select Cell from the Data Type menu
• Select On from the Smooth option menu
• In the Scalar Data list, select item CH4 and then click Get Data
• Go to the Create Plots panel
• Select the 3-D Surface tab and then choose Contour (filled) from the Option
menu and Edge from the Edge/Mesh menu
• Click Plot to Screen to display Figure T5.1-6
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.ccmp) 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.
• In the main window, select File > Model Title...
• In the Title text box, change the title to:
Check the geometry and boundary conditions visually to confirm that the model has
been read in correctly. If they were not displayed automatically then display them
as follows:
• Select C > All
• Click Cplot
• Go to the pro-STAR Model Guide and open the Analysis Features panel
• Select Transient from the Time Domain menu and then click Apply
Table As indicated in the tutorial’s introduction, the basic requirement of this case is to
Definition simulate a time variation in the inlet stream velocities, as shown in Figure T5.2-1
below:
Velocity (m/s)
10
9 Outer Inlet
2 Inner Inlet
Time (sec)
1 2
Figure T5.2-1 Velocity changes over a 2 sec. period at the two inlet planes
The above variation may be defined using pro-STAR tables and then applied to the
two inlet boundaries. To set up a table for the inner inlet:
• Click the Table Editor button, , in the main pro-STAR window
• In the Table Editor dialog, enter INNER_INLET in the Table Title box
• Click the Coordinate System button and then select system no. 1 (the global
Cartesian coordinate system) in the scroll list, as velocities will be specified in
this system
• Click Close. The coordinate system choice will appear in the Table Editor
dialog.
Now set up a table for the outer inlet by editing the one currently on display:
• Enter a new name, OUTER_INLET, in the Table Title box
• Enter two new end-point values for the V-velocity, 5 and 9, corresponding to
the previously defined time points of 0 and 2
• Enter a new name, in2.tbl, in the File Name box at the top of the panel
• Click Write to save the table data just entered in the above file
• Click Graph to display a graph of the outer inlet V-velocity variation, which
should be as shown in Figure T5.2-1
• Close the Table Editor dialog
Boundary Apply the time variation in velocity defined above to the inner inlet:
Re-definition
• Go to the pro-STAR Model Guide and select folder Define Boundaries
• Open the Define Boundary Regions panel
• Select region no. 1 (Inner_inlet) in the boundary regions scroll list
• Select Table from the User Option menu
• Open the pro-STAR file browser by clicking the button next to the Table
Name box, choose file in1.tbl from the file list and click Open. The
selected file name will now be displayed in the box
• Click Apply to instruct STAR to read V-velocity boundary values from this
table
Run Time Check the status of the run time controls and then specify the simulated elapsed time
Controls and the time step to be used:
• Select folder Analysis Preparation
• Open panel Run Time Controls
• Check that Run for is selected for the Run time control option and type 2 in
the Time box
• Click Apply
• In the Time Step Option section, check that 0 is entered in the Period start
time box and enter 0.025 in the Time step for period box
• Click Set
Specify that the analysis is to start from the previously calculated steady-state
solution:
• Open the Restart panel
• Select option Standard Restart from the Restart File Option menu
• Click the browser button next to the Restart File box, select file
dil_pipe_ss.ccmp from the browser dialog and then click Open
• Click Apply
Final The pre-processing task is now complete. If you wish to terminate the session at this
Operations 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 pro-STAR Model Guide facilities for running STAR
interactively. This process is described in the next section.
• In the main pro-STAR panel, select File > Save Geometry...
• In the Save Geometry File dialog, check that 0.0254 is entered in the
Geometry Scale Factor box
• Click Apply and then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
• Select File > Quit > Save & Quit
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 longer than for Tutorial 5.1.
Post-Processing
Preliminaries Open the file containing the transient post data (dil_pipe_tr.ccmt):
• In the pro-STAR Model Guide, select folder Post-Processing
• Open the Load Data panel
• Select option Transient from the Analysis menu
• In the Transient section, check that file dil_pipe_tr.ccmt is displayed
in the Post File box and then click Add File
• Select file dil_pipe_tr.ccmt from the Transient list and then click
Open Transient file; the time steps at which flow data were stored during the
run should appear in the Time Step scroll list
Post- The next step in transient post-processing is to identify the point in time at which
processing results are to be manipulated and displayed. This is done as follows:
• In the Time Step list, select the required time (0.5 sec in this case) and then
click Store 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:
• Go to the Data tab and select item Velocity Components UVW in the Vector
Data list
• Click Get Data
• Go to the Create Plots panel and select the Section/Clipped tab
• Accept the default section definition and click Plot to Screen
• Go to the Vectors tab and then type 0.7 in the Scale Factor box
• Click Apply
The results after 2.0 seconds (80 time steps) may be plotted in the same manner:
• Go to the Load Data panel and then select the File(s) tab
• In the Time Step list, highlight the desired time (2 secs) and then click Store
Time. This loads results calculated after 80 time steps.
• Go to the Data tab and select Smooth option Off
• In the Vector Data list, select item Velocity Components UVW
• Click Get Data
• Go to the Create Plots panel
• In the Section/Clipped tab, select Option Vector
• Click Plot to Screen to display Figure T5.2-4
5o
inflow 9 cm
u u
M = --- = ---------------
c κRT
where κ is the adiabatic index and R is the gas constant for air, taken as 1.402 and
287.05 Jkg-1K-1, respectively.
Initially, the case is run with a simple, coarse mesh. This is then refined in the
areas where the pressure gradient is greatest. This process is repeated until the mesh
is sufficiently fine to give a reasonable resolution of the shock and expansion waves.
Pre-Processing
Preliminaries The two analyses described in this tutorial will be performed in separate directories.
Create a sub-directory for the first analysis, called tut6-1a. The initial mesh for
this problem has already been created and the relevant cell, vertex, boundary and
problem setup files are provided with the STAR-CD installation (files
super.cel, super.vrt, super.bnd and super.inp respectively).
Therefore, before starting the tutorial, make sure these files are copied into your
current directory.
• Start up pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Enter the case name, super1, in the Case Name text box
• Click Continue
This will read default problem settings from file super.inp as well as the
problem geometry and boundary location definitions from the remaining three files.
• In the main window, select File > Model Title...
• Type ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW in the
Title text box
• Click Apply and Close
• Select C > All then Cplot to display the mesh shown in 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 Since the flow is compressible, the fluid density will be modelled using the ideal gas
Properties law. The inviscid assumption also needs to be specified and the temperature
calculation needs to be turned on:
• In the pro-STAR Model Guide panel select the Thermophysical Models and
Properties folder, followed by the Liquids and Gases sub-folder
• Open the Molecular Properties (Fluids) panel
• Change the Density setting to Ideal-f(T,P)
• Change the Molecular Viscosity setting to Inviscid
• Click Apply
• Go to the Thermal Models panel and select On for the Temperature
Calculation option
• Click Apply
Boundary The boundary locations and types have already been specified in the coded file
Locations super.bnd. To display them on the screen:
and Types
• Select View > Isometric > -1,1,1
• Select B > All
• Click the Display Boundaries button, , to display Figure T6.1-2
The analysis will then start automatically. The solution should converge within the
Version 4.06 6-5
Tutorial 6.1 ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW Mesh Refinement
Preliminaries
Mesh Refinement
Preliminaries In order to perform mesh refinement, the current analysis results need to be read into
pro-STAR:
• Select folder Post-Processing
• Open the Load Data panel to display the File(s) tab
• Click Open Post file
As expected, the coarse mesh results show a lot of smearing in the shock waves at
6-6 Version 4.06
Tutorial 6.1 ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW Mesh Refinement
Cell set collection
the two wing tips and also in the fan-shaped expansion wave at the wing’s widest
point. To improve the resolution of these flow features, the mesh will be refined in
the regions exhibiting the greatest pressure gradients:
• Select the Analysis Preparation folder and open the Adaptive Refinement
panel
• For the Gradient Criteria option in the Refinement Criteria tab, ensure
Percentage of cells is selected for refinement and enter 40 for the Top
Percentage
• Select Pressure as the Variable to apply criteria
• Click New Set
• Turn on mesh plotting by clicking the Display Mesh Lines button, , in the
main pro-STAR window
• Click Cplot to display 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:
• In the main pro-STAR window, click Store/Recall > Store to open the Store
Information dialog
• Under the Sets Information Type option, type to_refine in the Set Name box
Now, to select the near-wall cell set due for refinement, read in the previously stored
cell set and define a new subset:
• In the main pro-STAR window, click Store/Recall > Recall to open the
Recall Information dialog
• Under the Sets option, change the File Name entry to super1.set
• Click Refresh
• Select to_refine from the Select Entry list
• Click Recall
• Close the dialog
• Select the Geometry plot option from the drop-down menu in the main
window
• Click Cplot
Note that as a result of the refinement just completed, the original main-body cells
in the set no longer exist so only the near-wall cells are now displayed. These are
refined manually using the Cell Tool:
• Select Tools > Cell...
• In the Cell Tool window, click Refine Cells...
• In the Cell Refine dialog, enter 2, 1 and 1 for the Number of divisions in the I,
J and K directions, respectively
• Check Cset is selected for the Cells to refine option
• Check Yes is selected for the Vertex merge option
• Choose Yes for the Couple option
• Click Apply and then Close
• In the main window, select C > All
• Click Cplot to display the refined mesh, shown in Figure T6.1-5
Final Write the geometry and problem files and save the model file:
Operations
• Select File > Save Geometry...
• In the Save Geometry File dialog click Apply then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
• Select File > Save Model
Run the case in STAR, either at the command line or interactively, as described
previously.
Examination of the analysis results in the post data file (super2.ccmp) will
show that the mesh is still too coarse to fully resolve the shock and expansion
waves. A suitable mesh may be obtained by repeating the mesh refinement process
described above until the position of the shock and expansion waves is clear.
The rest of this tutorial will proceed with a mesh that has resulted from a total of
four refinement cycles using this method. Some cells adjacent to the free-stream
boundary have also been further refined manually. This is sometimes necessary
because, as a result of the constant pressure defined on that boundary, the calculated
pressure gradient in such cells is not sufficiently high to trigger their inclusion in the
code-selected refinement set.
You may perform all the refinement operations if desired and, once you are
satisfied that you understand the process, save your refined mesh data and terminate
the session as follows:
• Select File > Save As Coded Format...
• Ensure that the Cell File, Vertex File and Boundary File options are all
enabled
• Click Apply and then Close
• Quit pro-STAR by selecting File > Quit > Quit, Nosave
Alternatively, you may terminate the session without saving any data and continue
instead from the cell, vertex, boundary and problem setup files provided with the
STAR-CD installation, as described in the next section.
This will read all the current model settings from file super_ref.inp as well as
the problem geometry and boundary location definitions from the remaining three
files.
• In the main window, select File > Model Title...
• Type 2D SUPERSONIC FLOW OVER A DIAMOND WEDGE in the Title
text box
• Click Apply and Close
• Select C > All then Cplot to display the mesh shown in Figure T6.1-6. The
latter also includes a magnification of the near-wall region so that the details
of the mesh structure can be seen more clearly.
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 The model setup for this problem was described earlier in this tutorial and will not
Operations 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.
• Select File > Save Geometry...
• The geometry was created in centimetres, so set the Geometry Scale Factor to
0.01
• Click Apply and then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
The analysis will then start automatically. The solution should converge within the
specified maximum number of iterations.
Post-Processing
Preliminaries Read in the results of the analysis:
• Select folder Post-Processing
• Open the Load Data panel to display the File(s) tab
• Click Open Post file
The rapid changes in pressure that form shock waves at both wing tips and the
fan-shaped expansion wave at the wing’s 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.06
Tutorial 6.1 ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW Post-Processing
Post- processing
• Also add some of the shells on the symmetry boundary to the set:
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:
• Open the Customize Graphs panel
• Under the Registers tab, click the Sort button to open the Graph Sort dialog
• Enter 3, 1, 9 and 1, in that order, in the four boxes of the Graph Sort dialog
• Click Apply and then Close
• Under the Axis tab, ensure the X-Axis Parameters option is selected
• Enter appropriate values in the various text boxes, as shown below:
• Click Apply
• Select the Y-Axis Parameters option and enter the details shown below:
• Click Apply and then click Redraw on the main pro-STAR window
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:
• Go to the External Data panel
• Use the file browser at the top of the panel to locate the coarse.xy file and
click Open
• Choose xyxyxy for Establish X-Y pairs
• Click Create Graph to display Figure T6.1-5
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.
• Quit pro-STAR by selecting File > Quit > Quit, Nosave
Introduction
This tutorial outlines the steps needed to set up and run a rotating radial fan analysis.
It uses the multiple rotating frame methodology (implicit formulation), a
steady-state approach involving two or more frames of reference that can be
stationary or spinning. In this case, two frames are used to perform the analysis —
a spinning one representing the fan and blades and a stationary one representing the
fan body and inlet.
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 model’s 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.
Pre-Processing
Preliminaries Create a sub-directory for the tutorial. The mesh for this case is supplied as three
separate Nastran files, inlet.nas, fan.nas and body.nas, corresponding to
the three fan regions mentioned earlier. Therefore, before starting the tutorial, make
sure that the supplied files are copied into your current directory.
• Start up pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Enter the case name (say, fan_mrf) in the Case Name text box
• Click Continue
• In the main window, select File > Model Title...
• In the Title text box type:
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:
• Enable the Append 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 browser button to select file fan.nas for the Bulk Data File
• Click Apply
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 browser button to select file body.nas for the Bulk Data File
• Click Apply
This completes the import process. You should check the cell table indices set up
during the mesh import.
• Click the button on the main pro-STAR window to open the Cell Editor
dialog and inspect its contents. Alternatively, issue the CTLIS,ALL
command in the I/O window which results in the output shown below:
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
Cell Type The cells in each part of the mesh must now be correctly defined and named so that
Properties each fan component can be clearly distinguished from the others. To determine
what kind of cells have been created by the import process:
• Select option Utility > Count > Cells
As mentioned in the “Mesh Import” section, cells in the rotating fan body have a
cell table index of 1. Cells in the stationary body domain have cell table index 2 and
those in the inlet pipe index 4. Cells with index 3 are interpreted as baffles
representing the fan blades among the rotating cells.
The desired modifications to the cell type parameters may be done via the cell
table editor, as follows:
• In the main pro-STAR window, click to open the Cell Editor dialog
• Check that table entry #1 is selected in the scroll list
The above actions assign a spin index of 2 to the rotating fan body cells. All other
cells will have the default spin index of 1. These will be defined later as the spinning
and stationary frames of reference, respectively.
Next, change the settings for cell type no. 2, corresponding to the stationary body
cells:
• Select table entry #2 in the scroll list
• Change the Color Index to 3 (green)
• Enter BODY in the Name box
• Click Apply
Note that the spin index is left at a value of 1, so that the ‘BODY’ cells will remain
stationary.
Define the properties of cell type 3:
• Select table entry #3 in the scroll list
• Select the Baffle Cell Type setting
• Change the Color Index setting to 4 (blue)
• Enter FAN_BLADES in the Name box
• Click Apply
Note that the baffle spin index may be left at 1; this is because they are already part
of the spinning fan body and thus do not require a spin index setting. In fact,
pro-STAR will not allow you to change the spin index for a baffle-type cell.
Finally, the inlet pipe (type 4 cells) can be modified:
• Select table entry #4 in the scroll list
• Change the Color Index to 5 (cyan)
• Enter INLET in the Name box
• Click Apply and then Close
• In the main pro-STAR window, click Replot and notice the change in cell
colours in the model, shown in Figure T7.1-3
Mesh In their present form, the three mesh parts are not joined together. As mentioned
Structure 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.
The three meshes should therefore be joined together using pro-STAR’s cell-face
matching and couple creation facilities, as described below:
• In the pro-STAR Model Guide, locate the Grids folder and open the Assemble
Grids panel
• Go to the Create Couples tab
Begin by joining the rotating region (cell type 1) to the stationary body region (cell
type 2).
• Check that the Couple By option is set to Cell Set
• Select Cell Type from the Master/Slave Matching menu
• Change the Master Cell Type to Specify and enter 1 in the box below
• Change the Slave Cell Type to Specify and enter 2 in the box below
• Click Apply. The I/O window feedback should indicate that 720 couples were
created along the interface between the two regions.
Next, repeat the steps above in order to couple the rotating region to the stationary
inlet region (cell type 4):
• Change the Slave Cell Type value to 4
• Click Apply. The I/O window feedback should indicate that a further 648
couples were created along the second interface.
• In the main pro-STAR window click Cplot to display the joined-up mesh, as
shown in Figure T7.1-5 below.
Now isolate the edge vertices of the above cell set and display them on screen:
• Select V > New > Cell Set Edge
• Turn on the vertex display by clicking the Display Vertices button, , to
display Figure T7.1-6
Figure T7.1-6 Inlet and rotating cell types showing edge vertices
Next, remove the inlet cells from the cell set; also remove vertices that are no longer
part of this new cell set from the vertex set:
• Select C > Unselect > Type and click on any one of the cyan inlet cells
• Select V > Subset > Cell Set
• Click Cplot to display the red rotating cells and the set of vertices that
describe the edges of the counter-spinning wall boundaries
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
An additional 576 boundaries should be created by the above operation. Note that
in this particular example, the core axle will be considered as spinning with the fan,
so no additional boundaries need to be defined in that location.
The inlet and pressure boundaries will be defined next. Start by restoring a view
of the entire model:
• In the main window, select C > All
• Change the plot type to Hidden Surface
• Turn off the Display Vertices option button
• Click Cplot
Select a Vertex
Here
• Turn off the boundary display by clicking the Display Boundaries button
again
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 model’s 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 pro-STAR Model Guide, go to the Reference Frames folder and open
the Rotating Reference Frames panel
• Select option Multiple Frames - Implicit from the Ref. Frame Treatment
menu
• Select spin index 1 in the Spin Parameters scroll list
• In the boxes at the bottom of the panel, enter values of 0 for Omega and 2 for
Coordinate System
• Click Apply
• Select spin index 2
• Enter values of 2000 for Omega and 2 for Coordinate System
• 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 Check the properties of the fluid present in the model. The default fluid for material
Properties 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.
• Open the Turbulence Models panel in the pro-STAR Model Guide by
selecting the Thermophysical Models and Properties and Liquids and Gases
folders
• Select On for the Turbulence modelling option
• Choose the K-Epsilon/High Reynolds Number Model option
• Click Apply
Boundary An inlet velocity of 5 m/s will be specified, with all flow leaving the fan through the
Conditions pressure outlet.
• Locate the Define Boundary Regions panel in the Define Boundaries folder
• Select region 1 Inlet in the boundary regions scroll list
• Enter a value of -5 for the W-velocity component
• Select option TI/Length from the Turbulence Switch menu
• Enter a Turb. Intensity of 0.05 and a Length of 0.001
• Click Apply
• Enter a Turb. Intensity of 0.05 and a Length of 0.001. These values would be
used if there is any inflow through the boundary faces.
• Click Apply
Turning on the boundary display by clicking 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 To ensure rapid convergence, the under-relaxation factor for pressure will be
Controls increased to 0.5:
• In the pro-STAR Model Guide, select the Analysis Controls folder
• Open the Primary Variables panel
• In the Solver Parameters tab, change the Relaxation Factor for Pressure to 0.5
• Click Apply
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 Set the run time controls, i.e., the maximum number of iterations to be performed,
Model for this case:
• Go to the Analysis Preparation folder and open the Run Time Controls panel
• Set the Maximum Number of Iterations to 200
• Click Apply
The solution should satisfy the convergence criteria within 200 iterations.
Final The pre-processing task is now complete. If you wish to terminate the session at this
Operations stage, save all model data, write the geometry and problem files and exit from
pro-STAR as shown below. Alternatively, you may run STAR interactively as
described in the next section.
• In the main window, select File > Save Geometry...
• Ensure that the Geometry Scale Factor is set to 0.001, as the geometry was
originally specified in millimetres
• Click Apply and then Close
CFD Analysis
To perform the analysis interactively, proceed as follows:
• Select File > Save Model
• In the Analysis Preparation folder, open the Run Analysis Interactively panel
• Ensure that the Model Units option is set to Millimeters
• Click Start
The analysis will then start automatically and will converge within the 200 iteration
limit. Results may be viewed part-way through the analysis by using the
Post-Processing facilities in the pro-STAR Model Guide.
Post-Processing
First, display a plot of the velocity vectors on the mesh surface:
• Select folder Post-Processing
• Open the Load Data panel to display the File(s) tab
• Click Open Post file
• In the Data tab, select Velocity Components UVW from the Vector Data list
• Click Get Data
• Go to the Create Plots panel
• In the 3-D Surface tab, select options Vector and Edge
• Click Plot To Screen
• Select View > Isometric > 1,1,1 to display 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:
• Select the Coordinate System 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
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).
• In the Data tab, select Smooth option On
• Select Pressure from the Scalar Data list
• Click Get Data
• Go to the Create Plots panel
• In the Section/Clipped tab, select Option Contour(filled) and Edge/Mesh
None
• To define the plane, enter 0, 0, 34 as the Point and 0, 0, 1 as the Normal
parameters
• Click Apply
• Click Plot To Screen
• Select View > SNormal View to display Figure T7.1-11
Figure T7.1-11 Pressure contours displayed in a plane parallel to the inlet plane
Note that the relative pressure at the pressure boundary is roughly zero.
Now display the turbulence kinetic energy distribution:
• Go to the Load Data panel
• Select Turb Kinetic Energy from the Scalar Data list
• Click Get Data
• Click Replot to display Figure T7.1-12
Injector
Inlet
Pressure
boundary
Pre-Processing
Preliminaries Create a sub-directory for this tutorial called tut8-1. The mesh filling the model
geometry has already been created and the relevant data may be found in the cell,
vertex, boundary and problem files supplied for the tutorial (files intake.cel,
intake.vrt, intake.bnd and intake.inp). Copy these files into your
working directory.
Start pro-STAR and enter the case name:
• Type prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Enter the case name (say intake_ss) in the Case Name text box
• Click Continue
This will read in the mesh geometry and boundary locations, plus some basic
problem settings. Now name the model:
• In the main pro-STAR window, select File > Model Title...
• Type STEADY FLOW WITH LIQUID SPRAY INJECTION in the Title
box
• Click Apply and Close
The default fluid for the continuous phase is air, so its molecular properties do not
Scalar Assign scalar no. 1 to the product of droplet evaporation, i.e., heptane vapour, and
Definition import its physical properties from pro-STAR’s built-in database:
• Select the Additional Scalars folder
• Open panel Molecular Properties (Scalars)
• Check that the Scalar # option is set to 1 and then choose option Select scalar
from database from the menu at the top of the panel
• Select the appropriate physical substance, C7H16 HEPTANE(V) in this case,
from the scalar database scroll list and then choose option Define user scalar
from the menu at the top of the panel
• The physical properties of heptane vapour are read in from pro-STAR’s
property database and entered into the appropriate boxes of the Molecular
Properties (Scalars) panel. Check that the displayed values are reasonable
and then click Apply.
Dispersed Now specify the properties of the dispersed phase using the Lagrangian
Phase Multi-Phase folder:
Models
• Open the Droplet Controls panel
• Change the Under-Relaxation of Lagrangian Sources value to 0.15
• Click Apply
• Under the Droplet Physical Models tab, select the Standard Correlation for
Momentum Transfer
• Ensure the Slip Factor is 0
• For Mass Transfer Calculation, select option Standard
• For Heat Transfer Calculation, select option Standard
• Select the Reitz Droplet Break-Up model
• In the Droplet-Wall Interaction section, choose the User option
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 15 of the
CCM User Guide.
• In the main window, select File > System Command...
• Type ufiles in the text box, click Apply and then Close
• Go back to the Droplet Physical Models tab and click User Define to write
the default droplet-wall interaction subroutine DROWBC to the ufile
sub-directory
• Click Apply
Injector The droplet thermophysical models and properties are now fully defined, so move
Properties on to specifying the properties of the spray injector. First, though, a new coordinate
system needs to be defined, centred at the injection point:
• In the main pro-STAR window, click the button to open the Coordinate
Systems dialog
• Select number 4 from the list of coordinate systems
• Select Cylindrical from the pull-down menu at the bottom left of the
Coordinate Systems dialog
• Enter the following values in the seven boxes to the right of this menu: 100,
19, 35, 0, 0, -100, 0. These position the coordinate system’s origin at the
injector location.
• Select New (Global) from the menu at the bottom of the dialog and click
Apply
• Ensure that coordinate system number 4 is selected in the list then choose
Show Triad from the menu and click Apply
• Close the Coordinate Systems dialog
• Click Cplot
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:
• Open the Spray Injection with Atomization panel
• The default Spray Options are satisfactory, so click Apply Spray Options
• Change the Injection Temperature to 350 K
• Change the Hole Diameter to 5e-4 m
• Enter 4 for the injector Coordinate System
• Change the Cone Angle to 20o
• Enter a mass Flow Rate of 1e-5 kg/s
• Change the Number of Parcels/Injector to 50
• Check that the Droplet Type is number 1, HEPTANE (L)
• Click Update Injector
The mean temperature and heptane mass fraction at the pressure boundary are
estimated on the basis of temperatures and mass flow rates at the inlet and in the
injector. To specify these values:
• Select region 2 from the boundary regions list
• Change the Turbulence Switch to Zero Grad
• Change the Temperature Switch to Zero Grad
• Change the Scalar Switch to Zero Grad
• Click Apply
Analysis Set the frequency of data output to the solution file:
Controls
• Open folder Analysis Controls in the pro-STAR Model Guide and select the
Analysis Output panel
• Under the Post tab, check that the Write Solution File option is selected with
an Output Frequency of 100 iterations and File Name intake_ss.ccmp
• Click Apply
Run Time Increase the maximum number of iterations to allow the analysis to converge:
Controls
• Select the Analysis Preparation folder
• Open the Run Time Controls panel
• Change the Maximum Number of Iterations to 200
• Click Apply
Final The pre-processing task for this tutorial is now complete. If you wish to terminate
Operations 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 > Save Geometry...
• Ensure that the Geometry Scale Factor is set to 0.001, as the geometry was
created in millimetres
• Click Apply and then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
• Select File > Quit > Save & Quit
User Subroutine
To introduce the coding needed for the extra source terms, use pro-STAR’s built-in
editor to edit subroutine DROWBC (in file drowbc.f within sub-directory ufile)
as follows:
• In the main pro-STAR panel, select File > Edit File...
• In the Edit File dialog, click File > Open...
• In the Open dialog displayed, enter sub-directory ufile and select file
drowbc.f
• Click OK
• Edit the contents of the subroutine by adding extra lines of code, as shown
below
• Click File > Save
• Click File > Quit to exit from the editor
C***********************************************************************
SUBROUTINE DROWBC(BOUNCE,UD,VD,WD,FX,FY,FZ,DRQ,TD,EMCO,
* DEMUCO,REMOVE)
C Droplet wall boundary conditions
C***********************************************************************
C--------------------------------------------------------------------------*
C STAR VERSION 4.04.000
C--------------------------------------------------------------------------*
INCLUDE ’comdb.inc’
INTEGER NDRCOM_max
COMMON /drcomp/ NDRCOM_max
COMMON/USR001/INTFLG(100)
LOGICAL BOUNCE,REMOVE
INCLUDE ’usrdat.inc’
DIMENSION EMCO(*),DEMUCO(NDRCOM_max,*)
DIMENSION WPCO(50),PPCO(50),CPCO(50),HVCO(50),PSCO(50)
DIMENSION HPVPSC(50),CPVPSC(50)
DIMENSION SCALC(50),SCWALL(50)
DIMENSION DRMAFR(50)
EQUIVALENCE( UDAT12(001), ICTID )
EQUIVALENCE( UDAT01(001), SBX )
EQUIVALENCE( UDAT01(002), SBY )
EQUIVALENCE( UDAT01(003), SBZ )
EQUIVALENCE( UDAT03(005), WG )
EQUIVALENCE( UDAT04(001), CP )
EQUIVALENCE( UDAT04(002), DEN )
EQUIVALENCE( UDAT04(003), ED )
EQUIVALENCE( UDAT04(006), P )
EQUIVALENCE( UDAT04(008), TE )
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( UDAT05(001), IDR )
EQUIVALENCE( UDAT05(002), IDRT )
EQUIVALENCE( UDAT06(001), CPDR )
EQUIVALENCE( UDAT06(002), DENDR )
EQUIVALENCE( UDAT06(003), DRD )
EQUIVALENCE( UDAT06(009), XD )
EQUIVALENCE( UDAT06(010), YD )
EQUIVALENCE( UDAT06(011), ZD )
EQUIVALENCE( UDAT07(001), DRM )
EQUIVALENCE( UDAT07(002), RNDP )
EQUIVALENCE( UDAT02(007), TW )
EQUIVALENCE( UDAT02(059), UB )
EQUIVALENCE( UDAT02(060), VB )
EQUIVALENCE( UDAT02(061), WB )
EQUIVALENCE( UDAT02(064), UBL )
EQUIVALENCE( UDAT02(065), VBL )
EQUIVALENCE( UDAT02(066), WBL )
EQUIVALENCE( UDAT05(005), NDRCO )
EQUIVALENCE( UDAT13(001), WPCO(1) )
EQUIVALENCE( UDAT13(051), PPCO(1) )
EQUIVALENCE( UDAT13(101), CPCO(1) )
EQUIVALENCE( UDAT13(151), HVCO(1) )
EQUIVALENCE( UDAT13(201), PSCO(1) )
EQUIVALENCE( UDAT13(251), HPVPSC(1) )
EQUIVALENCE( UDAT13(301), CPVPSC(1) )
EQUIVALENCE( UDAT02(009), SCWALL(01) )
EQUIVALENCE( UDAT04(009), SCALC(01) )
EQUIVALENCE( UDAT08(001), DRMAFR(01) )
EQUIVALENCE( UDAT03(001), CON )
C-----------------------------------------------------------------------
C
C This subroutine enables the user to specify momentum, mass
C and heat exchange at wall boundaries for droplets striking walls.
C
C ** Parameters to be returned to STAR: BOUNCE, UD,VD,WD, FX,FY,FZ,
C DRQ, TD, EMCO, DEMUCO,REMOVE
C
C-----------------------------------------------------------------------
PARAMETER(FRACN=1. - 0.5 )
PARAMETER(FRACT=1. - 0.1 )
C-----CALCULATE DROPLET VELOCITY MAGNITUDE
VDMAG=SQRT(UD**2 + VD**2 + WD**2)
IF (VDMAG .LE. 2.5) THEN
BOUNCE=.FALSE.
ELSE
C-----Droplet bounces from the wall losing 50% of its velocity normal
C-----to the wall and 10% in the direction parallel to the wall.
C-----CALCULATE NORMAL COMPONENT OF VELOCITY
AREA=SQRT(SBX**2 + SBY**2 + SBZ**2)
S1=SBX/AREA
S2=SBY/AREA
S3=SBZ/AREA
VNMAG = UD*S1 + VD*S2 + WD*S3
UNORML=VNMAG*S1
VNORML=VNMAG*S2
WNORML=VNMAG*S3
C-----CALCULATE TRANSVERSE COMPONENT OF VELOCITY
UTRANS=UD - UNORML
VTRANS=VD - VNORML
WTRANS=WD - WNORML
C-----CALCULATE VELOCITY AFTER BOUNCING
UD=FRACT*UTRANS - FRACN*UNORML
VD=FRACT*VTRANS - FRACN*VNORML
WD=FRACT*WTRANS - FRACN*WNORML
BOUNCE=.TRUE.
ENDIF
C-------------------------------------------------------------------------C
RETURN
END
CFD Analysis
To perform the analysis interactively, proceed as follows:
• Select File > Save Model
• In the Analysis Preparation folder, open the Run Analysis Interactively panel
• Choose Double Precision and ensure that the Scale Factor is 0.001
• Click Start
The analysis will then start automatically. The solution should satisfy the default
convergence criteria within the specified maximum number of iterations.
Post-Processing
Preliminaries Read in the analysis results:
• In the Post-Processing folder, open the Load Data panel
• Check that intake_ss.ccmp is displayed in the Post File box for Steady
State Analysis
• Click Open Post file
Figure T8.1-4 Contours of heptane vapour concentration on a plane bisecting the valve
Dispersed The dispersed phase can be visualised by creating droplet plots. In this instance, the
Phase droplet tracks will be plotted on top of the previous contour plot of heptane vapour
concentration using the Overlay option:
• In the Post-Processing folder, open the Particle Tracks sub-folder
• Open the Plot Droplets panel
• Choose Load From Track File and accept the default intake_ss.trk file
• Click Load Data
• In the Droplet Plot Options section, select Off under Edge Plot Options
• Select a Diameter dependent Droplet Size and enter 0.1 as the Maximum
Droplet Diameter
• Select None from the Vectors pull-down menu
• Click Apply
• In the interests of display clarity, select a subset of the computed droplet
tracks by typing the following command in the I/O window:
• Select Plot > Display > Overlay from the main pro-STAR window’s menu
bar to turn on the Overlay option
• Enter command
PLFIX ON
in the I/O window to prevent the display from automatically adjusting to the
scale of the plot that follows
• Click Droplet Plot in the Plot Droplets panel to display Figure T8.1-5
Figure T8.1-5 Heptane droplets overlaid onto a heptane vapour concentration plot
OVERLAY OFF
PLFIX OFF
• Return to the Load Data panel and, under the File(s) tab, click Open Post file
• Select Geometry and Quick Hidden Line as the plot attributes in the main
pro-STAR window
• Click Cplot
• Go to the Plot Particles panel
• Check Display option Segments is selected
• 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
Figure T8.1-5 and Figure T8.1-6 show that most of the 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:
• Click Clear Tracks in the Plot Particles panel
• Open the Create Plots panel
• Under the IsoSurf tab, select Plot Edge On
• Enter a Scalar Value of 0.0001
• Click Apply
• In the main pro-STAR window, ensure Quick Hidden Line plot is selected
• Click Cplot to display Figure T8.1-7
• Rotate the view to examine the details of the isosurface shape
Figure T8.1-7 Isosurface of heptane vapour concentration with mass fraction = 0.0001
Pre-Processing
Preliminaries Create a sub-directory for this tutorial called tut8-2. Most of the case set-up has
already been performed in Tutorial 8.1 so the model file, intake_ss.mdl,
should be copied across to the new working directory and renamed
intake_tr.mdl before continuing.
Start up pro-STAR and open the model file:
• Type prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Check that the case name is intake_tr and that the Resume From Existing
.mdl File option is selected
• Deselect the append to .echo file option
• Click Continue
Injector The injector position and droplet properties have already been defined in the
Properties previous tutorial. However, the flow rate profile during the injection period must be
created from scratch:
• Select the Lagrangian Multi-Phase folder
• Open the Spray Injection with Atomization panel
• In the Define Injectors section, select Table from the Mass Flow Rate menu
• Click the New Table button at the bottom of the panel
• The Table Editor dialog should now appear.
• Enter the data shown below:
Figure T8.2-1 Graph showing the mass flow rate profile over the injection period
Analysis Instruct STAR to write the analysis results in the transient post data file
Output (intake_tr.ccmt) at every single time step. In addition, specify what cell data
(including scalar variable data) are to be written during the run.
• Go to the Analysis Controls folder and open the Analysis Output panel and
then select the Transient tab
• Specify the frequency of writing data to the transient post file by typing 0.001
in the Output interval box. As discussed below, this is equivalent to outputting
data at every time step.
• As can be seen in the scroll list, velocity and pressure are already selected by
default. Change this selection by
(a) removing Pressure
(b) adding Temperature
(c) adding the mass fraction of scalar C7H16
In each case, click on the Post option 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.
• Select folder Analysis Preparation and open the Run Time Controls panel
• Ensure the Run time control option is set to Run for and type 0.05 in the Time
box
• Click Apply
• Check that 0.001 sec is entered for the Time step for period
• Click Set
Final The pre-processing task is now complete. If you wish to terminate the session at this
Operations 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 pro-STAR Model Guide facilities for running STAR
interactively. This process is described in the next section.
• Select File > Save Geometry...
• Accept the default value, 0.001, shown in the Geometry Scale Factor text box
• Click Apply and then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
• Select File > Quit > Save & Quit
CFD Analysis
To perform the analysis interactively, proceed as follows:
• File > Save Model
• In the Analysis Preparation folder, open the Run Analysis Interactively panel
• Ensure Millimeters is selected for the Model Units option
• Select the Double Precision option for the STAR executable
• Click Start
Post-Processing
Preliminaries Start the post-processing task by re-plotting the mesh:
• In the main window, select C > All
• Click Cplot
• Select View > Axis > +Y
Droplet Plots As in Tutorial 8.1, the droplet plots will be overlaid on contour plots of heptane
vapour concentration. A combined plot of this type will be produced for each time
step using a command loop. The resulting sequence of plots will then form an
on-screen animation. First, set the droplet plot options:
• In the pro-STAR Model Guide, select the Particle Tracks folder
• Open the Plot Droplets panel
• In the Droplet Plot Options section, turn Off Edge Plot Options
• Specify the displayed Droplet Size to be proportional to the actual droplet
Diameter and enter a Maximum Droplet Diameter of 0.12
• Specify the Fill Color to be dependent upon the Mass
• Change the Vectors option to None
• Click Apply
Set the cell plot characteristics:
• In the main pro-STAR window, turn on the Display Edges plot option,
• Select Contour plot option and Section (Surface) plot type. Ignore the
warning stating that no scalar data are stored
• Enter the commands:
SNORMAL 0 1 0
SPOINT 0 19 0
The command loop used to produce the plots will now be entered into the I/O
window. It utilises the OVERLAY and PLFIX commands demonstrated in Tutorial
8.1. Also, the CSCALE command is used to enable droplet and contour plots to have
different colour scales.
• Enter the following commands:
*SET IT 1 1
*DEFINE
STORE ITER IT
CSCALE 14 USER 0 0.03
GETV CONC
8-20 Version 4.06
Tutorial 8.2 TRANSIENT FLOW WITH FUEL SPRAY INJECTION Post-Processing
Final Operations
CPLOT
OVERLAY ON
PLFIX ON
SCDUMP GIF IT
CSCALE 14 USER 0.4e-7 0.2e-5
GETD POST
DSET ALL
DPLOT
OVERLAY OFF
SCDUMP OFF
*END
*LOOP 1 49
PLFIX OFF
The SCDUMP command in the above loop saves a screen shot of each combined plot
in a file with extension .gif. It is turned on and off again at each time step because
otherwise it would save screen shots of the contour plots as well as the combined
plots. The .gif files produced may subsequently be combined into an animation
sequence using an external package. For more details on pro-STAR’s animation
capabilities, see “Animation Sequence Definition and Display” on page 12-2 of the
Post-Processing User Guide.
Final End the pro-STAR session:
Operations
• Select File > Quit > Quit, Nosave
Tutorial 9 COMBUSTION
Only a sixty-degree sector of the combustor is simulated (see Figure T9.0-1). This
is achieved by using STAR-CD’s 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.
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 1.2) and the
relevant cell, vertex, boundary and problem setup files are already available (files
combustor.cel, combustor.vrt, combustor.bnd and
combustor.inp, respectively). Therefore, before starting the tutorial, make sure
that the supplied files are copied into your current directory.
• Start up pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Enter the case name (say, PPDF_ad) in the Case Name text box
• Click Continue
This will read default problem settings from file combustor.inp plus the
problem’s cell, vertex and boundary location definitions from the remaining three
files.
Specify the key feature of this case, i.e., chemically reacting flow:
• In the pro-STAR Model Guide, go to panel Analysis Features
• Select option Chemical Reaction from the Reacting Flow menu
• Click Apply
• Select folder Thermophysical Models and Properties and note that the
sub-folder called Reacting Flow is now active in the pro-STAR Model Guide
tree. This will be used in this and all subsequent sub-tutorials to supply
chemical reaction definitions
Material Set up material properties and thermofluid models using the appropriate pro-STAR
Properties Model Guide panels. The required actions are as follows:
1. Select the Ideal Gas Law density variation (with pressure dependence)
2. Select the standard k-ε turbulence model
3. Turn on the temperature solver
4. Set the initial temperature distribution
5. Choose the monitoring cell location
6. Choose the reference pressure and its location
• Select sub-folder Liquids and Gases
• Open the Molecular Properties (Fluids) panel
• Select option Ideal-f(T,P) from the Density menu
• Click Apply
number in the Monitoring Cell Number 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 cell location the same as the monitoring cell
location by entering 1760 in the Pressure Cell Number box. Confirm that
100000 appears in the Pressure box
• Click Apply
Combustion Use the pro-STAR Model Guide’s Reacting Flow folder to set up the combustion
Model model as follows:
• Select sub-folder Reacting Flow followed by Chemical Reactions
• Open the Scheme Definition panel. Note that scheme no. 1 is selected by
default for the Chemical Scheme option at the top of the panel
• Select option Unpremixed/Diffusion from the Reaction Type menu
• Select option PPDF Single Fuel from the Reaction Model menu
• Accept the Chemical Equilibrium setting in the Option menu and click
Apply
• A pop-up window will now appear warning you that the default chemical
reaction settings will be changed. Click Continue.
Continue by using the CEA package to specify the fuel (C3H8) and its combustion
products. In an 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:
• Open the Reaction System panel
• Check that option CEA is selected from the Input/Control menu
• In the Parameter Definition tab, supply the names of all chemical substances
involved plus relevant reaction parameters, as shown below:
Pressure — 1e5
• Select Stream to Define -> Stream1 (Fuel) and then enter the following data
in the table and text box underneath:
Species Name 1 — C3H8
Mass Fraction 1 — 1
Temperature — 293
• Click Define Stream
• Select Stream to Define -> Stream2 (Oxidizer) and then enter the following
data in the table and text box underneath:
Species Name 1 — O2
Mass Fraction 1 — 0.232
Species Name 2 — N2
Mass Fraction 2 — 0.768
Temperature — 293
• Click Define Stream
• Go to the All Species scroll list and enter the following data by selecting each
species line in turn:
1 — C3H8
2 — O2
Version 4.06 9-5
Tutorial 9.1 PROPANE COMBUSTION (ADIABATIC PPDF) Pre-Processing
Combustion Model
3 — N2
4 — CO
5 — CO2
6 — H2O
• Click Apply
Note that all chemical names, such as C3H8, should be entered exactly as they
appear in the material names file (material.list) supplied under the
STAR-CD installation directory.
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:
• Click Graph to generate plots of the available data automatically, as shown in
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:
• Open the Scheme Association panel. Note that chemical scheme no. 1 (the
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 (Fluids) panel. Note that as a result of the
chemical scheme definition, the setting of the Density menu has changed
automatically to PPDF.
Scalar Check the properties of the scalar variables that were automatically set up by the
Properties combustion model’s mapping process, described above:
• Select sub-folder Additional Scalars and then open the three panels under it in
turn
• In the Molecular Properties (Scalars) panel, use the Scalar number option to
inspect the available scalars.
It will be seen that a total of 8 scalars are present and that, in addition to the species
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 is 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 Check the current boundary definitions and specify boundary conditions where
Conditions appropriate.
• Select folder Define Boundaries
• Open the Define Boundary Regions panel
Specify boundary conditions for the inlet boundaries, choosing the ‘Mixing Length’
option for turbulence parameter input. Note that all fluid streams except the one
flowing through the cooling passage have swirl velocity components on entry into
the combustor. Starting with the fuel inlet:
• Select region 3 In the boundary regions scroll list
• Select option TI/Length from the Turbulence Switch menu
• Enter inlet boundary values for the fuel stream in the appropriate boxes as
shown below:
• Click Apply
• Click Apply
• Highlight region 5 in the scroll list
• Select option TI/Length from the Turbulence 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 Turbulence Switch menu
• Enter inlet conditions in the appropriate text boxes, as shown below:
• 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.
Specify a boundary condition for the mixture fraction variable at the fuel inlet:
• Open the Scalar Boundaries panel
• Select region no. 3 in the Boundary Region scroll list
• Select MIXTURE_FRACTION in the Scalars scroll list, type 1 in the
boundary Value box and then click Apply
Modify the air inlet boundary values (regions 4, 5 and 6) for the O2 and N2 scalars
as follows:
• Select region no. 4 in the boundary regions scroll list
• Select N2 in the Scalars scroll list, type 0.768 in the boundary Value box and
click Apply
• Select O2 in the Scalars scroll list, type 0.232 in the boundary Value box and
click Apply
Run Time Check the status of the run time control parameters:
Controls
• Select folder Analysis Preparation and open the Run Time Controls panel
• Enter 500 for the maximum number of iterations and then click Apply.
• Open the Restart panel. The setting of the Restart File Option menu should be
None, confirming that this is a run from initial conditions.
Final The pre-processing task is now complete. If you wish to terminate the session at this
Operations 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 pro-STAR Model Guide facilities for running STAR
interactively. This process is described in the next section.
• In the main pro-STAR panel, select File > Save Geometry...
• In the Save Geometry File dialog, click Apply and then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
• Select File > Quit > Save & Quit
CFD Analysis
For flows involving chemical reactions, it is recommended that STAR is run in
double precision mode, as follows:
• In the main pro-STAR panel, select File > Save Model
• In the Analysis Preparation folder, open the Run Analysis Interactively panel
9-12 Version 4.06
Tutorial 9.1 PROPANE COMBUSTION (ADIABATIC PPDF) Post-Processing
Preliminaries
• Select the Double Precision option button. Leave all other settings at their
default values
• Click Start
The analysis will then start automatically. Convergence should be achieved within
the specified maximum number of iterations.
Post-Processing
Preliminaries Start the post-processing task by re-plotting the mesh:
• In the main window, select C > All
• Click Cplot
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 Chapter 17, “Panels”
in the CCM User Guide). If the panels are not available, or if you want to practice
creating panels, see “Panel Definition” on page 9-18 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-STAR’s 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 panel’s 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 and plot type Hidden
Surface
• In the Pgetc panel, click VM
• In the main window, click the Display Edges plotting button, , to display
Figure T9.1-2
Define a section whose plane bisects the mesh and passes through the axis of
symmetry:
• In the main window, select View > Axis > +X
• Click the Display Edges button again to turn off edge plotting
• Click Sect. Slice and then use the screen cursor to draw a vertical line that
bisects the visible mesh (mark the end points of the line using the screen
cursor). This represents the trace of a longitudinal section plane through the
middle of the mesh and passing through the axis.
• Select a viewpoint at right angles to the section by choosing View > SNormal
View
• Select cell plot type Section (Surface)
Use the Pgetc panel to create a cell-averaged temperature profile in the section:
• On the Pgetc panel, click button TA to display the absolute temperature
distribution
• Average the cell values by selecting Post > Caverage > Cset from the main
pro-STAR window
• Click Replot to display the temperature profile shown in Figure T9.1-3
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:
• Select File > Close
Open panel Pgetv and plot the vertex-based mass fraction profiles for the fuel and
one of the combustion products (CO2) in the section:
• Select Panels > Pgetv
• Click button Conc5 to display the propane distribution, shown in Figure
T9.1-4
• Click button Conc4 to display the carbon dioxide distribution, shown in
Figure T9.1-5
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 The predicted maximum temperature in the model is lower than would normally be
Results expected from this type of combustor. It is therefore instructive to consider the
likely accuracy of the temperature distribution obtained here. A good quality
measure to use for this purpose is the ratio
gf
f ′-2 = ---------
----------- -
f f
where f is the mean mixture fraction (calculated as scalar no. 1) and gf its variance
(scalar no. 2). To display the distribution of the above variable over the combustion
region (encompassing approximately the first six cell layers in the radial direction)
proceed as follows:
• Change the plot option setting to Geometry
• Change the cell plot type to Section (All)
• Select C > New > Zone and then draw a closed rectangle encompassing the
entire mesh in the z-direction and the first six cell layers in the x-direction,
starting from the axis. 1080 cells are selected
Load the variance in post register no. 1 and take its square root:
• In the main window, select Post > Operate...
• In the Post Register Operations dialog, go to the Function Category menu and
select option Load cell data > Scalar Concentration
• Accept the default Register 1 as the destination register for the data and type
2 in the Scalar # text box
• Click Apply
• In the Function Category menu, select option Single register > Sqrt
• 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 Category menu and select option Multi-register > Divide
• Choose appropriate register numbers in the Operation section so that the end
result is Register 4 = Register 1/Register 2
• Click Apply and then Close
It will be seen that the value of the ratio is generally rather high, implying that the
predicted maximum temperature is considerably lower than the adiabatic flame
temperature. In a realistic modelling exercise, a considerably finer mesh would be
needed to increase confidence in the calculated temperatures.
Terminate the session:
• In the main window, select File > Quit, Nosave
Panel Definition
Panel Pgetc is designed as an aid to post-processing cell-centre based data. To set
up the panel, shown below, proceed as follows:
• Select Panels > Define Panel... from the main menu bar
• Type Pgetc in the Panel Name box
• Click New. This adds a new panel with that name in the scroll list. Note
that the panel definition is placed by default in the present working
directory, in a file called Pgetc.PNL
• Select the panel name in the list and click Open to display the new
(blank) panel
Specify the basic panel appearance via the panel menu options, as follows:
Proceed with the definition of panel buttons. To create the first column:
• Click on button B1
• Type SV in the text box for the Button Name
• Click in the Definition field and type:
getc u v w sv$repl
• Click on button B2
• Type SW in the text box for the Button Name
• Click in the Definition field and type:
getc u v w sw$repl
• Click on button B3
• Type VM in the text box for the Button Name
The remaining columns are created in a similar manner, according to the definitions
given below:
ID= B4
Label= P
Command=
getc u v w p$repl
ID= B5
Label= PA
Command=
getc u v w p abso$repl
ID= B6
Label= Pstat
Command=
getc u v w pstat$repl
ID= B7
Label= PstatA
Command=
getc u v w pstat abso$repl
ID= B8
Label= Ptot
Command=
getc u v w ptot$repl
ID= B9
Label= PtotA
Command=
getc u v w ptot abso$repl
ID= B10
Label= T
Command=
getc u v w t rela$repl
ID= B11
Label= TA
Command=
getc u v w t abso$repl
ID= B12
Label= Ttot
Command=
getc u v w ttot rela$repl
ID= B13
Label= TtotA
Command=
getc u v w ttot abso$repl
ID= B14
Label= K
Command=
getc u v w te$repl
ID= B15
Label= E
Command=
getc u v w ed$repl
ID= B16
Label= Visc
Command=
getc u v w vis$repl
ID= B17
Label= Dens
Command=
getc u v w dens$repl
ID= B18
Label= Conc1
Command=
getc u v w conc 1$repl
ID= B19
Label= Conc2
Command=
getc u v w conc 2$repl
ID= B20
Label= Conc3
Command=
getc u v w conc 3$repl
ID= B21
Label= Conc4
Command=
getc u v w conc 4$repl
ID= B22
Label= Conc5
Command=
getc u v w conc 5$repl
ID= B23
Label= Conc6
Command=
getc u v w conc 6$repl
ID= B24
Label= Conc7
Command=
getc u v w conc 7$repl
ID= B25
Label= Conc8
Command=
getc u v w conc 8$repl
ID= B26
Label= Conc9
Command=
getc u v w conc 9$repl
ID= B27
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 (see Chapter 17, “Panels” in
the CCM User Guide). The definition of this special menu is as follows:
• Click Apply
• Close the Define Panel Menus dialog
Note that, in going through this process, you have the choice of leaving the panel in
your present working directory, where it will be available only to the case you are
working on at the moment, or copying/moving it to a local or global panel directory.
You might do the latter if you want the panel to be available for use by other
members of your team (global) or by yourself in all your case directories (local).
If the panel is moved or copied to a local or global directory, you need to make
sure that pro-STAR knows the latter’s 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:
• Select Panels > Set Environment... from the main menu bar
• Type the full filename path in the PANEL_GLOBAL or PANEL_LOCAL
text box, depending on the location of the panel definition file
• Click Apply and Close
• Select Panels > Define Panel... from the main menu bar
• Click Re-scan
• The above operation causes the panel name to be displayed in the scroll
list, preceded by ‘L’ or ‘G’, as appropriate
• Close the Define Panel dialog
• Select Panels from the main menu bar to confirm that Pgetc is included
as a menu option
Note that, if you are working with a local or global directory, any new panels you
create can be placed directly in that directory simply by prefixing the new panel
name with an ‘L’ or ‘G’, as appropriate.
Panel Pgetv is essentially identical to Pgetc apart from the fact that it performs
vertex based post-processing operations. The button definitions for this panel are
given below:
ID= B0
Label= SU
Command=
getv u v w su$repl
ID= B1
Label= SV
Command=
getv u v w sv$repl
ID= B2
Label= SW
Command=
getv u v w sw$repl
ID= B3
Label= VM
Command=
getv u v w vmag$repl
ID= B4
Label= P
Command=
getv u v w p$repl
ID= B5
Label= PA
Command=
getv u v w p abso$repl
ID= B6
Label= Pstat
Command=
getv u v w pstat$repl
ID= B7
Label= PstatA
Command=
getv u v w pstat abso$repl
ID= B8
Label= Ptot
Command=
getv u v w ptot$repl
ID= B9
Label= PtotA
Command=
getv u v w ptot abso$repl
ID= B10
Label= T
Command=
getv u v w t rela$repl
ID= B11
Label= TA
Command=
getv u v w t abso$repl
ID= B12
Label= Ttot
Command=
getv u v w ttot rela$repl
ID= B13
Label= TtotA
Command=
getv u v w ttot abso$repl
ID= B14
Label= K
Command=
getv u v w te$repl
ID= B15
Label= E
Command=
getv u v w ed$repl
ID= B16
Label= Visc
Command=
getv u v w vis$repl
ID= B17
Label= Dens
Command=
getv u v w dens$repl
ID= B18
Label= Conc1
Command=
getv u v w conc 1$repl
ID= B19
Label= Conc2
Command=
getv u v w conc 2$repl
ID= B20
Label= Conc3
Command=
getv u v w conc 3$repl
ID= B21
Label= Conc4
Command=
getv u v w conc 4$repl
ID= B22
Label= Conc5
Command=
getv u v w conc 5$repl
ID= B23
Label= Conc6
Command=
getv u v w conc 6$repl
ID= B24
Label= Conc7
Command=
getv u v w conc 7$repl
ID= B25
Label= Conc8
Command=
getv u v w conc 8$repl
ID= B26
Label= Conc9
Command=
getv u v w conc 9$repl
ID= B27
Label= Conc10
Command=
getv u v w conc 10$repl
C 3 H 8 + 1.5O 2 → 3CO + 4H 2
CO + 0.5O 2 → CO 2
H 2 + 0.5O 2 → H 2 O
The mesh set up in Tutorial 1.2 of the Meshing Tutorials volume is utilised and
boundary conditions that are appropriate for this type of model are applied.
The physical properties of air (23.2% oxygen and 76.8% nitrogen, by mass),
leading reactants (C3H8, CO, H2) and products (CO2, H2O) are assumed to be as
follows:
It is assumed that both air and fuel enter the combustion chamber at a pressure of
1 bar and temperature of 293 K.
• 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 mixture’s specific heat is assumed to be dependent on component specific
heats, i.e.
Cp = ∑ C pi Y i
i
Numerical Considerations
• The combustion source term in the leading reactant transport equations is
large; therefore, the fuel mass fraction requires under-relaxation.
• Using the chemico-thermal option for enthalpy, the enthalpy and mixture
fraction variables must develop numerically at the same rate as the fuel
fraction. Therefore, the under-relaxation factors for enthalpy and transported
species must be identical.
• Small errors in calculating the fuel mass fraction can strongly influence the
computed temperature. Therefore, it is necessary to solve the transport
equations for species and enthalpy to a tight solver tolerance.
Pre-processing
Preliminaries Create a sub-directory for the tutorial called tut9-2. The mesh for this problem
has already been created in the Meshing Tutorials volume (Tutorial 1.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 Pgetv defined in Tutorial 9.1. These are stored in files
Pgetc.PNL and Pgetv.PNL.
• Start up pro-STAR by typing prostar at the command line
This will read default problem settings from file combustor.inp plus the
problem’s cell, vertex and boundary location definitions from the remaining three
files.
Specify the key feature of this case, i.e., chemically reacting flow:
• In the pro-STAR Model Guide, go to panel Analysis Features
• Select option Chemical Reaction from the Reacting Flow menu
• Click Apply
• Select folder Thermophysical Models and Properties and note that the
sub-folder called Reacting Flow is now active in the pro-STAR Model Guide
tree. This will be used in this tutorial to supply chemical reaction definitions.
Ignition As explained in the “Additional Modelling Notes” section, an ignition region needs
Region to be defined for this type of model. To do this, collect the cells to be designated as
ignition cells as follows:
• In the I/O window, type command
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 model’s
cells:
• In the main window, select Tools > Cell...
• Select row 4 in the Cell Tool scroll list
• Click Cell Editor from the menu on the left to open the Cell Editor dialog
• Enter 5 in the Color Index box
• In the Flow Conditions tab, confirm that a value of 293 is displayed in the
Temperature box
• Go to the Turbulence tab and select option TI/Mixing Length for the Model
• 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.
• Open the Monitoring and Reference Data (Fluids) panel
• Type 114 in the Monitoring Cell Number box
• Choose the same reference pressure location as Tutorial 9.1, i.e., half way
between the axis and the outer casing and towards the outlet, by entering 1760
in the Pressure Cell Number box. Confirm that 100000 appears in the
Pressure box.
• Click Apply
Combustion Use the pro-STAR Model Guide’s Reacting Flow folder to set up the combustion
Model model as follows:
• Select sub-folder Reacting Flow followed by Chemical Reactions
• Open the Scheme Definition panel. Note that scheme no. 1 is selected by
default for the Chemical Scheme option at the top of the panel
• Select option Unpremixed/Diffusion from the Reaction Type menu
• Accept the default EBU Standard option from the Reaction Model menu
• Click Apply
• A pop-up window will now appear warning you that the default chemical
reaction settings will be changed. Click Continue.
Specify the chemical reaction equations and other basic model parameters:
• Open the Reaction System panel. Note that reaction no. 1 is selected by
default for the Reaction option.
• Type the first reaction definition, C3H8 + 1.5O2 -> 3CO + 4H2, in the box
underneath
• Accept the default settings on the Status, Tscale and Rate Equation menus
and then click Apply. pro-STAR will use default values for parameters Amix,
Bmix, confirm the chemical names entered above and enter them in the
appropriate lists (Leading Reactants, Products and Reactant Parameters)
• Increment the Reaction setting to 2 and type the second reaction definition,
CO + 0.5O2 -> CO2, in the box
• Click Apply. pro-STAR will update the various lists as necessary
• Increment the Reaction setting to 3 and type the third reaction definition, H2
+ 0.5O2 -> H2O in the box
• Click Apply. pro-STAR will update the various lists as necessary
0.233
Assign the chemical reaction scheme just defined to the model’s fluid domain:
• Open the Scheme Association panel
• Select On for the Associate Chemical Scheme option and check that the
default value is 1 for the Chemical Scheme # option
• Click Apply
Scalar Check the properties of the scalar variables set up as a result of the scalar mapping
Properties described earlier:
• Select the Additional Scalars folder and then open the Molecular Properties
(Scalars) panel
Use the Scalar spin box 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.
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.
• Set the Scalar # option to scalar no. 1 (C3H8)
• Clicking Apply causes pro-STAR to search for the coefficients of this
substance in its internal database. In this case, they are found and a message
to that effect appears in the I/O window.
• Click the Define Polynomials button for specific heat to open the Polynomial
Function Definition dialog. This will display the coefficients just retrieved.
Specify boundary conditions for the inlet boundaries, choosing the ‘Mixing Length’
option for turbulence parameter input. Note that all fluid streams except the one
flowing through the cooling passage have swirl velocity components on entry into
the combustor. Starting with the fuel inlet:
• Select region 3 In the boundary regions scroll list
• Select option TI/Length from the Turbulence Switch menu
• Enter inlet boundary values for the fuel stream in the appropriate boxes as
shown below:
• Click Apply
• Click Apply
• Select region 5 in the scroll list
• Select option TI/Length from the Turbulence 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 Turbulence Switch menu
• Enter inlet conditions in the appropriate text boxes, as shown below:
• 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.
• Select C3H8 in the Scalar scroll list, type 1 in the boundary Value box and
then click Apply
Control Check the solution control parameter settings and specify new values for
Parameters under-relaxation factors and tolerances where appropriate:
• Select folder Analysis Controls
• Open the Primary Variables panel and then select the Solver Parameters tab
• Type 0.7 in the Relaxation Factor box for Temperature
• Type 0.001 in the Residual Tolerance box for Temperature
• Type 0.8 in the Relaxation Factor box for Density
• Click Apply
• Open the Additional Scalars (Controls) panel
• Select all scalars in the scroll list one-by-one and check the under-relaxation
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 Check the status of the run time control parameters:
Controls
• Select folder Analysis Preparation and open the Run Time Controls panel
• Enter 500 for the maximum number of iterations and 0.0001 for the maximum
residual tolerance
• Click Apply
• Open the Restart panel. The setting of the Restart File Option menu should be
None, confirming that this is a run from initial conditions.
Final The pre-processing task is now complete. If you wish to terminate the session at this
Operations 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 pro-STAR Model Guide facilities for running STAR
interactively. This process is described in the next section.
• In the main pro-STAR panel, select File > Save Geometry...
• In the Save Geometry File dialog, click Apply and then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
• Select File > Quit > Save & Quit
CFD Analysis
As in Tutorial 9.1, a double precision STAR executable needs to be employed, as
follows:
• In the main pro-STAR panel, select File > Save Model
• In the Analysis Preparation folder, open the Run Analysis Interactively panel
• Select the Double Precision option button. Leave all other settings at their
default values
• Click Start
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.ccmp:
• Select folder Post-Processing
• Open the Load Data panel and display the File(s) tab
• Click Open Post file
The user-defined panels, Pgetc and Pgetv, described in Tutorial 9.1 are to be used
to generate a 3-D display of the velocity magnitude distribution:
• Select Panels > Pgetc
• In the Pgetc panel, click VM
• Select Contour as the cell plot type from the drop-down menu
• In the main window, click the Display Edges button to display Figure T9.2-1
• In the main window, click the Display Edges plotting button again to
deactivate it
Define a section whose plane bisects the mesh and passes through the axis of
symmetry:
• In the main window, select View > Axis > +X
• Click Sect. Slice and then use the screen cursor to draw a vertical line that
bisects the visible mesh (click the end points of the line). This represents the
trace of a longitudinal section plane through the middle of the mesh and
passing through the axis.
• Select a viewpoint at right angles to the section by choosing View > SNormal
View
• Select cell plot type Section (Surface)
Open panel Pgetv and plot the vertex-based temperature profile in the section:
• Select Panels > Pgetv
• On the Pgetv panel, click button TA to display the absolute temperature
distribution shown in Figure T9.2-2
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
Version 4.06 9-39
Tutorial 9.2 PROPANE COMBUSTION (THREE-STEP EDBR) Post-Processing
Basic Plots
products (CO2). This time use panel Pgetc to read in the cell-based values and then
obtain the vertex-based values by averaging:
• Select Panels > Pgetc
• Click Conc1
• Select Post > Caverage > Cset
• In the main window, click Replot to display the propane distribution shown in
Figure T9.2-3
• Click Conc8
• Select Post > Caverage > Cset
• In the main window, click Replot to display the carbon dioxide distribution
shown in Figure T9.2-4
As with the temperature plot, the CO2 contour plot incorrectly suggests that the
scalar concentration is continuous across the baffle.
To terminate the session:
• Select File > Quit > Quit, Nosave
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 1.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.
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 1.2) and the
relevant cell, vertex, boundary and problem setup files are already available (files
combustor.cel, combustor.vrt, combustor.bnd and
combustor.inp, respectively). Therefore, before starting the tutorial, make sure
that the above files are copied into your current directory.
• Start up pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Enter the case name (say, EDBR_dr) in the Case Name text box
• Click Continue
This will read default problem settings from file combustor.inp plus the
problem’s cell, vertex and boundary location definitions from the remaining three
files.
• Click Cplot
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 model’s
cells:
• In the main window, select Tools > Cell...
• Select row # 4 in the Cell Tool scroll list
• Click Cell Editor from the menu on the left to open the Cell Editor dialog
• Enter 5 in the Color Index box
• Select On from the Radiation menu. This is a necessary setting for
performing radiation calculations, as explained below
• Type Ignition_cells in the Name box
• Click Apply
• In the Cell Tool, select Modify > Modify Type (Cell Set)
• Click Replot and notice the change of cell colour in the ignition region
9-44 Version 4.06
Tutorial 9.3 C7H8 DROPLET COMBUSTION (EDBR, RADIATION) Pre-processing
Thermal Options
Turn radiation on, choosing the Discrete Transfer analysis method in conjunction
with the participating media calculation option:
• Select the Thermophysical Models and Properties folder and open the
Thermal Options panel
• From the Radiation menu on the panel, select option Discrete Transfer -
Internal VF Calc
• 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
Radiation To use the discrete beam radiation model, it is necessary to subdivide all boundary
Patches regions present in the problem (except for cyclic boundaries) into so-called
‘patches’. These are used both during view factor calculations and for evaluating the
radiative heat transfer.
Assign a unique patch to every boundary in every relevant region. This can be
done most conveniently by means of a pro-STAR command loop, shown below:
typed into the I/O window:
• In the I/O window, type the following commands:
BSET NONE
*SET NREG 3 1
*DEFINE
BPATCH NREG,,BYFA
BSET ADD REGI NREG
*END
*LOOP 1 12
The above loop will create 535 patches. Display the patches to confirm that the
operation has been carried out correctly:
• In the main window, select Plot > Cell Display > Boundary Patches
• Verify that patches appear in the right places and then deselect the Boundary
Patches plot display option
Material Set up material properties and thermofluid models using the appropriate pro-STAR
Properties Model 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
• Go to the pro-STAR Model Guide and open the Molecular Properties (Fluids)
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 the Molecular
Weight box whose default value, 28.96, is appropriate for air
• Click Apply. A pop-up dialog 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 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
• Go to the Turbulence tab and select option TI/Mixing Length for the Model
• 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:
• In the main window, select Plot > Number > Cell
• Zoom in on the mesh shown on-screen to have a closer look at the displayed
numbers and confirm cell number 482 as suitable for the monitoring cell
• Click the Zoom Off button,
• Select Plot > Number > Cell again to deselect the cell number plot option
• Go back to the pro-STAR Model Guide and open the Monitoring and
Reference Data (Fluids) 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 Pressure Cell Number box. Confirm that 100000 appears in the
Pressure box
• Click Apply
Combustion Use the pro-STAR Model Guide’s Reacting Flow folder to set up the combustion
Model model as follows:
• Select sub-folder Reacting Flow followed by Chemical Reactions
• Open the Scheme Definition panel. Note that scheme no. 1 is selected by
default for the Chemical Scheme option at the top of the panel
• Select option Unpremixed/Diffusion from the Reaction Type menu
• Accept the default EBU Standard option from the Reaction Model menu.
Click Apply
• A pop-up window will now appear warning you that the default chemical
reaction settings will be changed. Click Continue
Specify the reaction equation for this scheme and other basic model parameters:
• Open the Reaction System panel. Note that reaction no. 1 is selected by
default for the Reaction option
• Type the required reaction definition, C7H8 + 9O2 -> 7CO2 + 4H2O, in the
box for Reaction 1
• Accept the default settings on the Status, Tscale and Rate Equation menus
and then click Apply. pro-STAR will use default values for parameters Amix
and 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
0.233
Assign the chemical reaction scheme defined earlier (no. 1) to the model’s fluid
domain:.
• Open the Scheme Association panel
• Select On for the Associate Chemical Scheme option and check that the
default value is 1 for the Chemical Scheme # option
• Click Apply
Check the properties of the scalar variables set up as a result of the scalar mapping
described earlier:
• Select sub-folder Additional Scalars
• Open the Molecular Properties (Scalars) panel and scroll through the
available scalars using the Scalar # spin box at the top of the panel
It will be seen that a total of 6 scalars have been defined, including an additional
‘passive’ scalar (no. 2) representing the mixture fraction of the fuel. Note that a
solution for this scalar is required by the EDBR formulation (see Chapter 10 of the
Methodology volume).
Droplet Check the basic control settings for droplets and then re-define the maximum size
Properties of the droplet track file (in Mb), taking into account droplet trajectories and the
maximum tracking times:
• 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 Maximum File Size box
• Accept the default value (100) for Maximum Tracking Time
• Select option Explicitly defined parcel injection for the Droplet Mode
option
• Accept all other default settings on the panel and click Apply
Activate the turbulent dispersion model and define transport mechanisms and
physical properties for the droplets on the basis of:
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 15 of
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 Create the required number of parcels (each parcel is represented by a typical
Creation droplet) and specify their initial conditions. The parcels are to be injected into the
combustor via an annular slit of radius 5 mm, centred around the axis of symmetry
and projecting 2 cm into the combustion chamber. It is therefore convenient to use
a cylindrical coordinate system (no. 2) when specifying initial parcel positions and
velocities.
All parcels in this model are to be included in a single injection group. Define the
group’s injection characteristics, including the initial diameter, velocity magnitude
and temperature of a typical droplet:
• Open the Injection Definition panel
• Specify injection data as indicated below:
Diameter — 250e-6 m
Velocity Magnitude — 4.4721 m/s (based on initial velocity components
Uinit, Vinit, Winit of 2, 0, 4 in coordinate system no. 2)
Temperature — 350 K
Mass Flowrate applies to — Each Injection Point
Rate — 4.152e-4 kg/s (based on an injection rate of 7e+4 droplets per
parcel per second)
Number of Parcels/Injection Point — 1
• Click Apply
Specify the injection location for 21 parcels, uniformly distributed over an arc of 50˚
around the injector ring so that the interval between them is 2.5˚. All parcels are to
have identical injection directions given by (0.4472, 0, 0.8944) in coordinate system
no. 2:
• Open the Injection Points panel
• Select option Line from the Set Type menu
• Enter 2 in both of the Coordinate System boxes
• Enter 21 in the Number of Points box
• Select option Specify for Point 1 (the first end-point of the circular arc) and
enter its coordinates (0.005, -25, 0.02) in the X, Y, Z boxes
• Enter coordinates (0.005, 25, 0.02) for Point 2 (the second end-point of the
arc) in the other set of X, Y, Z boxes
• Specify the entrance velocity direction in terms of unit vector components by
entering (0.4472, 0, 0.8944) in the DX, DY, DZ boxes
• Ensure Add New Set is selected from the Action menu and click Apply. The
injection points list at the top of the panel will confirm that a group of 21
injection points has been created.
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 1.2.
This is done by re-defining region 3 from type ‘Inlet’ to type ‘Wall’. Surface
temperature and radiation property data should also be supplied:
• In the boundary regions scroll list, select region 3
• Select option Wall from the Region Type menu
• Choose option Fixed in the Wall Heat menu
• Enter surface temperature and radiation property data in the appropriate boxes
as shown below:
Temperature — 600
Resistance — 0.8
Emissivity — 0.8
Reflectivity — 0.2
Transmissivity — 0
• Click Apply
Specify conditions at the air inlet boundaries, including surface radiative data such
as emissivity and reflectivity:
• Select region 4 in the scroll list
• Select option TI/Length from the Turbulence Switch menu
• Enter inlet conditions in the appropriate boxes, as shown below:
• Click Apply
• Select region 5 in the scroll list
• Select option TI/Length from the Turbulence 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 Turbulence Switch menu
• Enter inlet conditions in the appropriate text boxes, as shown below:
• Click Apply
Specify radiation conditions for the walls (regions 7 to 13) via a pro-STAR
command loop. Walls are defined as thermally conducting with emissivity and
reflectivity of 0.8 and 0.2, respectively.
• In the I/O window, type the following commands:
*SET NREG 7 1
*DEFINE
RMOD NREG
U
U U
U U U U U
FIXE 600.0 0.8
0.8 0.2
0.0
*END
*LOOP 1 6
Finally, define the baffles as thermally conducting boundaries having the same
radiation properties as the walls.
• Select region no. 15 in the boundary regions scroll list
• Choose option Conduction in the Wall Heat menus for both SIDE 1 and
SIDE 2
• Type 0.8 in the Resistance box for SIDE 1
• Enter radiation property data for SIDE 1 of the baffle in the appropriate boxes
as shown below:
Emissivity box — 0.8
Reflectivity box — 0.2
Transmissivity box — 0
• Enter radiation property data for the reverse side of the baffle, SIDE 2, in the
appropriate text boxes, as shown below:
Emissivity box — 0.8
Reflectivity box — 0.2
• Click Apply
Control Check the solution control parameters and then change the under-relaxation factor
Parameters for temperature and density and the residual tolerance for temperature:
• Select folder Analysis Controls
• Open the Primary Variables panel and then select the Solver Parameters tab
• Type 0.7 in the Relaxation Factor box for Temperature
• Type 0.001 in the Residual Tolerance box for Temperature
• Type 0.8 in the Relaxation Factor box for Density
• Click Apply
• Open the Additional Scalars (Controls) panel
• Select each scalar in turn and check that the Under-Relaxation Factor and
Residual Tolerance values are set to 0.7 and 0.001, respectively
Run Time Check the status of the run time control parameters:
Controls
• Select folder Analysis Preparation and open the Run Time Controls panel
• Enter 800 for the maximum number of iterations and 0.0001 for the maximum
residual tolerance
• Click Apply
• Open the Restart panel. The setting of the Restart File Option menu should be
None, confirming that this is a run from initial conditions.
Final The pre-processing task is now complete. If you wish to terminate the session at this
Operations 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 > Save Geometry...
• In the Save Geometry File dialog, click Apply and then Close
• Select File > Save Problem...
User Subroutines
As explained previously, sub-directory ufile should contain a file called
dropro.f, corresponding to subroutine DROPRO. Use pro-STAR’s built-in
editor to edit this subroutine and introduce the required code, as follows:
• In the main pro-STAR panel, select File > Edit File...
• In the Edit File dialog, click File > Open...
• When the Open dialog appears, choose sub-directory ufile and then file
dropro.f
• Click OK
• Edit the contents of the subroutine so that it looks exactly as shown below
• 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.04
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:
• In the Edit File dialog, click File > Open...
• When the Open dialog appears, and under sub-directory ufile, enter a new
file name called calhvp.f
• Click OK
• Input the contents of the new subroutine exactly as shown below
• Click File > Save to save the subroutine contents
• Repeat the above steps for the second subroutine, calsvp.f
• Click File > Quit to exit from the editor
C***********************************************************************
SUBROUTINE CALHVP(NDRCO,ICO,TDRP,HV)
C Droplet heat of evaporation
C See Reid pg 228 eqt 7-12.1
C***********************************************************************
INCLUDE ’comdb.inc’
C
PARAMETER (NDRCL=1)
DIMENSION WTMOL(NDRCL),TBOIL(NDRCL),TCRIT(NDRCL),PCRIT(NDRCL),
+ OMEGA(NDRCL)
C.... Properties of C7H8 droplet vapour components
DATA WTMOL/ 92.1410 /
DATA TBOIL/ 383.8000 /
DATA TCRIT/ 591.8000 /
DATA PCRIT/ 41.0000 /
DATA OMEGA/ 0.2630 /
C
C.... Other required data
PARAMETER (RCONS=8.3143)
DIMENSION TREFL(NDRCL)
DATA TREFL/ 450.0 /
C
C-------------------------------------------------------------------------
C
IF(NDRCO.GT.NDRCL) THEN
WRITE(6,*)’ SUBROUTINE CALHVP: NDRCO.GT.NDRCL ’
WRITE(6,*)’ NDRCO=’, NDRCO
WRITE(6,*)’ NDRCL=’, NDRCL
STOP
ENDIF
C
IF(TDRP.LT.TCRIT(ICO)) THEN
TRED1=TREFL(ICO)/TCRIT(ICO)
THAW1=1.0-TRED1
TERM1=7.08*(THAW1)**0.354
TERM2=10.95*OMEGA(ICO)*(THAW1)**0.456
HV1=(RCONS*TCRIT(ICO)*(TERM1+TERM2))*(1.0E+3/WTMOL(ICO))
C
TRATIO=TBOIL(ICO)/TCRIT(ICO)
TTE=(LOG(PCRIT(ICO))-1.013)/(0.93-TRATIO)
DELHVB=1.093*RCONS*TCRIT(ICO)*TRATIO*TTE
C
TERM=0.00264*(DELHVB/(RCONS*TBOIL(ICO)))
PN=(TERM+0.8794)**10
TRED2=TDRP/TCRIT(ICO)
THAW2=1.0-TRED2
HV=HV1*(THAW2/THAW1)**PN
ELSE
HV=0.0
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
CFD Analysis
As in Tutorial 9.1, a double precision STAR executable needs to be employed, as
follows:
• In the main pro-STAR panel, select File > Save Model
• In the Analysis Preparation folder, open the Run Analysis Interactively panel
• Select the Double Precision option button. Leave all other settings at their
default values
• Click Start
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.ccmp) and
re-plotting the mesh:.
• In the pro-STAR Model 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 Cplot
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:
Version 4.06 9-59
Tutorial 9.3 C7H8 DROPLET COMBUSTION (EDBR, RADIATION) Post-Processing
Preliminaries
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.
• In the pro-STAR Model Guide, select folder Post-Processing followed by
sub-folder Particle Tracks
• Open the Plot Droplets panel
• In the Load From menu, select option Track File
• Check that file EDBR_dr.trk is displayed in the File Name box
• Accept the default option (Particles) in the Plot Option menu and then click
Load Data
• In the Droplet Plot Options section, select After, Unhidden and Cplot from
the Edge Plot Options menus
• Check that Diameter is selected from the Droplet Size menu and that 0.2 is
9-60 Version 4.06
Tutorial 9.3 C7H8 DROPLET COMBUSTION (EDBR, RADIATION) Post-Processing
Preliminaries
Figure T9.3-2 Plot of toluene droplets with the droplets coloured by their temperature
Now make the droplet colour dependent on droplet mass and replot:
• In the Droplet Plot Options section, select Mass in the Fill Color menu
• Click Apply and then Droplet Plot to display Figure T9.3-3
Figure T9.3-3 Plot of toluene droplets with the droplets coloured by their mass
The above plot shows that the vast majority of the droplets have evaporated before
they reach the combustor outlet.
To view the fuel and combustion product distribution, first define a section
whose plane bisects the mesh and passes through the axis of symmetry:
• In the main window, select D > None
• Select plot option Geometry and then click Cplot
• View > Axis > +X
• Click Sect. Slice and then use the screen cursor to draw a vertical line that
bisects the visible mesh (click the end points of the line). This represents the
trace of a longitudinal section plane through the middle of the mesh and
passing through the axis.
• Select a viewpoint at right angles to the section by choosing View > SNormal
View
• Select cell plot type Section (Surface)
Open panel Pgetv and use it to plot the vertex-based temperature profile in the
section:
• In the main window, select plot option Contour
• Select Panels > Pgetv
• On the Pgetv panel, click button TA to display the absolute temperature
distribution shown in 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.
Produce contour plots for the concentration profiles of fuel and carbon dioxide.
This time use panel Pgetc to read in the cell-based values and then obtain the
vertex-based values by averaging:
• Select Panels > Pgetc
• Click Conc1
• Post > Caverage > Cset
• In the main window, click Replot to display the toluene distribution shown in
Figure T9.3-5
• Click Conc4
• Post > Caverage > Cset
• In the main window, click Replot to display the carbon dioxide distribution
shown in Figure T9.3-6
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 1.2) and the
relevant cell, vertex, boundary and problem setup files are already available (files
combustor.cel, combustor.vrt, combustor.bnd and
combustor.inp, respectively). Therefore, before starting the tutorial, make sure
that these files are copied into your current directory.
• Start up pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Enter the case name (say, flamelet) in the Case Name text box
• Click Continue
This will read default problem settings from file combustor.inp, plus the
problem’s cell, vertex and boundary location definitions from the remaining three
files.
Plot the mesh to confirm that the data have been read in correctly:
• In the main pro-STAR window, select Plot > Up Axis followed by X
• Select C > All
• Select View > Isometric > 1, 1, -1
• Click Cplot
Specify the key feature of this case, i.e., chemically reacting flow:
• In the pro-STAR Model Guide, go to panel Analysis Features
• Select option Chemical Reaction from the Reacting Flow menu
• Click Apply
• Select folder Thermophysical Models and Properties and note that the
sub-folder called Reacting Flow now appears active in the pro-STAR Model
Guide tree.
Material Set up material properties and thermofluid models using the appropriate pro-STAR
Properties Model Guide panels. The necessary actions are as follows:
1. Select the standard k-ε turbulence model
2. Turn on the temperature solver
3. Set the initial temperature distribution
4. Choose the monitoring cell location
5. Choose the reference pressure and its location
• Select sub-folder Liquids and Gases
• Open the Turbulence Models panel
• Select On to switch on Turbulence modelling
• Select option K-Epsilon/High Reynolds Number from the Model menu
• Click Apply
Combustion Use the pro-STAR Model Guide’s Reacting Flow folder to set up the combustion
Model model, as follows:
• Select sub-folder Reacting Flow followed by Chemical Reactions
• Open the Scheme Definition panel. Note that scheme no. 1 is selected by
default for the Chemical Scheme option at the top of the panel
• Select option Unpremixed/Diffusion from the Reaction Type menu
• Select option PPDF Single Fuel from the Reaction Model menu
• Select the Laminar Flamelet Model Option and click Apply
• A pop-up window will now appear warning you that the default chemical
reaction settings will be changed. Click Continue. A message will appear at
the bottom of the pro-STAR Model Guide panel confirming your combustion
model selection
The next step is to specify an appropriate reaction mechanism for the Laminar
Flamelet model. This must be written in CHEMKIN format, which requires a listing
of all participating elements, species and reactions. For a detailed description of
how to specify reaction mechanisms in this format, see , “Laminar flamelet model”
in the CCM User Guide.
Supply the basic data required as follows:
• Open the Reaction System panel
• In the Reaction Mechanism tab, copy the description given below into the
displayed box:
ELEMENTS H O N END
SPECIES H HO2 H2 H2O H2O2 N2 O OH O2 END
REACTIONS
H+O2+M=HO2+M 3.61E+17 -0.720 0.000
H2O/18.6/ H2/2.86/
H+H+M=H2+M 1.00E+18 -1.000 0.000
H+H+H2=H2+H2 9.20E+16 -0.600 0.000
H+H+H2O=H2+H2O 6.00E+19 -1.250 0.000
H+OH+M=H2O+M 1.60E+22 -2.000 0.000
H2O/5/
H+O+M=OH+M 6.20E+16 -0.600 0.000
H2O/5/
O+O+M=O2+M 1.89E+13 0.000 -1788.000
H2O2+M=OH+OH+M 1.30E+17 0.000 45500.000
H2+O2=2OH 1.70E+13 0.000 47780.000
OH+H2=H2O+H 1.17E+9 1.300 3626.000
O+OH=O2+H 3.61E+14 -0.500 0.000
O+H2=OH+H 5.06E+04 2.670 6290.000
OH+HO2=H2O+O2 7.50E+12 0.000 0.000
H+HO2=2OH 1.40E+14 0.000 1073.000
O+HO2=O2+OH 1.40E+13 0.000 1073.000
2OH=O+H2O 6.00E+08 1.300 0.000
H+HO2=H2+O2 1.25E+13 0.000 0.000
HO2+HO2=H2O2+O2 2.00E+12 0.000 0.000
H2O2+H=HO2+H2 1.60E+12 0.000 3800.000
H2O2+OH=H2O+HO2 1.00E+13 0.000 1800.000
END
• Click Save. 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.
• Click Apply to validate the file contents and create the chemistry libraries
needed subsequently by the flamelet calculations.
Now that the reaction mechanism has been specified, the flamelets description
needs to be created:
• In the Flamelet Setup tab, check that the Set option is Composition
• Click Generate File to generate and store the first flamelet description in file
flame01.inp01 within the PPDF sub-directory
• Examine the Mole Fractions and Valences for the Fuel, Oxidizer and
Product streams by selecting each of them in turn from the Stream to Define
menu. The default values displayed are suitable for this case.
• Select Flamelet Number 2 in the spin box and click Generate 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 Numbers 3 and 4, thus generating files
flame03.inp01 and flame04.inp01
• Choose the Flow Conditions option from the Set menu
• For Flamelet Number 2, change the Strain Rate of Oxidizer to 200
• Click Apply to store the updated flamelet description in file
flame02.inp01
• For Flamelet Number 3, change the Strain Rate of Oxidizer to 300
• Click Apply to store the updated flamelet description in file
flame03.inp01
• For Flamelet Number 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.
• Select the Flamelet Generation tab
• Select flamelet number 1 from the list. Note that Action New is selected by
default.
• Click Apply to calculate the corresponding flamelet library. This process may
take a few seconds.
• Select flamelet number 2 from the list
• Choose Action Restart From Flamelet Number 1. This should reduce the
computation time because the two flamelets have similar properties.
• Click Apply
• Select flamelet number 3 from the list
• Choose Action Restart From Flamelet Number 2
• Click Apply
• Select flamelet number 4 from the list
• Click Apply
The STAR-CD solver requires that flamelet library data should be provided in
tabular form. The relevant table is created as follows:
• Select the Look-up Table tab
• Check that the Plot Data for Flamelet Number option is set to 1
• Click Plot to display graphs of flamelet data for flamelet number 1, as shown
in Figure T9.4-1.
• 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-STAR’s built-in property database file props.dbs. Data for
these species must be specified next.
Scalar The I/O window lists the problem species as OH, O, H, HO2 and H2O2. As
Properties 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:
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:
• Open the Scheme Association panel in the Reacting Flow folder
• Select On for the Associate Chemical Scheme option and check that the
default value is 1 for the Chemical Scheme # option
• Click Apply
Boundary The next step is to specify boundary conditions, starting with the fluid inlet
Conditions conditions:
• Select the Define Boundaries folder
• Open the Define Boundary Regions panel
• Select region 3, Fuel_inlet from the boundary regions list
• Specify the U, V and W velocity components as -28, -60 and 100 m/s,
respectively
• Change the Coordinate System to 2
• Select TI/Length from the Turbulence Switch menu
• Change the Turb. Intensity to 0.1 and the Length to 0.01 m
• Change the Density to 1.8 kg/m3
• Click Apply
Analysis Some of the analysis controls need to be changed to ensure a reasonably rapid
Controls convergence rate:
• Select the Analysis Controls folder
• Open the Additional Scalars (Controls) panel
• Select MIXTURE_FRACTION from the Scalar list
• Change the Under-Relaxation Factor to 0.7
• Change the Residual Tolerance to 0.001
• Click Apply
• Select VARIANCE from the Scalar list
• Change the Under-Relaxation Factor value to 0.7
• Change the Residual Tolerance to 0.001
• Click Apply
Final The pre-processing task is now complete. If you wish to terminate the session at this
Operations 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 pro-STAR Model Guide facilities for running STAR interactively. This
process is described in the next section.
• In the main pro-STAR panel, select File > Save Geometry...
• In the Save Geometry File dialog, click Apply and then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
• Select File > Quit > Save & Quit
CFD Analysis
For problems involving chemical reactions, it is recommended that STAR is run in
double precision mode as follows:
• In the main pro-STAR panel, select File > Save Model
• In the Analysis Preparation folder, open the Run Analysis Interactively panel
• Select the Double Precision option button. Leave all other settings at their
default values
• Click Start
The analysis will then start automatically. Convergence should be achieved within
the specified maximum number of iterations.
Post-Processing
Preliminaries Start the post-processing task by re-plotting the mesh:
• In the main window, select C > All
• Click Cplot
Now load the solution results and plot velocity vectors on an x-z plane bisecting the
model geometry:
• Go to the pro-STAR Model Guide and select the Post-Processing folder
• Open the Load Data panel
• Under the File(s) tab, click Open Post file
• Under the Data tab, select Velocity Components UVW from the Vector Data
list
• Click Get Data
• Go to the Create Plots panel
• Under the Section/Clipped tab, change the Normal values to 0, 1, 0
• Click Apply
• Click Plot To Screen
• In the main pro-STAR window, select View > SNormal View to display
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
• Go to the Create Plots panel
• 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.
Introduction
This tutorial illustrates various STAR-CD facilities for simulating a heat transfer
problem involving natural convection, conduction, solid-fluid heat transfer and
radiation. The example used in the tutorial consists of a heated aluminium alloy fin
placed within a rectangular box filled with air (see Figure T10.0-1).
T = 293 K T = 293 K
10
1 2
2 4
T = 343 K
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.
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 (ρ) = 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.81E–5 Pa s
Pre-Processing
Preliminaries Create a sub-directory for the tutorial called tut10-1. The mesh for this problem
is supplied in advance, i.e., cell, vertex, boundary and problem setup files
(fin.cel, fin.vrt, fin.bnd and fin.inp, respectively) are available in the
STAR-CD installation directories. Therefore, before starting the tutorial, make sure
that these files are copied into your current directory.
• Start up pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Enter the case name (say, fin_bu) in the Case Name text box
• Click Continue
This will read default problem settings from file fin.inp plus the problem’s cell,
vertex and boundary location definitions from the remaining three files.
• In the main window, select File > Model Title...
• In the Title text box type:
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.
Cell Type Check and, if necessary, specify appropriate material property indices, colours and
Properties names for cell types 2 and 1, representing the solid fin and its surrounding fluid,
respectively:
• In the main window, click the button to open the Cell Editor
• In the Cell Editor, select row # 1 in the scroll list
• Type AIR in the Name box
• Accept the current settings for all other parameters and click Apply
• Select row # 2 and change the following parameters:
Material # — 2 (the solid properties index)
Color Index — 4
Name — AL
• Click Apply and then Close
• Click Replot to confirm the change (the solid cell colour will change)
Thermal and Turn on the solid-fluid heat transfer option. This also has the effect of switching on
Gravity the temperature solver inside the solid fin:
Options
• In the pro-STAR Model Guide, select the Thermophysical Models and
Properties folder and then open the Thermal Options panel
• Enable the Solid-Fluid Heat Transfer option
• 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:
• Open the Gravity panel
• Type 9.81 in the Acceleration box to specify the gravitational acceleration
value to be used for this problem
• Specify the correct direction of gravity in the model by typing -1 in the Y box
and 0 in the Z box
• Click Apply
Fluid Check the material properties of the model’s fluid substance:
Properties
• In the Thermophysical Models and Properties folder, select the Liquids and
Gases folder
• Open the Molecular Properties (Fluids) panel and check that the material
number selected for the Material # option 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) from the Density menu and click Apply.
Default values are accepted for the remaining properties. Assuming the flow is
turbulent, select the k-ε model:
• Open the Turbulence Models panel
• Select On for the Turbulence option and then choose
K-Epsilon/High Reynolds Number from the Turbulence menu
• Click Apply
Choose cell number 927 as the monitoring location for the fluid cells:
• Open the Monitoring and Reference Data (Fluids) panel
• Type 927 in the Monitoring Cell Number box
• Click Apply
Specify a datum location and density for the purpose of calculating buoyancy
effects:
• Open the Buoyancy panel
• Enable the Buoyancy option
• Select option Enter Coordinates from the Location menu
• Ensure that coordinates 0, 0, 0 are entered in the X, Y, and Z boxes
• Check that option Specify is selected from the Density menu
• Type 1.27588 in the Density box for the required datum density. As noted in
the pro-STAR Model 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
Solid Define properties for the solid cells making up the fin (i.e., for material property
Properties reference no. 2):
• Select the Solids sub-folder within the Thermophysical Models and
Properties folder
• Open the Material Properties (Solids) panel and select Material # 2. This will
display properties for the default solid material.
• Change the property values to those for aluminium as follows:
Material — AL
Density — 2800
Conductivity — 180
Specific Heat — 880
• Click Apply
• Select the Monitoring and Reference Data (Solids) panel and choose a
monitoring location within the solid by typing 924 in the Monitoring Cell
Number box
• Click Apply
Checks Check the boundaries by listing their properties and then displaying them
graphically:
• 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 the Display Boundaries option by clicking the button
• 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.
Boundary You can now impose the required thermal boundary conditions. Define fixed
Conditions temperature boundaries at 293 K for the container’s side walls, as follows:
• Select the Define Boundaries folder and open the Define Boundary Regions
panel
• Select region no. 1 in the scroll list
• Select option Fixed in the Wall Heat menu
• Type the required fixed wall temperature, 293, in the Temperature box
• Accept the default values for the remaining parameters and click Apply
Define a fixed temperature boundary at 343 K for the base of the fin:
• Select region no. 2 in the scroll list
• Select option Fixed in the Wall Heat menu
• Type the required fixed wall temperature, 343, in the Temperature box
• Accept the default values for the remaining parameters and click Apply
Algorithm menu
• Click Apply
Given the strong effect of temperature and density variations on flow development,
it is important to apply some under-relaxation to these variables. This helps in
avoiding potential numerical stability problems.
• Go to the Solver Parameters tab
• Enter a new under-relaxation factor, 0.95, in the Density box under the Fluid
Properties section (note that this value must equal that for temperature to
ensure that the calculated magnitudes for the two variables are in step)
• Click Apply
Choose the MARS differencing scheme for some of the variables to be solved. This
gives an optimum combination of stability and accuracy.
• Go to the Differencing Schemes tab
• Select MARS for the Differencing Scheme options for momentum and
temperature Flow Variables. The turbulence Differencing Scheme option
should be left at the default setting (UD). Accept the default value of 0.5 for
the Blending Factor.
• Click Apply
Choose the type of data output and dumping frequency. For post-processing
purposes, it is generally useful to save additional flow and thermal wall data (in this
case, heat transfer coefficients at the walls):
• Open the Analysis Output panel
• Accept the default option (enabled) for the Write Solution File option and
type 20 in the Output Frequency box
• In the Additional Output Data section, select item Heat Transfer Coef. from
the scroll list
• Enable the Post option
• Repeat the above for item Heat Flux
• Click Apply
Run Time Set the maximum number of iterations to 300:
Controls
• Select the Analysis Preparation folder and then open the Run Time Controls
panel
• Type 300 in the Maximum Number of Iterations box
• Click Apply
Final The pre-processing task is now complete. If you wish to terminate the session at this
Operations 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
pro-STAR, saving all model data as shown below.
Alternatively, you may continue with the CFD analysis, using the pro-STAR
Model Guide facilities for running STAR interactively. This process is described in
the next section.
• In the main pro-STAR panel, select File > Save Geometry...
• In the Save Geometry File dialog, enter 0.01 in the Geometry Scale Factor
box
• Click Apply and then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
• Select File > Quit > Save & Quit
CFD Analysis
To perform the analysis interactively, proceed as follows:
• In the main pro-STAR panel, select File > Save Model
• In the Analysis Preparation folder, open the Run Analysis Interactively panel
• Check that option other has been selected for the model units; 0.01 should
appear inside the Scale Factor box
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.ccmp:
• In the pro-STAR Model Guide select the Post-Processing folder
• Open the Load Data panel
• Click Open Post file
Post- First look at the velocity field in the fluid surrounding the fin:
processing
• In the main window, select C > New > Fluid
• Click Cplot
• Deselect the Display Boundaries option button,
• Change the viewpoint to (0, 0, 1) by selecting View > Axis > +Z
• In the Load Data panel, go to the Data tab
• Select item Velocity Components UV from the Vector Data list and then
click Get Data to load the velocity field
• Go to the Create Plots panel, where the plot style will be defined
• In the 3-D Surface tab, check that Option Vector is selected and then choose
Examine the temperature profiles, first in the surrounding fluid and then in the solid
fin:
• Go to the Load Data panel
• Select item Temperature from the Scalar Data list
• Click Get Data
• In the Create Plots panel, choose Option Contour (filled)
• Click Plot to Screen to display Figure T10.1-5
• In the main window, select C > New > Solid
• Go to the Load Data panel
• In the Data tab, select Data Type Cell
• Select item Temperature in the Scalar Data list and then click Get Data
• To plot a smooth distribution ignoring boundary values, the cell data are
averaged by selecting Post > Caverage > Cset in the main window
• Click Cplot to display Figure T10.1-6
Collect the shells created by pro-STAR at the walls (i.e., cells of type 5) and plot:
• Tools > Cell...
• Select cell type 5 in the Cell Tool scroll list
• In the main window, select C > New > Type Current
• Select Post > Caverage > Cset
• Set the viewpoint to (1, 1, 1) by selecting View > Isometric > 1, 1, 1
• Switch off the edge and mesh plotting facilities by clicking the Display Edges
and Display Mesh Lines buttons
• Select Plot > Wplot to display Figure T10.1-7
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 files for the
non-radiating case (fin_bu.ccmp and fin_bu.ccmg) 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.
• In the main window, select File > Model Title...
• In the Title text box, change the title to:
Solid-fluid interface
This region is currently assigned to the default wall region (no. 0). You therefore
need to define a new boundary region for it, extending round the entire fin
perimeter.
• In the main window, ensure the Display Boundaries option is turned off
• Select C > New > Solid
• Click Cplot to display just the solid cells
• In the pro-STAR Model Guide, 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
• In the main window, change the viewpoint to (1, 0, 0) by selecting View >
Axis > +X
• In the Regions tab, ensure region no. 4 is highlighted in the scroll list, select
Create by Picking a Zone from the Action List and click Apply
• Draw a closed polygon around the visible mesh
• In the main window, change the viewpoint to (-1, 0, 0) by selecting View >
Axis > -X
• In the Regions tab, ensure region no. 4 is highlighted in the scroll list, click
Apply 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, ensure region no. 4 is highlighted in the scroll list, click Apply in the
Regions tab and draw a closed polygon around the visible mesh
The top and bottom adiabatic walls also need to be assigned explicitly to a separate
region, no. 5. This is because radiation patches (to be defined later) cannot be
applied to boundaries assigned to the default wall region 0.
Top wall
• In the main window, select C > All
• Click Cplot
• In the Create Boundaries panel, select region no. 5 in the scroll list
• Check that option Wall is selected for the Type
• Enter a region name (T-B_wall) in the Name box
• Click Define
• Ensure that region no. 5 is selected in the scroll list and Create by Picking a
Zone is selected in the Action List and then click Apply
• Draw a closed polygon around the visible mesh
Bottom wall
• 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 Cplot to display only cell faces belonging to the bottom wall
• In the Regions tab, ensure that region no. 5 is selected in the scroll list, click
Apply and then draw a closed polygon around the visible mesh
Thermal Switch radiation on, choosing the Discrete Transfer analysis method (DTRM). For
Options this case, use the default number of beams per patch (100) and neglect radiative
effects from the intervening gas:
• Select folder Thermophysical Models and Properties and then open the
Thermal Options panel
• In the Radiation section of the panel, select option Discrete Transfer -
Internal VF Calc
• Enter 100 in the Beams per patch box
• Accept the displayed default settings in the rest of the panel and click Apply
For the chosen calculation method, surface-to-surface radiation can be tracked only
through cell types that are explicitly defined as participating in radiative heat
transfer. In this case, we assume that the fin is opaque and hence we only track
radiation through the fluid:
• Open the Cell Editor using the button on the main window
• Select row # 1 in the scroll list
• Select On from the Radiation menu
• Click Apply
• Close the Cell Editor
Boundary We must revisit the boundary conditions for all wall regions participating in
Conditions 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 Boundaries 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
• Reflectivity box — 0.5
• Accept the current values for the remaining parameters and click Apply
The boundary conditions for the solid-fluid interface should correspond to a
conducting wall with emissivity and reflectivity of 0.2 and 0.8, respectively.
• Select region no. 4 in the scroll list
• Select option Conduction in the Wall Heat menu. This is essential for
solid-fluid interfaces that are not part of region 0.
• Specify the required radiation properties:
• Emissivity box — 0.2
• Reflectivity box — 0.8
• Accept the current values for the remaining parameters and click Apply
Similarly, the top and bottom walls will be adiabatic radiative walls with emissivity
and reflectivity of 0.5:
• Select region no. 5 in the scroll list
• Specify the required radiation properties:
• Emissivity box — 0.5
Final It is possible to restart the analysis from the previous non-radiating solution, but
Operations since new boundaries have been added we need to use the ‘initial field’ restart
option.
• In the pro-STAR Model Guide, select the Analysis Preparation folder and
open the Restart panel
• Choose Restart File Option Initial Field
• Click the browser button next to the Restart File box, select file
fin_bu.ccmp from the browser dialog and then click Open
• Check that the Initial Field Restart option is set to New Boundary Types
• Click Apply
The pre-processing task is now complete. If you wish to terminate the session at this
stage, save all model data, write the geometry and problem files and exit from
pro-STAR, as shown below. Alternatively, you may continue with the CFD
analysis, using the pro-STAR Model Guide facilities for running STAR
interactively. This process is described in the next section.
• In the main pro-STAR panel, select File > Save Geometry...
• In the Save Geometry File dialog, check that 0.01 is entered in the
Geometry Scale Factor box
• Click Apply and then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
• Select File > Quit > Save & Quit
CFD Analysis
To perform the analysis interactively, proceed as follows:
• In the main pro-STAR panel, select File > Save Model
• In the Analysis Preparation folder, open the Run Analysis Interactively panel
• Accept the default Scale Factor of 0.01
• Select the Double Precision option
• Select Yes for the Write Geometry File option
• Click the Start button
Note that the starting iteration number is shown as no. 1 despite the fact that this is
a restart run. This is because we have chosen the initial field restart option.
The analysis will start with the calculation of view factors which are then stored
in file fin_ra.vfs. These can be used again in future runs as long as the
boundaries and patch definitions have not changed. If, however, such changes have
been made, you can instruct STAR to re-calculate the view factors through the
-noskip option.
Post-Processing
Preliminaries Check that both the solution file from this tutorial (fin_ra.ccmp) and the one
from the previous tutorial (fin_bu.ccmp) are present in your working directory.
Comparisons will be drawn between the two.
Post- First look at the temperature distribution in the fluid:
processing
• In the pro-STAR Model Guide, select the Post-Processing folder and open the
Load Data panel
• In the File(s) tab, click Open Post file
• In the main window, select Plot > Cell Display > Boundary Patches to
deselect the patch cell plot display option
• Change the viewpoint to (0, 0, 1) by selecting View > Axis > +Z
• Select C > New > Fluid
• Click Cplot
• 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 go to the Create Plots panel
• In the 3-D Surface tab, choose plot options Contour (filled) and Edge
• Click Plot to Screen to display Figure T10.2-3
To compare the temperatures of the radiation and no-radiation cases, first load the
no-radiation solution file:
• Go to the Load Data panel
• In the Load Data panel, select the File(s) tab
• Use the built-in browser to select file fin_bu.ccmp, whose name should
then appear inside the Post File box
• Click Open Post file
Re-load the results of the radiation case by reading the calculated cell temperatures
stored in file fin_ra.ccmp and then store them in post register 1:
• In the File(s) tab, use the built-in browser to select file fin_ra.ccmp,
whose name should appear inside the Post File box
• Click Open Post file
• In the Post Register Operations dialog, select Register 1 from the registers
menu
• Click Apply
10-22 Version 4.06
Tutorial 10.2 SURFACE-TO-SURFACE RADIATION Post-Processing
Final Operations
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 Multi-register > Subtract
• For the Operation select Register 4 = Register 1 - Register 2
• Click Apply
• Close the Post Register Operations dialog
Figure T10.2-4 Contour plot of temperature difference caused by use of radiation model
It can be seen that the introduction of the radiation model has a significant effect on
the fluid temperature distribution across the domain.
The temperature differences in the solid region can be examined in a similar way.
However, they are much less significant, with the variation less than 0.1% of the
no-radiation temperature value.
Final Terminate the session.
Operations
• File > Quit > Quit, Nosave
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 files for the
non-radiating case (fin_bu.ccmp and fin_bu.ccmg) to the current
directory
Start up the pro-STAR GUI interface:
• Type prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Accept the default case name (fin_dorm) displayed in the Case Name text
box
• Select the Resume From Existing .mdl File? option
• Deselect the Append to Previous .echo File? option
• Click Continue
This will read all data contained in file fin_dorm.mdl and will set up the model
as it was at the end of Tutorial 10.1.
• In the main window, select File > Model Title...
• In the Title text box, change the title to:
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:
• Open the Cell Editor using the button on the main window
• Select row # 1 (the Fluid cell type) in the scroll list
• Select On from the Radiation menu
• Click Apply
• Select row # 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 Editor
Specify that both fluid and solid regions will participate in the radiative heat
exchange:
• Go to the pro-STAR Model Guide 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-6 of the CCM User Guide).
• In this panel, note that option Solid-Fluid Heat Transfer is already selected
• Click Apply
Boundary You must now revisit the boundary conditions of all wall regions in order to define
Conditions their emissivity, reflectivity and transmissivity.
• Change the Wall Heat option to Conduction. This is essential for solid-fluid
interfaces that are not part of region 0.
• Specify appropriate radiation properties:
Emissivity box — 0
Reflectivity box — 0
Transmissivity box — 1, i.e., the interface is totally transparent
• Accept the current values for the remaining parameters and click Apply
Note that the above values imply that the absorptivity of the interface (1 -
transmissivity - reflectivity = 0) is consistent with the absorptivity defined earlier
for the new solid material.
CFD Analysis
To perform the analysis interactively, proceed as follows:
• In the main pro-STAR panel, select File > Save Model
• In the Analysis Preparation folder, open the Run Analysis Interactively panel
• Accept the default Scale Factor of 0.01
• Select the Double Precision option
• Select Yes for the Write Geometry File option
• Click the Start button
Note that the starting iteration number is shown as no. 1 despite the fact that this is
a restart run. This is due to the initial field restart options specified.
Post-Processing
Preliminaries Read in the results of the analysis from file fin_dorm.ccmp:
• In the pro-STAR Model Guide select the Post-Processing folder
• Open the Load Data panel
• Click Open Post file
Post- First look at the velocity field in the fluid surrounding the fin:
processing
• In the main window, select C > New > Fluid
• Click Cplot
• Change the viewpoint to (0, 0, 1) by selecting View > Axis > +Z
• In the Load Data panel, go to the Data tab
• Select item Velocity Components UV option from the Vector Data list and
then click Get Data to load the velocity field
• Go to the Create Plots panel where the plot style will be defined
• In the 3-D Surface tab, check that Option Vector is selected and then choose
Edge from the Edge/Mesh menu
• Click Plot to Screen to display Figure T10.3-1
Examine the temperature profiles, both in the surrounding fluid and in the solid fin:
• Go to the Load Data panel
• Select Cell & Wall/Bound (Smooth) from the Data Type menu
• Select item Temperature from the Scalar Data list
• Click Get Data and then go to the Create Plots panel
• In the 3-D Surface panel, choose Option Contour (filled)
• Click Plot to Screen to display Figure T10.3-2
• In the main window, select C > New > Solid
• Go to the Load Data panel
• In the Data tab, select Data Type Cell
• Select On and Cset for the Smooth option
• Select item Temperature from the Scalar Data list
• Click Get Data
• Click Cplot to display Figure T10.3-3
5
30 m/s
30
27
7
30
201
The two objects travel at 30 m/s in opposite directions. The fluid within the solution
domain is air (at atmospheric pressure of 1 bar and temperature of 293 K) and has
the following physical properties:
Pre-Processing
Preliminaries Create a sub-directory for the tutorial called tut11-1. The mesh for this problem
has already been created in the Meshing Tutorials volume (Tutorial 1.3) and the
relevant cell, vertex, boundary and problem setup files are already available (files
This will read default problem settings from file obj.inp plus the problem’s cell,
vertex and boundary location definitions from the remaining three files.
• In the main window, select File > Model Title...
• In the Title text box type:
Verify that the correct data have been read in by selecting all cells and plotting the
mesh in ‘Hidden Surface’ mode:
• In the main window, select C > All
• Click Cplot
The default material properties are those for air and therefore do not need to be
changed. Check the current turbulence settings:
• Open the Turbulence Models panel
The setting in this panel will be Off, as expected. Therefore, you need to select an
option that switches on one of the turbulence models supplied by STAR. For this
tutorial, the standard k-ε model will be used.
• Select On to turn on the Turbulence option
• Select option k-Epsilon/High Reynolds Number from the Model menu
• Click Apply
The purpose of the latter is to provide a boundary condition if cells on either side of
the interface become disconnected; the alternate boundary region must be of ‘wall’
or ‘inlet’ type. In this tutorial, the alternate boundary region number is not important
so the system default may be used.
• Select the Define Boundaries folder and then open the Define Boundary
Regions panel
• Select region no. 1 in the boundary regions scroll list and select option Attach
in the Region Type menu
• Check that the Coordinate System is set to 1 and the Alternate Region is 0
• Click Apply
• Select region no. 2 in the boundary regions scroll list and select option Attach
in the Region Type menu
• Click Apply
• Select region no. 3 in the boundary regions scroll list and select option Attach
in the Region Type menu
• Click Apply
• Select region no. 4 in the boundary regions scroll list and select option Attach
in the Region Type menu
• Click Apply
The other boundary conditions are defined below. Note that, for the pressure
boundary, the turbulence intensity is taken as 1% of the object speed, and the mixing
length as one-tenth of the tunnel width.
• Select region no. 5 in the boundary regions scroll list and select option
Pressure in the Region Type menu
• Select Static from the Pressure Option menu
• Select TI/Length from the Turbulence Switch menu
• Type 0.3 in the Turb. Intensity box
• Type 0.03 in the Length box
• Click Apply
• Select region no. 6 in the boundary regions scroll list and select option Wall
• Select region no. 7 in the boundary regions scroll list and select option Wall
in the Region Type menu
• Set the wall’s U-velocity component to - 30 m/s by typing -30 in the Wall U
box
• Click Apply
• Select region no. 8 in the boundary regions scroll list and select option
Symplane in the Region Type menu
• Click Apply
• In the main window, select File > Save Model
Analysis Check the solution variables. Since the flow is two dimensional, it is sensible to
Controls switch off the calculation of the W-velocity component as the run time will be
reduced.
• Go to the Analysis Controls folder
• Open the Primary Variables panel and check the settings of the Equation
Status tab
• Deselect item W-Momentum to exclude it from the calculations
• Click Apply
Choose the U and V velocity components, pressure and turbulence kinetic energy
as the flow variables to write to the transient post-processing file:
• Open the Analysis Output panel
• Select the Transient tab
• Specify the frequency of writing data to the transient post file by typing 0.001
in the Output interval box. As discussed below, this is equivalent to output at
every fourth time step
• As can be seen in the scroll list, velocity and pressure are already selected by
default. Select Turb Kinetic Energy and enable the Post option to include
this item in the list of data to be output
• Click Apply
Run Time In this tutorial, the mesh is made to slide in an arbitrary manner. Therefore, the time
Controls step chosen can be any reasonable value, independent of the mesh geometry. Here,
we shall use a value of ∆t = 0.00025, so that four time steps are needed to move the
mesh by a (relative) distance of 3 cm, i.e., equal to the cell length in the x-direction.
This movement is illustrated in Figure T11.1-2. By the end of the analysis, the
objects will have moved for a total of 0.04 seconds which is equivalent to a distance
of 120 cm.
3 cm
Stationary mesh
Interface
Mesh attached to
object A
(a) (b)
(c) (d)
(e)
• Select folder Analysis Preparation and open the Run Time Controls panel
• Set the analysis to Run for a Time of 0.04 seconds
• Click Apply
• Type 0.00025 in the Time step for period box
• Click Set
Event Since this tutorial uses a sliding mesh, the moving mesh and ‘event’ options need to
Settings be employed.
• Before specifying events, it is necessary to resize pro-STAR by issuing the
following commands in the I/O window:
Moving mesh operations are grouped under the Events Module and are presently
available only in command form.
• Turn on the events option and check the Events Module status by typing:
MVGR,ON,EVENT,PROSTAR
EVEN
STAT
Moving mesh operations are defined in terms of event steps that are stored in a
special file.
• Initialise this file as follows:
EVFILE INIT
The above initialises a new event history file (.evn file). The actual mesh-moving
operations, and the time at which they are executed, will now be specified through
the event steps.
Mesh Let us first set up events that remove all the extra cells created initially, i.e., those
Manipulation cells that will be restored progressively during the solution. As discussed in Chapter
Events 13 of the CCM User Guide, the main features of cell removal and addition
operations are:
1. A cell is removed by collapsing intervening faces between two opposite cell
sides in a given direction. The user needs to ensure that the rest of the mesh
geometry is re-arranged so as to take up the space vacated by the removed
cells.
2. Entire layers of cells are removed or added. This is necessary in this tutorial
but does not represent a fundamental restriction of STAR-CD.
3. Two neighbouring cell layers cannot be removed or added at the same time.
However, it is permissible to remove or add any number of cell layers
provided none of them are neighbours.
4. Cell addition is achieved by restoring removed cells. This means that cells to
be added must have been previously removed.
5. Cell layers must be restored in the reverse order in which they were removed
(i.e., the first cell layer added must be the last cell layer removed).
6. Cell layers can be removed at time t < 0 so that they can be progressively
restored during the course of the solution.
An event is set up through command EVSTEP which defines ‘event time’. There
are several ways of specifying event time — here it will be defined as the elapsed
time. The extra cell layers are removed using negative event times whose exact time
values are of no importance.
• Therefore, for the first cell removal event step, type:
from the lower mesh block, as illustrated in Figure T11.1-3. Note that it is
permissible for the layers to be located in different places. Also note that the first
cell layer removed in each block will also be the last layer to be added back to the
solution domain.
43 (last) 2 1 (first)
(first) 1 2 43 (last)
Cell layer removal is performed using command EDCELL. The target cell layer set
can be specified by cell range, cell type or cell group. In this tutorial, it is convenient
to use the cell range option since the initial mesh creation operation has generated
regular cell numbering. The range can be examined by turning on cell numbering
(command NUMBER) and zooming in on the relevant cell layers (command ZOOM).
• Following that, remove the cells by:
EDCE ADD CRAN 1 14 1 Include all cells within the range in the
deletion list
EDCE ADD CRAN 3061 3074 1
• The removed cells can be listed using command ECLIST:
Note that it is possible to modify the list of cells to be removed by using options
CLEAR (clear all cells marked for removal) or DELETE (delete the selected cells
from the removals list) in command EDCELL.
• The first event step is now complete and can be saved via command EVSAVE:
EVSAVE 1
• Set up the remaining 42 initial cell removal events by making use of
pro-STAR’s ‘loop’ facility, as follows:
cgrid.cgrd
!
! pro-STAR commands to change mesh geometry
!
! Comments allowed in lines starting with a “!”
!
! Spaces must inserted either side of arithmetic operators
!
! I000 = total number of cell layers added to mesh block 1
! I001 = total number of cell layers added to mesh block 2
!
*SET DXD TIME * 30. * 100.
EVFILE CONN obj_sli.evn
EVFLAG PREP OFF ALL
EVLOAD UPTO EVENT EVEX
CSET NEWS CRAN 14,602,14
CSET SUBS ACTIVE
*GET I000 NCSET
CSET NEWS CRAN 2473,3061,14
CSET SUBS ACTIVE
*GET I001 NCSET
VREAD obj.vrt,,,,CODE
*SET IADL I000 - 1 * 15
*SET IADU I001 - 1 * 15
CSET NEWS TYPE 1
VSET NEWS CSET
VSET SUBS GRAN 0.01 200.99
VSET ADD VRAN,660 - IADL, 660, 15
RP15,,,-1 -1
VSET ADD VRAN,2325 - IADL, 2325, 15
RP15,,,-1 -1
VGEN 2 0 VSET,,,DXD
CSET NEWS TYPE 3
VSET NEWS CSET
VSET SUBS GRAN 0.01 200.99
VSET ADD VRAN,4744,4744 + IADU,15
RP15,,,1 1
VSET ADD VRAN,6409,6409 + IADU,15
RP15,,,1 1
VGEN 2 0 VSET,,,-1 * DXD
VSET,NEWS,GRAN,-130.,-1.
VMOD,VSET,0.,F,F
VSET,NEWS,GRAN,202.,332.
VMOD,VSET,201.,F,F
Sliding To set up an ASI case for this problem, you need to define two separate sliding
Events events, one for object A and another for object B, together with the normal events
required for moving mesh operations. The sliding events will be considered first.
11-10 Version 4.06
Tutorial 11.1 FLOW AROUND TWO OPPOSITELY-MOVING OBJECTS Pre-Processing
Grid-change Events
EVSLIDE 198
This defines event no. 198 as the first sliding event; it will be referenced later by
those events that employ time explicitly. pro-STAR then reminds you to specify the
master and slave sliding boundary face lists, plus offsets used to match the two sets.
In this model, the master cells in the lower sliding interface (i.e., interface I in
Figure T1.3-2 of Meshing Tutorial 1.3) are chosen to be those in block 1 (region 1).
The slave cells are then those in block 3 (region 2).
• Provide the necessary definitions as follows:
EOSLIDE 1 0 0
• The final command needed to set up event 198, EPSLIDE, turns on the
arbitrary sliding interface’s partial boundary option. This is necessary
because, at some time steps, cell faces at the ends of the arbitrary sliding
interface will only be partly matched to faces on the other side of the
interface. This is illustrated by parts (b), (c) and (d) of Figure T11.1-2.
EPSLIDE ON
• The event can now be saved:
EVSAVE 198
EVSLIDE 199
EMSLIDE ADD REGI 3
ESSLIDE ADD REGI 4
EOSLIDE 1 0 0
EPSLIDE ON
EVSAVE 199
Again, this event will be referenced at a later stage by those events that employ time
explicitly. This completes the ASI events required for the case.
Grid-change The grid changing events can now be set up. The first 43 events defined earlier were
Events concerned with mesh layer removal prior to the actual start of the simulation, i.e.,
they occurred at t < 0. The next event, number 44, is now set up for t = 0 as follows:
Version 4.06 11-11
Tutorial 11.1 FLOW AROUND TWO OPPOSITELY-MOVING OBJECTS Pre-Processing
Layer Removal /Addition Events
pro-STAR will respond by displaying all commands that change the mesh geometry
on the screen. These commands will remain active for the entire run, i.e. for t ≥ 0.
If it is necessary to stop or change them, another set of commands needs to be
supplied at the appropriate event step.
• Before event no. 44 is saved, a reference to the arbitrary sliding events (nos.
198 and 199) defined earlier needs to be created, since these contain all
information on the sliding boundary sets:
EVSAVE 44
Referring to Figure T11.1-2 on page 11-6, it can be seen that both these operations
should have occurred by the time the mesh slides from position (a) to position (e).
However, given that this motion takes place over four time steps, it is clear that a
judgement needs to be made on the precise instant when the layer addition/removal
takes place. The strategy adopted here is to:
1. Add a layer at position (b)
2. Remove a layer from the opposite end of the block at position (e)
Starting from the beginning of the simulation, this means that the first layer addition
should occur at t = 0.00025 and the first layer removal at time t = 0.001. Thus,
• The next event in the series (no. 45) is defined as follows:
In this event, two cell layers need to be added as shown in Figure T11.1-4. This is
done by command EACELL, which also specifies the cell range involved.
• Type
EVSA 45
remove add
add remove
Figure T11.1-4 Cell layers to be added and removed in events 45 and 46 respectively
In the next event (no. 46), two cell layers need to be removed. This can only be done
when the mesh reaches position (e), i.e., at time t = 0.001.
• Therefore, type
EDDI LOCAL 1 1
• Cell layer removal is done in the same way as for events 1 to 43:
EVSAVE 46
*SET EVNU 47 2
*SET ETIM 0.00125 0.001
*SET IA1 575 -14
*SET IA2 588 -14
*SET IA3 2487 14
*SET IA4 2500 14
*DEFI
EVSTEP EVNU TIME ETIM
EACELL ADD CRAN IA1 IA2 1
*SET EVNU 48 2
*SET ETIM 0.0020 0.001
*SET ID1 1443 -14
*SET ID2 1456 -14
*SET ID3 1619 14
*SET ID4 1632 14
*DEFI
EVSTEP EVNU TIME ETIM
EDDI LOCAL 1 1
EDCE ADD CRAN ID1 ID2 1
EDCE ADD CRAN ID3 ID4 1
EVSA EVNU
*END
*LOOP 1 41 1
Note that these command loops specify 43 cell layer removal/addition events. Only
the first 40 of these will be used because the run time is 0.04 s. This completes the
events specification for the model.
Final Write the geometry and problem files (the events file will be automatically saved
Operations when writing the geometry file) and exit:
• In the main pro-STAR panel, select File > Save Geometry...
• In the Save Geometry File dialog, enter 0.01 in the Geometry Scale Factor
box
• Click Apply and then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
• Select File > Quit > Save & Quit
CFD Analysis
Start the CFD analysis by typing
star
in your STAR-CD session window. The analysis will terminate after 160 time steps.
Post-Processing
Preliminaries Start up pro-STAR and accept the Case Name, obj_sl, in the text box of the
introductory panel. Accept the rest of the default settings and click Continue. The
model details will be displayed in the I/O window. Ensure the pro-STAR Model
Guide is open next to the main pro-STAR window.
Before examining the results, it is necessary to connect the events file to load and
execute events.
• Enter the following command in the I/O window:
EVFI CONN
Since the mesh changes with time, the vertex coordinates and the velocity vector
components have to be read in before plotting:
• Go to the Data tab, select item Velocity Components UV from the Vector
Data list and then click Get Data
• Go to the Create Plots panel
• Go to the Vectors tab and type 0.5 in the Scale Factor box
• Click Apply
• Go to the Options tab
• Select option User from the Range menu and then enter 0 and 30 in the From
and To boxes respectively
• Click Apply
• Go to the Section/Clipped tab and check that Option Vector and Edge/Mesh
None are selected
• In the Single Plane Plot section, type 0.5 in the Point Z coordinate box
• Click Apply
• Click Plot to Screen and Cplot to display Figure T11.1-5
• Enter the following command loop to display velocity vectors for all time
steps saved on the transient post data file:
*SET ITT 4 4
*DEFI
STORE ITER ITT
GETC U V NONE
CSET ALL
CPLOT
*END
*LOOP 1 39
As with the velocity vectors, the pressure contours for all time steps can be
displayed using a command loop:
• Go to the Options tab
• Select option User from the Range menu and then enter -1200 and 1000 in the
From and To boxes respectively and click Apply
• Enter the following commands in the I/O window:
*SET ITT 4 4
*DEFI
STORE ITER ITT
GETV NONE P
CSET ALL
CPLOT
*END
*LOOP 1 39
Final It is essential not to save the file obj_sl.mdl when quitting pro-STAR as the
Operations current geometry corresponds to the status of the mesh at time step 160:
• Select File > Quit > Quit, Nosave
The mesh geometry and boundary conditions are in fact identical to those used in
Tutorial 7.1; the difference in this case being that a transient moving mesh approach
is employed instead of the steady-state multiple rotating reference frames method.
This will enable you to examine the full periodic solution to the problem rather than
just a time-averaged result.
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 model’s 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.
Pre-Processing
Preliminaries Create a sub-directory for the tutorial called tut11-2. The mesh for this case is
supplied as three separate Nastran files, inlet.nas, fan.nas and body.nas,
corresponding to the three fan regions mentioned earlier. Therefore, before starting
the tutorial, make sure that the supplied files are copied into your current directory.
• Start up pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Enter the case name (say, fan_sli) in the Case Name text box
• Click Continue
• In the main window, select File > Model Title...
• In the Title text box type:
It can be seen that there is only one entry in the default cell table (no. 1),
corresponding to a fluid cell type. If the cell table entries do not correspond to the
cell types defined within the Nastran files, a conflict of cell types may arise. In this
case, however, the files were saved with the following pre-assigned cell types:
1. Fluid cells within the rotating fan body
As there is no potential cell type conflict (cell type no. 1 is a fluid cell type in both
the pro-STAR and Nastran files), the cell table entries do not need to be changed or
deleted and the Nastran files can be imported as is:
• In the pro-STAR Model Guide, select the 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 browser button to select file inlet.nas for the Bulk Data File
• Click Apply
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:
• Enable the Append 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 browser button to select file fan.nas for Bulk Data File
• Click Apply
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 browser button to select file body.nas for Bulk Data File
• Click Apply
This completes the import process. You may now inspect the mesh as follows:
• In the main pro-STAR window, select C > All
• Change the mesh orientation by selecting Plot > Up Axis > Z
• Change to an isometric viewing direction by selecting View > Isometric >
1,1,1
• Click Cplot
• Select cell plot type Quick Hidden Line; this will allow you to see the fan
blades inside the mesh, as shown in Figure T11.2-3
Cell Type The cells in each part of the mesh must now be correctly defined and named so that
Properties each fan component can be clearly distinguished from the others. To determine
what kind of cells have been created by the import process:
• Select option Utility > Count > Cells
As mentioned in the “Mesh Import” section, cells in the rotating fan body have a
cell table index of 1. Cells in the stationary body domain have cell table index 2 and
those in the inlet pipe index 4. Cells with index 3 are interpreted as baffles
representing the fan blades among the rotating cells.
The desired modifications to the cell type parameters may be done via the cell
table editor, as follows:
• In the main pro-STAR window, click to open the Cell Editor dialog
• Check that table entry #1 is selected in the scroll list
• Enter ROTATING_FAN in the Name box
• Click Apply
Next, change the settings for cell type no. 2, corresponding to the stationary body
cells:
• Select table entry #2 in the scroll list
• Check that the Cell Type is set to Fluid
• Change the Color Index to 3 (green)
• Enter BODY in the Name box
• Click Apply
• Select a Hidden Surface plot type from the main pro-STAR window
• Select C > New > Type
• Click on the face of any rotating (red) cell using the screen cursor
• Change the view by choosing View > Isometric > 1,1,-1
• Click Cplot
Next, define the curved surface of the displayed fan-body cell block as an
attachment boundary:
• In the pro-STAR Model Guide, select the Locate Boundaries folder and then
open the Create Boundaries panel
• Select region 3 in the Boundary Regions scroll list
• Select the Attach option for region Type
• Click Define
• Ensure region 3 is selected in the Boundary Regions scroll list, select Create
by Picking Surface based on Edges from the Action List and then click
Apply
• Choose a vertex on the side of the fan body, as shown in Figure T11.2-5:
Figure T11.2-5 Selecting a starting vertex for master attachment boundary definition
This will create 720 ‘master’ attachment boundaries on the outside curved surface
of the fan-body cell block.
In this particular example, the section of the core shaft lying within the rotating
region is considered as spinning with the fan, whereas the section lying within the
inlet region is stationary. Therefore, a separate wall boundary region needs to be
created for the rotating section in order to assign an angular velocity to it:
• In the pro-STAR Model Guide, select region 7 from the Boundary Regions
scroll list
• Select Wall for region Type
• Click Define
• Ensure region 7 is selected in the Boundary Regions scroll list and plot type is
Hidden Surface
• Select Create by Picking Surface based on Vset from the Action List and
click Apply
• Choose a vertex inside the shaft as shown in Figure T11.2-6
A total of 720 wall boundaries should be created. Before adding the attachment
boundaries to the upper surface of the block, you need to redefine the vertex set used
above. The new set should contain additional vertices whose effect will be to limit
new boundary creation to that part of the upper surface occupied by the attachment
boundaries. The easiest way to do this is to use the VSET command with the
GRANGE (geometric range) option.
• Type the following commands in the I/O window:
VSET,ADD,GRAN,45,49,,,83,85,2
VSET,SUBS,CSET
Working in coordinate system 2, the first command will add all vertices found in the
range 45 — 49 mesh units in the radial direction plus all those found in the range 83
— 85 mesh units in the axial direction. The second command will remove any
vertices that do not belong to the current cell set.
Display the upper surface of the block and define the second set of ‘master’
attachment boundaries along the inner ring. These will correspond to the underside
faces on the inlet pipe:
• Click the Display Vertices button to turn on their display
• Change back to a Quick Hidden Line plot
• Choose View > Isometric > 1,1,1 in the main pro-STAR window
• In the Create Boundaries panel, select region 5 from the Boundary Regions
scroll list
• Select the Attach option for region Type
• Click Define
• Check that region 5 is selected in the Boundary Regions scroll list and
Create by Picking Surface based on Vset is selected in the Action List and
click Apply
• Choose a vertex within the inner annulus of vertices on the upper surface as
shown in Figure T11.2-7
Figure T11.2-7 Selecting a starting vertex for master attachment boundary definition
A total of 576 master attachment boundaries should be created. This completes the
boundary definitions for the rotating fan body.
Stationary body
We can now move on to the stationary body and create ‘slave’ attachment
boundaries that correspond to the fan’s ‘master’ attachment boundaries in region 3.
The pressure outflow boundary should also be defined at the appropriate location.
Select the body cell block as follows:
Inlet Section
We can now move on to the inlet section and apply ‘slave’ attachment boundaries
that correspond to the fan’s ‘master’ attachment boundaries in region 5. The inlet
boundary should also be defined at the appropriate location.
• Choose C > All from the main pro-STAR window
• Display all cells in the model by clicking Cplot
• Select C > New > Type and then click on an inlet (light blue) cell
• Click Cplot to display just the inlet cells
576 inlet boundaries should be created on that surface. Next, define the ‘slave’
attachment boundaries:
• Select View > Isometric > 1,1,-1 from the main pro-STAR window
• In the pro-STAR Model Guide, select region 6 from the Boundary Regions
scroll list
• Select the Attach option for region Type
• Click Define
• Ensure region 6 is selected in the Boundary Regions scroll list, select Create
by Picking Surface based on Vset from the Action List and click Apply
• Choose a vertex on the underside of the displayed block as shown in Figure
T11.2-11
Baffles
The final set of boundaries are added specifically for post-processing purposes.
These are baffle-type boundaries on the spinning baffles and will be used to monitor
force and torque values over time, as explained in a later section of this tutorial.
Isolate the baffles and define the baffle boundary region as follows:
• In the main pro-STAR window, select C > New > Baffle
• Click Cplot
• Clear the boundary set by choosing B > None
• Turn on the Display Boundaries option by clicking the button
• Change the view by selecting View > Isometric > 1,1,1
• In the pro-STAR Model Guide, select region 8 from the Boundary Regions
scroll list
• Select the Baffle option for region Type
• Click Define
• Ensure region 8 is selected in the Boundary Regions scroll list, select Create
by Picking Surface based on Edges from the Action List and click Apply
• Choose a vertex on one of the baffles and check that 60 boundaries have been
created correctly
• Repeat this procedure for each of the remaining 11 baffles by visiting them in
turn in a clockwise or anticlockwise direction
• In the main pro-STAR window, click Replot to verify visually that baffle
boundaries have been allocated to all 12 baffles
• Click Apply
Boundary conditions for the wall region assigned to the spinning shaft is defined
next:
• Select region 7 Wall in the boundary regions scroll list
• Set the Coordinate System value to 2 and enter a value of 2000 in the Omega
box
• Click Apply
Using the Display Boundaries option (by clicking the button in the main
window) enables you to verify the boundary conditions entered above. The
boundary set to be displayed is defined using the B button. 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 boundary region in turn and displaying it.
Analysis Most of the default control parameters are sufficient for the current analysis.
Controls However, changes will be made to produce engineering data output for the baffle
region, and also to define what variables will be written to the transient post data
file.
11-32 Version 4.06
Tutorial 11.2 MOVING-MESH FAN ANALYSIS Pre-Processing
Transient Settings
This will tell STAR to save a history of force and torque values on the baffles at
every time step of the analysis. This information can then be displayed graphically,
as described in the “Post-Processing” section of this tutorial.
The transient data output is specified next. It is important to be aware that
choosing to write all variable values at every time step will generate a large post
data file very quickly. In this tutorial, saving velocity and pressure data every 0.005
s should be sufficient for a useful analysis:
• Open the Analysis Output panel and go to the Transient tab
• Enter an Output interval of 0.005 s
• Note that the velocity and pressure variables are selected by default and then
click Apply
This completes the analysis output set-up. All that remains of the pre-processing
task is to define the time step parameters and the events needed to move the grid.
Transient The choice of time step length is flexible — the only practical constraint being that,
Settings for any given time step, the mesh movement should not be more than one cell length
in the direction of rotation. A suitable time step can be calculated as follows:
MVGRID,ON,EVENT,PROSTAR
MEMORY,MAXEVE,3
The moving mesh events are stored in a special event history file.
• Initialise this file by typing:
EVFILE,INITIALISE
!-File ‘fan_sli.cgrd’
!-Lines beginning with a "!" are comment lines and can be ignored
!-Choose a monitor vertex (to calculate current position)
*SET,VNUM,19385
!-Calculate fan motion in degrees per second
*SET,DPS,2000 * 360 / 60
!-Only activate commands for TIME greater than zero
*IF,TIME,GT,0,THEN
!-Calculate the new angular position for next time step
*SET,TANG,TIME * DPS
!-Find current angular position from monitor vertex
*GET,CPOS,Y,VNUM
!-Calculate the offset angle to move
*SET,TOFF,TANG - CPOS
!-Collect the cells and vertices to move
CSET,NEWS,TYPE,1
CSET,ADD,TYPE,3
VSET,NEWS,CSET
!-Activate coordinate system 2 (cylindrical)
CSYS,2
!-Move the vertex set by TOFF degrees in theta direction
VGEN,2,0,VSET,,,0,TOFF,0
*ENDIF
This method computes the new grid position based on time rather than the previous
grid position. This method avoids cumulative spatial errors being introduced into
the calculations, as would occur if the mesh was simply moved by a fixed angle at
every time step. This is possible because we can make use of a program-defined
parameter called TIME which is the current solution time as specified by STAR.
The diagram below may also be consulted for a better understanding of the fan
grid movement commands:
Vertex 19385
TOFF
M
E
ltat
TI de
E+
TIM
TANG
CPOS
The events themselves can now be defined, starting with a sliding event
• Issue command EVSLIDE to set up a sliding motion between the fan’s
‘master’ attachment boundaries and the stationary body’s ‘slave’ attachment
boundaries:
EVSLIDE,2
EMSLIDE,ADD,REGION,3
ESSLIDE,ADD,REGION,4
A total of 720 boundaries should be included for each region. Next, specify any
coordinate offsets needed to match the two sets of boundaries at the start of the
analysis.
• In this case, it is a value of zero in all directions of coordinate system 2 (i.e.,
no offset is needed):
EOSLIDE,2
EVSAVE,2
Repeat the above operations for the sliding event (no. 3) between the rotating fan
and the stationary inlet domain.
EVSLIDE,3
EMSLIDE,ADD,REGION,5
ESSLIDE,ADD,REGION,6
EOSLIDE,2
EVSAVE,3
This time, a total of 576 boundaries should be included for each participating
region. Note that the numbers chosen (i.e., 2 & 3) for the sliding events are arbitrary
and have no time value associated with them.
This completes the sliding event definitions. You can now set up the actual time
event that reads the ‘change grid’ command file and activates the sliding events.
• Issue command EVSTEP as follows:
EVSTEP,1,TIME,0
This means that, for any time equal to or greater than zero, event number 1 will keep
being executed until such time as it is deactivated by another event.
• The ‘change grid’ commands are added in next:
EGRID,READ,fan_sli.cgrd
C {only if comment lines were added in the .cgrd file}
These commands are stored internally as part of the event definition and are echoed
in the pro-STAR I/O window every time they are executed.
• The sliding events can now be enabled as part of the time event using
command EASI:
EASI,2,ENABLE
EASI,3,ENABLE
EVSAVE,1
To check the event specification and prepare them for input into STAR, the
following command should also be issued:
EVPREP
CFD Analysis
Start the CFD analysis by typing
star
Post-Processing
Preliminaries Begin the post-processing session by re-entering pro-STAR:
• Start up pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl). The case name (fan_sli)
will appear automatically in the Case Name text box.
• Click Continue
The model details will be displayed in the I/O window. Ensure the pro-STAR Model
Guide is open next to the main pro-STAR window.
MEMORY,MAXEVE,3
Specify the file containing the transient post data and specify the time step at which
results are to be displayed (step no. 192):
• In the pro-STAR Model Guide, select folder Post-Processing
• Open the Load Data panel
• Select option Transient from the Analysis menu
• Select Yes from the Moving Mesh menu
• In the Transient section, check that file fan_sli.ccmt is displayed in the
Post File box
• Click Add File
• Select the file in the Transient scroll list and then click Open Transient file;
the time steps at which post data were stored during the run should appear in
the Time Step scroll list
• Select time step no. 192 in the scroll list
• Click Store Time
• In the main pro-STAR window, select View > Isometric > 1,1,1 to set the
view
Vector Next, go to the Data tab of the Load Data panel and follow the steps below to load
Display the velocity vectors:
• Select item Velocity Components UVW in the Vector Data list
• Ensure that None is selected in the Scalar Data list
• Click Get Data
• Open the Create Plots panel
• In the 3-D Surface tab, choose Vector and Edge then click Plot to Screen to
display the plot shown in Figure T11.2-14
If you have already run the rotating reference frames case of Tutorial 7.1, you could
compare Figure T7.1-10 with the plot above in order to observe the differences
between the two analysis methods.
You may now import other flow variables and check the solution at different
time steps to ensure its validity. A simple animation sequence may also be specified
to display all the results.
Engineering During the analysis a file called fan_sli.erd was created by STAR, containing
Data Graph the force and torque values at each time step. To display the data in graph form:
• Select folder Graphs followed by Extract Data
• Open panel Engineering Data. The file fan_sli.erd will be displayed by
default in the File Name box
• Accept the default Boundary File Type and select Region # 8 (the baffles
region) in the scroll list. The information shown below will appear in the I/O
window:
The list shows that force and torque data were saved as shear, normal and total for
each of the three directions. To graph the stored torque values:
This will graph the torque values in the theta direction, as shown below:
As the fan has 12 identical, equally-spaced blades, the solution should be periodic
with a period equal to 1/12 of a revolution. Figure T11.2-16 shows that the torque
is still changing between cycles and therefore running the analysis for just one
revolution is not sufficient to produce a periodic solution. To get such a solution,
the run will need to be continued for at least another 0.03 s.
Other data for region 8 can be graphed in a similar way. Note that the force data
produced for region 8 do not represent 12 times the force on each fan blade since,
at any particular time, each blade will feel a different force depending on its spatial
location. Had the force on each individual blade been required, a different boundary
region would have had to be applied to each baffle in turn during the pre-processing
stage.
Final • In the main window, select File > Quit > Quit,Nosave
Operations
4 ∆ρ gd
ur = -- ------ -------
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 × 10–5 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.
0.1 m
Outlet
gy
1.0 m
Slip wall on
y all side walls
x
Inlet
Figure T12.1-1 Schematic of vertical flow channel
Pre-Processing
Preliminaries Create a sub-directory for the tutorial called tut12-1. The mesh for this problem
is supplied in advance, i.e., cell, vertex, boundary and problem setup files
(channel.cel, channel.vrt, channel.bnd and channel.inp,
respectively) are available in the STAR-CD installation directories. Therefore,
before starting the tutorial, make sure that these files are copied into your current
directory.
• Start up pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Enter the case name (say, ter_vel) in the Case Name text box
• Click Continue
This will read default problem settings from file channel.inp plus the
problem’s cell, vertex and boundary location definitions from the remaining three
files.
• In the main window, select File > Model Title...
• In the Title text box type:
Verify that the correct mesh has been imported by selecting all cells and plotting the
mesh in ‘Hidden Surface’ mode:
• In the main window, select C > All
• Check that Hidden Surface is the default cell plot type
• Select View > Isometric > 1, 1, 1
• Click Cplot. A 2D mesh corresponding to Figure T12.1-1 should appear on
your screen
• Select View > Axis > +Z
Go to the pro-STAR Model Guide displayed on your screen, next to the main
pro-STAR window.
• Open the Analysis Features panel
This enables you to set the basic features of your model and ensures that only those
panels that are essential for your analysis are activated. For this tutorial, the
following special settings are required:
• Select option Eulerian from the Multi-Phase Treatment menu
• Click Apply
Material We now assign physical properties to the two phases:
Properties
• Select the Thermophysical Models and Properties folder
and
• Open the Gravity panel and change the Direction of Gravity Force to (0, -1, 0)
Thermofluid
• Click Apply
Models
• Select the Liquids and Gases folder
• Open the Molecular Properties (Fluids) panel
• Ensure the Phase slider at the bottom of the panel is set to Phase 1
• Assign appropriate property values for phase 1. Thermal properties are not
relevant in this case so they may be left at their default values:
Material — Water
Density — 1000
Molecular Viscosity — 0.001
• Click Apply
• Move the slider to the Phase 2 position
• Assign appropriate property values for phase 2 as follows:
Material — Air
Density — 1
Molecular Viscosity — 1e-5
• Click Apply
Select locations for the pressure reference and monitoring cells as follows:
• Open the Monitoring and Reference Data (Fluids) panel
• Click the mouse icon next to the Monitoring Cell Number box and then pick
the top middle cell in the main window (or enter 150 in the box)
• Click the mouse icon next to the Pressure Cell Number box and then pick the
top right hand corner cell in the main window (or enter 250 in the box)
• Click Apply
• Click Apply
• Move the Phase slider to the Phase 2 position
• Enter 1 m/s for the V velocity, 1 kg/m3 for the Density and 0.001 for the
Volume Fraction
• Click Apply
CFD Analysis
You can now continue with the CFD analysis, using the pro-STAR Model Guide
facilities for running STAR interactively without quitting pro-STAR. Alternatively,
you may run the CFD analysis (in double precision) by typing
star -dp
Post-Processing
Examine the velocities of the two phases at the channel exit: the water velocity
(phase 1) should remain close to 1 m/s and the bubble velocity (phase 2) should be
around 1.24 m/s, as calculated by equation above. This can be done very effectively
by plotting the monitored value for the V velocity as follows:
• Select folder Analysis Preparation
• Open the History of Analysis panel
• Choose Monitor History from the Plot menu
• Select item V-Velocity and ensure that the Phase slider is at the phase 1
position
• Click Apply to display monitored values for the V-velocity component of
phase 1
By default, the graph frame fills only half the screen. To make it larger:
• Select the Graphs sub-folder in the Post-Processing folder
• Open the Customize Graphs panel
• Under the Display tab, set the frame Location to Default
• Click Apply
• Click Redraw to display Figure T12.1-2
• On the History of Analysis panel, move the Phase slider to the phase 2
position
• Click Apply to display monitored values for the V-velocity component of
phase 2, as shown in Figure T12.1-3
• In the main window, select File > Quit > Quit,Nosave
ur = 208.1d
For steel spheres of 1.0e-4m diameter, the terminal velocity is 1.144 m/s with the
background fluid moving at 1 m/s. The terminal velocity relative to the background
fluid is 0.144 m/s.
2m
Degassing
outlet
gy
1m
Air inlet
Pre-Processing
Preliminaries Create a sub-directory for the tutorial called tut12-2. The mesh for this problem
is supplied in advance, i.e., cell, vertex, boundary and problem setup files
(tank.cel, tank.vrt, tank.bnd and tank.inp, respectively) are available
in the STAR-CD installation directories. Therefore, before starting the tutorial,
make sure that these files are copied into your current directory.
• Start up pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Enter the case name (say, aer_tank) in the Case Name text box
• Click Continue
This will read default problem settings from file tank.inp plus the problem’s
cell, vertex and boundary location definitions from the remaining three files.
• In the main window, select File > Model Title...
• In the Title text box type:
AERATION TANK
• Click Apply and Close
Verify that the correct mesh has been imported by selecting all cells and plotting the
mesh in ‘Hidden Surface’ mode:
• In the main window, select C > All
• Check that Hidden Surface is the default cell plot type
• Select View > Isometric > 1, 1, 1
• Click Cplot. A 2D mesh corresponding to Figure T12.2-1 should appear on
your screen
• Select View > Axis > +Z
The pro-STAR Model Guide 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.
• Open the Analysis Features panel and check the current settings. It will be
seen that option Eulerian is already selected from the Multi-Phase Treatment
menu so no further adjustment is necessary.
• Click Apply
Specify that the flow is turbulent and set up the turbulence drag force:
• Open the Turbulence Models panel
• Select On for the Turbulence option and then click Apply
• Go to the Multiphase Options tab
• Select option Bubble-Eddy Interaction from the Ct Model menu
Select locations for the pressure reference and monitoring cells as follows:
• Go to the Monitoring and Reference Data (Fluids) panel
• Click the mouse icon next to the Monitoring Cell Number box and then pick a
cell above the air injector in the top row of cells (or enter 650 in the box).
• Click the mouse icon next to the Pressure Cell Number box and then pick the
top right hand corner cell in the main window (or enter 5000 in the box).
• Click Apply
No user input is needed for region 2 in the scroll list which is already defined as the
Degassing outlet.
Analysis We will now specify appropriate solver parameters for this case:
Controls
• Select folder Analysis Controls
• Open the Equation Status tab of the Primary Variables panel
• Move the Phase slider at the bottom of the panel to the phase 1 position
• Deselect item W-Momentum since we are solving a 2D flow in the x-y plane
only.
• Check that item Pressure is selected
• Click Apply
• Move the Phase slider to the phase 2 position
• Deselect item W-Momentum
• Click Apply
CFD Analysis
You may continue with the CFD analysis, using the pro-STAR Model Guide
facilities for running STAR interactively without quitting pro-STAR. Alternatively,
you may run the CFD analysis (in double precision) by typing
star -dp
Post-Processing
Preliminaries Use pro-STAR to check the analysis results by first reading in the data stored in file
aer_tank.ccmp:
• Select folder Post-Processing
• Open the Load Data panel to display the File(s) tab
• Click Open Post file
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.
0.15m × 0.15m
Pressure
outlet
Free board
gy
1m
Fluidised bed
x
Air inlet
Pre-Processing
Preliminaries Create a sub-directory for the tutorial called tut12-3. The mesh for this problem
is supplied in advance, i.e. cell, vertex, boundary and problem setup files
(riser.cel, riser.vrt, riser.bnd and riser.inp, respectively) are
available in the STAR-CD installation directories. Therefore, before starting the
tutorial, make sure that these files are copied into your current directory.
• Start up pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Enter the case name (say, fcc_riser) in the Case Name text box
• Click Continue
• In the Read Input Coded File dialog select the File name riser.inp
• Click OK
This will read default problem settings from file riser.inp plus the problem’s
cell, vertex and boundary location definitions from the remaining three files.
• In the main window, select File > Model Title...
• In the Title text box type:
Verify that the correct mesh has been imported by selecting all cells and plotting the
mesh in ‘Hidden Surface’ mode:
• In the main window, select C > All
• Check that Hidden Surface is the default cell plot type
• Select View > Isometric > 1, 1, 1
• Click Cplot. A 2D mesh corresponding to Figure T12.3-1 should appear on
your screen
• Select View > Axis > +Z
The pro-STAR Model Guide window is displayed on your screen, next to the main
pro-STAR window.
• Open the Analysis Features panel
This enables you to set the basic features of your model and ensures that only those
panels that are essential for your analysis are activated. For this tutorial, the
following special settings are required:
• Select option Transient from the Time Domain menu
• Select option Eulerian from the Multi-Phase Treatment menu
• Click Apply
Material We now assign physical properties to the two phases:
Properties
• Select the Thermophysical Models and Properties folder
• Open the Gravity panel and change the Direction of Gravity Force to (0, -1, 0)
• Click Apply
• Select the Liquid and Gases folder
• Open the Molecular Properties (Fluids) panel
Assign appropriate property values to phase 1. Thermal properties are not relevant
in this case so they may be left at their default values.
• Make sure the Phase slider at the bottom of the panel is in the Phase 1
position
• Enter the following values:
Material — Air
Density — 1.205
Molecular Viscosity — 1.81e-5
• Click Apply
Assign appropriate property values to phase 2. In this case, the only relevant
property is the particle density. However, in the “Other Model Settings” section, the
Kinetic Theory model will be used to calculate solid-phase forces and this employs
an internally calculated solid-phase viscosity. Since the value supplied in the current
panel is added to the calculated one and in order not to affect the latter, the panel’s
phase viscosity should to be set to a very small value.
• Move the Phase slider to the Phase 2 position
• Enter the following values:
Material — Solid
Density — 2600
Viscosity — 1e-6
• Click Apply
Note that the Kinetic Theory approach solves a transport equation for the turbulence
kinetic energy in terms of the grannular temperature, which is then used to calculate
the effective viscosity. Therefore the only valid turbulence model option in this case
is the (default) laminar setting.
• Open the Turbulence Models panel and verify that the Turbulence option is
turned Off
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 Fluid Initialization panel
• Move the Phase slider at the bottom of this panel to Phase 1 position
• Select User from the Options menu and then click User Define
• 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 Select locations for the pressure reference and monitoring cells as follows:
Settings
• Go to the Monitoring and Reference Data (Fluids) panel
• Click the mouse icon next to the Monitoring Cell Number box and then pick a
cell in the lower half of the model geometry (or enter 1121 in the box).
• Click the mouse icon next to the Pressure Cell Number box and then pick the
top right hand corner cell (or enter 2000 in the box).
• Click Apply
• Deselect the W-Momentum option since we are only solving a 2D flow in the
x-y plane
• Click Apply
• Move the Phase slider to the Phase 2 position
• Deselect the W-Momentum option
• Click Apply
Output Set the frequency of outputting calculated transient data during the analysis:
Controls
• Open the Analysis Output panel
• 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 Output interval box. As can
be seen on the panel, for Phase 1, 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
• Enable the Post option, which selects this item (along with the phase velocity)
for output to the transient post file
• Click Apply
Run Time Set the run duration to 2 seconds and the time step to 1 x 10-4 seconds:
Controls
• Select the Analysis Preparation folder
• Open the Run Time Controls panel
• Set the analysis to Run for a Time of 2 seconds
• Click Apply
• Enter 1e-4 in the Time step for period box
• Click Set at the bottom of the panel
Final If you wish to terminate the session at this stage, write the geometry and problem
Operations files and exit from pro-STAR, saving the model data as shown below.
• In the main pro-STAR panel, select File > Save Geometry...
• In the Save Geometry File dialog, click Apply and then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
• Select File > Quit > Save & Quit
User Subroutine
Introduce the user code needed to initialise particle volume fractions and gas
velocities via pro-STAR’s built-in editor. For this purpose, edit subroutine INITFI
(in file initfi.f, sub-directory ufile) as follows:
• In the main pro-STAR panel, select File > Edit File...
• In the Edit File dialog, click File > Open...
• In the Open dialog, enter sub-directory ufile and select file initfi.f
• Click OK
• Edit the contents of the subroutine by adding extra lines of code after the
explanatory section, as shown below
C*************************************************************************
SUBROUTINE INITFI(U,V,W,PR,TE,ED,T,SCALAR,XVF2)
C Initialise fields
C*************************************************************************
C--------------------------------------------------------------------------*
C STAR-CD VERSION 4.04
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 pro-STAR Model Guide
facilities for running STAR interactively without quitting pro-STAR. Alternatively,
you may run the CFD analysis (in double precision) by typing
star -dp
Post-Processing
Use pro-STAR to display the results stored in the .ccmt file and check the volume
fraction of the second phase:
• In the pro-STAR Model Guide tree, select folder Post-Processing
• Open the Load Data panel to display the File(s) tab
• Select option Transient from the Analysis menu
• Check that file fcc_riser.ccmt appears in the Post File box in the
Transient section and then click Add File
• Select file fcc_riser.ccmt from the Transient list and then click Open
Transient file; the time steps at which analysis results were stored during the
run should appear in the Time Step scroll list
• In the Time Step list, select the fourth step at which data are available (i.e., at
time 0.1 seconds)
• Click Store Time
• Go to the Data tab and select Cell & Wall/Bound (Smooth) in the Data Type
menu
• Move the Phase slider to the Phase 2 position and select item Volume
Fraction from the Scalar Data list
• Click Get Data at the bottom of the panel
• Open the Create Plots panel
• In the 3-D Surface tab select Contour (filled) for Option and Edge for
Edge/Mesh
• Click Plot to Screen to display the particle volume fraction at the chosen time
step, as shown in Figure T12.3-2
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:
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.
0.1m × 0.1m
Steam/water
outlet
Steam bubbles
gy
2m
x
Superheated water
Pre-Processing
Preliminaries Create a sub-directory for the tutorial called tut12-4. The mesh for this problem
is supplied in advance, i.e. cell, vertex, boundary and problem setup files
(channel2.cel, channel2.vrt, channel2.bnd and channel2.inp,
respectively) are available in the STAR-CD installation directories. Therefore,
before starting the tutorial, make sure that these files are copied into your current
directory.
• Start up pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Enter the case name (say, boil) in the Case Name text box
• Click Continue
This will read default problem settings from file channel2.inp plus the
problem’s cell, vertex and boundary location definitions from the remaining three
files.
Verify that the correct mesh has been imported by selecting all cells and plotting the
mesh in ‘Hidden Surface’ mode:
• In the main window, select C > All
• Check that Hidden Surface is the default cell plot type
• Select View > Isometric > 1, 1, 1
• Click Cplot. A 2D mesh corresponding to Figure T12.4-1 should appear on
your screen
• Select View > Axis > +Z
The pro-STAR Model Guide is displayed on your screen, next to the main
pro-STAR window.
• Open the Analysis Features panel
This enables you to set the basic features of your model and ensures that only those
panels that are essential for your analysis are activated. For this tutorial, the
following special settings are required:
• Select option Eulerian from the Multi-Phase Treatment menu
• Click Apply
Material Assign physical properties to the two phases.
Properties
• Select the Thermophysical Models and Properties folder
and
• Open the Gravity panel and change the Direction of Gravity Force to (0, -1, 0)
Thermofluid
• Click Apply
Models
• Select the Liquid and Gases folder
• Open the Molecular Properties (Fluids) panel
• Ensure the Phase slider at the bottom of the panel is at the Phase 1 position
• Assign appropriate property values for phase 1 as follows:
Material – Water
Density – 958
Molecular Viscosity – 0.000283
Specific Heat – 4218
Conductivity – 0.681
Molecular Weight – 18
• Click Apply
• Move the Phase slider to the Phase 2 position
• Assign appropriate property values for phase 2 as follows:
Material – Steam
Density – 0.6
Molecular Viscosity – 1.2e-5
Specific Heat – 2034
Conductivity – 0.0248
Molecular Weight – 18
• Click Apply
Select locations for the pressure reference and monitoring cells as follows:
• Go to the Monitoring and Reference Data (Fluids) panel
• Click the mouse icon button next to the Monitoring Cell Number box and then
pick a cell in the lower half of the geometry (or enter 44 in the box).
• Click the mouse button next to the Pressure Cell Number box and then pick
the top right hand corner cell in the main window (or enter 100 in the box).
• Check that 273 is entered for Temperature
• Click Apply
Interphase heat transfer will be defined later via a user subroutine, so the Nusselt
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:
• Select the Sources folder and then open the Source Terms panel
• For the Mass Source Term, set the State to On. Choose to Define Source by
User Coding and then click Apply
• For the Enthalpy Source Term, select On, User Coding and then click Apply
Boundary Define boundary conditions at the inlet:
Conditions
• Select the Define Boundaries folder and then open the Define Boundary
Regions panel
• Select region 1 in the scroll list
• Ensure that the Phase slider at the bottom of the panel is at the Phase 1
position
• Enter the following values:
V velocity – 0.5
Density – 958
Temperature – 375
• Click Apply
• Move the Phase slider to the Phase 2 position
• Enter the following values:
V velocity – 0.5
Density – 0.6
Temperature – 373
Volume Fraction – 0.01
• Click Apply
• Click Apply
• Move the Phase slider to the Phase 2 position
• Select Zero Grad for the Temperature Switch
• Select Zero Grad for the VF Switch
• Click Apply
Analysis Specify various solver parameters required for this case:
Controls
• Select folder Analysis Controls
• Open the Primary Variables panel and go to the Equation Status tab
• Move the Phase slider at the bottom of the panel to the Phase 1 position
• Deselect item W-Momentum since we are solving a 2D flow in the x-y plane.
• Click Apply
• Move the Phase slider to the Phase 2 position
• Deselect item W-Momentum
• Click Apply
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
transfer rate due to evaporation is defined in subroutine UBOIL, called from
FLUINJ, so this subroutine should also be resident in file fluinj.f. For further
details of the boiling model, see the Eulerian Multiphase Flows Training Notes.
• Replace the default contents of both files with the code shown below, using
pro-STAR’s 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.04
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:
C (Sink) FLUXI (<0)
C (Source) FLUXI (>0),UI,VI,WI,TEI,EDI,TI,
C SCINJ,IPMASS
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
PRT=CPL*VISL/TKL
C
C.........NUSSELT NUMBER
C RNU=2.0+0.6*REY**0.5*PRT**0.3
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(004), HP )
EQUIVALENCE( UDAT04(006), P )
EQUIVALENCE( UDAT04(008), TE )
EQUIVALENCE( UDAT04(009), SCALAR(01) )
EQUIVALENCE( UDAT04(059), U )
EQUIVALENCE( UDAT04(060), V )
EQUIVALENCE( UDAT04(061), W )
EQUIVALENCE( UDAT04(062), VISM )
EQUIVALENCE( UDAT04(063), VIST )
EQUIVALENCE( UDAT04(007), T )
EQUIVALENCE( UDAT04(067), X )
EQUIVALENCE( UDAT04(068), Y )
EQUIVALENCE( UDAT04(069), Z )
C-----------------------------------------------------------------------
C
C This subroutine enables the user to specify a source term (per unit
C volume) for enthalpy in linearized form:
C
C Source = S1P-S2P*T, (W/m3)
C
C in an arbitrary manner.
C
C If temperature is to be fixed to a given value T, then the
C following may be used:
C
C S1P=GREAT*T
C S2P=GREAT,
C
C where T can be a constant or an arbitrary function of the
C parameters in the parameter list.
C
C ** Parameters to be returned to STAR: S1P,S2P
C
C-------------------------------------------------------------------------
C
C Sample coding: Fix temperature to the value of 300 K in solid
C No 3 (IMAT=-3)
C
C IF(IMAT.EQ.-3) THEN
C S1P=GREAT*300.
C S2P=GREAT
C ENDIF
C-------------------------------------------------------------------------
C
DENL=DEN
VISL=VISM
CPL=CP
TKL=CON
UR=U-UCEL2
VR=V-VCEL2
WR=W-WCEL2
SLIP=SQRT(UR*UR+VR*VR+WR*WR)
DIAP=DIAM
TL=T
TG=TCEL2
VFG=VFCEL2
C
CALL UBOIL(SMASS)
C
CFD Analysis
You may continue with the CFD analysis, using the pro-STAR Model Guide
facilities for running STAR interactively without quitting pro-STAR. Alternatively,
you may run the CFD analysis (in double precision) by typing
star -dp
Post-Processing
Use pro-STAR to check and examine the results.
• Select folder Post-Processing
• Open the Load Data panel to display the Files(s) tab
• Click Open Post file
The steam volume fraction at the exit should be about 0.85. Now plot the
temperature as follows:
• Go back to the Load Data panel
• Select item Temperature from the Scalar Data list
• Click Get Data
• In the main pro-STAR window click Cplot to display 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:
• 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 Cplot to display Figure T12.4-4
Note that the water temperature drops to the saturation value (373 K) in the upper
part of the solution domain. Finally, obtain a V-velocity component plot for the
second phase:
• 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 Cplot to display Figure T12.4-5
Discussion of Results
In Figure T12.4-4 we can see that water enters at approximately 375 K. As energy
is lost due to steam generation, the water temperature drops gradually to the
saturation value of 373K. In Figure T12.4-2, 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. Figure
T12.4-3 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:
q̇ liq = 40 kJ/s
Assuming that all this excess energy is used in generating steam, the latter’s
generation rate is:
q̇ liq
ṁ 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.
0.1m × 0.1m
Water
outlet
gy
2m
Steam bubbles
y
x
Sub-cooled water
+ steam
Figure T12.4-6 Outline of flow channel
Start by copying the entire working directory for boiling tutorial tut12-4 to
another directory, say tut12-4b, as follows:
cp -r tut12-4 tut12-4b
Enter the tut12-4b directory and start a pro-STAR session as normal, re-using
the model settings of tut12-4. Now make the following changes:
Introduction
The tutorials in this group illustrate STAR-CD’s facilities for performing an
aeroacoustic analysis. The problem analysed is air flow around a cylinder which, for
simplicity, is modelled as a two-dimensional problem. The air density and laminar
viscosity are 1.205 kg/m3 and 1.81 x 10-5 Pa s, respectively. The circle representing
the cylinder has a diameter of 0.15 m and the inlet velocity is 5 m/s. These values
are chosen to produce a flow with a Reynolds number of 50,000, based on the
cylinder diameter. The mesh employed is refined in the vicinity of the cylinder and
also in the region where the wake is expected to appear.
inflow
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-adapco’s es-acoustics tool.
Pre-Processing
Preliminaries Create a directory for the tutorial named tut13-1. The mesh to be used has
already been created and the relevant cell, vertex, boundary and problem setup files
are supplied with STAR-CD (files cyl.cel, cyl.vrt, cyl.bnd and
cyl.inp, respectively). Therefore, before starting the tutorial, make sure these
files are copied into your current directory.
Start up pro-STAR and enter the case name and title:
• Type prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Type aac in the Case Name text box
• Click Continue
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.
• In the main window, select File > Model Title...
• In the Title text box type:
Note that the Aeroacoustics folder now appears active in the pro-STAR Model
Guide tree.
• 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.
Material The aeroacoustic source term calculation depends upon a fluctuating velocity,
Properties obtained from calculated or derived values of k and ε using the “Synthetic
turbulence” method described in Chapter 17 of the Methodology volume. In this
case, the low-Reynolds number k-ε turbulence model, which calculates both these
quantities directly, will be used. If a model that does not calculate k and ε directly
is chosen, these quantities would be derived indirectly by STAR prior to performing
Initialise 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:
• Open the Fluid Initialization panel
• Specify the U velocity as 5 m/s
• Click Apply
• Under the Turbulence tab, select option TI/Mixing Length for the Model
• Set the Intensity and Mixing Length values to 0.01 and 0.005, respectively
• Click Apply
• Open the Monitoring and Reference Data (Fluids) panel
• Enter 6275 as the Monitoring Cell Number
• Enter 7213 as the Pressure Cell Number
• Click Apply
Boundary Specify the velocity and turbulence parameters at the inlet. The former is set such
Conditions that, based on the diameter of the cylinder, the Reynolds number is 50,000:
• Select the Define Boundaries folder
• Open the Define Boundary Regions panel
• Select the inlet, region 1, from the list
• Enter 5 m/s as the U velocity
• Change the Turbulence Switch to TI/Length
• Enter a Turb. Intensity of 0.001
• Enter a Length of 0.05 m
• Click Apply
Analysis Since the flow is two-dimensional, solving the momentum equation in the
Controls z-direction is unnecessary. To turn this off and activate a second-order differencing
scheme for the other two momentum equations:
• Select the Analysis Controls folder in the pro-STAR Model Guide
• Open the Primary Variables panel
• Under the Equation Status tab, deselect the W-Momentum option to make the
analysis two-dimensional
• Click Apply
• Under the Differencing Schemes tab, change the momentum Differencing
Scheme to MARS
• Click Apply
Run Time The run time controls must also be adjusted as follows:
Controls
• Select folder Analysis Preparation and open the Run Time Controls panel
• Enter 600 for the Maximum Number of Iterations
• Click Apply
Final Write the geometry and problem files:
Operations
• Select File > Save Geometry...
• In the Save Geometry File dialog, click Apply and then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
CFD Analysis
To perform the analysis interactively, proceed as follows:
• File > Save Model
• In the Analysis Preparation folder, open the Run Analysis Interactively panel
• Leave all settings at their default values and click Start
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:
• Select folder Post-Processing
• Open the Load Data panel to display the File(s) tab
• Click Open Post file
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:
• Under the Data tab of the Load Data panel, check that Data Type Cell is
selected
• Select Velocity Components UV from the Vector Data list
• Click Get Data
• Go to the Create Plots panel
• Under the 3-D Surface tab, select options Vector and Edge
• Click Plot To Screen
Version 4.06 13-5
Tutorial 13.1 STEADY FLOW AROUND A CYLINDER Post-Processing
Monitor History Plots
The flow field is clearly not symmetrical despite the geometry being so. This
suggests that a converged steady-state solution has not been reached.
Monitor Examining history plots of the monitored flow variables is a good way to reveal
History Plots whether a steady-state solution has been reached and, if not, why not. To create a
suitable history plot:
• Select the Analysis Preparation folder
• Open the History of Analysis panel
• Select Monitor History for the Plot option
• Enable the U-Velocity option box
• Click Apply
By default, the graph frame fills only half the screen. To make it larger:
• Select the Graphs sub-folder in the Post-Processing folder
• Open the Customize Graphs panel
• Under the Display tab, change the frame Location to Default
• Click Apply
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 A plot of the turbulence kinetic energy will show the shape and position of the wake
Energy downstream of the cylinder:
• Open the Load Data panel
• Under the Data tab, select Data Type Cell and Smooth option On
• Select Turb Kinetic Energy from the Scalar Data list
• Click Get Data
• Go to the Create Plots panel
• Under the 3-D Surface tab, select options Contour (filled) and None
• Click Plot To Screen
• Click the Zoom Off button, , to display 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:
• Open the Load Data panel
• Under the Data tab, check that Data Type Cell and Smooth option On are
selected
• Select Aeroacoustics Source from the Scalar Data list
• Click Get Data
• Click Replot to display 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:
• File > Quit > Quit, Nosave
fd
St = -----
u
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, aac.ccmp and aac.ccmg) into it. The
mesh from Tutorial 13.1 has already been refined and is contained within the cell,
vertex, boundary and problem setup files supplied with STAR-CD (files
cyl_ref.cel, cyl_ref.vrt, cyl_ref.bnd and cyl_ref.inp,
respectively). Therefore, copy these into your current directory also.
Start up pro-STAR:
• Type prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Enter aac_tr as the Case Name
• Deselect the Resume From Existing .mdl File option
• Deselect the Append to Previous .echo File option
• Click Continue
The monitoring and pressure reference cells must be redefined, as those used in the
steady-state analysis no longer exist:
• Open the Monitoring and Reference Data (Fluids) panel
• Change the Monitoring Cell Number to 9419
• Change the Pressure Cell Number to 6232. This cell is at one end of the
13-12 Version 4.06
Tutorial 13.2 TRANSIENT FLOW AROUND A CYLINDER Pre-Processing
Boundary Conditions
pressure boundary.
• Click Apply
Boundary The mapping of the inlet and pressure boundary conditions is performed via user
Conditions subroutines. These must be activated as follows:
• In the main window, choose File > System Command...
• Type ufiles in the text box, click Apply and then Close
• In the pro-STAR Model Guide, select the Define Boundaries folder
• Open the Define Boundary Regions panel
• Select region 1, the inlet, from the boundary regions list
• Select User from the User Option menu
• Click User Define to write the default version of subroutine BCDEFI in
sub-directory ufile, ready for editing later
• Click Apply
• Select region 2, the pressure boundary, from the boundary regions list
• Select User from the User Option menu
• Click User Define to write the default version of subroutine BCDEFP in
sub-directory ufile, ready for editing later
• Click Apply
Analysis Specify what transient data will be written to the .ccmt file and how often:
Controls
• Select the Analysis Controls folder
• Open the Primary Variables panel and select the Differencing Schemes tab
• 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
• Open the Analysis Output panel
• Under the Transient tab, set the Output interval to 0.015 seconds
• Select Turb Kinetic Energy from the Data to Write scroll list. The data will
be used to create an animation in the “Post-Processing” part of this tutorial
• Check the Post box
• Click Apply
Pressure data will be monitored at a location about 1.5 cylinder radii downstream of
the cylinder and the monitor data stored in an .ecd file. Define the location by
creating a cell set containing a single cell:
• Enter the following command in the I/O window:
• In the Analysis Controls folder, open the Monitor Cell Behavior panel
• Select On for the Monitoring option
• Check that the file aac_tr.set is displayed in the Set File box
• Select pmon from the Monitoring Information scroll list
• Select Pressure from the list of Monitoring Information variables
• Click Apply
Run Time Specify the time step size and the length of the run:
Controls
• Select the Analysis Preparation folder and open the Run Time Controls panel
• Change the Time step for period to 5e-5 seconds
• Click Set
• Change the run Time to 1.5 seconds. This is equivalent to 30,000 time steps
• Click Apply
Solution The solution mapping process involves the following stages:
Mapping
1. Save the new mesh geometry created above in its corresponding .ccmp file
2. Save the new model file
3. Resume the original model file and load the corresponding solution file
4. Perform the solution mapping (SMAP) operation
5. Resume the new model file
6. View and check the restart solution data
7. 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 > Save Geometry...
• In the Save Geometry File dialog, click Apply then Close
• Select File > Save Model
• Select File > Resume Model From...
• In the Resume Model From dialog, select aac.mdl
• Click OK
• Select the Post-Processing folder in the pro-STAR Model Guide
• Open the Load Data panel to display the File(s) tab
• Change the Post File name to aac.ccmp
• Click Open Post file to load the results from Tutorial 13.1
• 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:
• Select File > Resume Model From...
• In the Resume Model From dialog, enter aac_tr.mdl
• Click OK
• Select C > All
• In the pro-STAR Model Guide select the Load Data panel
• In the File(s) tab change the Post File name to aac_tr.ccms
• Change the State Name to smap
• Click Open Post file to load the mapped results
• Under the Data tab, select Velocity Magnitude from the Calculated Scalar
Data list
• Click Get Data
• Go to the Create Plots panel
• Under the 3-D Surface tab, select options Contour (filled) and None
• Click Plot to Screen to display Figure T13.2-1
Figure T13.2-1 Velocity magnitude profile resulting from the solution mapping
You must now specify that the transient run should restart from the above mapped
solution:
• Select the Analysis Preparation folder in the pro-STAR Model Guide
• Open the Restart panel
• Select Initial Field as the Restart File Option
• Enter aac_tr.ccms as the Restart File
• In the Initial Field Restart section, select Smapped
• Check that the State Name is smap and then click Apply
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.
Inlet The user subroutine mapping the inlet boundary data is BCDEFI, given below:
Boundary
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.04
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 ----------------------------------------------------
LOGICAL LOG1
INTEGER II
DO 1101 II=99,1,-1
INQUIRE(UNIT=II,OPENED=LOG1)
IF(.NOT.LOG1) THEN
IUNIT=II
GOTO 1103
ENDIF
1101 CONTINUE
1103 CONTINUE
c
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)STOP’BCDEFI:MAXPB too small’
IF (INTFLG(2).EQ.0) THEN
INTFLG(2) = 1
INQUIRE(FILE=’inlet.inp’, EXIST=FILEEXIST)
IF (FILEEXIST) THEN
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
c-inclusion_2 end ------------------------------------------------------
RETURN
13 CONTINUE
WRITE(*,*) ‘ ***ERROR: Could not find pro-STAR boundary ‘,
* IBP, ‘ in file inlet.inp’
WRITE(60,*) ‘ ***ERROR: Could not find pro-STAR boundary ‘,
* IBP, ‘ in file inlet.inp’
CALL STQUIT(1)
END
Pressure The user subroutine mapping the pressure boundary data is BCDEFP, given below:
boundary
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.04
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( UDAT02(002), DEN )
EQUIVALENCE( UDAT04(002), DENC )
EQUIVALENCE( UDAT04(003), EDC )
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 )
DO 1101 II=99,1,-1
INQUIRE(UNIT=II,OPENED=LOG1)
IF(.NOT.LOG1) THEN
IUNIT=II
GOTO 1103
ENDIF
1101 CONTINUE
1103 CONTINUE
c
IF (INTFLG(41).EQ.0) THEN
INTFLG(41) = 1
C
C set the starting iteration
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
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
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:
• In the pro-STAR Model Guide, select the Analysis Preparation folder
• Open the History of Analysis panel
• Click Browse Additional Output File to display the .info file contents
• Examine the Maximum Courant number and the Mean Courant number at a
selection of time steps through the run. You should see that these two
quantities stay within the ranges 1.0 to 9.0 and 0.15 to 0.5, respectively.
Ideally, the Courant number should not exceed 1.0 but, in this case, it is
reasonable to assume that large Courant numbers are found only in a few very
small cells near the cylinder surface.
• Examine the NUMBER OF PISO CORRECTORS at a selection of time steps
through the run. This should be either 2, 3 or 4. A stable transient calculation
will not regularly exceed 4 PISO correctors.
Begin the post-processing session by opening the transient post data file:
• In the pro-STAR Model Guide, select the Post-Processing folder and open the
Load Data panel
• Under the File(s) tab, select Transient as the Analysis option
• Click Add File
• Select file aac_tr.ccmt from the Transient list
• Click Open Transient file
Animated An animation of turbulence kinetic energy contours will now be created to help
Plots visualize the unsteady character of the flow. The animation may be defined by
writing a sequence of plots to a neutral plot file, which are then played back via
pro-STAR commands as follows:
• Under the File(s) tab of the Load Data panel, select the first time step from
the Time Step list
• Click Store Time
• Under the Data tab, select Data Type Cell & Wall/Bound (Smooth)
• Select Turb Kinetic Energy from the Scalar Data list
• Click Get Data
• Go to the Create Plots panel
• 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
• Ensure that Contour is selected from the Plot Option menu and click Replot
A command sequence is now used to set up, write and play back the animation
sequence. Enter the following commands in the I/O window for the animation:
nfil,aac_tr.plot
term,,file,rast
REPL
*set cnt1 1 1
*defi
store next
getv te
REPL
*end
*loop 1 98
term,,x
play,aac_tr.plot,1,100,1,1
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 The vortex shedding irregularity can also be seen in a plot of pressure at the
Trace monitoring point:
• Increase the maximum number of available graph register locations by typing
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:
• Open the Customize Graphs panel in the Graphs folder
• Under the Axis tab, check Xmin is 0, change Xmax to 1.5, Xmajor to 0.15 and
Number of Ticks to 2
• Check that the Numbers option is Real
• Change the Title to Time (s)
• Click Apply
• Select Y-Axis for the Parameters option
Version 4.06 13-23
Tutorial 13.2 TRANSIENT FLOW AROUND A CYLINDER Post-Processing
Pressure Trace
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 ⎠
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.
Initial blob
x
Air
2m Wall
Gravity
Film
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
Pre-Processing
Preliminaries Create a sub-directory for this tutorial called tut14-1 and copy file
liquid_film.ccmg supplied with the STAR-CD installation into it. In this
directory:
• Start up pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Enter the case name, blob, in the Case Name text box
• Click Continue
Make sure that the pro-STAR Model Guide is displayed on your screen, next to the
main pro-STAR window:
• Open the Analysis Features panel in the pro-STAR Model Guide
• Select Transient from the Time Domain menu
• Select On from the Liquid Films menu
• Click Apply
• In the main window, select File > Model Title...
• In the Title text box type:
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:
• In the main window, select B > New > Wall and B > Add > Pressure and
click Replot to display the boundaries shown in Figure T14.1-3
• Turn off the Display Boundaries option by clicking the button
Material The following properties are used for the two phases:
Properties
1. The gas phase is ambient air with a density of 1.205 kg/m3 and viscosity of
and Physical
1.81 × 10-5 Pas
Models
2. The liquid phase is pure water with a density of 1000 kg/m3 and viscosity of
0.00089 Pas
Define the direction of gravity and assign physical properties to the two phases:
• Select the Thermophysical Models and Properties folder
• Open the Gravity panel
• Change the Acceleration due to gravity to 9.81 m/s2
• Change the Direction of Gravity Force to (1, 0, 0) in coordinate system 1
• Click Apply
• Select the Liquids and Gases folder
• Open the Molecular Properties (Fluids) panel. The displayed default
properties of air are acceptable so no input is needed for this panel
• Open the Fluid Initialization panel. Again, the displayed defaults are
appropriate for this case so no input is needed
Select locations for the pressure reference and monitoring cells as follows:
• Open the Monitoring and Reference Data (Fluids) panel
• Enter 501 in the Monitoring Cell Number box
• Enter 501 in the Pressure Cell Number box
• Click Apply
Version 4.06 14-5
Tutorial 14.1 2D FILM FLOW DOWN A VERTICAL WALL Pre-Processing
Initial and Boundary Conditions
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:
• Open the Film Boundaries panel and check that the Condition # slider 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 check that Region Type Outlet is selected for the film boundary
condition
• Click Apply
Analysis Specify various solver parameters and output controls required for this case:
Controls
• Select folder Analysis Controls and open the Primary Variables panel
• On the Equation Status tab, deselect option W-Momentum since we are
solving a 2D flow in the x-y plane only
• Click Apply
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
Post-Processing
Preliminaries When the simulation is complete and whilst in the tut14-1 sub-directory:
• Start up pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Check that the case name, blob, appears in the Case Name text box
• Select the Resume From Existing .mdl File? option
• Select the Append to Previous .echo File? option
• Click Continue
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
• Click Save. The file anim.MAC will be saved to your local directory
• Select .anim in the Macro List and click Execute on the Define Macro panel
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-STAR’s graph facilities. Again, it is more convenient to save
the relevant commands in a pro-STAR macro file:
• Select Panels > Define Macro...
• Enter graph as the macro Name
• Type the following commands in the Command window:
• Click Save. The file graph.MAC will be saved to your local directory
• On the Define Macro panel select .graph in the Macro List and click Execute
to display the graph shown in Figure T14.1-5
The data saved in file fthick.grf may then be used for comparison against
analytical solutions.
• Select File > Quit > Quit, Nosave
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 0.8 ms, the total fuel
injected is approximately 5.6 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 × 10–5 s.
20 mm
24 mm
16 mm 16 mm
Figure T14.2-1 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.
• Start up pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Enter the case name, impinge, in the Case Name text box
• Click Continue
• In the main window, select File > Model Title...
• In the Title box type
Impingement distance: 24 mm
The pro-STAR Model Guide should be displayed on your screen, next to the main
pro-STAR window.
• Open the Analysis Features panel in the pro-STAR Model Guide
• Select option Transient from the Time Domain menu
• Select option Lagrangian from the Multi-Phase Treatment menu
• Select On from the Liquid Films menu
• Click Apply
Mesh The computational mesh data are stored in files impinge.cel and
Creation impinge.vrt. These can be imported using pro-STAR’s GUI panels as follows:
• In the main window, select Tools > Cell... to open the Cell Tool
• Click Read Cells... 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... to open the Vertex Tool
• Click on Read Vertices... to open the Read Vertices panel
• Accept the default values and click Apply (pro-STAR will read in vertex data
from file impinge.vrt)
• Close the Read Vertices panel
• Close the Vertex Tool
• In the main window, collect all cells into a set by selecting C > All
• Collect all vertices into a set by selecting V > All
Define the z-axis as the vertical axis and then display the imported mesh:
• In the main window, select Plot > Up Axis > Z
• Check that the Geometry plot option and Hidden Surface plot type are
selected
• Click Cplot
• Select View > Isometric > 1 1 1
• Change the plot type to Quick Hidden Line to display the mesh, as shown in
Figure T14.2-2
It can be seen that the origin is already at the desired location (the injector nozzle
tip). What is now needed is to define a local cylindrical coordinate system with the
same origin and with its z-axis along the injection direction:
• In the Coordinate Systems dialog, ensure system no. 1 is selected, choose
Hide Triad from the menu and click Apply
• Select system no. 10
• Select Cylindrical from the drop-down menu on the bottom left and enter the
following values in the adjacent boxes:
xc = 0
yc = 0
zc = 0
Rxy = 0
Ryz = 0
Rzx = –180
• Select New (Local) from the menu at the bottom of the dialog and click
Apply
• Ensure system no. 10 is selected then choose Show Triad from the menu and
click Apply
• In the main window, click Replot to display the location of this system,
shown in Figure T14.2-3, and confirm that it has been defined correctly
• Ensure system no. 10 is selected, then choose Hide Triad from the menu and
click Apply
• Select system no. 1, then choose Set Active from the menu and click Apply
• Close the Coordinate Systems dialog
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.
• Select the Locate Boundaries folder in the pro-STAR Model Guide
• Open the Create Boundaries panel
• Select region 1 in the Boundary Regions scroll list
• Select Wall for Type and enter Film_Wall-Z in the Name box
• Click Define
• In the main window, select View > Axis > -Z
• In the Create Boundaries panel ensure region 1 is selected, choose Create by
Picking Surface based on Edges from the Action List and click Apply
• Click on any bottom-wall vertex displayed in the main window
Define scalar no. 1 to be the product of droplet evaporation and import its physical
properties from pro-STAR’s built-in database:
• In the Thermophysical Models and Properties folder, select the Additional
Scalars sub-folder
• Open the Molecular Properties (Scalars) panel and check that the Scalar #
option at the top of the panel is set to 1
• Choose option Select scalar from database from the menu at the top of the
panel
• Select C12H26 DODECANE (V) from the scalar database scroll list and
then select option Define user scalar from the menu at the top of the panel
• The physical properties of dodecane vapour are read in from pro-STAR’s
property database to the appropriate panel boxes. Check that the displayed
values are reasonable and then click Apply
Droplet The maximum number of droplet parcels required for this case (10,000) is above the
Properties 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:
Activate the turbulent dispersion model and define transport mechanisms and
physical properties for the droplets:
• Open the Droplet Physical Models panel
• In 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
• In the Momentum Transfer section, select Standard for the Correlation
option and accept the default Mass Coefficient and Slip Factor values
• Select option Standard for the Mass Transfer Calculation
• Select option Standard for the Heat Transfer Calculation
• In the Droplet Break-Up section, select option Reitz for the Break-Up Model
and accept the default values of the model constants
• In the Droplet-Wall Interaction section, select option Bai for the
Droplet Behavior 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:
• Open the Droplet Properties panel
• Choose option Select material from database from the menu at the top of
the panel to open the droplet properties database
• Select item # DODECANE(L) and check the Use Internal Property
Calculation box
• Click the Select button
• Define scalar no. 1 (i.e., the dodecane vapour) as representing the product of
evaporation by selecting 1 C12H26 for the Evaporates to Scalar option
• In the Droplet Properties panel, click Apply
The injector location was specified earlier using local coordinate system 10. Its
geometric and physical properties can now be specified:
• Open the Spray Injection with Atomization panel
• Check 3 Dimensional is selected for the Domain and select Huh for the
Atomization Model
• Accept the rest of the default settings in the Spray Options section and click
Apply Spray Options
• In the Define Injectors section, enter the following parameters:
Injection Temperature — 293
Hole Diameter — 0.0003
Coordinate System — 10
• Ensure that option Fixed is selected for the fuel Mass Flow Rate, and then
enter a value of 0.007 (kg/s) in the Flow Rate box
• Check that 0 is entered in the Start of Injection box
• Enter 0.0008 in the End of Injection box
• Enter 1e+06 in the Number of Parcels/Injector box
• Check that the value in the Droplet Type # box is 1 and the name
DODECANE(L) appears next to it
• Click Update Injector
Boundary Specify thermal boundary conditions for the spray impingement plane at the bottom
Conditions of the box:
Version 4.06 14-19
Tutorial 14.2 SPRAY IMPINGEMENT ON A WALL Pre-Processing
Film Model Controls
• Select the Define Boundaries folder and then open the Define Boundary
Regions panel
• Select region 1 (named Film_Wall-Z) in the scroll list
• In the Wall Parameters section, select option Fixed from the Wall Heat menu
and enter 293 for the boundary Temperature and 0 for its thermal Resistance
• Click Apply
Film Model Now define the liquid film model controls.
Controls
• Select the Liquid Films folder followed by the Film Controls panel
• Select On for the Gravity Force option
• Click Apply
The liquid film now needs to be activated. 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 Film Physical Models and Properties panel
• Under the Film Models tab, select On from the Liquid Film Activation menu
• Click Apply
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 # slider 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
Region Type Outlet for the boundary condition to be applied to the film
• Click Apply
• Set the Condition # slider to 2
• Enter 1 in the Film Region # box and 3 (Side_Wall-X) in the Adjacent Region
# box and select Region Type Outlet for the film boundary condition
• Click Apply
Repeat the above process for the adjacent regions 1 and 4 (Side_Wall+Y) for
Condition # 3, and 1 and 5 (Side_Wall-Y) for Condition # 4 to complete the liquid
film boundary condition set-up.
Analysis Specify various solver parameters and output controls required for this case:
Controls
• Select folder Analysis Controls and open the Solution Method panel
• Change the Under-Relaxation for Pressure Correction value to 0.5
• Click Apply
• Open the Additional Scalars (Controls) panel and ensure that C12H26 is
selected in the Scalar list.
• Change the Residual Tolerance to 0.01 and set the Differencing Scheme to
MARS, accepting the default value of the compression level
• Click Apply
CFD Analysis
For flows involving sprays, it is recommended that STAR is run in double precision
mode, by typing
star -dp
Version 4.06 14-21
Tutorial 14.2 SPRAY IMPINGEMENT ON A WALL Post-Processing
Final Operations
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.ccmt every 2
time steps.
Post-Processing
Open the file containing the transient post data (impinge.ccmt):
• In the pro-STAR Model Guide, select folder Post-Processing
• Open the Load Data panel
• Under the File(s) tab, select Transient as the Analysis option
• Click Add File
• Select file impinge.ccmt from the Transient list and click Open Transient
file. All stored transient time step data will now be displayed in the Time Step
window
The above steps may be repeated for other times and variables of interest.
Animations 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-STAR’s macro
facility (see Chapter 17, “Macros” in the CCM User Guide) to produce an animation
of the film and droplet development.
• Select Panels > Define Macro... from the menu bar on the main window
• In the Define Macro panel, enter anim as the macro Name
• Type the following commands in the Command window:
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
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 • Click Close on the Define Macro panel
Operations • Select File > Quit > Quit,Nosave
Tutorial 14.3 LIQUID FILM STRIPPING AND RE-ENTRAINMENT Introduction
Introduction
This tutorial demonstrates the following liquid film modelling features:
• Liquid film stripping and re-entrainment at a sharp edge
• ‘Freezing’ the gas flow field (velocity and pressure) obtained from a
steady-state analysis and using it to drive the droplet and film motion in a
transient calculation where only the droplet and film transport equations are
solved. This technique has the significant advantage of speeding up the
transient run but is valid only for cases where the film and droplet behaviour
does not significantly influence the gas flow.
Inlet
(#3) Wall (#6)
Pressure
Wall (#5) (#2)
Initial film wall
(#1)
Wall (#5)
Figure T14.3-1 Schematic of the problem geometry
Pre-Processing
Preliminaries Create a sub-directory for this tutorial called tut14-3. As the tutorial starts from
a pre-existing steady-state solution, copy the relevant files into your current
directory. These files are a pro-STAR model file (strip_ss.mdl) that defines
the model and a solution file (strip_ss.ccmp) containing the analysis results.
Also copy the macro file (combi.MAC) supplied with the STAR-CD installation.
With these files in place, you are then ready to set up a transient liquid film
simulation:
• Start up pro-STAR by typing prostar at the command line
• Specify your preferred graphics driver (mesa or gl)
• Type strip_tr in the Case Name box
• Deselect the Resume From Existing .mdl File? option
• Deselect the Append to Previous .echo File? option
• Click Continue
• Select File > Resume Model From...
• In the Resume Model From dialog, select File name strip_ss.mdl and
click OK
• Select File > Model Title... and in the Subtitle 1 box, type
Transient
• Click Apply and Close to close the Model Title dialog
Analysis The transient film calculation option is selected in the Analysis Features folder of
Features the pro-STAR Model Guide. For film stripping and droplet re-entrainment, the
Lagrangian multi-phase calculation must also be activated:
• Open the Analysis Features panel
• Select option Transient from the Time Domain menu
• Select option Lagrangian from the Multi-Phase Treatment menu
• Select option On from the Liquid Films menu
• Click Apply
Droplet Although no droplets are present at the start of the calculation, suitable settings must
Properties be made to allow for their formation later on in the simulation due to film stripping.
Physical properties must also be set for the re-entrained droplets:
• At the pro-STAR command line, type
• Open the Droplet Physical Models panel and select the Droplet Physical
Models tab
• For Momentum Transfer, select option Standard and accept the default Mass
Coefficient and Slip Factor values
• Select option Bai for the Droplet-Wall Interaction and accept the default
values of the model constants
• Click Apply
• Open the Droplet Properties panel
• Choose Select material from database from the pull-down menu at the top of
the panel
• Select H2O_l [WATER(L)] from the list and click Select
• Accept default values for the relevant properties and click Apply
Film Model Define the liquid film model controls and properties and activate the edge stripping
Controls model for film stripping from sharp edges:
• Select the Liquid Films folder
• Open the Film Controls panel
• Set the Stripping from Edge option to On
• Check that the default Droplet Type is 1 (water) and accept all other default
values
• Select region number 1 (Film_Wall-Y) using the Region # slider bar
• Click Apply
Activate the liquid film model for the specified film material (water):
• Select the Film Physical Models and Properties panel
• Under the Film Models tab, select On from the Liquid Film Activation menu
• Click Database to open the Droplet Properties Database and select H2O_l
[WATER(L)] from the list
• Click Select
• Click Apply on the Film Models tab
• Under the Film Properties tab, accept default values for the relevant
properties and click Apply
Specify liquid film initial conditions on the inlet section’s lower walls (boundary
regions 1 and 5):
• Open the Film Initialization panel
• Check that the Region # slider is set to 1 and enable the Initialize check box
• Enter 0.0005 (i.e. a thickness of 0.5 mm) in the Thickness box and 0.5 m/s in
the U box. Leave all other initial conditions at their defaults and click Apply.
• Set the Region # slider to 5 and enable the Initialize check box
• Enter 0 in the Thickness box, leave all other initial conditions at their defaults
and click Apply. This signifies that initially there is no film on this wall.
As there are no walls adjacent to regions 1 (the initial film region) and 5 (the wall
region where a film may form at a later stage), no film boundaries need to be
defined.
Analysis Deactivate the solution of all gas flow variables so as to freeze the gas flow field:
Controls
• Open the Analysis Controls folder
• Select the Primary Variables panel
• Under the Equation Status tab, deselect all flow variables and properties (u, v,
w, p, k, ε and viscosity)
• Click Apply
• Open the Analysis Output panel
• Select the Transient tab. Check that 0 seconds is shown in the Starting at time
box and enter 0.02 seconds in the Output interval box. The post data will be
saved every 4 time steps since we will set the time step size to be 0.005
seconds (see “Run Time Controls” below)
• Deselect option Cell and select option Wall in the Data to Write section
• In the variables scroll list, select items Film Thickness and Film Velocity and
check that the Post option is enabled for both
• Select Film Mass in the list and enable the Post option
• Click Apply
Run Time Here we set the time step size to 0.005 seconds and run for a total of 1 second. The
Controls steady state solution strip_ss.ccmp is used as an initial flow field for the restart
run:
• Select the Analysis Preparation folder
• Open the Run Time Controls panel
• Select the Run for option from the Run time control menu and type 1 in the
Time box
• Click Apply
• Check that Constant is selected from the Time Step Method menu
• Check that 0 is shown in the Period start time box and enter 0.005 in the Time
step for period box
• Click Set
• Open the Restart panel
• Select Initial Field from the Restart File Option menu
• Click the browser icon to the right of the Restart File box, select
strip_ss.ccmp from the list and click Open
• Click Apply
Final Write all files needed to run the STAR solver and then quit pro-STAR:
Operations
• Select File > Save Geometry from the main pro-STAR menu bar
• In the Save Geometry File dialog, check that 1 is shown for the Geometry
Scale Factor
• Click Apply and then Close
• Select File > Save Problem
• In the Save Problem File dialog, click Save
• Select File > Quit > Save & Quit
CFD Analysis
Run the case in double precision in your session window:
star -dp
The analysis will start automatically. The simulation runs for 200 time steps and
solution data will be saved in file strip_tr.ccmt every 4 time steps.
Post-Processing
Load the Open the file containing the transient post data (strip_tr.ccmt):
Transient
• Start pro-STAR and accept the default Case Name strip_tr
Data File
• In the pro-STAR Model Guide tree, select folder Post-Processing
• Open the Load Data panel
• Under the File(s) tab, select the Transient Analysis option
• Click Add File
• Select file strip_tr.ccmt from the Transient list and then click
Open Transient file. All the saved transient time steps will now be displayed
in the Time Step window
Read in the last set of results and make a contour plot of film thickness:
• In the Time Step list, scroll to the end of the list, select time step number 200
and click Store 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
• Click Wplot
• Turn mesh plotting Off by clicking the Display Mesh Lines button,
• Turn on the Display Edges option
• Go to the Options tab of the Create Plots panel and select User for the colour
scale Range
• Enter 1.4E-3 in the To box and then click Apply
• Select View > Isometric > -1, -1, 1 from the View/Zoom toolbar to display
Figure T14.3-2
Animation The above steps may be repeated for other times and variables of interest. 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-STAR’s macro
facility (see Chapter 17, “Macros” in the CCM User Guide) to produce an animation
of the film and droplet development.
• Select Panels > Define Macro... from the menu bar on the main window
• In the Define Macro panel, enter anim as the macro Name
• Type the following commands in the Command window:
store,itst,4
*define noex
store next
getd post
dset all
getw lfthk
wplot
*end
*loop 2 50 1
• Click Save. The file anim.MAC will be saved to your local directory
• Select .anim in the Macro List and click Execute on the Define Macro panel
The above executes all commands within the loop 50 times to produce successive
snapshots of the droplets and liquid film state at every saved time step.
Advanced A pro-STAR macro (combi.MAC) is used to produce a plot that shows the gas flow
Post- field’s influence on the droplets formed due to film stripping at 200 time steps.
Processing Particle ribbons have been employed to illustrate the ‘frozen’ gas flow field driving
the film and re-entrained droplets.
Layers are used to show a geometry plot combined with several post data plots
(see Chapter 4, “Layering Images” in the Post-Processing User Guide). The
extended mode option for graphics plotting must be employed to work with layers:
• Click the Extended Mode On/Off button, , on the main window’s toolbar
• Select .combi from the Macro List on the Define Macro panel and click
Execute to produce Figure T14.3-4
Figure T14.3-4 Film distribution, droplets and gas flow field at 200 time steps
All the usual zoom, rotation and translation operations can be performed on the
layered plot.
It can be seen that some of the liquid film that has built up at the end of the
straight inlet section is stripped from the edge. The droplets that are formed are
carried along by the gas flow field without becoming trapped in the recirculation
region.
Primary Inlet
Outlet
Furnace Wall
Secondary Inlet
Tertiary Inlet
Modelling Strategy
The following modelling strategy was adopted:
• Perform an initial run in non-reacting and isothermal mode (Tutorial 15.1)
• Run the model using the Constant Rate Devolatilisation and Eddy Break-Up
gaseous combustion models (Tutorial 15.2)
• Run the model using the Two-Competing-Steps Devolatilisation and Eddy
Break-Up gaseous combustion models (Tutorial 15.3)
Using this type of modelling strategy to achieve a solution in three stages is the
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.
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.ccmg. Therefore, before
starting the tutorial, make sure that this file is copied into your working directory.
Start up pro-STAR in this directory and begin the modelling task by specifying the
case name and problem title:
• Type prostar at the command line
• Specify the graphics driver (mesa or gl)
• Type coal_iso in the Case Name text box
• Click Continue
• In the main pro-STAR window, select File > Model Title...
• In the Title text box type
Importing the Go to the pro-STAR Model Guide displayed on your screen, next to the main
Mesh pro-STAR window.
• Select folder Grids and then open the Import Grids panel
• Select CCM as the file Format
• Change the Geometry File name to furnace.ccmg
• Click Apply
Verify that the mesh has been imported correctly by selecting all cells and
boundaries and plotting the mesh in ‘Hidden Surface’ mode:
• In the main window, select C > All to select all cells
• Select B > All to select all boundaries
• Check that Hidden Surface is the default cell plot type
• Click to enable the Display Boundaries option
• Click Cplot
• Change the viewpoint to approximately (-1.0, 0.5, -1.0) using the orientation
cube’s slider controls
• Remove the wall boundaries from the display by selecting B > Unselect >
Wall and clicking Replot
• Zoom in on the red inlet boundaries to create a plot resembling Figure
T15.1-1
Material All fluid cells should already be assigned to material number 1 by default. Check
Assignment this via the Cell Editor:
and Thermal
• In the main pro-STAR window, click to display the Cell Editor
Options
• Select cell type no. 1 and verify that the Material # value is 1
• Click Close to exit the Cell Editor
• Go to the pro-STAR Model Guide and select the Thermophysical Models and
Properties folder followed by sub folder Liquids and Gases
• Open the Molecular Properties (Fluids) panel
• The default material is air, which is suitable for this case. The flow is
compressible and without pressure dependency so select Ideal-f(T) for the
Density option
• Select Polynomial for the Specific Heat option and click on Define
Polynomial
• In the Polynomial Function Definition dialog, select N2 from the CHEMKIN
Database scroll list
• Click Apply Database Substance
• Close the dialog and then click Apply at the bottom of the Molecular
Properties (Fluids) panel
• Open the Turbulence Models panel and select On for the Turbulence option
• Choose the k-Epsilon/High Reynolds Number Model
• Leave all settings as their default values and click Apply
• Open the Thermal Models panel and select On from the Temperature
Calculation menu
• Click Apply
• Open the Monitoring and Reference Data (Fluids) panel
• The default monitoring location (cell number 1) is suitable. Change the
reference Pressure Cell Number to 8279 and the Pressure to 101325 Pa
• Click Apply
Boundary The model consists of inlet, outlet and wall boundary regions. The velocity, thermal
Conditions and turbulence boundary conditions need to be specified for these:
• Select the Define Boundaries folder, then open the Define Boundary Regions
panel
• In this panel, select region 1 - Inlet. This is the primary air inlet
• Enter an axial velocity value of 10 m/s in the W box
• Select TI/Length for the Turbulence Switch option
• Enter a Turb. Intensity of 0.1 and a Length of 0.06 m
• Enter a value of 1 kg/m3 in the Density box
• Enter a value of 353 K in the Temperature box
• Click Apply
• Select region 4 - Outlet and enter a value of 1 in the Flow Split box
• Click Apply
The default conditions for wall boundaries are adiabatic, no-slip and stationary,
which is suitable for this case so no changes are necessary for boundary regions 5
and 6.
Analysis The solution and output controls need to specified next:
Controls
• Open the Analysis Controls > 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
• Open the Monitor Numeric Behavior panel
• Enable the Iteration Residuals and Conservation Check option in the Print
section
• Leave all other options at their default values and click Apply
Run Time The aim of this tutorial is to establish a stable, non-reacting flow field which will
Controls 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:
• Select folder Analysis Preparation and open the Run Time Controls panel
• Type 1000 in the Maximum Number of Iterations box
• Check that the Maximum Residual Tolerance is 0.001
• Click Apply
• Open the Restart panel
• The setting of the Restart File Option menu should be None as this run starts
from the default initial conditions
• Click Apply
Final The pre-processing task is now complete. If you wish to terminate the session at this
Operations 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 pro-STAR Model Guide facilities for running STAR interactively.
• In the main pro-STAR panel, select File > Save Geometry...
• In the Save Geometry File dialog, click Apply and then Close
• Select File > Save Problem...
• In the Save Problem File dialog, click Save
• Select File > Quit > Save & Quit
CFD Analysis
To perform the analysis interactively, proceed as follows:
• Select File > Save Model
• In the Analysis Preparation folder open the Run Analysis Interactively panel
• Check that the units in which the model was built are correctly selected
(option button Meters)
• Select Double Precision. Leave all other settings at their default values.
• Click Start
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.ccmp:
• Select folder Post-Processing
• Open the Load Data panel and display the File(s) tab
• Click Open Post file
Post- Begin by displaying a temperature contour plot to show the mixing of the two inlet
Processing streams:
• Go to the Data tab of the Load Data panel
• Check that Cell is selected from the Data Type menu
• Select On and All for the Smooth option
• Select Temperature from the Scalar Data list
• Click Get Data
• In the main pro-STAR window, select plot option Contour
• Select View > Axis > -Z
• Turn off the Display Boundaries option by clicking the button
• Click the Zoom Off button,
• Click Sect. Slice and draw a horizontal cross-section trace through the centre
of the furnace
• Select View > SNormal View
• Select plot type Section (Surface) to display Figure T15.1-2
Next, plot velocity vectors on the surface of the furnace to show the swirling nature
of the flow:
• Return to the Data tab of the Load Data panel and check that Cell is selected
from the Data Type menu
• Turn Off the Smooth option
• Select item Velocity Components UVW from the Vector Data list
• Click Get Data
• Go to the Create Plots panel
• In the 3-D Surface tab select Option Vector
• Select Edge from the Edge/Mesh menu
• Click Plot to Screen
• Type
Final • Exit from pro-STAR by choosing File > Quit > Quit, Nosave from the main
Operations window menu.
Pre-Processing
Preliminaries Before running pro-STAR, create a directory for the tutorial named tut15-2 and
copy the model and solution files obtained in Tutorial 15.1 (coal_iso.mdl,
coal_iso.ccmp and coal_iso.ccmg) into it. Rename the model file
coal_const.mdl.
Start up pro-STAR and begin the modelling task by specifying the problem title:
• Check that coal_const is shown in the Case Name box
• Select the Resume From Existing .mdl File? option
• Deselect the Append to Previous .echo File? option
• Click Continue
• Select File > Model Title...
• In the Title text box type
Turn radiation on, choosing the Discrete Transfer solution method in conjunction
with the internal view factor and participating media calculation options:
• 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
• Enable the Participating option 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
Radiation To use the Discrete Transfer model, it is necessary to subdivide all boundary regions
Patches 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-STAR’s I/O window:
BSET NONE
*SET NREG 1 1
*DEFINE
BPATCH NREG,,BYFA
BSET ADD REGI NREG
*END
*LOOP 1 5
The above loop will create 1,984 patches. Display the patches to confirm that the
operation has been carried out properly:
• In the main pro-STAR window, select Plot > Cell Display > Boundary
Patches. The radiation patches should appear as shown in 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.
• Select Plot > Cell Display > Boundary Patches again to deselect the patch
cell plot display option
Other It is good practice to define one of the cells near the expected centre of the flame as
Settings the monitoring point. This eases the task of checking for the onset of combustion as
temperature and product concentrations build up rapidly at that point once
combustion begins. Start by inspecting the cell numbers in the region of interest:
• In the main window, select Plot > Number > Cell
• Zoom in on the mesh shown on-screen to have a closer look at the displayed
numbers. We will define cell number 5918 as the monitoring cell
• Open the Thermophysical Models and Properties > Liquids and Gases >
Monitoring and Reference Data (Fluids) panel
• Type 5918 in the Monitoring Cell Number box
• Click Apply
• Select Plot > Number > Cell again to deselect the plot cell number option
• Click the Zoom Off button,
• Under the Proximate tab, enter data for the coal’s 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 coal’s ultimate analysis
• Enter 84.6% C, 5.06% H, 7.6% O and 1.67% N
• Click Apply
• Select the Miscellaneous 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
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 (Scalars) panel
• Use the Scalar # spin box to check that 11 scalars have been defined. There is
no need to change any of the molecular properties for these scalars
Particle The following steps define the particle properties and the injection rate and location:
Properties
• Select folder Lagrangian Multi-Phase
and Injection
• Open panel Droplet Controls
Location
• Check that Use Gradient is selected for the Interpolation Method and that
Explicitly defined parcel injection is selected for Droplet Mode at the
bottom of the panel
• To increase the maximum allowable number of droplets, type the following
commands in the I/O window:
MEMO,MAXDRP,2400
MEMO,WRITE
• Return to the Droplet Controls panel and enter a value of 2400 in the
Maximum Number of Parcels box
• Click Apply
• Open the Droplet Physical Models panel
• Turn On Turbulent Dispersion under the Global Physical Models tab
• Click Apply
The component properties shown in the Droplet Properties panel 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
• Select On for the NOx Model option and click Apply
• Go back to the Lagrangian Multi-Phase > Droplet Properties panel
• In the Component Properties section, change the value for Hfg to 0 for all 7
components
• Change the Density to 1200 kg/m3 under the Bulk Properties section
• Click Apply
• Go back to the NOx/Radiation panel, select Off for the NOx Model option and
click Apply
Next, specify the coal particle injector locations and injection rate:
• Select the Injection Definition panel in the Lagrangian Multi-Phase folder
• Check that the Group Number option at the bottom of the panel is set to 1
• Enter a value of 1e-4 m in the Diameter box and a value of 10 m/s in the
Velocity Magnitude box
• Enter a value of 353 K in the Temperature box
• Check that the Mass Flowrate applies to the Injection Group
• Enter a value of 0.1 kg/s in the Rate box
• Enter a value of 300 in the Number of Parcels/Injection Point box
• Click Apply
Boundary Many of the boundary conditions for inlet, outlet and wall boundaries have already
Conditions been set in Tutorial 15.1. However, thermal and radiation boundary conditions still
need to be specified:
• In the pro-STAR Model Guide, select folder Define Boundaries and open the
Define Boundary Regions panel
• Select region 1 - Inlet from the list
• Enter 353 K in the T Radiation box
• Enter a value of 1 in the Emissivity box
• Click Apply
Scalar Specify that only air enters through the inlet boundaries:
Boundaries
• Open the Scalar Boundaries panel
• Select region 1 - Inlet from the Boundary Region list
• Select scalar 5 - O2 from the Scalars list
• Enter 0.233 in the boundary Value box
• Click Apply
• Select scalar 8 - N2 from the Scalar list and enter 0.767 in the boundary Value
box
• Click Apply
• Specify exactly the same scalar boundary conditions for region 2 - Inlet and
region 3 - Inlet
Control Default values for analysis controls such as under-relaxation factors and
Parameters differencing schemes are set when the models are selected. Although these defaults
are suitable for this tutorial, the under-relaxation factors for other cases may need to
be changed or a second-order differencing scheme may be required.
To run a case involving coal combustion, it is also necessary to set some
pro-STAR Constants that help control the analysis:
• Open the panel Analysis 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
Run Time Check the status of the run time control parameters and specify that the analysis
Controls should restart from the solution obtained in Tutorial 15.1:
• Select folder Analysis Preparation and open the Run Time Controls panel
• Change the Maximum Number of Iterations to 500 and check that the
Maximum Residual Tolerance is set to 0.001
• Click Apply
• Open the Restart panel
• Select Initial Field for the Restart File Option
• Enter coal_iso.ccmp as the Restart File
• Click Apply
Final The pre-processing task is now complete. If you wish to terminate the session at this
Operations stage, write the geometry and problem files and exit, saving all model data in file
coal_const.mdl, as shown below. Alternatively, you may run STAR
interactively, as described in the next section.
• In the main window, choose File > Save Geometry...
• In the Save Geometry File dialog, click Apply and then Close
• File > Save Problem...
• In the Save Problem File dialog, click Save. Ignore the warning shown in the
I/O window. No ignition model is required
• File > Quit > Save & Quit
CFD Analysis
To perform the analysis interactively proceed as follows:
• Select File > Save Model
• Select the Analysis Preparation folder and open the Run Analysis
Interactively panel
• Select option Double in the Precision section
• Select Yes for the Write Geometry File option
• Click Start
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:.
• In the main window, select C > New > Fluid
• Click Cplot
• In the pro-STAR Model Guide, select folder Post-Processing
Version 4.06 15-19
Tutorial 15.2 CONSTANT RATE DEVOLATILISATION Post-Processing
Preliminaries
• Open the Load Data panel and display the File(s) tab
• Click Open Post file
Next, plot the absolute temperatures on a section through the centre of the furnace
and normal to the Y axis:
• Go to the Data tab of the Load Data panel and check that Data Type Cell is
selected
• Choose On and All for the Smooth option
• In the Scalar Data list, select item Temperature
Next, plot the CO2 mass fraction contours on the same section through the centre
of the furnace:
• Go to the Data tab of the Load Data panel and select item CO2 from the
Scalar Data list
• Click Get Data
• Click Replot to display 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
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-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 • Exit from pro-STAR by choosing File > Quit > Quit, Nosave from the main
Operations window menu
Pre-Processing
Preliminaries Before running pro-STAR, create a directory for the tutorial named tut15-3 and
copy the model and solution file obtained in Tutorial 15.2 (coal_const.mdl
and coal_const.ccmp) into it. Rename the model file coal_2step.mdl.
Start up pro-STAR and begin the modelling task by specifying the problem title:
• Check that coal_2step is shown in the Case Name box
• Select the Resume From Existing .mdl File? option
• Deselect the Append to Previous .echo File? option
• Click Continue
• Select File > Model Title...
• In the Title text box type
Coal The next stage is to change the devolatilisation model to the Two-Competing-Steps
Combustion model:
Model Setup
• Open the Thermophysical Models and Properties > Reacting Flow > Coal
Combustion > Sub Models panel
• In the Volatiles tab, select the 2 Competing Scheme
Analysis To aid convergence, the under-relaxation factor for the energy equation will be
Controls reduced:
• Open the Analysis Controls > Primary Variables panel
• Select the Solver Parameters tab
• Change the Relaxation Factor for Temperature 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:
• Open the Additional Scalars (Controls) panel
• Select scalars 1 - 8 from the list and check that their Under-Relaxation Factor
settings are all 0.5
• Click Apply
Run-time Check the status of the run-time control parameters and specify that the analysis
Controls should restart from the solution obtained in Tutorial 15.2:
• Select folder Analysis Preparation and open the Restart 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.
• Enter coal_const.ccmp as the Restart File
• Click Apply
Final The pre-processing task is now complete. If you wish to terminate the session at this
Operations stage, write the geometry and problem files and exit, saving all model data in file
coal_2step.mdl, as shown below. Alternatively, you may run STAR
interactively, as described in the next section.
• In the main window, choose File > Save Geometry...
• In the Save Geometry File dialog, click Apply and then Close
• File > Save Problem...
• In the Save Problem File dialog, click Save. Ignore the warning shown in the
I/O window. No ignition model is required.
• File > Quit > Save & Quit
CFD Analysis
To perform the analysis interactively proceed as follows:
• Select File > Save Model
• Select the Analysis Preparation folder and open the Run Analysis
Interactively panel
• Select option Double in the Precision section
• Select Yes for the Write Geometry File option
• Click Start
As well as the usual residual and monitoring data, the screen output will show
information about the coal combustion reaction at every iteration.
Note that the analysis will take some time to run (over 1 hour on a 2.8 GHz Linux
machine with 2 GB of RAM) and that the run time cannot be decreased by running
in parallel since cases involving the discrete transfer radiation method with
participating media cannot be run in this mode.
The run will not converge within the specified maximum number of iterations.
However, the only residual that fails to fall below the convergence criterion is that
for HCN (scalar number 10). The very low values of the HCN scalar (less than 0.01
throughout the domain) mean that lack of convergence is not a concern for this
tutorial.
Post-Processing
Preliminaries Enter pro-STAR and start the post-processing task by re-plotting the mesh:
• In the main window, select C > New > Fluid
• Click Cplot
• In the pro-STAR Model Guide, select folder Post-Processing
• Open the Load Data panel
• On the File(s) tab click Open Post file
First, plot the absolute temperatures on a section through the centre of the furnace
and normal to the Y axis:
• Go to the Data tab of the Load Data panel and check that Data Type Cell is
selected
• Choose On and All for the Smooth option
Next, plot the O2 mass fraction contours on the same section through the centre of
the furnace:
• Go to the Data tab of the Load Data panel and select item O2 from the Scalar
Data list
• Click Get Data
• Click Replot to display Figure T15.3-2
Next, plot the NO mass fraction contours on the same section through the centre of
the furnace:
• Go back to the Data tab and select item NO from the Scalar Data list
• Click Get Data
• Click Replot to display 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
MEMO,MAXDRP,2400
MEMO,WRITE
VIEW -1.0 0.5 -1.0
• Click Droplet Plot at the bottom of the Plot Droplets panel to display 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
• Go to the Create Plots panel
• Under the Section/Clipped tab, select the Contour (filled) and Edge options
• Change the Normal vector to (1, 0, 0)
• Click Apply
• Click Cplot to display the CO2 contours
• Type
Final • Finally, exit from pro-STAR by choosing File > Quit > Quit, Nosave from
Operations the main window.
Channel Walls 2
y
2π
x
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
τw
uτ = -----
ρ
and τ w is the wall shear stress. The fluid is assumed to have constant physical
properties, as shown below:
is determined by balancing the pressure force in the streamwise direction with the
shear force at the top and bottom walls of the channel, yielding
∆ pH = 2τ w L
The wall shear stress is obtained from the friction velocity definition and has
a value of 1.0 Nm-1. This is then combined with the channel height and length to
give a pressure drop along the channel of 2π Pa.
Modelling Strategy
The major elements of the modelling strategy are:
• Computational grid — non-uniform hexahedral mesh comprising 90,000 cells
(see Figure T16.0-2). Cells in the y-direction are refined so as to yield a
higher resolution near the channel walls. This is achieved using an expansion
ratio of 1.1096
• Wall and cyclic boundary conditions
• Isothermal, incompressible, steady and transient flow options
The tutorial is divided into two parts. The first, a steady-state Reynolds Averaged
Navier-Stokes (RANS) simulation, is used to verify the mesh suitability for
capturing the large-eddy turbulence structures as measured by the integral length
scale, l = f(k/ε). The second part illustrates the recommended numerical settings for
LES, including pre- and post-processing, and includes comparison of results with
those obtained from a direct numerical simulation (DNS) [2].
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:
• Type prostar at the command line
• Specify the graphics driver (mesa or gl)
• Type channel_ss in the Case Name text box
• Check that the Resume from Existing .mdl File? option is deselected
• Check that the Append to Previous .echo File? option is deselected
• Click Continue
Problem Execute the command macro and save the model file:
set-up
• Open the macro panel by selecting Panels > Define Macro... in the main
pro-STAR window
• Highlight RANS in the Macro List in the Define Macro panel and click
Execute
• Click Close in the Define Macro panel
• 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
For a description of how to run problems in parallel across a network, see “Running
a STAR-CD Analysis” on page 2-2 of the CCM User Guide.
If your machine has only one processor, you will need to run sequentially. To
perform this type of run in double-precision mode, type:
star -dp
The convergence criteria for this case are very strict and so the run will not converge
within the specified 3,000 iterations. The reason for running the analysis for this
number of iterations will be explained in the “Post-Processing” section.
Post-Processing
The nature of this problem makes the normalised residual sums a poor method for
judging convergence. Instead, the justification for stopping the run after 3,000
iterations can be provided by examining the monitor history data:
• Start up pro-STAR and resume from the channel_ss.mdl model file
• Select the Analysis Preparation folder in the pro-STAR Model Guide
• Open the History of Analysis panel
• Select Monitor History for the Plot option
• Check the U-Velocity box and click Apply to display 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:
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.ccmp
• 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 getc te 5
oper getc ed 6
oper v**s 1.5 5 5
oper smul 0.1643 5 5
oper divi 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
∆y = 7.6V
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.
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
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 scheme’s stability criterion. To obtain a time step that
satisfies the latter, the Courant number (Co) definition is rearranged to yield:
Co ∆x
∆t = -------------
U
A time step of 1x10-3 s is used in the LES tutorial (Tutorial 16.2), satisfying both
criteria mentioned above. Having completed the calculations for mesh suitability
and choice of time step, exit pro-STAR as follows:
• Select File > Quit > Quit, Nosave
Macro
!===============================================
! Macro 16.1-1: Setting up the RANS analysis
!===============================================
! User-defined parameters:
! H - half-height of channel
! RETAU - Friction Reynolds number (Utau*H/nu)
! YPLS - Target y+ in near-wall cell
! COUR - Target Courant number
! NCX - Number of cells in streamwise direction
! NCY - Number of cells in normal direction
! NCZ - Number of cells in spanwise direction
!===============================================
*set H 1.0
*set RETAU 395.0
*set YPLS 1.0
*set COUR 1.0
*set NCX 3.0
*set NCY 60.0
*set NCZ 50.0
!===============================================
! Generate Mesh
*set PI 3.141592654
*set LX 2.0 * H * PI
*set LY 2.0 * H
*set LZ H * PI
!============================================================
! Locate boundaries.
cset news flui
plty ehid
cplo
view -1 0 0
bzon 1 all
rdef 1 cycl$ $ $ $ $
view 1 0 0
bzon 2 all
rdef 2 cycl$ $ $ $ $
view 0 0 -1
bzon 3 all
rdef 3 cycl$ $ $ $ $
view 0 0 1
bzon 4 all
rdef 4 cycl$ $ $ $ $
cyma 1 2 LX 0.0 0.0
cyma 3 4 0.0 0.0 LZ
!============================================================
! Define common control parameters
time steady nodefa
iter 3000,1e-10
moni 8911
algo simple nodefa,,,
solu scalar CG
!============================================================
! Define properties and models
pmat 1 flui
dens cons 1.0
lvis cons 1.0 / RETAU
turb ke 1 stan
lowre on
coke,0.09,1.44,1.92,1.44,-0.33,0.419,1,1.219,0.9
nwall hybrid
twol off
init stan 21 0.0 0.0 1 0.0 0.0,keps,0.4,0.01
!============================================================
!============================================================
! Additional control parameters
solve,y,y,y,y,y,y,n,y,n,n,n,n,
relax,0.7,0.3,0.7, ,1, , , , , , , , ,
sweep,100,100,100,1000,100,100, , , , , , , , , , , ,
resid,0.1,0.1,0.1,0.05,0.1,0.1, , , , , , , , , , , ,
dsch,ud,uvw,,stan
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.ccmp
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:
• Type prostar at the command line
• Specify the graphics driver (mesa or gl)
• Check that channel_les appears in the Case Name text box
• Check that the Resume from Existing .mdl File? option is selected
• Deselect the Append to Previous .echo File? option
• Click Continue
Mesh To refine the mesh in the streamwise direction to make it suitable for the LES
refinement calculation:
• 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
LES settings The calculation is no longer steady-state and so it is necessary to change the analysis
type:
• Open the Analysis Features panel 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.
• Select folder Thermophysical Models and Properties
Flow In order to reduce the run time, the simulation can start from a flow field that will
initialisation encourage the development of turbulence. The appropriate initial conditions may be
specified through user subroutine INITFI as follows:
• Open the Fluid Initialization panel
• Enter the following commands in the pro-STAR I/O window:
SYSTEM
UFILES
• Select User from the Options menu in the Fluid Initialization panel
• Click User Define
• Click Apply
• Use pro-STAR’s built-in text editor or an external editor to change the
contents of the default initfi.f file (written by pro-STAR into the ufile
sub-directory) to match the subroutine listing given in section “User
Subroutine”
The effect of the user-defined initial flow field is to introduce vorticity into the
domain. This is achieved by defining a region in the centre of the channel in which
all three velocity components are set explicitly. In particular, the wall-normal
component is set to a value greater than the streamwise component to encourage the
development of turbulence.
Solution To obtain the best results from an LES model, the use of second-order schemes is
controls 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.
• Select the Analysis Controls folder
• Open the Solution Method panel
• Change the Solution Algorithm to SIMPLE
• Change the Maximum Number of Outer Iterations to 3. This may not be large
enough for the algorithm to achieve convergence at every time step but should
be sufficient for obtaining a good-quality overall solution.
• Select the Three Time Level Implicit scheme from the Temporal
Discretization menu
• Click Apply
Next, change the solver parameters and change the spatial discretization scheme for
the momentum equations to CD, ensuring that the blending factor is set to 1.0:
• Open the Primary Variables panel
• Select the Solver Parameters tab
• Change the Relaxation Factor for the U-Momentum, V-Momentum,
W-Momentum equations to 0.9 and the Number of Sweeps to 200
• Change the Residual Tolerance to 0.001 for the three momentum equations
• For Pressure, change the Relaxation Factor to 0.5 and the Residual Tolerance
to 0.0001
• Click Apply
• Select the Differencing Schemes tab
• Select the CD scheme from the drop-down menu for the Differencing Scheme
of the momentum equations and check that the blending factor is set to 1
• Click Apply
Velocity data for a cell near the wall will be monitored throughout the run. The data
will then be used to check whether the statistical averaging specified in the “LES
settings” section starts after allowing a reasonable time for the flow to develop.
• Select the desired cell by typing the following command in pro-STAR’s I/O
window:
CSET NEWSET CLIST 89105
Final At this point, the basic problem definition is complete. The next step is to set the
operations 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.
• Select folder Analysis Preparation
• Open the Run Time Controls panel
• Check that Run for is selected for the Run time control option and enter 50 in
the Time box
Version 4.06 16-13
Tutorial 16.2 LARGE EDDY SIMULATION User Subroutine
Final operations
• Click Apply
• In the Time Step Option section, check that the Time Step Method is set to
Constant and that 0.001 is entered in the Time step for period box
• Click Set
Finally, before exiting from pro-STAR, make sure that the model file
(channel_les.mdl) is saved for possible future modification.
• Select File > Quit > Save & Quit.
User Subroutine
User subroutine INITFI is used for setting the initial flow field, as shown below:
C****************************************************************
SUBROUTINE INITFI(U,V,W,PR,TE,ED,T,SCALAR,XVF2)
C Initialise fields
C****************************************************************
C----------------------------------------*
C STAR VERSION 4.04.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
Mypfive=-0.5
Myppfive=0.5
Myzero=0.0
Uprime=32.45
Vprime=-52.36
Wprime=5.532
mythree=3.0
myfour=4.0
RETURN
END
CFD Analysis
To run the analysis in parallel, on two local CPUs and in double precision, type:
star -dp 2
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.ccmp which was
copied into your working directory at the start of this tutorial. Rename this file
channel_les.ccmp before post-processing.
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
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.
Preliminaries The first post-processing task is to load file channel_les.ccmp, containing the
analysis results:
• Start up pro-STAR and resume from the channel_les.mdl model file
• In the pro-STAR Model Guide, select the Post-Processing folder
• Open the Load Data panel
• Click Open Post file
Inst. results Before analysing the averaged data, an example is shown of the instantaneous
results representing a snapshot of the flow in time. Begin by displaying contours of
the streamwise velocity component:
• Open the Data tab
• Select On and All from the pull-down menus next to the Smooth option
• Select Velocity Component U from the Scalar Data list
• Click Get Data
• Open the Create Plots panel
• Select Contour(filled) from the Option menu and Edge from the Edge/Mesh
menu
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:
• Go to the Load Data panel
• Select Off from the Smooth option menu
• Select Velocity Components VW from the Vector Data list
• Click Get Data
• Go to the Create Plots panel
• Select Vector from the Option menu and Edge from the Edge/Mesh menu
• Click Plot to Screen
• In the main window, select View > Axis > +X to display Figure T16.2-3
Averaged Having looked at the structure of the instantaneous flow field, attention is turned to
results 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.
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 case-
dependent 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
Figures T16.2-6, T16.2-7 and T16.2-8 show profiles of u’u’, v’v’ and w’w’,
respectively, non-dimensionalised by the friction velocity uτ = 1. These profiles
represent the turbulence intensity and show good qualitative agreement with the
DNS data. In addition, they highlight the anisotropic nature of the flow.
It can be observed that the LES model over-predicts the streamwise fluctuations
(Figure T16.2-6) whilst under-predicting the cross-stream fluctuations (Figures
T16.2-7 and T16.2-8). Under-prediction of v’v’ and w’w’ is common in LES
calculations where a large part of the turbulence spectrum lies in the subgrid scales.
Closer agreement with the DNS results can only be obtained through further mesh
refinement.
The u’v’ Reynolds stress profile is shown in Figure T16.2-9. It can be observed that
the u’v’ component is well predicted by the LES model, both qualitatively and
quantitatively.
Components u’w’ and v’w’ are up to two or three orders of magnitude smaller and
are therefore less important. These are not shown here but may be viewed by
displaying the contents of graph frames 5 and 6.
Final As there were no changes to the model geometry or solution parameters, there is no
operations need to save file channel_les.mdl
• Select File > Quit > Quit, Nosave
Bibliography
[1] Kim, Moin and Moser, 1987. ‘Turbulence Statistics in Fully Developed Channel
Flow at Low Reynolds Number’. J Fluid Mechanics, 177, 133-166.
[2] Moser, Kim and Mansour, 1999. ‘DNS of Turbulent Channel Flow up to
Ret=590’. Physics of Fluids, 11, 943-945.
Macros
Mesh ! ==============================================
refinement in ! Macro 16.2-1 Refining mesh in X direction
! ==============================================
the X-
curs file
direction CREF,10,1,1,ALL
*set NCX NCX * 10
BSET ALL
BDEL BSET
cyde all
cset all
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 ! Macro 16.2-2 - Spatially averaging LES data
! ======================================
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 u’u’ against y/H
! vv.dat - Mean v’v’ against y/H
! ww.dat - Mean w’w’ against y/H
! uv.dat - Mean u’v’ against y/H
! uw.dat - Mean u’w’ against y/H
! vw.dat - Mean v’w’ against y/H
! =======================================
! Clear old .dat files
syst
rm -f U.dat
syst
rm -f V.dat
syst
rm -f W.dat
syst
rm -f VMAG.dat
syst
rm -f P.dat
syst
rm -f VIST.dat
!=========================================================
load,channel_les.ccmp
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 each variable in the cell set and store in registers 1-6
*get R1 rtot 1
*get R2 rtot 2
*get R3 rtot 3
*get R4 rtot 4
*get R5 rtot 5
*get R6 rtot 6
roper,add,2,2,0,1,1,,
sdat U.dat 2 2 1
sdat V.dat 2 2 2
sdat W.dat 2 2 3
sdat VMAG.dat 2 2 4
sdat P.dat 2 2 5
sdat VIST.dat 2 2 6
clos U.dat
clos V.dat
clos W.dat
clos VMAG.dat
clos P.dat
clos VIST.dat
!=======================================================
syst
rm -f uu.dat
syst
rm -f vv.dat
syst
rm -f ww.dat
syst
rm -f uv.dat
syst
rm -f uw.dat
syst
rm -f vw.dat
*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 R1 rtot 1
*get R2 rtot 2
*get R3 rtot 3
*get R4 rtot 4
*get R5 rtot 5
*get R6 rtot 6
*set R1 R1 / NCX / NCZ
*set R2 R2 / NCX / NCZ
*set R3 R3 / NCX / NCZ
*set R4 R4 / NCX / NCZ
*set R5 R5 / NCX / NCZ
*set R6 R6 / NCX / NCZ
chan cset ,,, 0.0 R1 * R1 1 1
chan cset ,,, 0.0 R2 * R2 2 2
chan cset ,,, 0.0 R3 * R3 3 3
chan cset ,,, 0.0 R4 4 4
chan cset ,,, 0.0 R5 5 5
chan cset ,,, 0.0 R6 6 6
*end
*loo 1 NCY
cset none
*set CC2 1 9010
*defi noex
cset add clis CC2
*end
*loo 0 NCY - 1
sdat uu.dat 2 2 1
sdat vv.dat 2 2 2
sdat ww.dat 2 2 3
sdat uv.dat 2 2 4
sdat uw.dat 2 2 5
sdat vw.dat 2 2 6
clos uu.dat
clos vv.dat
clos ww.dat
clos uv.dat
clos uw.dat
clos vw.dat
Mean ! ==============================================
streamwise ! Macro 16.2-3 Producing a mean streamwise velocity profile
! ==============================================
velocity
greset
profile 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,
Reynolds ! ==============================================
stress ! Macro 16.2-4 Producing profiles of the Reynolds stresses
! ==============================================
profiles
! Reset graph parameters and set the number of registers at 40
greset
y
numr 40
! 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
u’u’
frame,1,xrange,0,400
grlabel,1,1,on,,,5.0,1.5
y+
grlabel,1,2,on,,,0.5,6.0
u’u’
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
! 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
v’v’
frame,2,xrange,0,400
grlabel,2,1,on,,,5.0,1.5
y+
grlabel,2,2,on,,,0.5,6.0
v’v’
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
w’w’
frame,3,xrange,0,400
grlabel,3,1,on,,,5.0,1.5
y+
grlabel,3,2,on,,,0.5,6.0
w’w’
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
u’v’
frame,4,xrange,0,400
grlabel,4,1,on,,,5.0,1.5
y+
grlabel,4,2,on,,,0.5,6.0
u’v’
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
! 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
u’w’
frame,5,xrange,0,400
grlabel,5,1,on,,,5.0,1.5
y+
grlabel,5,2,on,,,0.5,6.0
u’w’
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
! 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
v’w’
frame,6,xrange,0,400
grlabel,6,1,on,,,5.0,1.5
y+
grlabel,6,2,on,,,0.5,6.0
v’w’
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