You are on page 1of 552

CCM TUTORIALS

STAR-CD VERSION 4.08

CONFIDENTIAL FOR AUTHORISED USERS ONLY

2008 CD-adapco

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

Tutorial 3.2 FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM .... 3-19 Physical Problem Description ....................................................................... 3-19 Modelling Strategy ........................................................................................ 3-19 Pre-Processing ............................................................................................... 3-19 CFD Analysis ................................................................................................ 3-21 Post-Processing ............................................................................................. 3-21 Tutorial 4 - MULTI-FLUID FLOWS Tutorial 4.1 GRAVITY-DRIVEN MULTI-FLUID FLOW WITH FREE SURFACE 4-2 Physical Problem Description ......................................................................... 4-2 Modelling Strategy .......................................................................................... 4-2 Pre-Processing ................................................................................................. 4-2 CFD Analysis .................................................................................................. 4-8 Post-Processing ............................................................................................... 4-8 Tutorial 4.2 FORCED MULTI-FLUID FLOW WITH CAPILLARY EFFECTS . 4-13 Physical Problem Description ....................................................................... 4-13 Pre-Processing ............................................................................................... 4-13 CFD Analysis ................................................................................................ 4-18 Post-Processing ............................................................................................. 4-18 Tutorial 4.3 FORCED MULTI-FLUID FLOW WITH CAVITATION ................. 4-23 Physical Problem Description ....................................................................... 4-23 Pre-Processing ............................................................................................... 4-23 CFD Analysis ................................................................................................ 4-29 Post-Processing ............................................................................................. 4-29 Tutorial 5 - TURBULENT FLUID STREAM MIXING Physical Problem Description ......................................................................... 5-1 Tutorial 5.1 STEADY 3-D FLOW ........................................................................... 5-2 Pre-Processing ................................................................................................. 5-2 CFD Analysis .................................................................................................. 5-9 Post-Processing ............................................................................................... 5-9 Tutorial 5.2 TRANSIENT 3-D FLOW ................................................................... 5-15 Pre-Processing ............................................................................................... 5-15 CFD Analysis ................................................................................................ 5-18 Post-Processing ............................................................................................. 5-19 Tutorial 6 - SUPERSONIC AND TRANSONIC FLOWS Tutorial 6.1 ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW ..... 6-2 Physical Problem Description ......................................................................... 6-2
ii Version 4.08

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 7 - MULTIPLE ROTATING REFERENCE FRAMES Introduction ..................................................................................................... 7-1 Physical Problem Description ......................................................................... 7-1 Tutorial 7.1 ROTATING-FRAME FAN ANALYSIS ............................................. 7-2 Pre-Processing ................................................................................................. 7-2 CFD Analysis ................................................................................................ 7-15 Post-Processing ............................................................................................. 7-15 Tutorial 8 - LAGRANGIAN TWO-PHASE FLOW Tutorial 8.1 STEADY FLOW WITH FUEL SPRAY INJECTION ......................... 8-2 Physical Problem Description ......................................................................... 8-2 Pre-Processing ................................................................................................. 8-2 User Subroutine ............................................................................................... 8-7 CFD Analysis .................................................................................................. 8-9 Post-Processing ............................................................................................... 8-9 Tutorial 8.2 TRANSIENT FLOW WITH FUEL SPRAY INJECTION ................ 8-17 Physical Problem Description ....................................................................... 8-17 Pre-Processing ............................................................................................... 8-17 CFD Analysis ................................................................................................ 8-19 Post-Processing ............................................................................................. 8-20 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
Version 4.08 iii

Post-Processing ............................................................................................. 9-38 Tutorial 9.3 C7H8 DROPLET COMBUSTION (EDBR, RADIATION) ............... 9-43 Pre-processing ............................................................................................... 9-43 User Subroutines ........................................................................................... 9-56 CFD Analysis ................................................................................................ 9-59 Post-Processing ............................................................................................. 9-59 Tutorial 9.4 HYDROGEN COMBUSTION (LAMINAR FLAMELETS) ............ 9-65 Pre-Processing ............................................................................................... 9-65 CFD Analysis ................................................................................................ 9-72 Post-Processing ............................................................................................. 9-72 Tutorial 10 - BUOYANCY AND RADIATION EFFECTS Introduction ................................................................................................... 10-1 Material Properties ........................................................................................ 10-2 Tutorial 10.1 BUOYANCY DRIVEN FLOW AROUND A HEATED FIN ......... 10-3 Pre-Processing ............................................................................................... 10-3 CFD Analysis ................................................................................................ 10-9 Post-Processing ............................................................................................. 10-9 Tutorial 10.2 SURFACE-TO-SURFACE RADIATION ..................................... 10-15 Pre-Processing ............................................................................................. 10-15 CFD Analysis .............................................................................................. 10-21 Post-Processing ........................................................................................... 10-21 Tutorial 10.3 RADIATION THROUGH A TRANSPARENT SOLID ............... 10-25 Pre-Processing ............................................................................................. 10-25 CFD Analysis .............................................................................................. 10-29 Post-Processing ........................................................................................... 10-29 Tutorial 11 - MOVING GRIDS Tutorial 11.1 FLOW AROUND TWO OPPOSING MOVING OBJECTS ........... 11-2 Physical Problem Description ....................................................................... 11-2 Pre-Processing ............................................................................................... 11-2 CFD Analysis .............................................................................................. 11-15 Post-Processing ........................................................................................... 11-15 Tutorial 11.2 MOVING-MESH RADIAL FAN ANALYSIS .............................. 11-19 Physical Problem Description ..................................................................... 11-19 Pre-Processing ............................................................................................. 11-20 CFD Analysis .............................................................................................. 11-37 Post-Processing ........................................................................................... 11-37

iv

Version 4.08

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 Tutorial 13 - AEROACOUSTIC ANALYSIS Introduction ................................................................................................... 13-1 Tutorial 13.1 STEADY FLOW AROUND A CYLINDER ................................... 13-2 Pre-Processing ............................................................................................... 13-2 CFD Analysis ................................................................................................ 13-5 Post-Processing ............................................................................................. 13-5 Tutorial 13.2 TRANSIENT FLOW AROUND A CYLINDER ........................... 13-11 Pre-Processing ............................................................................................. 13-12 User Subroutines ......................................................................................... 13-16 CFD Analysis .............................................................................................. 13-21 Post-Processing ........................................................................................... 13-22 Tutorial 14 - LIQUID FILM SIMULATION Tutorial 14.1 2D FILM FLOW DOWN A VERTICAL WALL ............................ 14-2
Version 4.08 v

Physical Problem Description ....................................................................... 14-2 Pre-Processing ............................................................................................... 14-3 CFD Analysis ................................................................................................ 14-7 Post-Processing ............................................................................................. 14-8 Suggestions for Further Exercises ............................................................... 14-11 Tutorial 14.2 SPRAY IMPINGEMENT ON A WALL ....................................... 14-13 Problem Description .................................................................................... 14-13 Pre-Processing ............................................................................................. 14-13 CFD Analysis .............................................................................................. 14-21 Post-Processing ........................................................................................... 14-22 Tutorial 14.3 LIQUID FILM STRIPPING AND RE-ENTRAINMENT ............. 14-25 Introduction ................................................................................................. 14-25 Physical Problem Description ..................................................................... 14-25 Pre-Processing ............................................................................................. 14-26 CFD Analysis .............................................................................................. 14-29 Post-Processing ........................................................................................... 14-29 Tutorial 15 - COAL COMBUSTION Physical Problem Description ....................................................................... 15-1 Modelling Strategy ........................................................................................ 15-1 Tutorial 15.1 ISOTHERMAL, NON-REACTING FLOW .................................... 15-3 Pre-Processing ............................................................................................... 15-3 CFD Analysis ................................................................................................ 15-7 Post-Processing ............................................................................................. 15-7 Tutorial 15.2 CONSTANT RATE DEVOLATILISATION ................................ 15-11 Pre-Processing ............................................................................................. 15-11 CFD Analysis .............................................................................................. 15-19 Post-Processing ........................................................................................... 15-19 Tutorial 15.3 TWO-COMPETING-STEPS DEVOLATILISATION .................. 15-25 Pre-Processing ............................................................................................. 15-25 CFD Analysis .............................................................................................. 15-27 Post-Processing ........................................................................................... 15-27 Tutorial 16 - LARGE EDDY SIMULATION OF FULLY-DEVELOPED CHANNEL FLOW Physical Problem Description ....................................................................... 16-1 Modelling Strategy ........................................................................................ 16-2 Tutorial 16.1 STEADY-STATE ANALYSIS ........................................................ 16-3 Pre-processing ............................................................................................... 16-3 CFD Analysis ................................................................................................ 16-3
vi Version 4.08

Post-Processing ............................................................................................. 16-4 Macro ............................................................................................................ 16-8 Tutorial 16.2 LARGE EDDY SIMULATION ..................................................... 16-11 Pre-Processing ............................................................................................. 16-11 User Subroutine ........................................................................................... 16-14 CFD Analysis .............................................................................................. 16-15 Post-Processing ........................................................................................... 16-15 Bibliography ................................................................................................ 16-23 Macros ......................................................................................................... 16-23

Version 4.08

vii

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

Basic Denitions
Throughout this volume, it is assumed that you will be using STAR-CDs Graphical User Interface facilities whenever possible. Therefore, the discussion is in terms of GUI operations (e.g. selecting items from a screen menu, clicking option buttons in a dialog box, etc.) unless the required action can only be performed by typing a command in pro-STARs I/O window. Most GUI facilities are incorporated in 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 nding your way around the system, plus various panels for detailed specication 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 conrms 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.08

Working with commands

Show pro-STAR Model Guide Display vertices Display boundaries Display splines Display blocks Turn edges on/off Plot with legend Plot four views View Controls

Turn mesh on/off Turn lights on/off Switch plot method Plot orientation cube Orientation slider controls Reset buttons

Zoom On Zoom Off Zoom Back Display coordinate systems Display the cell editor Display/edit a user table Store/recall set, surface or view Select a cell set Select a boundary set Select a block set Select a vertex set Select a spline set Select a couple set Select a droplet set

Throughout the document, > signs denote successive mouse clicks on menu names, menu list items, dialog box buttons, etc. For example Tools > Cell... > Set Active Type means click Tools on the main pro-STAR windows 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
Working with commands If you wish to run through any of the tutorials by working in command mode, you can: 1. Type in just the desired command name. This will cause pro-STAR to prompt
2 Version 4.08

Using tutorial command les

you for the required parameters and will also show you the system defaults. 2. Replace any number of commands with your own abbreviation, dened 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 les supplied in your STAR-CD installation CD-ROM (see the STAR-CD Installation and Systems Guide for more information). The les 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. Using tutorial command les The usual procedure for repeating the pre- or post-processing part of a tutorial via the supplied tutorial command files is as follows: 1. Create a directory for the tutorial and copy the prep.inp, post.inp and auxiliary les (e.g. user subroutines) to it. 2. If the tutorial involves a restart from a previous case, copy all STAR-CD generated les (e.g. tut.mdl, tut.ccmp, tut.ccmg, etc.) from their current location to the new directory. 3. For a pre-processing session, start up pro-STAR in the usual way, supply a tutorial name (e.g. tut) and then type the following command in the I/O window: ifile prep.inp Important Note: When running tutorials involving use of the screen cursor, make sure that both the main pro-STAR window and the graphics area within it remain at their normal (default) sizes. Altering these in any way will invalidate the screen coordinate information stored in le prep.inp and the tutorial will fail. 4. Following the automatic execution of all commands, terminate the pro-STAR session by typing. quit, save 5. The procedure for a post-processing session is identical to the above, except that the le name supplied is now post.inp and the run is terminated by typing quit, nosave

Version 4.08

Physical Problem Description

Tutorial 1 FLOW IN A MIXING PIPE


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

Figure T1.0-1

Mixing pipe geometry

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

Version 4.08

1-1

Physical Problem Description

Figure T1.0-2

Mixing pipe mesh

1-2

Version 4.08

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing Preliminaries

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION


Initiate a pro-STAR pre-processing session that builds a CFD model for a simple problem Alter uid properties Specify turbulence and thermal models Apply boundary conditions Perform a CFD analysis using the STAR-CD solver

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

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 restart from the model file mixing_pipe.mdl: Check that the Resume From Existing .mdl File option is selected Click Continue

If you have chosen to start from the coded files provided with STAR-CD: Click Continue Select File > Read Input Coded File... in the main pro-STAR window, as shown below:

Version 4.08

1-3

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing Mesh Checking

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: FLOW IN A MIXING PIPE Click Apply and Close

Mesh Checking

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

The I/O window states that the mesh contains 82,339 cells. Rotating the mesh by holding the left mouse button whilst dragging the cursor across the display window should not reveal any malformed or irregular cells on the
1-4 Version 4.08

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing Mesh Checking

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

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

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

Version 4.08

1-5

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing Mesh Checking

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

. Light

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

Figure T1.1-1

Clipped hidden view of mixing pipe mesh interior

1-6

Version 4.08

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing Basic Problem Settings

Basic Problem Settings

Most pre-processing operations are performed using various panels of the pro-STAR Model Guide. The first panel to check is Analysis Features at the top of 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 Properties Before any boundary conditions can be applied, appropriate fluid properties must be specified. The panel to check for this is Molecular Properties, located inside the Thermophysical Models and Properties and Liquids and Gases folders: Select the Thermophysical Models and Properties folder Select the Liquids and Gases sub-folder Open the Molecular Properties (Fluids) panel

Version 4.08

1-7

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing Material Properties

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 panels options are suitable for the analysis so:
1-8

Click Apply
Version 4.08

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 Locations Meshes such as this one created using pro-STARs Automated Meshing module automatically include boundary definitions on all mesh surfaces. To display these boundaries: Select B > All in the 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.

Version 4.08

1-9

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing Boundary Locations

Figure T1.1-2

Default boundaries displayed on a clipped hidden view of the mesh

Most of these regions correspond to parts of the mixing pipe wall and are redundant for the purposes of this tutorial. They may therefore be combined into a single region and assigned the appropriate wall boundary conditions. In doing this, one can take advantage of a useful pro-STAR feature that (a) assigns all cell faces on the mesh surface for which no boundaries have been specied 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 pipes rst inlet plane, as shown in Figure T1.1-3. The information displayed on the I/O window will indicate that the region number corresponding to this inlet is 14.

1-10

Version 4.08

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing Boundary Locations

Select a boundary here

Figure T1.1-3

Selecting a boundary on the rst inlet

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

Version 4.08

1-11

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing Boundary Locations

Select a boundary here

Figure T1.1-4

Selecting a boundary on the second inlet

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

1-12

Version 4.08

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing Boundary Locations

Select a boundary here

Figure T1.1-5

Selecting a boundary on the outlet

To verify that the above operations have been performed correctly: Enter the following command in the I/O window: COUNT BOUNDARY The resulting I/O window output should be as shown below, indicating that all inlet/outlet boundaries have been excluded; hence all those remaining in the set are the (redundant) wall boundaries created by the AutoMesh Module.

To delete these boundaries: Enter the following command in the I/O window: BDEL BSET
Version 4.08 1-13

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing Boundary Conditions

Display the remaining boundaries: Select B > All Change back to a Hidden Surface plot Select View > Isometric > -1,-1,1 to display Figure T1.1-6

Figure T1.1-6

Boundary display with a single (default) wall boundary region

Boundary Conditions

Specify boundary conditions at the inlets and outlet as follows: Select the Dene Boundaries folder in the pro-STAR Model Guide Open the Dene Boundary Regions panel In the boundary regions list, select region 0 (the default boundary region) and note that it is dened as a stationary, no-slip, adiabatic wall, as required Select region 14, the rst inlet, from the boundary regions list Choose Inlet from the Region Type drop-down menu Enter boundary conditions as shown below:

1-14

Version 4.08

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing Boundary Conditions


Version 4.08

Click Apply Select region 22, the second inlet, from the boundary regions list Choose Inlet from the Region Type drop-down menu
1-15

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing Boundary Conditions

Enter boundary conditions as shown below:

1-16

Click Apply
Version 4.08

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing Set Run Time Controls

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

Figure T1.1-7

Boundary conditions shown on mesh plot

This completes the boundary condition setup. Turn off the Display Boundaries option by clicking the button,

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.

Version 4.08

1-17

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

CFD Analysis Running From The Command Line

CFD Analysis There are two ways of running a STAR-CD analysis: 1. Save the geometry and problem les 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 Both of these are described below. Running From The Command Line Begin by writing the geometry and problem files, save the model file and then quit pro-STAR: In the pro-STAR window, select File > Save Geometry... to open the Save Geometry File dialog 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 Select File > Quit > Save & Quit

At the command line enter the following: star The analysis will start and the results will be displayed in your sessions window. Once it is complete, pro-STAR may be restarted and the results post-processed as described in the second part of this tutorial. Running Interactively The pro-STAR Model Guides Run Analysis Interactively panel activates the STAR 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.

1-18

Version 4.08

Tutorial 1.1

POST-PROCESSING

Post-Processing Preliminaries

Tutorial 1.1

POST-PROCESSING
Initiate a pro-STAR post-processing session for evaluating the solution results produced by STAR-CD for a simple problem Create simple vector and contour plots Produce plots of particle tracks Combine particle tracks with vector or contour plots

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

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

Read in the results of the analysis: Select the Post-Processing folder Open the Load Data panel to display the File(s) tab Click Open Post le

Contour Plots

The first plot to be drawn is a contour plot of temperature on the surface of the mixing pipe: Select the Data tab in the Load Data panel Turn On the Smooth option Select item Temperature from the Scalar Data list

Version 4.08

1-19

Tutorial 1.1

POST-PROCESSING

Post-Processing Contour Plots

Click Get Data Open the Create Plots panel Under the 3-D Surface tab, select options Contour (lled) and Edge

1-20

Version 4.08

Tutorial 1.1

POST-PROCESSING

Post-Processing Contour Plots

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

Figure T1.1-8

Temperature contours on the mesh surface

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

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 (lled) and Edge Change the Normal coordinates to 0, 1, 0
1-21

Tutorial 1.1

POST-PROCESSING

Post-Processing Contour Plots

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

1-22

Version 4.08

Tutorial 1.1

POST-PROCESSING

Post-Processing Velocity Vector Plots

Figure T1.1-9

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

Velocity Vector Plots

Velocity vectors will first be plotted on the mesh surface: Open the Load Data panel Turn Off the Smooth option Select Velocity Components UVW from the Vector Data list Click Get Data Open the Create Plots panel Under the 3-D Surface tab, select options Vector and Edge Click Plot to Screen to display Figure T1.1-10

Version 4.08

1-23

Tutorial 1.1

POST-PROCESSING

Post-Processing Velocity Vector Plots

Figure T1.1-10

Velocity vectors displayed on the mesh surface

It can be seen that the flow field pattern cannot be seen very clearly as Figure T1.1-10 displays far too many vectors. Therefore, the following measures may be taken to thin out the vectors and generally improve the clarity of the plot: Select the Vectors tab in the Create Plots panel Adjust the Thin Vectors slider so that it is at approximately 0.25 Change the Scale Factor to 0.7 to make each vector arrow shorter Change the Fraction Length of Arrow Head to 0.3 to make each arrow head larger

1-24

Version 4.08

Tutorial 1.1

POST-PROCESSING

Post-Processing Velocity Vector Plots

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

Figure T1.1-11
Version 4.08

Thinned out velocity vectors displayed on the mesh surface


1-25

Tutorial 1.1

POST-PROCESSING

Post-Processing Velocity Vector Plots

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

Figure T1.1-12

Velocity vectors displayed on an x-z plane

The vectors shown in Figure T1.1-12 are too thinly spaced near the centre of the model geometry. However, this is not the case near the walls where the presence of a finer mesh results in more vectors being displayed. A plot with evenly distributed vectors across the plane can be achieved using the Presentation Grid facility: Select the Vectors tab in the Create Plots panel Turn On the Presentation Grid facility The presentation grid is dened 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.

1-26

Version 4.08

Tutorial 1.1

POST-PROCESSING

Post-Processing Velocity Vector Plots

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

Figure T1.1-13
Version 4.08

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


1-27

Tutorial 1.1

POST-PROCESSING

Post-Processing Particle Tracks

Particle Tracks

An effective way of visualising a flow pattern is to draw tracks of imaginary massless particles introduced into to the flow at specified points. Here we will draw tracks of particles introduced at the smaller inlet: In the Post-Processing folder, select sub-folder Particle Tracks Open the Particle Initialization panel Select Boundary Faces for the Particle Location Type Select Bset from the drop-down menu that appears underneath

Before continuing, it is necessary to collect the inlet boundary faces from which particles will originate into a boundary set: In the pro-STAR window, select a Geometry plot and Hidden Surface plot type 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:

1-28

Version 4.08

Tutorial 1.1

POST-PROCESSING

Post-Processing Particle Tracks

Select boundaries here

Figure T1.1-14

Selecting boundary faces on the smaller inlet

Click the Done button at the top right of the screen to end cursor selection Click Replot to display a plot similar to that shown in Figure T1.1-15. Note that the exact boundaries chosen are not important in this case

Version 4.08

1-29

Tutorial 1.1

POST-PROCESSING

Post-Processing Particle Tracks

Figure T1.1-15

Boundaries selected as starting points for particle tracks

Click Apply in the Particle Initialization panel Select the Particle Generation panel


1-30

Click Generate Tracks Open the Plot Particles panel Change the Display option to Continuous Click Plot Tracks
Version 4.08

Tutorial 1.1

POST-PROCESSING

Post-Processing Particle Tracks

Click the Zoom Off button, T1.1-16

, in the pro-STAR window to display Figure

Figure T1.1-16

Tracks of particles introduced at the smaller inlet

Figure T1.1-16 illustrates very clearly the swirling nature of the flow. Particle tracks can also be plotted together with vectors or contours by producing such a plot after displaying the particle tracks: 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 (lled) and Edge Click Plot to Screen to display Figure T1.1-17

Version 4.08

1-31

Tutorial 1.1

POST-PROCESSING

Post-Processing Particle Tracks

Figure T1.1-17

Particle tracks displayed with a temperature contour plot

Note that in order to produce further plots of vectors or contours without the particle tracks, you will need to return to the 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.

1-32

Version 4.08

Physical Problem Description

Tutorial 2 EVALUATION OF MESH EFFECTS


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

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

300 Inlet

Outlet

40 320 10

Wall 870

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

Figure T2.0-1

Problem geometry

The same problem is modelled using three different meshes: a hexahedral, a tetrahedral and a polyhedral mesh. All three are based on the same initial shell surface defining the problem geometry but each mesh was produced using different
Version 4.08 2-1

Physical Problem Description

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

2-2

Version 4.08

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Pre-Processing Preliminaries

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS


Model a 3D ow using a simple hexahedral mesh Apply, and verify the use of, a two-layer turbulence model Use a pre-dened table to describe a boundary condition Produce contour plots of wall data Produce and customize graphs of cell and wall data

This tutorial will show the user how to:

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 le Format Check that the default cell and vertex les 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

Version 4.08

2-3

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Pre-Processing Material Properties

Figure T2.1-1

Hexahedral mesh

There are currently no boundaries attached to the grid as only the cell and vertex data have been imported. To import boundary definitions from the boundary file: Select folder Locate Boundaries in the pro-STAR Model Guide and open the Import Boundaries panel The boundary le is hex.bnd. This should be displayed in the File Name box Click Apply

Now the boundaries can be displayed: In the main pro-STAR window, choose B > All Click the Display Boundaries button,

Hide the boundary regions again: Material Properties Click off the Display Boundaries option by clicking the button again

Check the default fluid property settings. The only property data needed for an isothermal and incompressible flow are fluid density and molecular viscosity. Select folder Thermophysical Models and Properties in 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

Open the Turbulence Models panel Select On for the Turbulence modelling option
Version 4.08

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Pre-Processing Fluid Initialization

Select option k-Epsilon/High Reynolds Number from the Model menu in the Turbulence tab Click Apply

A two-layer model is to be used to account for turbulence near the walls. The near-wall layer thickness should be large enough to fully encompass the boundary layer (but not too large, as the computational time will increase unnecessarily). To define the two-layer model: Select the Near-Wall Treatment tab Turn On the Standard Two-Layer model Select option Wolfstein from the 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

Choose a cell just above the obstacle as the monitoring location. Fluid Initialization Open the Monitoring and Reference Data (Fluids) panel Type 29772 in the Monitoring Cell Number box Type 93 in the Pressure Cell Number box. This is a cell on the wall near to the inlet. Click Apply

Set the initial velocity and turbulence parameters as follows: Open the Fluid Initialization panel in the Liquids and Gases sub-folder Ensure that Constant is selected from the Options menu On the Flow Conditions tab, enter 1.0 for U-velocity Under the Turbulence tab, select Tl/Mixing Length from the Model section Change the Intensity to 0.03 Change the Mixing Length value to 0.03 Click Apply

Boundary Conditions

Having imported the boundary location definitions and their associated region numbers, boundary conditions are specified as follows: For the wall (region 0): Select folder Dene Boundaries Open the Dene 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

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


Version 4.08

Select region no. 1 in the region scroll list Select Table from the User Option menu Click the le browser button to select the table le inlet.tbl, Click Open to exit from the le browser Select option k/Epsilon from the Turbulence Switch menu
2-5

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Pre-Processing Analysis Controls

Type inlet values for the turbulence parameters; 0.024 m2/s2 in the k box and 0.07 m2/s3 in the Epsilon box. Click Apply

For the outlet (region 2): Ensure that the Flow Split is set to 1 Click Apply

No user input is required for the last (symmetry plane) boundary region. Check the model by displaying some key parameters in the I/O window (number of cells and cell types, boundary regions, etc.) and then save the model data. Analysis Controls In the main pro-STAR window, select Utility > Count > All Select File > Save Model

Use of a second-order differencing scheme can significantly increase the accuracy of the solution. Select MARS as the differencing scheme for this analysis: Select folder Analysis Controls in 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: Final Operations 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 250 Click Apply

The pre-processing task is now complete. If you wish to terminate the session at this stage, save all model data for the hexahedral mesh, write the geometry and problem files and exit from pro-STAR, as shown below. Alternatively, you may continue with the CFD analysis, using the 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
Version 4.08

2-6

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

CFD Analysis Preliminaries

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: Basic Plots Select folder Post-Processing Open the Load Data panel and display the File(s) tab Click Open Post le

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

Version 4.08

2-7

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Post-Processing Basic Plots

Figure T2.1-2

Velocity vector plot on the symmetry plane

As expected, a recirculation zone is observed downstream of the obstacle. Zoom in using the mouse to examine it more closely. Now examine the pressure distribution: 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 Contour (lled) from the Option menu and Edge from the Edge/Mesh menu In the Options tab, ensure that User is selected from the Range menu Enter a Range of -1.9 to 0.6 Click Apply Under the Section/Clipped tab, click Plot to Screen and zoom out to display Figure T2.1-3

2-8

Version 4.08

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Post-Processing Basic Plots

Figure T2.1-3

Filled contour plot of pressure on the symmetry plane

Plot the vertex-based turbulence kinetic energy and dissipation rate: In the Options tab check User is selected from the Range list and enter values 0 to 0.2 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.1-4 Select item Dissipation Rate from the Scalar Data list Click Get Data In the main window, click Replot

To apply a more suitable scale to the plot: Return 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.1-5

Version 4.08

2-9

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Post-Processing Validation of Results

Figure T2.1-4

Contour plot of turbulence kinetic energy on the symmetry plane


S

Figure T2.1-5

Contour plot of turbulence dissipation rate on the symmetry plane

Validation of Results

In Tutorial 2.2 and 2.3, tetrahedral and polyhedral cells will be used to mesh the same problem. In order to ensure that the three meshes are comparable, the distribution of y+ values at the wall boundaries will be noted for each of them. 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
Version 4.08

2-10

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Post-Processing Validation of Results

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, 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 VIEW -0.5 0.5 -1.0 Click Replot to display Figure T2.1-6

, in the

Figure T2.1-6

y+ values plotted on the walls

This plot shows that the y+ values never exceed 6.1 and that for the vast majority of the flow regime they are below 3.0, the maximum value considered acceptable for a rigorous examination of wall data. To check whether the near-wall layer thickness in the turbulence model (see page 2-5) was given a reasonable value:
Version 4.08

In the Load Data panel, select Data Type Cell Ensure the Smooth option is turned Off Choose Two Layer from the Scalar Data list
2-11

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Post-Processing Graph Plotting

Click Get Data Go to the Create Plots panel In the Section/Clipped tab select Contour (lled) 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.

Figure T2.1-7

Plot demonstrating correct application of two-layer model

Graph Plotting

It is sometimes useful to display the results of the analysis as x-y graphs, bar charts or pie charts. When combined with various data manipulation functions (e.g. OPERATE or ROPERATE), such pro-STAR facilities constitute powerful tools for display and analysis. Some of the codes x-y graph plotting capabilities are demonstrated in this part of the tutorial. The following operations are normally necessary for producing an x-y graph: Extract and prepare the data to be plotted Store the data in graph registers Create graphs by plotting the contents of any register against those of another register Combine several graphs into pro-STARs basic graph entity, called a frame Dene essential information for each frame, such as axis scaling, legends and
Version 4.08

2-12

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Post-Processing Simple Graphs

graph labels Display the frame

One does not need to follow the entire procedure outlined above. Default settings can often be used, as shown in the examples below. Simple Graphs The first requirement is to assemble a set of U velocity magnitude values along a line on the symmetry plane located at x = 230 mm. The graph will plot the U velocity (the abscissa) against the y-coordinate (the ordinate). To do this, and produce a default graph, proceed as follows: Not all the graph specication 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 MEMORY MAXPRB 1000 in the I/O window Ensure that Line dened by End points is selected Specify these end points to be 230, 0, 0 and 230, 300, 0 Scalar post data is, by default, stored in post register 4 so choose Post 4 as the post register from which to load eld data, Post data to load Go to the Data tab of the Load Data panel 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 Click Create Graph to see a default graph of the data, as shown in Figure T2.1-8

Version 4.08

2-13

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Post-Processing Customizing Graphs

Figure T2.1-8

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

Customizing Graphs

It is clear that the default graph is not exactly what is required. To swap the axes 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 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 prole at x = 230 mm, in the text box
Version 4.08

2-14

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Post-Processing Customizing Graphs

underneath. Specify the labels location by entering coordinates (3.5, 9.0) in the Sx and Sy boxes Click Apply In the main window, click Redraw to display the modied 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-STARs built-in le 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

Version 4.08

2-15

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Post-Processing Wall Shear Force

Figure T2.1-9

Comparison of U velocity prole with experimental results

The numerical results are within 10% of the experimental results in the region in which the experiment was carried out (0 < Y (mm) < 180). Wall Shear Force In this case, wall shear force is a useful quantity for judging the length of the circulation zone; i.e., the re-attachment point of the recirculation zone can be determined by finding the point on the bottom wall at which the wall shear force is zero. This may be determined approximately by using a wall plot, as in Figure T2.1-6, but a more accurate method is to plot a graph. The x-component of the wall shear force is by far the greatest, so it can be used in place of the total wall shear force scalar. The former is a more suitable choice because its sign also indicates the flow direction. On the other hand, the total wall shear force scalar is positive everywhere and so a minimum value would need to be used to estimate the re-attachment point instead of a zero value. To produce such a graph: Click 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 Choose to plot the graph data against the X-axis Click Create Graph

To customize the graph:


2-16 Version 4.08

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Post-Processing Final Operations

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

Figure T2.1-10

Graph of wall shear force along the bottom wall

The recirculation zone extends roughly 800 mm downstream of the obstacle. Final Operations This tutorial is now complete. Exit pro-STAR by selecting: File > Quit > Quit, Nosave

Version 4.08

2-17

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Pre-Processing

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

This tutorial tackles exactly the same problem as Tutorial 2.1 except that, in this case, a tetrahedral mesh is used instead of a hexahedral one. The dimensions of individual cells are approximately the same as in the hexahedral mesh. Particular care is also taken to ensure that the near-wall cells are of the same thickness. This tutorial will show the user how to: Model a 3D ow using a simple tetrahedral mesh Apply, and verify the use of, a two-layer turbulence model Produce contour plots of wall data Produce and customize graphs of cell and wall data

Pre-Processing Create a directory for this tutorial (called tut2-2) and copy the coded files provided supplied with the STAR-CD installation (tet.cel, tet.vrt and tet.bnd) into it. Also copy the table file inlet.tbl and the text file exp230.xy., containing the inlet velocity profile and experimental data. Start up pro-STAR in this directory: Type prostar at the command line Choose the graphics driver (mesa 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 le Format Check that the default cell and vertex les 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 le is tet.bnd. This should be displayed in the File Name text box Click Apply

To display the grid:


Version 4.08

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


2-19

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Pre-Processing Material Properties

Select View > Isometric > -1,1,1 Click Cplot to display Figure T2.2-1

Figure T2.2-1

Tetrahedral mesh

To display the boundaries: Select B > All Click the Display Boundaries button, Check visually that all boundaries are appropriate to the case and then click the button again to switch boundaries off

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 Properties The default fluid property values are those of air at standard temperature and pressure. No change to these is necessary. Turn on the standard k- turbulence model:
2-20

Select folder Thermophysical Models and Properties in the pro-STAR Model Guide Select sub-folder Liquids and Gases Open the Turbulence Models panel Select On for the Turbulence modelling option Select option k-Epsilon/High Reynolds Number from the Model menu
Version 4.08

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Pre-Processing Fluid Initialization

Click Apply

A two-layer model is to be used to account for turbulence near the walls. The near-wall layer thickness should be large enough to fully encompass the boundary layer. To define the two-layer model: Select the Near-Wall Treatment tab Turn On the Standard Two-Layer model Select option Wolfstein as the Two-Layer Model Change the Near Wall 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: Fluid Initialization 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 specied in Tutorial 2.1 Click Apply

Set the initial velocity and turbulence parameters as follows: Open the Fluid Initialization panel in the Liquids and Gases sub-folder Ensure that Constant is selected from the Options menu On the Flow Conditions tab, enter 1.0 for U-velocity Under the Turbulence tab, select Tl/Mixing Length from the Model section Change the Intensity to 0.03 Change the Mixing Length value to 0.03 Click Apply

Boundary Conditions

Having imported the boundary location definitions and their associated region numbers, boundary conditions are imposed as follows: For the wall (region 0): Select folder Dene Boundaries Open the Dene Boundary Regions panel Select region no. 0 in the region scroll list Select Active from the Two-Layer pull-down menu Click Apply

For the inlet (region 1): Select region no. 1 in the region scroll list Select Table from the User Option menu Click the le browser button and select the table le inlet.tbl Click Open to exit from the le browser Select option k/Epsilon from the Turbulence Switch menu Type inlet values for the turbulence parameters; 0.024 in the k box and 0.07 in the Epsilon box. Click Apply

For the outlet (region 2):


Version 4.08 2-21

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Pre-Processing Analysis Controls

Ensure that the Flow Split is set to 1 Click Apply

No user input is required for the last (symmetry plane) boundary region. Analysis Controls Use of a second-order differencing scheme can significantly increase the accuracy of the solution. Select MARS as the differencing scheme for this analysis: 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 250 Click Apply

Check the model: Final Operations In the Model Validation panel Select All Click Apply

The pre-processing task is now complete. If you wish to terminate the session at this stage, save all model data for the tetrahedral mesh, write the geometry and problem files and exit from pro-STAR, as shown below. Alternatively, you may continue with the CFD analysis, using the 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

2-22

Version 4.08

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

CFD Analysis Preliminaries

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: Basic Plots Select folder Post-Processing Open the Load Data panel and display the File(s) tab Click Open Post le

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

Version 4.08

2-23

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Post-Processing Basic Plots

Figure T2.2-2

Plot of velocity vectors on the symmetry plane

The plot shows very few differences to that in Figure T2.1-2, the most obvious being a slightly smaller recirculation zone. Now examine the pressure distribution: 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 (lled) 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

2-24

Version 4.08

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Post-Processing Basic Plots

Figure T2.2-3

Plot of pressure contours on the symmetry plane

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

Version 4.08

2-25

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Post-Processing Validation of Results

Figure T2.2-4

Contours of turbulence kinetic energy on the symmetry plane

Figure T2.2-5

Contours of turbulence dissipation rate on the symmetry plane

Validation of Results

Plot the y+ values at the wall boundaries to help verify the suitability of the mesh 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
Version 4.08

2-26

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Post-Processing Validation of Results

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 VIEW -0.5 0.5 -1.0 in the I/O window Click Replot to display Figure T2.2-6

Figure T2.2-6

y+ values plotted on the walls

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

In the Load Data panel, select Data Type Cell Ensure the Smooth option is turned Off Choose Two Layer from the Scalar Data list
2-27

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Post-Processing Simple Graphs

Click Get Data Go to the Create Plots panel In the Section/Clipped tab select Contour (lled) 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.

Figure T2.2-7

Plot demonstrating correct application of two-layer model

Simple Graphs

Graphs similar to those in Tutorial 2.1 will be created next. The first requirement is to assemble a set of U velocity magnitude values along a line located at x = 230 mm, z = 0 mm. The graph will plot the U velocity (the abscissa) against the y-coordinate (the ordinate). To do this, and produce a default graph, proceed as follows: Not all the graph specication 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
Version 4.08

2-28

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Post-Processing Customizing Graphs

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 dened 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 MEMORY MAXPRB 1000

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

Customizing Graphs

The default graph presentation needs to be adjusted. To do this we swap the axes 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 prole 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 modied graph
2-29

Version 4.08

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Post-Processing Customizing Graphs

Experimental results are provided in a coded (text) file. To plot these on the same graph and hence check the validity of the numerical results: Open the External Data panel The required File Name is exp230.xy. Find it using pro-STARs built-in le 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

2-30

Version 4.08

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Post-Processing Wall Shear Force

Figure T2.2-8

Comparison of U velocity prole with experimental results

As with the hexahedral mesh, the numerical results are within 10% of the experimental results in the region in which the experiment was carried out (0 < Y (mm) < 180). Wall Shear Force To produce a graph of wall shear force: Click 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

To customize the graph:


Version 4.08

Go to the Customize Graphs panel Under the Display tab, Specify the graph Location as having parameters X1 = 2.0, Y1 = 2.35, X2 = 9.0, Y2 = 8.65 Click Apply In the Axis tab, choose X-Axis for the Parameters option Change Xmin and Xmax to 330 and 1200, respectively Change the Numbers type to Integer and the Title to X - mm Click Apply
2-31

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Post-Processing Final Operations

For the Y-Axis Parameters, change the Title to Shear Force - N Change the Title Location to 0.5, 6.8 Click Apply Go to the Options tab In the Additional Graph Labels section, select label no. 1 in the scroll list and then enter the desired label, Wall Shear Force at y = 0, downstream of obstruction, in the text box underneath. Specify the labels location by entering coordinates (2.5, 9.0) in the Sx and Sy boxes Click Apply then Draw All Frames to display Figure T2.2-9

Figure T2.2-9

Graph of wall shear force along the bottom wall

The irregularity of the tetrahedral mesh leads to a less smooth shear stress profile compared to that for the hexahedral mesh. Even so, the predicted recirculation zone length can easily be measured. Final Operations This tutorial is now complete. Exit pro-STAR by selecting: File > Quit > Quit, Nosave

2-32

Version 4.08

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Pre-Processing

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS


Model a 3D ow using a simple polyhedral mesh Apply, and verify the use of, a two-layer turbulence model Produce contour plots of wall data Produce and customize graphs of cell and wall data Draw comparisons between different mesh types

This tutorial will show the user how to:

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 le Format Check that the default cell and vertex les 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

Version 4.08

2-33

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Pre-Processing Material Properties

Figure T2.3-1

Polyhedral Mesh

Material Properties

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

Set the monitoring and pressure reference cell locations to be equivalent to those chosen in the previous two tutorials: Fluid Initialization 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 initial velocity and turbulence parameters as follows: Open the Fluid Initialization panel in the Liquids and Gases sub-folder Ensure that Constant is selected from the Options menu On the Flow Conditions tab, enter 1.0 for U-velocity Under the Turbulence tab, select Tl/Mixing Length from the Model section
Version 4.08

2-34

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Pre-Processing Boundary Conditions

Boundary Conditions

Change the Intensity to 0.03 Change the Mixing Length value to 0.03 Click Apply

Activate the two-layer turbulence model at all wall boundaries: Select folder Dene Boundaries Open the Dene Boundary Regions panel Select region 0 Wall from the list Change the Two-Layer option to Active Click Apply

Specify conditions at the inlet and outlet: Analysis Controls Select region 1 Inlet from the list Select Table from the User Option menu Click the le browser button and select the table le inlet.tbl Click Open to exit from the le browser Select option k/Epsilon from the Turbulence Switch menu Specify k to be 0.024 m2/s2 and Epsilon to be 0.07 m2/s3 Click Apply Select region 2 Outlet from the list Ensure that the Flow Split is set to 1 Click Apply

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 the MARS Differencing Scheme for momentum and turbulence Click Apply

Set the frequency of data output to the solution file and specify that wall data are to be stored in it: Final Operations 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

The pre-processing task is now complete. If you wish to terminate the session at this stage, save all model data for the polyhedral mesh, write the geometry and problem files and exit from pro-STAR, as shown below. Alternatively, you may continue with the CFD analysis, using the 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
2-35

Version 4.08

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

CFD Analysis Preliminaries

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: Basic Plots Select folder Post-Processing Open the Load Data panel and display the File(s) tab Click Open Post le

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

2-36

Version 4.08

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Post-Processing Basic Plots

Figure T2.3-2

Velocity vector plot

The vector plot is, again, quite similar to those shown in Figure T2.1-2 and Figure T2.2-2. However, as with the tetrahedral mesh, the recirculation zone appears slightly shortened. Now examine the pressure distribution: 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 (lled) 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

Version 4.08

2-37

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Post-Processing Basic Plots

Figure T2.3-3

Pressure contour plot

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

2-38

Version 4.08

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Post-Processing Validation of Results

Figure T2.3-4

Contours of turbulence kinetic energy

Figure T2.3-5

Contours of turbulence dissipation rate

Validation of Results

Plot the y+ values at the wall boundaries to help verify the suitability of the mesh 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
2-39

Version 4.08

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Post-Processing Validation of Results

Select item YPLUS from the Scalar Data list Click Get Data

Since wall data are stored in specially created shells at the wall surfaces (cell type no. 5), it is necessary to assemble a new cell set that contains only these shells: Type VIEW -0.5 0.5 -1.0 in the I/O window In the main window, click the button to deselect the Display Edges option Select a Hidden Surface plot Select Plot > Wplot Select C > New > Type and click anywhere on the upper wall boundary Select Post > Caverage > Cset Select Plot > Wplot to display Figure T2.3-6

Figure T2.3-6

y+ values plotted on the walls

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

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
Version 4.08

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Post-Processing Comparative Graphs

In the Section/Clipped tab select Contour (lled) 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.

Figure T2.3-7

Plot demonstrating correct application of two-layer model

Comparative Graphs

Instead of plotting graphs showing just the current results, as in Tutorial 2.1 and Tutorial 2.2, we will now plot graphs comparing results from all three meshes with each other and with the experimental data. Files containing experimental data and also those obtained in Tutorial 2.1 and Tutorial 2.2 should have been copied into the working directory at the beginning of this tutorial. Begin by plotting a graph of U velocity at x = 330mm, z=0mm against the y-coordinate. Given the structure of the mesh, however, set z to 0.00001mm to ensure that all the vertices representing the data points are found correctly. 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 dened by End points is selected Specify these end points to be 330, 0, 0.00001 and 330, 300, 0.00001
2-41

Version 4.08

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Post-Processing Comparative Graphs

Choose Post 4 for the Post data to load Go to the Data tab of 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 MEMORY MAXPRB 2000

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.7 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 prole at x = 330 mm in the text box underneath. Enter coordinates (3.0, 9.0) in the Sx and Sy boxes Click Apply In the main window, click Redraw to display the modied graph

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 le 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 le manager
Version 4.08

2-42

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Post-Processing Comparative Graphs

Select xyxyxy from the Establish X-Y pairs list Click Create Graph Select File exp330.xy using the le 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.

Figure T2.3-8

Graph comparing U velocity data at x = 330 mm

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

Version 4.08

2-43

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Post-Processing Comparative Graphs

Figure T2.3-9

Graph comparing U velocity data at x = 30 mm

Figure T2.3-10

Graph comparing U velocity data at x = 230 mm

2-44

Version 4.08

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Post-Processing Final Operations

Figure T2.3-11

Graph comparing U velocity data at x = 380 mm

The results from the three meshes show broad agreement with the experimental data, although all of them also show discrepancies, primarily in the recirculation zone. In this region in particular, the hexahedral mesh is marginally more accurate than the other two. However, examination of the model size and number of iterations and time required to reach convergence (shown in Table 1) shows that the polyhedral mesh may be preferable. Table 1:Comparison of run data Mesh Hexahedral Tetrahedral Polyhedral No. of cells 67699 140141 60838 No. of CPU Time (s)a iterations 212 203 92 396 681 217

a.Run time will vary with computer speed

The polyhedral mesh fills the problem geometry much more efficiently, allowing fewer cells to be used and run times to be reduced without significantly degrading the solution accuracy. Conversely, a polyhedral mesh with as many cells as the tetrahedral mesh in Tutorial 2.2 would be expected to produce a significant increase in accuracy with little increase in run time. Final Operations This tutorial is now complete. Exit pro-STAR by selecting: File > Quit > Quit, Nosave

Version 4.08

2-45

Tutorial 3 POROUS MEDIA FLOW


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

Figure T3.0-1

Mesh geometry

Version 4.08

3-1

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Physical Problem Description Preliminaries

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM


Model ow through an isotropic, highly porous medium Produce vector and contour plots Compute sums and averages of eld data Check the validity of the porous model

This tutorial aims to demonstrate how to:

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

In the main window, select File > Model Title...


Version 4.08

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Pre-Processing Mesh Checking

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

Mesh Checking

Click Apply and Close

Verify that the mesh data are correct by selecting all cells and vertices and plotting the mesh in Hidden Surface mode: In the main window, select C > All. The I/O window tells you that the mesh read in has 29,108 cells. Select V > All. The I/O window tells you that the mesh has 103,488 vertices. Check Hidden Surface is selected as the cell plot type Select Plot > Up Axis > Z Set the viewpoint by selecting View > Isometric > -1,1,1 Click Cplot

The mesh geometry is shown in Figure T3.0-1 Material Properties This part of the model building is conveniently handled through a series of panels under the Thermophysical Models and Properties folder. Open the Thermophysical Models and Properties folder to display the available facilities Select sub-folder Liquids and Gases Open the Molecular Properties (Fluids) panel

In this tutorial, the fluid is air at standard pressure and temperature and its temperature, density and viscosity are assumed to be constant. These conditions are also the pro-STAR defaults, so the properties shown on the panel are acceptable. Open the Turbulence Models panel Select On for Turbulence to set up a turbulent ow 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 ow variable values will be sent to the solution monitoring le (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 Editors scroll list Select Fluid from the Cell Type menu Change the value in the Porosity Index box to 1 Type POR1 in the Name box Click Apply and then Close

Version 4.08

3-3

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Pre-Processing Material Properties

Specify the resistance coefficients in the global Cartesian directions: Go to the Thermophysical Models and Properties folder in the pro-STAR Model Guide Select sub-folder Porosity Open the Porous Resistance and Porosity panel Check that option By Local Coordinate System is selected from the Dene (X1,X2,X3) menu and 1 is entered in the Coordinate System box Type 25 for Alpha in the X1, X2, and X3 boxes Type 1500 for Beta in the X1, X2, and X3 boxes Leave the Porosity at its default value of 1 Click Apply

Collect all cells that will take on porous properties into a set: Select View > Axis > -X Select C > Unselect > Type and click on any of the blue extrusion-layer cells Click 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

3-4

Version 4.08

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Pre-Processing Material Properties

Figure T3.1-1

Catalyst ring

Assign the selected cells to the currently active cell type (no. 2) and plot: In the main window, select Tools > Cell... 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

Version 4.08

3-5

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Pre-Processing Boundary conditions

Figure T3.1-2

Mesh geometry displaying porous subdomain

Boundary conditions

Specify boundary conditions for the inlet and outlet boundary regions: Select folder Dene Boundaries and then open the Dene 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:

3-6

Version 4.08

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Pre-Processing Final Operations

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

Check visually that the boundary conditions are applied correctly: Final Operations Click the Display Boundaries button, Select B > All Click Cplot

The pre-processing task is now complete. If you wish to terminate the session at this stage, save all model data, write the problem and geometry files and exit from pro-STAR, as shown below. Alternatively, you may run STAR interactively, as described in the next section. In the main pro-STAR panel, select File > Save Geometry... Set the Geometry Scale Factor to 0.1. This gives the catalyst a realistic maximum diameter of 10cm Click Apply. Ignore the I/O window warning regarding the scale factor Click Close Select File > Save Problem... In the Save Problem File dialog, click Save Select File > Quit > Save & Quit
3-7

Version 4.08

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

CFD Analysis Preliminaries

CFD Analysis To perform the analysis interactively, proceed as follows: In the main pro-STAR panel, select File > Save Model In the Analysis Preparation 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 le

You are now ready to start the post-processing session. Postprocessing Load the velocity vector components and then plot the vectors: 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 menu and select Edge from the Edge/Mesh menu Change the Normal vector to -1, 0, 0 Click Apply Click Plot to Screen Click off the Display Boundaries button, Select View > SNormal View to display Figure T3.1-3

3-8

Version 4.08

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing Post- processing

Figure T3.1-3

Velocity vector plot on the y-z plane

To establish the approximate mean velocity magnitude in the porous subdomain: Open the Cell Tool and select cell type number 2 Click Set Active Type Close the Cell Tool Select C > New > Type Current and then click Cplot to display Figure T3.1-4

Version 4.08

3-9

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing Post- processing

Figure T3.1-4

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

Note that the mean velocity magnitude through the porous cells is approximately 3.2 m/s. Now inspect the pressure variation throughout the model: 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 (lled) and Edge Click Plot to Screen Click Cplot to display Figure T3.1-5

3-10

Version 4.08

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing Analysis of Results

Figure T3.1-5

Cell-averaged lled contour plot of pressure

Analysis of Results

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

Version 4.08

3-11

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing Analysis of Results

Figure T3.1-6

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

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

3-12

Version 4.08

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing Analysis of Results

Figure T3.1-7

Vertex set on the upstream boundary of the porous medium

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

Version 4.08

3-13

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing Analysis of Results

Porous subdomain

Pressure

Actual surface value Values at adjacent cells

Vertex value

y-coordinate

Figure T3.1-8

Diagram illustrating the reason for choosing cell-centred pressure values

Load the pressure values and their corresponding cell volumes into pro-STARs post registers: Select Post > Operate... 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

The average pressure value should be accurately volume-weighted. If the cell values were averaged without volume-weighting, the small near-wall cells would be over-represented and the pressure magnitude would thus be underestimated. To calculate the pressure-volume product for each cell:
3-14 Version 4.08

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing Analysis of Results

Select Function Category Multi-register > Multiply Select Register 4 = Register 5 * Register 6 Click Apply then Close

Sum the pressure-volume product on the upstream surface of the porous medium: In the I/O window, type *get prs1 rtot 4. A value of 1.505 should be displayed.

Sum the cell volumes on the upstream surface of the porous medium: In the I/O window, type *get vol1 rtot 6. A value of 0.822e-2 should be displayed.

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

Version 4.08

3-15

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing Analysis of Results

Figure T3.1-9

Turbulence kinetic energy contour plot

Figure T3.1-10

Dissipation rate contour plot

3-16

Version 4.08

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing Analysis of Results

Turbulence parameters are fixed in the porous medium by assuming a turbulence intensity of 10% and length scale of 0.01 m. These correspond to values of 0.154 m2/s2 and 0.989 m2/s3 for the turbulence kinetic energy and dissipation rate, respectively. Fixing the turbulence parameters within the porous subdomain causes the flow downstream of it to exhibit very little turbulence. Note that such settings may be changed via the Turbulence Properties panel within the Thermophysical Models and Properties > Porosity sub-folder in the pro-STAR Model Guide. Finally, confirm that STAR-CDs porous model has been used correctly by normalising the resistance coefficients as follows (again assuming a superficial through-flow velocity of 3.2 m/s): L ------ = 0.622 L ------- = 11.67 V The simplified momentum equation employed within the porous medium is only valid if the sum of the normalised parameters is >> 1. This condition is satisfied here and the total resistance term is one order of magnitude greater than the convection term. Therefore, the use of the porosity model is justified. Quit the pro-STAR session by choosing: File > Quit > Quit, Nosave

Version 4.08

3-17

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM

Physical Problem Description Preliminaries

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM


Model ow through an orthotropic, highly porous medium Produce vector and contour plots Compute sums and averages of eld data Check the validity of the porous model

This tutorial aims to demonstrate how to:

Physical Problem Description In this tutorial, the isotropic, highly porous medium specified in Tutorial 3.1 is re-defined as an orthotropic porous medium. To this end, resistance coefficients are set up so as to prevent flow along the x- and z-directions of the global Cartesian coordinate system (see Figure T3.2-1). The values of these coefficients in the y-direction are the same as in Tutorial 3.1, i.e. y = 25 and y = 1500 Modelling Strategy The modelling steps used in setting up this case are identical to those described in Tutorial 3.1, except that the porous medium now has orthotropic properties. Pre-Processing Preliminaries A number of preliminary file-copying operations are needed for proper operation of this tutorial, as follows: Create a sub-directory for the tutorial called tut3-2 and copy the model le generated in Tutorial 3.1 (i.e., cat_iso.mdl) into it Rename this le 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 le for that case (cat_iso.ccmp) to the current directory

Start up the pro-STAR interface: Type prostar at the command line Specify your preferred graphics driver (mesa or gl) Accept the default case name (cat_ortho) 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

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

In the main window, select File > Model Title...


3-19

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM

Pre-Processing Material Properties

In the Title text box, change the title to: 3D FLOW THROUGH AN ORTHOTROPIC HIGHLY POROUS CATALYST

Click Apply and Close

Check the model geometry retrieved from file cat_ortho.mdl Select C > All In the main window, click Cplot Turn off the Display Boundaries option by clicking the button, display Figure T3.2-1

, to

Figure T3.2-1

Mesh Geometry

Material Properties

Enter appropriate resistance coefficients for the porous medium in the Cartesian 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 Dene (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
Version 4.08

3-20

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM

CFD Analysis Run Time Controls

Run Time Controls

Click Apply

Set restart options so that the analysis will restart from the solution file of Tutorial 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 le cat_iso.ccmp from the browser dialog and then click Open Click Apply

Final Operations

The pre-processing task is now complete. If you wish to terminate the session at this stage, save all model data, write the problem and geometry files and exit from pro-STAR, as shown below. Alternatively, you may run STAR interactively, as described in the next section. In the main pro-STAR panel, select File > 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 le You are now ready to start the post-processing session Postprocessing Load the velocity vector components and plot the vectors:
Version 4.08

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
3-21

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing Post- processing

menu and select Edge from the Edge/Mesh menu Change the Normal vector to -1, 0, 0 Click Apply Click Plot to Screen Select View > SNormal View to display Figure T3.2-2

Figure T3.2-2

Velocity vectors on the y-z plane

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

3-22

Version 4.08

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing Post- processing

Figure T3.2-3

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

The significant difference between Figure T3.2-3 and the equivalent plot for the isotropic porous medium, Figure T3.1-4, is that the orthotropic property prevents the bulk of the fluid flowing through the centre of the model from spreading outwards and slowing down, as it does in the isotropic case. Note that the mean velocity magnitude in the porous subdomain is approximately 3.2 m/s. Now inspect the cell-based pressure variation: 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 (lled) and Edge Click Plot to Screen Click Cplot to display Figure T3.2-4

Version 4.08

3-23

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing Post- processing

Figure T3.2-4

Cell-averaged pressure plot

Before calculating the pressure drop across the catalyst, plot the cell-centred pressure in the porous subdomain: 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

3-24

Version 4.08

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing Post- processing

Figure T3.2-5

Cell-averaged pressure plot in the porous subdomain

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

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
3-25

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing Analysis of Results

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

The volume-weighted average pressure across the downstream surface is the first of these parameters divided by the second, i.e., 33.29 Pa. The pressure across the upstream surface of the porous subdomain can be calculated similarly and found to be 182.07 Pa. Analysis of Results The above figures give an average pressure drop of 148.78 Pa. This may be compared with the expected pressure drop of 151.68 Pa, based on an average cell velocity of 3.2 m/s. The user can verify these calculations. The turbulence parameters may be inspected by plotting the relevant contours: 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 (lled) 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

3-26

Version 4.08

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing Analysis of Results

Figure T3.2-6

Contour plot of turbulence kinetic energy

Figure T3.2-7

Contour plot of dissipation rate

Version 4.08

3-27

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing Analysis of Results

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

3-28

Version 4.08

Tutorial 4 MULTI-FLUID FLOWS


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

Figure T4.0-1

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

Version 4.08

4-1

Tutorial 4.1

GRAVITY-DRIVEN MULTI-FLUID FLOW WITH FREE SURFACE

Physical Problem Description Preliminaries

Tutorial 4.1

GRAVITY-DRIVEN MULTI-FLUID FLOW WITH FREE SURFACE


Perform an unsteady ow simulation using the transient SIMPLE algorithm Activate STAR-CDs interface-capturing method for multi-uid ows with a free-surface Post-process the simulation results Create animations using a neutral plot le together with pro-STARs Animation utility

This tutorial aims to demonstrate how to:

Physical Problem Description The tutorial simulates gravity-driven fluid flow through a channel connecting two chambers, as shown in Figure T4.0-1. The left chamber is represented by the green-coloured cells and the right chamber by the red-coloured cells. The simulation is 2D. The front and back planes are therefore symmetry planes. All other boundaries are solid walls except for the horizontal top surfaces where a constant (atmospheric) static pressure is applied. Initially, the left chamber is filled with liquid and the right one is filled with air. Under the action of gravity, liquid flows into the right chamber under assumed turbulent conditions. At the same time, liquid also flows in through the top left boundary so as to maintain the fluid level constant. After some time, the liquid-air interface on the right chamber settles at the level of the top boundary in the left chamber. Modelling Strategy During mesh generation, the cells on the right vessel were assigned to cell type 1 and those on the left to cell type 2. This was done in order to facilitate definition of the initial liquid and air distribution within the model. Note that in some cases (e.g. when inlet boundary conditions are present), one may start with the whole solution domain filled by a single fluid phase. However, if pressure boundary conditions and gravity are used to drive the flow, both phases need to be present within the domain. Cell typing then offers a convenient way of assigning fluid characteristics to cells and thus makes 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 multi-fluid flow and give the case a title:
4-2 Version 4.08

Tutorial 4.1

GRAVITY-DRIVEN MULTI-FLUID FLOW WITH FREE SURFACE

Pre-Processing Mesh Import/ Visualization

Open the Analysis Features panel in the pro-STAR Model Guide Select Transient for the Time Domain option Select On for the Multi-Fluid option Click Apply

Note that a sub-folder called Multiuid will now be activated in the pro-STAR Model Guide tree, under the Thermophysical Models and Properties folder. In the main window, select File > Model Title... In the Title text box type: GRAVITY-DRIVEN MULTI-FLUID FLOW WITH A FREE SURFACE Click Apply and Close

Mesh Import/ To import and display the mesh: Visualization Select the Grids folder in the pro-STAR Model Guide Open the Import Grids panel Select the CCM option from the Format list Enter gridfs.ccmg as the Geometry File name Check that the State Name entry is set to default Click Apply In the main window, select C > All to put all cells into the current cell set Check that the Geometry plot option and Hidden Surface plot type are selected Click Cplot to display the grid shown in Figure T4.0-1 The generic names of all boundary regions are indicated in Figure T4.0-1. Their locations can be displayed on the grid plot via the following steps: 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,

Note that the boundary regions Type are all set to Symplane (except for region number 0, which is set to Wall). These boundary regions are set to correct Type later on in the tutorial. Scalar Properties Two scalars must be defined to represent the two fluids in the left and right chamber. The fluid in the left chamber is assumed to be liquid water H2O_l and the fluid in the right chamber is assumed to be Air. To define the two scalars:
Version 4.08

Open the Additional Scalars sub-folder in the Thermophysical Models and Properties folder Select the Molecular Properties (Scalars) panel On the Molecular Properties tab, ensure that Scalar # is set to 1 Choose Select scalar from database from the menu at the top of the panel Locate H2O_l in the list and click Select
4-3

Tutorial 4.1

GRAVITY-DRIVEN MULTI-FLUID FLOW WITH FREE SURFACE

Pre-Processing Material Properties

Material Properties

Check that the Inuence setting is Active Accept all other default values and click Apply On the Molecular Properties tab, change the Scalar # to 2 Choose Select scalar from database from the menu at the top of the panel Locate AIR from the list and click Select Check that the Inuence setting is Active Accept all other defaults and click Apply

To specify the magnitude and direction of the gravity force: Select the Thermophysical Models and Properties folder in the pro-STAR Model Guide Open the Gravity panel Change the Acceleration due to gravity to 9.81 m/s2 Change the Direction of Gravity Force to (0, -1, 0) in coordinate system 1 Click Apply

The remaining fluid properties are specified using panels in the Liquids and Gases folder. These panels feature a Material # option, enabling you to specify different properties for different uid domains, if present. Turn on turbulence modelling and select an appropriate model: Select the Liquids and Gases folder and open the Turbulence Models panel Check that the setting at the top of the panel is Material # 1 Select On for the Turbulence option Select k-Epsilon/High Reynolds Number from the Model list Accept the default settings for this model and click Apply

To select monitoring and pressure reference locations: Open the Monitoring and Reference Data (Fluids) panel Click the mouse icon in the Monitoring Information section to select the monitoring location In the main pro-STAR window, select a cell just to the right of the narrow middle section. This location is chosen because large variations in eld variable values are expected here. Alternatively, enter 631 for the Monitoring Cell Number. 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. Alternatively, enter 675 for the Pressure Cell Number. Click Apply

To turn on buoyancy: Open the Buoyancy panel and tick the Buoyancy checkbox The default values for Location and Density are suitable for this problem so click Apply

4-4

Version 4.08

Tutorial 4.1

GRAVITY-DRIVEN MULTI-FLUID FLOW WITH FREE SURFACE

Pre-Processing Fluid Initialization

Fluid Initialization

Set the initial velocity and turbulence parameters as follows: Open the Fluid Initialization panel in the Liquids and Gases sub-folder Select Table cell from the Options menu Select cell type Number 1 from the list On the Flow Conditions tab, enter 1.0 for U-velocity and V-velocity Under the Turbulence tab, select Tl/Mixing Length from the Model section Change the Intensity to 0.03 Change the Mixing Length value to 0.25 Click Apply Repeat the above steps for cell type Number 2

Scalar Initialization

To initialize the specified scalars: Open the Additional Scalars sub-folder in the Thermophysical Models and Properties folder Select the Scalar Initialization panel Ensure that Table Cell is selected from the Values menu

The initial spatial and temporal distribution of scalars H2O_l and AIR are assumed to be constant for all the cells with cell type ID of 1 (right chamber) and 2 (left chamber). It is only necessary therefore to specify the Initial Volume Fraction of the scalars. As no table is used, clear the Table Name: Click Clear Table Name

Iinitialize scalar values in the right chamber, where cells have a cell type ID of 1: Select cell type No. 1 from the bottom window Select Scalar Number 1 (H2O_l) from the top window Enter 0 in the Initial Volume Fraction box Click Apply Click Yes on the Warning dialog to proceed Select Scalar Number 2 (AIR) from the top window Enter 1 in the Initial Volume Fraction box Click Apply Click Yes on the Warning dialog to proceed

Now initialize scalar values in the left chamber, where cells have a cell type ID of 2: Boundary Conditions
Version 4.08

Select cell type No. 2 from the bottom window Select Scalar Number 1 (H2O_l) from the top window Enter 1 in the Initial Volume Fraction box Click Apply Click Yes on the Warning dialog to proceed Select Scalar Number 2 (AIR) from the top window Enter 0 in the Initial Volume Fraction box Click Apply Click Yes on the Warning dialog to proceed

First, define the wall boundary conditions:


4-5

Tutorial 4.1

GRAVITY-DRIVEN MULTI-FLUID FLOW WITH FREE SURFACE

Pre-Processing Scalar Boundaries

Select the Dene Boundaries folder and open the Dene Boundary Regions panel In the region list select region 1, named Wall Change the Region Type to Wall Accept all the default settings and click Apply Repeat this operation for the regions named Left (region 2), Right (region 3), and Bottom (region 6)

Next, define the pressure boundary conditions: Select region 5, named TopRight Change the Region Type to Pressure Change the Pressure Option to Static Ensure that the Pressure value is set to 0 Pa Check that the Environment Pressure and Mean options are turned Off Change the Turbulence Switch to Tl/Length Type 0.03 for the Turb. Intensity and 0.25 for the Length Ensure that UVW is set to option Off Click Apply Repeat this process for region 7, named TopLeft

No action is needed for the regions named Back and Front as these are already defined as symmetry planes in the supplied mesh geometry file. Scalar Boundaries Specify values for the scalars at pressure boundaries as follows: Open the Scalar Boundaries panel Select region 5 from the Boundary Region list Select Scalar Number 1 (H2O_l) from the Scalars list Ensure that the Boundary Condition is set to Constant Enter 0 for the Value Click Apply Select region 7 from the Boundary Region list Select Scalar Number 1 (H2O_l) from the Scalars list Check that the Boundary Condition is set to Constant Enter 1 for the Value Click Apply

The above boundary conditions for the two scalars in effect enforces the condition that only air may enter through region 5 (TopRight) and only water may enter the domain through region 7 (TopLeft) boundaries. Analysis Controls The transient SIMPLE solution algorithm must be used for multi-fluid flows. 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 to Euler Implicit. This is the only supported temporal discretization scheme for multi-uid ow problems. Click Apply
Version 4.08

4-6

Tutorial 4.1

GRAVITY-DRIVEN MULTI-FLUID FLOW WITH FREE SURFACE

Pre-Processing Run Time Controls

The tutorial performs a two-dimensional analysis so it is not necessary to solve for the momentum component in the z-direction. To turn this off and specify appropriate settings for the solver parameters and differencing schemes: Open the Primary Variables panel Under the Equation Status tab, deselect the W-Momentum ow variable Click Apply Under the Solver Parameters tab, set the Relaxation Factor for the momentum and turbulence equations to 0.8 Set the Relaxation Factor for the pressure equation to 0.4 (higher than the default) Set the Residual Tolerance for all variables to 0.01 Set the Number of Sweeps to 100 for all variables Click Apply Under the Differencing Schemes tab, check that the UD scheme is selected for all variables Click Apply Open the Additional Scalars (Controls) panel Select Scalar Number 1 (H2O_l) Change the Under-Relaxation Factor to 0.8 Change the Differencing Scheme to HRIC Leave all other settings at their default values and click Apply Repeat the above under-relaxation and differencing scheme settings for the second scalar (AIR) and click Apply

Specify what data should be written to the results (.ccmp) file and the transient post data (.ccmt) file: Run Time Controls 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 H2O_l output variable from the list and enable the Post option Repeat for the Turb Kinetic Energy variable Click Apply

To specify the run time and time step size: 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 the problem and geometry files and save the model file:
Version 4.08 4-7

Tutorial 4.1

GRAVITY-DRIVEN MULTI-FLUID FLOW WITH FREE SURFACE

CFD Analysis Preliminaries

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 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 le gravfs.ccmt from the Transient list Click Open Transient le

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 H2O_l scalar, the latter showing the distribution of water in the solution domain:
4-8

Under the File(s) tab of the Load Data panel, select time step 100 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 H2O_l from the Scalar Data list Click Get Data Go to the Create Plots panel
Version 4.08

Tutorial 4.1

GRAVITY-DRIVEN MULTI-FLUID FLOW WITH FREE SURFACE

Post-Processing Basic Plots

Under the 3-D Surface tab, select Vector & Contour and Edge for the Option and Edge/Mesh options, respectively Click Plot to Screen to display H2O_l contours and velocity vectors simultaneously, as computed after 100 time steps. This plot is shown in Figure T4.1-1 Repeat the above steps to display H2O_l contours and velocity vectors after 600 and 1000 time steps, as shown in Figure T4.1-2.

Figure T4.1-1

Water volume fraction and velocity vectors after 100 time steps

Version 4.08

4-9

Tutorial 4.1

GRAVITY-DRIVEN MULTI-FLUID FLOW WITH FREE SURFACE

Post-Processing Basic Plots

Figure T4.1-2

Water volume fraction and velocity vectors after 600 (top) and 1000 (bottom) time steps

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 H2O_l 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-3. This type of plot was created by selecting options Contour (filled) and Edge on the 3-D Surface tab.
4-10 Version 4.08

Tutorial 4.1

GRAVITY-DRIVEN MULTI-FLUID FLOW WITH FREE SURFACE

Post-Processing Animations

Figure T4.1-3

Pressure contours after 100 (top), 600 (middle) and 1000 (bottom) 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 H2O_l scalar, which must first be displayed as static contour plots:
4-11

Version 4.08

Tutorial 4.1

GRAVITY-DRIVEN MULTI-FLUID FLOW WITH FREE SURFACE

Post-Processing Animations

Under the File(s) tab of the Load Data panel, select the rst time step in the Time Step list Click Store Time Under the Data tab, select H2O_l 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 H2O_l 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 specied in the Run Time Controls panel Writing a new problem le Running STAR again

The tutorial is now complete. To quit pro-STAR: Select File > Quit > Quit, Nosave

4-12

Version 4.08

Tutorial 4.2

FORCED MULTI-FLUID FLOW WITH CAPILLARY EFFECTS

Physical Problem Description

Tutorial 4.2

FORCED MULTI-FLUID FLOW WITH CAPILLARY EFFECTS


How to simulate multi-uid ow in which capillary effects are important The appearance of parasitic currents under certain conditions in such analyses

This tutorial aims to demonstrate:

Physical Problem Description This tutorial simulates forced flow of liquid glycerine through a nozzle into an air-filled chamber at atmospheric pressure. The mesh used is the same as that of previous tutorial.

Figure T4.2-1

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

In this instance, however, the problems physical dimensions are scaled down by a factor of 1,000. This gives a nozzle width of about 1 mm. The boundary region labelled Left is now an inlet with fluid velocity of 1 mm/s and the boundary region labelled Right is at atmospheric pressure. The boundary regions labelled Bottom, Front and Back are symmetry planes, and all other regions are solid walls. Initially, the chamber behind the nozzle (cell type 2, coloured green) is filled with liquid and the remainder of the solution domain is filled with air. For the given geometry and inlet velocity, the flow can be assumed to be laminar. Gravity acts in the positive x-direction and so helps to drive the fluid flow through the nozzle. The shape of the liquid-gas interface that develops in the chamber downstream of the nozzle depends on the contact angle between liquid and wall. 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:
Version 4.08

Start pro-STAR by typing prostar at the command line


4-13

Tutorial 4.2

FORCED MULTI-FLUID FLOW WITH CAPILLARY EFFECTS

Pre-Processing Mesh Import/ Visualization

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 multi-fluid 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 for the Multi-Fluid option Click Apply In the main window, select File > Model Title... In the Title text box type: FORCED MULTI-FLUID FLOW WITH CAPILLARY EFFECTS Click Apply and Close

Mesh Import/ To import and display the mesh: Visualization Select the Grids folder in the pro-STAR Model Guide Open the Import Grids panel Select the CCM button from the Format list Enter gridfs.ccmg as the Geometry File name Check that the State Name entry is set to default Click Apply In the main window, select C > All to put all cells into the current cell set Check that the Geometry plot option and Hidden Surface plot type are selected Click Cplot to display the grid shown in Figure T4.2-1 Scalar Properties Two scalars must be defined to represent liquid glycerine in the left chamber and air in the right chamber. To define the two scalars: Multi-uid Models Open the Additional Scalars sub-folder in the Thermophysical Models and Properties folder Select the Molecular Properties (Scalars) panel On the Molecular Properties tab, ensure that Scalar # is set to 1 Choose Select scalar from database from the menu at the top of the panel Locate C3H8O3_l in the list and click Select Check that the Inuence setting is Active Accept all other default values and click Apply On the Molecular Properties tab, change the Scalar # to 2 Choose Select scalar from database from the menu at the top of the panel Locate AIR in the list and click Select Check that the Inuence setting is Active Accept all other default values and click Apply

Switch on the surface tension model: Open the Multiuid sub-folder in the Thermophysical Models and Properties folder Open the Models panel Select On for the Surface Tension option
Version 4.08

4-14

Tutorial 4.2

FORCED MULTI-FLUID FLOW WITH CAPILLARY EFFECTS

Pre-Processing Material Properties

Click Apply Open the Surface Tension panel Check that Scalar # 1 and Scalar # 2 are shown as C3H8O3_l and AIR, respectively

Note that the surface tension effects are determined by a pair of fluids. The surface tension coefficient and contact angle for the fluids, however, correspond to the first fluid. Material Properties Enter 0.059688 for the Surface Tension Coefcient Enter 45 degrees for the Contact Angle at Wall Click Apply

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

To select monitoring and pressure reference locations: Open the Monitoring and Reference Data (Fluids) panel Click the mouse icon in the Monitoring Information section to select the monitoring location In the main pro-STAR window, select a cell just to the right of the narrow section. This location is chosen because large variations in eld variable values are expected here. Alternatively, enter 631 for the Monitoring Cell Number. 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. Alternatively, enter 675 for the Pressure Cell Number. Click Apply

To turn on buoyancy: Scalar Initialization Open the Buoyancy panel and tick the Buoyancy checkbox The default values for Location and Density are suitable for this problem so click Apply

Initially, the left chamber contains only glycerine and the right chamber only air. This initial distribution is specified by associating the two fluids with different cell types. To initialize the scalars representing the fluids: Open the Additional Scalars sub-folder in the Thermophysical Models and Properties folder Select the Scalar Initialization panel
4-15

Version 4.08

Tutorial 4.2

FORCED MULTI-FLUID FLOW WITH CAPILLARY EFFECTS

Pre-Processing Boundary Conditions

Select Table Cell from the Values menu

The initial spatial and temporal distribution of scalars C3H8O3_l and AIR are assumed to be constant for all the cells with cell type ID of 1 (right chamber) and 2 (left chamber). It is only necessary therefore to specify the Initial Volume Fraction of the scalars. Clear the Table Name as no table is used. Click Clear Table Name

Initialize scalar values in the right chamber with cell type ID of one first: Select cell type No. 1 from the bottom window Select Scalar Number 1 (C3H8O3_l) from the top window Enter 0 in the Initial Volume Fraction box Click Apply Select Scalar Number 2 (AIR) from the top window Enter 1 in the Initial Volume Fraction box Click Apply

Now initialize scalar values in the left chamber, where cells have a cell type ID of 2: Boundary Conditions Select cell type No. 2 from the bottom window Select Scalar Number 1 (C3H8O3_l) from the top window Enter 1 in the Initial Volume Fraction box Click Apply Select Scalar Number 2 (AIR) from the top window Enter 0 in the Initial Volume Fraction box Click Apply

To define boundary conditions for this simulation: Select the Dene Boundaries folder and open the Dene 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 Ensure that Velocity is selected 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.

4-16

Version 4.08

Tutorial 4.2

FORCED MULTI-FLUID FLOW WITH CAPILLARY EFFECTS

Pre-Processing Scalar Boundaries

Scalar Boundaries

Scalar boundary conditions must 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 Select region 2 (Inlet) from the Boundary Region list Select Scalar Number 1 (C3H8O3_l) from the Scalars list Ensure that the Boundary Condition is set to Constant Enter 1 for the Value Click Apply

The boundary Value for Boundary Region 3 (Pressure) is set to 0 by default so no change is needed. Analysis Controls The transient SIMPLE solution algorithm must be used for multi-fluid problems. 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 to Euler Implicit, the only supported temporal discretization scheme for multi-uid ow problems Click Apply

The tutorial performs a two-dimensional analysis so it is not necessary to solve for the momentum component in the z-direction. To turn this off and specify appropriate settings for the solver parameters and differencing schemes: Open the Primary Variables panel Under the Equation Status tab, deselect the W-Momentum ow variable Click Apply Under the Solver Parameters tab, set the Relaxation Factor for the momentum equations to 0.8 Set the Relaxation Factor for the pressure equation to 0.4 (higher than the default) Set the Residual Tolerance for all variables to 0.01 Set the Number of Sweeps to 100 for all variables Click Apply Under the Differencing Schemes tab, check that the UD scheme is selected for all variables Click Apply Open the Additional Scalars (Controls) panel Select scalar no. 1 (C3H8O3_l) and change the Under-Relaxation Factor to to 0.8 Change the Differencing Scheme to HRIC Leave all other settings at their default values and click Apply Repeat the above under-relaxation and differencing scheme settings for the second scalar (AIR) and click Apply

Specify what data should be written to the results (.ccmp) file and the transient
Version 4.08 4-17

Tutorial 4.2

FORCED MULTI-FLUID FLOW WITH CAPILLARY EFFECTS

CFD Analysis Run Time Controls

post data (.ccmt) file: Run Time Controls 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 C3H8O3_l output variable from the list and enable the Post option Click Apply

To specify the run time and time step size: 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. 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 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 solver. CFD Analysis Check that you are in the current working directory and then start the simulation by typing: star -dp 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:
4-18 Version 4.08

Tutorial 4.2

FORCED MULTI-FLUID FLOW WITH CAPILLARY EFFECTS

Post-Processing Basic Plots

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 le forcfs.ccmt from the Transient list Click Open Transient le

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 C3H8O3_l distribution and velocity vectors after 1,700 time steps: Under the File(s) tab of the Load Data panel, select the le 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 C3H8O3_l from the Scalar Data list Click Get Data Go to the Create Plots panel Under the 3-D Surface tab, select options Contour (lled) and Edge Click Plot To Screen to display Figure T4.2-2

Note that the angle the liquid-air interface makes with the wall is approximately 45 degrees.

Figure T4.2-2

Glycerine volume fraction, contact angle=45 degrees, time steps=1700


Version 4.08

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

Tutorial 4.2

FORCED MULTI-FLUID FLOW WITH CAPILLARY EFFECTS

Post-Processing Basic Plots

Click Plot To Screen to display Figure T4.2-3

Figure T4.2-3

Velocity vectors, contact angle=45 degrees, time steps=1700

To examine how changing the contact angle affects the resulting free surface: Open the Multiuid sub-folder in the Thermophysical Models and Properties folder Open the Surface Tension panel Enter 150 degrees for the Contact Angle at Wall Click Apply Select File > Save Problem...

Re-run the analysis as before. Follow the procedure described above to plot contours of volume fraction and velocity vectors after 1,700 time steps. The resulting plots are shown in Figure T4.2-4 and Figure T4.2-5.

Figure T4.2-4
4-20

Glycerine volume fraction, contact angle=150 degrees, time steps-=1700


Version 4.08

Tutorial 4.2

FORCED MULTI-FLUID FLOW WITH CAPILLARY EFFECTS

Post-Processing Basic Plots

Figure T4.2-5

Velocity vectors, contact angle=150 degrees, time steps=1700

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 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 to the wall could remove this abnormality. In some applications, it may be necessary to specify different contact angles on different walls. This value can be overridden, where necessary, via user coding. The latter is activated by selecting User rather than Constant for the Surface Tension in the Surface Tension panel. The relevant user subroutine, FSTEN, can then be modified as required. The tutorial is now complete. To quit pro-STAR: In the main window, select File > Quit > Quit, Nosave

Version 4.08

4-21

Tutorial 4.3

FORCED MULTI-FLUID FLOW WITH CAVITATION

Physical Problem Description Preliminaries

Tutorial 4.3

FORCED MULTI-FLUID FLOW WITH CAVITATION


Perform a simulation of a multi-uid ow in which cavitation takes place Display uid interface and cavitation data in the same plot Change the Post Colormap settings to improve the appearance of contour plots

This tutorial aims to demonstrate how to:

Physical Problem Description This tutorial models the forced flow of water through a nozzle into an air-filled chamber at atmospheric pressure. The geometry, mesh and scale factor (0.001) are the same as those used in Tutorial 4.2. The boundary labelled Left in Figure T4.0-1 is at a static pressure of 500 bar (absolute) and the boundary labelled Right is at static pressure of 1 bar (absolute). The boundaries labelled Bottom, Front and Back are symmetry planes, and all other boundaries are solid walls. Initially, the nozzle is filled with liquid (cell type 2) and the downstream chamber is filled with air (cell type 1). The sharp corner at the entrance into the narrow nozzle combined with the flow acceleration produces a low pressure region in which cavitation will take place. Pre-Processing Preliminaries Create a directory for the tutorial called tut4-3 and copy file gridfs.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 multi-fluid modelling option: Open the Analysis Features panel in the pro-STAR Model Guide Select Transient for the Time Domain option Select On for the Multi-Fluid option Click Apply

Give the case a title: In the main window, select File > Model Title... In the Title text box type: FORCED MULTI-FLUID FLOW WITH CAVITATION Click Apply and Close

Mesh Import/ To import and display the mesh: Visualization Select the Grids folder in the pro-STAR Model Guide Open the Import Grids panel Select the CCM button from the Format list
Version 4.08 4-23

Tutorial 4.3

FORCED MULTI-FLUID FLOW WITH CAVITATION

Pre-Processing Scalar Properties

Scalar Properties

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

Two scalars must be defined to represent water in the left chamber and air in the right chamber. In addition, a third scalar must be set up to represent the volume fraction of water vapour generated during the cavitation process. To define these scalars: Open the Additional Scalars sub-folder in the Thermophysical Models and Properties folder Select the Molecular Properties (Scalars) panel On the Molecular Properties tab, ensure that Scalar # is set to 1 Select scalar from database from the menu at the top of the panel Locate H2O_l in the list and click Select Check that the Inuence setting is Active Accept all other default values and click Apply

The saturation properties of H2O_l will be assigned from the database. On the Saturation Properties tab, ensure that Saturation Pressure, Saturation Temperature and Latent Heat of Vaporization values for H2O_l are correct

If you modify the saturation properties ensure that you click Apply. Multi-uid Models On the Molecular Properties tab, change the Scalar # to 2 Choose Select scalar from database from the menu at the top of the panel Locate H2O (water vapour) in the list and click Select Check that the Inuence setting is Active Accept all other default values and click Apply On the Molecular Properties tab, change the Scalar # to 3 Choose Select scalar from database from the menu at the top of the panel Locate AIR in the list and click Select Check that the Inuence setting is Active Accept all other default values and click Apply

Switch on the surface tension and cavitation models: Open the Multiuid sub-folder in the Thermophysical Models and Properties folder Open the Models panel Select On for the Surface Tension option Select On for the Cavitation option Click Apply Open the Surface Tension panel Ensure that Scalar # 1 is set to H2O_l Change the Scalar # 2 setting to 3 (AIR) Enter 0.0727 for the Surface Tension Coefcient
Version 4.08

4-24

Tutorial 4.3

FORCED MULTI-FLUID FLOW WITH CAVITATION

Pre-Processing Material Properties

Material Properties

Enter 90 for the Contact Angle at Wall Click Apply Open the Multiuid Cavitation panel Ensure that Scalar # 1 and Scalar # 2 are set to 1 (H2O_l) and 2 (H2O), respectively Ensure also that the Average Nuclear Radius and the Number of Nuclei are set to 1.0E-6 and 1.0E12, respectively Click Apply

To select other physical models Select the Thermophysical Models and Properties, followed by the Liquids and Gases sub-folder Open the Turbulence Models panel Check that the setting at the top of the panel is Material # 1 Select On for the Turbulence option Select k-Epsilon/High Reynolds Number from the Model list Click Apply

To select monitoring and pressure reference locations: Open the Monitoring and Reference Data (Fluids) panel Click the mouse icon in the Monitoring Information section to select the monitoring location In the main pro-STAR window, select a cell just to the right of the narrow section. This location is chosen because large variations in eld variable values are expected here. Alternatively, enter 631 for the Monitoring Cell Number. 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. Alternatively, enter 675 for the Pressure Cell Number. Click Apply

Fluid Initialization

Set the initial velocity and turbulence parameters as follows: Open the Fluid Initialization panel in the Liquids and Gases sub-folder Select Table cell from the Options menu Select cell type Number 1 from the list On the Flow Conditions tab, enter 1.0 for U-velocity and V-velocity Under the Turbulence tab, select k-Epsilon from the Model section Change the Turbulent Energy to 1 Change the Epsilon value to 10000 Click Apply Repeat the above steps for cell type Number 2

Note that what is important here is not the actual values specified but rather their ratio, as this determines the initial turbulent viscosity. In this case, k and are chosen to give a turbulent viscosity of the order of 0.01
Version 4.08 4-25

Tutorial 4.3

FORCED MULTI-FLUID FLOW WITH CAVITATION

Pre-Processing Scalar Initialization

Scalar Initialization

Initially, the left chamber contains only water and the right chamber only air. This initial distribution is specified by associating the two fluids with different cell types. To initialize the scalars: Open the Additional Scalars sub-folder in the Thermophysical Models and Properties folder Select the Scalar Initialization panel Ensure that Table Cell is selected from the Values menu

The initial spatial and temporal distribution of scalars H2O_l and AIR are assumed to be constant for all the cells with cell type ID of 1 (right chamber) and 2 (left chamber). It is only necessary therefore to specify the Initial Volume Fraction of the scalars. As no table is used, clear the Table Name: Click Clear Table Name

Initialize the three scalars in the right chamber, where cells have a cell type ID of 1: Select cell type No. 1 from the bottom window Select Scalar Number 1 (H2O_l) from the top window Enter 0 in the Initial Volume Fraction box Click Apply Click Yes on the Warning dialog to proceed Select Scalar Number 2 (H2O) from the top window Enter 0 in the Initial Volume Fraction box Click Apply Click Yes on the Warning dialog to proceed Select Scalar Number 3 (AIR) from the top window Enter 1 in the Initial Volume Fraction box Click Apply Click Yes on the Warning dialog to proceed

Now initialize the scalars in the left chamber, where cells have a cell type ID of 2: Select cell type No. 2 from the bottom window Select Scalar Number 1 (H2O_l) from the top window Enter 1 in the Initial Volume Fraction box Click Apply Click Yes on the Warning dialog to proceed Select Scalar Number 2 (H2O) from the top window Enter 0 in the Initial Volume Fraction box Click Apply Click Yes on the Warning dialog to proceed Select Scalar Number 3 (AIR) from the top window Enter 0 in the Initial Volume Fraction box Click Apply Click Yes on the Warning dialog to proceed

4-26

Version 4.08

Tutorial 4.3

FORCED MULTI-FLUID FLOW WITH CAVITATION

Pre-Processing Boundary Conditions

Boundary Conditions

To define boundary conditions for this problem: Select the Dene Boundaries folder and open the Dene 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 2, named Left Change the Region Type to Pressure Change the Pressure Option to Static Change the Pressure value to 499.0E5 Pa Check that the Environment Pressure and Mean options are turned Off Change the Turbulence Switch to Tl/Length Type 0.03 for the Turb. Intensity and 0.00025 for the Length Ensure that UVW is set to option Off Click Apply Repeat the above steps for region 3, named Right, ensuring that the Pressure value is set to 0 Pa

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. Note that the above Pressure values are specified relative to the Reference Pressure of 1 bar. Scalar Boundaries Scalar boundary conditions at the pressure boundaries must also be specified: Open the Scalar Boundaries panel Select region 2 (Pressure) from the Boundary Region list Select Scalar Number 1 (H2O_l) from the Scalars list Ensure that the Boundary Condition is set to Constant Enter 1 for the Value Click Apply

The boundary Value for Boundary Region 3 (Pressure) is set to 0 by default so no change is required. No changes are required to the boundary conditions of the H2O scalar since the default setting of 0 volume fraction at all boundaries is appropriate for this problem. Analysis Controls The transient SIMPLE solution algorithm must be used for free-surface problems. This tutorial will also use the AMG solver. 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 to Euler Implicit, the only supported temporal discretization scheme for multi-uid ow problems Click Apply

The tutorial performs a two-dimensional analysis so it is not necessary to solve for the momentum component in the z-direction. To turn this off and specify
Version 4.08 4-27

Tutorial 4.3

FORCED MULTI-FLUID FLOW WITH CAVITATION

Pre-Processing Run Time Controls

appropriate settings for the solver parameters and differencing schemes: Select the Primary Variables panel Under the Equation Status tab, deselect the W-Momentum ow variable Click Apply Under the Solver Parameters tab, set the Relaxation Factor for the momentum and turbulence equations to 0.8 Set the Relaxation Factor for the pressure equation to 0.4 Set the Residual Tolerance for all variables to 0.01 Set the Number of Sweeps to 100 for all variables Click Apply Under the Differencing Schemes tab, change the differencing scheme for the momentum equations to MARS Click Apply Open the Additional Scalars (Controls) panel Select Scalar Number 1 (H2O_l) Change the Under-Relaxation Factor to 0.8 Change the Differencing Scheme to HRIC Leave all other settings at their default values and click Apply Repeat the above under-relaxation and differencing scheme settings for Scalar Number 2 (H2O) and Scalar Number 3 (AIR) in turn and click Apply

Specify what data should be written to the results (.ccmp) file and the transient post data (.ccmt) file: Run Time Controls 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 H2O_l and H2O output variables from the list in turn, enable the Post option and click Apply

To specify the run time and time step size: 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 the problem and geometry files and save the model file:
4-28

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
Version 4.08

Tutorial 4.3

FORCED MULTI-FLUID FLOW WITH CAVITATION

CFD Analysis Preliminaries

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 -dp 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 le cavit.ccmt from the Transient list Click Open Transient le

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 le for step number 500 from the Time Step list and click Store Time to load the data Under the Data tab, select Cell & Wall/Bound (Smooth) from the Data Type menu 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

Version 4.08

4-29

Tutorial 4.3

FORCED MULTI-FLUID FLOW WITH CAVITATION

Post-Processing Basic Plots

Figure T4.3-1

Velocity vectors (500 time steps)

Next plot the H2O_l distribution (volume fraction of liquid water) after 500 time steps: Return to the Data tab of the Load Data panel Select H2O_l (the water volume fraction) from the Scalar Data list Click Get Data Go to the Create Plots panel Under the 3-D Surface tab, select options Contour (lled) and Edge Click Plot To Screen to display Figure T4.3-2

Figure T4.3-2

Water distribution contour (500 time steps)

Now plot the distribution of water vapour, H2O, after 500 time steps:
4-30 Version 4.08

Tutorial 4.3

FORCED MULTI-FLUID FLOW WITH CAVITATION

Post-Processing Basic Plots

On the Data tab of the Load Data panel, select H2O (the water vapour volume fraction) from the Scalar Data list Click Get Data and Replot to display Figure T4.3-3

Figure T4.3-3

Water vapour distribution contour (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 H2O and H2O_l distributions (i.e., both water vapour and liquid water) by using the OPERATE utility to manipulate the post data. First, put the H2O_l and H2O data in post registers 5 and 6, respectively: Enter the following commands in the I/O window: OPERATE GETC CONC 5 1 OPERATE GETC CONC 6 2 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
4-31


Version 4.08

Tutorial 4.3

FORCED MULTI-FLUID FLOW WITH CAVITATION

Post-Processing Basic Plots

Click Apply Under the 3-D Surface tab, check that options Contour (lled) and Edge are selected Click Plot To Screen to display Figure T4.3-4

Figure T4.3-4

H2O_l and H2O distributions contour (500 time steps)

To a reasonable approximation, the blue and turquoise regions are predominantly occupied by air, the green regions predominantly by liquid water and the yellow, orange and red regions predominantly by water vapour. Manipulating the results in this way provides a qualitative visual estimate of the extent of the different regions. However, the resulting plot is prone to inaccuracies in those places where air and water vapour occur together and also where the value of H2O_l is only slightly greater than that of H2O. In such a case, the latter leads to an overprediction of the size of the region of high water vapour concentration. The tutorial is now complete. To quit pro-STAR: Select File > Quit > Quit, Nosave

4-32

Version 4.08

Physical Problem Description

Tutorial 5 TURBULENT FLUID STREAM MIXING


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

The flow is three-dimensional and essentially symmetric, so only half of the problem geometry was considered in building the mesh. The tutorial is divided into two parts, one dealing with a steady-state and the other with a transient analysis.

Figure T5.0-1
Version 4.08

Mesh structure for the dilution pipe model (back elevation)


5-1

Tutorial 5.1

STEADY 3-D FLOW

Pre-Processing Preliminaries

Tutorial 5.1

STEADY 3-D FLOW


Set up and analyse a turbulent, multi-species ow Dene boundary conditions for both main ow variables and additional scalar variables representing species mass fractions Create multiple cross-sectional plots showing the analysis results as part of a single operation

The primary task of this tutorial is to:

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

Read in the available problem data: Select File > Read Input Coded File... in the main pro-STAR window In the Read Input Coded File dialog select the File name dil_pipe.inp Click OK

This will read default problem settings from file dil_pipe.inp plus the problems cell, vertex and boundary location definitions from the remaining three files. In the main window, select File > Model Title... In the Title text box type: TURBULENT MIXING IN A DILUTION PIPE (STEADY) Mesh Checking Click Apply and Close

Verify that the mesh data are correct by selecting all cells and vertices and plotting the mesh in Hidden Surface mode: In the main window, select C > All. The I/O window 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 cubes slider controls to display Figure T5.1-1

It will be seen that the mesh is in fact the same as the one created in Meshing
5-2 Version 4.08

Tutorial 5.1

STEADY 3-D FLOW

Pre-Processing Material Properties

Tutorial 1.1.

Figure T5.1-1

Mesh geometry

Material Properties

Check the default fluid properties and then choose the ideal gas law for density variations, making it a function of temperature only (incompressible flow): In the 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

Turn on the standard k- turbulence model: Open the Turbulence Models panel Select On for the Turbulence modelling option Select K-Epsilon/High Reynolds Number from the Model menu Click Apply

Turn on the solution of the temperature equation: Open the Thermal Models panel Select On for the Temperature Calculation option Click Apply

Set the monitoring point location:


Version 4.08

Open the Monitoring and Reference Data (Fluids) panel


5-3

Tutorial 5.1

STEADY 3-D FLOW

Pre-Processing Scalar Properties

Scalar Properties

Type 11 in the Monitoring Cell Number text box Click Apply

Physical properties for scalar variables are specified next: Select the Additional Scalars folder and then open the Molecular Properties (Scalars) panel

It will be seen that no scalar entities have been defined yet. The required scalar is methane and its properties can be retrieved from the built-in property database. However, in this tutorial, methane is treated as a user-defined scalar and its properties are supplied manually for the purposes of illustration. Type the following property data in the corresponding dialog boxes: Scalar # 1 CH4 Density 0.669 Molecular Weight 16 Molecular Viscosity 1.175e-5 Specic Heat 2230.0 Conductivity 0.038 Heat of Formation -4.68e6 Temp. of Formation 298.15 Click Apply

The details of the scalars properties will be shown in the I/O window as follows: PROPERTIES FOR SCALAR NO. 1 NAMED CH4 INFLUENCE = ACTIVE SOLVER TURNED ON MOLECULAR WEIGHT = 16.000000 DENSITY = 0.66900002 BETAM = 0.00000000 THERMAL CONDUCTIVITY = 0.38000000E-01 MOLECULAR VISCOSITY = 0.11750000E-04 SPECIFIC HEAT = 2230.0000 HEAT OF FORMATION = -4680000.0 TEMPERATURE OF FORMATION = 298.15000 FLUID GROUP = LIGHT Note that the scalars ACTIVE designation signifies that its concentration at any point in the flow will influence the overall fluid density at that point. Save the model data entered so far: Boundary Conditions In the main window, select File > Save Model

Specify boundary conditions for each region, including turbulence parameters at the two inlets in terms of turbulence intensity and length scale: Select folder Dene Boundaries and then open the Dene Boundary Regions panel Select region no. 1 (the inner inlet) in the scroll list
Version 4.08

5-4

Tutorial 5.1

STEADY 3-D FLOW

Pre-Processing Boundary Conditions

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

Click Apply Select region no. 2 in the scroll list Select option TI/Length in the Turbulence Switch menu Enter inlet conditions in the appropriate boxes, as shown below:

Version 4.08

5-5

Tutorial 5.1

STEADY 3-D FLOW

Pre-Processing Boundary Conditions

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:

5-6

Version 4.08

Tutorial 5.1

STEADY 3-D FLOW

Pre-Processing Boundary Conditions

Click Apply

Specify boundary conditions for the scalar (CH4) mass fraction, ensuring that its value is 1.0 at the inner pipe inlet and 0.0 at all other boundaries. Open the Scalar Boundaries panel Select region no. 1 (the inner pipe inlet) in the Boundary Region scroll list. 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 boundary conditions graphically: In the main window, select B > All Select B > Unselect > Symplane Turn on the Display Boundaries option by clicking the button, Select cell plot type Quick Hidden Line from the drop-down menu to display Figure T5.1-2

Version 4.08

5-7

Tutorial 5.1

STEADY 3-D FLOW

Pre-Processing Control Parameters

Figure T5.1-2

Inlet and outow boundary condition display

Control Parameters

Check the status of the control parameters: Select folder Analysis Controls

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 Controls Open the Primary Variables panel Select the Solver Parameters tab and type 0.0001 in the Residual Tolerance box corresponding to the Temperature equation Click Apply

Check the status of the run time control parameters: Select folder Analysis Preparation and open the Run Time Controls panel Enter 200 for the Maximum Number of Iterations Click Apply

5-8

Version 4.08

Tutorial 5.1

STEADY 3-D FLOW

CFD Analysis Final Operations

Final Operations

The pre-processing task is now complete. If you wish to terminate the session at this stage, save all model data, write the geometry and problem files and exit from pro-STAR, as shown below. Remember that, for convenience, the model geometry units were specified in inches. This must be changed into meters by applying the appropriate conversion factor before writing data to the geometry file. Alternatively, you may continue with the CFD analysis, using the 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: Postprocessing Select folder Post-Processing Open the Load Data panel to display the File(s) tab Click Open Post le

Load velocity vector components for plotting and then display them on your screen 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
5-9

Version 4.08

Tutorial 5.1

STEADY 3-D FLOW

Post-Processing Post- processing

Figure T5.1-3

Velocity magnitude plot

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 (lled) and Edge Click Plot to Screen to display Figure T5.1-4

5-10

Version 4.08

Tutorial 5.1

STEADY 3-D FLOW

Post-Processing Post- processing

Figure T5.1-4

Pressure plot

Load vertex-based temperatures and plot: Go back to the Load Data panel In the Scalar Data list, select item Temperature and then click Get Data In the main pro-STAR window, click Replot to display Figure T5.1-5

Figure T5.1-5
Version 4.08

Temperature plot
5-11

Tutorial 5.1

STEADY 3-D FLOW

Post-Processing Post- processing

A multi-section plot of a variable can be made using the following procedure: Go to the Create Plots panel Select tab Section/Clipped For the Section Plot Type, choose Contour (lled) from the Option menu and Edge from the Edge/Mesh menu Select Multiple Plane for the Plot option The default number (10) of section planes to be plotted in succession is shown in the Increments box and is suitable. Dene the normal direction to these planes to be the direction of a coordinate axis, as follows: (a) Click the coordinate system selection button to display the Coordinate Systems dialog (b) Select the toroidal coordinate system (no. 4) and then click Apply and Close (c) Note that the entry in the Coordinate System box changes to show that system no. 4 has been selected. The Direction menu is activated to allow specication of the desired direction. (d) Select direction no. 2 (the - direction) from this menu and then click Apply Click Sweep to see 10 section plots of temperature plotted in quick succession, starting at one end of the model and nishing at the other

Once the sections are defined, they can be re-used to produce plots of any other variable. For example, velocity magnitude plots can be generated as follows: 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 (lled) 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 (lled) from the Option menu and Edge from the Edge/Mesh menu Click Plot to Screen to display Figure T5.1-6

5-12

Version 4.08

Tutorial 5.1

STEADY 3-D FLOW

Post-Processing Final Operations

Figure T5.1-6

Methane mass fraction plot

Final Operations

The tutorial is now complete. To quit pro-STAR: In the main window, select File > Quit > Quit, Nosave

Version 4.08

5-13

Tutorial 5.2

TRANSIENT 3-D FLOW

Pre-Processing Preliminaries

Tutorial 5.2

TRANSIENT 3-D FLOW

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

Pre-Processing Preliminaries A number of initial file copying operations are needed for proper operation of this tutorial, as follows: Create a sub-directory for the tutorial called tut5-2 and copy the model le generated in Tutorial 5.1 (dil_pipe_ss.mdl) into it Rename this le 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 le for the steady-state case (dil_pipe_ss.ccmp) to the current directory

Start up the pro-STAR interface: Type prostar at the command line Specify your preferred graphics driver (mesa or gl) Accept the default case name (dil_pipe_tr) 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 in file dil_pipe_tr.mdl and will set up the model as it was at the end of Tutorial 5.1. In the main window, select File > Model Title... In the Title text box, change the title to: TURBULENT MIXING IN A DILUTION PIPE (TRANSIENT) Click Apply and Close

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

Version 4.08

5-15

Tutorial 5.2

TRANSIENT 3-D FLOW

Pre-Processing Transient Solution Setting

Transient Solution Setting

The modifications needed to change to a transient analysis are as follows: 1. Select the transient solution mode 2. Dene transient boundary conditions To set up the pro-STAR Model Guide environment for a transient simulation, proceed as follows: 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 Denition
Velocity (m/s)

As indicated in the tutorials introduction, the basic requirement of this case is to simulate a time variation in the inlet stream velocities, as shown in Figure T5.2-1 below:

10 9 8 7 6 5 4 3 2 1 Time (sec) 1 2 Inner Inlet Outer Inlet

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 specied in this system Click Close. The coordinate system choice will appear in the Table Editor dialog.
Version 4.08

5-16

Tutorial 5.2

TRANSIENT 3-D FLOW

Pre-Processing Boundary Re-denition

Select Extrapolate from the Out of bound value option menu Select TIME in the list of Independent Variables Select the V component of velocity from the Dependent Variables scroll list Enter two values in the TIME column in the Independent Variables Table, 0 for the 1st time point and 2 for the 2nd time point Click the green Fill Independent Variable Columns button. In the Independent-Dependent Variables Table. enter two end-point values for the V-velocity, 10 and 2, corresponding to the two time points specied above Enter a new name, in1.tbl, in the File Name box at the top of the panel Click Write to save the table data just entered in the above le Click Graph to display a graph of the inner inlet V-velocity variation, which should be as shown in Figure T5.2-1

Now set up a table for the outer inlet by editing the one currently on display: Enter a new name, OUTER_INLET, in the Table Title box Enter two new end-point values for the V-velocity, 5 and 9, corresponding to the previously dened 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 le 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-denition Go to the pro-STAR Model Guide and select folder Dene Boundaries Open the Dene 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 le browser by clicking the button next to the Table Name box, choose le in1.tbl from the le list and click Open. The selected le name will now be displayed in the box Click Apply to instruct STAR to read V-velocity boundary values from this table Repeat for the outer inlet: Select region no. 2 (Outer_inlet) in the boundary regions scroll list Select Table from the User Option menu Open the pro-STAR le browser by clicking the button next to the Table Name box, choose le in2.tbl from the le list and click Open. The selected le name will now be displayed in the box Click Apply to instruct STAR to read V-velocity boundary values from this table

Analysis Controls

Check the analysis controls status: Select folder Analysis Controls Open the Solution Method panel. It will be seen that the PISO algorithm has been selected automatically.
5-17

Version 4.08

Tutorial 5.2

TRANSIENT 3-D FLOW

CFD Analysis Run Time Controls

Run Time Controls

Open the Analysis Output panel Go to the Transient tab Dene an output period Starting at time t = 0 seconds and with an Output interval of 0.5 seconds for the transient post le Note that, by default, the Velocity and Pressure variables are already selected for output in the upper scroll list. Choose a number of additional items for output, Turb Kinetic Energy, Dissipation, Turbulent Viscosity, Temperature, Density and scalar variable CH4, by selecting each one in turn and then enabling the Post option checkbox. Check the list display to verify your choices and then click Apply

Check the status of the run time controls and then specify the simulated elapsed time and the time step to be used: Select folder Analysis Preparation 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: Final Operations 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 le dil_pipe_ss.ccmp from the browser dialog and then click Open 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.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:

5-18

Version 4.08

Tutorial 5.2

TRANSIENT 3-D FLOW

Post-Processing Preliminaries

In the main pro-STAR panel, 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 Inches) Select Yes for the Write Geometry File option Click Start

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 le dil_pipe_tr.ccmt is displayed in the Post File box and then click Add File Select le dil_pipe_tr.ccmt from the Transient list and then click Open Transient le; the time steps at which ow data were stored during the run should appear in the Time Step scroll list

Postprocessing

The next step in transient post-processing is to identify the point in time at which results are to be manipulated and displayed. This is done as follows: In the 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 denition and click Plot to Screen Go to the Vectors tab and then type 0.7 in the Scale Factor box Click Apply

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

Version 4.08

5-19

Tutorial 5.2

TRANSIENT 3-D FLOW

Post-Processing Post- processing

Figure T5.2-2

Velocity magnitude plot at t = 0.5 s

The methane mass fraction can be plotted as follows: Go to the Load Data panel Select On from the Smooth option menu Select item CH4 in the Scalar Data list Click Get Data Go to the Create Plots panel In the Section/Clipped tab, select Contour (lled) from the Option menu Click Plot to Screen to display Figure T5.2-3

5-20

Version 4.08

Tutorial 5.2

TRANSIENT 3-D FLOW

Post-Processing Post- processing

Figure T5.2-3

Methane mass fraction plot at t = 0.5 s

The results after 2.0 seconds (80 time steps) may be plotted in the same manner: 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

Version 4.08

5-21

Tutorial 5.2

TRANSIENT 3-D FLOW

Post-Processing Post- processing

Figure T5.2-4

Velocity magnitude plot at t = 2.0 s

Go to the Load Data panel Select On from the Smooth option menu Select item CH4 in the Scalar Data list Click Get Data Go to the Create Plots panel Select Contour (lled) from the Option menu in the Section/Clipped tab Click Plot to Screen to display Figure T5.2-5

5-22

Version 4.08

Tutorial 5.2

TRANSIENT 3-D FLOW

Post-Processing Final Operations

Figure T5.2-5

Methane mass fraction plot at t = 2.0 s

Final Operations

The tutorial is now complete. To quit pro-STAR: In the main window, select File > Quit > Quit, Nosave

Version 4.08

5-23

Tutorial 6 SUPERSONIC AND TRANSONIC FLOWS


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

inow

5o

9 cm

Figure T6.0-1

Symmetrical diamond-shaped wedge used in supersonic ow tutorial

Version 4.08

6-1

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Physical Problem Description Preliminaries

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW


A method of adaptive mesh renement How to set up a model of inviscid supersonic compressible ow How to calculate gradients of scalar post data

This tutorial aims to demonstrate:

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

Read in the available problem data:


6-2

Select File > Read Input Coded File... in the main pro-STAR window In the Read Input Coded File dialog select the File name super.inp Click OK
Version 4.08

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Pre-Processing Material Properties

This will read default problem settings from file super.inp as well as the problem geometry and boundary location definitions from the remaining three files. 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

Figure T6.1-1

Coarse mesh geometry

The coarseness of the mesh leads to highly smeared shock waves in the first run but the refinement procedure will correct this. First though, a complete model for the problem must be set up. Material Properties Since the flow is compressible, the fluid density will be modelled using the ideal gas law. The inviscid assumption also needs to be specified and the temperature calculation needs to be turned on:
Version 4.08

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
6-3

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Pre-Processing Boundary Locations and Types

In order to obtain a solution as quickly as possible, it is advisable to specify a suitable initial flow field. This can be particularly important in compressible flow simulations. A simple, but often effective, initialisation strategy is to assign the inlet conditions to the entire solution domain: Boundary Locations and Types Open the Fluid Initialization panel Set the U velocity to 650 m/s Click Apply

The boundary locations and types have already been specified in the coded file super.bnd. To display them on the screen: Select View > Isometric > -1,1,1 Select B > All Click the Display Boundaries button,

, to display Figure T6.1-2

Figure T6.1-2

Boundaries displayed on mesh geometry

Four boundary regions can be distinguished in Figure T6.1-2, each of a different type: 1. 2. 3. 4. The red-coloured region on the left is an inlet The green-coloured region on the right is an outlet The turquoise-coloured region on the wing is a wall The fourth region, opposite the wing and coloured pale blue, is a free-stream boundary. This type of boundary allows shock waves produced by supersonic ows to be transmitted out of the domain without reection. Free-stream boundaries can only be used in models involving supersonic free streams. The
Version 4.08

6-4

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

CFD Analysis - Coarse Mesh Boundary Conditions

velocity at such boundaries is usually assumed to be the same as that at the inlet. All remaining external faces of the mesh are assigned to the default boundary region 0 which, in this case, is defined as a symmetry plane. The boundary types listed above constitute an appropriate boundary region combination for this problem. For further information about the suitability of various boundary region combinations for compressible flow applications see Compressible Flow on page 3-10 of the CCM User Guide. Boundary Conditions To set the desired conditions for the inlet and free-stream regions: In the Dene Boundaries folder open the Dene Boundary Regions panel Select Inlet from the scroll list Change the U velocity to 650 m/s Change the Density to 1.189 kg/m3 Click Apply Select Free Stream from the scroll list Change the U velocity to 650 m/s Click Apply

The default settings are suitable for all other boundary regions. Analysis Controls Solving the momentum equation in the z-direction is not necessary in this case as the model is two-dimensional. Therefore: Final Operations Select the Analysis Controls folder Open the Primary Variables panel Under the Equation Status tab, turn off the solution of the z-momentum equation by unchecking the W-Momentum option Click Apply

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

CFD Analysis - Coarse Mesh To perform the analysis interactively, proceed as follows: 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.01 Click Start

The analysis will then start automatically. The solution should converge within the
Version 4.08 6-5

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Mesh Renement Preliminaries

specified maximum number of iterations. Mesh Renement 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 le

Adaptive mesh refinement can be performed automatically using the Adaptive Renement pro-STAR Model Guide panel or manually using the Rene Cells option in the Cell Tool. Both methods will be demonstrated in this section. Cell set collection Load the pressure data into pro-STAR using the pro-STAR Model Guide: In the Data tab select Data Type Cell and Smooth option On Select Pressure from the Scalar Data list Click Get Data Go to the Create Plots panel In the 3-D Surface tab, select options Contour (lled) and None Click Plot to Screen Turn off the Display Boundaries option by clicking the button, Select View > SNormal View to display Figure T6.1-3

Figure T6.1-3

Pressure contours obtained using coarse mesh

As expected, the coarse mesh results show a lot of smearing in the shock waves at
6-6 Version 4.08

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Mesh Renement Cell set collection

the two wing tips and also in the fan-shaped expansion wave at the wings widest point. To improve the resolution of these flow features, the mesh will be refined in the regions exhibiting the greatest pressure gradients: Select the Analysis Preparation folder and open the Adaptive Renement panel For the Gradient Criteria option in the Renement Criteria tab, ensure Percentage of cells is selected for renement 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

Figure T6.1-4

Cells to be rened and corresponding pressure gradient values

Not all cells shown in Figure T6.1-4 need to be rened in the same manner: the main body of cells should be rened in two directions (x and y) but the near-wall cells only need renement in the direction perpendicular to the wall (x). For this reason, renement 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 renement:
Version 4.08

In the main pro-STAR window, click Store/Recall > Store to open the Store Information dialog Under the Sets Information Type option, type to_rene in the Set Name box
6-7

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Mesh Renement Cell set collection

Click Write and then Close the dialog

To refine the main body of cells: Select C > Subset > Type and click on one of the cells near the top of the window Go to the pro-STAR Model Guide and select the Rene tab in the Adaptive Renement panel Change the Case Name entry to super2 Click Update Model to rene the cells

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_rene 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 Rene Cells... In the Cell Rene 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 rene option Check Yes is selected for the Vertex merge option Choose Yes for the Couple option Click Apply and then Close

Now create the couples by finding matches for the entire cell set: In the main window, select C > All Select Tools > Couple... In the Couple Tool window, click Create Couples... In the Create Couple dialog, ensure that Set is selected from the Cell Selection and Entire cell set from the Master/Slave Selection menus, respectively. Click Apply and then Close Click Cplot to display the rened mesh, shown in Figure T6.1-5

6-8

Version 4.08

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Mesh Renement Final Operations

Figure T6.1-5

Geometry plot showing mesh after a single renement

Final Operations

Write the geometry and problem files and save the model file: 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:
Version 4.08

Select File > Save As Coded Format... Ensure that the Cell File, Vertex File and Boundary File options are all
6-9

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

CFD Analysis - Rened Mesh Preliminaries

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. CFD Analysis - Rened Mesh Preliminaries For the second part of this tutorial, create a new subdirectory called tut6-1b. The cell, vertex, boundary and problem setup files for the final refined mesh are called super_ref.cel, super_ref.vrt, super_ref.bnd and super_ref.inp, respectively. Therefore, before starting this part of the tutorial, make sure these files are copied into the tut6-1b directory. Start up pro-STAR and enter the new case name and title: Type prostar at the command line Specify your preferred graphics driver (mesa or gl) Enter case name super_ref Click Continue

Read in the available problem data: Select File > Read Input Coded File... In the Read Input Coded File dialog, select the File name super_ref.inp and then click OK

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 magnication of the near-wall region so that the details of the mesh structure can be seen more clearly.

6-10

Version 4.08

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

CFD Analysis - Rened Mesh Final Operations

Figure T6.1-6

Mesh geometry, including magnication of the near-wall region

It can be seen that the mesh is very fine in places where shock waves are expected to occur. Refinement is used to a lesser extent near the wing surface and in the expansion wave region. The regions upstream and far downstream of the wing do not need to be finely meshed as the flow there will be relatively undisturbed. Final Operations The model setup for this problem was described earlier in this tutorial and will not be repeated. All the information necessary to run the case is contained within the files provided, so it is only necessary to save the model data and write the problem and geometry files, as shown below. A description of how to run STAR interactively is also given below. Alternatively, you may exit from pro-STAR and run STAR from the command line. Running the Analysis 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

To perform the analysis interactively, proceed as follows: 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.01 Click Start
6-11

Version 4.08

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Post-Processing Preliminaries

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 le

You are now ready to post-process the results. Postprocessing Display a contour plot of pressure: In the Data tab select Data Type Cell and Smooth option On Select Pressure from the Scalar Data list Click Get Data Go to the Create Plots panel In the 3-D Surface tab, select Contour (lled) and Edge Click Plot to Screen to display Figure T6.1-7

Figure T6.1-7

Pressure contour plot

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

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Post-Processing Post- processing

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

Figure T6.1-8

Mach number contour plot

The extent of the solution accuracy improvement can be demonstrated by creating a graph of pressure on the wing and comparing it with similar data produced using the coarse mesh: In the Load Data panel, choose Data Type Boundary and Smooth option On Select Pressure from the Scalar Data list Choose Absolute from the Reference pressure list Click Get Data Select the Graphs > Extract Data sub-folder and open the Field Data panel Click the Reset Graph button and choose Yes in the dialog box that appears Choose Select data along Entire Cell Set Select Post 4 from the Post data to load menu Select Graph data Vs X-axis To isolate the wall shells, type the following in the I/O window: CSET NEWS TYPE 13 Also add some of the shells on the symmetry boundary to the set: CSET ADD GRAN -1.5 12.0 -0.01 0.01
Version 4.08

In the Field Data panel, click the Create Graph button


6-13

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Post-Processing Post- processing

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:

6-14

Version 4.08

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Post-Processing Post- processing

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 le browser at the top of the panel to locate the coarse.xy le and click Open Choose xyxyxy for Establish X-Y pairs Click Create Graph to display Figure T6.1-5

Version 4.08

6-15

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Post-Processing Post- processing

Figure T6.1-9

Graph of wall pressure along the wing

Even through the results from the fine mesh show some oscillations near the shocks, the improvement in their sharpness is dramatic when compared to those from the coarse mesh. Quit pro-STAR by selecting File > Quit > Quit, Nosave

6-16

Version 4.08

Introduction

Tutorial 7 MULTIPLE ROTATING REFERENCE FRAMES


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

Figure T7.0-1

Radial fan geometry

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

Version 4.08

7-1

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing Preliminaries

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS


Import grids from CAD les Create and transform cell couples between mismatched grid regions Dene multiple rotating reference frames Dene rotating and non-rotating walls Change the coordinate reference frame for vector plots

The tutorial aims to show the user how to:

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: RADIAL FAN SIMULATION USING MULTIPLE ROTATING FRAMES Click Apply and Close

This completes the preliminary steps for this tutorial. Setting the Analysis Type The first operation is to set the analysis type for rotating machinery, as follows: In the pro-STAR Model Guide, open the Analysis Features panel Select option On from the Rotating Reference Frame Status menu Click Apply

Note that the folder called Reference Frames is now active in the pro-STAR Model Guide tree. The implicit solution option will be chosen later on using a panel within this folder. Mesh Import You can now continue with importing the grid to be used in the analysis. It is assumed that its three parts have been created separately and that there is no continuity between them. In other words, the mesh blocks are not joined together with common vertex numbering at the block interfaces. To import the Nastran files:
7-2

In the 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 locate le inlet.nas for the Bulk Data File and click Open Click Apply in the Import Grids panel
Version 4.08

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing Mesh Import

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

Figure T7.1-1

Cell table listing

As can be seen, there are four cell types defined: three for fluid cells and one for baffle cells. These cell types were defined within the Nastran files and represent the following mesh regions: 1. Fluid cells within the rotating fan body 2. Fluid cells within the stationary fan body 3. Bafe cells representing the fan blades
Version 4.08 7-3

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing Cell Type Properties

4. Fluid cells within the stationary fan inlet duct You may now inspect the mesh visually as follows: In the main pro-STAR window, select C > All Change the mesh orientation by selecting Plot > Up Axis > Z Change to an isometric viewing direction by selecting View > Isometric > 1,1,1 Click Cplot Select cell plot type Quick Hidden Line; this will allow you to see the fan blades inside the mesh, as shown in Figure T7.1-2

Figure T7.1-2

Imported grid

Cell Type Properties

The cells in each part of the mesh must now be correctly defined and named so that each fan component can be clearly distinguished from the others. To determine what kind of cells have been created by the import process: Select option Utility > Count > Cells

As mentioned in the Mesh Import section, cells in the rotating fan body have a cell table index of 1. Cells in the stationary body domain have cell table index 2 and those in the inlet pipe index 4. Cells with index 3 are interpreted as baffles representing the fan blades among the rotating cells. The desired modifications to the cell type parameters may be done via the cell table editor, as follows:
7-4

In the main pro-STAR window, click to open the Cell Editor dialog Check that table entry #1 is selected in the scroll list
Version 4.08

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing Cell Type Properties

Change the Spin Index value to 2 Enter ROTATING_FAN in the Name box Click Apply

The above actions assign a spin index of 2 to the rotating fan body cells. All other cells will have the default spin index of 1. These will be defined later as the spinning and stationary frames of reference, respectively. Next, change the settings for cell type no. 2, corresponding to the stationary body cells: Select table entry #2 in the scroll list Change the Color 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 Bafe 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

Version 4.08

7-5

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing Mesh Structure

Figure T7.1-3

Fan model grid showing cell colour changes

Mesh Structure

In their present form, the three mesh parts are not joined together. As mentioned earlier, the imported mesh is not continuous in the areas where the rotating fan body meets the stationary inlet and body mesh. This can be clearly seen in the zoomed-in view shown in Figure T7.1-4 below.

7-6

Version 4.08

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing Mesh Structure

Mismatched Grid Areas

Figure T7.1-4

Mismatched grid areas in the model

The three meshes should therefore be joined together using pro-STARs cell-face matching and couple creation facilities, as described below: In the 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.
7-7

Version 4.08

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing Boundary Location

In the main pro-STAR window click Cplot to display the joined-up mesh, as shown in Figure T7.1-5 below.

Figure T7.1-5

Fan model grid display with coupled cells

Complete the mesh re-structuring process by using pro-STARs couple transformation facility. This creates additional cell faces at the junction between rotating and stationary regions, resulting in a mesh with one-to-one cell face connectivity and the elimination of all cell couples. In the main window, select Tools > Couple... Click Transform Couples Verify the result of this operation by selecting Cp > All from the main window. The I/O window feedback should verify that no couples were found in the model. Close the Couple Tool.

Boundary Location

As well as the normal inlet and pressure outflow boundaries, a spinning wall condition needs to be applied to those areas of the stationary fan casing that form part of the rotating mesh. Such wall boundaries must be defined as spinning in the opposite direction to the fan rotation in order to produce a stationary wall relative to the flow. An effective way of locating the counter-spinning boundary regions is given below, where use is made of various cell and vertex set options that help identify their edges. First, create a new cell set containing just the rotating and inlet cells: Select C > New > Type and click on any of the rotating (red) cells Without plotting the new set, select C > Add > Type and click on any of the
Version 4.08

7-8

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing Boundary Location

inlet (cyan) cells Click Cplot

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, display Figure T7.1-6 , to

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

We are now in a position to define a separate region for these boundaries. In the main window, change the viewpoint to be along the negative Z direction by choosing View > Axis > -Z In the pro-STAR Model Guide, go to the Locate Boundaries folder and open the Create Boundaries panel

Follow the instructions below to specify the wall boundaries in four stages. The first stage defines boundaries on the bottom surface of the fan using the ZONE method. The last three stages use the FIND method to generate boundaries from a starting
Version 4.08 7-9

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing Boundary Location

seed vertex on the surface. In the Create Boundaries panel: Select region 3 in the Boundary Regions scroll list Select Wall as the boundary Type from the pull-down menu below Click Dene Ensure region 3 is selected in the Boundary Regions scroll list Select Create by Picking a Zone from the Action List and click Apply Draw a polygon around the entire visible mesh. This will dene the fan base as part of boundary region 3.

1,152 new boundaries should be created by this method. Next: In the main window, change the view back to isometric using View > Isometric > 1,1,1 In the Create Boundaries panel, select Create by Picking Surface based on Vset from the Action List and click the Apply button Use the cursor to pick a vertex anywhere between the two concentric rings of vertices at the top of the visible mesh

An additional 576 boundaries should be created by the above operation. Note that in this particular example, the core axle will be considered as spinning with the fan, so no additional boundaries need to be defined in that location. The inlet and pressure boundaries will be defined next. Start by restoring a view of the entire model: In the main window, select C > All Change the plot type to Hidden Surface Turn off the Display Vertices option button Click Cplot

To define the inlet boundary: Go to the Create Boundaries panel and select region 1 in the Boundary Regions scroll list Select Inlet as the boundary Type from the pull-down menu Click Dene Ensure region 1 is selected in the Boundary Regions scroll list Select Create by Picking Surface based on Edges from the Action List and click Apply Pick a vertex on the top surface of the inlet pipe

Define the pressure boundary in a similar way: Select region 2 in the Boundary Regions scroll list Select Pressure as the boundary Type from the pull-down menu Click Dene Ensure region 2 is selected in the Boundary Regions scroll list Select Create by Picking Surface based on Vset from the Action List and click Apply Pick a vertex on the surface of the outlet plane, as shown in Figure T7.1-7

7-10

Version 4.08

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing Boundary Location

Select a Vertex Here

Figure T7.1-7

Pressure boundary denition

To view all the boundaries created: Turn on the Display Boundaries option by clicking the result is shown in Figure T7.1-8 button. The

Version 4.08

7-11

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing Spin Parameters

Figure T7.1-8

Boundary regions displayed on top of the mesh

Turn off the boundary display by clicking the Display Boundaries button again

This completes the boundary set-up stage. Spin Parameters The rotating frame of reference in this case should be defined with respect to the Zaxis of the global cylindrical coordinate system. Check where the origin of this system is positioned within the model: Click the button in the main pro-STAR window to display the Coordinate Systems dialog Select coordinate system number 2 in the scroll list Select Show Triad from the menu at the bottom of the dialog and click Apply Click Close Position the viewpoint above the mesh by selecting View > Axis > +Z

The triad for the global cylindrical coordinate system shows that the origin is positioned on the fan axis and that its Z-axis runs parallel to it. Therefore, this system is correctly aligned and positioned for the models purposes. Had this not been the case, a new local cylindrical coordinate system would have had to be defined (via the Coordinate Systems dialog) whose Z-axis would be the axis of rotation. We can now specify the implicit solution option and spin parameters for the analysis as shown below. For this case, cells with a spin index of 1 are to be stationary ( = 0) while those with a spin index of 2 are to have an angular velocity of 2000 r.p.m.
7-12 Version 4.08

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing Material Properties

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 Properties Check the properties of the fluid present in the model. The default fluid for material no. 1 in pro-STAR is air at standard pressure and temperature. Therefore its molecular properties do not need to be altered and you can go directly to setting up the turbulence model. 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

Set up some essential monitoring and reference parameters: Boundary Conditions Open the Monitoring and Reference Data (Fluids) panel Enter 20938 for the Monitoring Cell Number Enter 5669 for the Pressure Cell Number Click Apply

An inlet velocity of 5 m/s will be specified, with all flow leaving the fan through the pressure outlet. Locate the Dene Boundary Regions panel in the Dene 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

The pressure boundary is defined next:


Version 4.08

Select region 2 Pressure in the boundary regions scroll list Choose the Static Pressure Option Retain the default relative pressure (0) at the boundary. This means that the absolute pressure at the boundary is equal to the reference pressure. Select option TI/Length from the Turbulence Switch menu
7-13

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing Analysis Controls

Enter a Turb. Intensity of 0.05 and a Length of 0.001. These values would be used if there is any inflow through the boundary faces. Click Apply

Finally, define conditions at the counter-rotating wall regions: Select region 3 Wall in the boundary regions scroll list Enter 2 for the Coordinate System dening the axis of rotation Enter -2000 for Omega 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 Controls To ensure rapid convergence, the under-relaxation factor for pressure will be 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

Options concerned with solution output also need to be modified: In the pro-STAR Model Guide, select the Analysis Output panel Set the solution Output Frequency to 10 Select Additional Output Data item Shear Force and then enable the Post option 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 Model Set the run time controls, i.e., the maximum number of iterations to be performed, 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 Operations The pre-processing task is now complete. If you wish to terminate the session at this stage, save all model data, write the geometry and problem files and exit from pro-STAR as shown below. Alternatively, you may run STAR interactively as described in the next section.
7-14

In the main window, select File > Save Geometry... Ensure that the Geometry Scale Factor is set to 0.001, as the geometry was originally specied in millimetres Click Apply and then Close
Version 4.08

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

CFD Analysis Final Operations

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

Version 4.08

7-15

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Post-Processing Final Operations

Figure T7.1-9

Velocity vectors displayed on the mesh surface

This plot is not an accurate depiction of the flow field because the reference frame in which the results are presented is, by default, the computational frame. This means that, within the rotating mesh region, the results are viewed from the perspective of someone spinning with the fan blades, i.e., a component equal to r is automatically subtracted from the velocity magnitude. This is apparent upon close examination of this region. To obtain a velocity vector plot with all velocities measured relative to the same frame, a stationary reference frame needs to be selected prior to any results being loaded into pro-STAR. To do this: 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

7-16

Version 4.08

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Post-Processing Final Operations

Figure T7.1-10

Velocity vectors relative to a static reference frame

The difference between the plots is apparent in the displayed maximum velocity. Now display contour plots of some scalar flow parameters in a plane bisecting the main flow region (inlet region excluded). 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(lled) and Edge/Mesh None To dene 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

Version 4.08

7-17

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Post-Processing Final Operations

Figure T7.1-11

Pressure contours displayed in a plane parallel to the inlet plane

Note that the relative pressure at the pressure boundary is roughly zero. Now display the turbulence kinetic energy distribution: 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

7-18

Version 4.08

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Post-Processing Final Operations

Figure T7.1-12

Contours of turbulence kinetic energy

Final Operations

End the pro-STAR session: File > Quit > Quit, Nosave

Version 4.08

7-19

Tutorial 8 LAGRANGIAN TWO-PHASE FLOW


The next two tutorials model steady and transient Lagrangian two-phase flow with fuel spray injection. The model geometry consists of an intake port and part of a cylinder for an idealised internal combustion engine, with an intake valve separating the two regions. The air inlet and pressure boundary are shown in Figure T8.0-1. Also shown is the fuel spray injector, located between the inlet and the valve.

Injector

Inlet

Pressure boundary

Figure T8.0-1

Engine intake port geometry

Version 4.08

8-1

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

Physical Problem Description Preliminaries

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION


Set up a steady-state Lagrangian two-phase problem Choose droplet thermophysical models Model droplet evaporation Dene a spray injector Display droplet plots Use the Overlay plotting option Display animated and still plots of particle tracks

This tutorial is intended to show the user how to:

Physical Problem Description In this tutorial, a constant stream of air flows into the chamber at 3 m/s. A nozzle, positioned 5 mm away from the inlet and near the centre of the channel, injects heptane droplets into the air stream at a mass flow rate of 1e-5 kg/s. The nozzle has a diameter of 1 mm and emits the droplets in a spray cone with an angle of 20o. The droplets are grouped into 50 parcels; this number is chosen as a reasonable compromise between computational cost and solution accuracy. Outflow occurs through a notional pressure boundary shown in Figure T8.0-1, and gravity is assumed to be acting in a direction normal to it. All walls in the model are at a fixed temperature of 420K, while the incoming air and heptane fuel are at 400K. A user subroutine is supplied to determine whether droplets evaporate or bounce upon contact with the walls. Pre-Processing Preliminaries Create a sub-directory for this tutorial called tut8-1. The mesh filling the model geometry has already been created and the relevant data may be found in the cell, vertex, boundary and problem files supplied for the tutorial (files intake.cel, intake.vrt, intake.bnd and intake.inp). Copy these files into your working directory. Start pro-STAR and enter the case name: Type prostar at the command line Specify your preferred graphics driver (mesa or gl) Enter the case name (say intake_ss) in the Case Name text box Click Continue

Read in the available problem data: Select File > Read Input Coded File... in the main pro-STAR window In the Read Input Coded File dialog select the File name intake.inp Click OK

This will read in the mesh geometry and boundary locations, plus some basic problem settings. Now name the model:
8-2

In the main pro-STAR window, select File > Model Title... Type STEADY FLOW WITH LIQUID SPRAY INJECTION in the Title
Version 4.08

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

Pre-Processing Mesh Checking

Mesh Checking

box Click Apply and Close

Check the imported polyhedral mesh visually: Select C > All Change the viewpoint by selecting View > Isometric > -1,-1,1 Click Cplot to display Figure T8.1-1

Figure T8.1-1

Mesh geometry

Analysis Features

Specify that the problem involves Lagrangian two-phase flow: In the pro-STAR Model Guide, open the Analysis Features panel Under Multi-Phase Treatment, select Lagrangian Click Apply. You should notice that the Lagrangian Multi-Phase folder is now active in the pro-STAR Model Guide tree.

Material Properties

Turn on gravity and specify its magnitude and direction: Select the Thermophysical Models and Properties folder and then open the Gravity panel Enter a value of 9.8 m/s2 in the Acceleration box Check that the Coordinate System is set to 1 and that the Direction of Gravity Force is 0, 0, -1 Click Apply

The default fluid for the continuous phase is air, so its molecular properties do not
Version 4.08 8-3

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

Pre-Processing Scalar Denition

require alteration. However, turbulence and thermal models still need to be specified: Select the Liquids and Gases folder and open the Molecular Properties (Fluids) panel Select Ideal-f(T,P) for the Density option Click Apply Open the Turbulence Models panel and select On for Turbulence Select k-Epsilon/High Reynolds Number from the Model pull-down menu Click Apply Open the Thermal Models panel and select Temperature Calculation On Click Apply

Specify initial values for the turbulence parameters: Open the Fluid Initialization panel Under the Turbulence tab, ensure the k-Epsilon option is selected Enter 2 for the Turbulent Energy and 3000 for Epsilon Click Apply

Specify the monitoring and pressure reference cells: Scalar Denition Open the Monitoring and Reference Data (Fluids) panel Enter 10054 for the Monitoring Cell Number. This cell is near the valve. Enter 4337 for the Pressure Cell Number. This cell is adjacent to the pressure boundary. Click Apply

Assign scalar no. 1 to the product of droplet evaporation, i.e., heptane vapour, and import its physical properties from pro-STARs built-in database: 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 Dene user scalar from the menu at the top of the panel The physical properties of heptane vapour are read in from pro-STARs 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 Phase Models

Now specify the properties of the dispersed phase using the Lagrangian Multi-Phase folder: Open the Droplet Controls panel Change the Under-Relaxation of Lagrangian Sources value to 0.15 Click Apply Open the Droplet Physical Models panel Under the Global Physical Models tab, turn On Turbulent Dispersion
Version 4.08

8-4

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

Pre-Processing Injector Properties

Turn On Gravity Effects 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 16 of the CCM User Guide. In the main window, select File > System Command... Type ules in the text box, click Apply and then Close Go back to the Droplet Physical Models tab and click User Dene to write the default droplet-wall interaction subroutine DROWBC to the ufile sub-directory Click Apply Open the Droplet Properties panel Choose option Select material from database from the menu at the top of the panel Choose C7H16_l # HEPTANE(L) as the droplet material from the list Enable the Use Internal Property Calculation option Select Dene user material from the menu at the top of the panel to return to the properties panel Specify the previously-dened scalar (HEPTANE(V)) as the product of evaporation by selecting scalar 1 C7H16 for the Evaporates to Scalar option Click Apply

Injector Properties

The droplet thermophysical models and properties are now fully defined, so move on to specifying the properties of the spray injector. First, though, a new coordinate system needs to be defined, centred at the injection point: 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 systems 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
8-5


Version 4.08

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

Pre-Processing Boundary Conditions

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: Boundary Conditions 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

Specify the fixed wall temperature: Go to the Dene Boundaries folder and open the Dene Boundary Regions panel Select region 0 from the boundary regions list Change the Wall Heat option to Fixed Enter 420 K in the Temperature box Click Apply

The inlet velocity and temperature also need to be specified: Select region 1 from the boundary regions list Enter a U velocity of -3 m/s Change the Turbulence Switch option to k/Epsilon Enter 2 m2/s2 for k Enter 0.01 m2/s3 for Epsilon Change the Temperature to 400 K Click Apply

The mean temperature and heptane mass fraction at the pressure boundary are estimated on the basis of temperatures and mass flow rates at the inlet and in the injector. To specify these values: Analysis Controls 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

Set the frequency of data output to the solution le: 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
Version 4.08

8-6

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

User Subroutine Run Time Controls

Run Time Controls

Click Apply

Increase the maximum number of iterations to allow the analysis to converge: Select the Analysis Preparation folder Open the Run Time Controls panel Change the Maximum Number of Iterations to 200 Click Apply

Final Operations

The pre-processing task for this tutorial is now complete. If you wish to terminate the session at this stage, save all model data, write the problem and geometry files and exit from pro-STAR, as shown below. Alternatively, you may run STAR interactively, as described in the next section. In the main pro-STAR window, select File > 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-STARs 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 ule and select le 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,*) Version 4.08 8-7

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

User Subroutine Final Operations

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 8-8 Version 4.08

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

CFD Analysis Preliminaries

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 le

Version 4.08

8-9

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

Post-Processing Continuous Phase

Continuous Phase

Plot velocity vectors on a plane bisecting the valve: Go to the Data tab and select Velocity Components UVW from the Vector Data list Click Get Data Go to the Create Plots panel Under the Section/Clipped tab, select Vector and Edge Dene the cross-section plane by entering 0, 19, 0 for the Point and 0, 1, 0 for the Normal values Click Apply and then Plot to Screen Under the Vectors tab, change the Scale Factor to 0.5 Click Apply In the main pro-STAR window, select View > SNormal View to display Figure T8.1-2

Figure T8.1-2

Velocity vectors on a plane bisecting the valve

Now create a temperature contour plot on the same plane: Go to the Load Data panel Select Data Type Cell Turn On the Smooth option Select Temperature from the Scalar Data list Click Get Data Go to the Create Plots panel Under the Section/Clipped tab, choose Contour (lled) and Edge Click Plot To Screen to display Figure T8.1-3

8-10

Version 4.08

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

Post-Processing Continuous Phase

Figure T8.1-3

Temperature contours on a plane bisecting the valve

In addition, plot contours of the heptane vapour mass fraction: Go to the Load Data panel Select C7H16 from the Scalar Data list Click Get Data Click Replot to display Figure T8.1-4

Version 4.08

8-11

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

Post-Processing Dispersed Phase

Figure T8.1-4

Contours of heptane vapour concentration on a plane bisecting the valve

Dispersed Phase

The dispersed phase can be visualised by creating droplet plots. In this instance, the droplet tracks will be plotted on top of the previous contour plot of heptane vapour concentration using the Overlay option: 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 le 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: DSET NEWS DRAN 2 50 3 Select Plot > Display > Overlay from the main pro-STAR windows menu bar to turn on the Overlay option Enter command PLFIX ON in the I/O window to prevent the display from automatically adjusting to the scale of the plot that follows

8-12

Version 4.08

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

Post-Processing Dispersed Phase

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

The droplets can also be displayed as particle tracks: Turn off the Overlay and Plot Fix options by entering the following commands in the I/O window: OVERLAY OFF PLFIX OFF Return to the Load Data panel and, under the File(s) tab, click Open Post le 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

Version 4.08

8-13

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

Post-Processing Dispersed Phase

Figure T8.1-6

Particle tracks showing paths of heptane droplets

Figure T8.1-5 and Figure T8.1-6 show that 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

8-14

Version 4.08

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

Post-Processing Final Operations

Figure T8.1-7

Isosurface of heptane vapour concentration with mass fraction = 0.0001

Final Operations

End the pro-STAR session: Select File > Quit > Quit, Nosave

Version 4.08

8-15

Tutorial 8.2

TRANSIENT FLOW WITH FUEL SPRAY INJECTION

Physical Problem Description Preliminaries

Tutorial 8.2

TRANSIENT FLOW WITH FUEL SPRAY INJECTION


Set up a transient Lagrangian two-phase ow problem Produce on-screen animations using command loops Save screen shots for creating animations externally

This tutorial is intended to show the user how to:

Physical Problem Description The problem geometry and flow conditions in this tutorial are the same as in Tutorial 8.1. However, the injection is more complex, with the heptane fuel no longer injected in a constant stream but in two short bursts. For the first burst, the mass flow rate through the injector starts at 0.001 kg/s (the mass flow rate in the steady-state solution) and then falls linearly to 0.0001 kg/s. The same pattern is then repeated for the second burst. The total injection period is 0.05 s. Pre-Processing Preliminaries Create a sub-directory for this tutorial called tut8-2. Most of the case set-up has already been performed in Tutorial 8.1 so the model file, intake_ss.mdl, should be copied across to the new working directory and renamed intake_tr.mdl before continuing. Start up pro-STAR and open the model file: Type prostar at the command line Specify your preferred graphics driver (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 le option Click Continue

Now change the model title: Select File > Model Title... In the Title box, enter TRANSIENT FLOW WITH LIQUID SPRAY INJECTION and click Apply and Close

Analysis Features

Change to a transient analysis setting: In the pro-STAR Model Guide, open the Analysis Features panel Select Transient as the Time Domain Click Apply

Injector Properties

The injector position and droplet properties have already been defined in the previous tutorial. However, the flow rate profile during the injection period must be created from scratch: Select the Lagrangian Multi-Phase folder Open the Spray Injection with Atomization panel
8-17

Version 4.08

Tutorial 8.2

TRANSIENT FLOW WITH FUEL SPRAY INJECTION

Pre-Processing Analysis Output

In the Dene 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:

Click Write, then Graph to display Figure T8.2-1 Close the Table Editor In the Spray Injection with Atomization panel, check that intake_tr.tbl is the selected Table in the le name box Change the Number of Parcels/Injector to 1000 /s Click Update Injector

Figure T8.2-1

Graph showing the mass ow rate prole over the injection period

Analysis Output
8-18

Instruct STAR to write the analysis results in the transient post data file (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.
Version 4.08

Tutorial 8.2

TRANSIENT FLOW WITH FUEL SPRAY INJECTION

CFD Analysis Set Run Time Controls

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 le 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. Final Operations 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

The pre-processing task is now complete. If you wish to terminate the session at this stage, save all model data, write the problem and geometry files and exit from pro-STAR, as shown below. Alternatively, you may continue with the CFD analysis, using the 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

Inspect the information written in files intake_tr.run and intake_tr.info once the run has finished.
Version 4.08 8-19

Tutorial 8.2

TRANSIENT FLOW WITH FUEL SPRAY INJECTION

Post-Processing Preliminaries

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

Read in the results of the analysis: Select folder Post-Processing Open the Load Data panel to display the File(s) tab Select the Transient Analysis option Click Add File Select the le intake_tr.ccmt from the Transient list and click Open Transient le

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

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-STARs animation capabilities, see Animation Sequence Definition and Display on page 12-2 of the Post-Processing User Guide. Final Operations End the pro-STAR session: Select File > Quit > Quit, Nosave

Version 4.08

8-21

Physical Problem Description

Tutorial 9 COMBUSTION
Physical Problem Description A model of an idealised CAN type gas turbine combustion chamber is chosen to familiarise users with STAR-CDs combustion modelling capabilities and introduce various recommended practices for computing combusting flows. The mesh used in this case is shown in Figure T9.0-1 and was created in Tutorial 1.2 of the Meshing Tutorials volume. The problem geometry consists of three sets of air inlets placed circumferentially at the combustor head to promote maximum mixing and flame stabilisation. Swirling air enters the primary combustion zone through the two sets of inlets nearest to the axis of symmetry. Non-swirling air enters the upper inlet and thence the primary, secondary and dilution zones via five injection holes on the liner. This liner, separating the cooling passage from the main combustion area, is represented in the model by baffle cells. Air is assumed to be composed of 23.2% oxygen and 76.8% nitrogen, by mass, and to be at a pressure of 1 bar and temperature of 293 K throughout this tutorial. Unless stated otherwise, its physical properties are assumed to be as follows: Density Molecular viscosity Specic heat Thermal conductivity Ideal gas with pressure dependence Pa s 1.81 105 1006 J/kg K 2 2.637 10 W/m K

Only a sixty-degree sector of the combustor is simulated (see Figure T9.0-1). This is achieved by using STAR-CDs cyclic boundary option which allows the transmission of information across boundaries of this type. To demonstrate the full combustion capabilities of STAR-CD, both gaseous and liquid fuels are employed in the simulation. Gaseous fuels are supplied through an inlet at the combustor head whilst liquid fuels are injected as droplets from a single injector located on the axis. The physical properties of air and fuel and details of the individual simulations are presented in the corresponding sub-tutorials.

Version 4.08

9-1

Physical Problem Description

Figure T9.0-1

Mesh structure for the combustion chamber model

9-2

Version 4.08

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Pre-Processing Preliminaries

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

In this tutorial, a propane combustion case is set up using the Presumed Probability Density Function (PPDF) reaction model for unpremixed flames. The model assumes adiabatic conditions (no heat loss) and a local instantaneous chemical equilibrium. The main aim is to: Familiarise users with the adiabatic PPDF model setup Demonstrate the use of the CEA package for calculating polynomial coefcients required by the model Evaluate the accuracy of the analysis results and suggest a way of improving them Illustrate the use of user-dened panels as a way of facilitating post-processing operations

For adiabatic PPDF, the physical properties of the fuel (pure propane in this case) are not utilised as no additional transport equations requiring these properties are solved. Temperature, density and species mass fractions are evaluated using the function formulation outlined in the Methodology volume (see Presumed-PDF (PPDF) Model for Unpremixed Turbulent Reaction in Chapter 10). Pre-Processing Preliminaries Create a sub-directory for the tutorial called tut9-1. The mesh for this problem has already been created in the Meshing Tutorials volume (Tutorial 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

Read in the available problem data: Select File > Read Input Coded File... in the main pro-STAR window In the Read Input Coded File dialog select the File name combustor.inp Click OK

This will read default problem settings from file combustor.inp plus the problems cell, vertex and boundary location definitions from the remaining three files. In the main window, select File > Model Title... In the Title text box type: PROPANE COMBUSTION (ADIABATIC PPDF) Click Apply and Close

Plot the mesh to confirm the data read in:


Version 4.08 9-3

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Pre-Processing Material Properties

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

Set up material properties and thermofluid models using the appropriate pro-STAR Model Guide panels. The required actions are as follows: 1. 2. 3. 4. 5. 6. Select the Ideal Gas Law density variation (with pressure dependence) Select the standard k- turbulence model Turn on the temperature solver Set the initial temperature distribution Choose the monitoring cell location Choose the reference pressure and its location Select sub-folder Liquids and Gases Open the Molecular Properties (Fluids) panel Select option Ideal-f(T,P) from the Density menu Click Apply 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 Open the Thermal Models panel Turn on the solution of the energy equation by selecting On for the Temperature Calculation option Click Apply Open the Fluid Initialization panel In the Flow Conditions tab, conrm that a value of 293 is displayed in the Temperature box Go to the Turbulence tab and select option TI/Mixing Length from the Model options Enter 0.05 and 0.2 in the Intensity and Mixing Length boxes, respectively Click Apply Open the Monitoring and Reference Data (Fluids) panel Choose a monitoring cell location (say, half way between the axis and the outer casing and towards the outlet). This may be done by entering a cell
Version 4.08

9-4

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Pre-Processing Combustion Model

Combustion Model

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. Conrm that 100000 appears in the Pressure box Click Apply

Use the pro-STAR Model Guides Reacting Flow folder to set up the combustion model as follows: Select sub-folder Reacting Flow followed by Chemical Reactions Open the Scheme Denition 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 Denition tab, supply the names of all chemical substances involved plus relevant reaction parameters, as shown below: Pressure 1e5 Select Stream to Dene -> 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 Dene Stream Select Stream to Dene -> 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 Dene Stream Go to the All Species scroll list and enter the following data by selecting each species line in turn: 1 C3H8 2 O2
9-5

Version 4.08

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. Define the basic character of the reaction: Go to the Heat Option tab Check that option Adiabatic is selected in the Heat Option menu

Start up the CEA application: Go to the Integration Control tab Check that option Polynomial is selected in the Integration Method menu. Note that all items in the PPDF Dependent Variables list are initially agged as Undened Click Apply

Updated items will now appear on the PPDF Dependent Variables scroll list. Selecting each item in turn will display the corresponding coefficients in the PPDF Polynomial Coefcients 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

9-6

Version 4.08

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Pre-Processing Scalar Properties

Figure T9.1-1

PPDF polynomial coefcient plots

Reset the graph registers before proceeding further In the main pro-STAR window menu bar, select Graph > Reset Click Yes to conrm your action

The CEA output is passed to pro-STAR which in turn generates suitable scalar variables and maps them automatically to the constituents of the reaction scheme. The reaction scheme is also assigned automatically to the current fluid domain (material no. 1). To check the results of this operation: 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 Properties

Check the properties of the scalar variables that were automatically set up by the combustion models mapping process, described above: Select sub-folder Additional Scalars and then open the three panels under it in turn In the Molecular Properties (Scalars) panel, use the Scalar number option to inspect the available scalars.
9-7

Version 4.08

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Pre-Processing Boundary Conditions

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 Conditions Check the current boundary definitions and specify boundary conditions where appropriate. Select folder Dene Boundaries Open the Dene 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:

9-8

Version 4.08

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Pre-Processing Boundary Conditions

Click Apply

Specify conditions at the remaining boundaries: 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 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:

Version 4.08

9-9

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Pre-Processing Boundary Conditions

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:

9-10

Version 4.08

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Pre-Processing Boundary Conditions

Click Apply

Check the wall boundary conditions for the first inlet-side wall (region 7) Select region 7 in the scroll list. The default settings are acceptable, so no further action is required

This is also true of the wall boundary conditions assigned to regions 8 to 13. Check region 14 (the outlet) and region 15 (the baffle boundaries): Highlight region 14 in the scroll list. The default settings are acceptable, so no further action is required Highlight region 15 in the scroll list. The default settings for side no. 1 are acceptable, so no further action is required. The settings for side no. 2 are automatically the same as side no. 1

Specify a boundary condition for the mixture fraction variable at the fuel inlet: Open the Scalar Boundaries panel Select region no. 3 in the Boundary Region scroll list Select MIXTURE_FRACTION in the Scalars scroll list, type 1 in the boundary Value box and then click Apply
9-11

Version 4.08

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

CFD Analysis Control Parameters

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

Repeat the above sequence of steps for regions 5 and 6. Control Parameters Check the solution control parameters and then change the under-relaxation factor and residual tolerance for the mixture fraction and variance: Run Time Controls Select folder Analysis Controls Open the Additional Scalars (Controls) panel Select MIXTURE FRACTION in the Scalar scroll list Type 0.7 in the Under-Relaxation Factor box Type 0.001 in the Residual Tolerance box Click Apply Select VARIANCE in the Scalar scroll list Type 0.7 in the Under-Relaxation Factor text box Type 0.001 in the Residual Tolerance text box Click Apply

Check the status of the run time control parameters: 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, conrming that this is a run from initial conditions.

Final Operations

The pre-processing task is now complete. If you wish to terminate the session at this stage, save all model data, write the geometry and problem files and exit from pro-STAR, as shown below. Alternatively, you may continue with the CFD analysis, using the 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:
9-12

In the main pro-STAR panel, select File > Save Model In the Analysis Preparation folder, open the Run Analysis Interactively panel
Version 4.08

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 18, 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-STARs menu bar to display the available panels and then select Pgetc. Note that the name of the menu item may be L Pgetc or G Pgetc, depending on whether a local or global panel sub-directory is being used. If no items appear in the menu, either the required panel does not exist or it is necessary to specify the name and location of the above sub-directories. In either case, you will need to refer to the section on Panel Definition in this tutorial for further instructions. Select option Case from the Pgetc panels Load menu to get the current case name Select option Load St. to read in the analysis results In the main window, select plot option Contour 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

Version 4.08

9-13

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Post-Processing Preliminaries

Figure T9.1-2

Velocity magnitude plot

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 prole shown in Figure T9.1-3

9-14

Version 4.08

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Post-Processing Preliminaries

Figure T9.1-3

Temperature distribution

Note that the cell-averaged temperature contours continue unbroken across the baffle. This implies a heat flow situation that is unrealistic (given that the baffle is adiabatic) and is solely due to the interpolation technique employed by pro-STAR to create a smooth-looking plot. You should be aware of this when creating smoothed contour plots in geometries containing baffles and solid-fluid interfaces. Close the Pgetc panel: 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

Version 4.08

9-15

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Post-Processing Preliminaries

Figure T9.1-4

Propane distribution

Figure T9.1-5

Carbon dioxide distribution

9-16

Version 4.08

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Post-Processing Analysis of Results

As for the cell-averaged temperature plot, the vertex-averaged CO2 plot shows unrealistic values in the vicinity of the baffle. This effect could be minimised by using a finer mesh. Analysis of Results The predicted maximum temperature in the model is lower than would normally be expected from this type of combustor. It is therefore instructive to consider the likely accuracy of the temperature distribution obtained here. A good quality measure to use for this purpose is the ratio
2 gf f ----------- = --------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 rst 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

Load the mixture fraction in post register no. 2: In the Post Register Operations dialog, go to the Function Category menu and select option Load cell data > Scalar Concentration Select Register 2 as the destination register and type 1 in the Scalar # text box Click Apply

Calculate the required ratio by dividing the contents of register 1 by those of register 2 and putting the results in register 4 (reserved for scalar data). Go to the Function 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

Now plot the distribution:


Version 4.08

Change the plot option setting to Contour


9-17

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Panel Denition Analysis of Results

Turn off mesh plotting Click Cplot to display Figure T9.1-6

Figure T9.1-6

Distribution of quality measure ratio

It will be seen that the value of the ratio is generally rather high, implying that the 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 Denition Panel Pgetc is designed as an aid to post-processing cell-centre based data. To set up the panel, shown below, proceed as follows:

9-18

Version 4.08

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Panel Denition Analysis of Results

Select Panels > Dene 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 denition is placed by default in the present working directory, in a le 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: In the Pgetc panel, select File > Layout... In the Dene Panel Layout dialog box, type 7 in the Number of horizontal buttons text box Type 4 in the Number of vertical buttons text box Click Apply and then move the panel to the screen location where you want it to appear every time you enter pro-STAR Click Close

Proceed with the definition of panel buttons. To create the first column:
Version 4.08

Click on the rst button, B0 Type SU in the text box for the Button Name Click in the Denition eld and type: getc u v w su$repl Click on button B1 Type SV in the text box for the Button Name Click in the Denition eld 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 Denition eld and type: getc u v w sw$repl Click on button B3 Type VM in the text box for the Button Name
9-19

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Panel Denition Analysis of Results

Click in the Denition eld and type: getc u v w vmag$repl Click File > Save

The remaining columns are created in a similar manner, according to the definitions given below: ID= 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
9-20 Version 4.08

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Panel Denition Analysis of Results

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
Version 4.08 9-21

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Panel Denition Analysis of Results

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 18, Panels in the CCM User Guide). The definition of this special menu is as follows: In the Pgetc panel, select File > Menus... In the Dene Panel Menus dialog box, type Load for the Menu Title of Menu 1 Fill in the Menu Item Label and Menu Item Command fields according to the definitions given below:

Menu Item Label Case Event Load St. Load Tr.

Menu Item Command *get name,case evfi conn load {name}.ccmp trload {name}.ccmt

Click Apply Close the Dene Panel Menus dialog

The panel definition is now complete.


9-22

Close the Dene Panel dialog


Version 4.08

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Panel Denition Analysis of Results

Note that, in going through this process, you have the choice of leaving the panel in your present working directory, where it will be available only to the case you are working on at the moment, or copying/moving it to a local or global panel directory. You might do the latter if you want the panel to be available for use by other members of your team (global) or by yourself in all your case directories (local). If the panel is moved or copied to a local or global directory, you need to make sure that pro-STAR knows the latters name and location. This information may be available already in the form of environment variable definitions in your operating system set-up. In such a case, next time you enter pro-STAR you will see the panel name displayed (preceded by L or G, as appropriate) when you click Panels in the main menu bar. If environment variables are not set, it is still possible to supply the required information as part of the current session, as follows: Select Panels > Set Environment... from the main menu bar Type the full lename path in the PANEL_GLOBAL or PANEL_LOCAL text box, depending on the location of the panel denition le Click Apply and Close

SETENV PANEL LOCAL Select Panels > Dene 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 Dene Panel dialog Select Panels from the main menu bar to conrm 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:

Version 4.08

9-23

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Panel Denition Analysis of Results

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
9-24 Version 4.08

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Panel Denition Analysis of Results

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=
Version 4.08 9-25

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Panel Denition Analysis of Results

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
9-26 Version 4.08

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Additional Modelling Notes

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)


Familiarise users with the eddy break-up model setup Demonstrate a simulation in which the overall combustion reaction is represented by several steps, describing fuel pyrolysis and the subsequent oxidation into combustion products Illustrate the use of the numerical scheme for modelling the ignition process

The main aim of the tutorial is to:

Thus, the simulation performed in Tutorial 9.1 is repeated using a three-step reaction of the following form: C 3 H 8 + 1.5O 2 3CO + 4H 2 CO + 0.5O 2 CO 2 H 2 + 0.5O 2 H 2 O The mesh set up in Tutorial 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: Air Molecular weights 28.96 Density Molecular viscosity Specic heat 1.81 105 8.27 106 1.79 105 8.88 106 1.49 105 C3H8 44.0 CO 28.0 H2 2.0 CO2 44.0 H2O 18.0 Ideal gas 1.27 105

Polynomial function of temperature

Thermal conductivity 2.637 1.769 2.497 18.62 1.696 2.533 102 102 102 102 102 102 It is assumed that both air and fuel enter the combustion chamber at a pressure of 1 bar and temperature of 293 K. Additional Modelling Notes Transport equations are solved for the leading reactants and their mixture fractions (Mixture fraction = Unburnt fuel mass fraction + Burnt fuel mass fraction). The oxygen mass fraction may be obtained from its xed fraction in the inlet air stream and the amount of fuel burnt. Thus, an internal linear equation is employed to compute this quantity. The nitrogen mass fraction is obtained from its xed fraction in the inlet air stream.
9-27

Version 4.08

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Numerical Considerations Preliminaries

The mass fraction of products (carbon dioxide and water vapour) is obtained from the amount of burnt fuel and is therefore also computed from a linear equation. Using linear equations for oxygen and product mass fractions implies that the molecular diffusivities of all species are assumed to be identical. It is assumed that the combustion rate is controlled by turbulent mixing of fuel and air and is calculated via the eddy break-up model. The mixtures specic heat is assumed to be dependent on component specic heats, i.e. Cp =

C pi Y i
i i

where Yi is the species mass fraction and C p C p( T )


i

for all i

In this model, it is necessary to initiate combustion by an ignition mechanism. A ow domain region lying downstream of the inlets is chosen for this purpose. Ignition comprises an articial reduction of the fuel mass fraction used to determine the combustion rate and is performed over a pre-dened number of iterations. It is expected that the nal solution will be independent of the choice of ignition cells, the fuel mass fraction reduction mentioned above and the duration of the ignition process.

Numerical Considerations The combustion source term in the leading reactant transport equations is large; therefore, the fuel mass fraction requires under-relaxation. Using the chemico-thermal option for enthalpy, the enthalpy and mixture fraction variables must develop numerically at the same rate as the fuel fraction. Therefore, the under-relaxation factors for enthalpy and transported species must be identical. Small errors in calculating the fuel mass fraction can strongly inuence 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.
9-28

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


Version 4.08

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Pre-processing Ignition Region

Specify your preferred graphics driver (mesa or gl) Enter the case name (say, EDBR_va) in the Case Name text box Click Continue

Read in the available problem data: Select File > Read Input Coded File... in the main pro-STAR window In the Read Input Coded File dialog select the File name combustor.inp Click OK

This will read default problem settings from file combustor.inp plus the problems cell, vertex and boundary location definitions from the remaining three files. In the main window, select File > Model Title... In the Title text box type: PROPANE COMBUSTION (3-STEP EDBR) Click Apply and Close

Plot the mesh to confirm the data read in: In the main pro-STAR window, select Plot > Up Axis > X Select C > All Select View > Isometric > 1, 1, -1 Click 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 is now active in the pro-STAR Model Guide tree. This will be used in this tutorial to supply chemical reaction definitions.

Ignition Region

As explained in the Additional Modelling Notes section, an ignition region needs to be defined for this type of model. To do this, collect the cells to be designated as ignition cells as follows: In the I/O window, type command CSET NEWS GRAN 0.049 0.0751,,,-0.1 0.51 2 Click 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 models cells:
Version 4.08

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

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Pre-processing Material Properties

Material Properties

Enter Ignition_cells in the Name box Click Apply and then Close In the Cell Tool, select Modify > Modify Type (Cell Set) Click Replot and note the change of cell colour in the ignition region Close the Cell Tool In the main window, select C > All and then Cplot to see all cells in the model

Set up material properties and thermofluid models using the appropriate pro-STAR 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 specic heat of the background uid (air) as a function of temperature. In this tutorial, we assume that the specic 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 In the pro-STAR Model Guide, select sub-folder Liquids and Gases Open the Molecular Properties (Fluids) panel Select option Ideal-f(T,P) from the Density menu Select option Polynomial in the Specic Heat menu. Note the Molecular Weight box whose default value, 28.96, is appropriate for air. Click Apply. A pop-up panel will appear, warning you that pro-STAR was not able to nd the background material name (AIR) in its built-in database and suggesting an alternative action. Click OK to close the panel and then click Dene Polynomial to open the Polynomial Function Denition 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 coefcients and assign them to material no. 1, i.e., the background material. Click Graph Data to display a graph of specic heat versus temperature, together with corresponding graphs for normalised enthalpy and entropy Click Close to exit from the dialog 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 Open the Thermal Models panel Turn on the solution of the energy equation by selecting On for the Temperature Calculation option Select option Chemico-Thermal from the Enthalpy menu Click Apply Open the Fluid Initialization panel
Version 4.08


9-30

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Pre-processing Combustion Model

In the Flow Conditions tab, conrm 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. Conrm that 100000 appears in the Pressure box. Click Apply

Combustion Model

Use the pro-STAR Model Guides Reacting Flow folder to set up the combustion model as follows: Select sub-folder Reacting Flow followed by Chemical Reactions Open the Scheme Denition 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 rst reaction denition, 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, conrm 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 denition, 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 denition, H2 + 0.5O2 -> H2O in the box Click Apply. pro-STAR will update the various lists as necessary

Check the treatment to be applied to the ordinary reactant (oxygen):


Version 4.08

In the Reactant Parameters list, select reactant no. 1 Check that option Fixed-Fraction is shown Check that the (xed) oxygen mass fraction in the incoming air stream is
9-31

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Pre-processing Scalar Properties

0.233 This completes the specification of leading reactants and combustion products. pro-STAR will automatically map scalar variables to the constituents of the reaction scheme, define their initial conditions and assign physical properties using its built-in database (props.dbs). If a chemical species cannot be mapped to a scalar variable, a warning will be displayed in the I/O window and a new scalar of that name (but with default, i.e., air, properties) will be created and added to the scalars list. A stoichiometric check under this condition will fail, indicating that the assigned properties (molecular weights, in particular) are not appropriate. It is therefore advisable to check the I/O window to confirm that the model and chemical species have been correctly set up. Finally, specify the ignition parameters as follows: Open the Ignition panel Accept the default setting (Numerical) in the Model/Treatment panel Type 4 in the Cell Type box Type 0.05 in the Fraction Burnt box Accept the default option, Time Step/Iteration, from the Interval menu Type 50 and 150 in the Start and End boxes, respectively Click Apply

Assign the chemical reaction scheme just defined to the models fluid domain: Scalar Properties Open the Scheme Association panel Select 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 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 coefcients 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 Dene Polynomials button for specic heat to open the Polynomial Function Denition dialog. This will display the coefcients just retrieved.
Version 4.08

9-32

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Pre-processing Boundary Conditions

Click Graph Data to display a graph of specic heat .vs. temperature, together with corresponding graphs for normalised enthalpy and entropy Click Close to exit from the dialog In the Molecular Properties (Scalars) panel, retrieve polynomial coefcients for the remaining species (i.e., scalar nos. 3, 4, 5, 6, 8 and 10) by selecting them in turn in the Scalar spin box and then following the same procedure as for scalar no. 1

Boundary Conditions

Check the current boundary definitions and specify boundary conditions where appropriate. Select folder Dene Boundaries Open the Dene 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:

Version 4.08

9-33

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Pre-processing Boundary Conditions

Click Apply

Specify conditions at the remaining boundaries: 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:

9-34

Version 4.08

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Pre-processing Boundary Conditions

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:

Version 4.08

9-35

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Pre-processing Boundary Conditions

Click Apply

Check the wall boundary conditions for the first inlet-side wall (region 7) Select region 7 in the scroll list. The default settings are acceptable, so no further action is required

This is also true of the wall boundary conditions assigned to regions 8 to 13. Check region 14 (the outlet) and region 15 (the baffle boundaries): Highlight region 14 in the scroll list. The default settings are acceptable, so no further action is required Highlight region 15 in the scroll list. The default settings for side no. 1 are acceptable, so no further action is required. The settings for side no. 2 are automatically made the same as side no. 1

Specify scalar boundary conditions at the fuel inlet: Open the Scalar Boundaries panel Select region no. 3 in the boundary regions scroll list Select MIX_FRAC-FUEL_1 in the Scalars scroll list, type 1 in the boundary Value box and then click Apply
Version 4.08

9-36

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

CFD Analysis Control Parameters

Control Parameters

Select C3H8 in the Scalar scroll list, type 1 in the boundary Value box and then click Apply

Check the solution control parameter settings and specify new values for 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 Controls

Check the status of the run time control parameters: 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, conrming that this is a run from initial conditions.

Final Operations

The pre-processing task is now complete. If you wish to terminate the session at this stage, save all model data, write the geometry and problem files and exit from pro-STAR, as shown below. Alternatively, you may continue with the CFD analysis, using the 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

Version 4.08

9-37

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Post-Processing Preliminaries

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: Basic Plots Select folder Post-Processing Open the Load Data panel and display the File(s) tab Click Open Post le

Start by re-plotting the mesh:. In the main pro-STAR window, select C > All Click Cplot

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

Figure T9.2-1

Contours of velocity magnitude

Close the Pgetc panel


9-38

File > Close


Version 4.08

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Post-Processing Basic Plots

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

Figure T9.2-2

Temperature distribution

Note that the temperature contours continue unbroken across the baffle. This implies a heat flow situation that is unrealistic (given that the baffle is adiabatic) and is solely due to the interpolation technique employed by pro-STAR to create a smooth-looking plot. You should be aware of this when creating smoothed contour plots in geometries containing baffles and solid-fluid interfaces. Repeat for the mass fraction profiles of the fuel and one of the combustion
Version 4.08 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

Figure T9.2-3

Contour plot of C3H8 concentration

9-40

Version 4.08

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Post-Processing Basic Plots

Figure T9.2-4

Contour plot of CO2 concentration

As with the temperature plot, the CO2 contour plot incorrectly suggests that the scalar concentration is continuous across the baffle. To terminate the session: Select File > Quit > Quit, Nosave

Version 4.08

9-41

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing Preliminaries

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

In Tutorial 9.2, a three-step eddy break-up model was used to simulate propane combustion. This sub-tutorial employs the same reaction model but under a significantly different set of conditions, as follows: 1. The fuel is toluene (C7H8) and is injected into the combustor in the form of droplets that subsequently evaporate into the combustible vapour. 2. An externally supplied subroutine is used to model the physical process involved in fuel droplet evaporation 3. A single-step chemical reaction of the following form is used: C 7 H 8 + 9O 2 7CO 2 + 4H 2 O 4. Radiation effects are introduced. Some preparatory work for this feature, in the form of extra boundary region denitions, 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 denitions. 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 modications are made to represent the combustion conditions, droplet injection and surface radiation properties. The aim of this tutorial is therefore to demonstrate: The combination of several advanced STAR-CD features (chemical reaction, Lagrangian two-phase and radiation simulation) in building a physically realistic model of a typical combustion problem The importance of user subroutines in enhancing the accuracy of droplet material property models

Pre-processing Preliminaries Create a sub-directory for the tutorial called tut9-3. The mesh for this problem has already been created in the Meshing Tutorials volume (Tutorial 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

Read in the available problem data: Select File > Read Input Coded File... in the main pro-STAR window In the Read Input Coded File dialog select the File name combustor.inp Click OK

This will read default problem settings from file combustor.inp plus the
Version 4.08 9-43

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing Ignition Region

problems cell, vertex and boundary location definitions from the remaining three files. In the main window, select File > Model Title... In the Title text box type: TOLUENE COMBUSTION (1-STEP EDBR,DROPLETS,RADIATION) Click Apply and Close

Plot the mesh to confirm the data read in: In the main pro-STAR window, select Plot > Up Axis followed by X Select C > All Select View > Isometric > 1, 1, -1 Click Cplot

Specify the key features of this case, i.e., chemically reacting flow in the presence of droplets: In the pro-STAR Model Guide, go to panel Analysis Features Select option Lagrangian from the Multi-Phase Treatment menu Select option Chemical Reaction from the Reacting Flow menu Click Apply. The folder called Lagrangian Multi-Phase will now appear active in the pro-STAR Model Guide tree 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. This will be used in this tutorial to supply chemical reaction definitions

Ignition Region

Given that an eddy break-up model is to be used here, an ignition region needs to be specified for this model, similar to the one described in Tutorial 9.2. To do this, collect together the cells to be designated as ignition cells as follows: In the I/O window, type command CSET NEWS GRAN 0.074 0.101,,,-0.1 0.51 2 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 models cells:
9-44

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
Version 4.08

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing Thermal Options

Thermal Options

Close the Cell Tool In the main window, select C > All and then Cplot to see all cells in the model

The radiation model in this tutorial includes the effects of the intervening gas, using default gaseous radiation properties, as well as surface-to-surface radiation. This requires the use of beams that can be tracked only through cell types that are explicitly defined as participating in radiative heat transfer. Since ignition cells have already been prepared for this type of analysis, all cells in the rest of the fluid domain need to be re-set for this purpose: Go to the Cell Editor and select row # 1 in its scroll list Select On from the Radiation menu Click Apply Close the Cell Editor

Turn radiation on, choosing the Discrete Transfer analysis method in conjunction with the participating media calculation option: Radiation Patches Select the Thermophysical Models and Properties folder and open the Thermal Options panel 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

To use the discrete beam radiation model, it is necessary to subdivide all boundary regions present in the problem (except for cyclic boundaries) into so-called patches. These are used both during view factor calculations and for evaluating the radiative heat transfer. Assign a unique patch to every boundary in every relevant region. This can be done most conveniently by means of a pro-STAR command loop, shown below: typed into the I/O window: In the I/O window, type the following commands: BSET NONE *SET NREG 3 1 *DEFINE BPATCH NREG,,BYFA BSET ADD REGI NREG *END *LOOP 1 12 The above loop will create 535 patches. Display the patches to confirm that the operation has been carried out correctly: 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

Version 4.08

9-45

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing Material Properties

Material Properties

Set up material properties and thermofluid models using the appropriate pro-STAR 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 specic heat of the background uid (air) as a function of temperature. In this tutorial, we assume that the specic 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 Specic 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 nd the background material name (AIR) in its built-in database and suggesting an alternative action Click OK to close the panel and then click Dene Polynomial to open the Polynomial Function Denition 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 coefcients and assign them to material no. 1, i.e., the background material Click Graph Data to display a graph of specic heat vs. temperature, together with corresponding graphs for normalised enthalpy and entropy Click Close to exit from the dialog 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 Open the Thermal Models panel Turn on the solution of the energy equation by selecting On for the Temperature Calculation option Select option Chemico-Thermal from the Enthalpy menu Note that the section of the panel labelled Participating Media is active. Check the radiative properties assigned to the gas. In this case the Radiative Properties setting should be Constant, the Absorption Coeff. 0.1, and the Scattering Coeff. 0 Click Apply Open the Fluid Initialization panel In the Flow Conditions tab, type a value of 500 in the Temperature box Click Apply
Version 4.08


9-46

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing Combustion Model

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 conrm 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. Conrm that 100000 appears in the Pressure box Click Apply

Combustion Model

Use the pro-STAR Model Guides Reacting Flow folder to set up the combustion model as follows: Select sub-folder Reacting Flow followed by Chemical Reactions Open the Scheme Denition 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 denition, 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, conrm the chemical names entered above and enter them in the appropriate list (Leading Reactants, Products and Reactant parameters) at the bottom of the panel

Check the treatment to be applied to the ordinary reactant (oxygen):


Version 4.08

In the Reactant Parameters list, select reactant no. 1 Check that option Fixed-Fraction is selected Check that the (xed) oxygen mass fraction in the incoming air stream is
9-47

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing Droplet Properties

0.233 This completes the specification of leading reactants and combustion products. pro-STAR will automatically map any required scalar variables to the constituents of the reaction scheme. Note that appropriate scalar variables already exist for all the chemical species constituents, so no additional scalar definitions for them are necessary. Specify the ignition parameters as follows: Open the Ignition panel Accept the default setting (Numerical) in the Model/Treatment panel Type 4 in the Cell Type box Type 0.05 in the Fraction Burnt box Select option Time Step/Iteration from the Interval menu Type 20 and 120 in the Start and End boxes, respectively Click Apply

Assign the chemical reaction scheme defined earlier (no. 1) to the models fluid domain:. Open the Scheme Association panel Select 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 Properties Check the basic control settings for droplets and then re-define the maximum size of the droplet track file (in Mb), taking into account droplet trajectories and the maximum tracking times: 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 dened 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:
9-48 Version 4.08

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing Droplet Properties

1. STARs standard methodology for momentum, heat and mass transfer between the dispersed and continuous phases 2. STARs default model for droplet break-up 3. Droplets bouncing off solid obstacles in the event of a collision The above parameters are set as follows: Open the Droplet Physical Models panel On the Global Physical Models tab, turn On the Turbulent Dispersion option and then click Apply Select the Droplet Physical Models tab and check that the Droplet Type # option is set to 1 For Momentum Transfer, select Correlation option Standard and accept the default Mass Coefcient and Slip Factor values For Mass Transfer Calculation select option Standard For Heat Transfer Calculation select option Standard For Droplet Break-Up select option Reitz and accept the default values for We(Bag), We(Strip), Te(Bag), Te(Strip) For Droplet-Wall Interaction select option Rebound Click Apply

Specify droplet physical properties corresponding to liquid toluene. The heat of vaporisation and saturation pressure is to be defined by user coding in subroutine DROPRO, as discussed in section User Subroutines of this tutorial: Open the Droplet Properties panel Choose Select material from database from the menu at the top of the panel to open the Droplet Properties database Locate item C7H8_l TOLUENE(L) in the database material list and highlight it Choose Dene user material from the menu at the top of the panel Check the contents of the Droplet Properties panel. All property values retrieved from the database are now displayed in the appropriate boxes. Since these are valid for a lower (room) temperature, adjust the values for the actual droplet injection temperature (350 K) as follows: Density 725 Surface Tension Coefcient 0.0262 Viscosity 0.00035 Specic Heat 2107.86 Select option User for both the Heat of Vaporization and Saturation Pressure properties Dene scalar no. 1 (i.e., the toluene fuel vapour) as representing the product of evaporation by selecting 1 C7H8 for the Evaporates to Scalar option Click Apply

Note that the effect of toluene vapour on the mixture density will be taken into account by virtue of the fact that the scalar variable representing toluene (no. 1) is designated as an active scalar. Make a local copy of user subroutine DROPRO and put it in a sub-directory called ufile under your current working directory, as described in Chapter 16 of
Version 4.08 9-49

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing Droplet Creation

the CCM User Guide. In the main window, select File > System Command... Type ules in the text box, click Apply and then Close Go back to the Droplet Properties tab and click User Dene

Once you have exited from pro-STAR at the end of this session, this subroutine should be edited as shown in section User Subroutines of this tutorial. Note that DROPRO in turn calls two auxiliary subroutines, CALHVP and CALSVP, that supply values for the heat of evaporation and saturation pressure, respectively. These should also be included in the ufile directory. All subroutines will be included automatically as part of the STAR executable before the model is run. Droplet Creation Create the required number of parcels (each parcel is represented by a typical droplet) and specify their initial conditions. The parcels are to be injected into the combustor via an annular slit of radius 5 mm, centred around the axis of symmetry and projecting 2 cm into the combustion chamber. It is therefore convenient to use a cylindrical coordinate system (no. 2) when specifying initial parcel positions and velocities. All parcels in this model are to be included in a single injection group. Define the groups injection characteristics, including the initial diameter, velocity magnitude and temperature of a typical droplet: Open the Injection Denition 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:
9-50

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 rst 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
Version 4.08

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing Boundary Conditions

injection points list at the top of the panel will conrm that a group of 21 injection points has been created. For a visual check of particle initial conditions: Select the parcel group (set no. 1) in the injection points list Select Plot Points in Set from the Action menu and click Apply

Make the droplet size and colour dependent on particle diameter. Boundary Conditions Select folder Post-Processing followed by sub-folder Particle Tracks Open panel Plot Droplets Select option Diameter in the Droplet Size menu and type in 0.2 in the Maximum Droplet Diameter box Select option Diameter in the Fill Color menu Click Apply Click Droplet Plot

Check the current boundary definitions and specify boundary conditions where appropriate. Select folder Dene Boundaries Open the Dene Boundary Regions panel

In view of the fact that fuel is injected a short distance into the combustion chamber, it is necessary to close off the fuel stream inlet previously defined in Tutorial 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 Reectivity 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:

Version 4.08

9-51

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing Boundary Conditions

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:

9-52

Version 4.08

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing Boundary Conditions

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:

Version 4.08

9-53

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing Boundary Conditions

Click Apply

Supply surface radiative data for the outlet (region 14): Select region 14 in the scroll list Type 900 in the T Radiation box, 1 in the Emissivity box and click Apply

Specify radiation conditions for the walls (regions 7 to 13) via a pro-STAR command loop. Walls are defined as thermally conducting with emissivity and reflectivity of 0.8 and 0.2, respectively. In the I/O window, type the following commands: *SET NREG 7 1 *DEFINE RMOD NREG U U U U U U U U FIXE 600.0 0.8 0.8 0.2
9-54 Version 4.08

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing Control Parameters

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 bafe in the appropriate boxes as shown below: Emissivity box 0.8 Reectivity box 0.2 Transmissivity box 0 Enter radiation property data for the reverse side of the bafe, SIDE 2, in the appropriate text boxes, as shown below: Emissivity box 0.8 Reectivity box 0.2 Click Apply

Control Parameters

Check the solution control parameters and then change the under-relaxation factor 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 Controls

Check the status of the run time control parameters: 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, conrming that this is a run from initial conditions.

Final Operations

The pre-processing task is now complete. If you wish to terminate the session at this stage, save all model data, write the geometry and problem files and exit from pro-STAR, as shown below. Alternatively, you may run STAR interactively, as described in the next section. In the main pro-STAR panel, select File > Save Geometry... In the Save Geometry File dialog, click Apply and then Close Select File > Save Problem...
9-55

Version 4.08

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

User Subroutines Final Operations

In the Save Problem File dialog, click Save Select File > Quit > Save & Quit

User Subroutines As explained previously, sub-directory ufile should contain a file called dropro.f, corresponding to subroutine DROPRO. Use pro-STARs built-in editor to edit this subroutine and introduce the required code, as follows: 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 le 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) 9-56 Version 4.08

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

User Subroutines Final Operations

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 le 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 Version 4.08 9-57

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

User Subroutines Final Operations

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 9-58 Version 4.08

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

CFD Analysis Preliminaries

WRITE(6,*) SUBROUTINE CALSVP: NDRCO.GT.NDRCL WRITE(6,*) NDRCO=, NDRCO WRITE(6,*) NDRCL=, NDRCL STOP ENDIF C IF(TDRP.LT.TCRIT(ICO)) THEN TRED=TDRP/TCRIT(ICO) THAW=1.0-TRED DO 200 JR=3,NRFL T1NU=ARFL(JR)*THAW T2NU=BRFL(JR)*THAW**1.5 T3NU=CRFL(JR)*THAW**3.0 T4NU=DRFL(JR)*THAW**6.0 PVPR(JR)=(T1NU+T2NU+T3NU+T4NU)/TRED CONTINUE OTERM=(OMEGA(ICO)-ORFL(3))/(ORFL(4)-ORFL(3)) PVPRC=PVPR(3)+(PVPR(4)-PVPR(3))*OTERM PS=EXP(PVPRC)*PCRIT(ICO)*1.0E+05 ELSE PS=PCRIT(ICO)*1.0E+05 ENDIF

200

C C------------------------------------------------------------------------RETURN END

CFD Analysis As in Tutorial 9.1, a double precision STAR executable needs to be employed, as follows: In the main pro-STAR panel, select File > Save Model In the Analysis Preparation 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 le 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.08 9-59

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Post-Processing Preliminaries

Select Panels > Pgetc In the main window, select plot option Contour In the Pgetc panel, click VM In the main window, turn on the Display Edges plotting option to display Figure T9.3-1

Figure T9.3-1

Cell-centred plot of velocity magnitude

Close the Pgetc panel: File > Close In the main window, click the Display Edges plotting button again to deactivate it

Plot the steady-state droplet distribution by choosing plot options such that droplet colour and radius depend on temperature and calculated diameter, respectively. The droplet velocity is not displayed.
9-60

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 le 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
Version 4.08

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Post-Processing Preliminaries

entered in the Maximum Droplet Diameter box Select Temperature in the Fill Color menu Select None in the Vectors menu Click Apply In the main window, select D > All in the Display Sets toolbar In the Plot Droplets panel, click Droplet Plot to display Figure T9.3-2

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

Version 4.08

9-61

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Post-Processing Preliminaries

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

9-62

Version 4.08

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Post-Processing Preliminaries

Figure T9.3-4

Absolute temperature distribution

For the reason described in Tutorial 9.2, the temperature plot is somewhat misleading as it implies that heat is flowing through the adiabatic baffle. The same is also true for the CO2 distribution shown in Figure T9.3-6 below. 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

To terminate the run: Select File > Quit > Quit, Nosave

Version 4.08

9-63

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Post-Processing Preliminaries

Figure T9.3-5

Toluene distribution

Figure T9.3-6

CO2 distribution

9-64

Version 4.08

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

Pre-Processing Preliminaries

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

In this tutorial, a hydrogen combustion case is modelled using a Laminar Flamelets model for unpremixed flames. Unlike PPDF models that assume chemical equilibrium, this model allows for non-equilibrium effects such as flame stretch and detailed chemical kinetics. The model also assumes adiabatic conditions (no heat loss). The main aims of the tutorial are to: Familiarise users with the Laminar Flamelets model setup Demonstrate the process of specifying chemical species that are not included in pro-STARs species database (props.dbs) Demonstrate how to set up boundary conditions and analysis controls for scalars used in the simulation

Pre-Processing Preliminaries Create a new directory for the tutorial called tut9-4. The mesh for this problem has already been created in the Meshing Tutorials volume (Tutorial 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, amelet) in the Case Name text box Click Continue

Read in the available problem data: Select File > Read Input Coded File... in the main pro-STAR window In the Read Input Coded File dialog, check that the File Name is combustor.inp Click OK

This will read default problem settings from file combustor.inp, plus the problems cell, vertex and boundary location definitions from the remaining three files. In the main window, select File > Model Title... In the Title text box type: HYDROGEN COMBUSTION (LAMINAR FLAMELETS) Click Apply and Close

Plot the mesh to confirm that the data have been read in correctly:
Version 4.08

In the main pro-STAR window, select Plot > Up Axis followed by X Select C > All Select View > Isometric > 1, 1, -1 Click Cplot
9-65

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

Pre-Processing Material Properties

Specify the key feature of this case, i.e., chemically reacting flow: In the 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 Properties

Set up material properties and thermofluid models using the appropriate pro-STAR Model Guide panels. The necessary actions are as follows: 1. 2. 3. 4. 5. Select the standard k- turbulence model Turn on the temperature solver Set the initial temperature distribution Choose the monitoring cell location Choose the reference pressure and its location Select sub-folder Liquids and Gases Open the Turbulence Models panel Select On to switch on Turbulence modelling Select option K-Epsilon/High Reynolds Number from the Model menu Click Apply Open the Thermal Models panel Turn on the solution of the energy equation by selecting On for the Temperature Calculation option Click Apply Open the Fluid Initialization panel In the Flow Conditions tab, conrm 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 Open the Monitoring and Reference Data (Fluids) panel Specify the Monitoring Cell Number as 1760. This is roughly in the centre of the outlet boundary region. Make the reference pressure location the same as the monitoring cell location by entering 1760 in the Pressure Cell Number box Check that 100000 appears in the Pressure box Click Apply

Combustion Model

Use the pro-STAR Model Guides Reacting Flow folder to set up the combustion model, as follows: Select sub-folder Reacting Flow followed by Chemical Reactions Open the Scheme Denition 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
Version 4.08

9-66

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

Pre-Processing Combustion Model

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 conrming your combustion model selection

The next step is to specify an appropriate reaction mechanism for the Laminar Flamelet model. This must be written in CHEMKIN format, which requires a listing of all participating elements, species and reactions. For a detailed description of how to specify reaction mechanisms in this format, see , Laminar flamelet model in the CCM User Guide. Supply the basic data required as follows: Open the Reaction System panel In the Reaction Mechanism tab, copy the description given below into the displayed box:

ELEMENTS H O N END SPECIES H HO2 H2 H2O H2O2 N2 O OH O2 END REACTIONS H+O2+M=HO2+M 3.61E+17 -0.720 H2O/18.6/ H2/2.86/ H+H+M=H2+M 1.00E+18 -1.000 H+H+H2=H2+H2 9.20E+16 -0.600 H+H+H2O=H2+H2O 6.00E+19 -1.250 H+OH+M=H2O+M 1.60E+22 -2.000 H2O/5/ H+O+M=OH+M 6.20E+16 -0.600 H2O/5/ O+O+M=O2+M 1.89E+13 0.000 H2O2+M=OH+OH+M 1.30E+17 0.000 H2+O2=2OH 1.70E+13 0.000 OH+H2=H2O+H 1.17E+9 1.300 O+OH=O2+H 3.61E+14 -0.500 O+H2=OH+H 5.06E+04 2.670 OH+HO2=H2O+O2 7.50E+12 0.000 H+HO2=2OH 1.40E+14 0.000 O+HO2=O2+OH 1.40E+13 0.000 2OH=O+H2O 6.00E+08 1.300 H+HO2=H2+O2 1.25E+13 0.000 HO2+HO2=H2O2+O2 2.00E+12 0.000 H2O2+H=HO2+H2 1.60E+12 0.000 H2O2+OH=H2O+HO2 1.00E+13 0.000 END

0.000 0.000 0.000 0.000 0.000 0.000 -1788.000 45500.000 47780.000 3626.000 0.000 6290.000 0.000 1073.000 1073.000 0.000 0.000 0.000 3800.000 1800.000

Click Save. Conrm that you wish to proceed with this operation in the displayed pop-up warning panel. pro-STAR will then store the supplied data in le chemf.inp01 in a sub-directory called PPDF.
9-67

Version 4.08

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

Pre-Processing Combustion Model

Click Apply to validate the le contents and create the chemistry libraries needed subsequently by the amelet 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 rst amelet description in le 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 Dene menu. The default values displayed are suitable for this case.

Four amelets are to be generated for this problem, as follows: Select Flamelet Number 2 in the spin box and click Generate File again. This will generate a new amelet description and store it in le flame02.inp01within the PPDF sub-directory Repeat this procedure for Flamelet Numbers 3 and 4, thus generating les 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 amelet description in le flame02.inp01 For Flamelet Number 3, change the Strain Rate of Oxidizer to 300 Click Apply to store the updated amelet description in le 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 amelet description in le flame04.inp01

Flamelet libraries must now be calculated from the above flamelet descriptions and stored in a set of files called flame$$.lib01. Output information for this calculation is written to a set of corresponding files called flame$$.out01.
9-68

Select the Flamelet Generation tab Select amelet number 1 from the list. Note that Action New is selected by default. Click Apply to calculate the corresponding amelet library. This process may take a few seconds. Select amelet number 2 from the list Choose Action Restart From Flamelet Number 1. This should reduce the computation time because the two amelets have similar properties. Click Apply Select amelet number 3 from the list Choose Action Restart From Flamelet Number 2 Click Apply Select amelet number 4 from the list Click Apply
Version 4.08

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

Pre-Processing Scalar Properties

The STAR-CD solver requires that flamelet library data should be provided in tabular form. The relevant table is created as follows: Select the Look-up Table tab Check that the Plot Data for Flamelet Number option is set to 1 Click Plot to display graphs of amelet data for amelet number 1, as shown in Figure T9.4-1.

Figure T9.4-1

Graphs of amelet data for amelet number 1

Plot similar graphs for amelets 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 dene the mixture fraction prole in the table. Change the Mixture Fraction Variance Dimension to 30 Select amelets 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 le flamelet.tbl01 in your working directory. An error message will appear stating that some of the species included in the mechanism have not been found in pro-STARs built-in property database le props.dbs. Data for these species must be specied next.

Scalar Properties

The I/O window lists the problem species as OH, O, H, HO2 and H2O2. As props.dbs does not contain property data for such species, and since their molecular weights are needed to calculate polynomial distributions of their mole fractions, the required properties must be specified explicitly:
9-69

Version 4.08

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

Pre-Processing Boundary Conditions

Select the Additional Scalars sub-folder from within the Thermophysical Models and Properties folder Open the Molecular Properties (Scalars) panel Select Scalar # 7 in the spin box at the top of the panel Change the Molecular Weight of Scalar # 7 to 17 Click Apply Change the Molecular Weight of Scalar # 8 to 16 Click Apply Change the Molecular Weight of Scalar # 9 to 1 Click Apply Change the Molecular Weight of Scalar # 10 to 33 Click Apply Change the Molecular Weight of Scalar # 11 to 34 Click Apply

All the properties and parameters of the chosen chemical reaction scheme have now been specified, so it can now be assigned to the fluid material in the model: Boundary Conditions 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

The next step is to specify boundary conditions, starting with the fluid inlet conditions: Select the Dene Boundaries folder Open the Dene 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 Select region 4, Air_inlet1 from the boundary regions list Specify the U, V and W velocity components as -11, -24 and 42 m/s, respectively Change the 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.19 kg/m3 Click Apply Select region 5, Air_inlet2 from the boundary regions list Specify the U, V and W velocity components as -11, -24 and 42 m/s, respectively Change the Coordinate System to 2
Version 4.08

9-70

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

Pre-Processing Analysis Controls

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.19 kg/m3 Click Apply Select region 6, Air_inlet3 from the boundary regions list Specify the W velocity component as 15 m/s 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.19 kg/m3 Click Apply

The scalar concentrations at the inlet boundaries must also be specified: Open the Scalar Boundaries panel Select region number 3 from the Boundary Region list Select MIXTURE_FRACTION from the Scalars list Change the boundary Value to 1 Click Apply Select region number 4 from the Boundary Region list Select N2 from the Scalars list Change the boundary Value to 0.79 Click Apply Select O2 from the Scalars list Change the boundary Value to 0.21 Click Apply For regions 5 and 6, set the N2 and O2 boundary Value to 0.79 and 0.21, respectively, as for region number 4

Analysis Controls

Some of the analysis controls need to be changed to ensure a reasonably rapid 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

Run Time Controls

The run time controls must also be adjusted: Select folder Analysis Preparation and open the Run Time Controls panel Enter 400 for the Maximum Number of Iterations Change the Maximum Residual Tolerance to 0.0001 Click Apply
9-71

Version 4.08

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

CFD Analysis Final Operations

Final Operations

The pre-processing task is now complete. If you wish to terminate the session at this stage, save all model data, write the geometry and problem files and exit from pro-STAR, as shown below. Alternatively, you may continue with the CFD analysis using the 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 le 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

9-72

Version 4.08

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

Post-Processing Preliminaries

Figure T9.4-2

Section Clipped plot of velocity vectors

Contour plots of temperature and mixture fraction can now be plotted as follows: Under the Data tab of the Load Data panel, select Smooth options On and All Select Temperature from the Scalar Data list Click Get Data Go to the Create Plots panel Under the Section/Clipped tab, select the Option Contour(lled) Click Plot To Screen to display Figure T9.4-3 Under the Data tab of the Load Data panel, select MIXTURE_FRACTION from the Scalar Data list Click Get Data Click Replot to display Figure T9.4-4

As explained in Tutorial 9.1, the contour plot smoothing effect leads to a physically unrealistic temperature profile in the vicinity of the baffle.

Version 4.08

9-73

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

Post-Processing Preliminaries

Figure T9.4-3

Section Clipped plot of temperature contours

Figure T9.4-4

Section Clipped plot of contours of mixture fraction

9-74

Version 4.08

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

Post-Processing Preliminaries

Terminate the session: In the main pro-STAR window, select File > Quit > Quit, Nosave

Version 4.08

9-75

Introduction

Tutorial 10 BUOYANCY AND RADIATION EFFECTS


Introduction This tutorial illustrates various STAR-CD facilities for simulating a heat transfer problem involving natural convection, conduction, solid-fluid heat transfer and radiation. The example used in the tutorial consists of a heated aluminium alloy fin placed within a rectangular box filled with air (see Figure T10.0-1).

T = 293 K

T = 293 K

1 10

2 T = 343 K

Figure T10.0-1

Heated n geometry (all dimensions in cm)

The problem is simulated in two dimensions for ease of mesh generation and speed of numerical calculation. The mesh employed is shown in Figure T10.0-2.

Version 4.08

10-1

Material Properties

Figure T10.0-2

Mesh structure for the heated n model

Material Properties Three variants of this problem are considered, with different modes of heat transfer applying in each. Material properties for the solid fin and the surrounding air are as follows: Aluminium alloy fin: Density () = 2800 kg/m3 Specic heat (Cp) = 880 J/kg K Thermal conductivity () = 180 W/m K Surrounding air (incompressible, turbulent): Density () = variable, based on Ideal Gas Law for molecular weight 28.96 Specic heat (Cp) = 1006 J/kg K Thermal conductivity () = 0.0264 W/m K Molecular viscosity () = 1.81E5 Pa s

10-2

Version 4.08

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

Pre-Processing Preliminaries

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

This sub-tutorial employs a simple, uniform two-dimensional mesh to model the shape and size of the solid fin, followed by cell indexing and specification of material properties for the fin and surrounding fluid. Heating of the fin is achieved by fixing the temperature at the base to 343 K. The sides of the surrounding box are set to a fixed temperature of 293 K and the remaining wall boundaries are assumed to be either conducting (at solid/fluid interfaces) or adiabatic (at the top and bottom walls of the box), as shown in Figure T10.0-1. This tutorial aims to show the user how to: Model solid-uid heat transfer Model buoyancy-driven ows Create streamline plots

Pre-Processing Preliminaries Create a sub-directory for the tutorial called tut10-1. The mesh for this problem is supplied in advance, i.e., cell, vertex, boundary and problem setup files (fin.cel, fin.vrt, fin.bnd and fin.inp, respectively) are available in the STAR-CD installation directories. Therefore, before starting the tutorial, make sure that these files are copied into your current directory. Start up pro-STAR by typing prostar at the command line Specify your preferred graphics driver (mesa or gl) Enter the case name (say, n_bu) in the Case Name text box Click Continue

Read in the available problem data: Select File > Read Input Coded File... in the main pro-STAR window In the Read Input Coded File dialog select the File name fin.inp Click OK

This will read default problem settings from file fin.inp plus the problems cell, vertex and boundary location definitions from the remaining three files. In the main window, select File > Model Title... In the Title text box type: BUOYANCY DRIVEN FLOW AROUND A HEATED FIN Mesh Checking 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. The I/O window output shows that 2,500 cells were read in Check that Hidden Surface is selected as the cell plot type Click Cplot Change the viewpoint to approximately (0.4, 0.5, 1) by dragging with the left
10-3

Version 4.08

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

Pre-Processing Cell Type Properties

mouse button to display Figure T10.1-1 It will be seen that the mesh matches that shown in Figure T10.0-2 and that it contains two cell types, corresponding to fluid and solid cells. Note that because of the difference in cell type, fluid and solid cells are displayed in different colours.

Figure T10.1-1

Mesh geometry

Cell Type Properties

Check and, if necessary, specify appropriate material property indices, colours and names for cell types 2 and 1, representing the solid fin and its surrounding fluid, respectively: 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 conrm the change (the solid cell colour will change)

Thermal and Gravity Options

Turn on the solid-fluid heat transfer option. This also has the effect of switching on the temperature solver inside the solid fin: 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
Version 4.08

10-4

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

Pre-Processing Fluid Properties

Click Apply

In order to take buoyancy effects into account, you need to specify the gravitational force in the global Cartesian y-direction. Check the current setting: Fluid Properties Open the Gravity panel Type 9.81 in the Acceleration box to specify the gravitational acceleration value to be used for this problem Specify the correct direction of gravity in the model by typing -1 in the Y box and 0 in the Z box Click Apply

Check the material properties of the models fluid substance: In the Thermophysical Models and Properties folder, select the Liquids and Gases folder Open the Molecular Properties (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 uid 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

Check the temperature equation setting: Open the Thermal Models panel. Note that the temperature calculation has been turned on as a result of selecting the solid-uid heat transfer option.

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:
Version 4.08

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

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

Pre-Processing Solid Properties

Solid Properties

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

Define properties for the solid cells making up the fin (i.e., for material property 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 Specic 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.

10-6

Version 4.08

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

Pre-Processing Boundary Conditions

Figure T10.1-2

Boundary region display

Boundary Conditions

You can now impose the required thermal boundary conditions. Define fixed temperature boundaries at 293 K for the containers side walls, as follows: Select the Dene Boundaries folder and open the Dene Boundary Regions panel Select region no. 1 in the scroll list Select option Fixed in the Wall Heat menu Type the required xed 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 xed wall temperature, 343, in the Temperature box Accept the default values for the remaining parameters and click Apply

The remaining boundary surfaces, i.e., those allocated to region 0, default to adiabatic walls (at external surfaces) or conducting walls (at solid/fluid interfaces). Control Parameters In buoyancy-driven flow calculations there is very strong coupling between the temperature and flow fields. It is therefore advisable to use the PISO algorithm (see the pro-STAR Model Guide on-line Help, Useful Points) which is more suitable for this type of problem:
Version 4.08

Select the Analysis Controls folder Open the Solution Method panel and choose option PISO from the Solution
10-7

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

Pre-Processing Run Time Controls

Algorithm menu Click Apply

As the model is two-dimensional, we need not solve the W-momentum equation: Open the Primary Variables panel On the Equation Status tab, deselect the W-Momentum option 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): Run Time Controls 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

Set the maximum number of iterations to 300: 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 Operations

The pre-processing task is now complete. If you wish to terminate the session at this stage, write the geometry file, making sure that the scaling factor for the problem units (centimetres) is specified. Then write the problem file and exit from pro-STAR, saving all model data as shown below.
Version 4.08

10-8

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

CFD Analysis Preliminaries

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

For simulations involving buoyancy, it is usually advisable to run STAR in Double Precision mode. This prevents relatively small buoyancy source terms which dominate the flow from being discarded as round-off error. Select option Double Precision Leave all other settings at their default values and then click Start

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: Postprocessing In the pro-STAR Model Guide select the Post-Processing folder Open the Load Data panel Click Open Post le

First look at the velocity field in the fluid surrounding the fin: 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 eld Go to the Create Plots panel, where the plot style will be dened In the 3-D Surface tab, check that Option Vector is selected and then choose
10-9

Version 4.08

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

Post-Processing Post- processing

Edge from the Edge/Mesh menu Click Plot to Screen to display Figure T10.1-3

Figure T10.1-3

Velocity vector plot

Now view the streamlines: Go to the Load Data panel Select Cell & Wall/Bound (Smooth) from the Data Type menu Select option Stream Function from the Calculated Scalar Data list Click Get Data Go to the Create Plots panel In the 3-D Surface tab, select Option Contour (line) Click Plot to Screen to display Figure T10.1-4

10-10

Version 4.08

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

Post-Processing Post- processing

Figure T10.1-4

Streamline plot

Examine the temperature profiles, first in the surrounding fluid and then in the solid fin: 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 (lled) 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

Version 4.08

10-11

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

Post-Processing Post- processing

Figure T10.1-5

Temperature plot in the uid region

Figure T10.1-6

Temperature plot in the solid region

10-12

Version 4.08

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

Post-Processing Final Operations

Heat flux data at the walls can be plotted as follows: In the Data tab, select Data Type Wall Select item Heat Flux from the Scalar Data list Click Get Data

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

Figure T10.1-7

Wall plot of heat ux

Final Operations

Terminate the session File > Quit > Quit, Nosave

Version 4.08

10-13

Tutorial 10.2

SURFACE-TO-SURFACE RADIATION

Pre-Processing Preliminaries

Tutorial 10.2

SURFACE-TO-SURFACE RADIATION

This sub-tutorial examines the effect of surface-to-surface radiation on heat transfer and temperature distribution. The boundary conditions remain the same as in Tutorial 10.1, except that radiative surface properties such as emissivity and reflectivity are now added. A surface-to-surface mode of radiative heat transfer is assumed. The aim of this tutorial is to show the user how to: Model radiative heat transfer between walls through non-participating media Use the Initial Field Restart option when resuming from a previous analysis Compare results of different runs Use pro-STARs OPERATE utility

Pre-Processing Preliminaries A number of initial file copying operations are needed for proper operation of this tutorial, as follows: Create a sub-directory for the tutorial called tut10-2 and copy the model le generated in Tutorial 10.1 (fin_bu.mdl) into it Rename this le 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 les 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 (n_ra) 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_ra.mdl and will set up the model as it was at the end of Tutorial 10.1. In the main window, select File > Model Title... In the Title text box, change the title to: BUOYANCY DRIVEN FLOW AROUND A HEATED FIN WITH RADIATION New Boundary Denitions Click Apply and Close

In problems where surface-to-surface radiation is being modelled, it is necessary to provide radiative boundary information such as emissivity and reflectivity, for all wall surfaces including solid-fluid interfaces. Solid-uid interface

Version 4.08

10-15

Tutorial 10.2

SURFACE-TO-SURFACE RADIATION

Pre-Processing New Boundary Denitions

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 Dene 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 Dene 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 n 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
Version 4.08

10-16

Tutorial 10.2

SURFACE-TO-SURFACE RADIATION

Pre-Processing Thermal Options

Thermal Options

Switch radiation on, choosing the Discrete Transfer analysis method (DTRM). For this case, use the default number of beams per patch (100) and neglect radiative effects from the intervening gas: 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: Boundary Conditions 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

We must revisit the boundary conditions for all wall regions participating in radiative heat transfer in order to define their emissivity and reflectivity. In this case, we have not chosen to track radiation through the solid so we can ignore region 2 (the fin base). However, boundary conditions for the side walls need to be updated. Select folder Dene Boundaries and open the Dene 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 Reectivity 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-uid interfaces that are not part of region 0. Specify the required radiation properties: Emissivity box 0.2 Reectivity box 0.8 Accept the current values for the remaining parameters and click Apply

Similarly, the top and bottom walls will be adiabatic radiative walls with emissivity and reflectivity of 0.5:
Version 4.08

Select region no. 5 in the scroll list Specify the required radiation properties: Emissivity box 0.5
10-17

Tutorial 10.2

SURFACE-TO-SURFACE RADIATION

Pre-Processing Patch Specication

Reectivity box 0.5 Accept the current values for the remaining parameters and click Apply

Patch All non-symmetry boundary regions need to be divided into radiation patches; these Specication are used both during view factor calculations and for simulating radiative heat transfer. The number of patches per region can be anything between a minimum of one patch covering the entire region to a maximum of one patch per boundary face. The accuracy of radiation calculations is directly proportional to the number of patches per region. Given the two-dimensional character of the problem, it is computationally reasonable to use the maximum number of patches. Patches will be defined for all wall boundaries, with the exception of the fin base; no patches are needed there as this surface does not participate in radiative heat transfer. In the main window, select the Display Boundaries option. The n base boundaries should now be visible, lying in between the two sections of the bottom wall boundaries. Select B > New > Wall Select B > Unselect > Region Cursor Select and then click on any boundary belonging to the n base. This removes all base boundaries from the current set. Open the Create Boundaries panel in the Locate Boundaries folder Go to the Patches tab to create patches. Select Automatic for the Dene Patches option Check that option Current Boundary Set is selected in the Boundaries to patch menu Select Individual Boundary from the Patch option menu 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. You will need to type c in the I/O window to scroll to the end of the list of boundary patches. Select B > New > Wall Select C > All Change the viewpoint to (1, 1, 1) by selecting View > Isometric > 1, 1, 1 Switch on the edge plotting facility by clicking the button and then click Cplot to display Figure T10.2-1

10-18

Version 4.08

Tutorial 10.2

SURFACE-TO-SURFACE RADIATION

Pre-Processing Checks

Figure T10.2-1

Wall boundary plot

Check the patch distribution: In the main window, select Plot > Cell Display > Boundary Patches to display Figure T10.2-2

Version 4.08

10-19

Tutorial 10.2

SURFACE-TO-SURFACE RADIATION

Pre-Processing Final Operations

Figure T10.2-2

Radiation patch plot

Final Operations

It is possible to restart the analysis from the previous non-radiating solution, but since new boundaries have been added we need to use the initial field restart option. In the 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 le 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.
10-20

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
Version 4.08

Tutorial 10.2

SURFACE-TO-SURFACE RADIATION

CFD Analysis Preliminaries

CFD Analysis To perform the analysis interactively, proceed as follows: In the main pro-STAR panel, select File > Save Model In the Analysis Preparation 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. Postprocessing First look at the temperature distribution in the fluid: 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 le 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 (lled) and Edge Click Plot to Screen to display Figure T10.2-3

Version 4.08

10-21

Tutorial 10.2

SURFACE-TO-SURFACE RADIATION

Post-Processing Post- processing

Figure T10.2-3

Temperature contours in the uid region

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 le fin_bu.ccmp, whose name should then appear inside the Post File box Click Open Post le

To examine the temperature differences, you will need to use pro-STARs OPERATE utility as follows: In the main window, select Post > Operate... In the Post Register Operations dialog, select Function Category Load cell data > Temperature Select Load cell temperature into Register 2 Using Absolute Values Click Apply

Re-load the results of the radiation case by reading the calculated cell temperatures stored in file fin_ra.ccmp and then store them in post register 1:
10-22

In the File(s) tab, use the built-in browser to select le fin_ra.ccmp, whose name should appear inside the Post File box Click Open Post le In the Post Register Operations dialog, select Register 1 from the registers menu Click Apply
Version 4.08

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

Now plot the differences: Select Post > Caverage > Cset In the main window, click Replot to display Figure T10.2-4

Figure T10.2-4

Contour plot of temperature difference caused by use of radiation model

It can be seen that the introduction of the radiation model has a significant effect on the fluid temperature distribution across the domain. The temperature differences in the solid region can be examined in a similar way. However, they are much less significant, with the variation less than 0.1% of the no-radiation temperature value. Final Operations Terminate the session. File > Quit > Quit, Nosave

Version 4.08

10-23

Tutorial 10.3

RADIATION THROUGH A TRANSPARENT SOLID

Pre-Processing Preliminaries

Tutorial 10.3

RADIATION THROUGH A TRANSPARENT SOLID

This sub-tutorial examines the effect of replacing the aluminium fin present in the previous two tutorials of this set by an identically-shaped fin made of transparent material (Pyrex glass). As in Tutorial 10.2, the analysis includes the effects of surface-to-surface radiation on heat transfer and temperature distribution. This time, however, the effect of the intervening media (air and transparent solid) on the thermal radiation passing through and being absorbed by them is also investigated. This tutorial aims to show the user how to: Model radiative heat transfer in the presence of participating media Specify material properties (including radiative properties) for transparent solid domains Use the Discrete Ordinates method (DORM) to solve the problem. Unlike the Discrete Transfer method (DTRM) employed in Tutorial 10.2, DORM does not require radiation patches on the boundaries.

Pre-Processing Preliminaries A number of initial file copying operations are needed for proper operation of this tutorial, as follows: Create a sub-directory for this tutorial called tut10-3 and copy the model le generated in Tutorial 10.1 (fin_bu.mdl) into it Rename this le 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 les 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 (n_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: BUOYANCY DRIVEN FLOW AROUND A HEATED TRANSPARENT FIN Click Apply and Close

Version 4.08

10-25

Tutorial 10.3

RADIATION THROUGH A TRANSPARENT SOLID

Pre-Processing Radiative and Thermal Properties

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

Define relevant material properties: Select the Liquids and Gases folder Open the Thermal Models panel and ensure that Material # 1 is selected Check the default values for the absorption and scattering coefcients (0.1 and 0, respectively). These are reasonable for air. Select the Solids folder Open the Material Properties (Solids) panel and select Material # 2 in the box Type the transparent solid name (Pyrex) in the adjacent box Specify appropriate thermal properties for the solid material as follows: Density 2230 Conductivity 1.35 Specic Heat 837.4 Click Apply Open the Radiative Properties panel Enter 0 for both the absorption and scattering coefcients of the solid material Click Apply

New Boundary Denitions

The top and bottom adiabatic walls as well as the solid-fluid interface are currently assigned to the default wall region (no. 0). You therefore need to define a separate boundary region for the interface, extending round the entire fin perimeter, in order to assign the appropriate radiative surface properties to it. In the main window, ensure the Display Boundaries option is turned off
Version 4.08

10-26

Tutorial 10.3

RADIATION THROUGH A TRANSPARENT SOLID

Pre-Processing Boundary Conditions

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 Dene In the main window, change the viewpoint to (1, 0, 0) by selecting View > Axis > +X In the Regions tab, 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, 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, click Apply in the Regions tab and draw a closed polygon around the visible mesh

Boundary Conditions

You must now revisit the boundary conditions of all wall regions in order to define their emissivity, reflectivity and transmissivity. Region 1 (side walls) Specify surface properties for the side walls: Select folder Dene Boundaries and open the Dene 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 Reectivity box 0.5 Accept the current values for the remaining parameters and click Apply

Region 2 (the n base) Define surface properties for the fin base. In addition, change its temperature to 593 K to compensate for the lower thermal conductivity of the glass: Select region no. 2 in the scroll list Specify the required temperature and radiation properties: Temperature box 593 Emissivity box 0.5 Reectivity box 0.5 Accept the current values for the remaining parameters and click Apply

Region 4 (the uid-solid interface) The solid-fluid interfaces properties have to be set so as to reflect the fact that the solid is transparent:
Version 4.08

Select region no. 4 in the scroll list


10-27

Tutorial 10.3

RADIATION THROUGH A TRANSPARENT SOLID

Pre-Processing Final Operations

Change the Wall Heat option to Conduction. This is essential for solid-uid interfaces that are not part of region 0. Specify appropriate radiation properties: Emissivity box 0 Reectivity 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. Region 0 (top amd bottom walls) As for the side walls, the top and bottom walls will be assigned an emissivity and reflectivity of 0.5: Final Operations Select region no. 0 in the scroll list Specify the required radiation properties: Emissivity box 0.5 Reectivity box 0.5 Accept the current values for the remaining parameters and click Apply

It is possible to restart the analysis from the previous non-radiating solution, but since new boundaries have been added we need to use the initial field restart option. In the 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 le fin_bu.ccmp from the browser dialog and then click Open Check that the Initial Field Restart menu is set to New Boundary Types Check that the Iteration Counter option is set to Reset Click Apply

The pre-processing task is now complete. If you wish to terminate the session at this stage, save all model data, write the geometry and problem files and exit from pro-STAR, as shown below. Alternatively, you may continue with the CFD analysis, using the 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, ensure that the Geometry Scale Factor is set to 0.01 Click Apply and then Close Select File > Save Problem... In the Save Problem File dialog, click Save Select File > Quit > Save & Quit

10-28

Version 4.08

Tutorial 10.3

RADIATION THROUGH A TRANSPARENT SOLID

CFD Analysis Preliminaries

CFD Analysis To perform the analysis interactively, proceed as follows: In the main pro-STAR panel, select File > Save Model In the Analysis Preparation 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: Postprocessing In the pro-STAR Model Guide select the Post-Processing folder Open the Load Data panel Click Open Post le

First look at the velocity field in the fluid surrounding the fin: 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 eld Go to the Create Plots panel where the plot style will be dened 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

Version 4.08

10-29

Tutorial 10.3

RADIATION THROUGH A TRANSPARENT SOLID

Post-Processing Post- processing

Figure T10.3-1

Velocity vectors

Examine the temperature profiles, both in the surrounding fluid and in the solid fin: 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 (lled) 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

10-30

Version 4.08

Tutorial 10.3

RADIATION THROUGH A TRANSPARENT SOLID

Post-Processing Post- processing

Figure T10.3-2

Temperature contours in the uid region

Figure T10.3-3

Temperature contours in the solid region

Version 4.08

10-31

Tutorial 10.3

RADIATION THROUGH A TRANSPARENT SOLID

Post-Processing Final Operations

Final Operations

Terminate the session. File > Quit > Quit, Nosave

10-32

Version 4.08

Tutorial 11 MOVING GRIDS


The following tutorials are intended to familiarise users with the process of setting up moving-mesh problems. Two cases are considered: 1. The ow around two blunt objects moving in opposite direction in a tunnel 2. A radial fan ow simulation

Version 4.08

11-1

Tutorial 11.1

FLOW AROUND TWO OPPOSING MOVING OBJECTS

Physical Problem Description Preliminaries

Tutorial 11.1

FLOW AROUND TWO OPPOSING MOVING OBJECTS

Physical Problem Description This tutorial simulates flow caused by two identical blunt objects passing each other in a tunnel and are shown schematically in Figure T11.1-1.

5 30 m/s 30 27 7 30

201 All units in cm (not to scale)

Figure T11.1-1

Geometry outline of passing objects problem

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: Density Molecular viscosity Specic heat Thermal conductivity The following modelling strategy is adopted: Moving mesh geometry, as set up in Tutorial 1.3 of the Meshing Tutorials volume STAR-CDs arbitrary sliding interface (ASI) facilities, employing two such interfaces. The general methodology of ASI is explained in the CCM User Guide, Chapter 13. Dynamic cell removal and addition Transient ow options Standard k- turbulence model for the turbulence characteristics 1.205 1.81 105 1006.0 2.637 102 kg/m3 Pa s J/kg K W/m K

Pre-Processing Preliminaries The mesh for this problem has already been created in the Meshing Tutorials volume (Tutorial 1.3) and the relevant cell (movingObjects.cel), vertex (movingObjects.vrt) and boundary (movingObjects.bnd) files are
11-2 Version 4.08

Tutorial 11.1

FLOW AROUND TWO OPPOSING MOVING OBJECTS

Pre-Processing Preliminaries

already available. Create a sub-directory for this tutorial called tut11-1 and copy the supplied les into it. Start up pro-STAR by typing prostar at the command line Specify your preferred graphics driver (mesa or gl) Enter movingObjects in the Case Name text box Click Continue In the main pro-STAR window, select File > Model Title... In the Title text box type: FLOW AROUND TWO OPPOSING MOVING OBJECTS 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. Set the basic feature of your model: Go to the pro-STAR Model Guide and open the Analysis Features panel Select option Transient from the Time Domain menu Select option On with Event Processing from the Moving Grid menu Click Apply

Read in the available cell and vertex data: Select folder Grids and then open the Import Grids panel Select pro-STAR as the le Format Check that the default cell and vertex les are movingObjects.cel and movingObjects.vrt, respectively, and that both are of File Type Coded Click Apply

The I/O window should tell you that 7,068vertices and 3,074 cells have been imported. Ignore the warnings regarding non-existent cell table numbers as new ones are created during import, using the defauly settings. Read in the available boundary data: Select folder Locate Boundaries and then open the Import Boundaries panel Check that the default boundary le is movingObjects.bnd and that it is of File Type Coded Click Apply

The I/O window should tell you that 6,630 boundaries have been imported. To aid the visualisation of the geometry, change the color of the cell table entries 2 and 3:
Version 4.08

In the main pro-STAR window, select Tools > Cell... From the Cell Tool dialog, select Cell Editor to open the Cell Editor dialog Select cell table entry 2 and change the Color Index to 3 (green) Click Apply Select cell table entry 3 and change the Color Index to 4 (blue) Click Apply
11-3

Tutorial 11.1

FLOW AROUND TWO OPPOSING MOVING OBJECTS

Pre-Processing Material Properties

To display the mesh: In the main pro-STAR window, choose C > All Click Cplot Click (Zoom on) and zoom in around the lower object to display the mesh as shown in Figure T11.1-2

Figure T11.1-2

Geometry mesh

Material Properties

Click

(Zoom off) to display the entire mesh again

Check the current definition of material properties using the pro-STAR Model Guide: Select folder Thermophysical Models and Properties Select sub-folder Liquids and Gases Open the Molecular Properties (Fluids) panel

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.
11-4

Select On to turn on the Turbulence option


Version 4.08

Tutorial 11.1

FLOW AROUND TWO OPPOSING MOVING OBJECTS

Pre-Processing Boundary Conditions

Select option k-Epsilon/High Reynolds Number from the Model menu Click Apply

Set the reference pressure and monitoring cell locations: Boundary Conditions Open the Monitoring and Reference Data (Fluids) panel Type 710 in the Monitoring Cell Number box Type 680 in the Pressure Cell Number box Accept the remaining default settings and click Apply

Boundary conditions can now be imposed on the regions defined in Meshing Tutorial 1.3. Those located at the sliding interfaces must be defined as attachment boundaries. For such boundaries, one has to supply two parameters: 1. The local coordinate system 2. An alternate boundary region number 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 Dene Boundaries folder and then open the Dene 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

Repeat the above steps for region no. 2, 3 and 4. 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.
Version 4.08

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 in the Region Type menu Set the walls U-velocity component to 30 m/s by typing 30 in the Wall U box Click Apply Select region no. 7 in the boundary regions scroll list and select option Wall in the Region Type menu Set the walls U-velocity component to - 30 m/s by typing -30 in the Wall U box Click Apply
11-5

Tutorial 11.1

FLOW AROUND TWO OPPOSING MOVING OBJECTS

Pre-Processing Analysis Controls

Analysis Controls

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

Check the solution variables. Since the flow is two dimensional, it is sensible to 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 le 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 Controls

In this tutorial, the mesh is made to slide in an arbitrary manner. Therefore, the time 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-3. 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.

11-6

Version 4.08

Tutorial 11.1

FLOW AROUND TWO OPPOSING MOVING OBJECTS

Pre-Processing Event Settings

3 cm Stationary mesh Interface Mesh attached to object A (a) (b)

(c)

(d)

(e)

Figure T11.1-3

Illustration of relative mesh movement

Event Settings

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

Since this tutorial uses a sliding mesh, the moving mesh and event options need to be employed. Before specifying events, it is necessary to resize pro-STAR by issuing the following commands in the I/O window: MEMORY MAXEVE 200 MEMORY WRITE Moving mesh operations are grouped under the Events Module and are presently available only in command form. Check the Events Module status by typing: EVEN STAT

Version 4.08

11-7

Tutorial 11.1

FLOW AROUND TWO OPPOSING MOVING OBJECTS

Pre-Processing Mesh Manipulation Events

Moving mesh operations are defined in terms of event steps that are stored in a special file. Initialise this le 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 rst 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: EVSTEP 1 TIME -50.0 Dene event step 1 occurring at time t = 50 seconds

The information echoed on your screen will confirm this. The direction for the cell removal is now specied using command EDDIR. Here, a local coordinate system is used: EDDIR LOCAL 1 1 Local coordinate system no. 1, in the x-direction

In this first event step two cell layers are removed, one from the upper and the other from the lower mesh block, as illustrated in Figure T11.1-4. Note that it is
11-8 Version 4.08

Tutorial 11.1

FLOW AROUND TWO OPPOSING MOVING OBJECTS

Pre-Processing Mesh Manipulation Events

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)

Figure T11.1-4

Order of cell layer removal

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 EDCE ADD CRAN 3061 3074 1 The removed cells can be listed using command ECLIST: ECLIST DEACT ALL Y 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 rst 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-STARs loop facility, as follows: *SET EVNU 2 1 *SET ETIM -49.0 1.0 *SET IC1 15 14 *SET IC2 28 14 *SET IC3 3047 -14 *SET IC4 3060 -14 *DEFI Start with event no. 2 Set starting event time to 49 Set starting cell no. for block 1 Set starting cell no. for block 2 Dene the event loop Include all cells within the range in the deletion list

Version 4.08

11-9

Tutorial 11.1

FLOW AROUND TWO OPPOSING MOVING OBJECTS

Pre-Processing Mesh Manipulation Events

EVSTEP EVNU TIME ETIM EDDI LOCAL 1 1 EDCELL ADD CRAN IC1 IC2 1 EDCELL ADD CRAN IC3 IC4 1 EVSA EVNU *END *LOOP 1 41 1 Execute the loop 41 times With the ASI method, it is necessary to specify only changes in the mesh geometry; changes in cell connectivity are accounted for automatically. The mesh geometry changes can be performed either by pro-STAR commands (i.e., using Change Grid operations) or by user coding in subroutine NEWXYZ. This tutorial employs the pro-STAR commands option. Suppose we want the mesh to move in the way illustrated by Figure T11.1-3. The pro-STAR commands needed to change the mesh geometry in this way are shown in the listing below. These commands must be entered and stored in a file called cgrid.cgrd. For this tutorial this file is supplied with the installation. You can use pro-STARs built-in editor (File > Edit File... from the main menu) or an editor of your choice to enter/modify the change grid commands, if desired. Note that any pro-STAR command used in a Change Grid operation can make use of program-defined as well as user-defined parameters. The program-defined parameters are: ITER current time step number TIME current solution time LSTP current load step number EVEX last event number executed EVNO next event number to be executed ETIM time at which the next event is scheduled YPST piston position (special case) An example of using such a parameter (TIME) appears in the cgrid.cgrd file listing shown below.

11-10

Version 4.08

Tutorial 11.1

FLOW AROUND TWO OPPOSING MOVING OBJECTS

Pre-Processing Sliding Events

! File 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 movingObjects.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 movingObjects.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 Events

To set up an ASI case for this problem, you need to define two separate sliding 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. In the pro-STAR I/O window type: 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.

Version 4.08

11-11

Tutorial 11.1

FLOW AROUND TWO OPPOSING MOVING OBJECTS

Pre-Processing Grid-change Events

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 denitions as follows: EMSLIDE ADD REGI 1 ESSLIDE ADD REGI 2 Adds a total of 110 boundaries to the master list This adds 67 boundaries to the slave list

The next command, EOSLIDE, species that the boundaries on either side of the sliding interface are to be matched in the global Cartesian coordinate system (no. 1). The command also species that the offset required to match the two sliding regions at the start of the analysis is zero for both the x- and y-directions: EOSLIDE 1 0 0

The nal command needed to set up event 198, EPSLIDE, turns on the arbitrary sliding interfaces 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-3. EPSLIDE ON

The event can now be saved: EVSAVE 198

The sliding event for interface II can be set up in a similar way. In the pro-STAR I/O window type: 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 Events The grid changing events can now be set up. The first 43 events defined earlier were 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: In the pro-STAR I/O window type EVST 44 TIME 0.0 The grid-changing commands for the analysis, previously entered in le cgrid.cgrd, are now read into this event using command EGRID:
Version 4.08

11-12

Tutorial 11.1

FLOW AROUND TWO OPPOSING MOVING OBJECTS

Pre-Processing Layer Removal /Addition Events

EGRID READ cgrid.cgrd C 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) dened earlier needs to be created, since these contain all information on the sliding boundary sets: EASI 198 ENABLE EASI 199 ENABLE Event no. 44 is now complete and can be saved: EVSAVE 44 The initial set up is now complete. Layer Removal /Addition Events During the analysis, two mesh transformation operations will be required at regular intervals and for each sliding block, namely: 1. Addition of a cell layer 2. Removal of a cell layer Referring to Figure T11.1-3 on page 11-7, 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 dened as follows: EVST 45 TIME 0.00025 In this event, two cell layers need to be added as shown in Figure T11.1-5. This is done by command EACELL, which also specifies the cell range involved. Type EACE ADD CRAN 589 602 1 EACE ADD CRAN 2473 2486 1 Event no. 45 can now be saved EVSA 45
Version 4.08 11-13

Tutorial 11.1

FLOW AROUND TWO OPPOSING MOVING OBJECTS

Pre-Processing Layer Removal /Addition Events

remove

add

add

remove

Figure T11.1-5

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 EVST 46 TIME 0.001 The direction for cell removal is specied through command EDDIR using the local coordinate system: EDDI LOCAL 1 1 Cell layer removal is done in the same way as for events 1 to 43: EDCE ADD CRAN 1457 1470 1 EDCE ADD CRAN 1605 1618 1 The event can now be saved: EVSAVE 46 Definition of further events must continue in a similar fashion, alternating between a cell addition event and a cell removal event. The most convenient way of doing this is by using pro-STARs loop facility. Thus, For cell addition events starting at no. 47, type the following: *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 EACELL ADD CRAN IA3 IA4 1 EVSAVE EVNU *END *LOOP 1 41 1
11-14

Similarly, for cell removal events starting at no. 48:


Version 4.08

Tutorial 11.1

FLOW AROUND TWO OPPOSING MOVING OBJECTS

CFD Analysis Final Operations

*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 Operations Write the geometry and problem files (the events file will be automatically saved 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, movingObjects, 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. Start the post-processing task by re-plotting the mesh: In the main window, select C > All Click Cplot

Before examining the results, it is necessary to connect the events file to load and
Version 4.08 11-15

Tutorial 11.1

FLOW AROUND TWO OPPOSING MOVING OBJECTS

Post-Processing Post- processing

execute events. Enter the following command in the I/O window:

EVFI CONN Specify the file containing the transient post data: 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 Check that le movingObjects.ccmt is displayed in the Post File box of the Transient section Click Add File Select movingObjects.ccmt in the Transient scroll list and then click Open Transient le; the time steps at which ow data were stored during the run should appear in the Time Step scroll list

Postprocessing

Identify the point in time (or time step number) at which results are to be displayed, in this case step number 120: In the Time Step list, select step number 120. It may be necessary to resize the Load Data panel to view the scroll bar on the right hand side Click Store Time

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 to display Figure T11.1-6

11-16

Version 4.08

Tutorial 11.1

FLOW AROUND TWO OPPOSING MOVING OBJECTS

Post-Processing Post- processing

Figure T11.1-6

Velocity vectors at time step 120

Enter the following command loop to display velocity vectors for all time steps saved on the transient post data le: *SET ITT 4 4 *DEFI STORE ITER ITT GETC U V NONE CSET ALL CPLOT *END *LOOP 1 39

The vertex-based pressure values may be plotted as follows:


Version 4.08

In the pro-STAR Model Guide, go to the Load Data panel Go to the File(s) tab Select step number 120 in the Time Step list and then click Store Time Go to the Data tab Select Cell & Wall/Bound (Smooth) from the Data Type menu Select item Pressure from the Scalar Data list Click Get Data Go to the Create Plots panel Go to the Options tab Select option Local from the Range menu Click Apply
11-17

Tutorial 11.1

FLOW AROUND TWO OPPOSING MOVING OBJECTS

Post-Processing Final Operations

Go to the Section/Clipped tab and choose Option Contour (lled) In the main pro-STAR window, select C > All Click Plot to Screen to display Figure T11.1-7

Figure T11.1-7

Pressure contours at time step 120

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 Operations It is essential not to save the file movingObjects.mdl when quitting pro-STAR as the current geometry corresponds to the status of the mesh at time step 160: Select File > Quit > Quit, Nosave

11-18

Version 4.08

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

Physical Problem Description

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

This tutorial aims to show the user how to: Set up and run a moving-mesh radial fan analysis using the arbitrary sliding interface (ASI) method Employ pro-STARs events facility to control the motion of the spinning fan and blades Choose the time step for an ASI analysis.

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. Physical Problem Description The radial fan geometry to be used is shown below:

Figure T11.2-1

Radial fan geometry

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

Version 4.08

11-19

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

Pre-Processing Preliminaries

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, radialFan) in the Case Name text box Click Continue In the main window, select File > Model Title... In the Title text box type: RADIAL FAN SIMULATION USING A SLIDING-INTERFACE MOVING MESH Click Apply and Close

This completes the preliminary steps for this tutorial. Setting the Analysis Type The first operation is to set up pro-STAR for a transient analysis and activate pro-STARs moving grid capability: In the pro-STAR Model Guide, open the Analysis Features panel Select option Transient from the Time Domain menu Select option On with Event Processing from the Moving Grid menu Click Apply

Mesh Import

You can now continue by importing the grid to be used in the analysis. It is assumed that its three parts have been created separately and that there is no continuity between them. In other words, the mesh blocks are not joined together with common vertex numbering at the block interfaces. Prior to importing any kind of grid from an external package, you should check the default cell table indices set up in pro-STAR. 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:

Figure T11.2-2

Cell table listing

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
11-20 Version 4.08

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

Pre-Processing Mesh Import

case, however, the files were saved with the following pre-assigned cell types: 1. 2. 3. 4. Fluid cells within the rotating fan body Fluid cells within the stationary fan body Bafe cells representing the fan blades Fluid cells within the stationary fan inlet duct

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

Version 4.08

11-21

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

Pre-Processing Cell Type Properties

Figure T11.2-3

Imported grid

Cell Type Properties

The cells in each part of the mesh must now be correctly defined and named so that each fan component can be clearly distinguished from the others. To determine what kind of cells have been created by the import process: Select option Utility > Count > Cells

As mentioned in the Mesh Import section, cells in the rotating fan body have a cell table index of 1. Cells in the stationary body domain have cell table index 2 and those in the inlet pipe index 4. Cells with index 3 are interpreted as baffles representing the fan blades among the rotating cells. The desired modifications to the cell type parameters may be done via the cell table editor, as follows: 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:
11-22

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
Version 4.08

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

Pre-Processing Boundary Location

Set the required properties for the baffle cell type 3: Select table entry #3 in the scroll list Select the Bafe Cell Type setting Change the Color Index setting to 4 (blue) Enter FAN_BLADES in the Name box Click Apply

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 T11.2-4

Figure T11.2-4

Fan model grid showing cell colour changes

Boundary Location

In STAR-CD, attachment boundaries are used to provide a continuous interface between moving and stationary parts of an ASI-type model. In this instance, such boundaries need to be applied to two separate regions in the model, namely the interface between fan and stationary body and the interface between inlet and fan. Attachment boundaries are always applied in pairs and are coupled together using the ASI event commands. Rotating fan body First, apply the master attachment boundaries onto the rotating fan body. Begin by isolating the fan body cells:

Version 4.08

11-23

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

Pre-Processing Boundary Location

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 Dene 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:

Select a vertex here

Figure T11.2-5

Selecting a starting vertex for master attachment boundary denition

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:
11-24 Version 4.08

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

Pre-Processing Boundary Location

In the pro-STAR Model Guide, select region 7 from the Boundary Regions scroll list Select Wall for region Type Click Dene 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

Select a vertex here

Figure T11.2-6

Selecting the wall boundaries on the rotating shaft

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.
Version 4.08 11-25

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

Pre-Processing Boundary Location

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

Select a vertex here

Figure T11.2-7

Selecting a starting vertex for master attachment boundary denition

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 fans 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:
11-26 Version 4.08

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

Pre-Processing Boundary Location

Click the Display Vertices button to turn their display off 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 a body (green) cell Click Cplot to display just the body cells

Define the slave attachment region: Select region 4 in the Boundary Regions scroll list Select the Attach option for region Type Click Dene Ensure region 4 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 the inside curved surface of the body cell block, as shown in Figure T11.2-8

Select a vertex here

Figure T11.2-8

Selecting the fan-body slave attachment boundaries

A total of 720 slave attachment boundaries should be created. Next, define the pressure boundary region:
Version 4.08

Select region 2 in the Boundary Regions scroll list Select the Pressure option for region Type Click Dene Ensure region 2 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 end face of the outlet pipe as shown in Figure T11.2-9
11-27

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

Pre-Processing Boundary Location

Select a vertex here

Figure T11.2-9

Selecting a vertex for pressure boundary denition

A total of 70 boundaries should be created. This completes the boundary definitions for the stationary body. Inlet Section We can now move on to the inlet section and apply slave attachment boundaries that correspond to the fans 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

Define the inlet boundaries: In the pro-STAR Model Guide, select region 1 in the Boundary Regions scroll list Select the Inlet option for region Type Click Dene Ensure region 1 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 the top surface of the displayed cell block as shown in Figure T11.2-10

11-28

Version 4.08

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

Pre-Processing Boundary Location

Select a vertex here

Figure T11.2-10 Selecting a vertex for inlet boundary denition

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

Version 4.08

11-29

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

Pre-Processing Boundary Location

Select a vertex here

Figure T11.2-11 Selecting a vertex for slave attachment boundary denition

576 boundaries should be created. Bafes 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 > Bafe 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 Bafe option for region Type Click Dene 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 bafes and check that 60 boundaries have been created correctly Repeat this procedure for each of the remaining 11 bafes by visiting them in turn in a clockwise or anticlockwise direction In the main pro-STAR window, click Replot to verify visually that bafe boundaries have been allocated to all 12 bafes
Version 4.08

11-30

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

Pre-Processing Material Properties

This completes the boundary region specification. A summary of all boundaries in the model can be seen as follows: Turn off the Display Boundaries option by clicking the button again Select the Utility > Count > Boundaries option from the main menu

The output in the I/O window should be as shown below:

Figure T11.2-12 Boundary count output

You can now proceed to the physical model description. Material Properties The default physical properties for air will be accepted for this case, so you can go directly to the definition of the turbulence model. Select folder Thermophysical Models and Properties followed by Liquids and Gases and then open the Turbulence Models panel Select On for the Turbulence option Choose the K-Epsilon/High Reynolds Number model Click Apply

Set up some essential monitoring and reference parameters: Boundary Conditions Open the Monitoring and Reference Data (Fluids) panel Enter 20938 for the Monitoring Cell Number Enter 5669 for the Pressure Cell Number Click Apply

An inlet velocity of 5 m/s will be specified, with all flow leaving the fan through the pressure outlet. Locate the Dene Boundary Regions panel in the Dene 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
11-31

Version 4.08

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

Pre-Processing Analysis Controls

Click Apply

The pressure boundary is defined next: Select region 2 Pressure in the boundary regions scroll list Choose the Static Pressure Option Retain the default relative pressure (0) at the boundary. This means that the absolute pressure at the boundary is equal to the reference pressure. Select option TI/Length from the Turbulence Switch menu Enter a Turb. Intensity of 0.05 and a Length of 0.001. These values would be used if there is any inflow through the boundary faces. Click Apply

The attachment boundaries are defined next: Select region 3 Attach in the boundary regions scroll list Specify the coordinate system in which master and slave attachment boundaries are to be matched by entering 2 (i.e., the global cylindrical coordinate system number) in the Coordinate System box The purpose of the Alternate Region number is to provide a boundary condition if cells on either side of the sliding interface become disconnected. In this tutorial, this number is immaterial since no such disconnection can take place so the system default (0) may be retained. Click Apply Repeat the above operations for regions 4 through 6 (they all use coordinate system no. 2)

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

Define boundary conditions for the baffles: Select region 8 Bafe in the boundary regions scroll list Set the Coordinate System value to 2 and enter a value of 2000 in the Omega box for both Side 1 and Side 2 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 Controls Most of the default control parameters are sufficient for the current analysis. 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.
Version 4.08

11-32

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

Pre-Processing Transient Settings

In the pro-STAR Model Guide, select folder Analysis Controls Open the Monitor Boundary Behavior panel Select On for the Monitoring option Highlight Boundary Region 8 in the scroll list In the Monitoring Information group, enable the Forces and Torques options Click Apply

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 Settings The choice of time step length is exible the only practical constraint being that, 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: Number of revolutions per second Time for one complete revolution Time for a rotation of one cell length = 2000 / 60 = 33.3333 = 1 / 33.3333 = 0.03 s = 0.030 / 72 = 4.166666 10-4 s

If we specify that the mesh should not move more than one quarter of this length per time step, then: t = 4.166666 10-4 / 4 = 1.04167 10-4 s We will also restrict this analysis to one complete revolution of the fan. Therefore, the total run time will be 0.03 s. These values may be specified as follows: Go to the Analysis Preparation folder and open panel Run Time Controls Set the simulation to Run for a Time of 0.03 seconds Click Apply Set the Time step for period to 1.04167e-4 seconds Click Set

This completes the specification of analysis controls. Event Settings The fan mesh motion is set up by using pro-STARs events feature. Events can be used in time-varying solutions to control when certain actions should happen. In this case, the fan is spinning at a constant r.p.m., so only one event is required to set up the motion. However, as the fan is spinning next to two other bodies (the inlet and the stationary body), additional sliding events have to be included for each of them to describe how the stationary and spinning bodies move past each other. These
11-33

Version 4.08

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

Pre-Processing Event Settings

events automatically maintain mesh continuity between the neighbouring cell blocks at each time step. There are no GUI panels for event specification at present so commands must be used instead. Specify the number of events for this problem: In the I/O window. type MEMORY,MAXEVE,3 The moving mesh events are stored in a special event history file. Initialise this le by typing: EVFILE,INITIALISE This will create an event storage file called radialFan.evn. The mesh geometry changes can be specified either through pro-STAR commands or via user subroutine NEWXYZ. In this tutorial, we will use the commands method, as already specified by the MVGRID command above. Such commands must be stored in a special file (the so-called "change grid" file) and are executed according to the event definition. In this case, they are to be executed at every time step in order to move the grid. The change grid commands need to be defined next. For this tutorial these commands have already been entered into a file called cgrid.cgrd and is supplied with the installation. You can use pro-STARs built-in editor (File > Edit File... from the main menu) or an editor of your choice to enter/modify the change grid commands, if desired. The cgrid.cgrd file contains the following commands:
!-File cgrid.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
11-34 Version 4.08

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

Pre-Processing Event Settings

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 TI

E
T IM E+

lt de

at

TANG CPOS

Figure T11.2-13 Parameters used to calculate fan movement

The events themselves can now be defined, starting with a sliding event Issue command EVSLIDE to set up a sliding motion between the fans master attachment boundaries and the stationary bodys slave attachment boundaries: EVSLIDE,2 The above command defines sliding event number 2. Dene the master and slave boundary regions associated with this event using commands EMSLIDE and ESSLIDE, respectively: 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
Version 4.08 11-35

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

Pre-Processing Event Settings

Finally, save the sliding event data: EVSAVE,2 Repeat the above operations for the sliding event (no. 3) between the rotating fan and the stationary inlet domain. Specify sliding event number 3 and save your denition as follows: 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,cgrid.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 Finally, save the time event data: EVSAVE,1 To check the event specification and prepare them for input into STAR, the following command should also be issued: EVPREP This completes the event set-up process.

11-36

Version 4.08

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

CFD Analysis Final Operations

Final Operations

Write the geometry and problem files (the events file will be automatically saved when writing the geometry file) and exit: In the main window, select File > Save Geometry... In the Save Geometry File dialog, enter 0.001 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 finish after 288 time steps, the equivalent of 0.03 s. The solution results can be viewed while the analysis is still running by using the Post-Processing folders panels in the pro-STAR Model Guide. Note that a periodic solution will not be obtained at the end of the run as this would require additional revolutions before it can be established. 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 (radialFan) 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. Before examining the results, it is necessary to activate events processing. Enter the following command in the I/O 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 le radialFan.ccmt is displayed in the Post File box
11-37

Version 4.08

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

Post-Processing Vector Display

Vector Display

Click Add File Select the le in the Transient scroll list and then click Open Transient le; 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 Ensure the Display Boundaries option Select C > All and click Cplot is turned off

Next, go to the Data tab of the Load Data panel and follow the steps below to load 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

Figure T11.2-14 Velocity vectors for time step no. 192

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
11-38 Version 4.08

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

Post-Processing Engineering Data Graph

time steps to ensure its validity. A simple animation sequence may also be specified to display all the results. Engineering Data Graph During the analysis a file called radialFan.erd was created by STAR, containing 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 le radialFan.erd will be displayed by default in the File Name box Accept the default Boundary File Type and select Region # 8 (the bafes region) in the scroll list. The information shown below will appear in the I/O window:

Figure T11.2-15 Output from engineering data scan

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: Select TYTORQ from the Data to graph list Click Add to list Click Create Graph Click Draw All Frames to display Figure T11.2-16

This will graph the torque values in the theta direction, as shown below:

Version 4.08

11-39

Tutorial 11.2

MOVING-MESH RADIAL FAN ANALYSIS

Post-Processing Final Operations

Figure T11.2-16 Engineering data graph showing total Y-component torque

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 Operations In the main window, select File > Quit > Quit,Nosave

11-40

Version 4.08

Tutorial 12 EULERIAN TWO-PHASE FLOW


The following tutorials are intended to familiarise users with the process of setting up Eulerian two-phase simulations. The four cases presented are: 1. Bubble terminal velocity simulation 2. Bubbly ow in which bubbles are allowed to escape through the free surface of the liquid 3. Fluidised bed simulation 4. Boiling simulation

Version 4.08

12-1

Tutorial 12.1

TERMINAL VELOCITY OF BUBBLES

Tutorial 12.1

TERMINAL VELOCITY OF BUBBLES

In this case, air bubbles and water are injected at the bottom of a vertical channel at 1 m/s. The main forces acting on the bubbles are buoyancy and drag. Starting at the inlet, the bubbles are accelerated due to buoyancy but pulled back due to drag from the surrounding water and reach their terminal rise velocity when the drag force is balanced by the buoyancy force. Mathematically, we can express this force balance as:
3 2 CD d 2d --------- g = ------ c u r --------6 2 4

where d is the bubble diameter, the density, = c d the density difference between the two phases, g the acceleration of gravity, C D the drag coefficient and u r = u c u d the relative velocity between the two phases. Subscripts c and d denote the continuous and dispersed phase, respectively. The above equation can be re-arranged to give an expression for the relative velocity between the phases, which in this case is also the bubble terminal rise velocity: ur = 4 gd -- ------ -----3 c C D

In this tutorial we will use the following data for the two phases: Phase 1 is water with density of 1000 kg/m3 and viscosity of 0.001 kg/m/s Phase 2 is air bubbles of 2 mm diameter with density of 1 kg/m3 and viscosity of 1 105 kg/m/s

Assuming C D = 0.44 and substituting the physical properties of the two phases into the above equation, we obtain: ur = 29.7d

For 2mm bubbles, the relative velocity is 0.24 m/s. Since the water phase is moving up the channel at 1 m/s, the terminal rise velocity of the bubbles is 1.24 m/s. We will now set up this case, carry out an Eulerian two-phase flow calculation and check whether the computed bubble rise velocity agrees with the value given by the equations above.

12-2

Version 4.08

Tutorial 12.1

TERMINAL VELOCITY OF BUBBLES

Pre-Processing Preliminaries

0.1 m Outlet gy

1.0 m Slip wall on all side walls

x Inlet
Figure T12.1-1 Schematic of vertical ow 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

Read in the available problem data: Select File > Read Input Coded File... in the main pro-STAR window In the Read Input Coded File dialog select the File name channel.inp Click OK

This will read default problem settings from file channel.inp plus the problems cell, vertex and boundary location definitions from the remaining three files. In the main window, select File > Model Title... In the Title text box type: TERMINAL VELOCITY OF BUBBLES Click Apply and Close

Version 4.08

12-3

Tutorial 12.1

TERMINAL VELOCITY OF BUBBLES

Pre-Processing Material Properties and Thermouid Models

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: Material Properties and Thermouid Models Select option Eulerian from the Multi-Phase Treatment menu Click Apply

We now assign physical properties to the two phases: Select the Thermophysical Models and Properties folder Open the Gravity panel and change the Direction of Gravity Force to (0, -1, 0) Click Apply Select the 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

Initialise phase 1 field values as follows: Open the Fluid Initialization panel Ensure the Phase slider at the bottom of the panel is in the Phase 1 position Set the V velocity to 1 m/s Click Apply

Initialise phase 2 field values as follows:


12-4

Move the slider to the Phase 2 position


Version 4.08

Tutorial 12.1

TERMINAL VELOCITY OF BUBBLES

Pre-Processing Boundary Conditions

Set the V velocity to 1 m/s Set the Volume fraction to 0.001 Click Apply

Select locations for the pressure reference and monitoring cells as follows: Open the Monitoring and Reference Data (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

Turn on the buoyancy force as follows: Open the Buoyancy panel Select the Buoyancy option Select option Centroid of pressure reference cell for the datum Location Select Use reference and initial values for the datum Density option, together with the Reference pressure and temperature values Click Apply

We now define the interaction between the two phases: Select the Eulerian Multi-phase folder followed by the Interphase Momentum Transfer sub-folder Open the Drag Forces panel Select Constant for the Drag Coefcient Model and accept the default Coefcient Value of 0.44 Click Apply

Set the bubble diameter to 2 mm: Boundary Conditions Open the Particle Size panel Enter 0.002 in the Mean Diameter box Click Apply

First we re-define all walls as slip walls: Select the Dene Boundaries folder and then open the Dene Boundary Regions panel Select region 0 for Wall in the scroll list Ensure the Phase slider at the bottom of the panel is at the Phase 1 position Select Yes for the Slip option Click Apply Move the Phase slider to the Phase 2 position Select Yes for the Slip option Click Apply

We now define the inlet conditions:


Version 4.08

Select region 1 in the scroll list Move the Phase slider at the bottom of the panel to the Phase 1 position Enter 1 m/s for the V velocity and 1000 kg/m3 for the Density
12-5

Tutorial 12.1

TERMINAL VELOCITY OF BUBBLES

CFD Analysis Analysis Controls

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

No extra input is needed for the Outlet boundary. Analysis Controls We will now specify various solver parameters required for this case: Run Time Controls Select folder Analysis Controls Open the Equation Status tab of the Primary Variables panel Ensure the Phase slider at the bottom of the panel is at the Phase 1 position Deselect item W-Momentum since we are solving a 2D ow 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 Go to the Solver Parameters tab Move the Phase slider to the Phase 1 position Change the Relaxation Factor to 0.3 for Momentum and 0.1 for Pressure Click Apply Move the Phase slider to the Phase 2 position Change the Relaxation Factor to 0.3 for Momentum and 0.1 for Volume Fraction Click Apply

Set the residual tolerance for this case: Select the Analysis Preparation folder Open the Run Time Controls panel Change the Maximum Residual Tolerance to 1e-5 Click Apply

Final Operations

If you wish to terminate the session at this stage, write the geometry and problem files and exit from pro-STAR, saving the model data as shown below: In the main pro-STAR panel, select File > 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 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

12-6

Version 4.08

Tutorial 12.1

TERMINAL VELOCITY OF BUBBLES

Post-Processing Final Operations

star -dp in your session window. Post-Processing Examine the velocities of the two phases at the channel exit: the water velocity (phase 1) should remain close to 1 m/s and the bubble velocity (phase 2) should be around 1.24 m/s, as calculated by equation above. This can be done very effectively by plotting the monitored value for the V velocity as follows: Select folder Analysis Preparation 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

Figure T12.1-2

V-velocity history plot for phase 1

Version 4.08

12-7

Tutorial 12.1

TERMINAL VELOCITY OF BUBBLES

Suggestions for Further Exercises Final Operations

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

Figure T12.1-3

V-velocity history plot for phase 2

Suggestions for Further Exercises Other bubble rise cases You may wish to repeat this tutorial with different input parameters; for example, change the density of the fluid or use a different bubble diameter. Recalculate the terminal velocity using equation and compare the answer with the simulation results. Terminal velocity of solid particles Another exercise you may want to perform is to simulate the terminal velocity of a falling solid sphere. In this case, both phases are moving in the same direction as gravity (downwards). To re-use the setup described above, you can simply change the gravity vector direction to (0, 1, 0). Try this exercise with the following parameters: Phase 1 is water, density = 1000, viscosity = 0.001 Phase 2 is steel spheres, density = 8000, viscosity = 1.0e-5, diameter = 1.0e-4

Substituting these parameters into equation , we get:


12-8 Version 4.08

Tutorial 12.1

TERMINAL VELOCITY OF BUBBLES

Suggestions for Further Exercises Final Operations

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.

Version 4.08

12-9

Tutorial 12.2

AERATION TANK

Pre-Processing Preliminaries

Tutorial 12.2

AERATION TANK

Aeration is used in many process industries. Air or gas bubbles are injected into a liquid to promote mixing and mass transfer of chemical species between the phases. An example of this is the transfer of oxygen from air bubbles to a liquid for oxidation reactions. In this tutorial, we consider an aeration tank commonly used in the treatment of waste water.
2m Degassing outlet gy 1m

x Air inlet Figure T12.2-1 Outline of an aeration tank

Pre-Processing Preliminaries Create a sub-directory for the tutorial called tut12-2. The mesh for this problem is supplied in advance, i.e., cell, vertex, boundary and problem setup files (tank.cel, tank.vrt, tank.bnd and tank.inp, respectively) are available in the STAR-CD installation directories. Therefore, before starting the tutorial, make sure that these files are copied into your current directory. Start up pro-STAR by typing prostar at the command line Specify your preferred graphics driver (mesa or gl) Enter the case name (say, aer_tank) in the Case Name text box Click Continue

Read in the available problem data: Select File > Read Input Coded File... in the main pro-STAR window In the Read Input Coded File dialog select the File name tank.inp Click OK

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

In the main window, select File > Model Title... In the Title text box type:
12-11

Tutorial 12.2

AERATION TANK

Pre-Processing Material Properties and Thermouid Models

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

Material Properties and Thermouid Models

We now assign physical properties to the two phases. Select the Thermophysical Models and Properties folder Open the Gravity panel and change the Direction of Gravity Force to (0, -1, 0) Click Apply Select the Liquids and Gases folder Open the Molecular Properties (Fluids) panel Make sure the Phase slider at the bottom of the panel is in the Phase 1 position Assign appropriate property values for phase 1. Thermal properties are not relevant in this case so they may be left at their default values: Material Water Density 1000 Molecular Viscosity 0.001 Click Apply Move the Phase slider to the phase 2 position Assign appropriate property values for phase 2 as follows: Material Air Density 1 Molecular Viscosity 1e-5 Click Apply

Specify that the flow is turbulent and set up the turbulence drag force:
12-12

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
Version 4.08

Tutorial 12.2

AERATION TANK

Pre-Processing Boundary Conditions

Select On for Turbulence Drag and then click Apply

Initialise phase 1 field values as follows: Open the Fluid Initialization panel Move the Phase slider at the bottom of the panel to the phase 1 position Click Apply, since the default values are all acceptable.

Initialise phase 2 values as follows: Move the Phase slider to the phase 2 position Set the Volume fraction to 0.001 Click Apply

Select locations for the pressure reference and monitoring cells as follows: Go to the Monitoring and Reference Data (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

Turn on the buoyancy force as follows: Open the Buoyancy panel Select the Buoyancy option Select option Centroid of pressure reference cell for the datum Location Select Use reference and initial values for the datum Density option, together with the Reference pressure and temperature values Click Apply

We now define the interactions between the two phases: Select the Eulerian Multi-phase folder followed by the Interphase Momentum Transfer sub-folder Open the Drag Forces panel Select Bubbles for the Drag Coefcient Model Click Apply

Set the bubble diameter to 3 mm: Boundary Conditions Open the Particle Size panel Enter 0.003 in the Mean Diameter box Click Apply

We now define boundary conditions at the inlet: Select the Dene Boundaries folder and then open the Dene Boundary Regions panel Select region 1 in the scroll list Ensure the Phase slider at the bottom of the panel is at the phase 1 position Change the Turbulence Switch option to TI/Length Enter 0.1 for Turb. Intensity
12-13

Version 4.08

Tutorial 12.2

AERATION TANK

Pre-Processing Analysis Controls

Enter 0.01 m for Length Enter 1000 kg/m3 for Density Click Apply

Define the injection of air bubbles (phase 2) at the inlet: Move the Phase slider to the phase 2 position Enter 0.25 m/s for the V velocity, 1 kg/m3 for Density and 0.5 for the Volume Fraction Click Apply

No user input is needed for region 2 in the scroll list which is already defined as the Degassing outlet. Analysis Controls We will now specify appropriate solver parameters for this case: Run Time Controls 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 ow 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 Go to the Solver Parameters tab Move the Phase slider to the phase 1 position Change the Relaxation Factor to 0.3 for Momentum and 0.1 for Pressure Click Apply Move the Phase slider to the phase 2 position Change the Relaxation Factor to 0.3 for Momentum and 0.1 for Volume Fraction Click Apply

Set the maximum number of iterations to 6,000 for this case: Select the Analysis Preparation folder Open the Run Time Controls panel Change the Maximum Number of Iterations to 6000 and the Maximum Residual Tolerance to 1e-4 Click Apply

Final Operations

If you wish to terminate the session at this stage, write the geometry and problem files and exit from pro-STAR, saving the model data as shown below: In the main pro-STAR panel, select File > 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

12-14

Version 4.08

Tutorial 12.2

AERATION TANK

CFD Analysis Preliminaries

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 in your session window. Post-Processing Preliminaries Use pro-STAR to check the analysis results by first reading in the data stored in file aer_tank.ccmp: Postprocessing Select folder Post-Processing Open the Load Data panel to display the File(s) tab Click Open Post le

First, examine the velocity of phase 1: Go to the Data tab and check that Data Type Cell is selected Ensure the Phase slider is in the Phase 1 position In the Vector Data list, select item Velocity Components UV to load the two velocity components in the plane of analysis for phase 1 Click Get Data Open the Create Plots panel In the 3-D Surface tab, select Vector from the Option menu and Edge from the Edge/Mesh menu Click Plot to Screen to display Figure T12.2-2

Version 4.08

12-15

Tutorial 12.2

AERATION TANK

Post-Processing Post- processing

Figure T12.2-2

Velocity vector plot for phase 1

Next, plot velocity vectors of phase 2: Go back to the Load Data panel Move the Phase slider to the Phase 2 position In the Vector Data list, select item Velocity Components UV to load the two velocity components in the plane of analysis for phase 2 Click Get Data In the main window click Replot to display Figure T12.2-3

12-16

Version 4.08

Tutorial 12.2

AERATION TANK

Post-Processing Post- processing

Figure T12.2-3

Velocity vector plot for phase 2

Finally, display a contour plot of the phase 2 volume fraction: In the Data tab, select option Cell & Wall/Bound (Smooth) from the Data Type menu In the Vector Data list, select None In the Scalar Data list, select item Volume Fraction and then click Get Data Go to the Create Plots panel In the 3-D Surface tab, select plot options Contour (lled) and Edge Click Plot to Screen to display Figure T12.2-4

Version 4.08

12-17

Tutorial 12.2

AERATION TANK

Suggestions for Further Exercises Post- processing

Figure T12.2-4

Phase 2 volume fraction contour plot

It will be seen that bubbles rise from the injection point to the top surface. The rising bubbles also lift the water around them and create an up-flow of liquid above the injector. Under the top surface, the flow turns horizontally to the right and then downwards on the right-hand-side of the tank. The bubbles are carried by the flow and spread across the top surface, some being carried downwards again by the down-flow on the right-hand-side. Suggestions for Further Exercises Bubble columns Changing the geometry of this tutorial to a cylindrical tank results in a model for a bubble column. Gas-liquid mixing vessels Adding a rotating impeller to the tank results in a model for a gas-liquid mixing vessel (see Tutorial 11.2 describing the setup of a moving-mesh case involving a rotating impeller).

12-18

Version 4.08

Tutorial 12.3

FLUIDISED BED RISER

Pre-Processing Preliminaries

Tutorial 12.3

FLUIDISED BED RISER

This tutorial is intended to familiarise users with the process of setting up an Eulerian two-phase calculation for fluidised beds. Fluidised beds are used in many process industries for drying, gasification and burning of coal particles and in fluidised catalytic crackers (FCCs). Usually the lower portion of the equipment is loaded with solid particles. The particle concentration is close to the maximum packing limit, around 63% in volume fraction. A gas is blown through the bottom inlet boundary and through the particles, lifting and moving them by virtue of drag forces. The particle motions are random and constantly changing with time, hence it is necessary to model fluidised beds in transient mode. Often, the gas moves through the particles in the form of large gas pockets called bubbles. In this tutorial, we consider a simple fluidised bed similar to the riser of a fluidised catalytic cracker unit.
0.15m 0.15m Pressure outlet gy 1m Fluidised bed y x Air inlet Figure T12.3-1 Outline of a FCC riser Free board

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

Read in the available problem data:


Version 4.08

Select File > Read Input Coded File... in the main pro-STAR window
12-19

Tutorial 12.3

FLUIDISED BED RISER

Pre-Processing Material Properties

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 problems cell, vertex and boundary location definitions from the remaining three files. In the main window, select File > Model Title... In the Title text box type: FLUIDISED BED RISER Click Apply 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.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: Material Properties Select option Transient from the Time Domain menu Select option Eulerian from the Multi-Phase Treatment menu Click Apply

We now assign physical properties to the two phases: Select the Thermophysical Models and Properties folder Open the Gravity panel and change the Direction of Gravity Force to (0, -1, 0) Click Apply Select the Liquid and Gases folder Open the Molecular Properties (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
Version 4.08

12-20

Tutorial 12.3

FLUIDISED BED RISER

Pre-Processing Initialisation

Assign appropriate property values to phase 2. In this case, the only relevant property is the particle density. However, in the Other Model Settings section, the Kinetic Theory model will be used to calculate solid-phase forces and this employs an internally calculated solid-phase viscosity. Since the value supplied in the current panel is added to the calculated one and in order not to affect the latter, the panels phase viscosity should to be set to a very small value. 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. Initialisation Open the Turbulence Models panel and verify that the Turbulence option is turned Off

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 ules 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 Dene Accept the default values in the rest of the panel by clicking Apply

The complete contents of INITFI for this case are shown in the User Subroutine section below. Other Model Settings Select locations for the pressure reference and monitoring cells as follows: Go to the Monitoring and Reference Data (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

Turn on the buoyancy force as follows:


Version 4.08

Open the Buoyancy panel


12-21

Tutorial 12.3

FLUIDISED BED RISER

Pre-Processing Boundary Conditions

Select the Buoyancy option Check that option Centroid of pressure reference cell is selected for the datum Location and option Specify is selected for the datum Density Accept the default settings by clicking Apply

We now define the interaction between the two phases: Select the Eulerian Multi-Phase folder followed by the Interphase Momentum Transfer sub-folder Open the Drag Forces panel Select option High Particle Loading for the Drag Coefcient Model, leaving the default values unchanged Click Apply Open the Other Forces panel Select option Kinetic Theory Model from the Solid Particle Stress menu Accept the defaults shown for Maximum Volume Fraction and Restitution Coefcient Click Apply

Finally, set the particle diameter to 0.3 mm: Boundary Conditions Open the Particle Size panel Enter 0.0003 in the Mean Diameter text box. Click Apply

Define boundary conditions at the inlet: Select the Dene Boundaries folder, then open the Dene 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 0.35 m/s for the V velocity Click Apply

Now define particle (phase 2) conditions at the inlet: Move the Phase slider l to the Phase 2 position Enter 2600 kg/m3 for Density and 0 for Volume Fraction Click Apply

Finally, define boundary conditions at the pressure outlet: Analysis Controls Select region 2 in the scroll list Check that the Phase slider is at the Phase 2 position Select option Volume Frac from the VF Switch menu and enter 0 in the Volume Fraction box Click Apply

Specify various solver parameters relevant to this case: 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
Version 4.08

12-22

Tutorial 12.3

FLUIDISED BED RISER

User Subroutine Output Controls

Output Controls

Deselect the W-Momentum option since we are only solving a 2D ow in the x-y plane Click Apply Move the Phase slider to the Phase 2 position Deselect the W-Momentum option Click Apply

Set the frequency of outputting calculated transient data during the analysis: 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 le Click Apply

Run Time Controls

Set the run duration to 2 seconds and the time step to 1 x 10-4 seconds: 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 Operations

If you wish to terminate the session at this stage, write the geometry and problem files and exit from pro-STAR, saving the model data as shown below. In the main pro-STAR panel, select File > 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-STARs built-in editor. For this purpose, edit subroutine INITFI (in file initfi.f, sub-directory ufile) as follows: In the main pro-STAR panel, select File > Edit File... In the Edit File dialog, click File > Open... In the Open dialog, enter sub-directory ule and select le init.f Click OK Edit the contents of the subroutine by adding extra lines of code after the explanatory section, as shown below
12-23

Version 4.08

Tutorial 12.3

FLUIDISED BED RISER

User Subroutine Final Operations

Click File > Save In the Save dialog, re-specify ule / init.f as the save location of the modied subroutine and click Save Click File > Quit to exit from the editor

C************************************************************************* SUBROUTINE INITFI(U,V,W,PR,TE,ED,T,SCALAR,XVF2) C Initialise fields C************************************************************************* C--------------------------------------------------------------------------* 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 12-24 Version 4.08

Tutorial 12.3

FLUIDISED BED RISER

CFD Analysis Final Operations

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 in your session window. 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 le fcc_riser.ccmt appears in the Post File box in the Transient section and then click Add File Select le fcc_riser.ccmt from the Transient list and then click Open Transient le; 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 (lled) 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

Version 4.08

12-25

Tutorial 12.3

FLUIDISED BED RISER

Post-Processing Final Operations

Figure T12.3-2

Phase 2 volume fraction at time 0.1s

Now fix the colour scale to a range between 0 and 1: Go to the Options tab in the Create Plots panel In the Color Scale section, select User from the Range menu and enter 0 in the From box and 1 in the To box Click Apply In the main graphics window, click Replot

The above process may be repeated for each of the results calculated every 0.025 seconds in the analysis. However, the best way of displaying these is by instructing pro-STAR to loop over the entire post file. To do this, type the following commands in the I/O window: *set itno 250 250 *define stor iter itno egev 2 none vf cset news fluid cplot *end *loop 1 79 1 Examine the volume fraction plots in the time sequence of your outputs. You should see gas bubbles rise through the particle bed. The ow is rather random and chaotic, with particles pushed around by the gas ow. The maximum particle volume fraction should be around the maximum packing value set in the model
12-26 Version 4.08

Tutorial 12.3

FLUIDISED BED RISER

Post-Processing Final Operations

(typically 0.63). From time to time a higher maximum volume fraction can occur in one or two spots.

Version 4.08

12-27

Tutorial 12.4

BOILING SIMULATION

Pre-Processing Preliminaries

Tutorial 12.4

BOILING SIMULATION

This tutorial is intended to familiarise users with the process of setting up an Eulerian two-phase model for boiling problems. The solution domain is a vertical channel whose geometry is shown below. The flow regime consists of superheated water entering the channel at the bottom, some of the water evaporating into steam bubbles, and a water/steam mixture emerging from the pressure boundary outlet at the top.
0.1m 0.1m Steam/water outlet gy 2m Steam bubbles

y x Superheated water Figure T12.4-1 Outline of ow channel with boiling

Pre-Processing Preliminaries Create a sub-directory for the tutorial called tut12-4. The mesh for this problem is supplied in advance, i.e. cell, vertex, boundary and problem setup files (channel2.cel, channel2.vrt, channel2.bnd and channel2.inp, respectively) are available in the STAR-CD installation directories. Therefore, before starting the tutorial, make sure that these files are copied into your current directory. Start up pro-STAR by typing prostar at the command line Specify your preferred graphics driver (mesa or gl) Enter the case name (say, boil) in the Case Name text box Click Continue

Read in the available problem data: Select File > Read Input Coded File... in the main pro-STAR window In the Read Input Coded File dialog select the File name channel2.inp Click OK

This will read default problem settings from file channel2.inp plus the problems cell, vertex and boundary location definitions from the remaining three files.
Version 4.08 12-29

Tutorial 12.4

BOILING SIMULATION

Pre-Processing Material Properties and Thermouid Models

In the main window, select File > Model Title... In the Title text box type: CHANNEL FLOW WITH BOILING

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.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: Material Properties and Thermouid Models Select option Eulerian from the Multi-Phase Treatment menu Click Apply

Assign physical properties to the two phases. Select the Thermophysical Models and Properties folder Open the Gravity panel and change the Direction of Gravity Force to (0, -1, 0) Click Apply Select the Liquid and Gases folder Open the Molecular Properties (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 Specic 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 Specic Heat 2034 Conductivity 0.0248
Version 4.08

12-30

Tutorial 12.4

BOILING SIMULATION

Pre-Processing Material Properties and Thermouid Models

Molecular Weight 18 Click Apply

Turn on the solution of the energy equation: Open the Thermal Models panel For each of the two phases: Select On for the Temperature Calculation option Click Apply

Initialise field values as follows: Open the Fluid Initialization panel Ensure the Phase slider at the bottom of the panel is at the Phase 1 position Check that Options is set to Constant and then enter the following values: V velocity 0.5 m/s Temperature 375 Accept the default values for the remaining parameters and then click Apply Move the Phase slider to the Phase 2 position Enter the following values: V velocity 0.5 m/s Volume Fraction 0.01 Temperature 373 Accept the default values for the remaining parameters and then click Apply

Select locations for the pressure reference and monitoring cells as follows: Go to the Monitoring and Reference Data (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

Turn on the buoyancy force as follows: Open the Buoyancy panel Select the Buoyancy option Select option Centroid of pressure reference cell for the datum Location Select option Use reference and initial values, together with Reference pressure and temperature values for the datum Density value Click Apply

Define the interactions between the two phases: Select the Eulerian Multi-Phase folder followed by the Interphase Momentum Transfer sub-folder Open the Drag Forces panel Select Bubbles for the Drag Coefcient Model Click Apply

Interphase heat transfer will be defined later via a user subroutine, so the Nusselt
Version 4.08 12-31

Tutorial 12.4

BOILING SIMULATION

Pre-Processing Boundary Conditions

Number shown in the pro-STAR Model Guide may be set to zero: Open the Interphase Heat Transfer panel Check that Constant is selected for the Model and enter 0 in the Nusselt Number box Click Apply

Set the bubble diameter to 1 mm: Open the Particle Size panel Check that 0.001 m is entered for the Mean Diameter Click Apply

The boiling heat and mass transfers are to be defined as source terms via user subroutines. First, you need to create a ufile sub-directory in your working directory to store the subroutines: Signal to pro-STAR that this case requires user subroutines by choosing File > System Command... from the main window Type ules in the text box, click Apply and then Close

Prepare the user subroutines for mass and energy sources as follows: Boundary Conditions Select the Sources folder and then open the Source Terms panel For the Mass Source Term, set the State to On. Choose to Dene Source by User Coding and then click Apply For the Enthalpy Source Term, select On, User Coding and then click Apply

Define boundary conditions at the inlet: Select the Dene Boundaries folder and then open the Dene 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

Define boundary conditions at the pressure outlet:


12-32

Select region 2 in the scroll list Move the Phase slider at the bottom of the panel to the Phase 1 position Select Zero Grad for the Temperature Switch
Version 4.08

Tutorial 12.4

BOILING SIMULATION

User Subroutines Analysis Controls

Analysis Controls

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

Specify various solver parameters required for this case: 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 ow in the x-y plane. Click Apply Move the Phase slider to the Phase 2 position Deselect item W-Momentum Click Apply Go to the Solver Parameters tab Move the Phase slider to the Phase 1 position Change the Relaxation Factor to 0.3 for Momentum, 0.1 for Pressure, 0.3 for Temperature Click Apply Move the Phase slider to the Phase 2 position Change the Relaxation Factor to 0.3 for Momentum, 0.1 for Volume Fraction, 0.3 for Temperature Click Apply

Run Time Controls

Set the number of iterations to 1000 for this case: Select the Analysis Preparation folder Open the Run Time Controls panel Change the Maximum Number of Iterations to 1000 and the Maximum Residual Tolerance to 3e-5 Click Apply

Final Operations

If you wish to terminate the session at this stage, write the geometry and problem files and exit from pro-STAR, saving the model data as shown below: In the main pro-STAR panel, select File > 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 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.
Version 4.08 12-33

Tutorial 12.4

BOILING SIMULATION

User Subroutines Final Operations

Replace the default contents of both les with the code shown below, using pro-STARs built-in editor or any other editor. For le 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 12-34 Version 4.08

Tutorial 12.4

BOILING SIMULATION

User Subroutines Final Operations

C IPMASS is an interphase mass transfer indicator used in C Eulerian two-phase (E2P) simulations only. C The default value, passed from STAR to FLUINJ, is always zero. C IPMASS=0: no interphase heat transfer - the mass sources specified C in FLUINJ are independent for each phase. C IPMASS=1: the phases are exchanging mass - the mass source specified C is directed from one phase into the other phase. C For more information, please refer to the E2P sections of the C manuals. C C------------------------------------------------------------------------C C Sample coding: Fluid injection and removal C C IF(ICTID.EQ.3) THEN CC Injection C FLUXI=0.1 C WI=0.05 C TI=373.0 C SCINJ(1)=1.0 C ELSE IF(ICTID.EQ.4) THEN CC Removal C FLUXI=-0.05 C ENDIF C-------------------------------------------------------------------------C C DENL=DEN VISL=VISM CPL=CP TKL=CON UR=U-UCEL2 VR=V-VCEL2 WR=W-WCEL2 SLIP=SQRT(UR*UR+VR*VR+WR*WR) DIAP=DIAM TL=T TG=TCEL2 VFG=VFCEL2 C CALL UBOIL(SMASS) C C.....SET INTERPHASE MASS FLUX IF(IPHA.EQ.1) THEN FLUXI=-SMASS UI=UCEL2 VI=VCEL2 WI=WCEL2 TI=TSAT ELSE IF(IPHA.EQ.2) THEN FLUXI=SMASS UI=U VI=V WI=W TI=TSAT ENDIF IPMASS=0 C Version 4.08 12-35

Tutorial 12.4

BOILING SIMULATION

User Subroutines Final Operations

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 12-36 Version 4.08

Tutorial 12.4

BOILING SIMULATION

User Subroutines Final Operations

C.........USE CONSTANT RNU=2.0 FOR SIMPLICITY RNU=2.0 C C.........LIQUID-SIDE HEAT TRANSFER COEFFICIENT HTCOEF=RNU*TKL/DIAP C C.........INTERFACIAL AREAM IN CELL AI=6.0*VFG/DIAP C C.........HEAT TRANSFER ACROSS INTERPHASE QLIQ=HTCOEF*AI*(TL-TSAT) C C.........GAS-SIDE HEAT TRANSFER COEFFICIENT HTCGAS=10.0 C C.........HEAT TRANSFER FROM GAS TO INTERPHASE QGAS=HTCGAS*AI*(TG-TSAT) C C.........MASS TRANSFER RATE SMASS=(QLIQ+QGAS)/QLATEN C RETURN END

For le sorent.f the appropriate code is as follows:

C******************************************************************* SUBROUTINE SORENT(S1P,S2P) C Source-term for enthalpy C******************************************************************* C--------------------------------------------------------------------------* C STAR-CD VERSION 4.04 C--------------------------------------------------------------------------* INCLUDE 'comdb.inc' COMMON/USR001/INTFLG(100) C.....USER'S ADDITIONAL DEFINITIONS REAL DENL,VISL,CPL,TKL,SLIP,DIAP,TL,VFG,TG REAL TSAT,H1SAT,H2SAT,QLATEN REAL AI,HTCOEF,HTCGAS,QLIQ,QGAS REAL SMASS,UR,VR,WR COMMON/UBOIL1/ DENL,VISL,CPL,TKL,SLIP,DIAP,TL,VFG,TG COMMON/UBOIL2/ TSAT,H1SAT,H2SAT,QLATEN COMMON/UBOIL3/ AI,HTCOEF,HTCGAS,QLIQ,QGAS INCLUDE 'usrdat.inc' DIMENSION SCALAR(50) EQUIVALENCE( UDAT12(001), EQUIVALENCE( UDAT03(001), EQUIVALENCE( UDAT03(019), EQUIVALENCE( UDAT04(001), EQUIVALENCE( UDAT04(002), EQUIVALENCE( UDAT04(003), EQUIVALENCE( UDAT04(004), EQUIVALENCE( UDAT04(006), Version 4.08

ICTID ) CON ) VOLP ) CP ) DEN ) ED ) HP ) P ) 12-37

Tutorial 12.4

BOILING SIMULATION

User Subroutines Final Operations

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 12-38 Version 4.08

Tutorial 12.4

BOILING SIMULATION

CFD Analysis Final Operations

C.....SET HEAT TRANSFER BETWEEN PHASE AND INTERFACE IF(IPHA.EQ.1) THEN S1P=HTCOEF*AI*TSAT S2P=HTCOEF*AI ELSE IF(IPHA.EQ.2) THEN S1P=HTCGAS*AI*TSAT S2P=HTCGAS*AI ENDIF C RETURN END

CFD Analysis You may continue with the CFD analysis, using the 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 in your session window. Post-Processing Use pro-STAR to check and examine the results. Select folder Post-Processing Open the Load Data panel to display the Files(s) tab Click Open Post le

Plot the volume fraction for phase 2 as follows: Go to the Data tab and check that Data Type Cell is selected Set the Smooth option to On Move the Phase slider to the Phase 2 position and select item Volume Fraction from the Scalar Data list Click Get Data Open the Create Plots panel In the 3-D Surface tab, select Contour (lled) from the Option menu and Edge from the Edge/Mesh menu Click Plot to Screen to display Figure T12.4-2

Version 4.08

12-39

Tutorial 12.4

BOILING SIMULATION

Post-Processing Final Operations

Figure T12.4-2

Contours of phase 2 volume fraction

The steam volume fraction at the exit should be about 0.85. Now plot the temperature as follows: 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

12-40

Version 4.08

Tutorial 12.4

BOILING SIMULATION

Post-Processing Final Operations

Figure T12.4-3

Phase 2 temperature contour plot

Note that the steam temperature remains within its saturation value of 373 K throughout the solution domain. Repeat the above steps to obtain a phase 1 temperature plot: 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

Version 4.08

12-41

Tutorial 12.4

BOILING SIMULATION

Post-Processing Final Operations

Figure T12.4-4

Phase 1 temperature contour plot

Note that the water temperature drops to the 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

12-42

Version 4.08

Tutorial 12.4

BOILING SIMULATION

Discussion of Results Final Operations

Figure T12.4-5

Contour plot of velocity component V

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 = m liq c p, liq ( T liq T sat ) The water flow rate is: m liq = liq liq A v liq Substituting appropriate values into the above formulae, we obtain

Version 4.08

12-43

Tutorial 12.4

BOILING SIMULATION

Suggestions for Further Exercises Final Operations

q liq = 40 kJ/s Assuming that all this excess energy is used in generating steam, the latters generation rate is: q liq m g = ------ h fg where h fg is the latent heat, in this case 2256.7 kJ/kg. The steam generation rate is therefore 0.0177 kg/s. We can check this result against the exit conditions of steam shown in the plots above. From these plots, the volume fraction equals 0.8522 and the V-velocity equals 3.445 m/s. Using the specified density value of 0.6 kg/m3 and the channel cross-sectional area of 0.01 m2, the mass flow rate of steam calculated from these results is 0.0176 kg/s. Suggestions for Further Exercises Condensation The same model can be used to study condensation.
0.1m 0.1m Water outlet gy 2m Steam bubbles y x Sub-cooled water + steam Figure T12.4-6 Outline of ow channel

Start by copying the entire working directory for boiling tutorial tut12-4 to another directory, say tut12-4b, as follows: cp -r tut12-4 tut12-4b Enter the tut12-4b directory and start a pro-STAR session as normal, re-using the model settings of tut12-4. Now make the following changes:
12-44

Initial and inlet conditions:


Version 4.08

Tutorial 12.4

BOILING SIMULATION

Suggestions for Further Exercises Final Operations

Water temperature = 372 K (i.e. one degree subcool) Steam volume fraction = 0.1 Save the problem and model les Run STAR and post-process the results as described above.

Version 4.08

12-45

Introduction

Tutorial 13 AEROACOUSTIC ANALYSIS


Introduction The tutorials in this group illustrate STAR-CDs facilities for performing an aeroacoustic analysis. The problem analysed is air flow around a cylinder which, for simplicity, is modelled as a two-dimensional problem. The air density and laminar viscosity are 1.205 kg/m3 and 1.81 x 10-5 Pa s, respectively. The circle representing the cylinder has a diameter of 0.15 m and the inlet velocity is 5 m/s. These values are chosen to produce a flow with a Reynolds number of 50,000, based on the cylinder diameter. The mesh employed is refined in the vicinity of the cylinder and also in the region where the wake is expected to appear.

inow

Figure T13.0-1

Flow around a cylinder

The features demonstrated in these tutorials provide only basic data on the aeroacoustic properties of a flow system. More detailed aeroacoustic analyses may be performed using STAR-CD in conjunction with CD-adapcos es-acoustics tool.

Version 4.08

13-1

Tutorial 13.1

STEADY FLOW AROUND A CYLINDER

Pre-Processing Preliminaries

Tutorial 13.1

STEADY FLOW AROUND A CYLINDER

This tutorial aims to demonstrate: The application of an aeroacoustic model in a steady-state problem Methods for determining whether an analysis has converged to a steady-state solution

The aeroacoustic properties of the flow will be analysed by calculating a Lilley source term representing broadband shear noise (see Aeroacoustic Analysis on page 18-7 of the Methodology volume). This scalar is useful in identifying those areas of the problem geometry where shear noise dominates and hence can assist in design modification to minimise noise. However, being a steady-state method, it cannot be expected to capture the acoustic effects of large-scale transient features such as vortex shedding. Thus, the method can only assist in a qualitative examination of the acoustic features of the flow system. Turbulence is modelled using the low-Reynolds number k- model (see Standard low Reynolds number two-equation k- models on page 2-14 of the Methodology volume). Pre-Processing Preliminaries Create a directory for the tutorial named tut13-1. The mesh to be used has already been created and the relevant cell, vertex, boundary and problem setup files are supplied with STAR-CD (files cyl.cel, cyl.vrt, cyl.bnd and cyl.inp, respectively). Therefore, before starting the tutorial, make sure these files are copied into your current directory. Start up pro-STAR and enter the case name and title: Type prostar at the command line Specify your preferred graphics driver (mesa or gl) Type aac in the Case Name text box Click Continue

Read in the available problem data: In the main pro-STAR window, select File > Read Input Coded File... In the Read Input Coded File dialog, select the File name cyl.inp Click OK

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: AEROACOUSTIC ANALYSIS OF FLOW AROUND A CYLINDER
13-2

Click Apply and Close Select C > All Select B > All Select B > Unselect > Symplane
Version 4.08

Tutorial 13.1

STEADY FLOW AROUND A CYLINDER

Pre-Processing Material Properties

Enable the Display Boundaries option by clicking the button Click Cplot to display the mesh and the inlet and pressure boundaries, as shown in Figure T13.1-1. The symmetry boundaries omitted from the plot are placed on the two surfaces lying in the plane of view.

Figure T13.1-1

Mesh geometry

Turn on the aeroacoustic analysis option: Open the Analysis Features pro-STAR Model Guide panel Select On for the Aeroacoustic Analysis option Click Apply

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 Properties

The aeroacoustic source term calculation depends upon a fluctuating velocity, obtained from calculated or derived values of k and using the Synthetic turbulence method described in Chapter 18 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
13-3

Version 4.08

Tutorial 13.1

STEADY FLOW AROUND A CYLINDER

Pre-Processing Boundary Conditions

the aeroacoustic analysis. Go to the Thermophysical Models and Properties folder and select sub-folder Liquids and Gases Open the Turbulence Models panel Select On for the Turbulence option Select k-Epsilon/Low Reynolds Number from the Model menu Click Apply Under the Near-Wall Treatment tab, select the Hybrid Wall Function Click Apply

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: Boundary Conditions 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

Specify the velocity and turbulence parameters at the inlet. The former is set such that, based on the diameter of the cylinder, the Reynolds number is 50,000: Select the Dene Boundaries folder Open the Dene 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 Controls

Since the flow is two-dimensional, solving the momentum equation in the z-direction is unnecessary. To turn this off and activate a second-order differencing scheme for the other two momentum equations: 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

13-4

Version 4.08

Tutorial 13.1

STEADY FLOW AROUND A CYLINDER

CFD Analysis Run Time Controls

Set the frequency of data output to the solution le: Run Time Controls Open 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 aac.ccmp Click Apply

The run time controls must also be adjusted as follows: Select folder Analysis Preparation and open the Run Time Controls panel Enter 600 for the Maximum Number of Iterations Click Apply

Final Operations

Write the geometry and problem files: 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: Flow Field Select folder Post-Processing Open the Load Data panel to display the File(s) tab Click Open Post le

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

Version 4.08

Tutorial 13.1

STEADY FLOW AROUND A CYLINDER

Post-Processing Monitor History Plots

Turn off the Display Boundaries option by clicking the button In order to be able to see the ow eld details, zoom in using the middle mouse button until the values at the bottom of the display window show the plot Center to be approximately 0.1, 0, 0 and the viewing Distance approximately 0.25. The resulting plot should resemble Figure T13.1-2

Figure T13.1-2

Plot of velocity vectors near to the cylinder

The flow field is clearly not symmetrical despite the geometry being so. This suggests that a converged steady-state solution has not been reached. Monitor Examining history plots of the monitored flow variables is a good way to reveal History Plots whether a steady-state solution has been reached and, if not, why not. To create a suitable history plot: Select the Analysis Preparation 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:
13-6

Select the Graphs sub-folder in the Post-Processing folder Open the Customize Graphs panel Under the Display tab, change the frame Location to Default Click Apply
Version 4.08

Tutorial 13.1

STEADY FLOW AROUND A CYLINDER

Post-Processing Turbulence Energy

Click Redraw to display Figure T13.1-3

Figure T13.1-3

History plot for the U velocity component

The oscillating graph shows that a steady-state solution was not reached and suggests that the real solution to this problem is periodic. In order to obtain a full solution, a transient analysis would need to be run. Such an analysis is the basis of Tutorial 13.2. Despite the absence of a steady-state solution, the results obtained from this run (which effectively show the instantaneous solution at a point within the periodic cycle) can be used to discuss some aspects of an aeroacoustic analysis. Turbulence Energy A plot of the turbulence kinetic energy will show the shape and position of the wake downstream of the cylinder: 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 (lled) and None Click Plot To Screen Click the Zoom Off button, , to display Figure T13.1-4

Version 4.08

13-7

Tutorial 13.1

STEADY FLOW AROUND A CYLINDER

Post-Processing Aeroacoustic Source Term

Figure T13.1-4

Contour plot of the turbulence kinetic energy

Aeroacoustic The aeroacoustic Lilley source term is loaded from the results file in the same way Source Term as any other scalar. Therefore, a contour plot of it can be produced as follows: 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

13-8

Version 4.08

Tutorial 13.1

STEADY FLOW AROUND A CYLINDER

Post-Processing Aeroacoustic Source Term

Figure T13.1-5

Contour plot of the aeroacoustic Lilley source term

Figure T13.1-5 shows that the shear noise produced by the flow is primarily in the wake of the cylinder. The shape of the noise wake is similar to that of the turbulence wake shown in Figure T13.1-4. This is due to the Lilley source dependence on the turbulence parameters k and . A separate analysis using the es-acoustics tool shows that the mesh provided for this case is only capable of resolving noise resulting from turbulent eddies for frequencies of up to about 500 Hz. Therefore, the next tutorial (Tutorial 13.2) will analyse the same case as a transient problem and with a finer mesh, enabling frequencies of up to about 1,000 Hz to be captured. Quit pro-STAR by selecting: File > Quit > Quit, Nosave

Version 4.08

13-9

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

This tutorial aims to demonstrate: The application of a Detached Eddy Simulation (DES) turbulence model How to monitor cell behaviour using an .ecd le The solution mapping (SMAP) process The specication of boundary conditions based on mapped solution data How to check a transient analysis for stability How to create animations using the animation utility and a neutral plot le

Such techniques are typically used in external aerodynamics problems where analyses involving refined meshes around individual components (for example, wing mirrors, spoilers, wiper blades, high-lift devices and landing gear) are performed with boundary conditions mapped from a coarser global simulation. As a demonstration of these techniques, this tutorial models the same two-dimensional flow around a cylinder as Tutorial 13.1, but this time as a transient simulation. Examination of the time-dependent pressure profile at specified locations will allow for assessment of the acoustic and structural excitation via the frequency and amplitude of the unsteady pressure fluctuations. To reduce the computational cost, the solution domain extent is reduced to cover only the important flow regions in the vicinity of the cylinder and wake, and the mesh within is refined. The analysis restarts from the steady state solution of the previous tutorial which is mapped onto the new mesh. The conditions on the inlet and pressure boundaries are also mapped from the steady state result using user subroutines. Besides the above changes to domain, mesh and boundary conditions, the only other change in the problem specification is the use of the Detached Eddy Simulation (DES) option based on the low-Reynolds number k- model employed in Tutorial 13.1. This means that the results can include large eddy structures that would not appear if a RANS model was used. Due to the hybrid nature of DES, using such a model rather than full LES also benefits from not having to resolve the boundary layer fully. Given a cylinder radius of 0.15 m, a bulk flow velocity of ~5 m/s and the knowledge that, for flow around a cylinder, vortex shedding at Reynolds number 50,000 occurs at a Strouhal number fd St = ----u of ~0.2, it is possible to estimate the vortex shedding frequency as f = 6.67Hz To produce a well-resolved waveform for these oscillations, the time step should be at least one tenth of the inverse of the frequency, i.e., 1.5 x 10-2 seconds. Stability considerations based on the Courant number require the time step to be much smaller than this, so a value of 5 x 10-5 seconds is chosen. This should enable oscillations with frequencies of up to 2,000 Hz to be resolved faithfully.

Version 4.08

13-11

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

Pre-Processing Preliminaries

Pre-Processing Preliminaries Create a directory for the tutorial named tut13-2 and copy the model and results files created in Tutorial 13.1 (aac.mdl, 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

To give the case a new title: In the main pro-STAR window, select File > Model Title... In the Title box type ANALYSIS OF AEROACOUSTIC EFFECTS IN TRANSIENT FLOW Click Apply and Close

Read in the refined mesh and the problem data: Analysis Features In the main pro-STAR window, select File > Read Input Coded File... In the Read Input Coded File dialog, select the File name cyl_ref.inp Click OK

The next step is to change the analysis type to transient: Open the Analysis Features panel Change the Time Domain option to Transient Click Yes in the dialog that appears, warning that aeroacoustic modelling cannot be performed in a transient analysis. This refers to the calculation of the Lilley source term, which is a steady state feature. Click Apply

Material Properties

Switch on the DES variant of the current turbulence model: Select the Thermophysical Models and Properties folder Select the Liquids and Gases sub-folder and open the Turbulence Models panel Check the DES box Click Apply

The monitoring and pressure reference cells must be redefined, as those used in the steady-state analysis no longer exist:
13-12

Open the Monitoring and Reference Data (Fluids) panel Change the Monitoring Cell Number to 9419 Change the Pressure Cell Number to 6232. This cell is at one end of the
Version 4.08

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

Pre-Processing Boundary Conditions

Boundary Conditions

pressure boundary. Click Apply

The mapping of the inlet and pressure boundary conditions is performed via user subroutines. These must be activated as follows: In the main window, choose File > System Command... Type ules in the text box, click Apply and then Close In the pro-STAR Model Guide, select the Dene Boundaries folder Open the Dene Boundary Regions panel Select region 1, the inlet, from the boundary regions list Select User from the User Option menu Click User Dene 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 Dene to write the default version of subroutine BCDEFP in sub-directory ufile, ready for editing later Click Apply

Analysis Controls

Specify what transient data will be written to the .ccmt file and how often: 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: CSET NEWSET CLIST 9419 Store the location in a .set file: In the main pro-STAR window, click Store/Recall > Store In the Store Information dialog, enter pmon as the Set Name Click Write and then Close

Specify which data are to be stored in the .ecd file:


Version 4.08 13-13

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

Pre-Processing Run Time Controls

Run Time Controls

In the Analysis Controls folder, open the Monitor Cell Behavior panel Select On for the Monitoring option Check that the le 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

Specify the time step size and the length of the run: 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 Mapping

The solution mapping process involves the following stages: 1. 2. 3. 4. 5. 6. 7. Save the new mesh geometry created above in its corresponding .ccmp le Save the new model le Resume the original model le and load the corresponding solution le Perform the solution mapping (SMAP) operation Resume the new model le View and check the restart solution data Set up the run to start from the mapped solution

Write the new geometry and model files and load the model and results files from Tutorial 13.1: In the main pro-STAR window, select File > 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 le to load the results from Tutorial 13.1

To perform the solution mapping: In the main pro-STAR window, select Utility > Solution Mapping... In the Solution Mapping dialog, specify the options shown below:

13-14

Version 4.08

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

Pre-Processing Solution Mapping

Click Apply. The solution mapping operation may take a few minutes, depending upon the speed of your computer. Once it is complete, click Close

The new model file can now be resumed and the mapped results displayed: 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 le 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 (lled) and None Click Plot to Screen to display Figure T13.2-1

Version 4.08

13-15

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

User Subroutines Final Operations

Figure T13.2-1

Velocity magnitude prole 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

This completes the solution mapping process. Final Operations The geometry file has already been written but it is also necessary to write the problem file: Select File > Save Problem... In the Save Problem File dialog, click Save

User Subroutines The boundary mapping process requires two user subroutines, one for the inlet boundary and one for the pressure boundary. These are supplied in files bcdefi.f and bcdefp.f which should be copied into the ufile directory, replacing the default subroutines. Alternatively, you may edit the default subroutines so that they match those shown below.
13-16 Version 4.08

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

User Subroutines Inlet Boundary

Inlet Boundary

The user subroutine mapping the inlet boundary data is BCDEFI, given below:

C************************************************************************* SUBROUTINE BCDEFI(SCALAR,U,V,W,TE,ED,T,DEN,TURINT) C Maps inlet boundary conditions from cell data C************************************************************************* C C STAR VERSION 4.08 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=199,1,-1 INQUIRE(UNIT=II,OPENED=LOG1) IF(.NOT.LOG1) THEN IUNIT=II GOTO 1103 ENDIF CONTINUE CONTINUE 13-17

1101 1103

Version 4.08

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

User Subroutines Inlet Boundary

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)STOPBCDEFI: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 ENDIF 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,POSITION=APPEND) c 10 CONTINUE c READ(iunit,*,END=11) TMP c GO TO 10 c 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) 13-18 Version 4.08

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

User Subroutines Pressure boundary

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 boundary

The user subroutine mapping the pressure boundary data is BCDEFP, given below:

C************************************************************************* SUBROUTINE BCDEFP(UB,VB,WB,PR,TE,ED,T,SCALAR,TURINT) C Maps pressure boundary conditions from cell data C************************************************************************* C C STAR VERSION 4.08 C C************************************************************************* INCLUDE comdb.inc COMMON/USR001/INTFLG(100) DIMENSION SCALAR(50) LOGICAL TURINT INCLUDE usrdat.inc DIMENSION SCALC(50) EQUIVALENCE( UDAT12(001), EQUIVALENCE( UDAT02(002), EQUIVALENCE( UDAT04(002), EQUIVALENCE( UDAT04(003), EQUIVALENCE( UDAT04(005), EQUIVALENCE( UDAT04(009), EQUIVALENCE( UDAT04(007), EQUIVALENCE( UDAT04(008), EQUIVALENCE( UDAT04(059), EQUIVALENCE( UDAT04(060), EQUIVALENCE( UDAT04(061), EQUIVALENCE( UDAT04(064), EQUIVALENCE( UDAT04(065), EQUIVALENCE( UDAT04(066), EQUIVALENCE( UDAT02(070), Version 4.08

ICTID ) DEN ) DENC ) EDC ) PRC ) SCALC(01) ) TC ) TEC ) UC ) VC ) WC ) UCL ) VCL ) WCL ) X ) 13-19

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

User Subroutines Pressure boundary

EQUIVALENCE( UDAT02(071), Y ) EQUIVALENCE( UDAT02(072), Z ) SAVE PSTOR, ITFLG, IFILEFLAG LOGICAL FILEEXIST PARAMETER (MAXPB = 209528) DIMENSION PSTOR(MAXPB), TESTOR(MAXPB), EDSTOR(MAXPB) LOGICAL LOG1 INTEGER II DO 1101 II=199,1,-1 INQUIRE(UNIT=II,OPENED=LOG1) IF(.NOT.LOG1) THEN IUNIT=II GOTO 1103 ENDIF CONTINUE CONTINUE 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 13-20 Version 4.08

1101 1103 c

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

CFD Analysis Pressure boundary

C Get pressure from cell value and store C PSTOR(IBP) = PRC TESTOR(IBP) = TEC EDSTOR(IBP) = EDC call freeunit(iunit) OPEN(iunit,FILE=pressure.inp,FORM=formatted, * STATUS=unknown,POSITION=APPEND) c 10 CONTINUE c READ(iunit,*,END=11) TMP c GO TO 10 c 11 CONTINUE WRITE(iunit,*) IBP, PRC, TEC, EDC CLOSE (iunit) ELSE IF (INTFLG(44).EQ.0) THEN INTFLG(44) = 1 WRITE (*,*) *** WARNING: Reading pressure boundary * // profile from file pressure.inp END IF OPEN (iunit,FILE=pressure.inp,FORM=formatted, * STATUS=unknown) 12 CONTINUE READ(iunit,*,END=13) IBPR,PRCR, TECR, EDCR IF (IBPR.NE.IBP) THEN GOTO 12 ELSE PSTOR(IBP) = PRCR TESTOR(IBP) = TECR EDSTOR(IBP) = EDCR END IF CLOSE (iunit) END IF END IF END IF PR = PSTOR(IBP) TE = TESTOR(IBP) ED = EDSTOR(IBP) T = 293.0 RETURN 13 CONTINUE WRITE (*,*) ***ERROR: Cannot find pressure boundary in file CALL STQUIT() END 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

Version 4.08

13-21

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

Post-Processing Preliminaries

To run the analysis sequentially, in double precision mode, type: star -dp However you choose to run the analysis, it will take at least a few hours to complete. In our experience, the run takes 9 hours on a dual-processor Pentium 4 Xeon 2.8Ghz running under Linux. Long run times are typical for DES cases as they require very fine meshes and a large number of time steps (in this case 30,000). Post-Processing Preliminaries Before post-processing the results, it is advisable to check the performance of the run by examining the information in the .info file: 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 le 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: Animated Plots 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 le aac_tr.ccmt from the Transient list Click Open Transient le

An animation of turbulence kinetic energy contours will now be created to help visualize the unsteady character of the flow. The animation may be defined by writing a sequence of plots to a neutral plot file, which are then played back via pro-STAR commands as follows: Under the File(s) tab of the Load Data panel, select the rst 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 x the legend scale for all animation frames
Version 4.08

13-22

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

Post-Processing Pressure Trace

Ensure that Contour is selected from the Plot Option menu and click Replot to display a contour plot of turbulence kinetic energy at time = 0.015 seconds

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 model. Pressure Trace The vortex shedding irregularity can also be seen in a plot of pressure at the monitoring point: Increase the maximum number of available graph register locations by typing MEMORY MXSTOR 1000000 at the command line Select the Post-Processing folder in the pro-STAR Model Guide Select the Graphs folder followed by the Extract Data folder Open the Engineering Data panel Change the File Type option to Cell Click Open File to display the contents of the .ecd le Select Set # 1 PMON from the set list Select PMAX in the Data to graph section. As there is only one cell in the set, PMAX = PMIN = PVAV = PMAV Click Add to List Click Create Graph Click Yes when asked if you wish to continue Select Draw Current Frame

The default graph setting does not show the profile clearly enough. To obtain a better view of this profile, resize the graph and adjust the axes:
Version 4.08

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

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

Post-Processing Pressure Trace

Change Ymin to -80 and Ymax to 20 Change the Title to Pressure - Pa Click Apply Click Redraw to display Figure T13.2-2

Figure T13.2-2

Pressure prole at the monitoring point

Figure T13.2-2 shows that the frequency of pressure fluctuations due to vortex shedding is regular even though the amplitude is not. By measuring the time between pressure peaks on the graph, the frequency of these oscillations is found to be around 6.2 Hz. This is fairly close to the value predicted in the introduction to this tutorial. It is also possible to calculate the sound pressure level (volume) of these fluctuations using the following equation: p 2 SPL = 10 log -------- p ref Using p = 45Pa (the approximate average amplitude of the pressure 5 oscillations) and P ref = 2 10 Pa (the lower limit of human perception), this gives a sound pressure level of 127 dB. The tutorial is now complete. Further analysis of the results may be performed using a specialised acoustics package. For example, es-acoustics may be used to perform a Fourier Transform on the pressure profile to derive a frequency profile for the aeroacoustic noise. To exit from pro-STAR:
13-24

Select File > Quit > Quit, Nosave


Version 4.08

Tutorial 14 LIQUID FILM SIMULATION


The following tutorials are intended to familiarise users with the process of setting up liquid film simulations. The three cases presented are: 1. Evolution of a rectangular, two-dimensional, and initially stationary liquid blob owing under gravity down a vertical wall, and comparison with the analytical solution 2. 3D lm formation and transport due to spray impingement 3. Film stripping and re-entrainment at a sharp edge

Version 4.08

14-1

Tutorial 14.1

2D FILM FLOW DOWN A VERTICAL WALL

Physical Problem Description

Tutorial 14.1

2D FILM FLOW DOWN A VERTICAL WALL

Physical Problem Description In this tutorial, we consider the evolution of a rectangular, two-dimensional and initially stationary blob of liquid flowing down a vertical wall under the action of gravity and forming a liquid film in the process, as shown in Figure T14.1-1. The calculation is compared with an analytical solution for film thickness as a function of position x and time t given in [1]: 12 x -------- = -------- 12 gf t where is the film viscosity, f the film density and g the value of gravity. The solution is independent of initial values, i.e., it is valid regardless of initial film profile, film thickness and wall area covered at the start of the calculation. y Initial blob
12

2m

Air

Wall

Gravity

Film
Figure T14.1-1 Schematic of vertical lm ow and CFD mesh

In the problem we assume that the initial 2D blob has a film thickness of 1 mm and covers a wall length of 250 mm. The case is run for a simulated time of 10 seconds, which is long enough for the similarity condition given by the above equation to be satisfied. Heat and mass transfer simulations are deactivated. The solution domain is 2 m long in the vertical direction and 50 cm wide in the wall-normal direction. A uniform mesh is used, as shown in Figure T14.1-1. [1] D.A. Acheson, Elementary Fluid Dynamics. Oxford University Press, 1992

14-2

Version 4.08

Tutorial 14.1

2D FILM FLOW DOWN A VERTICAL WALL

Pre-Processing Preliminaries

Pre-Processing Preliminaries Create a sub-directory for this tutorial called tut14-1 and copy file liquid_film.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: TRANSIENT 2D FLOW DOWN A VERTICAL WALL Mesh Import & Checking Click Apply and Close

The mesh used in this case is two-dimensional, extending 2 m in the x-direction of the global Cartesian coordinate system and 50 cm in the y-direction and has 120 and 20 cells in each direction, respectively. The thickness of the mesh is set to 5 cm but will have no effect on the result, given the two-dimensional nature of the simulation. To import and display the mesh: Select the Grids folder in the pro-STAR Model Guide Open the Import Grids panel Select the CCM option from the Format list. Enter liquid_film.ccmg as the Geometry File name Check that the State Name entry is set to default Click Apply In the main window, select C > All to put all cells into the current cell set Check that the Geometry plot option and Hidden Surface plot type are selected Click Cplot Click View > Isometric and select 1, 1, 1 to display the grid shown in Figure T14.1-2

Version 4.08

14-3

Tutorial 14.1

2D FILM FLOW DOWN A VERTICAL WALL

Pre-Processing Boundary Locations

Figure T14.1-2

2D hexahedral mesh

Boundary Locations

In addition to mesh data, file liquid_film.ccmg also contains information on boundary region locations. The latter can be displayed on the grid plot as follows: Select the Locate Boundaries folder in the pro-STAR Model Guide Open the Create Boundaries panel Select each entry in the boundary Regions scroll list in turn (except no. 0) and click Plot Region to display its location

Note that the wall boundary is split into two regions, of which no. 1 is that part of the wall where film is initially present, and no. 2 the part where film appears at a later time once the analysis begins. This subdivision is necessary purely for the purposes of specifying film initial conditions (see Initial and Boundary Conditions) Display the location of all the key boundaries in the problem: 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

14-4

Version 4.08

Tutorial 14.1

2D FILM FLOW DOWN A VERTICAL WALL

Pre-Processing Material Properties and Physical Models

Figure T14.1-3

Wall and pressure boundaries

Material The following properties are used for the two phases: Properties 1. The gas phase is ambient air with a density of 1.205 kg/m3 and viscosity of and Physical 1.81 10-5 Pas Models 2. The liquid phase is pure water with a density of 1000 kg/m3 and viscosity of 0.00089 Pas Define the direction of gravity and assign physical properties to the two phases: Select the Thermophysical Models and Properties folder Open the Gravity panel Change the Acceleration due to gravity to 9.81 m/s2 Change the 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:
Version 4.08

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

Tutorial 14.1

2D FILM FLOW DOWN A VERTICAL WALL

Pre-Processing Initial and Boundary Conditions

Define liquid film physical properties and model controls: Initial and Boundary Conditions Select the Liquid Films folder and then open the Film Controls panel Select On for the Gravity Force option Click Apply Ensure that both wall regions (nos. 1 and 2) are set up for liquid lm support by scrolling the Region # slider at the bottom of the panel Open the Film Physical Models and Properties panel On the Film Models tab, select On for the Liquid Film Activation option and then click Database to select In the droplet properties database list, select H2O_l [WATER (L)] and click Select WATER(L) is now displayed in the First Component Name box and thus denes the lm material to be used in this problem Check that Off is selected for the Evaporation and Condensation option and then click Apply On the Film Properties tab enter 1000 for Density and 0.00089 for Viscosity. The rest of the property values displayed are not used in this case Click Apply

Define the films initial conditions: Open the Film Initialization panel Ensure that the Region # slider is set to 1 (the region initially occupied by the lm) and enable the Initialize check box Enter 0.001 in the Thickness box (leaving all other initial conditions at their defaults) and click Apply Set the Region # slider to 2 (the rest of the wall region) and enable the Initialize check box Enter 0 in the Thickness box (leaving all other initial conditions at their defaults) and click Apply. This signies that initially there is no lm on this part of the wall

Define film boundary conditions for all wall regions. Before doing this, you may want to review all boundaries again, as done in section Boundary Locations, to remind yourself of the relevant region numbers and locations: 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 lm 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 lm boundary condition Click Apply

Analysis Controls

Specify various solver parameters and output controls required for this case: 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 ow in the x-y plane only Click Apply
Version 4.08

14-6

Tutorial 14.1

2D FILM FLOW DOWN A VERTICAL WALL

CFD Analysis Run Time Controls

Run Time Controls

Open the Analysis Output panel Under the Post tab, check that option Write Solution File is selected with an Output Frequency of 100 time steps Click Apply Select the Transient tab. Check that 0 is entered in the Starting at time box and enter 0.1 in the Output interval box. In view of the time step size chosen below, this will result in transient post data being saved every 10 time steps Enable the Wall option in the Data to Write section Locate Film Thickness in the variable scroll list and check that the Post option is enabled for this item Repeat this process for Film Velocity Click Apply

Run the analysis for a total of 10 seconds using two time periods. The first period covers 1 s and uses a time step of 0.001 s in order to ensure computational stability. The second period covers the remaining 9 s and uses a time step of 0.01 s. Select the Analysis Preparation folder Open the Run Time Controls panel Check that Run for is selected for the Run time control option, enter 10 in the Time box and click Apply In the Time Step Option section, check that 0 is entered for the Period start time and 0.001 for the Time step for period entry Click Set Now enter 1 for the Period start time and 0.01 for the Time step for period entry and click Set again

These settings will be listed in the scroll list. Final Operations You can run this simulation from the pro-STAR Model Guide. However, it is more common to run (lengthy) transient cases from the command line. Write the geometry and problem files and save the model file: In the main pro-STAR window, select File > 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 > Quit > Save & Quit

CFD Analysis Check that you are in the current working sub-directory (tut14-1) and run the CFD analysis in double precision by typing star -dp at the command line.

Version 4.08

14-7

Tutorial 14.1

2D FILM FLOW DOWN A VERTICAL WALL

Post-Processing Preliminaries

Post-Processing Preliminaries When the simulation is complete and whilst in the tut14-1 sub-directory: Start up pro-STAR by typing prostar at the command line Specify your preferred graphics driver (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

Open the file containing the transient post data (blob.ccmt): 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 le blob.ccmt from the Transient list and then click Open Transient le. All the stored transient time step data will now be displayed in the Time Step window

Basic Plots

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 step number 1900 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 Plot > Wplot Ensure the Display Boundaries option is off Turn mesh plotting Off by clicking the Display Mesh Lines button, Rotate the plot using the mouse controls so that it is displayed approximately as shown in Figure T14.1-4 (View 0, -1, 0.5, Angle -90)

14-8

Version 4.08

Tutorial 14.1

2D FILM FLOW DOWN A VERTICAL WALL

Post-Processing Animations

Figure T14.1-4

Film thickness contour at t=10 seconds

Animations

pro-STAR loops can be used to produce on-screen animations, as described in Tutorial 8.2 and Tutorial 12.3. However, in this tutorial we will use pro-STARs macro facility (see Chapter 18, Macros in the CCM User Guide) to produce an animation of the film thickness development. Before proceeding further, ensure that film thickness contours are displayed as shown above. Select Panels > Dene Macro... from the menu bar on the main pro-STAR window In the Dene Macro panel, enter anim as the macro Name Type the following commands in the Command window: store first *define noex store next getw lfthk bset news regi 1 bset add regi 2 vset news bset cset news name wall cset subs vset any wplot *end *loop 1 99

Version 4.08

14-9

Tutorial 14.1

2D FILM FLOW DOWN A VERTICAL WALL

Post-Processing Graphs

Click Save. The le anim.MAC will be saved to your local directory Select .anim in the Macro List and click Execute on the Dene 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-STARs graph facilities. Again, it is more convenient to save the relevant commands in a pro-STAR macro file: Select Panels > Dene Macro... Enter graph as the macro Name Type the following commands in the Command window: ! *** select the wall film cells bset news region 1 bset add region 2 vset news bset cset news name wall cset subs vset all ! *** reset the graph properties greset y ! *** load x value gload,1,wall,cset,0,0,1 gvalue,2,1,wall,x,2 ! *** load film thickness gvalue,4,1,wall,pst4,0 ! *** draw the graph frame,1,locate,1.70,2.10,9.65,9.45 frame,1,legend,none frame,1,xrange,0,2 frame,1,xtick,0,0,real,noindent,bottom frame,1,xtitle,5.25,1.3 Distance (m) frame,1,yrange,0,0 frame,1,ytick,2.5e-05,0,real,left frame,1,ytitle,0.28,7.58 Film thickness (m) frame,1,legend,none frame,1,xreg,init, 2, frame,1,yreg,init, 4, gdraw,1 ! *** save the data in a ASCII file named fthick.grf sdata,fthick.grf,2,2,2,coded close fthick.grf Click Save. The le graph.MAC will be saved to your local directory On the Dene Macro panel select .graph in the Macro List and click Execute to display the graph shown in Figure T14.1-5
Version 4.08

14-10

Tutorial 14.1

2D FILM FLOW DOWN A VERTICAL WALL

Suggestions for Further Exercises Graphs

Figure T14.1-5

Spatial distribution of lm thickness

The data saved in file fthick.grf may then be used for comparison against analytical solutions. Select File > Quit > Quit, Nosave

Suggestions for Further Exercises The agreement between model predictions and the analytical solution can be improved further if a smaller time step is used. The user may also wish to test the theory that the similarity solution for film thickness is independent of the initial film profile by setting up a film covering the full length of the wall at the start of the simulation.

Version 4.08

14-11

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

Problem Description Preliminaries

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

Problem Description In this tutorial, a diesel fuel spray (n-Dodecane, C12H26) is injected into the closed box shown in Figure T14.2-1 (dimensions 16 16 44 mm). The injection point is a nozzle with its axis perpendicular to the bottom of the box and located 24 mm above it. The nozzle diameter is 0.3 mm. The injection lasts for 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 105 s.

20 mm

24 mm

16 mm
Figure T14.2-1

16 mm

Problem geometry

Pre-Processing Preliminaries Create a sub-directory for this tutorial, say tut14-2. The mesh data for the problem, in the form of cell and vertex definitions, are supplied ready-to-use in files impinge.cel and impinge.vrt. Therefore, before starting the tutorial, make sure that the supplied files are copied into your current directory.
Version 4.08

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

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

Pre-Processing Mesh Creation

Click Continue In the main window, select File > Model Title... In the Title box type SPRAY WALL IMPINGEMENT AND LIQUID FILM

In the Subtitle Line 1 box type Impingement distance: 24 mm

Click Apply and Close

The pro-STAR Model Guide should be displayed on your screen, next to the main pro-STAR window. Mesh Creation 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

The computational mesh data are stored in files impinge.cel and impinge.vrt. These can be imported using pro-STARs GUI panels as follows: In the main window, select Tools > Cell... 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 le 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 le 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

Check the coordinate system used to create the mesh:


14-14

In the main window, click the button to open the Coordinate Systems dialog Select coordinate system no. 1 (Cartesian) Select Show Triad from the menu at the bottom of the dialog and click Apply
Version 4.08

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

Pre-Processing Mesh Creation

Change the plot type to Quick Hidden Line to display the mesh, as shown in Figure T14.2-2

Figure T14.2-2

3D Cartesian mesh

It can be seen that the origin is already at the desired location (the injector nozzle tip). What is now needed is to define a local cylindrical coordinate system with the same origin and with its z-axis along the injection direction: In the Coordinate Systems dialog, 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
Version 4.08

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

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

Pre-Processing Boundary Specication

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

Figure T14.2-3

3D Cartesian mesh with the injector location at 0, 0, 0, in local coordinate system number 10

Boundary We next define the bottom and side walls as distinct boundary regions. The bottom Specication wall is the only region that can support a liquid film. The side walls are defined as separate regions only in order to facilitate the film boundary specification.
14-16

Select the Locate Boundaries folder in the 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 Dene 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 Select region 2 in the Boundary Regions scroll list Select Wall for Type, enter Side_Wall+X in the Name box Click Dene In the main window, select View > Axis > +X
Version 4.08

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

Pre-Processing Material Properties and Physical Models

In the Create Boundaries panel, ensure region 2 and Create by Picking Surface based on Edges are selected and click Apply Click on any side-wall vertex displayed in the main window Select region 3 in the Boundary Regions scroll list Select Wall for Type, enter Side_Wall-X in the Name box Click Dene In the main window, select View > Axis > -X In the Create Boundaries panel, ensure region 3 and Create by Picking Surface based on Edges are selected and click Apply Click on any side-wall vertex displayed in the main window Select region 4 in the Boundary Regions scroll list Select Wall for Type, enter Side_Wall+Y in the Name box Click Dene In the main window, select View > Axis > +Y In the Create Boundaries panel, ensure region 4 and Create by Picking Surface based on Edges are selected and click Apply Click on any side-wall vertex displayed in the main window Select region 5 in the Boundary Regions scroll list Select Wall for Type, enter Side_Wall-Y in the Name box Click Dene In the main window, select View > Axis > -Y In the Create Boundaries panel, ensure region 5 and Create by Picking Surface based on Edges are selected and click Apply Click on any side-wall vertex displayed in the main window Select View > Isometric > 1,1,1 In the main window, select B > All Click to enable the Display Boundaries option and check the boundaries that have just been dened Click the Display Boundaries button again to turn off boundary plotting

The mesh set-up is now complete. Material Properties and Physical Models Although the problem in this case is essentially isothermal, the model set-up described below is for a non-isothermal case. This is done purely in order to prepare the model in advance for a more general simulation in which heat and mass transfer occur between the spray droplets, the liquid film, and their surrounding gas. Assign physical properties to the two gaseous components (air and fuel vapour) in the solution domain:
Version 4.08

Select the Thermophysical Models and Properties folder Open the Gravity panel Check that the Direction of Gravity Force is set to (0, 0, -1) in coordinate system number 1 and then click Apply Select the Liquids and Gases folder Open the Molecular Properties (Fluids) panel and check that the Material # selected at the top of the panel is set to 1 Select Ideal-f(T,P) as the Density option and then click Apply
14-17

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

Pre-Processing Droplet Properties

Activate the turbulence calculations by opening the Turbulence Models panel and selecting On for the Turbulence option Choose k-Epsilon/High Reynolds Number from the Model menu in the Turbulence tab and then click Apply Open the Thermal Models panel and select On for the Temperature Calculation option Check that option Thermal is selected in the Enthalpy menu Click Apply Open the Fluid Initialization panel and check the values in the Flow Conditions tab. All defaults are acceptable Open the Monitoring and Reference Data (Fluids) panel Enter 1.5e+06 in the Pressure box and then click Apply

Define scalar no. 1 to be the product of droplet evaporation and import its physical properties from pro-STARs built-in database: 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 Dene user scalar from the menu at the top of the panel The physical properties of dodecane vapour are read in from pro-STARs property database to the appropriate panel boxes. Check that the displayed values are reasonable and then click Apply

Droplet Properties

The maximum number of droplet parcels required for this case (10,000) is above the default maximum allowed by the code, so it is necessary at this point to resize pro-STAR by issuing the following commands from the I/O window: MEMORY MAXDRP 10000 MEMORY WRITE Check the basic control settings for droplets: Select folder Lagrangian Multi-Phase and open the Droplet Controls panel Check that option Coupled is selected in the Two-Phase Lagrangian Calculations menu and keep the default Courant number 0.35 Check that option Use Gradient is selected in the Interpolation Method menu Accept the default value of 0.35 for the Under-Relaxation of Lagrangian Sources term Type 10000 in the Maximum Number of Parcels box Check that Spray injection with atomization is selected for the Droplet Mode option Click Apply

Activate the turbulent dispersion model and define transport mechanisms and physical properties for the droplets:
14-18

Open the Droplet Physical Models panel


Version 4.08

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

Pre-Processing Boundary Conditions

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 Coefcient 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 Dene 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 Dene 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 Conditions
Version 4.08

Specify thermal boundary conditions for the spray impingement plane at the bottom of the box:
14-19

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

Pre-Processing Film Model Controls

Film Model Controls

Select the Dene Boundaries folder and then open the Dene 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

Now define the liquid film model 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 the films initial conditions: Open the Film Initialization panel Check that the Region # slider is set to 1 and enable the Initialize check box Enter 0 in the Thickness box (leaving all other initial conditions at their defaults) and click Apply. This signies that initially there is no lm on this wall

Define film boundary conditions for all wall regions. Before doing this, you may want to review all boundaries again, as done in the Boundary Specification section, to remind yourself of the relevant region numbers and locations: Open the Film Boundaries panel and check that the Condition # slider at the bottom of the panel is set to 1 Enter 1 (the wall region where a lm 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 lm 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 lm 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 Controls Specify various solver parameters and output controls required for this case: Select folder Analysis Controls and open the Solution Method panel Change the Under-Relaxation for Pressure Correction value to 0.5 Click Apply
Version 4.08

14-20

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

CFD Analysis Run Time Controls

Open the Primary Variables panel Go to the Differencing Schemes tab and select MARS for all Flow Variables, accepting the default value of the compression level for all equations Click Apply Open the Additional Scalars (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 Open the Analysis Output panel Select the Transient tab. Check that 0 is entered in the Starting at time box and enter 4e-5 in the Output interval box. These settings will ensure that post data will be saved every 2 time steps Select item C12H26 in the data scroll list and enable the Post option In the Data to Write section, deselect the Cell data option and then select Wall data Select items Film Thickness and Film Velocity in the data scroll list and check that the Post option is enabled for both Select items Film Temperature and Film Mass Fractions and enable the Post options for both Click Apply

Run Time Controls

Set the run time control parameters: Select the Analysis Preparation folder Open the Run Time Controls panel Check that Run for is selected for the Run time control option and then enter 0.002 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 2e-5 in the Time step for period box Click Set

Final Operations

If you wish to terminate the session at this stage, write the geometry and problem files and exit from pro-STAR, saving the model data as shown below: Select File > Save Geometry... Check that 1 is entered in the Geometry Scale Factor box Click Apply and then Close Select File > Save Problem... Click Save Select File > Quit > Save & Quit

CFD Analysis For flows involving sprays, it is recommended that STAR is run in double precision mode, by typing star -dp
Version 4.08 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 le impinge.ccmt from the Transient list and click Open Transient le. All stored transient time step data will now be displayed in the Time Step window

Plot the film thickness formed at the 20th time step: In the Time Step list, select the 10th entry and click the Store Time button Go to the Data tab. Select Wall for the Data Type and On for the Smooth option In the Scalar Data list, select item Film Thickness Click Get Data In the main window, select plot option Contour and plot type Hidden Surface Select View > Isometric > 1,1,-1 Deselect mesh plotting by clicking off the Display Mesh Lines button Select edge plotting by clicking on the Display Edges button

Add droplets to this plot: In the main window, select the droplet display option by choosing Plot > Cell Display > Droplets In the pro-STAR Model Guide, select the Particle Tracks folder Open the Plot Droplets panel Ensure that Current Post Data File is selected for the Load From option Click Load Data In the Droplet Plot Options section, select Off for the Edge Plot Options Select Diameter for the Droplet Size option and enter 0.5 and 0.001 in the Maximum Droplet Diameter and Droplet Reference Value boxes, respectively Select None for the Vectors option Click Apply In the main window, select D > All to collect all droplets in the domain into a set Click Plot > Wplot

14-22

Version 4.08

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

Post-Processing Animations

Figure T14.2-4

Droplet and liquid lm thickness contour plot

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-STARs macro facility (see Chapter 18, Macros in the CCM User Guide) to produce an animation of the film and droplet development. Select Panels > Dene Macro... from the menu bar on the main window In the Dene 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
Version 4.08 14-23

Click Save. The le anim.MAC will be saved to your local directory Ensure .anim is selected in the Macro List and click Execute on the Dene Macro panel Click Close on the Dene Macro panel

The above executes all commands within the loop 50 times to produce successive snapshots of the spray and liquid film state at every saved time step. Final Operations Click Close on the Dene Macro panel Select File > Quit > Quit,Nosave

Tutorial 14.3

LIQUID FILM STRIPPING AND RE-ENTRAINMENT

Introduction

Tutorial 14.3
Introduction

LIQUID FILM STRIPPING AND RE-ENTRAINMENT

This tutorial demonstrates the following liquid film modelling features: Liquid lm stripping and re-entrainment at a sharp edge Freezing the gas ow eld (velocity and pressure) obtained from a steady-state analysis and using it to drive the droplet and lm motion in a transient calculation where only the droplet and lm transport equations are solved. This technique has the signicant advantage of speeding up the transient run but is valid only for cases where the lm and droplet behaviour does not signicantly inuence the gas ow.

Physical Problem Description The tutorial simulates liquid film flow in a channel together with stripping and droplet re-entrainment at the edge of a slope. As shown in Figure T14.3-1, the solution domain comprises three sections: a straight inlet section, a sloping section and a straight outlet section. The gas flow field, which separates at the beginning of the slope, is obtained from a steady-state analysis using the k- turbulence model. This steady-state field is the agent that drives the liquid film and droplet motion in a transient simulation where only the droplet and film transport equations are solved. At the start of the transient calculation, a liquid film of uniform thickness is placed on the lower wall of the inlet section. As the film is transported downstream due to the gas shear forces, it accumulates at the top end of the slope. Once the film thickness reaches a critical value, stripping takes place and re-entrained droplets are formed and transported out of the solution domain through the pressure boundary. The edge stripping model is used to calculate the film stripping effect from the sharp edge at the beginning of the sloping section and the characteristics of the droplets formed subsequently. The relevant boundary conditions for this case are as follows: Inlet velocity: 30 m/s Pressure at the pressure boundary: 1 bar Initial lm thickness: 0.5 mm Initial lm velocity: 0.5 m/s Inlet (#3)

Wall (#6) Pressure (#2) Wall (#5)

Initial lm wall (#1)


Figure T14.3-1

Wall (#5)

Schematic of the problem geometry

Version 4.08

14-25

Tutorial 14.3

LIQUID FILM STRIPPING AND RE-ENTRAINMENT

Pre-Processing Preliminaries

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: Analysis Features 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

The transient film calculation option is selected in the Analysis Features folder of 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 Properties

Although no droplets are present at the start of the calculation, suitable settings must 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 MEMORY MAXDRP 10000 MEMORY WRITE Select the Lagrangian Multi-Phase folder Open the Droplet Controls panel Select Uncoupled for the Two-Phase Lagrangian Calculations Type 10000 in the Maximum Number of Parcels box Choose User Subroutine from the Droplet Mode menu, so that neither Spray injection with atomization nor Explicitly dened parcel injection will be selected, even though the DROICO user subroutine will not be used Accept the defaults for all other parameters and click Apply
Version 4.08

14-26

Tutorial 14.3

LIQUID FILM STRIPPING AND RE-ENTRAINMENT

Pre-Processing Film Model Controls

Film Model Controls

Open the Droplet Physical Models panel and select the Droplet Physical Models tab For Momentum Transfer, select option Standard and accept the default Mass Coefcient 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

Define the liquid film model controls and properties and activate the edge stripping 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 sections 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 signies that initially there is no lm on this wall.

As there are no walls adjacent to regions 1 (the initial film region) and 5 (the wall region where a lm may form at a later stage), no lm boundaries need to be dened.

Version 4.08

14-27

Tutorial 14.3

LIQUID FILM STRIPPING AND RE-ENTRAINMENT

Pre-Processing Analysis Controls

Analysis Controls

Deactivate the solution of all gas flow variables so as to freeze the gas flow field: Open the Analysis Controls folder Select the Primary Variables panel Under the Equation Status tab, deselect all ow 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 Controls

Here we set the time step size to 0.005 seconds and run for a total of 1 second. The 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 Operations

Write all files needed to run the STAR solver and then quit pro-STAR: 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

14-28

Version 4.08

Tutorial 14.3

LIQUID FILM STRIPPING AND RE-ENTRAINMENT

CFD Analysis Load the Transient Data File

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 Transient Data File Open the file containing the transient post data (strip_tr.ccmt): Start pro-STAR and accept the default Case Name strip_tr 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 le strip_tr.ccmt from the Transient list and then click Open Transient le. 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

Version 4.08

14-29

Tutorial 14.3

LIQUID FILM STRIPPING AND RE-ENTRAINMENT

Post-Processing Load the Transient Data File

Figure T14.3-2

Film thickness contour plot at t=1 second

Add the droplet display to this plot: In the main pro-STAR window menu bar, select the droplet display option by choosing Plot > Cell Display > Droplets In the pro-STAR Model Guide, select the Particle Tracks folder Open the Plot Droplets panel Check that Current Post Data File is selected for the Load From option Click Load Data In the Droplet Plot Options section, select Off for the Edge Plot Options Select Diameter for the Droplet Size option and enter 0.2 in the Maximum Droplet Diameter box Select None for the Vectors option Click Apply In the main window, select D > All to collect all droplets in the domain into a set Click Plot > Wplot to display Figure T14.3-3

14-30

Version 4.08

Tutorial 14.3

LIQUID FILM STRIPPING AND RE-ENTRAINMENT

Post-Processing Animation

Figure T14.3-3

Droplet and liquid lm thickness plot

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-STARs macro facility (see Chapter 18, Macros in the CCM User Guide) to produce an animation of the film and droplet development. Select Panels > Dene Macro... from the menu bar on the main window In the Dene 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 le anim.MAC will be saved to your local directory Select .anim in the Macro List and click Execute on the Dene Macro panel

The above executes all commands within the loop 50 times to produce successive
Version 4.08 14-31

Tutorial 14.3

LIQUID FILM STRIPPING AND RE-ENTRAINMENT

Post-Processing Advanced Post- Processing

snapshots of the droplets and liquid film state at every saved time step. Advanced PostProcessing A pro-STAR macro (combi.MAC) is used to produce a plot that shows the gas flow fields influence on the droplets formed due to film stripping at 200 time steps. 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 windows toolbar

Select .combi from the Macro List on the Dene Macro panel and click Execute to produce Figure T14.3-4

Figure T14.3-4

Film distribution, droplets and gas ow eld 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. Final Operations Click Close on the Dene Macro panel Finally, exit from pro-STAR by selecting File > Quit > Quit, Nosave from the main menu bar
Version 4.08

14-32

Tutorial 14.3

LIQUID FILM STRIPPING AND RE-ENTRAINMENT

Post-Processing Final Operations

Post-processing Macro (combi.MAC) resu,, memo maxdrp 300 ! *** general *** clrm,reverse $repl trload,strip_tr.ccmt,nomvgr,, , c store,itst,200 load,, term, , exte,rast hrsd image edge off plme,off view -0.690 0.350 0.633 center 0.762 0.176 0.257 angle 0 distance 1.5 repl layer all dele ! *** ribbons *** ! we will create the ribbons and then export them as shells and vertices ! which allows us to plot them as geometry elements, which makes the use ! of the layer option easier. ! seed particles from the inlet *set nofp 10 *get mxvl mxve *set mxvl mxvl + 1 *set mxvh mxvl + nofp - 1 vpcreate,,coordinates,line,nofp,1,-1,0.0001,0.05,-1 ,0.49,0.05 particle,group,1 particle,add,mxvl,mxvh,1,0,0,flow,1,0,0,0,2 ! seed particles in the recirculation zone *set nofr 4 *get mxvs mxve *set mxvs mxvs + 1 *set mxvb mxvs + nofr - 1 vpcreate,,coordinates,line,nofr,1,0.45,-0.07129,0.0 5,0.54,-0.2167,0.05 particle,group,1 particle,add,mxvs,mxvb,1,0,0,flow,1,0,0,0,2 !create the particle tracks ptrack,steady,strip_tr.trk,0.0,,,noadj, getv all !determines the min and max ctypes for the shells
Version 4.08 14-33

Tutorial 14.3

LIQUID FILM STRIPPING AND RE-ENTRAINMENT

Post-Processing Final Operations

that will be reimported *get mxcl mxct *set mxcl mxcl + 1 *set mxch mxcl + nofp + nofr - 1 !plot the ribbons ptoption,contour,no ptplot,clear ptplot,plot,,ribbons,0,1.0e30,,-1,,part,1,999999,0. 02,novr,1.0,1 !export the ribbons as shells and vertices cset news type mxcl mxch cwri,ribbons.cel,,cset vset news cset vwrit ribbons.vrt,,vset clos ribbons.cel clos ribbons.vrt !clear the particle tracks and wall cells ptplot clear clrw !read the ribbons shells back into the model crea ribbons.cel vread ribbons.vrt cset news type mxcl mxch popt geom cplo layer ribb store layer ribb hide ! *** geometry *** !get some wall data to create shells on the model *get mxcl mxct getw LFTHK cset none popt geom cset, news, name, wall cset add name symmetry bset news symp cdis,on,bregion $replot view, -1, 0, 0 $replot bset dele gran,,,,,-0.1,0.01 view -0.690 0.350 0.633 center 0.762 0.176 0.257 angle 0 distance 1.5 repl bset add inlet bset add pressure bset add regi 1 vset, news, bset
14-34 Version 4.08

Tutorial 14.3

LIQUID FILM STRIPPING AND RE-ENTRAINMENT

Post-Processing Final Operations

cset, dele, vset, face cdis,off,bregion cplo clrt, gray ctab,mxcl + 1,shell,34,0,1,0,0,0,0,off,0 ctab,mxcl + 2,shell,34,0,1,0,0,0,0,off,0 lswi smooth noedge repl layer geom store layer geom hide ! *** droplet *** cdis on droplet dopt,edge,off dopt,peri,1 dopt,radi,diameter,0.04 $dopt,radm,0 dopt,fill,color,0 dopt,vect,none,1 dopt,vecm,0 cset none popt cont csca auto getd post dset all dplot layer drop store layer drop hide ! *** film *** cset none cscale 14 user 1.0e-4 4.5e-4 getw,LFTHK popt cont bset news region 1 vset news bset cset news name wall cset subs vset all caver cset wplo layer film stor layer film hide clrt default ! *** layer layer layer layer repl
Version 4.08

figure 14.3-4 *** geom show ribb show drop show film show
14-35

Physical Problem Description

Tutorial 15 COAL COMBUSTION


Physical Problem Description The following tutorials describe in detail how to set up, run and post-process a simple CFD problem involving coal combustion. The problem geometry represents a furnace with three concentric air inlets, a primary (inner), a secondary (middle) and a tertiary (outer) one, located at one end. The primary inlet also acts as a pulverised coal carrier. Air enters the solution domain through the tertiary inlet and has a swirling velocity component. Flow exits the domain through an outlet situated at the opposite end of the furnace. A hexahedral mesh is used to model the problem, as shown in Figure T15.0-1. The mesh was previously generated and stored as a .ccmg format file, and this is provided with the STAR-CD installation.

Primary Inlet

Outlet

Furnace Wall Secondary Inlet Tertiary Inlet


Figure T15.0-1 Coal combustion furnace mesh geometry

Modelling Strategy The following modelling strategy was adopted: Perform an initial run in non-reacting and isothermal mode (Tutorial 15.1) Run the model using the Constant Rate Devolatilisation and Eddy Break-Up gaseous combustion models (Tutorial 15.2) Run the model using the Two-Competing-Steps Devolatilisation and Eddy Break-Up gaseous combustion models (Tutorial 15.3)

Using this type of modelling strategy to achieve a solution in three stages is the
Version 4.08 15-1

Modelling Strategy

recommended method for all coal combustion cases. However, for some problems, it may be possible to reach a good solution by missing out the first or second stages, or even, for very simple problems, both.

15-2

Version 4.08

Tutorial 15.1

ISOTHERMAL, NON-REACTING FLOW

Pre-Processing Preliminaries

Tutorial 15.1

ISOTHERMAL, NON-REACTING FLOW

For most coal combustion simulations it is advisable to run the case initially as an isothermal problem. This will allows a stable flow field to be obtained before the coal combustion models are introduced. This tutorial gives a detailed account of how to set up the isothermal, non-reacting coal case for the furnace shown in Figure T15.0-1. Pre-Processing Preliminaries Create a working directory for the tutorial named tut15-1. For this problem, the mesh geometry data are supplied in file furnace.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 COAL COMBUSTION - ISOTHERMAL ANALYSIS Click Apply and Close

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 le Format Change the Geometry File name to furnace.ccmg Click Apply

The following information should appear in the I/O window:

Verify that the mesh has been imported correctly by selecting all cells and boundaries and plotting the mesh in Hidden Surface mode:
Version 4.08

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

Tutorial 15.1

ISOTHERMAL, NON-REACTING FLOW

Pre-Processing Model Specication

Change the viewpoint to approximately (-1.0, 0.5, -1.0) using the orientation cubes slider controls Remove the wall boundaries from the display by selecting B > Unselect > Wall and clicking Replot Zoom in on the red inlet boundaries to create a plot resembling Figure T15.1-1

Note the positions of the three concentric inlet boundaries.

Figure T15.1-1

Furnace inlet boundaries

Model Set up the basic models used in the isothermal case: Specication Open the Analysis Features panel in the pro-STAR Model Guide Under Time Domain, check that Steady State is selected. This is essential because coal combustion simulations are not feasible in transient mode Click Apply Material Assignment and Thermal Options All fluid cells should already be assigned to material number 1 by default. Check this via the Cell Editor:
15-4

In the main pro-STAR window, click to display the Cell Editor 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
Version 4.08

Tutorial 15.1

ISOTHERMAL, NON-REACTING FLOW

Pre-Processing Boundary Conditions

Boundary Conditions

The default material is air, which is suitable for this case. The ow is compressible and without pressure dependency so select Ideal-f(T) for the Density option Select Polynomial for the Specic Heat option and click on Dene Polynomial In the Polynomial Function Denition 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

The model consists of inlet, outlet and wall boundary regions. The velocity, thermal and turbulence boundary conditions need to be specified for these: Select the Dene Boundaries folder, then open the Dene 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 2 - Inlet. This is the secondary 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.01 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 3 - Inlet. This is the tertiary air inlet To specify a swirling ow at this inlet, the velocity components need to be entered in the global cylindrical coordinate system. Enter 2 in the Coordinate System box Enter an axial velocity component of 20 m/s in the W box and a tangential velocity component of 10 m/s in the V box Select TI/Length for the Turbulence Switch option
15-5


Version 4.08

Tutorial 15.1

ISOTHERMAL, NON-REACTING FLOW

Pre-Processing Analysis Controls

Enter a Turb. Intensity of 0.1 and a Length of 0.01 m Enter a value of 0.616 kg/m3 in the Density box Enter a value of 573 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 Controls The solution and output controls need to specified next: Run Time 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

The aim of this tutorial is to establish a stable, non-reacting flow field which will help to achieve a stable flame and flow field once coal combustion is turned on. Therefore, the solver must perform a sufficiently large number of iterations to reach a converged isothermal flow field. This can be achieved by setting the maximum iteration number to 1000 and the residual error tolerance to 0.001: 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 Operations

The pre-processing task is now complete. If you wish to terminate the session at this stage, save all model data, write the geometry and problem files and exit from pro-STAR, as shown below. Alternatively, you may continue with the CFD analysis using the 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

15-6

Version 4.08

Tutorial 15.1

ISOTHERMAL, NON-REACTING FLOW

CFD Analysis Preliminaries

CFD Analysis To perform the analysis interactively, proceed as follows: Select File > Save Model In the Analysis Preparation 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: PostProcessing Select folder Post-Processing Open the Load Data panel and display the File(s) tab Click Open Post le

Begin by displaying a temperature contour plot to show the mixing of the two inlet 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

Version 4.08

15-7

Tutorial 15.1

ISOTHERMAL, NON-REACTING FLOW

Post-Processing Post- Processing

Figure T15.1-2

Temperature contours through the centre of the furnace

Next, plot velocity vectors on the surface of the furnace to show the swirling nature of the flow: Return to the Data tab of the Load Data panel 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 VIEW -1.0 0.5 -1.0 at the pro-STAR command line in the I/O window Click Replot to display Figure T15.1-3

15-8

Version 4.08

Tutorial 15.1

ISOTHERMAL, NON-REACTING FLOW

Post-Processing Final Operations

Figure T15.1-3

Velocity vectors shown on the furnace surface

Final Operations

Exit from pro-STAR by choosing File > Quit > Quit, Nosave from the main window menu.

Version 4.08

15-9

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Pre-Processing Preliminaries

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

This tutorial gives a detailed account of how to set up and run a coal combustion model. The problem geometry and flow conditions are as described at the beginning of Tutorial 15 and the analysis is run from the non-reacting solution produced in Tutorial 15.1. When running a large-scale simulation, it is generally necessary to employ the constant rate devolatilisation model to establish the combustion conditions and a stable flame and flow field. Therefore, the strategy in this case is to use the following sub-models: Constant rate devolatilisation First-order char oxidisation Eddy break-up two-step gas combustion

The model can then be changed to the Single-Step or 2-Competing-Steps devolatilisation model (as described in Tutorial 15.3) and the analysis continued from the Constant Rate solution. Pre-Processing Preliminaries Before running pro-STAR, create a directory for the tutorial named tut15-2 and copy the model and solution files obtained in Tutorial 15.1 (coal_iso.mdl, 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 COAL COMBUSTION WITH CONSTANT RATE DEVOLATILISATION Click Apply and Close

As part of setting up a coal combustion case, it is necessary to activate the Lagrangian Two-Phase and Coal Combustion models. To do this: Open the Analysis Features panel in the pro-STAR Model Guide Select Lagrangian for the Multi-Phase Treatment option Select Coal Combustion for the Reacting Flow option Click Apply and then click Yes to proceed. The folders named Lagrangian Multi-Phase and Thermophysical Models and Properties > Reacting Flow will be activated in the pro-STAR Model Guide tree. Select C > All and then click Cplot Click the Zoom Off button to display the mesh,

Version 4.08

15-11

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Pre-Processing Thermal Options

Thermal Options

An important element in an accurate coal combustion simulation is radiation modelling. The radiation model in this tutorial includes the effects of the intervening gas, using default gaseous radiation properties, of particle radiation, and of surface-to-surface radiation. In STAR-CD, radiation beams are only tracked through those cells that are explicitly defined as participating in radiative heat transfer. To specify that radiation should be tracked through all cells in the furnace interior: Click in the main pro-STAR window to open the Cell Editor Select row 1 in the scroll list Select On from the Radiation menu Click Apply Close the Cell Editor

Turn radiation on, choosing the Discrete Transfer solution method in conjunction with the internal view factor and participating media calculation options: Radiation Patches Select the Thermophysical Models and Properties folder and open the Thermal Options panel In the Radiation section of the panel, select option Discrete Transfer Internal VF Calc 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

To use the Discrete Transfer model, it is necessary to subdivide all boundary regions into radiation patches. These are used both during view factor calculations and for evaluating the radiative heat transfer. Assign a unique patch to every boundary in every relevant region. This can be done most conveniently by means of a pro-STAR command loop, shown below, typed into pro-STARs I/O window: BSET NONE *SET NREG 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.

15-12

Version 4.08

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Pre-Processing Other Settings

Figure T15.2-1

Radiation patches on mesh surface

The entire surface of the mesh is coloured, indicating that radiation patches are present everywhere. There is also one radiation patch on each boundary face. Select Plot > Cell Display > Boundary Patches again to deselect the patch cell plot display option

Other Settings

It is good practice to define one of the cells near the expected centre of the flame as the monitoring point. This eases the task of checking for the onset of combustion as temperature and product concentrations build up rapidly at that point once combustion begins. Start by inspecting the cell numbers in the region of interest: 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 dene 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,

Coal The next stage is to define the coal composition: Combustion Open the Thermophysical Models and Properties > Reacting Flow > Coal Model Set-up Combustion > Coal Composition panel
Version 4.08 15-13

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Pre-Processing Coal Combustion Model Set-up

Under the Proximate tab, enter data for the coals proximate analysis. Enter 34.5% Volatile Matter, 1.4% Moisture, 52.8% Fixed Carbon and 11.3% Ash Click Apply Select the Ultimate tab to enter data for the coals ultimate analysis Enter 84.6% C, 5.06% H, 7.6% O and 1.67% N Click Apply Select the 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 denition) Enter a Net Caloric Value of 3.444 E+7 J/kg Check that the Fraction of Total N in Volatiles value is set to 1 Click Apply

The combustion models are specified next: Open the Sub Models panel Check that the Constant Rate Scheme is selected under the Volatiles tab Enter a Devolatilisation Time of 0.01 seconds and a Devolatilisation Temperature of 353 K. A low temperature is specied to ensure that combustion is initiated successfully. For most cases, the temperature should be increased to a more realistic value once a stable ow eld is reached. This is not done in this run but is done for the Two-Competing-Steps case presented in Tutorial 15.3 Click Apply Under the Char tab, check that the 1st Order Effect Scheme is selected Leave all options at their default settings and click Apply Under the Gas Combustion tab, select the Eddy Break-Up Scheme and the 2-step Combustion Mechanism Click Apply. A warning message will appear telling you that pro-STAR will delete any existing scalars and reaction mechanisms and will create new ones. Click Yes

The NOx and particle radiation model options and coal particle solution controls are specified next: Open the NOx/Radiation panel Ensure that Off is selected for the NOx Model option. If required, the NOx solver can be turned on once the analysis is near convergence and the analysis restarted. This is not done in this run but is done for the Two-Competing-Steps case presented in Tutorial 15.3 Select On for the Particle Radiation option in the Radiation section and enter a Particle Emissivity of 0.8 Click Apply Open the Control/Printout panel Enter a value of 0.1 in the Under-Relaxation Factor for Particle box Enter a very large value, e.g. 10000, in the Iteration Number to Begin Averaging box. This ensures that particle averaging does not occur in the calculation. Particle averaging is no longer recommended for use with Lagrangian multi-phase calculations in STAR-CD Click Apply
Version 4.08

15-14

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Pre-Processing Particle Properties and Injection Location

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 dened. There is no need to change any of the molecular properties for these scalars

Specify that the initial ow eld consists entirely of air: Open the Additional Scalars > Scalar Initialization panel Select scalar number 5 - O2 from the list and enter 0.233 in the Initial Mass Fraction box Click Apply Select scalar number 8 - N2 from the list and enter 0.767 in the Initial Mass Fraction box Click Apply

Particle The following steps define the particle properties and the injection rate and location: Properties Select folder Lagrangian Multi-Phase and Injection Open panel Droplet Controls Location Check that Use Gradient is selected for the Interpolation Method and that Explicitly dened 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:
Version 4.08

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

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Pre-Processing Particle Properties and Injection Location

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 Denition 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 Open the Injection Points panel Select Set Type Circle Select Specify for the Circle option Check that the Cylindrical Coordinate System value is 2 and the Injection Direction Coordinate System is 1 Dene a circle of Radius 0.02 at Z = -0.19 For the number of points, type 1 for R (number of rows) and 8 for Theta. This will produce a circle of 8 injection points with a radius of 0.02 near to the primary inlet Check that Constant is selected for the Entrance Direction Vector and type 1 in the DZ box (DX=0, DY=0, DZ=1) Check that Add New Set is selected from the Action menu at the top of the panel and click Apply

To display the particle injection locations: Select the Post-Processing > Particle Tracks > Plot Droplets panel Select Droplet Initial Conditions for the Load From option Click Load Data Change the Maximum Droplet Diameter to 0.1 in the Droplet Plot Options section Click Apply In the main window, choose D > All on the Display Sets toolbar In the Plot Droplets panel, click Droplet Plot Zoom in on the injection points to display Figure T15.2-2

15-16

Version 4.08

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Pre-Processing Boundary Conditions

Figure T15.2-2

Particle injection positions

Boundary Conditions

Many of the boundary conditions for inlet, outlet and wall boundaries have already been set in Tutorial 15.1. However, thermal and radiation boundary conditions still need to be specified: In the pro-STAR Model Guide, select folder Dene Boundaries and open the Dene 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 Select region 2 - Inlet from the list Enter 353 K in the T Radiation box Enter a value of 1 in the Emissivity box Click Apply Select region 3 - Inlet from the list Enter 573 K in the T Radiation box Enter a value of 1 in the Emissivity box Click Apply Select region 4 - Outlet Enter 1000 K in the T Radiation box Enter a value of 1 in the Emissivity box Click Apply
15-17

Version 4.08

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Pre-Processing Scalar Boundaries

Scalar Boundaries

Select region 5 - Wall Change the Wall Heat option to Fixed and enter a value of 400 K in the Temperature box Enter a value of 0.3663 m2K/W for Resistance Set the Emissivity to 0.72 and the Reectivity to 0.28 Click Apply Select region 6 - Wall Change the Wall Heat option to Fixed and enter a value of 400 K in the Temperature box Enter a value of 0.02 m2K/W for Resistance Set the Emissivity to 0.72 and the Reectivity to 0.28 Click Apply

Specify that only air enters through the inlet 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 Parameters

Default values for analysis controls such as under-relaxation factors and differencing schemes are set when the models are selected. Although these defaults are suitable for this tutorial, the under-relaxation factors for other cases may need 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
Version 4.08


15-18

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

CFD Analysis Run Time Controls

Run Time Controls

Check the status of the run time control parameters and specify that the analysis should restart from the solution obtained in Tutorial 15.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 Operations

The pre-processing task is now complete. If you wish to terminate the session at this stage, write the geometry and problem files and exit, saving all model data in file coal_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:.
Version 4.08

In the main window, select C > New > Fluid Click Cplot In the pro-STAR Model Guide, select folder Post-Processing
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 le

First, check the solution obtained by inspecting the velocity plot: Go to the Data tab and check that Data Type Cell is selected In the Vector Data list, select item Velocity Components UVW In the Scalar Data list, ensure that the setting is None Click Get Data Open the Create Plots panel On the 3-D Surface tab check that Vector is selected from the Option menu and choose Edge from the Edge/Mesh menu Click Plot to Screen Type: VIEW -1.0 0.5 -1.0 in the pro-STAR I/O window Click the Zoom Off button, , to display Figure T15.2-3

Figure T15.2-3

Velocity vectors inside the furnace

Next, plot the absolute temperatures on a section through the centre of the furnace and normal to the Y axis:
15-20

Go to the Data tab of the Load Data panel and check that Data Type Cell is selected Choose On and All for the Smooth option In the Scalar Data list, select item Temperature
Version 4.08

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Post-Processing Preliminaries

Click Get Data Go to the Create Plots panel and choose Contour (lled) from the Option menu in the 3-D Surface tab Click Plot to Screen Select View > Axis > -Z in the main pro-STAR window Select Sect. Slice, then use the cursor to draw a section trace through the centre of the furnace and parallel to the X axis Select plot type Section (Surface) Select View > SNormal View to display Figure T15.2-4

Figure T15.2-4

Temperature contours on a section bisecting the grid

Next, plot the CO2 mass fraction contours on the same section through the centre of the furnace: 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

Version 4.08

15-21

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Post-Processing Preliminaries

Figure T15.2-5

CO2 contours on a section bisecting the grid

Plot the steady-state coal particle distribution, specifying that the displayed particle colour and radius is to depend on temperature and calculated diameter, respectively. Also choose not to display particle velocity vectors: Type VIEW -1.0 0.5 -1.0
15-22

in the pro-STAR I/O window In the pro-STAR Model Guide, select the Particle Tracks sub-folder of the Post-Processing folder Open the Plot Droplets panel Select option Track File from the Load From menu Check that le coal_const.trk is shown in the File Name box Accept the default option (Particles) for the Plot Option menu and then click Load Data In the Droplet Plot Options section, select After, Unhidden and Cplot from the Edge Plot Options menus Select Diameter in the Droplet Size menu and enter 0.2 in the Maximum Droplet Diameter box Select Temperature in the Fill Color menu Select None in the Vectors menu Click Apply In the main pro-STAR window, select D > All on the Display Sets toolbar Click Droplet Plot at the bottom of the Plot Droplets panel to display Figure T15.2-6
Version 4.08

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Post-Processing Preliminaries

Figure T15.2-6

Coal particles coloured by temperature

Now make the droplet colour dependent on droplet mass and replot: In the Droplet Plot Options section, select Mass from the Fill Color menu Click Apply Click Replot to display Figure T15.2-7

Version 4.08

15-23

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Post-Processing Final Operations

Figure T15.2-7

Coal particles coloured by mass

Figure T15.2-6 and Figure T15.2-7 show that the coal particles have essentially burnt out well before reaching the furnace outlet. This burn-out accounts for all the char and volatiles in the fuel. By default, STAR stops coal particle tracking once more than 99.9% of char has been burnt out. By setting Constant 116 to 1 you can continue tracking the remaining (ash) particles through the rest of the solution domain but at the expense of additional computation time. Remember that all results presented in this tutorial were generated with the devolatilisation temperature set at the unrealistically low value of 353 K. In Tutorial 15.3, the devolatilisation temperature is raised to 550 K and the Two-Competing-Steps devolatilisation model is used instead of the Constant Rate model. NOx modelling is also turned on and the analysis is restarted from the solution obtained in this tutorial. Final Operations Exit from pro-STAR by choosing File > Quit > Quit, Nosave from the main window menu

15-24

Version 4.08

Tutorial 15.3

TWO-COMPETING-STEPS DEVOLATILISATION

Pre-Processing Preliminaries

Tutorial 15.3

TWO-COMPETING-STEPS DEVOLATILISATION

This tutorial gives a detailed account on how to set up and run a coal combustion model using the Two-Competing-Steps devolatilisation model. It should also be instructive to users wishing to employ the Single-Step devolatilisation model as the required set-up is very similar. The Two-Competing-Steps model is based on a pair of competing first-order reactions occurring uniformly throughout the particle. The rates of these reactions are calculated as described in Chapter 10, Two-competing-steps model of the Methodology volume. The modelling strategy in this tutorial is to use the following sub-models: Two-competing-steps devolatilisation First-order char oxidisation Eddy break-up two-step gas combustion

NOx modelling is also activated. The analysis restarts from the Constant Rate devolatilisation case set up in Tutorial 15.2, the problem geometry for which is shown in Tutorial 15. As a result, this tutorial only requires a brief specification of the options for the Two-Competing-Steps devolatilisation and NOx generation models. Pre-Processing Preliminaries Before running pro-STAR, create a directory for the tutorial named tut15-3 and copy the model and solution file obtained in Tutorial 15.2 (coal_const.mdl and coal_const.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 COMBUSTION WITH THE TWO-COMPETING-STEPS DEVOLATILISATION MODEL Coal Combustion Model Setup Click Apply and Close

The next stage is to change the devolatilisation model to the Two-Competing-Steps model: Open the Thermophysical Models and Properties > Reacting Flow > Coal Combustion > Sub Models panel In the Volatiles tab, select the 2 Competing Scheme

In the 1-Step section:


Version 4.08

Enter a value of 2e+05 in the Pre-exponential Factor box Enter a value of 1.047e+08 in the Activation Energy box
15-25

Tutorial 15.3

TWO-COMPETING-STEPS DEVOLATILISATION

Pre-Processing Analysis Controls

Set the Mass Stoichiometric Coefcient to 0.3

In the 2-Step section: Enter a value of 1.3e+07 in the Pre-exponential Factor box Enter a value of 1.67e+08 in the Activation Energy box Set the Mass Stoichiometric Coefcient to 0.7

To complete the model specification: Enter a value of 550 K in the Devolatilisation Temperature box Click Apply

Now activate NOx modelling: Open the Thermophysical Models and Properties > Reacting Flow > Chemical Reactions > Emission panel Turn On the NOx Model. Note that this has the same effect as turning on NOx modelling in the Coal Combustion > NOx/Radiation panel Turn On the Prompt NOx and Fuel NOx options Ensure that the Thermal NOx Model is On and change the Tuchin setting to 10. This is the number of integration steps used to generate the beta function PDF and so increasing it will lead to a more accurate solution Click Apply

Analysis Controls

To aid convergence, the under-relaxation factor for the energy equation will be 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: Run-time Controls 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

Check the status of the run-time control parameters and specify that the analysis 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

15-26

Version 4.08

Tutorial 15.3

TWO-COMPETING-STEPS DEVOLATILISATION

CFD Analysis Final Operations

Final Operations

The pre-processing task is now complete. If you wish to terminate the session at this stage, write the geometry and problem files and exit, saving all model data in file coal_2step.mdl, as shown below. Alternatively, you may run STAR interactively, as described in the next section. 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 le

First, plot the absolute temperatures on a section through the centre of the furnace and normal to the Y axis:
Version 4.08

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

Tutorial 15.3

TWO-COMPETING-STEPS DEVOLATILISATION

Post-Processing Preliminaries

In the Scalar Data list, select item Temperature Click Get Data Go to the Create Plots panel and choose Contour (lled) from the Option menu in the 3-D Surface tab Click Plot to Screen Select View > Axis > -Z in the main pro-STAR window Click the Zoom Off button to display the whole mesh, Select Sect. Slice, then use the cursor to draw a section trace through the centre of the furnace and parallel to the X axis Select plot type Section (Surface) Select View > SNormal View to display Figure T15.3-1

Figure T15.3-1

Temperature contours on a section bisecting the grid

Next, plot the O2 mass fraction contours on the same section through the centre of the furnace: 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

15-28

Version 4.08

Tutorial 15.3

TWO-COMPETING-STEPS DEVOLATILISATION

Post-Processing Preliminaries

Figure T15.3-2

O2 contours on a section bisecting the grid

Next, plot the NO mass fraction contours on the same section through the centre of the furnace: 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

Version 4.08

15-29

Tutorial 15.3

TWO-COMPETING-STEPS DEVOLATILISATION

Post-Processing Preliminaries

Figure T15.3-3

NO contours on a section bisecting the grid

Plot the steady-state coal particle distribution, specifying that the displayed particle colour and radius is to depend on temperature and calculated diameter, respectively. Also choose not to display particle velocity vectors: Type MEMO,MAXDRP,2400 MEMO,WRITE VIEW -1.0 0.5 -1.0
15-30

in the pro-STAR I/O window In the pro-STAR Model Guide, select folder Post-Processing followed by sub-folder Particle Tracks Open the Plot Droplets panel Select option Track File from the Load From menu Check that le coal_2step.trk is shown in the File Name box Accept the default option (Particles) for the Plot Option menu and then click Load Data In the Droplet Plot Options section, select After, Unhidden and Cplot from the Edge Plot Options menus Select Diameter in the Droplet Size menu and enter 0.2 in the Maximum Droplet Diameter box Select Temperature in the Fill Color menu Select None in the Vectors menu Click Apply In the main pro-STAR window, select D > All from the Display Sets toolbar
Version 4.08

Tutorial 15.3

TWO-COMPETING-STEPS DEVOLATILISATION

Post-Processing Preliminaries

Click Droplet Plot at the bottom of the Plot Droplets panel to display Figure T15.3-4

Figure T15.3-4

Coal particles coloured by temperature

Note that there are significant differences between the results shown above and those in Tutorial 15.2. These changes are partly due to the change in devolatilisation model and the introduction of NOx modelling. However, the greatest change is due to increasing the devolatilisation temperature to a more realistic value. The last plot created in this tutorial combines a contour plot of CO2 concentration with a plot showing the coal particles using the OVERLAY utility. Return to the Data tab of the Load Data panel and select item CO2 from the Scalar Data list Click Get Data Go to the Create Plots panel Under the Section/Clipped tab, select the Contour (lled) and Edge options Change the Normal vector to (1, 0, 0) Click Apply Click Cplot to display the CO2 contours Type VIEW -1.0 0.3 -0.7 in the pro-STAR I/O window Turn on edge plotting by selecting the Display Edges button, Use the mouse to zoom out slightly so that the edges of the problem geometry t in the display window
15-31

Version 4.08

Tutorial 15.3

TWO-COMPETING-STEPS DEVOLATILISATION

Post-Processing Final Operations

Return to the Plot Droplets panel Turn Off the Edge Plot Options In the Droplet Plot Options section, change the Maximum Droplet Diameter to 0.05 Change the Fill Color option to Color and choose Color 1 Click Apply In the main pro-STAR window, select Plot > Display > Overlay Click Droplet Plot in the Plot Droplets panel to display Figure T15.3-5

Figure T15.3-5

Coal particles displayed over CO2 contours

Final Operations

Finally, exit from pro-STAR by choosing File > Quit > Quit, Nosave from the main window.

15-32

Version 4.08

Physical Problem Description

Tutorial 16 LARGE EDDY SIMULATION OF FULLY-DEVELOPED CHANNEL FLOW


Physical Problem Description This tutorial presents an example of applying the Large Eddy Simulation turbulence model to a fully-developed, isothermal, incompressible channel flow. A 2-D cross section through the problem geometry is shown in Figure T16.0-1, illustrating the primary direction of flow. The dimensions for the channel are taken from the work of Moser et al. [1] and correspond to a length, width and height of 2 m, m and 2 m, respectively.

Channel Walls

y 2 x
Figure T16.0-1 2-D cross section through the channel

The problem geometry represents a section of the channel and therefore cyclic boundary conditions are applied in both the streamwise (x-) and spanwise (z-) directions. Calculations are carried out at standard pressure and temperature (1 bar, 293K) for a Reynolds number (Re) of 395. The latter is based on the friction velocity, u , and half-channel height and is given by u Re = ------- where u = w ----

and w is the wall shear stress. The fluid is assumed to have constant physical properties, as shown below: Density Molecular viscosity 1.0 kgm-3 1.0/Re Pa-s

These numbers have been chosen so as to give a value of u = 1.0 ms-1. The flow in the channel is driven by an imposed pressure gradient whose value
Version 4.08 16-1

Modelling Strategy

is determined by balancing the pressure force in the streamwise direction with the shear force at the top and bottom walls of the channel, yielding pH = 2 w L The wall shear stress is obtained from the friction velocity definition and has a value of 1.0 Nm-1. This is then combined with the channel height and length to give a pressure drop along the channel of 2 Pa. Modelling Strategy The major elements of the modelling strategy are: Computational grid non-uniform hexahedral mesh comprising 90,000 cells (see Figure T16.0-2). Cells in the y-direction are rened 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 ow options

The tutorial is divided into two parts. The first, a steady-state Reynolds Averaged Navier-Stokes (RANS) simulation, is used to verify the mesh suitability for capturing the large-eddy turbulence structures as measured by the integral length scale, l = f(k/). The second part illustrates the recommended numerical settings for LES, including pre- and post-processing, and includes comparison of results with those obtained from a direct numerical simulation (DNS) [2].

Figure T16.0-2

The computational mesh.

16-2

Version 4.08

Tutorial 16.1

STEADY-STATE ANALYSIS

Pre-processing Preliminaries

Tutorial 16.1

STEADY-STATE ANALYSIS

To obtain accurate results using LES it is essential that: The computational mesh is sufciently rened in key areas to resolve the mean ow and large-eddy turbulence structures present The time step for the analysis is small enough to capture the cascade of energy over a wide spectrum, down towards the dissipative scales

These assessments can be made by examining the integral length and time scales for the problem. This tutorial shows how to obtain these quantities from a steady-state analysis using a Low Reynolds number k- turbulence model. The mesh provided in this case is much coarser in the streamwise direction than the full 90,000 cell mesh used in Tutorial 16.2, having only 9,000 cells. This is a reasonable simplification as the steady-state result should have no streamwise velocity gradient. The LES case will, of course, exhibit such a gradient and hence mesh refinement in the streamwise direction is also necessary. Pre-processing Preliminaries For convenience, the problem set-up for this tutorial is performed by executing a command macro, given in full in a separate section (Macro). The macro is supplied in a file called RANS.MAC which contains instructions for mesh set-up, boundary conditions, fluid properties and solution control settings. Create a directory for this tutorial named tut16-1 and ensure that the above macro file has been copied into it. Start pro-STAR, enter the tutorial name and make the appropriate choices for an initial run: Problem set-up Type prostar at the command line Specify the graphics driver (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

Execute the command macro and save the model file: Open the macro panel by selecting Panels > Dene Macro... in the main pro-STAR window Highlight RANS in the Macro List in the Dene Macro panel and click Execute Click Close in the Dene 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:
Version 4.08 16-3

Tutorial 16.1

STEADY-STATE ANALYSIS

Post-Processing Problem set-up

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 le 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
16-4

Monitor history plot of the U-component of velocity


Version 4.08

Tutorial 16.1

STEADY-STATE ANALYSIS

Post-Processing Problem set-up

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: C k k l = ---------------------- , t = - Read in the analysis results le 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 oper oper oper oper getc getc v**s smul divi te 5 ed 6 1.5 5 5 0.1643 5 5 5 6 4
0.75 1.5

Since we are trying to establish whether or not the mesh resolution in the wall-normal direction (y-axis) is adequate for LES, it is useful to display the ratio l/y (y being the cell height) for which a value greater than 1 should be observed. Since all cells in the grid have the same x and z, we can calculate y from the cell volume by V y = ----------------x z which, for this mesh, means y = 7.6V Therefore, the ratio l/y is found by entering the following commands: oper getc volu 5 oper smul 7.6 5 5 oper divi 4 5 4 Now display the data as a contour plot:
Version 4.08

In the pro-STAR Model Guide, select the Post-Processing folder and open the Create Plots panel Under the 3-D Surface tab, select Contour (lled) from the Option dropdown menu and Edge from the Edge/Mesh drop-down menu Click Plot To Screen Select View > Axis > +Z in the main pro-STAR window to display Figure T16.1-2
16-5

Tutorial 16.1

STEADY-STATE ANALYSIS

Post-Processing Problem set-up

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.

Figure T16.1-2

Contour plot showing the ratio l/y

It is also useful to check whether the cells adjacent to the wall are fine enough to satisfy the criterion that y+ should be ~1. To nd 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
16-6 Version 4.08

Tutorial 16.1

STEADY-STATE ANALYSIS

Post-Processing Problem set-up

The resulting plot is shown in Figure T16.1-3.

Figure T16.1-3

Contour plot of the integral time scale t

Figure T16.1-3 shows that the integral time scale, t, decreases from 1.21 s in the centre of the channel to 1.28x10-3 s near the wall. It is also possible to determine time scales associated with the turbulent eddies. Based on the cell sizes in the y- and z-directions, and fluctuating velocities determined from the turbulent kinetic energy predicted by the RANS analysis, time scales of 6.36x10-3 s (y-direction) and 0.0438 s (z-direction) are obtained. The chosen time step for an LES run should thus be sufficiently small to capture the turbulence structures in the vicinity of the wall i.e., < 1.28x10-3 s, whilst satisfying the numerical schemes stability criterion. To obtain a time step that satisfies the latter, the Courant number (Co) definition is rearranged to yield: Co x t = ------------U The quantities U and x denote characteristic velocity and length scale, respectively. For LES it is recommended that the value of Co should not exceed 0.3. Using the channel dimensions and streamwise velocity shown in Table 1, a time step value of 3.2x10-3 s is obtained.

Version 4.08

16-7

Tutorial 16.1

STEADY-STATE ANALYSIS

Macro Problem set-up

Table 1: Parameters used to obtain time step for numerical stability Parameter Value Channel length (m) 2 Number of cells in streamwise direction 30a x (m) 0.20944 -1 U (ms ) 19.61
a.This number relates to the refined mesh used for the LES case

A time step of 1x10-3 s is used in the LES tutorial (Tutorial 16.2), satisfying both criteria mentioned above. Having completed the calculations for mesh suitability and choice of time step, exit pro-STAR as follows: Macro
!=============================================== ! Macro 16.1-1: Setting up the RANS analysis !=============================================== ! User-defined parameters: ! H - half-height of channel ! RETAU - Friction Reynolds number (Utau*H/nu) ! YPLS - Target y+ in near-wall cell ! COUR - Target Courant number ! NCX - Number of cells in streamwise direction ! NCY - Number of cells in normal direction ! NCZ - Number of cells in spanwise direction !=============================================== *set H 1.0 *set RETAU 395.0 *set YPLS 1.0 *set COUR 1.0 *set NCX 3.0 *set NCY 60.0 *set NCZ 50.0 !=============================================== ! Generate Mesh *set PI 3.141592654 *set LX 2.0 * H * PI *set LY 2.0 * H *set LZ H * PI ! Generate a uniform mesh vc3d 0.0 LX NCX -0.5 * LY 0.5 * LY NCY -0.5 * LZ 0.5 * LZ NCZ ! Define the ! directions *set NVX NCX *set NVY NCY *set NVZ NCZ number of vertices in each of the coordinate + 1 + 1 + 1

Select File > Quit > Quit, Nosave

! Iterate for the expansion factor. Based on a geometric ! progression with the initial cell height estimated from a balance 16-8 Version 4.08

Tutorial 16.1

STEADY-STATE ANALYSIS

Macro Problem set-up

! between the definition of y+ and the Reynolds number based on the ! wall shear velocity. Perform an iterative calculation to ! determine the expansion factor. *set Q RETAU / 2.0 / YPLS *set G 2.0 / NCY *set R 1.01 *def noex *set F R - 1.0 * Q + 1 *set R F ** G *end *loo 1 100 !============================================================ ! Locate boundaries. cset news flui plty ehid cplo view -1 0 0 bzon 1 all rdef 1 cycl$ $ $ $ $ view 1 0 0 bzon 2 all rdef 2 cycl$ $ $ $ $ view 0 0 -1 bzon 3 all rdef 3 cycl$ $ $ $ $ view 0 0 1 bzon 4 all rdef 4 cycl$ $ $ $ $ cyma 1 2 LX 0.0 0.0 cyma 3 4 0.0 0.0 LZ ! Make mesh non-uniform to achieve desired y+. vfil 1 NVY NVY - 2 2 1 NVX * NVZ NVY -1.0 * R !============================================================ ! Define common control parameters time steady nodefa iter 3000,1e-10 moni 8911 algo simple nodefa,,, solu scalar CG !============================================================ ! Define properties and models pmat 1 flui dens cons 1.0 lvis cons 1.0 / RETAU turb ke 1 stan lowre on coke,0.09,1.44,1.92,1.44,-0.33,0.419,1,1.219,0.9 nwall hybrid twol off init stan 21 0.0 0.0 1 0.0 0.0,keps,0.4,0.01 !============================================================ Version 4.08 16-9

Tutorial 16.1

STEADY-STATE ANALYSIS

Macro Problem set-up

! Define boundaries at either end in the streamwise direction as ! cyclic with a prescribed pressure drop across them. ! Define boundaries at either end in the spanwise direction as ! regular cyclic. rdef 0 wall stan nosl stan 9.0 0.0 0.0 0.0 1 0.0 rdef 1 cycl stan 1 part regu inte pdro LX / H / H / H rdef 2 cycl stan 1 part regu inte pdro -1.0 * LX / H / H / H rdef 3 cycl stan 1 all regu inte rdef 4 cycl stan 1 all regu inte !============================================================ ! Additional control parameters solve,y,y,y,y,y,y,n,y,n,n,n,n, relax,0.7,0.3,0.7, ,1, , , , , , , , , sweep,100,100,100,1000,100,100, , , , , , , , , , , , resid,0.1,0.1,0.1,0.05,0.1,0.1, , , , , , , , , , , , dsch,ud,uvw,,stan prch ,,, conv ! Write geometry file, problem file and save geom,, prob,, save,,

16-10

Version 4.08

Tutorial 16.2

LARGE EDDY SIMULATION

Pre-Processing Preliminaries

Tutorial 16.2

LARGE EDDY SIMULATION

This tutorial illustrates the steps required to set up and perform a Large Eddy Simulation for channel flow. The focus will be on the specifics related to LES and thus the model set-up of Tutorial 16.1 will be used as the starting point. Pre-Processing Preliminaries The following files are required for this tutorial: REFINE.MAC DATA_AVERAGING.MAC MEAN_U.MAC REY_STRESS.MAC chan395.means chan395.reystress channel_demo.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: Mesh renement 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

To refine the mesh in the streamwise direction to make it suitable for the LES calculation: Select Panels > Dene Macro... from the main menu in pro-STAR Highlight REFINE in the Dene 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.
Version 4.08

Select folder Thermophysical Models and Properties


16-11

Tutorial 16.2

LARGE EDDY SIMULATION

Pre-Processing Flow initialisation

Select sub-folder Liquids and Gases Open panel Turbulence Models Select the LES/Smagorinsky Model from the menu on the Turbulence tab Check that option Provide Statistically Averaged Values is enabled and then type 25000 in the Time Step box Set the model constants to match those shown below Click Apply

Flow initialisation

In order to reduce the run time, the simulation can start from a flow field that will encourage the development of turbulence. The appropriate initial conditions may be specified through user subroutine INITFI as follows: 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 Dene Click Apply Use pro-STARs built-in text editor or an external editor to change the contents of the default initfi.f file (written by pro-STAR into the ufile sub-directory) to match the subroutine listing given in section User Subroutine

The effect of the user-defined initial flow field is to introduce vorticity into the domain. This is achieved by defining a region in the centre of the channel in which all three velocity components are set explicitly. In particular, the wall-normal component is set to a value greater than the streamwise component to encourage the development of turbulence. Solution controls To obtain the best results from an LES model, the use of second-order schemes is recommended for both the temporal and spatial discretization. When using the SIMPLE solution algorithm, the residual tolerance for the outer iterations and the maximum number of outer iterations for each time step need to be set so that convergence is achieved at every time step. This can be judged by examining the residual and monitor information output during the run.
16-12

Select the Analysis Controls folder Open the Solution Method panel Change the Solution Algorithm to SIMPLE
Version 4.08

Tutorial 16.2

LARGE EDDY SIMULATION

Pre-Processing Final operations

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 sufcient 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-STARs I/O window: CSET NEWSET CLIST 89105 Final operations In the main pro-STAR window, click Store/Recall > Store In the Store Information dialog, enter monitor for the Set Name Click Write and then Close Go to the pro-STAR Model Guide and open the Monitor Cell Behavior panel Select On for the Monitoring option Ensure the Set File name is channel_les.set Select monitor from the Monitoring Information scroll list Enable the Velocity Data option Click Apply

At this point, the basic problem definition is complete. The next step is to set the transient controls for the run. Set the calculation run time to 50 seconds with a time step of 0.001 seconds, as determined in Tutorial 16.1 on the basis of the integral time scale and Courant number. 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
16-13

Version 4.08

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

Write and save the geometry and problem files: 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

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 16-14 Version 4.08

Tutorial 16.2

LARGE EDDY SIMULATION

CFD Analysis Convergence and averaging

Uprime=32.45 Vprime=-52.36 Wprime=5.532 mythree=3.0 myfour=4.0 c.... Initialise channel flow u=Ubulk v=0.0 w=0.0 if (x.ge.Mythree.and.x.le.Myfour.and. * y.ge.Myzero.and.y.le.Myppfive.and. * z.ge.Mypfive.and.z.le.Myppfive) then u=Uprime v=Vprime w=Wprime endif RETURN END

CFD Analysis To run the analysis in parallel, on two local CPUs and in double precision, type: star -dp 2 To run the analysis sequentially in double precision, type: star -dp No matter how you choose to run the analysis, it will take at least a few days to complete. Such long run times are typical for LES cases as they require refined meshes and a large number of time steps (in this case 50,000). If you choose not to run the analysis, the results are supplied in file channel_demo.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
Version 4.08 16-15

Tutorial 16.2

LARGE EDDY SIMULATION

Post-Processing Preliminaries

data. In fact, with the benefit hindsight, it would have been reasonable for such averaging to begin after only 10,000 time steps, which is roughly equivalent to 33 passes. This is much greater than the recommended number of passes before averaging, given in the LES models section of the On-line Help. This is because the use of periodic boundary conditions delays the establishment of a fully developed flow.

Figure T16.2-1

Monitoring-point velocity components throughout the simulation

Preliminaries The first post-processing task is to load file channel_les.ccmp, containing the analysis results: Inst. results Start up pro-STAR and resume from the channel_les.mdl model le In the pro-STAR Model Guide, select the Post-Processing folder Open the Load Data panel Click Open Post le

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(lled) from the Option menu and Edge from the Edge/Mesh menu
Version 4.08

16-16

Tutorial 16.2

LARGE EDDY SIMULATION

Post-Processing Inst. results

Select C > All in the main window Click Plot to Screen in the Create Plots panel In the main window, select View > Isometric > 1,1,1 to display Figure T16.2-2

Figure T16.2-2

Contour plot of the instantaneous streamwise velocity

The snapshot shows the flow field non-uniformity generated by the presence of eddies, with a predicted peak velocity of 24 m/s. The eddy structure can be viewed in more detail by creating a plot of the secondary flow field. To do this, create a vector plot of the V and W velocity components: 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

Version 4.08

16-17

Tutorial 16.2

LARGE EDDY SIMULATION

Post-Processing Averaged results

Figure T16.2-3

Vector plot of the instantaneous secondary ow eld

Averaged results

Having looked at the structure of the instantaneous flow field, attention is turned to the time averaged data. Figure T16.2-4 shows a contour plot of the mean streamwise velocity component. The plot is similar to that obtained from a simulation using a RANS turbulence model, indicating that the averaging window is sufficiently large for the data to be statistically meaningful.

16-18

Version 4.08

Tutorial 16.2

LARGE EDDY SIMULATION

Post-Processing Averaged results

Figure T16.2-4

Contour plot of the average streamwise velocity

Profiles of the mean and fluctuating components are now generated and compared to the DNS data of Moser et al. [2]. The plots are produced using the ready-made macros supplied with the tutorial files of your STAR-CD installation and listed in the Macros section. It should be noted here that LES post-processing is casedependent and that the macros provided are specifically for channel flow. Prior to generating any graphs, the time-averaged LES data must also be spatially-averaged. To do this: Select Panels > Dene Macro... from the main menu in pro-STAR Highlight DATA_AVERAGING in the Dene Macro panel Click Execute

Next, create a plot of the normalised time-averaged mean velocity: Highlight MEAN_U and click Execute. Figure T16.2-5 shows the resulting plot of U+ against ln(y+).

Due to the problem symmetry about y = H, only half of the profile is shown. It can be observed that whilst the qualitative behaviour is reproduced by the LES model, the velocity at the centre of the channel is over-predicted by about 10% when compared to the DNS data.

Version 4.08

16-19

Tutorial 16.2

LARGE EDDY SIMULATION

Post-Processing Averaged results

Figure T16.2-5

Graph of mean streamwise velocity component

Reynolds stress proles are produced by selecting REY_STRESS in the macro panel and clicking Execute

To view these plots: Select Graph > Gdraw and then the appropriate frame number from the main pro-STAR window. For instance, selecting Graph > Gdraw > Frame1 will produce a plot of uu, non-dimensionalised with the friction velocity, against ln(y+), as shown in Figure T16.2-6.

Figures T16.2-6, T16.2-7 and T16.2-8 show profiles of uu, vv and ww, respectively, non-dimensionalised by the friction velocity u = 1. These profiles represent the turbulence intensity and show good qualitative agreement with the DNS data. In addition, they highlight the anisotropic nature of the flow. It can be observed that the LES model over-predicts the streamwise fluctuations (Figure T16.2-6) whilst under-predicting the cross-stream fluctuations (Figures T16.2-7 and T16.2-8). Under-prediction of vv and ww is common in LES calculations where a large part of the turbulence spectrum lies in the subgrid scales. Closer agreement with the DNS results can only be obtained through further mesh refinement.

16-20

Version 4.08

Tutorial 16.2

LARGE EDDY SIMULATION

Post-Processing Averaged results

Figure T16.2-6

Graph of streamwise uctuating component uu

Figure T16.2-7

Graph of cross-stream uctuating component vv

Version 4.08

16-21

Tutorial 16.2

LARGE EDDY SIMULATION

Post-Processing Averaged results

Figure T16.2-8

Graph of cross-stream uctuating component ww

The uv Reynolds stress profile is shown in Figure T16.2-9. It can be observed that the uv component is well predicted by the LES model, both qualitatively and quantitatively.

Figure T16.2-9
16-22

Graph of Reynolds stress uv


Version 4.08

Tutorial 16.2

LARGE EDDY SIMULATION

Bibliography Final operations

Components uw and vw are up to two or three orders of magnitude smaller and are therefore less important. These are not shown here but may be viewed by displaying the contents of graph frames 5 and 6. Final operations As there were no changes to the model geometry or solution parameters, there is no need to save file 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 renement in the Xdirection
! ============================================== ! Macro 16.2-1 Refining mesh in X direction ! ============================================== curs file CREF,10,1,1,ALL *set NCX NCX * 10 BSET ALL BDEL BSET cyde all cset all 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 16-23

Version 4.08

Tutorial 16.2

LARGE EDDY SIMULATION

Macros Spatial averaging of LES data

pdrop,-6.28319,293 cymatch,1,2,6.28319,0,0,0.0001 rdef,3,cyclic 1,all,regular,integral rdef,4,cyclic 1,all,regular,integral cymatch,3,4,0,0,-3.14159,0.0001 bset none moni,9001 pres,1.e+05,9001

Spatial averaging of LES data

! ====================================== ! Macro 16.2-2 - Spatially averaging LES data ! ====================================== ! The script produces 12 files: ! U.dat - Mean U against y/H ! V.dat - Mean V against y/H ! W.dat - Mean W against y/H ! VMAG.dat - Mean VMAG against y/H ! P.dat - Mean P against y/H ! VIST.dat - Mean VIST against y/H ! uu.dat - Mean uu against y/H ! vv.dat - Mean vv against y/H ! ww.dat - Mean ww against y/H ! uv.dat - Mean uv against y/H ! uw.dat - Mean uw against y/H ! vw.dat - Mean vw against y/H ! ======================================= ! Clear old .dat files syst rm -f U.dat 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

16-24

Version 4.08

Tutorial 16.2

LARGE EDDY SIMULATION

Macros Spatial averaging of LES data

:lab ! Setting the current cell set to a layer in the geometry cset add cran CC1 + 9001 CC1 + 9010 1 *if CC1 ge 88800 + IC *goto done *endif *set CC1 CC1 + 600 *goto lab :done ! Total *get R1 *get R2 *get R3 *get R4 *get R5 *get R6 each rtot rtot rtot rtot rtot rtot variable in the cell set and store in registers 1-6 1 2 3 4 5 6 total NCX / NCX / NCX / NCX / NCX / NCX / by the number of cells in the layer NCZ NCZ NCZ NCZ NCZ NCZ with the new values for register 1 etc. 1 1 2 2 3 3 4 4 5 5 6 6

! Divide the *set R1 R1 / *set R2 R2 / *set R3 R3 / *set R4 R4 / *set R5 R5 / *set R6 R6 /

! Replace register 1 chan cset ,,, 0.0 R1 chan cset ,,, 0.0 R2 chan cset ,,, 0.0 R3 chan cset ,,, 0.0 R4 chan cset ,,, 0.0 R5 chan cset ,,, 0.0 R6 *end *loo 1 NCY

! Make current cell set equal to 1 Y-column of cells cset none *set CC2 9001 10 *defi noex cset add clis CC2 *end *loo 0 NCY - 1 ! loads current cell set numbers into graph register 1 gloa 1 cell cset ! Loads the y values of cells corresponding to graph register 1 ! into graph register 2 gval 2 1 cell y 1 ! Operate on register 2 to make the data y/H rope add 2 2 ,, 1.0 / H ! Operate on y and add 1.0 to the value (shift to match DNS ! position) Version 4.08 16-25

Tutorial 16.2

LARGE EDDY SIMULATION

Macros Spatial averaging of LES data

roper,add,2,2,0,1,1,, ! Load values from post register 1 (mean U) into graph register 3 gval 3 1 cell pst1 ! Operate on u velocity to make it positive !roper,add,3,3,3,1,0,absolute, gval gval gval gval gval sdat sdat sdat sdat sdat sdat clos clos clos clos clos clos 4 5 6 7 8 1 1 1 1 1 cell cell cell cell cell pst2 pst3 pst4 pst5 pst6

U.dat 2 2 1 V.dat 2 2 2 W.dat 2 2 3 VMAG.dat 2 2 4 P.dat 2 2 5 VIST.dat 2 2 6 U.dat V.dat W.dat VMAG.dat P.dat 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 oper oper oper oper oper oper getc getc getc getc getc getc SUP 1 SVP 2 SWP 3 UPVP 4 UPWP 5 VPWP 6

*set IC 0 10 *def noex cset none *set CC1 IC - 10 :lab cset add cran CC1 + 9001 CC1 + 9010 1 *if CC1 ge 88800 + IC 16-26 Version 4.08

Tutorial 16.2

LARGE EDDY SIMULATION

Macros Spatial averaging of LES data

*goto done *endif *set CC1 CC1 + 600 *goto lab :done *get *get *get *get *get *get *set *set *set *set *set *set chan chan chan chan chan chan *end *loo R1 rtot 1 R2 rtot 2 R3 rtot 3 R4 rtot 4 R5 rtot 5 R6 rtot 6 R1 R1 / NCX / NCZ R2 R2 / NCX / NCZ R3 R3 / NCX / NCZ R4 R4 / NCX / NCZ R5 R5 / NCX / NCZ R6 R6 / NCX / NCZ cset ,,, 0.0 R1 * cset ,,, 0.0 R2 * cset ,,, 0.0 R3 * cset ,,, 0.0 R4 4 cset ,,, 0.0 R5 5 cset ,,, 0.0 R6 6 1 NCY

R1 1 1 R2 2 2 R3 3 3 4 5 6

cset none *set CC2 1 9010 *defi noex cset add clis CC2 *end *loo 0 NCY - 1 gval gval gval gval gval gval sdat sdat sdat sdat sdat sdat clos clos clos clos clos clos 3 4 5 6 7 8 1 1 1 1 1 1 cell cell cell cell cell cell 2 2 2 2 2 2 pst1 pst2 pst3 pst4 pst5 pst6 2 2 2 2 2 2 1 2 3 4 5 6

uu.dat vv.dat ww.dat uv.dat uw.dat vw.dat uu.dat vv.dat ww.dat uv.dat uw.dat vw.dat

Version 4.08

16-27

Tutorial 16.2

LARGE EDDY SIMULATION

Macros Mean streamwise velocity prole

Mean streamwise velocity prole

! ============================================== ! Macro 16.2-3 Producing a mean streamwise velocity profile ! ============================================== greset y ! Load mean u velocity gdata,U.dat,2,1,1,coded,1 roper multi,1,1,,395,,, ! Transform y axis to log scale roper,add,1,1,0,1,0,loge, !Load DNS data gdata,chan395.means,8,3,1,coded,1 ! Transform y axis to log scale roper,add,4,4,0,1,0,loge, !Plot the mean velocity in frame 1 frame,1,xreg,init, 1,4 frame,1,yreg,init, 2,5 frame,1,legend,10.2,5.0 12.5 6.5 Mean U frame,1,xrange,0,6 grlabel,1,1,on,,,5.0,1.5 ln(y+) grlabel,1,2,on,,,0.5,6.0 U+ symt,2,2,8,1$lint,2,2,2,1$rtab,2,y,y$bart,2,2,90,1 symt,5,4,8,1$lint,5,4,2,1$rtab,5,y,n rlabel,2,on $LES rlabel,5,on $DNS ! Reverse background colour clrm,reve gdraw,1

Reynolds stress proles

! ============================================== ! Macro 16.2-4 Producing profiles of the Reynolds stresses ! ============================================== ! Reset graph parameters and set the number of registers at 40 greset y numr 40 ! Load fluctuating components for Cs = 0.01 gdata,uu.dat,2,1,1,coded,1 gdata,vv.dat,2,3,1,coded,1 gdata,ww.dat,2,5,1,coded,1 gdata,uv.dat,2,7,1,coded,1 gdata,uw.dat,2,9,1,coded,1 gdata,vw.dat,2,11,1,coded,1 !Load DNS RMS data gdata,chan395.reystress,8,15,1,coded,add ! GRAPH DATA frame 1 xreg init 1,15 frame 1 yreg init 2,17

16-28

Version 4.08

Tutorial 16.2

LARGE EDDY SIMULATION

Macros Reynolds stress proles

gdraw 1 frame,1,legend,10.2,5.0 12.5 6.5 uu frame,1,xrange,0,400 grlabel,1,1,on,,,5.0,1.5 y+ grlabel,1,2,on,,,0.5,6.0 uu grlabel,1,3,on,,,0.5,5.9 ___ grlabel,1,4,on,,,0.5,5.5 ut^2 frame,1,xrange,0,1 symt,2,2,8,1$lint,2,2,2,1$rtab,2,y,y$bart,2,2,90,1 symt,17,4,8,1$lint,17,4,2,1$rtab,5,y,n rlabel,2,on $LES rlabel,17,on $DNS ! Reverse background colour clrm,reve ! GRAPH DATA frame 2 xreg init 3,15 frame 2 yreg init 4,18 gdraw 2 frame,2,legend,10.2,5.0 12.5 6.5 vv frame,2,xrange,0,400 grlabel,2,1,on,,,5.0,1.5 y+ grlabel,2,2,on,,,0.5,6.0 vv grlabel,2,3,on,,,0.5,5.9 ___ grlabel,2,4,on,,,0.5,5.5 ut^2 frame,2,xrange,0,1 symt,4,2,8,1$lint,4,2,2,1$rtab,4,y,y$bart,4,2,90,1 symt,18,4,8,1$lint,18,4,2,1$rtab,18,y,n rlabel,4,on $LES rlabel,18,on $DNS ! Reverse background colour clrm,reve ! GRAPH DATA frame 3 xreg init 5,15 frame 3 yreg init 6,19 gdraw 3 frame,3,legend,10.2,5.0 12.5 6.5 ww frame,3,xrange,0,400 grlabel,3,1,on,,,5.0,1.5 y+ grlabel,3,2,on,,,0.5,6.0 ww grlabel,3,3,on,,,0.5,5.9 ___ Version 4.08 16-29

Tutorial 16.2

LARGE EDDY SIMULATION

Macros Reynolds stress proles

grlabel,3,4,on,,,0.5,5.5 ut^2 frame,3,xrange,0,1 symt,6,2,8,1$lint,6,2,2,1$rtab,6,y,y$bart,6,2,90,1 symt,19,4,8,1$lint,19,4,2,1$rtab,19,y,n rlabel,6,on $LES rlabel,19,on $DNS ! Reverse background colour clrm,reve ! GRAPH DATA frame 4 xreg init 7,15 frame 4 yreg init 8,20 gdraw 4 frame,4,legend,10.2,5.0 12.5 6.5 uv frame,4,xrange,0,400 grlabel,4,1,on,,,5.0,1.5 y+ grlabel,4,2,on,,,0.5,6.0 uv grlabel,4,3,on,,,0.5,5.9 ___ grlabel,4,4,on,,,0.5,5.5 ut^2 frame,4,xrange,0,1 symt,8,2,8,1$lint,8,2,2,1$rtab,8,y,y$bart,8,2,90,1 symt,20,4,8,1$lint,20,4,2,1$rtab,20,y,n rlabel,8,on $LES rlabel,20,on $DNS ! Reverse background colour clrm,reve ! GRAPH DATA frame 5 xreg init 9,15 frame 5 yreg init 10,21 gdraw 5 frame,5,legend,10.2,5.0 12.5 6.5 uw frame,5,xrange,0,400 grlabel,5,1,on,,,5.0,1.5 y+ grlabel,5,2,on,,,0.5,6.0 uw grlabel,5,3,on,,,0.5,5.9 ___ grlabel,5,4,on,,,0.5,5.5 ut^2 frame,5,xrange,0,1 symt,10,2,8,1$lint,10,2,2,1$rtab,10,y,y$bart,10,2,90,1 symt,21,4,8,1$lint,21,4,2,1$rtab,21,y,n rlabel,10,on $LES rlabel,21,on $DNS ! Reverse background colour clrm,reve 16-30 Version 4.08

Tutorial 16.2

LARGE EDDY SIMULATION

Macros Reynolds stress proles

! GRAPH DATA frame 6 xreg init 11,15 frame 6 yreg init 12,22 gdraw 6 frame,6,legend,10.2,5.0 12.5 6.5 vw frame,6,xrange,0,400 grlabel,6,1,on,,,5.0,1.5 y+ grlabel,6,2,on,,,0.5,6.0 vw grlabel,6,3,on,,,0.5,5.9 ___ grlabel,6,4,on,,,0.5,5.5 ut^2 frame,6,xrange,0,1 symt,12,2,8,1$lint,12,2,2,1$rtab,12,y,y$bart,12,2,90,1 symt,22,4,8,1$lint,22,4,2,1$rtab,22,y,n rlabel,12,on $LES rlabel,22,on $DNS ! Reverse background colour clrm,reve

Version 4.08

16-31

Tutorial 16.2

LARGE EDDY SIMULATION

Macros Reynolds stress proles

16-32

Version 4.08