Você está na página 1de 390

Tutorials

VERSION 4.20

(Last updated 21 June 2013)

CONFIDENTIAL — FOR AUTHORISED USERS ONLY

© 2013 CD-adapco
TABLE OF CONTENTS
1 INTRODUCTION
The es-ice Environment ............................................................................................ 1-1
es-ice Meshing Capabilities ...................................................................................... 1-3
Tutorial Structure ...................................................................................................... 1-3
Trimming Tutorial Overview .................................................................................... 1-4
Required Files ........................................................................................................... 1-5
Trimming Tutorial files ................................................................................... 1-5
Automatic 2D Tutorial files ............................................................................. 1-6
Wall Temperature Tutorial files ...................................................................... 1-6
Mesh Replacement Tutorial files ..................................................................... 1-6
Multiple Cylinder Tutorial files ....................................................................... 1-7
Closed-Cycle Tutorial files .............................................................................. 1-7
Sector Tutorial files ......................................................................................... 1-7
Two-Stroke Tutorial files ................................................................................ 1-8
Mapping Tutorial files ..................................................................................... 1-8
ELSA Tutorial files ......................................................................................... 1-9
2 SURFACE PREPARATION IN STAR-CCM+
Importing and Scaling the Geometry ........................................................................ 2-1
Creating Features ...................................................................................................... 2-2
Defining Surfaces ...................................................................................................... 2-6
Remeshing and Exporting the Geometry .................................................................. 2-8
3 GEOMETRY IMPORT AND VALVE WORK
Importing the Surfaces .............................................................................................. 3-1
Modelling the Valves ................................................................................................ 3-3
Saving the Model ...................................................................................................... 3-5
4 MESHING WITH THE TRIMMING METHOD
Modifying Special Cell Sets in the Geometry .......................................................... 4-1
Defining Flow Boundaries ........................................................................................ 4-3
Creating the 2D Base Template ................................................................................ 4-4
Creating the 3D Template ....................................................................................... 4-19
Trimming the 3D Template to the Geometry ......................................................... 4-24
Improving cell connectivity ........................................................................... 4-25
Assembling the Trimmed Template ........................................................................ 4-25
Running Star Setup ................................................................................................. 4-27
Saving the Model .................................................................................................... 4-27

Version 4.20 i
5 CREATING AND CHECKING THE MESH
6 STAR SET-UP in es-ice
Load Model ...............................................................................................................6-2
Analysis Set-up ..........................................................................................................6-2
Valve Lifts .................................................................................................................6-3
Assembly ...................................................................................................................6-4
Combustion ...............................................................................................................6-7
Initialization ...............................................................................................................6-8
Cylinder ............................................................................................................6-8
Port 1 and Port 2 ..............................................................................................6-9
Boundary Conditions ...............................................................................................6-11
Cylinder ..........................................................................................................6-11
Port and Valve 1 .............................................................................................6-12
Port and Valve 2 .............................................................................................6-15
Global settings ...............................................................................................6-16
Post Set-up ...............................................................................................................6-17
Cylinder ..........................................................................................................6-18
Port 1 and Port 2 ............................................................................................6-18
Global settings ...............................................................................................6-19
Time Step Control ...................................................................................................6-19
Write Data ...............................................................................................................6-20
Saving the Model .....................................................................................................6-21
7 STAR SET-UP in pro-STAR
Using the es-ice Panel ...............................................................................................7-1
Setting Solution and Output Controls .......................................................................7-2
File Writing ...............................................................................................................7-4
8 RUNNING THE STAR SOLVER
Running in Serial Mode ............................................................................................8-1
Running in Parallel Mode ..........................................................................................8-1
Running in Parallel on Multiple Nodes .....................................................................8-2
Running in Batch .......................................................................................................8-2
Restarting the Analysis ..............................................................................................8-2
9 POST-PROCESSING: GENERAL TECHNIQUES
Creating Plots with the es-ice Graph Tool ................................................................9-1
Calculating Apparent Heat Release ...........................................................................9-5
Plotting an Indicator Diagram ...................................................................................9-6
Calculating Global Engine Quantities .......................................................................9-8
Creating a Velocity Vector Display ..........................................................................9-9

ii Version 4.20
Creating an Animation of Fuel Concentration ........................................................ 9-12
Creating an Animation of Temperature Isosurfaces ............................................... 9-15
10 USING THE AUTOMATIC 2D TEMPLATE
Importing the Geometry Surface ............................................................................ 10-2
Defining Special Cell Sets in the Geometry ........................................................... 10-3
Modelling the Valves .............................................................................................. 10-4
Creating the Automatic 2D Template ..................................................................... 10-6
Refining the 2D Template Around the Injector ...................................................... 10-9
Adding Features to the Automatic 2D Template .................................................. 10-10
Using Detailed Automatic 2D Template Parameters ............................................ 10-12
Saving the es-ice Model File ................................................................................. 10-15
11 MULTIPLE-CYCLE ANALYSIS
Setting Up Multiple Cycles in es-ice ...................................................................... 11-1
Setting Up Multiple Cycles in pro-STAR ............................................................... 11-2
12 HEAT TRANSFER ANALYSIS
Resuming the es-ice Model File ............................................................................. 12-3
Mapping Wall Temperature .................................................................................... 12-4
Exporting Wall Heat Transfer Data ........................................................................ 12-6
Saving the es-ice Model File ................................................................................... 12-8
Cycle-averaging Wall Heat Transfer Data .............................................................. 12-8
Post-processing Wall Heat Transfer Data in pro-STAR ......................................... 12-9
Plotting average wall boundary temperatures ............................................. 12-10
Plotting average heat transfer coefficients .................................................. 12-12
Plotting average near-wall gas temperature at Y-plus=100 ........................ 12-13
Mapping Heat Transfer Data to an Abaqus Model via STAR-CCM+ ................. 12-15
13 MESH REPLACEMENT
Preparing the File Structure .................................................................................... 13-2
Rebuilding the Dense Mesh .................................................................................... 13-2
Creating Ahead Files for the Dense Mesh .............................................................. 13-6
Defining Mesh Replacements ................................................................................. 13-8
Setting Up Mesh Replacement in pro-STAR .......................................................... 13-9
Setting up the coarse model ......................................................................... 13-10
Setting up the dense model .......................................................................... 13-11
14 MULTIPLE CYLINDERS
Resuming the es-ice Model File ............................................................................. 14-2
Making, Cutting and Assembling the Template ..................................................... 14-2
Setting Up Multiple Cylinders ................................................................................ 14-3
Checking the Computational Mesh ......................................................................... 14-4

Version 4.20 iii


STAR Set-Up in es-ice ............................................................................................14-7
Analysis set-up ...............................................................................................14-8
Assembly ........................................................................................................14-8
Combustion ..................................................................................................14-11
Initialization .................................................................................................14-12
Boundary Conditions ...................................................................................14-15
Post Setup .....................................................................................................14-21
Time Step Control ........................................................................................14-22
Write Data ....................................................................................................14-23
Saving the es-ice Model File .................................................................................14-23
15 DIESEL ENGINE: FULL-CYLINDER CLOSED-CYCLE MODEL
Importing the Geometry ..........................................................................................15-2
Generating the Closed-Cycle Polyhedral Mesh ......................................................15-3
Assigning shells to geometry cell sets ...........................................................15-3
Specifying General, Events and Cylinder parameters ...................................15-4
Creating a spray-optimised mesh zone ..........................................................15-6
Importing a user intermediate surface ..........................................................15-10
Checking the spray-optimised zone .............................................................15-11
Creating the closed-cycle polyhedral mesh .................................................15-12
Running Star Setup ......................................................................................15-13
Creating and checking the computational mesh ..........................................15-13
Saving the Model File ...........................................................................................15-14
16 DIESEL ENGINE: SECTOR MODEL
Importing the Bowl Geometry ................................................................................16-2
Defining the Bowl Shape ........................................................................................16-2
Defining the Fuel Injector .......................................................................................16-3
Creating the 2D Template .......................................................................................16-4
Creating the Sector Mesh ........................................................................................16-7
Creating and Checking the Mesh ............................................................................16-9
Saving the Model ...................................................................................................16-10
17 DIESEL ENGINE: STAR SET-UP IN es-ice and pro-STAR
STAR Set-up in es-ice .............................................................................................17-1
Load model ....................................................................................................17-1
Analysis setup ................................................................................................17-1
Assembly ........................................................................................................17-2
Combustion ....................................................................................................17-3
Initialization ...................................................................................................17-3
Boundary conditions ......................................................................................17-4
Post setup .......................................................................................................17-5

iv Version 4.20
Time step control ........................................................................................... 17-6
Write data ...................................................................................................... 17-7
Saving the Model File ............................................................................................. 17-7
STAR Set-up in pro-STAR ..................................................................................... 17-7
Using the es-ice Panel ................................................................................... 17-8
Selecting Lagrangian and Liquid Film Modelling ........................................ 17-8
Setting up the Fuel Injection Model .............................................................. 17-9
Setting up the Liquid Film Model ............................................................... 17-15
Setting up Analysis Controls ....................................................................... 17-16
Writing the Geometry and Problem Files and Saving the Model ............... 17-19
18 DIESEL ENGINE: POST-PROCESSING
Creating a Scatter Plot ............................................................................................ 18-1
Creating a Spray Droplet Animation ...................................................................... 18-3
19 TWO-STROKE ENGINES
Importing the Geometry .......................................................................................... 19-2
Meshing with the Trimming Method ...................................................................... 19-3
Assigning shells to geometry cell sets ........................................................... 19-3
Creating the 2D template ............................................................................... 19-5
Creating the 3D template ............................................................................... 19-8
Trimming the 3D template to the geometry ................................................ 19-11
Assembling the trimmed template ............................................................... 19-12
Running Star Setup ...................................................................................... 19-14
Checking the mesh ...................................................................................... 19-14
STAR Set-up in es-ice .......................................................................................... 19-16
Analysis setup .............................................................................................. 19-16
Assembly ..................................................................................................... 19-17
Combustion .................................................................................................. 19-18
Initialization ................................................................................................. 19-19
Boundary conditions .................................................................................... 19-22
Post setup ..................................................................................................... 19-28
Time step control ......................................................................................... 19-28
Write data .................................................................................................... 19-29
Saving the es-ice Model File ................................................................................. 19-29
20 MESHING WITH THE MAPPING METHOD
Creating the Stub Surface in the Geometry ............................................................ 20-1
Creating the 2D Base Template .............................................................................. 20-8
Creating the 3D Template ..................................................................................... 20-21
General Notes About Edges and Splines .............................................................. 20-28
Creating Edges and Splines Near the Valve Seat ................................................. 20-29

Version 4.20 v
Creating the Remaining Edges and Splines ..........................................................20-36
Creating Patches ....................................................................................................20-40
The Mapping Process ............................................................................................20-42
21 IMPROVING THE MAPPED MESH QUALITY
Creating Plastered Cells ..........................................................................................21-1
22 PISTON MODELING
Meshing the Piston with the Shape Piston Method .................................................22-1
23 ELSA SPRAY MODELLING
Importing the Bowl Geometry ................................................................................23-3
Defining the Bowl Shape ........................................................................................23-3
Setting the Events and Cylinder Parameters ...........................................................23-4
Creating the Spray Zone ..........................................................................................23-5
Creating the Sector Mesh ......................................................................................23-11
STAR Set-up in es-ice ...........................................................................................23-12
Load model ..................................................................................................23-13
Analysis setup ..............................................................................................23-13
Assembly ......................................................................................................23-14
Combustion ..................................................................................................23-16
Initialization .................................................................................................23-17
Boundary Conditions ...................................................................................23-18
Time step control .........................................................................................23-22
Write data .....................................................................................................23-23
Saving the Model File ...........................................................................................23-24
STAR Set-up in pro-STAR ...................................................................................23-24
Using the es-ice panel ..................................................................................23-24
Activating the Lagrangian model .................................................................23-25
Defining the ELSA scalars ...........................................................................23-25
Setting up the Lagrangian droplets ..............................................................23-31
Defining boundary regions and boundary conditions ..................................23-34
Setting up analysis controls .........................................................................23-36
Adding extended data for the ELSA model .................................................23-40
Writing the Geometry and Problem Files and Saving the Model .........................23-42

vi Version 4.20
Chapter 1 INTRODUCTION
The es-ice Environment

Chapter 1 INTRODUCTION
es-ice is a GUI package designed to facilitate moving-grid, transient analyses of
internal combustion engines and is used in conjunction with CD-adapco’s
pro-STAR and STAR products. es-ice can create grids for two, three, four or
five-valve cylinders, generate the “events” input for pro-STAR and move the mesh
during the STAR CFD analysis.
The strategy underlying this suite is straightforward. With es-ice, you can
quickly and easily generate a template that approximates the desired geometry. The
template has the connectivity of the final grid, but its shape is simple enough to be
specified with a limited number of parameters. The template can be generated for a
wide variety of configurations merely by altering these parameters. Where possible,
es-ice provides graphical tools for setting the parameters so that minimal knowledge
of parameter names is required. You can then either trim the template or map the
surface of the template to the surface of the problem geometry. The interior vertices
are then redistributed to form a mesh that correctly represents the desired geometry.
After the model and analysis set-up is completed in pro-STAR, you are able to run
the STAR solver and display the results via pro-STAR.

The chief benefits of this approach are:


• Quick generation of an approximate template
• Flexibility in grid design provided via parameterisation facilities
• Ease-of-use arising from the available graphical tools
• Time-saving gained from automatic smoothing of interior mesh vertices
• Automatic events generation and automatic mesh motion
• Use of STAR, a proven, reliable and accurate CFD solver

The entire es-ice, pro-STAR, STAR suite is fully capable of solving complete
engine cycle problems and also of automatically preparing the necessary files for
parallel computation.
Note that the actual engine models you can build using es-ice are generally not
the same as the engine models used in this tutorial volume. Certain features in your
own models may not be present in our tutorials, but the general methods of treating
such features are described either in this volume or in the es-ice User Guide. You
should not treat every step described in this volume as a general guideline that
applies to all engine geometries.
You are also encouraged to read the User Guide documentation to help you gain
a better understanding of how the code works.

The es-ice Environment


Two executables, es-ice and Ice, constitute the es-ice suite. You interact
directly with es-ice, which provides a working environment through GUI panels,
tools and windows. The Ice executable is called by es-ice or STAR and performs
tasks such as generating meshes and computing vertex positions.
Several windows open when es-ice is launched, as illustrated in Figure 1-1.
Separate plotting windows are dedicated to the geometry and template displays. The
word “geometry” is used to represent the discretised surface defining the boundaries
of the fluid domain available for the CFD calculation. The word “template” is used

Version 4.20 1-1


INTRODUCTION Chapter 1
The es-ice Environment

to represent the computational mesh covering that domain. Therefore, the geometry
is displayed in the Geometry window and the template in the Template window. The
active window is indicated by a highlighted button in the Plot Tool, which is the
panel lying in the upper-left corner of the screen. The appropriate button in this
panel is used to toggle back and forth between the desired windows.
The Select panel provides access to the other GUI panels and tools (including
on-line help) and is organised so that you pick tools sequentially during a typical
es-ice session. Additional information about the es-ice environment can be found in
Chapter 2 of the User Guide.

es-ice Command Window

Figure 1-1 The es-ice environment

Most of the time, you will interact with the GUI interface using mouse buttons:
• Rotation via the Left mouse button “L”
• Panning via the Right mouse button “R”
• Zooming in and out via the Middle mouse button “M”

These actions are used extensively to view and analyse the geometry or the
template. There is always text at the bottom of the active plotting window that
shows the mouse functions available. Note that double letters (e.g. “LL”) represent
a double-click and the “->” arrow represents a click and drag.
es-ice employs text-based “commands” to perform its operations and these can
be executed by typing them in the es-ice command window. Some of them can also
be executed by clicking a button in one of the GUI panels.
If an es-ice command or a series of commands are repeatedly used, you can
manually create a GUI button that will execute the command. These custom buttons
can be grouped together to form a user-defined panel. Detailed information on
1-2 Version 4.20
Chapter 1 INTRODUCTION
es-ice Meshing Capabilities

creating and opening a user-defined panel is given in Chapter 2, “User panels” of


the User Guide.

es-ice Meshing Capabilities


es-ice offers two methods for modeling internal combustion engines, called
Mapping and Trimming. Both methods require you to build 2D and 3D templates
that define a discretised representation of the engine geometry. The 3D template is
then mapped or trimmed to obtain the shape of the domain used in the CFD analysis.
In the Mapping method, curves on the template, called edges, are mapped on
corresponding curves on the geometry, called splines. Similarly, cell faces on the
template, called patches, are mapped onto corresponding surfaces of the geometry.
As the complexity of the geometry increases, the time required for the mapping
process increases. In general the time to generate an engine mesh using the Mapping
method is proportional to the complexity of the geometry.
The Trimming method on the other hand requires much less user intervention. In
this case, the 3D template is cut by the engine geometry using the so-called trimmed
mesher.
Two more special meshing methods are available for generating a mesh for the
closed-cycle phase of an engine analysis (i.e. when all valves are closed):
• Closed-cycle polyhedral meshing is suitable for cylinder geometries that
include valves recesses on the cylinder head and valve pockets on the piston
crown. This method employs a combination of polyhedral cells and extruded
cell layers, and can include an orthogonal mesh suitable for fuel spray
modelling.
• Sector meshing is suitable for closed-cycle, axisymmetric engine cylinder
problems.

Tutorial Structure
es-ice offers four meshing methods: Trimming, Mapping, Polyhedral and Sector.
The Tutorials volume covers all four methods, with additional examples illustrating
the use of various advanced features. This section indicates which chapters relate to
particular es-ice features and provides general guidelines for working through the
tutorials.
The main tutorial uses the Trimming method and a simple case set-up to illustrate
the overall modelling process, from engine geometry import to post-processing the
analysis results. We recommend that you first go through the chapters listed below
before moving on to the advanced es-ice features:
• Chapter 2: Surface preparation in STAR-CCM+
• Chapter 3: Geometry import and valve work
• Chapter 4: Meshing with the Trimming method
• Chapter 5: Creating and checking the computational mesh.
• Chapter 6: STAR set-up in es-ice
• Chapter 7: STAR set-up in pro-STAR
• Chapter 8: Running the STAR solver
• Chapter 9: Post-processing: General techniques
• Chapter 10: Creating a mesh using the automatic 2D template

Version 4.20 1-3


INTRODUCTION Chapter 1
Trimming Tutorial Overview

The examples in the following chapters employ advanced es-ice features and are
used in addition to the trimming tutorial. The relevant files created for the trimming
tutorial are specified at the start of each chapter:
• Chapter 11: Multiple-cycle analysis
• Chapter 12: Wall heat transfer analysis
• Chapter 13: Mesh replacement
• Chapter 14: Multiple cylinders

Chapters describing meshing for diesel engines are independent from the earlier
chapters and deal with cases that also include fuel sprays:
• Chapter 15: Full-cylinder closed-cycle model
• Chapter 16: Diesel engine sector model
• Chapter 17: Model set-up in es-ice and pro-STAR
• Chapter 18: Post-processing Diesel models

The following chapter contains an independent tutorial describing the meshing and
physics set-up for a two-stroke engine simulation:
• Chapter 19: Two-stroke engines

Examples illustrating the Mapping method as an alternative meshing process to


Trimming are described in the chapters below, but the method is not recommended
for general use.
• Chapter 20: Meshing with the Mapping method
• Chapter 21: Improving the Mapped mesh quality
• Chapter 22: Piston modeling

Once Chapter 20 to 22 are complete, use the examples in Chapter 5 to 9 as a guide


for finishing the mapped mesh analysis.
Finally, Chapter 23 describes a case that uses the ECFM-CLEH combustion
model in conjunction with the ELSA spray simulation model.

Trimming Tutorial Overview


The trimming example in this manual is a symmetric, four-valve cylinder of a
gasoline engine. The surface mesh represents the +y half of the combustion dome,
piston crown, ports/arms and valves and the model units are in millimetres. The
geometry is oriented such that the piston travels in the +z direction during
compression. The (x,y) coordinates of the cylinder centre are (0,0) and the
combustion deck is at the z = 0 level. The piston is in the TDC position and the
valves are in their respective closed positions. The intake valve is Valve 1 and the
intake port arm features a siamese design. The exhaust valve is Valve 2 and the
exhaust port arm is a separate design. Other features include angled valves, a piston
crescent and a piston bowl with a deep spark plug penetrating into it.
The geometry surface is closed and different cell types are assigned to the
combustion dome, piston, cylinder wall, each port arm and each valve. The
complete geometry is stored under entry ID 1 in a pro-STAR database file called
geometry.dbs.
Valve lift files, vlift01.dat and vlift02.dat, are supplied and the lift is

1-4 Version 4.20


Chapter 1 INTRODUCTION
Required Files

also in millimetres.
Table 1-1 summarises the engine operating conditions and characteristics:
Table 1-1: Summary of Trimming Tutorial Engine

Bore 90.0 mm
Stroke 68.5 mm
Connecting Rod Length (L) 145.0 mm
Piston Pin Offset (P) 0.0 mm
Engine Speed 3600 rpm

Note that the Closed-Cycle, Sector and Two-Stroke tutorials in Chapter 15, Chapter
16 and Chapter 19 use a different engine geometry. An overview of these
geometries is provided in the relevant chapters.

Required Files
The STAR-CD installation includes the basic tutorial files needed to begin working
through the examples in this manual. These files are summarised below.

Trimming Tutorial files


The files required for the trimming tutorial are shown in Table 1-2 and can be found
in the following directory:
$STARDIR/STARCDTUTS/4.20/generic/es-ice/TRIMMING_TUTORIALS

Table 1-2: Summary of Trimming Tutorial files

File Name Description


Surface of the engine geometry, with different cell
geometry.dbs types assigned to the combustion dome, piston, cyl-
inder wall, each port and valve
Volume mesh of the intake and exhaust manifolds,
manifold.dbs
generated using STAR-CCM+
vlift01.dat Valve lift profile (in millimetres) as a function of
vlift02.dat crank angle
cylinder-3600.dat A table of fluid pressure and temperature as a func-
intake-3600.dat tion of crank angle. This information is used to set
exhaust-3600.dat initial and boundary conditions.
scalar1.inp pro-STAR input files for post-processing the analy-
isoTemp.inp sis results.
scriptScalar1.sh Shell scripts for running pro-STAR in batch mode
scritIsoTemp.sh to generate animations.

Version 4.20 1-5


INTRODUCTION Chapter 1
Required Files

Automatic 2D Tutorial files


The files required for the tutorial on automatic 2D template generation are shown in
Table 1-3 and can be found in the following directory:
$STARDIR/STARCDTUTS/4.20/generic/es-ice/AUTO_2D

Table 1-3: Summary of Wall Temperature Tutorial files

File Name Description


Surface of the engine geometry, with different cell
geometry.dbs types assigned to the combustion dome, piston, cylin-
der wall, ports and valves
vlift01.dat
vlift02.dat Valve lift profiles (in millimetres) as a function of
vlift03.dat crank angle
vlift04.dat

Wall Temperature Tutorial files


The files required for the tutorial on mapping wall temperature are shown in Table
1-4 and can be found in the following directory:
$STARDIR/STARCDTUTS/4.20/generic/es-ice/MAPPING_WALL_TEMPERATURE

Table 1-4: Summary of Wall Temperature Tutorial files

File Name Description


Surface shells of the cylinder liner, dome, piston,
cylinder_htx.dbs
ports and valves for mapping non-uniform wall tem-
valves_htx.dbs
perature data
cylinder_htx.usr Temperature data with reference to surface shells in
cylinder_htx.usr the files above

Mesh Replacement Tutorial files


The files required for the mesh replacement tutorial are shown in Table 1-5 and can
be found in the following directory:
$STARDIR/STARCDTUTS/4.20/generic/es-ice/MESH_REPLACEMENT

Table 1-5: Summary of Mesh Replacement Tutorial files

File Name Description


es-ice model file containing the dense mesh used
save_es-ice.dense
during the mesh replacement tutorial

1-6 Version 4.20


Chapter 1 INTRODUCTION
Required Files

Multiple Cylinder Tutorial files


The files required for the multiple cylinder tutorial are shown in Table 1-6 and can
be found in the following directory:
$STARDIR/STARCDTUTS/4.20/generic/es-ice/MULTIPLE_CYLINDERS

Table 1-6: Summary of Multiple Cylinder Tutorial files

File Name Description


save_es-ice.mul- es-ice model file used as the starting point in the mul-
tiCylinder tiple cylinder tutorial
Volume mesh of the intake and exhaust manifolds
manifoldTwin.dbs
used in the multiple cylinder tutorial

Closed-Cycle Tutorial files


The files required for the closed-cycle tutorial are shown in Table 1-7 and can be
found in the following directory:
$STARDIR/STARCDTUTS/4.20/generic/es-ice/CLOSED-CYCLE_POLYMESH

Table 1-7: Summary of Closed-Cycle Tutorial files

File Name Description


closed-cycleD Surface mesh representing the cylinder geometry of the
iesel.dbs closed-cycle diesel engine
“User Intermediate Surface” that separates the upper and
uisDiesel.dbs
lower portions of the cylinder
pro-STAR table file defining the injection mass flow rate
injection.tbl
as a function of crank angle

Sector Tutorial files


The files required for the sector tutorial are shown in Table 1-8 and can be found in
the following directory:
$STARDIR/STARCDTUTS/4.20/generic/es-ice/SECTOR_TUTORIALS

Version 4.20 1-7


INTRODUCTION Chapter 1
Required Files

Table 1-8: Summary of Sector Tutorial files

File Name Description


bowl.dbs Surface of the piston bowl geometry
pro-STAR table file defining the injection mass
injection.tbl
flow rate as a function of crank angle
droplets.inp pro-STAR input files for post-processing results
Shell script for running pro-STAR in batch mode
scriptDroplets.sh
to generate animations

Two-Stroke Tutorial files


The files required for the two-stroke tutorial are shown in Table 1-9 and can be
found in the following directory:
$STARDIR/STARCDTUTS/4.20/generic/es-ice/TWO_STROKE

Table 1-9: Summary of Two-Stroke Tutorial files

File Name Description


twoStroke- Surface mesh representing the cylinder geometry of the
Cylinder.dbs two-stroke engine
twoStroke- Surface mesh representing the port geometry of the
Port.dbs two-stroke engine

Mapping Tutorial files


The files required for the mapping tutorials are shown in Table 1-10 and can be
found in the following directory:
$STARDIR/STARCDTUTS/4.20/generic/es-ice/MAPPING_TUTOTRIALS

1-8 Version 4.20


Chapter 1 INTRODUCTION
Required Files

Table 1-10: Summary of Mapping Tutorial files

File Name Description


Surface of the engine geometry, with different cell
geometry.dbs types assigned to the combustion dome, piston,
cylinder wall, each port and valve
Volume mesh of the exhaust port, generated using
exhaust.dbs
the pro-STAR AutoMesh module
vlift01.dat Valve lift profile (in millimetres) as a function of
vlift02.dat crank angle
cylinder-3600.dat A table of fluid pressure and temperature as a
intake-3600.dat function of crank angle. This information is used
exhaust-3600.dat to set initial and boundary conditions.

ELSA Tutorial files


The files required for the ELSA tutorial are shown in Table 1-11 and can be found
in the following directory:

$STARDIR/STARCDTUTS/4.20/generic/es-ice/ELSA

Table 1-11: Summary of Mapping Tutorial files

File Name Description


bowl.dbs Surface of the piston bowl geometry
pro-STAR table file defining the injection mass
injection.tbl
flow rate as a function of crank angle
Spline defining the position and dimensions of the
injector_hole.spl
injector hole
ufile/dropro.f User coding defining droplet properties

Records showing progress thorough each tutorial in this volume are saved
intermittently to es-ice model files. These files are available from the Product
Updates section of the CD-adapco User Services site, should you wish to validate
your progress or skip chapters. The start of each chapter also lists all files required
to complete that chapter.
A description of the steps needed to generate the volume mesh for the exhaust
port or the manifolds is not included in the Tutorial or User Guide volumes. It is
assumed that you have enough experience in using pro-STAR or STAR-CCM+ to
perform these operations.

Version 4.20 1-9


Chapter 2 SURFACE PREPARATION IN STAR-CCM+
Importing and Scaling the Geometry

Chapter 2 SURFACE PREPARATION IN STAR-CCM+


The following tutorial data file is used in this chapter:
TRIMMING_TUTORIALS/Geometry.dbs

CAD geometry normally consists of many separate surfaces. Depending on the


surface discretisation tool, vertex mismatches can occur between the various
surfaces that prevent the discretised geometry surface from being closed. While an
open geometry is acceptable for use with the es-ice Mapping method, the Trimming
method requires a closed surface. When the engine volume is converted to a solid
body within the CAD program, the separate surfaces making up the surface
discretisation are closed and connected.
The following section provides a step-by-step guide for preparing a surface
discretisation using STAR-CCM+ v8.02. Note that using earlier or later versions of
STAR-CCM+ may require a different procedure.

Importing and Scaling the Geometry


Begin by importing and scaling the geometry in STAR-CCM+. In that environment,
the default length unit is metres so the dimensions of the imported geometry are
assumed to be in metres. In es-ice, there are no defined units so a dimension could
be in metres, millimetres, etc. depending on the units you are working with. As the
es-ice trimming tutorial assumes that dimensions are in millimetres, you need to
scale the mesh by a factor of 1000.
• Launch STAR-CCM+ and start a new simulation
• From the menu bar, select File > Import > Import Surface Mesh...
• In the file browser, select Geometry.dbs
• In the Import Surface Options panel, accept the default options, as shown in
Figure 2-1, and click OK to begin importing the geometry

Figure 2-1 Importing the CAD geometry


Version 4.20 2-1
SURFACE PREPARATION IN STAR-CCM+ Chapter 2
Creating Features

• Right-click the Geometry > Parts > Geometry node and select Transform >
Scale
• In the Scale Parts panel, set Scale Factor to 1000
• Click Apply followed by Close

Creating Features
The next step is to define the geometry Features. These features are converted into
line cells in es-ice, thus maintaining sharp edges and other points of interest when
generating a volume mesh (similar to splines in previous versions of es-ice).
First, you use the Repair Features tools to define Features automatically based
on a supplied Sharp edge angle criterion. Next, you manually add and remove
selected Features. Generally, Features are required for the valve seats and liner top
and bottom (if the Mark sharp edges operation did not capture them). It is also
necessary to remove Features that were captured due to faceting but do not
represent the real geometry.
To launch the Surface Repair tools and generate features at an angle of 20
degrees:
• Right-click the Geometry > Parts > Geometry node and select Repair
Surface...
• In the Surface Preparation Options panel, accept the default settings shown in
Figure 2-2 and click OK to activate the Surface Repair tool

Figure 2-2 Surface Preparation options

2-2 Version 4.20


Chapter 2 SURFACE PREPARATION IN STAR-CCM+
Creating Features

• In the top left pull-down menu, change the Mode


to Repair Features
• Click Mark Features by Angle (or press G on
the keyboard)
• In the Mark Feature Edges Options dialog, set
Sharp edge angle to 20
• Clear the Mark boundary perimeters
checkbox and click OK

In the following steps, you add extra Features to the surface geometry. Surface
mesh edges are highlighted in pink when selected in the display. Double-clicking
selects the edge and any other edge with similar face-normal angles. You can also
use the <Ctrl> button to select multiple edges.
To add Features:
• In the Graphics window, existing Features are
marked with thick black lines and the surface
mesh is represented with thin lines
• The mesh display can be turned on or off
depending on user preference. Click Mesh
Toggle in the Vis toolbar and select Mesh Off

• Tick the checkbox next to Edges to select edges


with the cursor (as opposed to Faces or
Vertices)
• Double-click one of the edges that is a Feature.
For example, Figure 2-3 shows a close-up of the
intake port meeting the cylinder head in which
Feature 3 is selected. Further examples are
shown on the next page
• Click Flag edges as feature (or press F on the keyboard) to mark the edges as
Features
• Repeat the previous steps to continue adding Features, as shown in Figures
2-3 to 2-7.

Version 4.20 2-3


SURFACE PREPARATION IN STAR-CCM+ Chapter 2
Creating Features

Figure 2-3 Example of missing Features on the intake port

Figure 2-4 Example of Features on the rear side of the intake port

2-4 Version 4.20


Chapter 2 SURFACE PREPARATION IN STAR-CCM+
Creating Features

Figure 2-5 Example of missing Features on the exhaust port

Figure 2-6 Example of missing Features on the spark plug

Version 4.20 2-5


SURFACE PREPARATION IN STAR-CCM+ Chapter 2
Defining Surfaces

Figure 2-7 Example of missing Features between the cylinder head and liner

Next, remove unnecessary Features from the surface geometry. You can use the
diagnostics tool to highlights Features that, according to the software, are likely to
need removing.
• In the surface repair panel, click Start
Diagnostics... Feature errors are highlighted on
the surface in cyan
• Clear the checkbox next to Reset Displayed to
keep displaying the entire surface
• Use the Browse buttons to cycle through the
errors and inspect them individually
• Click Unflag feature edges (or press U on the
keyboard) to remove a Feature
• When complete, click Close

Defining Surfaces
If no surface definitions were imported from the geometry, you can split the
surfaces according to existing Features and then combine them to define the
cylinder components.
• Expand the Geometry > Parts > Geometry > Surfaces manager, right-click
the Surface node and select Split By Parts Curves...
• In the Split Part Surface by Part Curves panel, tick the part curve checkbox as
shown in Figure 2-8

2-6 Version 4.20


Chapter 2 SURFACE PREPARATION IN STAR-CCM+
Defining Surfaces

• Click Apply and then Close

Figure 2-8 Splitting surfaces by part-curves

Next, combine the surfaces to define the engine components, that is piston, liner,
cylinder head, ports, valves and spark plug. The required surfaces can be selected
on either the object tree or the Graphics window. To aid grouping of the remaining
surfaces, hide the combined surfaces for each component. The following steps
detail the process of combining surfaces representing the intake port (Port 1) with a
table summarising the surfaces for other engine components.
To combine the surfaces:
• Expand the Geometry > Parts > Geometry > Surfaces manager. Select the
following nodes while holding down the <Ctrl> key:
• Surface 9
• Surface 18
• Surface 26
• Surface 27
• Surface 31
• Surface 33
• Surface 35
• Surface 40
• Surface 42

• Right-click any of the


selected surfaces in the Graphics window and select Combine
• Right-click the combined surface, select Rename... and name the surface as
Port1
• Right-click the combined surface in the Graphics window and select Hide to
allow an easier selection of the intake valve
• Follow the previously described steps to continue combining surfaces. For

Version 4.20 2-7


SURFACE PREPARATION IN STAR-CCM+ Chapter 2
Remeshing and Exporting the Geometry

your guidance, the surfaces for each engine component are summarised in the
following table:

Combined Surface Individual Surface Combined Surface Individual Surface


Surface 2 Intake Surface 19
Surface 20 Exhaust Surface 25
Surface 21 Surface 7
Port2 Surface 36 Surface 8
Surface 37 SparkPlug Surface 12
Surface 38 Surface 16
Surface 39 Surface 23
Surface 13 Surface 5
Surface 14 Surface 6
Valve1 Surface 15 Head Surface 17
Surface 22 Surface 32
Surface 24 Surface 34
Surface Surface 29
Liner
Surface 10 Surface 41
Valve2 Surface 11 Surface 3
Piston
Surface 28 Surface 4
Surface 30

Remeshing and Exporting the Geometry


Typically, a valve surface mesh is of sufficiently high quality and thus more
desirable than the remeshed surface. Therefore, the recommended practice is to
separate the valves from the rest of the geometry.
• Press <Ctrl> key and select Geometry > Surfaces > Valve1 and Valve2
• Right-click one of the selected surfaces and select Create New Part From
Surfaces (see Figure 2-9)

2-8 Version 4.20


Chapter 2 SURFACE PREPARATION IN STAR-CCM+
Remeshing and Exporting the Geometry

Figure 2-9 Creating a new part from the valve surfaces

• Rename Geometry > Parts > Part as Valves

The next step is to set up a Surface Remesher mesh operation and define its
parameters:
• Right-click the Geometry > Operations node and select New > Automated
Mesh
• In the Create Automated Mesh Operation panel, tick the checkbox next to
Parts > Geometry
• Under Surface Meshers, select Surface Remesher and click OK
• Select the Automated Mesh > Meshers > Surface Remesher node
• In the Properties panel, set the Surface Remesher parameters as shown in
Figure 2-10:
• Deselect the Perform proximity refinement checkbox
• Set Minimum face quality to 0.0

Figure 2-10 Surface Remesher properties

Version 4.20 2-9


SURFACE PREPARATION IN STAR-CCM+ Chapter 2
Remeshing and Exporting the Geometry

• Right-click the Operations > Automated Mesh > Default Controls node
and select Edit...
• In the Edit panel, click Expand/Contract Tree to access all parameters
• Set the meshing parameters as shown in Figure 2-11:
• Set Base Size > Value to 1.0 m
• Ensure that the Project to CAD toggle button is selected
• Ensure Target Surface Size > Percentage of Base is set to 100
• Ensure Minimum Surface Size > Percentage of Base is set to 10
• Ensure that Basic Curvature > #Pts/circle is set to 36
• Set Surface Growth Rate to 1.5
• Click Close

Figure 2-11 Mesh reference values

The surface can now be meshed using the STAR-CCM+ Surface Remesher.
• In the Mesh Generation toolbar, click Generate Surface Mesh

The surface is then exported for use in es-ice. Both the Geometry and Valves parts
are exported under two separate IDs in a single database (.dbs) file.
• Right-click the Geometry > Parts > Geometry node and select Export
• In the Save panel, set Descriptions to Automated Mesh.Remesh from the
drop-down menu
2-10 Version 4.20
Chapter 2 SURFACE PREPARATION IN STAR-CCM+
Remeshing and Exporting the Geometry

• Set File Name to geometryRemesh, Files of Type to pro-STAR Surface


mesh (*.dbs) and click Save
• In the Database Export Options panel, set Database Id to 1, Title to
Geometry and click OK
• Right-click the Geometry > Parts > Valves node and select Export
• In the Save panel, ensure that Descriptions is set to Root from the drop-down
menu
• Select geometryRemesh.dbs and click Save
• In the Database Export Options panel, set Database Id to 2, Title to Valves
and click OK

Version 4.20 2-11


Chapter 3 GEOMETRY IMPORT AND VALVE WORK
Importing the Surfaces

Chapter 3 GEOMETRY IMPORT AND VALVE WORK


The following tutorial data files are used in this chapter:
geometryRemesh.dbs (geometry surface from Chapter 2)

The model created at the end of this tutorial is saved to file:


save_es-ice.1-valves

Chapter 2, “The es-ice Environment” in the User Guide describes the preliminary
steps necessary before starting an es-ice session. This chapter describes the initial
steps required to generate a mesh for a symmetric, four-valve engine cylinder.
These are:
1. Importing the geometry surface
2. Assigning a cell type to the valves
3. Defining local coordinate systems for the valves
4. Creating and checking valve profiles

Importing the Surfaces


After starting es-ice, begin by importing the discretised surface defining the
problem geometry. The following file formats can be used:
• Database files with extension .dbs
• Cell and vertex files with extension .cel and .vrt, respectively, which can
be in binary or coded format.

In this section, you import the geometry surface (geometryRemseh.dbs)


created in Chapter 2 using the Read Tool. The tool is divided into five sections:
• The top section imports .vrt, .cel and .cpl files into the Template
window
• The second section imports .vrt and .cel files into the Geometry window
• The third section opens .dbs files
• The forth section opens .ccm files
• The bottom section resumes es-ice model files

Version 4.20 3-1


GEOMETRY IMPORT AND VALVE WORK Chapter 3
Importing the Surfaces

To import the geometry surface mesh:


• Launch es-ice in the usual manner
• In the Select panel, click Read Data
to open the Read Tool
• Click the ellipsis (...) next to the
DBase box and select
geometryRemseh.dbs via the file
browser
• Click the ellipsis (...) next to the Get
box and select 1 Geometry via the
database browser

To import the valve surface mesh:


• In the Read Tool, select the Add
toggle button under DBase
• Click the ellipsis (...) next to the Get
box and select 2 Valves via the
database browser

3-2 Version 4.20


Chapter 3 GEOMETRY IMPORT AND VALVE WORK
Modelling the Valves

Check that the surface has been imported to the


Geometry window:
• In the Plot Tool, select Geometry from the
drop-down menu
• Enter the following command to set up a
suitable viewpoint

View, 1, -2, 1

• Click CPlot to display the imported


geometry surface, as shown in Figure 3-1

Figure 3-1 Geometry window: Imported geometry surface

Modelling the Valves


To determine the direction of motion during valve opening and closing events,
es-ice uses cylindrical coordinate systems with origins at the valve centres and
z-axes in the direction of valve motion. In addition, es-ice assumes that valves are
axisymmetric (i.e. represented by a surface of revolution) so the shape of each valve
is defined by a two-dimensional profile. A spline is then sufficient to display the
valve profile for a visual check.
Since you have named the valves in STAR-CCM+, each valve can be easily
isolated via an es-ice command. This makes the process of valve modelling much
simpler.
To model Valve 1:
• Enter the following command to isolate the
Valve 1 shells:

CSet, Newset, Name, Valve1

• In the Select panel, click Create Template


• In the Create Template panel, click Valve
profile
• In the Create valve profile panel shown in
the adjacent screenshot, ensure that Valve 1 is selected from the drop-down
menu and the Coordinate system is set to 11

Version 4.20 3-3


GEOMETRY IMPORT AND VALVE WORK Chapter 3
Modelling the Valves

• Set Select shells to cset0 to create the valve profile for the current cell set
• Click Create profile

This action creates coordinate system 11, located at the bottom centre of the valve,
whose z-axis is parallel to the direction of valve motion. It also automatically
generates a spline that follows the valve profile, thus defining the valve shape. This
profile is used during the trimming process to trim the template to the valve shape.
We recommend checking that the valve profile correctly matches the valve shape
shown in Figure 3-2.

Figure 3-2 Valve 1 profile

If the valve profile is poorly defined in one of your own cases, you can either adjust
the Edge angle parameter in the Create valve profile panel, or create the profile
manually (see Chapter 5 in the User Guide). This profile is stored as an image within
the es-ice model file so you can clear the valve spline if you wish.
You can now use a similar technique to model Valve 2:
• Enter the following command to isolate the Valve 2 shells:

CSet, Newset, Name, Valve2

• In the Create valve profile panel, select Valve 2 from the drop-down menu
• Set Select shells to cset0
• Click Create profile

To display and list the newly created coordinate systems:


• In the Plot Tool, select the Local toggle button and click CPlot to display all
coordinate systems in the Geometry window

3-4 Version 4.20


Chapter 3 GEOMETRY IMPORT AND VALVE WORK
Saving the Model

• From the menu bar, select List > CSlist > All (equivalent to command
CSList, All) to display the coordinate system definitions, as shown in
Figure 3-3.

Figure 3-3 Output from the CSList, All command

Saving the Model


Save your work in an es-ice model file using the Write Tool. It is recommended that
you create multiple model files during the modelling process, with suitable
extensions identifying your work at different stages. This practice allows you to
resume from a previous stage, if necessary.
The Write Tool is divided into four sections: the top section sets file-writing
options, the second section writes vertices, cells and cell couple definitions, the
third section writes database files, and the bottom section saves es-ice model files.
Note that when saving an es-ice file, the file-writing options at the top of the panel
are not applicable.
To save the model:
• In the Select panel, click Write Data
• In the Write Tool, enter
save_es-ice.1-valves and then click
Save

Version 4.20 3-5


Chapter 4 MESHING WITH THE TRIMMING METHOD
Modifying Special Cell Sets in the Geometry

Chapter 4 MESHING WITH THE TRIMMING METHOD


The model at the beginning of this tutorial can be resumed from file:
save_es-ice.1-valves

The following tutorial data files are used in this chapter:


TRIMMING_TUTORIALS/vlift01.dat (Valve 1 lift profile)
TRIMMING_TUTORIALS/vlift02.dat (Valve 2 lift profile)
PANELS/training.pnl

The model in this tutorial has been intermittently saved to file:


save_es-ice.2-beforetrim
save_es-ice.3-starsetup

An es-ice mesh can be generated using the more recent Trimming method or the
original Mapping method. This chapter covers the former, a method employing
trimmed-cell technology as implemented in the pro-STAR AutoMesh module. This
method involves cutting a mesh template to the geometry surface and thus reducing
the time and skill required to use the Mapping method (see Chapter 20 of this
volume).
Note that the Trimming method requires a closed surface where separate surfaces
must be connected. For some CAD models, it is necessary to define new surfaces
that close the volume; for example, where you intend to apply flow boundary
conditions.
The process of meshing via the Trimming method can be divided into six steps:
1. Modifying special cell sets in the geometry
2. Creating the 2D base template
3. Creating the 3D template
4. Trimming the 3D template to the geometry
5. Assembling the trimmed template
6. Running Star Setup

Modifying Special Cell Sets in the Geometry


In going through the following steps, you will use the example training panel to
issue appropriate commands instead of typing them into es-ice (see Chapter 2,
“User panels” in the User Guide).
To open the training panel:
• From the menu bar, select Panels > Directory
• Enter the directory location of the supplied user panel (training.pnl)
• From the menu bar, select Panels > training

In this section, you will modify some special, numbered cell sets in order to define
certain geometry surfaces. This task requires you to collect various groups of
surface shells into the current cell set and then save them into one of three
pre-defined geometry cell sets.
To see a list of these sets:
• In the Plot Tool, activate the Geometry window from the drop-down menu
• From the menu bar, select Sets > CSet > List to display the list shown in

Version 4.20 4-1


MESHING WITH THE TRIMMING METHOD Chapter 4
Modifying Special Cell Sets in the Geometry

Figure 4-1

Figure 4-1 List of special cell sets

The ID number of these sets appears under the Set column, with CSet 0 as the
currently active cell set. An “L” to the left of the ID number denotes a locked cell
set. Locking cell sets helps prevent accidental modifications. The number of cells
in each set appears under the Count column. To the right of this column is a label
identifying the cell set (for CSet 0, the label shows the minimum and maximum cell
ID numbers).
First, you must save the geometry shells of the cylinder wall to Geometry CSet
1. For symmetric models, such as this one, Geometry CSet 1 also includes the shells
on the symmetry plane. Then you must save the piston shells to Geometry CSet 2
and finally the trimming surface to Geometry CSet 3. Note that the trimming shells
include all the geometry surface shells and line cells resulting from the
STAR-CCM+ surface preparation. However, they exclude the valves as these were
modelled in the tutorial of Chapter 3 and are already available for trimming.
To define the geometry cell sets:
• Enter the following command to isolate the cylinder shells shown in Figure
4-2

CSet, Newset, Name, Liner

• In the training panel, click Cylinder Shells to save the cylinder wall shells
into CSet 1

Figure 4-2 Cylinder shell selection

• Enter the following command to isolate the piston shells shown in Figure 4-3

CSet, Newset, Name, Piston

4-2 Version 4.20


Chapter 4 MESHING WITH THE TRIMMING METHOD
Defining Flow Boundaries

• In the training panel, click Piston Shells

Figure 4-3 Piston shell selection

• Enter the following commands to isolate the trimming shells shown in Figure
4-2

CSet, All
CSet, Delete, Name, Valve1
CSet, Delete, Name, Valve2

• In the training panel, click Trimming Shells

Figure 4-4 Trimming shell selection

Defining Flow Boundaries


In this section, you define the shells representing boundaries where flow enters or
leaves the solution domain. When trimming the model, the flow boundaries receive
extruded cell layers that improve solution robustness.
To define the flow boundaries:
• In the Create Template panel, click Boundaries
• In the Boundary shells panel, set Layers to 2 and Thickness to 2 as shown in
Figure 4-5

Version 4.20 4-3


MESHING WITH THE TRIMMING METHOD Chapter 4
Creating the 2D Base Template

Figure 4-5 Boundary shells panel

• Enter the following command to isolate the Intake flow boundary:

CSet, Newset, Name, Intake

• Click Add
• Enter the following command to isolate the Exhaust flow boundary:

CSet, Newset, Name, Exhaust

• Click Add

Creating the 2D Base Template


The first step in creating the 2D base template is to define the engine operating
conditions and characteristics in the General parameters and Events parameters
panels.
To set the general parameters:
• In the Select panel, click Create Template
• In the Create Template panel, click General
• In the General parameters panel, set Base
style to 2/4 Valve to model one half of a
symmetric 4-valve engine
• Check that Engine type is Gasoline and the
Cylinder radius is 45 (see Figure 4-6). All
other parameters in this panel are not used for
the Trimming method
• Click Ok to accept the current settings and
close the panel

4-4 Version 4.20


Chapter 4 MESHING WITH THE TRIMMING METHOD
Creating the 2D Base Template

The starting crank angle is the 0-lift point before the valve begins to move (see
vlift01.dat) and the engine speed is 3600 RPM.
To set the corresponding STAR “events” parameters:
• In the Create Template panel, click Events
• In the Events parameters panel, set Crank angle start (deg) to 320 and Crank
angle stop (deg) to 1080
• Set Engine RPM to 3600
• Check that the Connecting rod length is 145, the Piston pin offset is 0 and the
Valve lift periodicity (deg) is 720 (see Figure 4-6)
• Click Ok

Figure 4-6 Modified General parameters and Events parameters panels

Version 4.20 4-5


MESHING WITH THE TRIMMING METHOD Chapter 4
Creating the 2D Base Template

Next, you must create a 2D base template for Valve 1. This procedure requires
setting parameters in the Section Tool panel to define the cell count in certain parts
of the template. For definitions and illustrations of this panel’s parameters see
Chapter 4, “The Section Tool panel and the Section Adjustment points” in the User
Guide. You should then manually adjust the mesh in the Workspace window to
improve the cell distribution and quality.
To begin creating the 2D template for Valve
1:
• In the Create Template panel, select
Section 1 from the Sections pull-down
menu
• In the Section 1 Tool panel, click the upper
Load button located next to the
valve01.dat field to load the internal
valve information for Valve 1
• Click Create to activate the General
Workspace window and plot the section, as
shown in Figure 4-7

Figure 4-7 Section 1 after loading the valve


information

You can reduce the cell count to reduce processing times, but a coarse mesh
compromises the solution accuracy. However, as this tutorial presents a simplified
case, a low cell count is acceptable. The cell density in the valve region is a major
factor affecting the overall cell count of the model. You can control the mesh
density in this region by adjusting the number of circumferential cells around the
valve.
To reduce the cell count:
• In the Section 1 Tool, set Circumferential cells to 56

4-6 Version 4.20


Chapter 4 MESHING WITH THE TRIMMING METHOD
Creating the 2D Base Template

• To see the result of this modification, click Create in the Section 1 Tool panel

For most mesh adjustments, it is easier and more intuitive to use the cursor in
interactive graphics mode.
• In the Section 1 Tool, click Adjust and notice that several adjustment points
appear in the Workspace window, as shown in Figure 4-8.

Adjusts “Bottom ring


radial cells”

Adjusts number of
circumferential cells
around valve

Adjusts
“Inner ring
radial cells”

Adjusts
“Outer ring
radial cells”

Figure 4-8 Section 1 in ‘Adjust’ mode

You can now use interactive GUI tools to alter the section until a mesh of reasonable
cell size and quality is created. Note the text at the bottom of the Workspace window
when moving the cursor over one of the adjustment points.
• A left-click or middle-click decreases or increases, respectively, the value by
2
• A right-click resets the value to the default of 72
• Typing a number before a left-click or middle-click decreases or increases,
respectively, the value by that typed number
• Typing u or r performs an “undo” or “redo”, respectively
• Clicking with any mouse button on an empty part of the window or typing q
quits the ‘Adjust’ mode

The valve mesh is known as an O-grid, being made up of a 12x12 Cartesian mesh
with a one-layer polar mesh surrounding it. This polar mesh is called the “Bottom
ring radial cells”. The adjustment point that is associated with this parameter is

Version 4.20 4-7


MESHING WITH THE TRIMMING METHOD Chapter 4
Creating the 2D Base Template

located along the mesh line of the core Cartesian grid. The default value of 2
provides adequate quality in the outer cells on this grid.
However, you need to coarsen the polar mesh around the valve region, called the
“Outer ring radial cells”:
• Click twice over the adjustment point labelled “Outer ring radial cells” in
Figure 4-8 to decrease it from the default value of 5 to 3
• Accept the default value of 1 for the “Inner ring radial cells”

The 2D template at this stage is shown in Figure 4-9

Figure 4-9 Section 1 after valve modifications

If possible, attempt to match some areas of the 2D base template with features on
the cylinder dome. For this example, there is a feature between the flat and angled
portions of the combustion dome (squish region) that can be matched with a mesh
line in Section 1. This line can be obtained by adding a special triangular region to
the section. From the current viewpoint of looking down along the +z axis, this
geometric feature appears to the right of Valve 1.
In the following steps, you will employ the ‘double-plotting’ feature by
overlaying both the Geometry and General Workspace windows using the
suggested plot settings of Figure 4-10:
• In the Plot Tool, activate the Geometry window from the drop-down menu
• In the Geometry window, enter the following command to isolate the cylinder
dome cells

CSet, Newset, Name, Head

4-8 Version 4.20


Chapter 4 MESHING WITH THE TRIMMING METHOD
Creating the 2D Base Template

• In the Plot Tool, deselect the Mesh toggle button


• Activate the Workspace window
• In the Plot Tool, deselect the Fill toggle button
• Click DPlot to plot the display in the Workspace window over the display in
the Geometry window

Figure 4-10 Plot Tool settings for double-plotting

As a result of the difference in colours on the cylinder dome, the feature between
the flat and angled portions of the dome appears as a vertical line.
• In the Section 1 Tool, click Adjust
• Click the adjustment point on the lower-right corner to select the bottom
position
• Click the previously mentioned feature to move the vertical mesh line along
the bottom edge of the x-axis to the new parallel position, as shown in Figure
4-11

2. Click 1. Click
to move to choose

Figure 4-11 DPlot: Adjusting the right-bottom position

Version 4.20 4-9


MESHING WITH THE TRIMMING METHOD Chapter 4
Creating the 2D Base Template

The right-hand boundary of the section has moved to match the feature, as shown
in Figure 4-12

Figure 4-12 DPlot: After the right-bottom adjustment

Next, you must create a new triangular region to the right of the 2D template, as
shown in Figure 4-13, using the Right triangle exists parameter. Note that with
Right triangle exists activated, further adjustment of the vertical mesh line will also
automatically adjust the newly created triangular region.
To create a triangular region on the right-hand side of the 2D template:
• In the Section 1 Tool, set the Right triangle exists option to Yes
• Click Create
• In the Plot Tool panel, select the Fill option and then click CPlot

4-10 Version 4.20


Chapter 4 MESHING WITH THE TRIMMING METHOD
Creating the 2D Base Template

Figure 4-13 2D Template after using the Right triangle exists option

Other important areas for modification are the three triangular regions at the corners
of the section. There are two issues with these regions:
1. The placement of the corner attachment points
2. The cell density within the regions

To address these issues, begin by modifying the mesh as follows:


• Move the cursor over the upper adjustment point of the “Right triangle”
region, as shown in Figure 4-14, and note the text at the bottom of the window
• Left-click to choose this point for adjustment. All other adjustment points
become clear and the text changes to:

• Left-click the vertex that is two positions away in the clockwise direction, as
shown in Figure 4-14

Version 4.20 4-11


MESHING WITH THE TRIMMING METHOD Chapter 4
Creating the 2D Base Template

1. Click
to choose

2. Click to
choose new
attachment
point

Figure 4-14 Adjusting the attachment point of the right triangle

Notice the improvement in the interior angles connected to the new adjustment
point and the improved mesh orthogonality in the region outside the valve and
closest to the cylinder wall.
Similar improvements can be made by repeating the previous steps for the other
three triangular regions:
• For the triangular region in the lower-right corner, move the top adjustment
point counter-clockwise by one position, as shown in Figure 4-15

Figure 4-15 Adjusting the attachment point of the lower-right triangle

• For the triangular region in the upper-left corner, move the right adjustment
point clockwise by four positions, as shown in Figure 4-16

4-12 Version 4.20


Chapter 4 MESHING WITH THE TRIMMING METHOD
Creating the 2D Base Template

Figure 4-16 Adjusting the attachment point of the upper-left triangle

The previous operations result in greater cell size uniformity in the “Outer ring
radial cells” region, as shown in Figure 4-17.

Figure 4-17 Workspace window: Section 1 after attachment point adjustments

Since the spark plug is located in the triangular region on the lower-left corner of
Section 1, increasing the cell density in this region improves the solution accuracy.
You can control the cell density of the triangular region by increasing or decreasing
the number of cell layers from the centre to each of the three edges.
• Click the adjustment point in the centre of this triangular region and note the
text at the bottom of the plotting window (see Figure 4-18). Notice the three
adjustment points in the middle of each edge of the triangular region and the
change in the text

Version 4.20 4-13


MESHING WITH THE TRIMMING METHOD Chapter 4
Creating the 2D Base Template

• Middle-click the adjustment point in the interior of the section twice to add
two additional cell layers between the centre and the corresponding edge
• Finish the triangular region adjustment by clicking off the mesh or typing q
on the keyboard

2. Middle-click
twice to
increase by 2

1. Left-click
to choose

Figure 4-18 Changing the cell count within the bottom-left triangular region

Use a similar technique to reduce the cell count in the “Right triangle” region:
• Left-click the adjustment point in the centre of this region to select it
• Middle-click the bottom adjustment point four times to increase the number
of cells from that edge to the centre. This adjustment decreases the overall cell
count in the region
• Middle-click the left adjustment point once to increase the number of cells
from that edge to the centre
• Finish the region adjustment by clicking off the mesh or typing q on the
keyboard

3. Middle-click once 1. Left-click


to increase by 1 to choose

2. Middle-click four times


to increase by 4

Figure 4-19 Changing the cell count within the right triangular region

Section 1 now has an acceptable cell distribution and quality, shown in Figure 4-20.

4-14 Version 4.20


Chapter 4 MESHING WITH THE TRIMMING METHOD
Creating the 2D Base Template

Figure 4-20 Workspace window: Final Section 1

Section 2 can be built in a similar way. Typically, the exhaust valve is smaller than
the intake valve and therefore needs fewer circumferential cells. However, you
should use more “Outer ring radial cells” than the intake valve section to maintain
a consistent cell spacing.
As Valve 2 is a recessed valve, you can specify a few extra parameters to capture
this feature accurately in the 2D template. Inspection of the geometry reveals an
axisymmetric “step” feature that is at a radial distance of 16.5 millimetres in the
local valve coordinate system. You can force the outer radial cell layer nearest to
the valve to be a concentric ring of cells with a radial cell length of 1 millimetre.
When creating Section 2, you must set the inner and outer circular mesh lines to be
at a radial distance of 15.5 and 16.5 millimetres from the centre of the valve. Forcing
this outer mesh line to coincide with the geometric feature of the recessed valve
results in a better trimmed mesh.

Version 4.20 4-15


MESHING WITH THE TRIMMING METHOD Chapter 4
Creating the 2D Base Template

To begin defining the 2D template for Valve


2:
• In the Create Template panel, select
Section 2 from the Sections drop-down
menu
• In the Section 2 Tool, click Load to load
the valve data
• Set Circumferential cells to 48
• Set Outer ring radial cells to 4
• Click the Edit section parameters button
in the Section 2 Tool panel to allow direct
access to additional parameters
• Note that he valve radius is 15.5
millimetres, so change the Valve border
width to 1 to model the valve recess
• Accept the remaining defaults and click
Create to display Section 2

The attachment points and cell densities of the triangular regions can be adjusted in
a similar manner to Section 1.
• Using similar techniques to Section 1, adjust the cells in Section 2 as follows:
• Move the bottom-right adjustment point to coincide with the geometry
feature on the cylinder head
• Set Left triangle exists to Yes
• Move the attachment points to improve cell orthogonality, as shown in
Figure 4-21

4-16 Version 4.20


Chapter 4 MESHING WITH THE TRIMMING METHOD
Creating the 2D Base Template

Figure 4-21 Moving attachment points for Section 2

• Modify the cell count to reduce cell density and match the number of cells
at the interface between Section 1 and Section 2, as shown in Figure 4-22

Add 2 Layers

Add 1 Layer

Add 3 Layers

Add 3 Layers

Figure 4-22 Modifying the cell count for Section 2


Version 4.20 4-17
MESHING WITH THE TRIMMING METHOD Chapter 4
Creating the 2D Base Template

Figure 4-23 shows the completed 2D template for Section 2.

Figure 4-23 Workspace window: Final Section 2

Following every modification, the es-ice window updates the number of cells on
each side of the shared interface. Only when they are equal are you able to continue.
• In the Create Template panel, click Store to smooth the mesh and connect the
two sections together, as shown in Figure 4-24

Figure 4-24 Workspace window: Completed 2D base template

4-18 Version 4.20


Chapter 4 MESHING WITH THE TRIMMING METHOD
Creating the 3D Template

Creating the 3D Template


Now that the 2D template has been created, you can adjust the remaining parameters
in the third template dimension using the Create Template panel. Note that, in
general, a value of “0” in the parameter boxes means that es-ice will calculate a
default value. It is recommended that you initially use as many parameter defaults
as possible.
By looking at the Valve 1 lift file (vlift01.dat), you can see that the
maximum valve lift is close to 9.4 millimetres. The aim of this tutorial is to achieve
a cell spacing of 1 millimetre at maximum valve lift. This consideration will
therefore determine some of the settings you will apply to the model in the
following steps (see Chapter 4, “The Valve parameters panel” in the User Guide for
more information on valve parameters). Note that when modeling valves using the
trimming method many of these parameters are not required.
To define the valve parameters:
• In the Create Template panel, select Valve 1 from the Valves drop-down menu
• In the Valve 1 parameters panel (see Figure 4-25), ensure Style (Trimmed) is
set to Trimmed
• Set Reference lift to 10
• Set Reference cells to 10
• es-ice aims to maintain the vertical cell spacing in the valve curtain equal
to the Reference lift divided by the Reference cells. Therefore, the above
parameters will give a cell spacing of approximately 1 millimetre
• Ensure that Early reference lift is set to 2
• Ensure that Early reference cells is set to 4
• These parameters result in a finer mesh for low valve lifts, as es-ice aims
to create four cells when the valve is open by 2 millimetres. This setting
gives a cell spacing of approximately 0.5 millimetres at low valve lift.
• Ensure that Closed lift is set to 0.1
• This parameter is the valve lift at which the STAR solver considers the
valve as closed, which will then avoid a large pressure difference across a
small area.
• In addition, this distance allows room for two extrusion layers (on the
valve face and on the valve seat) and one Closed cell layer when the valve
is closed. You will apply a full extrusion layer at a later stage.
• Ensure Exclude on close is set to No
• Accept the remaining default values and click Ok
• Repeat these settings for Valve 2, as shown in Figure 4-25

Version 4.20 4-19


MESHING WITH THE TRIMMING METHOD Chapter 4
Creating the 3D Template

Figure 4-25 3D parameters for Valves 1 and 2 (see also Figure 4-25 in the User Guide)

The final stage in creating the 3D template is to define the Cylinder and Trim
parameters. As part of this process, you will set the Piston DZ parameter to move
the piston automatically by a specified amount before trimming. Recall that the
piston is currently at the TDC position, but template trimming requires you to move
the piston down a few millimetres. This increased clearance allows enough space
for the mesher to add several deletion layers between the dome and the piston. If the
piston does not move by the specified amount, it is probably because you have not
set Geometry CSet 2 correctly.
To set the Cylinder and Trim parameters:
• In the Create Template panel, click Cylinder
• In the Cylinder parameters panel (see Figure 4-26), set the Piston stroke
length to 68.5

4-20 Version 4.20


Chapter 4 MESHING WITH THE TRIMMING METHOD
Creating the 3D Template

• Accept the remaining default parameters and click Ok


• In the Create Template panel (see Figure 4-26), click Trim
• In the Trim parameters panel set Piston DZ to -10; this is a good starting
value for most cases
• Set Layers below to 40
• Set Layers above to 6
• Adjust these parameters so that the generated 3D template covers the
piston, the dome and the valve seat. An example of the result of this
adjustment is shown in Figure 4-29.
• Note that entering large parameter values guarantees that the template
covers the geometry. However, this practice is not recommended because
it increases the size of the es-ice model file.
• Set Cell height to 0.8
• This setting ensures that the template cell layers are created with a height
of approximately 1 millimetre. This is very close to the cell height in the
valve curtain, as previously defined.
• Accept the remaining default parameters and click Ok

Figure 4-26 Modified cylinder and trim parameters

Figure 4-27 shows that the piston has moved down by 10 millimetres.

Version 4.20 4-21


MESHING WITH THE TRIMMING METHOD Chapter 4
Creating the 3D Template

Figure 4-27 Piston moved down by 10 mm (Piston DZ parameter - Trim Parameters


panel)

After all parameters have been set:


• In the Create Template panel, click Make Template to create the template
and write its data to a file with default name save_ice
• Click Read Template to read the 3D template into the current working
session and plot it in the Template window, as shown in Figure 4-28

Figure 4-28 Template window: 3D template for trimming

4-22 Version 4.20


Chapter 4 MESHING WITH THE TRIMMING METHOD
Creating the 3D Template

Note that new local coordinate systems are created for the valves (with coordinate
system IDs 13 and 14). These systems are repositioned to the bottom of the closed
valves and rotated to θ = 0.
Finally, create a double-plot of the template over the geometry surface to check
that enough cell layers are included to generate a trimmed template.
• In the Plot Tool, select Geometry from the drop-down menu to activate the
Geometry window
• Collect all geometry cells into the current cell set
• Deselect the Mesh toggle button
• Select Template from the drop-down menu to activate the Template window
• Deselect the Fill toggle button
• Set Views to 0, -1, 0
• Click DPlot to display the template on top of the geometry surface, as shown
in Figure 4-29.

Figure 4-29 Template window: Overlay of template and geometry

It is recommended that you save your work up to this point by writing the current
model data into a new save_es-ice file.
• In the Write Tool, enter
save_es-ice.2-beforetrim and click
Save

Version 4.20 4-23


MESHING WITH THE TRIMMING METHOD Chapter 4
Trimming the 3D Template to the Geometry

Trimming the 3D Template to the Geometry


The final stage in the Trimming process is to cut the 3D template to the geometry
surface. Trimming produces a discretised representation of the internal engine
volume. At this stage, you will also perform some quality checks, merge small
edges to improve cell connectivity and add an extrusion layer to the wall
boundaries.
To cut the template to the geometry surface:
• In the Select panel, click Trimming
• In the Trim panel, click Cut to begin trimming
the template
• The Child output panel displays the process
output and any error messages from the
trimmer
• es-ice automatically separates the different
regions of the model before trimming them
• Once trimming is finished, click Status to display information about the
trimmed regions. Included in the output is the number of cells for each
separate region.

The next step is to verify that the correct vertices are stored in Template VSet 10.
• In the Trim panel, check that the Cylinder
option is selected
• Click Get to load the cylinder part of the mesh
into the Template window, and put Template
VSet 10 into the currently active vertex set
• In the Plot Tool, activate the Fill toggle button,
click CPlot, and manipulate the view to display
the cylinder mesh as shown in Figure 4-30

Figure 4-30 Cylinder Database with VSet 10

Although vertices are correctly defined in this tutorial, it is possible that in your own
4-24 Version 4.20
Chapter 4 MESHING WITH THE TRIMMING METHOD
Assembling the Trimmed Template

cases some vertices will be missing from Template VSet 10.


• To add any missing vertices, select Sets > VSet > Add > Cursor (equivalent
to command VSet, Add, Cursor) from the menu bar
• To remove vertices, select Sets >VSet > Delete > Cursor (equivalent to
command VSet, Delete, Cursor) from the menu bar
• Once the correct vertices are in the current vertex set, save them into Template
VSet 10 (labelled Cylinder wall vertices) by clicking T: cylinder verts 10 in
the training panel
Improving cell connectivity
The trimmed template often contains short edges whose vertices are difficult to
smooth using the es-ice built-in smoother algorithm. These difficulties arise
because short edges result in polyhedral cells with many cell faces.
To collapse small edges or to reduce the number of
polyhedral cell faces:
• In the Trim panel, select the Cylinder part from
the drop-down menu and click Get
• Select Edges from the drop-down menu and
enter 0.05 in the adjacent box
• Click VMerge to collapse edges whose length
is less than or equal to 0.05
• Click Put to put the updated trimmed template
back into the trimming database
• Repeat the previous steps for the ports and valves

Assembling the Trimmed Template


In a previous section you defined a flow boundary on the Intake and Exhaust ports.
This creates a patch on the flow boundary regions of both ports (see Figure 4-31).
These patches project the wall cell layers onto the flow boundaries.

Intake

Figure 4-31 Creating a patch on inlet boundary faces


Version 4.20 4-25
MESHING WITH THE TRIMMING METHOD Chapter 4
Assembling the Trimmed Template

You can now assemble the mesh parts and add a prismatic cell layer to the wall
boundaries.
• In the Trim panel, set Extrusion to 0.4 to add a prismatic layer of 0.4 mm to
the full model
• Click Assemble to combine the mesh parts

Figure 4-32 shows the completed trimmed template.

Figure 4-32 Assembled model

Figure 4-33 is a section plot of the assembled model showing the cell layers on the
wall and flow boundaries

Wall boundary Flow boundary


cell layer cell layer

Figure 4-33 Section plot of the complete assembly with a full extrusion layer

4-26 Version 4.20


Chapter 4 MESHING WITH THE TRIMMING METHOD
Running Star Setup

Running Star Setup


The final stage of the trimming method is to run Star Setup. This process generates
the make_ev.tab file, which details the cell layer addition and deletion events for
the cylinder and valves. It also creates and stores the save_ice_after_map file
as an image within the model file.
You can add command-line options by clicking the List button above the scroll
list box and then looking up the command in the Help panel. It is necessary to
separate these options with a space, or by entering them on separate lines.
To run Star Setup:
• In the Select panel, click Star Setup
• In the Star Setup panel, activate the Reset
smoothers toggle button
• Deactivate the Use unwarper toggle button
• Check that the Use Star controls toggle
button is selected
• Select pro-STAR 4.20 from the pro-STAR
pull-down menu
• Click Star setup

Saving the Model


• In the Write Tool, enter
save_es-ice.3-starsetup and click
Save

Version 4.20 4-27


Chapter 5 CREATING AND CHECKING THE MESH

Chapter 5 CREATING AND CHECKING THE MESH


The model at the beginning of this chapter can be resumed from file:

save_es-ice.3-starsetup

So far, no complete mesh displayed in an es-ice window has been suitable for use
by STAR for flow calculations. To check an actual computational mesh, you must
first create it and then display it in the Workspace window.
It is recommended that you create and check meshes corresponding to various
key crank angles before investing CPU time in a STAR CFD analysis. Typically,
the key angles considered are the starting crank angle, TDC, BDC and the crank
angles producing maximum valve lifts. In this chapter, you will use the Create
Results > Select panel to identify these angles and create the corresponding mesh.
To create and check the computational mesh:
• In the Select panel, click Create Result
• In the Create Result panel (see Figure 5-1), select the Interpolate toggle
button to interpolate vertex locations, as opposed to those created by the
internal es-ice smoothing algorithms
• Ensure that the Use database toggle button is selected to write the mesh to a
.dbs file
• Click Select
• In the Create Results > Select panel, click Read model to read the key crank
angles into the panel
• Click Use next to TDC to create the computational mesh at TDC
• When the Child process is complete, click Read Result to import the
resulting mesh into the Workspace window
• Note that a result.d360.0.dbs file is created in the working
directory. This file contains the mesh at the specified crank angle

Figure 5-1 Create Results and Create Results > Read panels
Version 4.20 5-1
CREATING AND CHECKING THE MESH Chapter 5

• Enter the following command to check for cells with negative volumes:

Check, NegVolume

• In the Plot Tool, select Section from the plot


type drop-down menu
• Enter the following commands to set up a
suitable view, as shown in Figure 5-2:

SPoint, 0, 19.5, 0
SNormal, 0, 1, 0
View, 0, -1, 0
CPlot

Figure 5-2 Computational mesh at TDC for a trimmed mesh

• Follow a similar procedure to create, read and check results at BDC (see
Figure 5-3), Valve 1 maximum lift (see Figure 5-4) and Valve 2 maximum lift
(see Figure 5-5). Note that some lines running through the mesh are not actual
mesh lines but rather the result of plotting a section that cuts through cells at
some awkward places.

Figure 5-3 Computational mesh at BDC for a trimmed mesh


5-2 Version 4.20
Chapter 5 CREATING AND CHECKING THE MESH

Figure 5-4 Computational mesh at maximum Valve 1 lift for a trimmed mesh

Figure 5-5 Computational mesh at maximum Valve 2 lift for a trimmed mesh

Version 4.20 5-3


Chapter 6 STAR SET-UP IN ES-ICE

Chapter 6 STAR SET-UP in es-ice


The model at the beginning of this chapter can be resumed from file:
save_es-ice.3-starsetup

The following tutorial data files are used in this chapter:


TRIMMING_TUTORIALS/manifold.dbs
TRIMMING_TUTORIALS/cylinder-3600.dat
TRIMMING_TUTORIALS/intake-3600.dat
TRIMMING_TUTORIALS/exhaust-3600.dat

The model at the end of this chapter is saved to file:


save_es-ice.4-final

es-ice is designed to set up and run moving mesh problems for engine simulation as
quickly and efficiently as possible. For this reason, the Star Controls panel (initially
implemented in es-ice version 2.00) is designed to minimise the additional
information needed to set-up a CFD analysis via the pro-STAR interface.
The Star Controls panel will supply the following items:
• Modifications to valve lift profiles
• Further changes to Star Setup parameters (Engine RPM, Start (deg), Stop
(deg))
• Modifications to cylinder compression ratio
• Addition of static meshes to the initially generated mesh (e.g. manifolds)
• Combustion model data, in particular:
• Fuel type
• Model calibration parameters
• Ignition timing and location
• Knock and soot models
• Initial conditions for the cylinder and ports:
• Velocity
• Pressure
• Temperature
• Turbulence
• Gas composition
• Boundary conditions for individual cylinder and port boundaries:
• Adiabatic, fixed and mapped temperature walls
• Flow rate
• Pressure
• Temperature
• Turbulence
• Gas composition
• Post-processing set-up
• Time step controls
• Special files needed for importing the model into pro-STAR

Version 4.20 6-1


STAR SET-UP IN ES-ICE Chapter 6
Load Model

Load Model
The Load model view loads the model into the Controls Workspace window.
• Click Load model on the left of the Star Controls panel (see Figure 6-1)
• Click Load model

Figure 6-1 Star Controls panel: Load model view

Analysis Set-up
The Analysis setup view is used to specify preliminary combustion model settings
and parameters that define the initial scalar composition. The mass fractions of
these scalars are calculated when you go through the “Write Data” section at the end
of this chapter.
To complete the Analysis setup stage for this tutorial:
• Click Analysis setup on the left of the Star Controls panel (see Figure 6-2)
• Check that the Combustion toggle button is selected so that you can include a
combustion model in the problem set-up
• Set the combustion model to ECFM-3Z, spark
• Set the fuel type to n-octane / iso-octane and Premixed
• Set the Mixture option to Phi and enter 1.3 for the air-fuel ratio
• Set the EGR definition to Air+Exhaust and enter 5% in the adjacent box to
specify that 5% of the intake charge is recirculated exhaust gas

6-2 Version 4.20


Chapter 6 STAR SET-UP IN ES-ICE
Valve Lifts

Figure 6-2 Star Controls panel: Analysis setup view

Valve Lifts
The Valve lifts view allows you to shift and modify the valve lift profile using
anchors and multipliers. You can also adjust some of the Star Setup parameters and
the compression ratio.
In this tutorial, no changes are required as the vlift01.dat and
vlift02.dat files initially imported into the model in Chapter 4 are correctly set
up.
To display the relevant data via the Valve lifts view:
• Click Valve lifts on the left of the Star Controls panel, as shown in Figure 6-3

Version 4.20 6-3


STAR SET-UP IN ES-ICE Chapter 6
Assembly

Figure 6-3 Star Controls panel: Valve lifts view

Assembly
The Assembly view allows you to add static meshes, such as manifolds and
replacement ports, that need to be included in the overall model. In the following
steps, you will add static meshes representing the intake and exhaust manifolds:
• Click Assembly on the left of the Star Controls panel (see Figure 6-4)
• Click the ellipsis (...) next to Database file and select manifold.dbs via
the file browser
• Click the ellipsis (...) next to Database ID and select 1 Intake Manifold via
the database browser
• Click Get to load the intake manifold into the Controls Workspace window
• Click the ellipsis (...) next to Database ID and select 2 Exhaust Manifold via
the database browser
• Click Get to load the exhaust manifold into the Controls Workspace window

The es-ice output window will display the following commands:

IceTemplate, Controls, Pieces, DBRead, "manifold.dbs", 1


IceTemplate, Controls, Pieces, DBRead, "manifold.dbs", 2

These commands indicate that the intake manifold cells have been read into es-ice.
6-4 Version 4.20
Chapter 6 STAR SET-UP IN ES-ICE
Assembly

This part of the model is read into the Controls Workspace window by default if
button into General Workspace is not selected.

Figure 6-4 Star Controls panel: Assembly view

If you wish to perform additional mesh-change operations on any other part, use the
General Workspace window. After making the required changes, click Load to load
the current cell set from the General Workspace into the Controls Workspace
window. All cells in the Controls Workspace window will form the version of the
mesh that can be imported into pro-STAR.
After the two manifolds are imported into the Controls Workspace window,
create cell couples joining the ports to the manifolds:
• In the Plot Tool, deselect the Fill toggle button
• With the Controls Workspace window active, enter the following commands

CSet, All
CPlot

• In the Star Controls panel, select the Partial toggle button


• This option permits coupling of part of the intake manifold to the intake
port (see Figure 6-5)
• Click CP Match
• In the Controls Workspace window, click an interior face, as shown in Figure
6-5

Version 4.20 6-5


STAR SET-UP IN ES-ICE Chapter 6
Assembly

Interior Face

Figure 6-5 Creating cell couples

es-ice temporarily creates patches, then cell couples and then plots the new cell
connectivity. If the cell couples are incorrectly defined, you can undo the coupling
by clicking Undo. Note that the interior faces between these two bodies will
disappear after you have successfully created the cell couples.
Continue to couple the manifolds to the ports as follows:
• In the Star Controls panel, deselect the Partial toggle button and click CP
Match
• In the Controls Workspace window, pick an interior face between the exhaust
port and exhaust manifold
• In the Star Controls panel, click CP Transform to transform cells containing
master/slave coupled cell faces into polyhedral cells
• CP Transform deletes the cell couples and replaces them with
one-to-one connections between cell faces, as shown in Figure 6-6.
• Click Finish to finish defining cell connectivity and pro-STAR moving-mesh
“events”

6-6 Version 4.20


Chapter 6 STAR SET-UP IN ES-ICE
Combustion

Before CP Transform After CP Transform

Figure 6-6 Cell transformation following the CP Transform operation

Combustion
The Combustion view allows you to specify the ignition timing and location, and
activate the knock model. For more details on Combustion see Chapter 8,
“Combustion” in the User Guide.
To set up the combustion model for this tutorial:
• Click Combustion on the left of the Star Controls panel (see Figure 6-7)
• Check that the Spark time value specifying the ignition timing is set to 700
• Set Location XYZ to 0, 0.1, 4.2 to specify the ignition location
• Set Knock to On

Figure 6-7 Star Controls panel: Combustion view

Version 4.20 6-7


STAR SET-UP IN ES-ICE Chapter 6
Initialization

Initialization
The Initialization view sets the initial conditions (velocity, pressure, temperature
and turbulence) for the cylinder, intake and exhaust ports. For more details on this
process see Chapter 8, “Initialization” in the User Guide.
Cylinder
To check that the correct cells are included in the Cylinder domain:
• Check that Cylinder is selected from the domain drop-down menu (see
Figure 6-10)
• Click Define to check that es-ice has the correct cell type definitions. This
displays the cells and opens the Cell Type Tool (see Figure 6-8)
• If this domain contains cells of the correct type, continue specifying their
initial flow variable values. If not, use the Cell Type Tool to add and/or
remove cell types until the correct ones are selected. Clicking Define in the
Cell Type Tool to confirm any changes you have made.

Figure 6-8 Cell types for Cylinder 1

For initial conditions, you can specify a constant initial value or use a value from a
table. In this tutorial, you will use a table stored in an external file. When using a
table, initial pressure and temperature for the selected domain is based on the initial
crank angle at the beginning of the STAR calculation. For example,
Cylinder-3600.dat contains cylinder pressure and temperature as a function
of crank angle, as shown in Figure 6-9.

CA P(Bar) T(K)

Figure 6-9 Contents of cylinder-3600.dat


6-8 Version 4.20
Chapter 6 STAR SET-UP IN ES-ICE
Initialization

To set the initial conditions for the Cylinder domain:


• Set Absolute pressure to Table in file from the drop-down menu
• Click the ellipsis (...) next to Table in file and select cylinder-3600.dat
via the file browser
• Click Save to store the data as an es-ice image
• Ensure that the value next to the ellipsis for pressure is set to 2. This identifies
the table’s second column as the repository for pressures
• Set the units to bar from the drop-down menu
• Set Temperature to Table in image from the drop-down menu
• Click the ellipsis (...) and select cylinder-3600.dat via the file browser
• Set the value next to the ellipsis for temperature to 3. This identifies the
table’s third column as the repository for temperatures
• Check that the units are set to K from the drop-down menu

Figure 6-10 Star Controls panel: Initialization view of Cylinder

Port 1 and Port 2


To set the initial conditions for Port 1 and Port 2:
• Repeat the previous steps for each port, using intake-3600.dat for Port
1 and exhaust-3600.dat for Port 2 (see Figure 6-11 and Figure 6-12)
• For Port 1, check that Valve function is set to Intake
• For Port 2, set the Valve function to Exhaust

Version 4.20 6-9


STAR SET-UP IN ES-ICE Chapter 6
Initialization

Figure 6-11 Star Controls panel: Initialization view of Port 1

Figure 6-12 Star Controls panel: Initialization view of Port 2

6-10 Version 4.20


Chapter 6 STAR SET-UP IN ES-ICE
Boundary Conditions

Boundary Conditions
The Boundary conditions view sets the boundary type and boundary conditions for
the cylinder, intake and exhaust ports, and intake and exhaust valves. As with initial
conditions, boundaries for each domain are defined separately. For more details on
Boundary Conditions see Chapter 8, “Boundary Conditions” in the User Guide.
Cylinder
The relevant boundaries for the Cylinder are Piston crown, Cylinder wall,
Combustion dome and Symmetry plane. For each boundary, you can specify a Fixed
or Mapped temperature or an Adiabatic condition. In addition, you can specify
different temperatures at different heights of the Cylinder wall by using the Zone
boundary type.
In this tutorial, you will specify Fixed temperatures at all cylinder boundaries.
• Click Boundary conditions on the left of the Star Controls panel (see Figure
6-14)
• Check that Cylinder is selected from the domain drop-down menu
• Set Combustion dome regions to Fixed from the drop-down menu
• Set Temperature to 450 K
• Set Piston crown regions to Fixed from the drop-down menu
• Set Temperature to 550 K
• Set Cylinder wall regions to Fixed from the drop-down menu
• Set Temperature to 500 K

In addition, set up an Extra region to define the spark plug.


• Select the Extra region toggle button
• Set Name to Spark Plug
• Click the Define button next to the Regions box
• In the Boundary Tool, click Display all to show all Cylinder surface shells
• Click Keep picked and pick the patches that define the spark plug in the
Controls Workspace window, as shown in Figure 6-13:

Figure 6-13 Spark Plug patches

Version 4.20 6-11


STAR SET-UP IN ES-ICE Chapter 6
Boundary Conditions

• Press q to exit from the pick mode


• In the Boundary Tool, click Define to define the generated patches as the
Extra region
• Select Fixed wall from the drop-down menu and set Temperature to 600 K

Figure 6-14 Star Controls panel: Boundary conditions view

Port and Valve 1


For Port and Valve 1, the relevant boundaries are Valve stem, Valve face and Port
wall. For each boundary, you can specify a Fixed or Mapped temperature or an
Adiabatic condition. In addition, you can specify an Extra region to define the
intake flow boundary.
In this tutorial, you will specify Adiabatic conditions for all Port and Valve 1
boundaries.
• Select Port and Valve 1 from the domain drop-down menu
• Ensure that the Valve stem regions, Valve face regions and Port wall regions
are set to Adiabatic

As the intake and exhaust manifolds are external meshes added during the Assembly
process, es-ice assumes that all their boundaries are solid walls. Note that the Extra
regions > Regions box is empty, which means that flow boundary conditions have
not been assigned yet.
To define the intake flow boundary shells:
• Under Extra regions, set Name to Intake Flow Boundary
• Click the Define button next to the Regions box
• In the Boundary Tool, click Display all to show all Port 1 surface shells, as
shown in Figure 6-15

6-12 Version 4.20


Chapter 6 STAR SET-UP IN ES-ICE
Boundary Conditions

• Click Keep picked and pick the Intake Flow Boundary patch in the Controls
Workspace window, as shown in Figure 6-15

Intake Flow Boundary

Figure 6-15 Redefining wall boundary condition for Port 1

• Press q to exit from the pick mode


• In the Boundary Tool, click Define to define the generated patch as the
Extra region
• Click Close tool to close the Boundary Tool panel

In this example, a value of 132 appears in the Regions box. This value represents
the region ID for the intake boundary faces. Alternatively, if you know the region
ID, you can manually enter its value into the box. In this case, you will also need to
ensure that region ID 132 is removed from Port wall regions to avoid multiple
boundary assignments. Note that if you use the Boundary Tool, es-ice automatically
prevents multiple assignments.
To set the Intake Flow Boundary conditions shown in Figure 6-16:
• Set Absolute pressure to Environmental from the drop-down menu
• For Absolute pressure and Temperature values, follow similar steps to those
for the Initialization process to import relevant data from the
intake-3600.dat image file

Version 4.20 6-13


STAR SET-UP IN ES-ICE Chapter 6
Boundary Conditions

Figure 6-16 Star Controls panel: Boundary conditions view of Port 1

6-14 Version 4.20


Chapter 6 STAR SET-UP IN ES-ICE
Boundary Conditions

Port and Valve 2


You can now specify boundary conditions for Port and Valve 2.
• Select Port and Valve 2 from the domain drop-down menu
• Set Extra regions > Name to Exhaust Flow Boundary
• Use the Boundary Tool to select the exhaust flow boundary patch, as shown in
Figure 6-17

Exhaust Flow Boundary


Figure 6-17 Redefining wall boundary condition for Port 2

To set the Exhaust Flow Pressure boundary conditions as shown in Figure 6-18:
• Set Absolute pressure to Mean from the drop-down menu
• For Absolute pressure and Temperature values, follow similar steps to those
for the Initialization process to import relevant data from the
exhaust-3600.dat image file

Version 4.20 6-15


STAR SET-UP IN ES-ICE Chapter 6
Boundary Conditions

Figure 6-18 Star Controls panel: Boundary conditions view of Port 2

Global settings
In older versions of es-ice, the Standard wall function model was used to calculate
both momentum and heat transfer near the wall region. If you wanted to use a
different model, you had to provide it via the MODSWF user subroutine. In the
current version, three additional wall function models are available, namely
Han/Reitz, Angelberger and Modified Angelberger. Importing the es-ice model
into pro-STAR sets up these wall functions for use when running the STAR solver.
In this tutorial, you will use the default Angelberger wall function.
• Select Global settings from the domain drop-down menu
• Check that Wall function model is set to Angelberger, as shown in Figure
6-19
• Ensure that the consistently toggle button is selected
• Click Join regions

6-16 Version 4.20


Chapter 6 STAR SET-UP IN ES-ICE
Post Set-up

Figure 6-19 Star Controls panel: Boundary conditions view of Global settings

Figure 6-20 shows that all regions in each boundary field are combined into a single
region.

Figure 6-20 Star Controls panel: Boundary conditions view after Join regions

Post Set-up
The Post-setup view of the Star Controls panel allows you to obtain pressure,
temperature, air-fuel ratio and heat release data as functions of the crank angle. For
more details on the Post-setup view and the quantities calculated by es-ice see
Chapter 8, “Post set-up” in the User Guide.

Version 4.20 6-17


STAR SET-UP IN ES-ICE Chapter 6
Post Set-up

Cylinder
You can monitor gas properties at any location inside the engine cylinder as if a
transparent thermocouple or pressure transducer is placed in the fluid, without
affecting the flow field. In this section, you will create two monitoring positions at
different radial distances from the ignition point.
• Click Post-setup on the left of the Star Controls panel (see Figure 6-21)
• Set Monitoring positions > XYZ to 0, 0, 4.2 and ensure that CSys is set to 1
• Set Radius to 6 to define the first monitoring position
• Use the up/down arrows to increase the number to 2 radii
• Select Radius 2 from the drop-down menu and set Radius to 12

Figure 6-21 Star Controls panel: Post-setup view

Port 1 and Port 2


In this case, you can accept the default values for Port 1 and Port 2 shown in Figure
6-22

Figure 6-22 Star Controls panel: Post-setup view of Port 1

6-18 Version 4.20


Chapter 6 STAR SET-UP IN ES-ICE
Time Step Control

Global settings
Under the Global settings menu option in the Post-setup view, select flow variables
for which output values are required, as shown in Figure 6-23
• Set Sectors to 8 to split the valve curtain into eight discrete sections

Figure 6-23 Star Controls panel: Post-setup view of Global settings

Time Step Control


The Time step control view of the Star Controls panel allows you to enter different
time step sizes for use at different times in the simulation. For example, a time step
size suitable during combustion, during fuel spray injection, or before the valves
open and close.
• Click Time step control on the left of the Star Controls panel (see Figure
6-24)
• Set Step to 0.1 degrees crank angle
• Ensure that the Use valves toggle button is selected. This will use a smaller
time step size when valves are about to open or close

Version 4.20 6-19


STAR SET-UP IN ES-ICE Chapter 6
Write Data

Figure 6-24 Star Controls panel: Time step control view

Write Data
The Write data view in the Star Controls panel performs the final operation of
saving all data and preparing files for importing the es-ice model into pro-STAR.
The entry in the Data file box is the name of a file containing STAR user
subroutines. Do not change this name (es-ice.inp), unless instructed to do so,
as it causes STAR to fail.
The toggle buttons in the upper part of the panel refer to specific STAR user
subroutines. Selecting any of them instructs es-ice to generate the corresponding
subroutine automatically or use the pre-compiled plug-in libraries. Deselecting a
button means you will have to supply this subroutine manually.
The Save decomposition options toggle button allows you to define your own
decomposition options for running STAR in parallel, as opposed to the STAR
solver defaults. The decomposition options are defined in the Decomposition panel
described in Chapter 4, “Decomposition for Parallel Runs” of the User Guide.
To write the data files:
• Click Write data on the left of the Star Controls panel
• Ensure that the correct toggle buttons are selected, as shown in Figure 6-25
• Click Write data

6-20 Version 4.20


Chapter 6 STAR SET-UP IN ES-ICE
Saving the Model

Figure 6-25 Star Controls panel: Write data view

Saving the Model


• In the Write Tool, enter
save_es-ice.4-final and click Save

Version 4.20 6-21


Chapter 7 STAR SET-UP IN PRO-STAR
Using the es-ice Panel

Chapter 7 STAR SET-UP in pro-STAR


The following tutorial data files are used in this chapter:
es-ice.PNL
GRID_MOVE.NULL
MAKE_EV.BAT
READ_TMP.BAT (Created in Chapter 6)
template.bnd
template.cel
template.cpl
template.vrt

Most of the physics set-up is done via the Star Controls panel as described in
Chapter 6. The Star Controls > Write data stage generates a pro-STAR panel and a
series of input files that simplify the model import into pro-STAR. After importing
the model, the remaining pro-STAR tasks are to set the analysis controls and then
write data files for the STAR solver.
This chapter describes the analysis set-up procedure using pro-STAR Version
4.20 and covers the following stages:
1. Importing the model into pro-STAR via a special es-ice panel
2. Setting the Analysis Controls to define the solution method and analysis
output
3. Writing a geometry and problem file for use by the STAR solver

Using the es-ice Panel


The es-ice panel redefines pro-STAR’s memory allocation, imports the model and
defines ‘events’ that describe the piston and valve motion. These actions can be
executed by issuing pro-STAR commands, but the es-ice panel simplifies the
process by providing a set of special-purpose buttons. This panel was created
automatically during the Star Controls > Write data process, as described in
Chapter 6 of this volume.
Each region in the flow field that may potentially become separated from other
regions due to valve motion is defined as a separate “material”. Different material
types are automatically assigned to different regions according to how the valve
motion separates them from each other.
• Launch pro-STAR in the usual manner
• In the pro-STAR launch panel, accept star as the default Case Name and
click Continue
• From the menu bar, select Panels > es-ice
• In the es-ice panel (see Figure 7-1), click Resize to update the param.prp
file using MEMORY commands
• Click Model to read the boundaries, cells, cell couples and vertices of the
es-ice model. This button also reads in the initial and boundary conditions and
sets some model defaults. A report on the result of this process is written to a
file called READ_TMP.OUT.
• Click Events to define the necessary pro-STAR events and put them in a file
called star.evn. A report on the result of this process is written to a file
called MAKE_EV.OUT.
Version 4.20 7-1
STAR SET-UP IN PRO-STAR Chapter 7
Setting Solution and Output Controls

Figure 7-1 The es-ice panel

Since the last two steps involve many commands, it is difficult to locate and inspect
any pro-STAR errors. It is therefore recommended that you search the two report
files for any warning or error messages. For example, the following Linux
command can be used in your current working directory:

egrep ‘WARNING|ERROR’ *.OUT

Note that in this tutorial some non-critical warnings are reported in the files but
these can be safely ignored.

Setting Solution and Output Controls


You now need to set various analysis and output control parameters via the
pro-STAR Model Guide.
For a trimmed model, the recommended pressure correction under-relaxation
factor is 0.5:
• In the Analysis Controls > Solution Method panel (see Figure 7-2), set Under
Relaxation for Pressure Correction to 0.5
• Click Apply

7-2 Version 4.20


Chapter 7 STAR SET-UP IN PRO-STAR
Setting Solution and Output Controls

Figure 7-2 Analysis Controls > Solution Method settings

Set the analysis output controls. These determine the data available for
post-processing in pro-STAR, after the analysis is complete.
• Open the Analysis Controls > Analysis Output panel
• In the Post tab (shown to the left of Figure 7-3), set the Output Frequency to
10 and the Backup Frequency to 300
• Click Apply. These settings instruct STAR to write data to the star.ccmp
file once every 10 time steps and to create a back-up file every 300 time steps
• Select the Transient tab (shown to the right of Figure 7-3)
• Set the Starting at time (degCA) to 320 degrees crank angle
• Set the Output interval (degCA) to 5 degrees crank angle to define the
frequency of writing solution data to the transient post file
• Deselect the Wall check-box
• Select C8H18 and then select the Post check-box to write the fuel solution
data to the transient post file
• In the same way, select solution data output for density and temperature
• Click Apply

Version 4.20 7-3


STAR SET-UP IN PRO-STAR Chapter 7
File Writing

Figure 7-3 Analysis Controls > Analysis Output settings

File Writing
Finally, follow the usual pro-STAR procedure for writing the geometry and
problem files and for saving the model file, as shown in Figure 7-4.
• From the menu bar, select File > Save Geometry
• In the Save Geometry File panel, set the Geometry Scale Factor to 0.001 to
convert the problem geometry from metres to millimetres
• Click Apply and then Close
• From the menu bar, select File > Save Problem
• In the Save Problem File panel, click Save to write the star.prob file
• From the menu bar, select File > Quit
• In the Quit pro-STAR panel, click Save & Quit to save the model data and
quit the pro-STAR session

Figure 7-4 File writing and exit from pro-STAR

7-4 Version 4.20


Chapter 8 RUNNING THE STAR SOLVER
Running in Serial Mode

Chapter 8 RUNNING THE STAR SOLVER


The following tutorial data files are used in this chapter:
mvmesh.sh
star.evn
star.ccmg
star.mdl (Created in Chapters 6 and 7)
star.prob
param.prp
save_ice_after_map
es-ice.inp

star.drp (required for cases that include fuel injection)


This chapter describes the necessary steps for running a CFD analysis using the
STAR solver. Instructions for running STAR are provided for the following
scenarios, depending on your available computing resources:
• Running the analysis in a serial mode — used when you have limited
resources and only one CPU
• Running the analysis in parallel mode — used when you have multiple CPUs
• Running the analysis in parallel on multiple nodes — used when you have
access to multiple CPUs on multiple machines
• Running the analysis in batch — used when you intend to submit the analysis
job to a queuing system
• Running a restart analysis — used when your analysis was interrupted before
completion

Note that STAR runs in double precision by default. If you are running STAR-CD
on Windows, use the STAR-CD PowerShell Prompt supplied with the STAR-CD
installation.

Running in Serial Mode


If you have limited computing resources and only one CPU is available, your only
option is to run STAR in serial mode. However, as a typical engine simulation is a
transient analysis involving complex physics and a relatively large number of cells,
this mode results in large processing times.
Note that, in a serial analysis, STAR and Ice share the CPU. Therefore, STAR
can only begin calculating the CFD solution once Ice has provided the mesh for
the current time step.
To run a serial analysis:
• In a Linux terminal or PowerShell prompt, enter the following command:

star

Running in Parallel Mode


If multiple CPUs are available, you can run STAR in parallel (the recommended
mode of operation). The number of processes you assign for running the analysis

Version 4.20 8-1


RUNNING THE STAR SOLVER Chapter 8
Running in Parallel on Multiple Nodes

are divided between STAR and Ice, depending on various settings in the
mvmesh.sh file. By default, one process is assigned to Ice and the remaining
ones to STAR. However, note that there are occasions during the analysis when
Ice requires additional computer resources, so STAR and Ice may share the same
process. For more information on running in parallel and how Ice uses computing
resources see Chapter 10 in the User Guide.
To run a parallel analysis:
• In a Linux terminal or PowerShell prompt, enter the following command:

star <N>

where <N> is the number of processes you wish to use

Running in Parallel on Multiple Nodes


If multiple nodes are available, you can run STAR across all nodes and assign a
specified number of processes to each node. For example, if you have two nodes,
each with eight CPUs, you could assign eight CPUs from the first node and four
from the second.
To run on multiple nodes:
• In a Linux terminal or PowerShell prompt, enter the following command:

star nodename1,N nodename2,M ...

where:
• nodename1 is the name of the first node, nodename2 the name of the
second node, and so on
• N is the number of processes assigned to the analysis on the first node, M
the number of processes assigned to the analysis on the second node, and
so on

Running in Batch
If you intend to submit the analysis to a queuing system and run on a cluster, you
can run STAR in batch by generating a batch script called batch.sh. When the
queuing system executes batch.sh, the batch file runs the analysis on the cluster.
To generate the batch script:
• In a Linux terminal or PowerShell prompt, enter the following command:

star -batch

You can then submit the batch script to the queuing system via an appropriate
command. For example, the PBS command is:

qsub -l nodes=N ./batch.sh

where N is the number of nodes you wish to assign to STAR.

Restarting the Analysis


If your analysis is interrupted for any reason, you can perform a restart run to
8-2 Version 4.20
Chapter 8 RUNNING THE STAR SOLVER
Restarting the Analysis

resume operations. The analysis resumes from the last time step that was written to
the star.ccmp file. To avoid STAR repartitioning the mesh, use the same number
of processes as the initial run.
To restart an analysis:
• In a Linux terminal or PowerShell prompt, enter the following command:

star -restart <N>

where <N> is the number of processes you wish to use

Restarting an analysis creates a subdirectory containing the output files from the
previous run. Note the location of these files when post-processing the results in
es-ice and pro-STAR.
Note that the -restart option adds a flag to the star.prob file. Thereafter,
each time STAR is run, the analysis restarts from the last time-step in the
star.ccmp file, even if the -restart option is not supplied. Therefore, to run
the analysis from the first time step after using the -restart option:
• In a Linux terminal or PowerShell prompt, enter the following command:

star -norestart <N>

The -norestart option removes the flag from the star.prob file

Version 4.20 8-3


Chapter 9 POST-PROCESSING: GENERAL TECHNIQUES
Creating Plots with the es-ice Graph Tool

Chapter 9 POST-PROCESSING: GENERAL TECHNIQUES


The following tutorial data files are used in this chapter:
es-ice.pos
star.mdl
star.evn (Created in Chapters 7 and 8)
star.ccmg
star.ccmt
TRIMMING_TUTORIALS/scalar1.inp
TRIMMING_TUTORIALS/scriptScalar1.sh
TRIMMING_TUTORIALS/isoTemp.inp
TRIMMING_TUTORIALS/scriptIsoTemp.sh

The tutorial in this chapter demonstrates some general post-processing techniques


for engine data in both es-ice and pro-STAR.
es-ice can create XY plots from information in either es-ice output data files
(es-ice.pos) or external files with data arranged in columns (XYfiles). es-ice
can also calculate global engine quantities such as net indicated work, indicated
power and indicated mean effective pressure. In addition, it can calculate apparent
heat release from pressure data.
pro-STAR can produce two-dimensional and three-dimensional images
displaying scalar and vector quantities within the problem geometry. This feature
can be used to analyse conditions within the engine cylinder at a given time step. A
series of images can also be exported at each time step and then used with
third-party software to animate the entire transient analysis results.
The tutorial covers the following topics:
• es-ice:
(a) Creating plots using the es-ice graph tool
(b) Calculating apparent heat release from a pressure plot
(c) Creating a plot displaying pressure against volume (indicator diagram)
(d) Calculating global engine quantities
• pro-STAR:
(a) Creating a two-dimensional display of velocity vectors through the intake
valve at maximum valve opening
(b) Creating a three-dimensional animation of fuel distribution within the
cylinder over the entire transient solution
(c) Creating a three-dimensional, four-view animation of temperature
isosurfaces within the cylinder over the entire transient solution

Examples of post-processing diesel engine models are provided in Chapter 18 of


this volume.

Creating Plots with the es-ice Graph Tool


This section details the creation of plots using the es-ice Graph Tool. Two plots are
created, one showing temperature against crank angle and the other showing valve
curtain flux for both valves. Note that in using an es-ice.pos file, all values are
plotted with respect to crank angle.
Version 4.20 9-1
POST-PROCESSING: GENERAL TECHNIQUES Chapter 9
Creating Plots with the es-ice Graph Tool

First, load the output data file (es-ice.pos) into the graph tool, which
displays a list of plot data.
• Launch es-ice in the usual manner
• In the Select panel, click Post-process. The Graph Tool is activated by default
in the Post-process panel.
• Click the ellipsis (...) button and select es-ice.pos from the file browser
• Click Read

To plot a graph of temperature against crank angle in the es-ice Graph Tool:
• Select item 12 in the list, labelled Temperature: region 1
• Click Plot

Next, modify the data range to suit the expected temperature values, with grid lines
and labels added to improve the plot clarity.
• Select the Domain toggle button
• Enter 360 and 1080 in the next two boxes in order to cover an entire engine
cycle
• Select Lines, as opposed to Ticks, from the drop-down menu and enter 8 in
the adjacent box
• Set Label to Crank Angle
• Select the Range toggle button
• Enter 0 and 2500 in the next two boxes to cover an appropriate data range
• Select Lines (as opposed to Ticks) from the drop-down menu and enter 10 in
the adjacent box
• Set Label to Temperature

When complete, the panel will look as shown in Figure 9-1.

9-2 Version 4.20


Chapter 9 POST-PROCESSING: GENERAL TECHNIQUES
Creating Plots with the es-ice Graph Tool

Figure 9-1 Temperature against crank angle plot

The Graph Tool can also plot multiple data sets in a single plot. The data set colour
can be modified to provide a clear distinction between the sets.
To create a plot of valve curtain flux against crank angle for both valves:
• Deselect the toggle button next to item 12 to clear the temperature data from
the graph display
• Select items 258 and 259 in the list, labelled Curtain flux, total: valve 1 and
Curtain flux, total: valve 2, respectively
• Click Plot
• Set the Range to -0.1 and 0.05 to cover a more suitable data range
• Set the number of lines to 15
• Set Label to Valve Curtain Flux

Version 4.20 9-3


POST-PROCESSING: GENERAL TECHNIQUES Chapter 9
Creating Plots with the es-ice Graph Tool

Currently, both data sets are plotted in red. To change the line colour for valve 2:
• Enter the following command in the main es-ice window:

Graph, Format, 259, Color, 4

In this case, 259 defines the data set and 4 changes the colour to blue
• In the Graph Tool, click Plot

When complete, the panel appears as shown in Figure 9-2.

Figure 9-2 Valve curtain flux against crank angle plot for both valves

Plots can also be exported as .gif or .png files by clicking the respective GIF or

9-4 Version 4.20


Chapter 9 POST-PROCESSING: GENERAL TECHNIQUES
Calculating Apparent Heat Release

PNG buttons in the Graph Tool.

Calculating Apparent Heat Release


This section describes the process of obtaining an apparent heat release plot from
cylinder pressure data using the es-ice post-processing tools.
The engine quantities within the Operations panel are taken from data in the
es-ice.pos file. Note that these are specified in metres, as opposed to model
units. Using this units system ensures that the calculated results are presented in
standard form. The Gamma for gas property can be adjusted depending on user
requirements. However, its default value is suitable for this tutorial.
To calculate the apparent heat release:
• Deselect the toggle button next
to items 258 and 259 to clear the
curtain flux data from the graph
display
• Locate item 9 in the list labelled
Pressure: region 1
• Click Operations and then
click Pressure: region 1 to
perform an operation on the
pressure data
• In the Operations panel, accept
the defaults and click Create
plot data
• Close the Operations panel

The previous steps add the AHR: Pressure: region 1 plot data to the list. To plot
the apparent heat release:
• Select the AHR: Pressure 1: region 1 data
• Click Plot
• Set the Range to -20 and 60 to cover a more suitable data range
• Set the number of lines to 8
• Set Label to Apparent Heat Release

When complete, the panel appears as shown in Figure 9-3.

Version 4.20 9-5


POST-PROCESSING: GENERAL TECHNIQUES Chapter 9
Plotting an Indicator Diagram

Figure 9-3 Apparent heat release plot

Plotting an Indicator Diagram


The following section describes the creation of a plot showing pressure against
volume (also known as an indicator diagram). This process involves exporting
es-ice.pos results to XY-type files and then reading relevant data from the
required file back into es-ice.
Begin by deleting all es-ice.pos plot data from the Graph Tool
• In the Graph Tool, click Delete
• Answer Yes to the prompt in the main es-ice panel

Next, write the XY file:

9-6 Version 4.20


Chapter 9 POST-PROCESSING: GENERAL TECHNIQUES
Plotting an Indicator Diagram

• Enter the following command in the main es-ice panel:

Graph, Write, Full, es-ice.pos, !

Numerous XY files are written into your current working directory but only the
Cyl1 file is required for this example. Note that all comment lines within the files
are preceded by a "!", as specified in the above command.
• Open file Cyl1 with a text editor. The first part of the file provides a
summary of its contents. As shown in Figure 9-4, columns 7 and 9 contain
volume and pressure data and these are required in this example.

Figure 9-4 Cyl1 file summary

Figure 9-5 shows the remainder of the file, which contains solution data in
column format

Figure 9-5 Cyl1 file contents

File Cyl1 is now read into es-ice and a column is chosen for the X-axis data.
• Enter the following command in the es-ice command window:

Graph, Read, Cyl1, XYfile, !, 7

This reads file data into the Graph Tool, with column 7 (volume) used for the x-axis
values. To plot cylinder pressure against volume:
• In the Graph Tool, select item 8 in the list, labelled Column 9
• Click Plot
• Set the Domain minimum and maximum values to 0 and 0.00025 to cover a
more suitable data range
• Set the number of lines to 10

Version 4.20 9-7


POST-PROCESSING: GENERAL TECHNIQUES Chapter 9
Calculating Global Engine Quantities

• Set the Label to Volume


• Change the Range minimum and maximum values to 0 and 7e+06
• Set the number of lines to 7
• Set the Label to Pressure

When complete, the panel will appear as shown in Figure 9-6.

Figure 9-6 Indicator diagram

Calculating Global Engine Quantities


This section describes the acquisition of global engine quantities from data in the
es-ice.pos file. The quantities are net indicated work, power, and indicated
mean effective pressure.

9-8 Version 4.20


Chapter 9 POST-PROCESSING: GENERAL TECHNIQUES
Creating a Velocity Vector Display

• In the Post-process panel, select


Engine from the drop-down menu
• Click the ellipsis (...) button and
select es-ice.pos from the file
browser
• Click Add to add es-ice.pos to
the Data files box
• Click Read data
• Select the Net indicated work,
Power and IMEP toggle buttons to
calculate these quantities
• Select the Cycle toggle button to
calculate results over a full 720
degree CA engine cycle
• Set the Start angle to 360
• Click Calculate

The results are displayed in the main es-ice panel, as shown below.

Creating a Velocity Vector Display


This section describes the creation of a velocity vector display at the maximum
intake valve opening, on a plane crossing the valve centreline. The image is created
using pro-STAR post-processing facilities, which require access to the model file
(.mdl), events file (.evn), geometry file (.ccmg) and transient data file (.ccmt)
saved for this case.
First, load the required time step and store the corresponding velocity data.
• In the pro-STAR Model Guide, select the Post Processing > Load Data panel,
shown to the left of Figure 9-7
• Select Transient from the Analysis drop-down menu
• Select Yes from the Moving Mesh drop-down menu
• Click Add File
• In the Transient box, select star.ccmt
• Click Open Transient File
• In the Time Step box, select time step 30. This time step is the point in the
simulation when the intake valve is fully open.
• Click Store Time
• Select the Data tab (shown to the right of Figure 9-7)
• In the Vector Data box, select Velocity Components UVW
• Click Get Data

Version 4.20 9-9


POST-PROCESSING: GENERAL TECHNIQUES Chapter 9
Creating a Velocity Vector Display

Figure 9-7 Tabs Files and Data in the Post Processing > Load Data panel

9-10 Version 4.20


Chapter 9 POST-PROCESSING: GENERAL TECHNIQUES
Creating a Velocity Vector Display

Having loaded the relevant data, proceed


with the plot creation.
• In the Post Processing > Create Plots
panel, select the Section/Clipped tab
• In the Single Plane Plot box, set the
Point coordinates to 0, 19.5, 0 and the
Normal coordinates to 0, 1, 0. These
define a plane that crosses the valve
centreline and has a normal in the
positive y-direction.
• Click Apply
• Click Plot to Screen

Manipulate the view using the mouse or appropriate commands to display the
results, as shown in Figure 9-8.

Figure 9-8 Section plot of velocity vectors at maximum intake valve opening

Version 4.20 9-11


POST-PROCESSING: GENERAL TECHNIQUES Chapter 9
Creating an Animation of Fuel Concentration

Creating an Animation of Fuel Concentration


This section provides an example of how a pro-STAR input file (scalar1.inp)
can be used to create an animation of fuel concentration throughout the transient
simulation. Opening the input file with a text editor will display its contents as
shown below. For clarity, the full command names are shown although the usual
four-letter abbreviations can be used instead.
• Connect the events file to the pro-STAR session and load the transient data

RESUME, ,
EVFILE, CONNECT
TRLOAD, ,
• Create a custom colour table for use with the colour scale

CLRTABLE, POST, 1, 1.00, 0.00, 0.00, 1.0


CLRTABLE, POST, 2, 1.00, 0.20, 0.00, 1.0
CLRTABLE, POST, 3, 1.00, 0.40, 0.00, 1.0
CLRTABLE, POST, 4, 1.00, 0.55, 0.00, 1.0
CLRTABLE, POST, 5, 1.00, 0.70, 0.00, 1.0
CLRTABLE, POST, 6, 1.00, 0.80, 0.00, 1.0
CLRTABLE, POST, 7, 1.00, 0.90, 0.00, 1.0
CLRTABLE, POST, 8, 1.00, 1.00, 0.00, 1.0
CLRTABLE, POST, 9, 0.85, 1.00, 0.10, 1.0
CLRTABLE, POST, 10, 0.70, 1.00, 0.25, 1.0
CLRTABLE, POST, 11, 0.55, 1.00, 0.40, 1.0
CLRTABLE, POST, 12, 0.40, 1.00, 0.55, 1.0
CLRTABLE, POST, 13, 0.25, 1.00, 0.70, 1.0
CLRTABLE, POST, 14, 0.10, 1.00, 0.85, 1.0
CLRTABLE, POST, 15, 0.00, 1.00, 1.00, 1.0
CLRTABLE, POST, 16, 0.00, 0.90, 1.00, 1.0
CLRTABLE, POST, 17, 0.00, 0.80, 1.00, 1.0
CLRTABLE, POST, 18, 0.00, 0.70, 1.00, 1.0
CLRTABLE, POST, 19, 0.00, 0.55, 1.00, 1.0
CLRTABLE, POST, 20, 0.00, 0.40, 1.00, 1.0
• Specify a 20-colour scale with a user-defined value range of 0 to 0.76E-01

CSCALE, 20, USER, 0, 0.76E-01


• Set up the display items

PLLOCALCOOR, OFF, ALL


PLDISPLAY, OFF, ALL
PLDISPLAY, ON, LOGO
PLDISPLAY, ON, HEAD
PLDISPLAY, ON, MINMAX
PLDISPLAY, ON, SCALE, ,8
PLMESH, OFF
• Set up the viewing position

9-12 Version 4.20


Chapter 9 POST-PROCESSING: GENERAL TECHNIQUES
Creating an Animation of Fuel Concentration

VIEW, -1, -1, 0.5


CENTER, -5, 5, -20
DISTANCE, 75
• Select the Extended Graphics display option and a 1024 x 768 resolution for
the image

TERMINAL, , EXTENDED
HRSDUMP, IMAGE, 1024, 768
• Specify the basic plotting option

POPTION, CONTOUR
• Set up a variable, it, that will be incremented at each loop iteration and begin
the loop definition

*SET, it, 1, 1
*DEFINE, NOEXECUTE
• Store the next time step

STORE, NEXT
• Set up a crank-angle display label in the lower-right corner of the screen

*GET, TIME, time


*SET, CRANK, 3600 * TIME * 6 + 320
TSCALE, 4, 15
PLLABEL, 1, FORMAT, , 4, 10, 0.5
CRANK
F6.1, ' degCA'
• Plot cell-averaged fuel scalar data

GETCELL, CONC, 1
CSET, ALL
CAVERAGE, CSET
CPLOT
• Create a counter for the filenames

*SET, itn, 1000 + it


*SCOPY, itn, sitn, i4
• Store the current display to a .gif file

*SSET, sname, image_1_{sitn}


HRSDUMP, GIF, {sname}
• End the loop definition and then execute the loop for all time steps

*END
*LOOP, 0, 152

Version 4.20 9-13


POST-PROCESSING: GENERAL TECHNIQUES Chapter 9
Creating an Animation of Fuel Concentration

Note that useful information on how to create post-processing input files can be
found in the STAR-CD documentation set, volumes “pro-STAR Commands” and
“Post-Processing User Guide”.
Input files can be used for running pro-STAR in batch mode to generate images
and animations without accessing the GUI. This facility produces consistent output
for several different models and simplifies the comparison of results.
Off-screen rendering with pro-STAR is not currently supported for Windows.
This means that the ability to use pro-STAR in batch mode to generate images and
animations is not available in the Windows environment. However, you can still use
the input file described above within the pro-STAR GUI by entering the following
command:

IFILE, scalar1.inp

Note that when accessing an input file in the pro-STAR GUI, you need to add a c
after the TRLOAD, , command as the software will prompt you to continue listing
the available time steps. This addition is not required when pro-STAR is running in
batch mode as the software will not prompt for input.
The following is an example of a batch script for a Linux machine to create a fuel
distribution animation. The script employs third-party software (Gifsicle) to create
animations using several .gif files.
• Run pro-STAR in batch mode, with input redirection to answer prompts, and
load the star.mdl model file

prostar gl -b << EOF


star
y
y
• Read the input file and execute its commands

IFILE, scalar1.inp
• Quit pro-STAR without saving and complete the input redirection

QUIT, NOSAVE
EOF
• Create an animation file called scalar1.gif using Gifsicle

gifsicle -d 10 -l -o scalar1.gif image*.gif

Figure 9-9 shows the fuel distribution in the cylinder at 400 degrees CA.

9-14 Version 4.20


Chapter 9 POST-PROCESSING: GENERAL TECHNIQUES
Creating an Animation of Temperature Isosurfaces

Figure 9-9 Fuel distribution at 400 degrees CA

Figure 9-10 shows the fuel distribution following combustion at 725 degrees CA.

Figure 9-10 Fuel distribution at 725 degrees CA

Creating an Animation of Temperature Isosurfaces


This section provides an example of how a pro-STAR input file (isoTemp.inp)

Version 4.20 9-15


POST-PROCESSING: GENERAL TECHNIQUES Chapter 9
Creating an Animation of Temperature Isosurfaces

can be used to create an animation of temperature isosurfaces throughout the


simulation. Opening the input file with a text editor will display its contents as
shown below. For clarity, the full command names are shown, although the usual
four-letter abbreviations can be used instead.
• Connect the events file and load the transient data

RESUME, ,
EVFILE, CONNECT
TRLOAD, ,
• Create a custom colour table for use with the colour scale

CLRTABLE, POST, 1, 1.0, 0.0, 0.0, 0.3


CLRTABLE, POST, 2, 1.0, 0.6, 0.0, 0.3
CLRTABLE, POST, 3, 1.0, 1.0, 0.0, 0.3
• Specify a 20-colour scale with a user-defined value range of 2200 and 2600

CSCALE, 3, USER, 2200, 2600


• Set up the display items

PLLOCALCOOR, OFF, ALL


PLDISPLAY, OFF, ALL
PLDISPLAY, ON, LOGO
PLDISPLAY, ON, HEAD
PLDISPLAY, ON, MINMAX
PLDISPLAY, ON, SCALE, ,8
• Select the Extended Graphics option and a 1024 x 768 resolution for the
image

TERMINAL, , EXTENDED
HRSDUMP, IMAGE, 1024, 768
• Set up a variable, it, that will be incremented at each loop iteration and begin
the loop definition

*SET, it, 1, 1
*DEFINE, NOEXECUTE
• Store the next time step

STORE, NEXT
• Set up a crank-angle display label in the lower-right corner of the screen

*GET, TIME, time


*SET, CRANK, 3600 * TIME * 6 + 320
TSCALE, 4, 15
PLLABEL, 1, FORMAT, , 4, 10, 0.5
CRANK
F6.1, ' degCA'

9-16 Version 4.20


Chapter 9 POST-PROCESSING: GENERAL TECHNIQUES
Creating an Animation of Temperature Isosurfaces

• Remove all manifolds from the cell set and define the current cell type as no.
501

CSET, ALL
CSET, DELETE, TYPE, 121
CSET, DELETE, TYPE, 122
CTABLE, 501, FLUID
CMODIFY, CSET
• Collect cell type 501 into a set and merge vertices for a clear view of the
results

CSET, NEWSET, TYPE, 501


VSET, NEWSET, CSET
VMERGE, VSET
• Plot cell-averaged temperature data

GETCELL, T, ABSOLUTE
CAVERAGE, CSET
• Plot an isosurface at 2600 K and create a pro-STAR “layer” (described in
Chapter 4 of the STAR-CD Post-Processing User Guide)

POPTION, ISOSURFACE, 2600


CPLOT
LAYER, ISO1, STORE
LAYER, ISO1, HIDE
• Plot an isosurface at 2400 K and create another layer

POPTION, ISOSURFACE, 2400


CPLOT
LAYER, ISO2, STORE
LAYER, ISO2, HIDE
• Plot an isosurface at 2200 K and create a third layer

POPTION, ISOSURFACE, 2400


CPLOT
LAYER, ISO2, STORE
LAYER, ISO2, HIDE
• Show all layers

LAYER, ALL, SHOW


• Display the geometry edges

PLMESH, OFF
CPLOT
EDGE, ON
REPLOT

Version 4.20 9-17


POST-PROCESSING: GENERAL TECHNIQUES Chapter 9
Creating an Animation of Temperature Isosurfaces

• Create a counter for the file names

*SET, itn, 1000 + it


*SCOPY, itn, sitn, i4
• Redisplay the mesh front view using the bottom-left corner of the graphics
window and save it to a .gif file

WINDOW, 0, 0, 5, 5
VIEW, 0, -1, 0
ANGLE, 0
DISTANCE, 100
CENTER, 0, 0, -20
*SSET, sname, image_1_{sitn}
HRSDUMP, GIF, {sname}
• Redisplay the mesh side view using the bottom-right corner of the graphics
window and save it to a .gif file

WINDOW, 5, 0, 10, 5
VIEW, 1, 0, 0
ANGLE, 0
DISTANCE, 100
CENTER, 20, 20, -20
*SSET, sname, image_2_{sitn}
HRSDUMP, GIF, {sname}
• Redisplay an isometric view of the mesh using the top-right corner of the
graphics window and save it to a .gif file

WINDOW, 5, 5, 10, 10
VIEW, 1, 1, -1
ANGLE, 0
DISTANCE, 115
CENTER, -5, 10, -25
*SSET, sname, image_3_{sitn}
HRSDUMP, GIF, {sname}
• Redisplay the mesh top view using the top-left corner of the graphics window
and save it to a .gif file

WINDOW, 0, 5, 5, 10
VIEW, 0, 0, 1
ANGLE, -90
DISTANCE, 100.0
CENTER, 0, 20, -20
*SSET, sname, image_4_{sitn}
HRSDUMP, GIF, {sname}
• End the loop definition and then execute the loop for all time steps

*END
*LOOP, 0, 152

9-18 Version 4.20


Chapter 9 POST-PROCESSING: GENERAL TECHNIQUES
Creating an Animation of Temperature Isosurfaces

Note that useful information on creating post-processing input files can be found in
the STAR-CD documentation set, volumes “pro-STAR Commands” and
“Post-Processing User Guide”.
Input files can be used by running pro-STAR in batch mode to generate images
and animations without opening the GUI. This facility produces consistent output
from several different models and simplifies the comparison of results.
Off-screen rendering with pro-STAR is not currently supported for Windows.
This means that the ability to use pro-STAR in batch mode to generate images and
animations is not available in the Windows environment. However, you can still use
the input file described above within the pro-STAR GUI by entering the following
command:

IFILE, isoTemp.inp

Note that when using an input file in the pro-STAR GUI, you need to add a c after
the TRLOAD, , and VMERGE, VSET commands, as the software will prompt you
to continue. This addition is not required when pro-STAR is running in batch mode
as the software does not prompt for input.
The following is an example of a Linux batch that creates an animation of
temperature distribution. The script employs third-party software (Gifsicle) to
create animations using several .gif files.
• Define a variable NUMB equal to 153 for use later in the script

NUMB=`ls image_1_1*.gif | wc -l`


• Run pro-STAR in batch mode, with input redirection to disable prompts, and
load the star.mdl model file

$STARDIR/bin/prostar gl -b << EOF


star
y
y
• Read the input file and execute its commands

IFILE, isoTemp.inp
• Quit pro-STAR without saving and complete the input redirection

QUIT, NOSAVE
EOF
• Convert the white background in each image to a transparent background.
Then, stack the four views on top of each other to combine them into a single
frame

sum=`expr 1000 + ${NUMB}`

for (( i=1001; $i <= ${sum}; i++ ))


do
convert image_2_${i}.gif -transparent \#ffffff

Version 4.20 9-19


POST-PROCESSING: GENERAL TECHNIQUES Chapter 9
Creating an Animation of Temperature Isosurfaces

image_2_${i}t.gif
convert image_3_${i}.gif -transparent \#ffffff
image_3_${i}t.gif
convert image_4_${i}.gif -transparent \#ffffff
image_4_${i}t.gif
done

for (( i=1001; $i <= ${sum}; i++ ))


do
composite -compose atop image_2_${i}t.gif
image_1_${i}.gif comp1_${i}.gif
composite -compose atop image_3_${i}t.gif
comp1_${i}.gif comp2_${i}.gif
composite -compose atop image_4_${i}t.gif
comp2_${i}.gif final_${i}.gif
done
• Remove unnecessary files

rm comp*.gif *t.gif
• Create an animation file called tempIso.gif using WhirlGif

gifsicle -d 10 -l -o tempIso.gif final*.gif

Figure 9-11 shows the intake valve fully open at 470 degrees CA.

Figure 9-11 Intake valve at 470 degrees CA

9-20 Version 4.20


Chapter 9 POST-PROCESSING: GENERAL TECHNIQUES
Creating an Animation of Temperature Isosurfaces

Figure 9-12 shows the combustion phase and corresponding temperature


isosurfaces at 730 degrees CA.

Figure 9-12 Isosurfaces at 730 degrees CA.

Version 4.20 9-21


Chapter 10 USING THE AUTOMATIC 2D TEMPLATE

Chapter 10 USING THE AUTOMATIC 2D TEMPLATE


The following tutorial data files are used in this chapter:
AUTO_2D/geometry.dbs
AUTO_2D/vlift01.dat (Valve 1 lift profile)
AUTO_2D/vlift02.dat (Valve 2 lift profile)
AUTO_2D/vlift03.dat (Valve 3 lift profile)
AUTO_2D/vlift04.dat (Valve 4 lift profile)
PANELS/training.pnl

The model created at the end of this tutorial is saved to file:


save_es-ice.auto2d

This tutorial demonstrates the process of generating a 2D base mesh using the
automatic 2D template feature. This generates an unstructured uniform mesh for
each valve section that is much quicker to produce compared to the manual method
of creating structured meshes. The automatic method is also better suited to
complex cylinder geometries, as you are not constrained by the requirements of
structured meshes.
The problem in this case is a diesel engine with a flat cylinder head and one
injector in the centre of the cylinder. These characteristics make the geometry ideal
for automatic 2D template meshing.
The tutorial highlights several capabilities of automatic 2D template meshing,
giving you the ability to rapidly produce high-quality, unstructured meshes. These
capabilities include:
• Simple input parameters for producing an initial mesh
• Mesh refinement with a user-defined point, radius and mesh size multiplier
• Inclusion of features on the cylinder head, by placing a mesh line on
important details and thus improving cell quality in these areas
• Additional input parameters for greater control over the mesh generation

The steps necessary to set up the tutorial are summarised below:


1. Importing the geometry surface
2. Modifying special cell sets in the geometry
3. Modeling the valve
4. Creating the automatic 2D template
5. Refining the 2D template around the injector
6. Adding features to the automatic 2D template
7. Using additional parameters for detailed control of the automatic 2D template
creation

As a prerequisite, it is recommended that you complete Chapter 3 of this volume to


familiarize yourself with the es-ice facilities for importing the engine geometry and
modelling valves.

Version 4.20 10-1


USING THE AUTOMATIC 2D TEMPLATE Chapter 10
Importing the Geometry Surface

Importing the Geometry Surface


To import the geometry surface mesh:
• Launch es-ice in the usual manner
• In the Select panel, click Read Data
• In the Read Tool, click the ellipsis (...)
next to the DBase box and select
geometry.dbs via the file browser
• Click the ellipsis (...) next to the Get
box and select 1 Surface via the
database browser
• In the Plot Tool, click CPlot

The engine geometry surface will appear in the Geometry window as shown in
Figure 10-1

Figure 10-1 Geometry window: Imported geometry surface

10-2 Version 4.20


Chapter 10 USING THE AUTOMATIC 2D TEMPLATE
Defining Special Cell Sets in the Geometry

Defining Special Cell Sets in the Geometry


In the following steps, you will use the supplied training user panel to issue the
appropriate commands instead of typing them into es-ice (see Chapter 2, “User
panels” in the User Guide volume).
To open the training panel:
• From the menu bar, select Panels > Directory
• Enter the directory location of the supplied user panel (training.pnl)
• From the menu bar, select Panels > training

Next, you need to modify three special, numbered cell sets that identify certain key
surfaces on the geometry.
• Enter the following command to isolate the cylinder cells, as shown in Figure
10-2

CSet, Newset, Type, Cursor

Figure 10-2 Cylinder shell selection

• In the training panel, click Cylinder Shells to save the cylinder wall shells to
CSet 1
• Repeat the previous steps to save the piston shells to Piston Shells and the
entire trimming surface to Trimming Shells, as shown in Figure 10-3 and
Figure 10-4.
• Note that the trimming shells include all the geometry surface shells and
line cells but do not include the valves (these are modelled in the next
section).

Version 4.20 10-3


USING THE AUTOMATIC 2D TEMPLATE Chapter 10
Modelling the Valves

Figure 10-3 Piston shell selection

Figure 10-4 Trimming shell selection

Modelling the Valves


Generally, valve modelling in es-ice determines the valve shape and the direction
of valve motion. For the automatic 2D template, this step defines a ring of vertices
on the valve diameter that facilitate the valve motion.
To model the valves:

10-4 Version 4.20


Chapter 10 USING THE AUTOMATIC 2D TEMPLATE
Modelling the Valves

• Enter the following command to collect all


geometry shells into the current CSet

CSet, All

• Make sure the Geometry window is active


and then choose a more suitable viewpoint
by entering:

View, 0, 0, 1

• In the Select panel, click Create Template


• In the Create Template panel, click Valve profile
• In the Create valve profile panel, ensure that Valve 1 is selected from the
drop-down menu and the Coordinate system is set to 11
• Click Select and then pick the Valve 1 surface shells (+x, +y quadrant) in the
Geometry window, as shown in Figure 10-5.

Figure 10-5 Selecting Valve 1

• Click Create profile


• Repeat the previous steps for Valve 2 (-x, +y quadrant), Valve 3 (-x, -y
quadrant), and Valve 4 (+x, -y quadrant). In each case, make sure you select
Valve 2, Valve 3 and Valve 4 from the drop-down menu in the Create valve
profile panel.

Creating valve profiles generates a spline representing the calculated shape of the
Version 4.20 10-5
USING THE AUTOMATIC 2D TEMPLATE Chapter 10
Creating the Automatic 2D Template

valve. It is recommended that you then check this spline to make sure the valve
shape is correct:
• Enter the following command to select each valve with the cursor in the
Geometry window and add it to the current CSet.

CSet, Newset, Type, Cursor

• Adjust the viewpoint to display the valves as shown in Figure 10-6

Figure 10-6 View of valve profiles

• If the profiles are correct, enter the following command and reply “Yes” to the
prompt in order to remove the splines:

SClear, All

Creating the Automatic 2D Template


The first step in creating the automatic 2D template is to define the engine operating
conditions and characteristics in the General parameters and Events parameters
panels.
To set the general parameters:

10-6 Version 4.20


Chapter 10 USING THE AUTOMATIC 2D TEMPLATE
Creating the Automatic 2D Template

• In the Select panel, click Create


Template
• In the Create Template panel, click
General
• In the General parameters panel, set
Engine type to Diesel and Cylinder radius
to 61.5, as shown in the adjacent Figure
• Check that Base style is set to 4 Valve
• Click Ok to accept the current settings and
then close the panel

To set the event parameters:


• In the Events parameters panel, set Crank
angle start (deg) to 350 and Crank angle
stop (deg) to 720
• Set Engine RPM to 2000 and Connecting
rod length to 200
• Check that the Piston pin offset is 0 and
the Valve lift periodicity (deg) is 720, as
shown in the adjacent Figure
• Click Ok

You can now generate the automatic 2D template. This procedure requires setting
parameters in the Automatic 2D parameters panel to define the cell count in certain
parts of the template. The rest of the template uses a relatively uniform cell size
based on these parameters. For more details on this panel’s parameters see Chapter
4, “The Automatic 2D Parameters panel” in the User Guide.
To create the automatic 2D template:
• In the Create Template panel, select the Automatic toggle button as shown in
Figure 10-7
• Click the Automatic 2D button
• In the Automatic 2D parameters panel, check that Circumferential cells is set
to 72 (see Figure 10-7)
• Click Create 2D

Version 4.20 10-7


USING THE AUTOMATIC 2D TEMPLATE Chapter 10
Creating the Automatic 2D Template

Figure 10-7 Create Template and Automatic 2D parameters panels

When the calculation is complete, the automatic 2D template appears in the General
Workspace window as shown in Figure 10-8.

Figure 10-8 Initial 2D template

10-8 Version 4.20


Chapter 10 USING THE AUTOMATIC 2D TEMPLATE
Refining the 2D Template Around the Injector

Refining the 2D Template Around the Injector


The automatic 2D template facility allows you to refine the mesh around a circular
region with a user-defined mesh size multiplier, point and radius. This can provide
higher mesh resolution around important features, such as the fuel injector.
To refine the mesh around the injector:
• In the Automatic 2D parameters panel, set
Use source to Yes
• Set the Radius to 7.5. The injector radius is
5, so a value of 7.5 ensures that some cells
around the injector are also refined
• Check that X and Y are set to 0 and Mesh
size multiplier is set to 0.5. In this case, the
injector is located at the centre of the
cylinder (i.e. at 0, 0) and halving the mesh
size gives sufficient mesh refinement
• Click Create 2D

When the calculation is complete, a refined automatic 2D template appears in the


General Workspace window as shown in Figure 10-9.

Figure 10-9 Refined 2D template


Version 4.20 10-9
USING THE AUTOMATIC 2D TEMPLATE Chapter 10
Adding Features to the Automatic 2D Template

You can check that the refinement covers the fuel injector by displaying the
template on top of the geometry:
• In the Plot Tool, activate the Geometry window from the drop-down menu
• Enter the following command to collect all geometry shells into the current
CSet:

CSet, All

• Deselect the Mesh toggle button to remove the mesh lines from the display
• In the Plot Tool, activate the General Workspace window from the drop-down
menu
• Deselect the Fill toggle button to display only the mesh lines
• Click DPlot to display the automatic 2D template on top of the geometry
• Zoom in on the region around the injector as shown in Figure 10-10

Figure 10-10 Mesh refinement around the fuel injector

Adding Features to the Automatic 2D Template


Another ability of the automatic 2D template is to capture mesh features using line
cells. Such cells are generated when preparing the original geometry surface in
STAR-CCM+.
To include line cells as features, you must add them to the geometry CSet 4. If
you do not have line cells in your geometry, you can use splines instead but these
must be added to the geometry SSet 4.

10-10 Version 4.20


Chapter 10 USING THE AUTOMATIC 2D TEMPLATE
Adding Features to the Automatic 2D Template

es-ice is capable of filtering out unnecessary features and only including those
that are required for a good quality 2D template.
• In the Plot Tool, activate the Geometry window from the drop-down menu.
• Enter the following command to isolate and display all line cells:

CSet, Newset, Line


CPlot
• Enter the following command to save the line cells in CSet 4, the cell set
representing features of the automatic 2D template:

CSet, Save, 4

Figure 10-11 shows the set of line cells.

Figure 10-11 Line cells for features in the 2D template

Next, recreate the automatic 2D template which this time will include the above
features:
• In the Automatic 2D parameters panel, click Create 2D
• In the Plot Tool, click DPlot to view the 2D template on top of the line cells

Figure 10-12 shows that mesh lines in the 2D template follow the fuel injector
features.

Version 4.20 10-11


USING THE AUTOMATIC 2D TEMPLATE Chapter 10
Using Detailed Automatic 2D Template Parameters

Figure 10-12 Mesh lines on fuel injector

Figure 10-13 shows that mesh lines in the 2D template also follow features on the
valve recess and piston bowl.

Figure 10-13 Mesh lines on valve recess

Using Detailed Automatic 2D Template Parameters


A number of parameters are available for the automatic 2D template that give
greater control over the template generation process. For more information on these
controls see Table 4-9 in the User Guide.
To use detailed control parameters for the automatic 2D template:

10-12 Version 4.20


Chapter 10 USING THE AUTOMATIC 2D TEMPLATE
Using Detailed Automatic 2D Template Parameters

• In the Automatic 2D parameters panel, set Selection to Details


• Set Valve 1 selection to Length
• Set Circumferential cell length to 1.5
• Set Outer rings to 5
• Repeat the above settings for Valve 2, Valve 3 and Valve 4 as shown in Figure
10-14
• Click Create 2D

Figure 10-14 Detailed parameters for automatic 2D templates

Figure 10-15 shows the template before and after the application of these controls.

Version 4.20 10-13


USING THE AUTOMATIC 2D TEMPLATE Chapter 10
Using Detailed Automatic 2D Template Parameters

Before
Circumferential Cells = 72
Outer Ring Radial Cells = 3

After Circumferential Cell Length = 1.5


Outer Ring Radial Cells = 5

Extra rings for


valve overhang

Figure 10-15 Mesh comparison before and after using detailed parameters

10-14 Version 4.20


Chapter 10 USING THE AUTOMATIC 2D TEMPLATE
Saving the es-ice Model File

Saving the es-ice Model File


Finally, save the model file and exit from es-ice:
• In the Select panel, click Write data to open
the Write Tool
• Enter save_es-ice.auto2d and click
Save to save the model file
• Close es-ice

At this stage, you can continue setting up the case by creating the 3D template and
then trimming and assembling the final mesh. Use Chapter 4, “Creating the 3D
Template” of this volume for guidance but note that the required input parameters
will be different as this is a different engine geometry.

Version 4.20 10-15


Chapter 11 MULTIPLE-CYCLE ANALYSIS
Setting Up Multiple Cycles in es-ice

Chapter 11 MULTIPLE-CYCLE ANALYSIS


The following tutorial model files are used in this chapter:
save_es-ice.3-starsetup
(created in Chapter 4)
save_ice

The model at the end of this chapter is saved to file:


save_es-ice.multipleCylces

The tutorial in this chapter details the process of defining multiple cycles in an
es-ice simulation. This process produces a .evn file for one engine cycle and then
reuses the previously specified events for each additional cycle. The resulting
advantage is a more efficient simulation set-up. Creating an ‘events’ file in
pro-STAR can be time consuming due to the large number of commands that need
to be executed. Also, covering more than one engine cycle in an events file uses an
excessive amount of memory.
In this example, the model is set up to cover two full engine cycles, requiring a
simulation over 1,440 degrees CA. The necessary steps are outlined below:
1. Specify the multiple-cycle parameters via the Star Setup panel
2. Continue the model set-up using the Star Controls panel, as illustrated in
Chapter 6 of this volume
3. Finish the model set-up via the pro-STAR GUI, by specifying the simulation
run time in the Run Time Controls panel

Setting Up Multiple Cycles in es-ice


The only action needed to define a multiple-cycle case is specification of the
multiple-cycle parameter in the Star setup panel. The simulation duration, and
hence the number of cycles covered, is defined when completing the model set-up
in pro-STAR.

Version 4.20 11-1


MULTIPLE-CYCLE ANALYSIS Chapter 11
Setting Up Multiple Cycles in pro-STAR

Start up es-ice and read in the model


data:
• Make the directory containing the
save_es-ice.3-starsetup file
the current working directory
• Launch es-ice in the usual manner
• In the Select panel, click Read Data
• In the Read Tool, click the ellipsis (...)
button next to the Resume file box
• Select model file
(save_es-ice.3-starsetup)
from the file browser. The model
geometry appears in the Geometry
panel.

To define the model as a multiple-cycle case:


• In the Select panel, click Star Setup
• In the Star setup panel, select the Multiple
cycles toggle button
• Ensure that the Reset smoothers and Use
Star controls toggle buttons are selected
• Select the latest pro-STAR version from the
drop-down menu at the bottom of the panel
• Click Star setup

When Star setup is complete, the model file can be saved.


• In the Write Tool, save the model as save_es-ice.multipleCycles

The next step is to specify the Star Controls parameters, described in Chapter 6 of
this volume. When complete, continue with the next section of this chapter.

Setting Up Multiple Cycles in pro-STAR


The pro-STAR set-up for a multiple-cycle model is similar to that for single-cycle
cases. The only exception is the Run Time Control parameters which are set to cover
more than one engine cycle.
Start up pro-STAR and import the es-ice model.
• Launch pro-STAR in the usual manner

11-2 Version 4.20


Chapter 11 MULTIPLE-CYCLE ANALYSIS
Setting Up Multiple Cycles in pro-STAR

• From the pro-STAR menu bar, select Panels > es-ice


• Click Resize. This will create a new param.prp file using MEMORY
commands.
• Click Model. This will read in the model boundaries, cells, couples and
vertices exported from es-ice. It will also read the initial and boundary
conditions and set some model defaults.
• Click Events. This will create the necessary pro-STAR ‘events’. The result is
a <casename>.evn file.

Next, set the analysis controls to use the recommended settings for a trimmed
model.
• Go to panel Analysis Controls > Solution Method
• Set the Under Relaxation for Pressure Correction to 0.5, as shown in Figure
11-1
• Click Apply

Figure 11-1 Under-relaxation for pressure correction

Set the output control parameters as shown in Figure 11-2:


• Go to panel Analysis Controls > Analysis Output
• In the Post tab, set Output Frequency to 10 and Backup Frequency to 300
• Click Apply
• In the Transient tab, set the Starting at time (degCA) to 320 degrees CA and
the Output interval (degCA) to 5 degrees CA
• Click Apply

Version 4.20 11-3


MULTIPLE-CYCLE ANALYSIS Chapter 11
Setting Up Multiple Cycles in pro-STAR

Figure 11-2 Post and transient analysis output settings

The run-time controls can now be set so as to cover two engine cycles, which equate
to 1440 degrees CA. When the solver is running, the events file will be re-used at
the start of the second cycle.
• Go to Analysis Preparation > Run Time Controls
• Check that Run time controls set to Run for
• Set Time (deg) to 1440 to cover two engine cycles
• Click Apply

Finally, write the geometry and problem files in the usual manner.
• From the pro-STAR menu bar, select
File > Save Geometry
• Set the Geometry Scale Factor to
0.001 to convert the model to mm
• Click Apply, followed by Close
• From the pro-STAR menu bar, select
File > Save Problem
• Click Save

The set-up in pro-STAR is now complete.


• Click Quit > Save & Quit to close pro-STAR

The solver can now be run, as described in Chapter 8 of this volume

11-4 Version 4.20


Chapter 12 HEAT TRANSFER ANALYSIS

Chapter 12 HEAT TRANSFER ANALYSIS


The model at the beginning of this chapter is resumed from file:
save_es-ice.4-final

The following tutorial data files are used in this chapter:


MAPPING_WALL_TEMPERATURE/cylinder_htx.dbs
MAPPING_WALL_TEMPERATURE/cylinder_htx.usr
MAPPING_WALL_TEMPERATURE/valves_htx.dbs
MAPPING_WALL_TEMPERATURE/valves_htx.usr
MAPPING_WALL_TEMPERATURE/engine.inp

The model at the end of this chapter is saved to file:


save_es-ice.heat_transfer

es-ice can specify a non-uniform temperature boundary condition on a wall region


instead of a Fixed or Adiabatic condition. The non-uniform wall temperature data
can be obtained from any source, e.g. from a structural analysis or CFD code, or
from experimental data.
In addition, you have the option of outputting calculated wall heat transfer data,
e.g. wall heat fluxes, near-wall gas temperatures and wall heat transfer coefficients
to a file called es-ice_htx.pos. Within es-ice, you can also cycle-average the
wall heat transfer data and use them as boundary conditions for a structural analysis
or post-processing run.
The steps for mapping non-uniform wall temperatures and post-processing heat
transfer data are outlined below:
1. Map wall temperatures in es-ice
2. Export heat transfer data from the STAR solver
3. Cycle-average the heat transfer data obtained from the STAR solver
4. Post-process the heat transfer data in pro-STAR
5. Map the heat transfer data to an Abaqus model via STAR-CCM+

Figure 12-1, Table 12-2 and Table 12-3 show wall temperature data mapped as
boundary conditions for various engine components.

Version 4.20 12-1


HEAT TRANSFER ANALYSIS Chapter 12

Figure 12-1 Cylinder and port wall temperature boundary conditions

Figure 12-2 Piston wall temperature boundary conditions

12-2 Version 4.20


Chapter 12 HEAT TRANSFER ANALYSIS
Resuming the es-ice Model File

Figure 12-3 Valve wall temperature boundary conditions

Resuming the es-ice Model File


This tutorial starts from an es-ice model file created at the end of Chapter 6. The file
contains data for a case study that is ready to be completed in pro-STAR and then
run by the STAR solver. However, some of the boundary conditions and
post-processing options need to be changed, as required for a heat transfer analysis.
To resume the es-ice model file:
• Ensure that
save_es-ice.4-final is in your
current working directory and launch
es-ice in the usual manner
• In the Select panel, click Read Data
• In the Read Tool, click the ellipsis (...)
next to the Resume box and select
save_es-ice.4-final from the
file browser

Version 4.20 12-3


HEAT TRANSFER ANALYSIS Chapter 12
Mapping Wall Temperature

Mapping Wall Temperature


First, specify that the cylinder boundary regions are to use mapped wall temperature
data.
• In the Select panel, click Star Controls
• In the Star Controls panel, open the Boundary conditions view
• Select the Cylinder domain from the drop-down menu at the top of the panel
• Set boundary conditions for the following boundary regions, as shown in
Figure 12-4:
• Combustion dome regions: Mapped
• Piston crown regions: Mapped
• Cylinder wall regions: Mapped
• Extra regions > Spark Plug: Mapped Wall
[

Figure 12-4 Star controls panel: Boundary conditions view for the Cylinder

Similarly, specify that the intake port and valve regions are to use mapped wall
temperature data.
• Select the Port and Valve 1 domain from the drop-down menu at the top of
the panel
• As before, set boundary conditions for the following boundary regions, as
shown in Figure 12-5:
• Valve stem regions: Mapped
• Valve face regions: Mapped
• Port wall regions: Mapped

12-4 Version 4.20


Chapter 12 HEAT TRANSFER ANALYSIS
Mapping Wall Temperature

Figure 12-5 Star controls panel: Boundary conditions view for Port and Valve 1

• Set the same boundary conditions for Port and Valve 2, as shown in Figure
12-6

Figure 12-6 Star controls panel: Boundary conditions view for Port and Valve 2

In the following steps, specify the files required to map wall temperature data. The
valves are mapped separately to avoid confusion when mapping temperatures in the
valve seat region.
• Select the Global settings domain from the drop-down menu at the top of the
panel, as shown in Figure 12-7
• Under Wall temperature mapping, set Dbase file to cylinder_htx.dbs and
Dbase ID to 1 to select the cylinder and port surfaces
• Set Temperature to cylinder_htx.usr to specify the wall temperature data file
• Check that the Map valves separately toggle button is selected so that you
can specify separate files for the valves
• Under Map valves separately, set Dbase file to valves_htx.dbs and Dbase ID
Version 4.20 12-5
HEAT TRANSFER ANALYSIS Chapter 12
Exporting Wall Heat Transfer Data

to 1 to select the valve surfaces


• Set Temperature to valves_htx.usr
• Click Get temperature to read the surface mesh and temperature data needed
for wall temperature mapping. This step checks the temperature data and
boundary surfaces by colouring wall boundaries for which data are available
green, and boundaries without data red
• Click Map temperature to map the wall temperature data onto the boundary
regions for use as boundary conditions

Figure 12-7 Star controls panel: Boundary conditions view of Global settings

Exporting Wall Heat Transfer Data


To output wall heat transfer data for use in post-processing displays or for a
structural analysis:
• In the Star Controls panel, open the Post-setup view
• Select Global settings from the drop-down menu
• Select the Heat transfer toggle button, as shown in Figure 12-8
• Ensure that the Storage interval is set to 1 in order to collect data at every
crank-angle degree

12-6 Version 4.20


Chapter 12 HEAT TRANSFER ANALYSIS
Exporting Wall Heat Transfer Data

Figure 12-8 Star controls panel: Post-processing view of Global settings

Finally, use the Write data function to generate the files required for importing the
model into pro-STAR.
• In the Star Controls panel, open the Write data view, as shown in Figure 12-9
• Accept the default settings and click Write data to generate the necessary
files

Figure 12-9 Star controls panel: Write data view

Version 4.20 12-7


HEAT TRANSFER ANALYSIS Chapter 12
Saving the es-ice Model File

Saving the es-ice Model File


• In the Write Tool, enter
save_es-ice.heat_transfer and click
Save

The case set-up can now be finished off in pro-STAR (see Chapter 7) and the
analysis run by the STAR solver (see Chapter 8).

Cycle-averaging Wall Heat Transfer Data


When the solver has finished, you can cycle-average the wall heat transfer data by
using the Heat Transfer post-processing facilities (see “After completing a
simulation, you can use es-ice to generate a presentation that summarises the case
features and analysis results. This presentation can be viewed using PowerPoint
(Windows) or Open Office (Linux).” on page 12-11 of the User Guide). At this
stage, you also need to specify default temperatures and heat transfer coefficients
for surfaces that are not permanently exposed to the fluid (and can therefore not be
cycle-averaged).
• Load save_es-ice.heat_transfer
• In the Select panel, click Post-process
• Select Heat transfer from the drop-down menu at the top of the Post-process
panel, as shown in Figure 12-10
• Click the ellipsis (...) next to the Post data file box and select
es-ice_htx.pos from the file browser
• Click Add after selected to add es-ice_htx.pos to the Post data file list
• Click Load post data to load heat transfer data from es-ice_htx.pos.
es-ice finds the minimum and maximum crank angles and updates the Crank
angle range, in this case 320.1 to 1080 degrees
• Set the Crank angle range minimum to 361 to cover the last engine cycle
• Under Default values for, set the Near wall temperature for each boundary
region as follows:
• Liner: 150 C
• Stem 1: 150 C
• Stem 2: 100 C
• Set the Heat transfer coefficient for each boundary region as follows:
• Liner: 1000
• Stem 1: 100
• Stem 2: 100
• Click Cycle average to cycle-average the wall heat transfer data for one cycle
• Set Dbase file to intermediate_bnd.dbs and Dbase ID to 1 to create an

12-8 Version 4.20


Chapter 12 HEAT TRANSFER ANALYSIS
Post-processing Wall Heat Transfer Data in pro-STAR

intermediate boundary grid on which the temperature values can be


post-processed
• Set Data file 1 to cycle_avg1.usr and Data file 2 to cycle_avg2.usr to name
the files that will contain the post-processing data
• Click the Write cycle avg button to create and store the cycle-averaged data

Figure 12-10 Post-process panel: Heat Transfer view

In your own cases, you can map the data onto a different surface mesh using the
tools under the Cycle average mapping section.
• Close es-ice

Post-processing Wall Heat Transfer Data in pro-STAR


This section gives an example of post-processing cycle-averaged heat transfer data
from es-ice in pro-STAR. In order to produce 3D contour plots of heat transfer, use
the Get Post Data and Post Register Operations panels to import and manipulate
data stored in the .usr files.
The plots to be created in this tutorial are Average Wall Boundary Temperature
(K), Average Heat Transfer Coefficient (W/m2-K) and Average Near-Wall Gas
Temperature at Y-plus=100 (K).
Data file 1 (cycle_avg1.usr) contains six datasets summarised in Table
Version 4.20 12-9
HEAT TRANSFER ANALYSIS Chapter 12
Post-processing Wall Heat Transfer Data in pro-STAR

12-1.
Table 12-1: Datasets in Data file 1

Register Dataset
Number
Register 1 Average Heat Transfer Coefficient (W/m2-K)
Register 2 Average Near-wall Gas Temperature (K)
Register 3 Average Heat Flux (W/m2)
Register 4 Average Wall Boundary Temperature (K)
Register 5 Average Y-plus (Dimensionless)
Register 6 Average Distance from Boundary to Y-plus=100 (m)

Data file 2 (cycle_avg2.usr) contains two datasets summarised in Table 12-2.


Table 12-2: Datasets in Data file 2

Register Dataset
Number
Average Heat Transfer Coefficient at Y-plus=100
Register 1 (W/m2-K)
Register 2 Average Near-wall Gas Temperature at Y-plus=100 (K)

In this tutorial, you will use Register 4 and Register 1 from cycle_avg1.usr,
and Register 2 from cycle_avg2.usr. Chapter 12, “After completing a
simulation, you can use es-ice to generate a presentation that summarises the case
features and analysis results. This presentation can be viewed using PowerPoint
(Windows) or Open Office (Linux).” in the User Guide contains more information
on this kind of dataset.
• Launch pro-STAR in the usual manner
• Enter the following commands to read the database file containing the
cycle-averaged heat transfer data:

DBASE, OPEN, intermediate_bnd.dbs


DBASE, GET, 1

• Enter the following commands to view the surface mesh:

CSET, ALL
CPLOT
Plotting average wall boundary temperatures
To create a plot of Average Wall Boundary Temperature, import the relevant data
from file cycle_avg1.usr using the Get Post Data panel.

12-10 Version 4.20


Chapter 12 HEAT TRANSFER ANALYSIS
Post-processing Wall Heat Transfer Data in pro-STAR

• From the menu bar, select Post >


Get Post Data...
• In the Get Post Data panel, use the
file browser to select file
cycle_avg1.usr
• Select All (Register 1-6) from the
Registers drop-down menu
• Set the Data Format to Binary
• Accept the remaining default
settings and click Apply, followed
by Close

Next, adjust the colour scale to cover a range of 400 - 1100 K and select appropriate
display options.
• Enter the following command to define the colour scale:

CSCALE, 14, USER, 400, 1100

• Enter the following commands to set up the display:

POPTION, CONTOUR
VIEW, 1, -1, 1
AXIS, Z
ANGLE, 0
ZOOM, OFF

• Enter the following commands to create smooth contours by averaging the


cell data values and then display the 3D temperature plot:

CAVERAGE, CSET
CPLOT

The resulting plot is shown in Figure 12-11.

Version 4.20 12-11


HEAT TRANSFER ANALYSIS Chapter 12
Post-processing Wall Heat Transfer Data in pro-STAR

Figure 12-11 3D plot of cycle-averaged wall temperature (K)

Plotting average heat transfer coefficients


When plotting user data, pro-STAR always reads scalars from Register 4 (Registers
1, 2 and 3 are reserved for vector components X, Y and Z, respectively). In order to
plot the cycle-averaged heat transfer coefficients, swap the data in Register 1 (heat
transfer coefficients) for the data in Register 4 (wall boundary temperatures):
• From the menu bar, select Post >
Operate...
• In the Post Register Operations
panel, set the Function Category to
Multi-register and select Swap
from the second drop-down menu
• In the Operation box, select
Register 1 from the first drop-down
menu and Register 4 from the
second drop-down menu
• Click Apply, then Close
• Enter the following commands to adjust the colour scale so that it covers a
more suitable range and then plot the data using smooth contours:

CSCALE, 14, USER, 0, 1000


CPLOT

The resulting plot is shown in Figure 12-12.

12-12 Version 4.20


Chapter 12 HEAT TRANSFER ANALYSIS
Post-processing Wall Heat Transfer Data in pro-STAR

Figure 12-12 3D plot of cycle-averaged heat transfer coefficient (W/m2-K)

Plotting average near-wall gas temperature at Y-plus=100


For this plot, you need to import new data from file cycle_avg2.usr. This
contains two datasets and should therefore be imported as if it contained vector data.
As in the previous section, you need to manipulate the datasets for a scalar contour
plot by swapping the contents of Register 2 and Register 4.
Begin by importing the data:
• From the menu bar, select Post >
Get Post Data...
• In the Get Post Data panel, use the
file browser to select
cycle_avg2.usr
• Select Vector (Register 1-3) from
the Registers drop-down menu
• Check that the Data Format is set
to Binary
• Accept the remaining default
settings and click Apply, then
Close

Version 4.20 12-13


HEAT TRANSFER ANALYSIS Chapter 12
Post-processing Wall Heat Transfer Data in pro-STAR

Swap the data in Register 2 with those in


Register 4:
• From the menu bar, select Post >
Operate...
• In the Post Register Operations
panel, set the Function Category to
Multi-register and select Swap
from the second drop-down menu
• In the Operation box, select
Register 2 from the first drop-down
menu and Register 4 from the second drop-down menu
• Click Apply, then Close
• Enter the following commands to adjust the colour scale so that it covers a
more suitable range and then plot the data using smooth contours:

CSCALE, 14, USER, 300, 1000


CAVERAGE, CSET
CPLOT

The resulting plot is shown in Figure 12-13.

Figure 12-13 3D plot of cycle-averaged near-wall gas temperature at Y-plus=100 (K)

12-14 Version 4.20


Chapter 12 HEAT TRANSFER ANALYSIS
Mapping Heat Transfer Data to an Abaqus Model via STAR-CCM+

Mapping Heat Transfer Data to an Abaqus Model via STAR-CCM+


In the final section of this tutorial, you will map the heat transfer data obtained from
the es-ice simulation to an Abaqus model using the data mapping facilities of
STAR-CCM+ v8.02. You will then proceed to import the updated solid model into
Abaqus and run a thermal calculation.
To convert the heat transfer data from binary to coded format:
• In pro-STAR, enter the following command to read in the surface mesh and
binary-format data:

DBASE, OPEN, intermediate_bnd.dbs


DBASE, GET, 1
GETUSERDATA, cycle_avg1.usr, CELL, ALL, BINARY $ $
• Enter the following command to save the data in a coded-format file:

SAVUSERDATA, cycle_avg1_coded.usr, ALL, CODED, ALL


• Close pro-STAR without saving the model file

To import the es-ice CAE model and data:


• Launch STAR-CCM+ in the usual manner and start a new simulation
• From the menu bar, select File > Import > Import CAE Model
• In the Open panel, select intermediate_bnd.dbs and click Open
• In the Import Options panel, accept the default options and click OK as
shown in Figure 12-14

Figure 12-14 es-ice CAE model import options

• Right- click the Imported Model > Dbs: intermediate_bnd node and select
Import CAE Solution Data
• In the Open panel, select cycle_avg1_coded.usr and click Open
• In the Import Data Options panel, set Registers to All(Registers 1-6) and
click OK as shown in Figure 12-15

Version 4.20 12-15


HEAT TRANSFER ANALYSIS Chapter 12
Mapping Heat Transfer Data to an Abaqus Model via STAR-CCM+

Figure 12-15 es-ice CAE solution data import options

To import the Abaqus CAE model:


• From the menu bar, select File > Import > Import CAE Model
• In the Open panel, select engine.inp and click Open
• In the Import Options panel, accept the default options and click OK as
shown in Figure 12-16

Figure 12-16 Abaqus model import options

To map the es-ice heat transfer data to the Abaqus model:


• Right-click the Tools > Data Mappers node and select New Data Mapper >
Surface Data Mapper
• Select the Data Mappers > Surface Data Mapper 1 node and set the
properties as follows (see Figure 12-17):
• Source Surfaces: Imported Models > Dbs: intermediate_bnd >
unnamed
• Source Stencil: Face
• Scalar Field Functions: Imported Register 1 and Imported Register 2

12-16 Version 4.20


Chapter 12 HEAT TRANSFER ANALYSIS
Mapping Heat Transfer Data to an Abaqus Model via STAR-CCM+

Figure 12-17 Surface data mapper properties

• Select the Target Specifications > Surface 1 node and set the properties as
follows (see Figure 12-18):
• Target Surface: Imported Surfaces > Abaqus: engine > In-Cylinder
• Target Stencil: Face

Figure 12-18 Target specification properties

• Right-click the Data Mappers > Surface Data Mapper 1 node and select
Map Data

Version 4.20 12-17


HEAT TRANSFER ANALYSIS Chapter 12
Mapping Heat Transfer Data to an Abaqus Model via STAR-CCM+

To export the mapped data:


• Right-click the Imported Models > Abaqus: engine node and select Export
Mapped Data to External File
• In the Export File panel, set File Name to engine_map.inp
• In the Imported Surface tab (see Figure 12-19), select the Imported Models >
Abaqus: engine > In-Cylinder node

Figure 12-19 Export selected surfaces

• In the Field Functions tab (see Figure 12-20), set Export data as to Heat
Transfer Coefficient
• Set Data to export to Mapped Imported Register 1 and Tref to export to
Mapped Imported Register 2

12-18 Version 4.20


Chapter 12 HEAT TRANSFER ANALYSIS
Mapping Heat Transfer Data to an Abaqus Model via STAR-CCM+

Figure 12-20 Export selected field functions

• Click Save

To import the model with the mapped heat transfer data:


• With a text editor, edit the end of the engine.inp file as shown below:
• Before:
*Output, history
*Contact Output
HFLA, HTL, HTLA, SJD, SJDA, SJDT, SJDTA, WEIGHT
*Radiation Output
FTEMP, RADFL, RADFLA, RADTL, RADTLA, VFTOT
*End Step
• After:
*Output, history
*Contact Output
HFLA, HTL, HTLA, SJD, SJDA, SJDT, SJDTA, WEIGHT
*Radiation Output
FTEMP, RADFL, RADFLA, RADTL, RADTLA, VFTOT
**
*Include,input=engine_map.inp
**
*End Step
• Save the file as engine_mod.inp

Version 4.20 12-19


HEAT TRANSFER ANALYSIS Chapter 12
Mapping Heat Transfer Data to an Abaqus Model via STAR-CCM+

To load the model and mapped heat transfer data into Abaqus:
• Launch Abaqus CAE in the usual manner
• From the menu bar, select File > Import > Model
• In the Import Model panel, select engine_mod.inp and click OK

12-20 Version 4.20


Chapter 13 MESH REPLACEMENT

Chapter 13 MESH REPLACEMENT


The following tutorial files are used in this chapter:
save_es-ice.4-final
es-ice.inp
es-ice.PNL
GRID_MOVE.NULL
MAKE_EV.BAT
make_ev.tab
mvmesh.sh (Created in Chapters 3 - 6)
READ_TMP.BAT
save_ice_after_map
template.bnd
template.cel
template.cpl
template.vrt
MESH_REPLACEMENT/save_es-ice.dense

This chapter demonstrates the es-ice mesh replacement feature, whereby the
starting mesh is replaced by any number of alternative meshes at user-specified
crank angles. In general, the replacement meshes are finer than the starting mesh,
thus providing a better representation of changing and more complex engine
geometries. This technique can be used to improve solution accuracy during certain
stages of the engine cycle where in-cylinder conditions change rapidly (e.g.
combustion, squish, valve opening, valve closing). Therefore, it is often beneficial
to use a dense mesh when the piston approaches TDC. The STAR solver completely
handles the transition between meshes and solution mapping.
In the following example, a coarse mesh (save_es-ice.4-final) is
replaced by a dense mesh (save_es-ice.dense) between 340 degrees CA and
380 degrees CA, and also between 700 degrees CA and 740 degrees CA. This
strategy employs mesh replacement at TDC between the exhaust and intake phases,
and TDC between the compression and expansion phases, as illustrated in Figure
13-1:

Figure 13-1 Diagram of mesh-replacement time line

The necessary steps for setting up mesh replacement are outlined in the following
list:
1. Prepare the file structure, with the coarse-mesh model located in the working
directory and the dense-mesh replacement model in a subdirectory
2. Write data files for the replacement model within its own directory
3. Create Ahead Files for the dense mesh
4. Define the mesh replacement operations with respect to crank angle and write
the required files
5. Set up a mesh replacement simulation in pro-STAR. This process requires
Version 4.20 13-1
MESH REPLACEMENT Chapter 13
Preparing the File Structure

creation of an events file, plus changes to under-relaxation factor and analysis


controls for both meshes.

Preparing the File Structure


If the tutorials in Chapters 3 - 6 of this volume have been completed consecutively,
the model and data files for the coarse mesh will be present in your current working
directory.
• Create a subdirectory called dense within your working directory using your
computer’s operating system facilities
• Place the dense model file (save_es-ice.dense) in the newly created
dense subdirectory

Figure 13-2 illustrates the required file structure:

Figure 13-2 Required file structure

Rebuilding the Dense Mesh


When working with a model file from an older version of es-ice, we recommend
that you rebuild the case in order to take advantage of the latest changes to the code.
In addition, certain data files must be present in the dense subdirectory for use as
input into pro-STAR (see Chapter 8, “Write Data” in the User Guide).
To begin rebuilding the case, you must first resume the dense model as described
below:

13-2 Version 4.20


Chapter 13 MESH REPLACEMENT
Rebuilding the Dense Mesh

• Make the dense subdirectory your


current working directory and then
launch es-ice in the usual manner
• In the Select panel, click Read Data
• In the Read Tool, click the ellipsis (...)
button next to the Resume file box and
select the dense model file
(save_es-ice.dense) from the
file browser. This action loads the
model and displays the dense mesh in
the Template window.

The meshing pipeline in es-ice generates the 2D and 3D templates, trims and
assembles the mesh, and executes the Star Setup process. Entering the following
es-ice command will run the meshing pipeline and rebuild the mesh with the latest
version of the code:

Pipeline, TrimmedModel, StopAt, StarControlsLoad

As the pipeline re-runs Star Setup, you must reload the model into Star Controls,
redefine the interface between manifolds and ports and redefine the boundary
patches. For convenience, the Star Controls panel settings are already correctly
defined. If you are unfamiliar with these settings or the Star Controls panel, please
consult Chapter 6 of this volume.
To redefine the model in Star Controls:
• In the Select panel, click Star Controls
• In the Load model view of the Star Controls panel, click Load Model
• In the Assembly view of the Star Controls panel, redefine the interface
between the manifolds and ports as follows:
• In the Plot Tool, deselect the Fill toggle button and click CPlot
• In the Star Controls panel, select the Partial toggle button and click CP
Match
• In the Controls Workspace window, click an interior face between the
intake manifold and port, as shown in Figure 13-3

Version 4.20 13-3


MESH REPLACEMENT Chapter 13
Rebuilding the Dense Mesh

Interior Face

Figure 13-3 Interior face between intake port and manifold

• In the Star Controls panel, deselect the Partial toggle button and click
CP Match
• In the Controls Workspace window, click an interior face between the
exhaust manifold and port
• Click CPTransform
• Click Finish
• In the Boundary Conditions view of the Star Controls panel, redefine the
boundary patches as follows:
• For the Cylinder domain, under Extra Regions > Spark Plug, click Define
• In the Plot Tool, select the Fill toggle button
• In the Boundary Tool, click Display All
• Click Keep Picked and select the patches that define the spark plug in the
Controls Workspace, as shown in Figure 13-4

Figure 13-4 Spark Plug patches

• In the Boundary Tool, click Define


• For the Port and Valve 1 domain, under Extra Regions > Intake Flow

13-4 Version 4.20


Chapter 13 MESH REPLACEMENT
Rebuilding the Dense Mesh

Boundary, click Define


• In the Boundary Tool, click Display All
• Click Keep Picked and select the patches that define the intake flow
boundary in the Controls Workspace, as shown in Figure 13-5

Figure 13-5 Intake flow boundary

• In the Boundary Tool, click Define


• For the Port and Valve 2 domain, under Extra Regions > Exhaust Flow
Boundary, click Define
• In the Boundary Tool, click Display All
• Click Keep Picked and select the patches that define the exhaust flow
boundary in the Controls Workspace, as shown in Figure 13-6

Version 4.20 13-5


MESH REPLACEMENT Chapter 13
Creating Ahead Files for the Dense Mesh

Figure 13-6 Exhaust flow boundary

All necessary settings have now been defined for the dense model. The only
remaining action is to write the data files via the Star Controls panel.
• In the Write data view of the Star Controls panel, click Write data

Creating Ahead Files for the Dense Mesh


As the dense mesh contains considerably more cells than the coarse mesh, it is
advantageous to use Ahead Files (see Chapter 11 of the User Guide). This practice
avoids the possibility of STAR waiting for es-ice to complete its part in the
simulation at every time step. The mvmesh.sh panel is used to define several scripts,
which in turn create the Ahead Files. During the analysis, Ice reads these grids
instead of generating meshes, thus reducing the calculation time. Note that the same
process can be carried out on the coarse mesh if desired, although the low cell count
makes it unnecessary.
To create the ahead scripts:
• In the Select panel, click mvmesh.sh to
open the mvmesh.sh panel
• Select the Events ahead script toggle
button to activate the Ahead Files section
of the panel
• Accept the remaining default settings.
You can change these settings for other
cases, depending on the nature of the
mesh and system resources
• Click Write to create the scripts in the
ahead subdirectory located within the current working directory.

13-6 Version 4.20


Chapter 13 MESH REPLACEMENT
Creating Ahead Files for the Dense Mesh

Since Ahead Files are used, you need to update


the settings within the mvmesh.sh file (see
Chapter 11 in the User Guide). To set up this
file:
• Locate the Move mesh script section of
the mvmesh.sh panel, shown in the
adjacent screenshot
• Set Processes to 1
• Accept the remaining defaults. Again, you
can change these settings in your own
cases to optimise the analysis run time.
• Click Write
• Click Yes in the es-ice command window
to overwrite the existing mvmesh.sh
file. The file is updated to reflect the changed settings.

Finally you must execute the head scripts in order to generate the event meshes.
This procedure is different between Linux and Windows.
On Linux:
• Enter the following commands in a shell prompt:

sh ahead/<filename>.sh

where <filename> is one of the ahead scripts in the ahead directory


• Alternatively, you can use a script to execute each ahead script in turn. For
example:

for filename in ahead/*.sh


do
sh $filename
done

exit 0

On Windows:
• Enter the following commands in a PowerShell prompt:

Ice.exe -sB=<filename>.sh

where <filename> is one of the ahead scripts in the ahead directory


• Alternatively, you can use a batch file to execute each ahead script in turn. For
example:

for %%f in(.\*sh) do Ice.exe -sB=%%f

exit 0

The set-up for the dense model is now complete.

Version 4.20 13-7


MESH REPLACEMENT Chapter 13
Defining Mesh Replacements

• In the Select panel, click Write Data


• In the Write Tool, enter save_es-ice.dense_final and click Save
• Close es-ice

Defining Mesh Replacements


Mesh replacements must be defined within the master model file. In this tutorial, the
coarse model is the master model, which means changing the working directory and
loading save_es-ice.4-final into es-ice.
• Make the directory containing the
coarse model file
(save_es-ice.4-final) your
current working directory and then
launch es-ice in the usual manner
• In the Select panel, click Read Data
• In the Read Tool, click the ellipsis (...)
button next to the Resume file box and
select the coarse model file
(save_es-ice.4-final) from
the browser. This action loads the
coarse model and displays it in the
Template window.

Mesh replacements can now be defined using the Multiple mesh panel (see Chapter
6, “Meshes for Simulation with Mesh Replacement” in the User Guide). The first
mesh-replacement operation is described below in some detail while the rest of the
required settings are summarised in a table.

13-8 Version 4.20


Chapter 13 MESH REPLACEMENT
Setting Up Mesh Replacement in pro-STAR

• In the Select panel, click Multiple Meshes to


open the Multiple meshes panel
• Click the ellipsis (...) button next to the
Subdirectory box
• In the file browser, select dense and then
click OK to specify the directory where the
replacement mesh is located
• Click Add in the upper half of the panel to
specify the dense mesh in the Meshes box
• Set Angle to 340 and Mesh to 1 to specify the
crank angle and mesh for the first mesh
replacement
• Click Add in the lower half of the panel to
enable the first mesh replacement
• Define the remaining mesh replacements
using the following settings:

Angle Mesh
380 0
700 1
740 0

• Click Write to create the MULTIMESH.BAT batch file and merge the
mvmesh.sh files of both models into a single file. A backup of the original
mvmesh.sh is created called mvmesh.sh.original.

The set-up within the coarse model is now complete.


• In the Select panel, click Write Data
• In the Write Tool, enter save_es-ice.coarse and click Save
• Close es-ice

Setting Up Mesh Replacement in pro-STAR


The pro-STAR set-up for a mesh-replacement simulation is slightly different from
a normal simulation as two or more models are defined simultaneously. You must
therefore ensure that the pro-STAR set-up in your own cases adheres to the
following guidelines:
• The initial and boundary conditions, combustion models and any tracers
defined within the es-ice Star Controls panel must be identical to the settings
in pro-STAR
• Additional physics settings defined within pro-STAR are read from the
problem file present in the working directory. These include settings for
thermophysical, spray and/or liquid film models. In this example, both the
coarse and dense model files have been set up correctly.
• Analysis and run-time controls in the model files do not need to be identical.
These settings include under-relaxation, time-step size, residual tolerances,
output frequency and backup frequency. In this example, the time-step

Version 4.20 13-9


controls remain as specified in es-ice but other common settings are applied
to the analysis output controls for both models. The under-relaxation for
pressure correction is set to 0.5.

To read the es-ice model files:


• Launch pro-STAR from the directory containing the master model file
(save_es-ice.4-final)
• Enter the command below (it may take some time to complete):

IFILE, MULTIMESH.BAT

This command resizes pro-STAR memory, imports the models and creates an
events file.
• Enter the following commands to display the coarse mesh:

CSET, ALL
CPLOT

Setting up the coarse model


Set the under-relaxation factor as shown in Figure 13-7.
• In the Analysis Controls > Solution Method panel, set Under Relaxation for
Pressure Correction to 0.5
• Click Apply

Figure 13-7 Under-relaxation for pressure correction

Specify the output control settings as shown in Figure 13-8.


• Go to panel Analysis Controls > Analysis Output
• In the Post tab, set Output Frequency to 10 and Backup Frequency to 300
• Click Apply
• In the Transient tab, set Start at time to 320 degrees CA and Output interval to
5 degrees CA
• Select any flow variables that you wish to post-process
• Click Apply
Chapter 13 MESH REPLACEMENT
Setting Up Mesh Replacement in pro-STAR

Figure 13-8 Post and transient analysis output settings

Setting up the dense model


Reading the MULTIMESH.BAT file into pro-STAR defines the dense model
location.
• Enter the following command to switch to the dense model:

MREPLACE, SWITCH, 1

• Enter the following commands to display the dense model:

CSET, ALL
CPLOT

The parameter that is set to 1 in the previous command selects the dense model. If
you wish to switch back, the coarse model can be selected using 0 as the parameter
value.
Having switched to the dense model, the same settings are now used for
under-relaxation and output controls. The previous panels can be used again to
verify these operations.
Set the under-relaxation factor.
• In the Analysis Controls > Solution Method panel, set Under Relaxation for
Pressure Correction to 0.5
• Click Apply

Version 4.20 13-11


Specify the output control settings.
• Go to panel Analysis Controls > Analysis Output
• In the Post tab, set Output Frequency to 10 and Backup Frequency to 300
• Click Apply
• In the Transient tab, set Starting at time to 320 degrees CA and Output
interval to 5 degrees CA
• Select any flow variables that you wish to post-process
• Click Apply

When the pro-STAR set-up is complete, write the geometry and problem files for
both models. This action creates .ccmg and .prob files in the relevant directories
for both.
• Enter the following commands:

MREPLACE, GEOMWRITE, 0.001, CCM


MREPLACE, PROBLEMWRITE

The pro-STAR set-up is now complete, so:


• Click Quit > Save & Quit to close pro-STAR

The solver can now be run in the usual manner, as described in Chapter 8 of this
volume.
Chapter 14 MULTIPLE CYLINDERS

Chapter 14 MULTIPLE CYLINDERS


The following tutorial files are used in this chapter:
MULTIPLE_CYLINDERS/save_es-ice.multiCylinder
MULTIPLE_CYLINDERS/manifoldTwin.dbs

This chapter demonstrates the es-ice multiple cylinder feature, where a multiple
cylinder engine model is created from a single cylinder model by copying and
transposing cells. By default, Cylinder 1 is located relative to coordinate system 1.
Using the Multiple cylinders panel, Cylinder 1 can be redefined with respect to a
new coordinate system. Similarly, new cylinders can be added to the model and
positioned with respect to user-defined coordinate systems. The angle-offset
between cylinder cycles is also set, thus determining the cylinder crank angle
relative to Cylinder 1.
In the following example, a single-cylinder model is used as the basis for creating
a V-Twin engine model. The single cylinder is similar to that used in the Trimming
tutorial of Chapter 4 but is modified into a full four-valve cylinder. The intake port
is also shorter to accommodate an intake manifold. These changes were made via
the STAR-CCM+ meshing facilities but are not described here, as this chapter
focuses on the multiple-cylinder feature in es-ice.
The cylinders are angled at 45 degrees to each other about the z = –280 position
and the crank angle is offset by 350 degrees, as illustrated in Figure 14-1.

Figure 14-1 Diagram of cylinder configuration

The steps to set up a multiple-cylinder case for this tutorial are outlined below:
1. Resume from an existing es-ice model file
2. Set up the cylinders in the Multiple cylinders panel
3. Create and check the multiple-cylinder mesh
4. Specify appropriate Star Controls

Version 4.20 14-1


MULTIPLE CYLINDERS Chapter 14
Resuming the es-ice Model File

Resuming the es-ice Model File


The tutorial starts from an es-ice model file supplied with the STAR-CD
installation. The model contains an assembled template, but Star setup has not yet
been run. This stage of the modelling process is equivalent to that described in
Chapter 4, “Running Star Setup” for the Trimming Method tutorial.
To resume the es-ice model file:
• Ensure that
save_es-ice.multiCylind
er is in your current working
directory and launch es-ice in the
usual manner
• In the Select panel, click Read
Data
• In the Read Tool, click the ellipsis
(...) next to the Resume box and
select
save_es-ice.multiCylind
er from the file browser. This
action will load the model and
display the template mesh in the
Template window.

Making, Cutting and Assembling the Template


If you have an es-ice model file, but not an Ice template file (save_ice), you are
recommended to enter es-ice and generate it using with the current version of the
code.
• In the Select panel (see the left of Figure 14-2), click Create Template
• In the Create Template panel, click Make Template to generate a new
save_ice template file
• When the child process is complete, click Read Template
• In the Select panel, click Trimming
• In the Trim panel (see the right-hand side of Figure 14-2), click Cut
• When the child process is complete, click Assemble to generate an assembled
mesh with the current version of es-ice

14-2 Version 4.20


Chapter 14 MULTIPLE CYLINDERS
Setting Up Multiple Cylinders

Figure 14-2 Multiple cylinder Create Template and Trim panels

Setting Up Multiple Cylinders


Use the Star setup panel to generate the files
needed to import the model into pro-STAR. In
these steps, you will also use the Multiple cylinders
panel to set up parameters for Cylinder 1 and 2.
• In the Select panel, click Star Setup
• Ensure Start (deg) is set to 320
• Set Stop (deg) to 1400 so Cylinder 1 covers a
full intake stroke before combustion and
Cylinder 2 covers a full exhaust stroke after
combustion
• Ensure pro-STAR 4.20 is selected from the
pro-STAR drop-down menu
• Click Multiple cylinders to open the
Multiple cylinders panel

Version 4.20 14-3


MULTIPLE CYLINDERS Chapter 14
Checking the Computational Mesh

In the Multiple cylinders panel, set the parameters


defining the location and orientation of Cylinder 1.
• Select Cylinder 1 in the list at the top of the
panel
• Set the Z Rotation to 180 to rotate Cylinder 1
about the z-axis, so that the intake ports on
both Cylinders 1 and 2 face inwards
• Set the Z Center to –280 to define the
z-coordinate about which the Y Rotation
applies
• Set the Y Rotation to 22.5 to define the rotation
of Cylinder 1 in the X-Z plane about the Z
Center
• Set Coordinate system to 21 and click Define
to define the coordinate system ID for
Cylinder 1
• Click Replace to replace the default settings for Cylinder 1 with the ones
specified above

Next, set the parameters defining the location and


orientation of Cylinder 2.
• Set Angle offset to -315 degrees to define the
crank-angle offset of Cylinder 2 relative to
Cylinder 1
• Set Delta Y to 50 to translate Cylinder 2 in the
y-direction, as the cylinders are not in-line due
to independent crank pins
• Set Z Rotation to 0
• Set Z Center to -280
• Set Y Rotation to -22.5
• Set Coordinate system to 22 and click Define
to define the coordinate system ID for
Cylinder 2
• Click Append to add a cylinder with the
current settings to the model
• Close the Multiple cylinders panel

Finally, run Star setup to store the geometry changes and generate the files required
for pro-STAR input.
• In the Star setup panel, click Star setup

Checking the Computational Mesh


The Create Result panel generates a mesh to be used by STAR at a specified crank
angle. You can employ this feature to check such a mesh and ensure it is suitable
for the solver. The mesh is checked at TDC, BDC and at maximum intake and
exhaust valve lifts. Cylinder 2 uses the same mesh and events as Cylinder 1 so if
Cylinder 1 is valid, Cylinder 2 should also be valid. You can therefore save time by

14-4 Version 4.20


Chapter 14 MULTIPLE CYLINDERS
Checking the Computational Mesh

checking only the computational mesh for Cylinder 1.


To create and check the mesh at TDC:
• In the Select panel, click Create Result
• In the Create Result panel, ensure Angle
(deg) is set to 360
• Select the Interpolate toggle button
• Click Create Result to create the mesh
at 360 degrees crank angle. This is stored
in your working directory in a
database-format file called
result.d360.0.dbs
• When the mesh-creation child process is
complete, click Read Result to read the
mesh into the Workspace window
• Enter the following command to check
for negative-volume cells

Check, NegVolume

Figure 14-3 shows the mesh at 360 degrees crank angle.

Figure 14-3 Multiple cylinders at 360 degrees crank angle

• Repeat the previous steps with Angle (deg) set to 540 to create and check the
computational mesh at 540 degrees crank angle, shown in Figure 14-4

Figure 14-4 Multiple cylinders at 540 degrees crank angle

Version 4.20 14-5


MULTIPLE CYLINDERS Chapter 14
Checking the Computational Mesh

You can now create a section plot through Valves 1 and 2 on Cylinder 1 for a visual
inspection of the mesh around the intake valve at maximum lift. This check requires
a section plane positioned at y = –19.5, with a section-normal in the y-direction.
• Set Angle (deg) to 469, the crank angle at
maximum intake valve lift for Cylinder 1
• Click Create Result, then Read Result
• Enter the following command to check for
negative-volume cells

Check, NegVolume

• Enter the following commands to define the


section plane point and normal

SPoint, 0, -19.5, 0
SNormal, 0, -1, 0

• In the Plot Tool, change the Plot Type from Hidden to Section
• Select View 0 -1 0 for the Views
• Click CPlot to display the section plot, as shown in Figure 14-5

Figure 14-5 Section plot at 469 degrees crank angle

• Repeat the previous steps with Angle (deg) set to 964 to create and check the
computational mesh at maximum exhaust valve lift, shown in Figure 14-6

14-6 Version 4.20


Chapter 14 MULTIPLE CYLINDERS
STAR Set-Up in es-ice

Figure 14-6 Section plot at 964 degrees crank angle

STAR Set-Up in es-ice


This section describes the Star Controls panel settings. It is assumed that you have
gone through Chapter 6 of this volume and are familiar with using Star Controls.
Therefore, most settings in this tutorial are described in brief, as the set-up is similar
to the Trimming tutorial. However, where differences do occur, full and detailed
information is provided.
The intake and exhaust manifold meshes for this case are supplied in a database
file. When creating manifolds for your own cases, it is important to check that the
cell faces at the manifold-port interface are spatially coincident within the default
tolerance of 0.1. This tolerance ensures that es-ice can connect (“CP Match”) the
two meshes using default parameters. You can specify the correct location of the
interface between manifold and port meshes using local coordinate systems and the
VList command for determining vertex positions. This information can then be
used in STAR-CCM+ or third-party software to create a manifold volume mesh that
is in the correct position relative to the engine cylinder.
The Wiebe heat release correlation is used in place of combustion modeling.
Strictly speaking, the Wiebe correlation is not a combustion model as there is no
reaction between scalars, no ignition and the flame propagation cannot be tracked.
However, flow and heat release is simulated, so mixing, volumetric efficiency and
engine performance can be analysed. Due to its simplicity, the Wiebe approach is
suitable for meshes such as this containing large numbers of cells, as it can result in
faster processing times.

Version 4.20 14-7


MULTIPLE CYLINDERS Chapter 14
STAR Set-Up in es-ice

Analysis set-up
Using the Analysis setup view of the Star controls panel (see Figure 14-7), load the
model and define a number of initial settings.
• Click Load model to load the es-ice model into the Controls Workspace
window
• Select Wiebe from the combustion model drop-down menu
• Check that the fuel type is set to n-octane / iso-octane
• Set the Mixture option to Equivalence ratio and enter 1.3 for the air-fuel ratio
• Click the Premixed toggle button as fuel and air are mixed upstream of the
intake port
• Set the EGR definition to Air+Exhaust and specify that 5% of the intake
charge is recirculated exhaust gases

Figure 14-7 Multiple cylinder Star Controls > Analysis setup panel

Assembly
Use the Assembly view of the Star controls panel to import the intake and exhaust
manifolds, as shown in Figure 14-8.
• Click the ellipsis (...) next to Database file and select manifoldTwin.dbs
from the file browser
• Click the ellipsis (...) next to Database ID and select 1 Intake Manifold
• Click Get to load the intake manifold into the Controls Workspace window
14-8 Version 4.20
Chapter 14 MULTIPLE CYLINDERS
STAR Set-Up in es-ice

• Click the ellipsis (...) next to Database ID and select 2 Exhaust Manifold
• Click Get to load the exhaust manifold into the Controls Workspace window

Figure 14-8 Multiple cylinder Star Controls > Assembly panel

You can now create cell couples that join the intake and exhaust manifolds to the
intake and exhaust ports.
• In the Plot Tool, deselect the Fill toggle button
• Click CPlot to re-display the cells in the Controls Workspace window
• In the Star Controls panel, select the Partial toggle button next to CP Match.
Note that this option couples only part of the intake manifold to the intake
port
• Click CP Match
• In the Controls Workspace window, click on any interior cell face lying on the
interface between the Intake Manifold and Cylinder 1 Intake Port, as shown in
Figure 14-9

Figure 14-9 Interior face between the intake manifold and Cylinder 1’s intake port

• Click CP Match to create cell couples between the Intake Manifold and
Cylinder 2 Intake Port, as shown in Figure 14-10

Version 4.20 14-9


MULTIPLE CYLINDERS Chapter 14
STAR Set-Up in es-ice

Figure 14-10 Interior face between the intake manifold and Cylinder 2’s intake port

• Deselect the Partial toggle button for the exhaust manifold, as all its faces are
coupled to the exhaust ports
• Click CP Match to create cell couples between the Exhaust Manifold and
both the Cylinder 2 Exhaust Ports, as shown in Figure 14-11

Figure 14-11 Interior face between the exhaust manifold and Cylinder 2’s exhaust ports

• Click CP Match to create cell couples between the Exhaust Manifold and
both the Cylinder 1 Exhaust Ports, as shown in Figure 14-12

Figure 14-12 Interior face between the exhaust manifold and Cylinder 1’s exhaust ports

14-10 Version 4.20


Chapter 14 MULTIPLE CYLINDERS
STAR Set-Up in es-ice

• Click CP Transform to transform the cell couples created into one-to-one


connections between cell faces, as shown in Figure 14-13

After CP Transform Before CP Transform

Figure 14-13 Before and after CP Transform

Finally, assemble the cylinders and manifolds to create the assembled, trimmed
template.
• Check that the Set uses toggle button is selected, which ensures that
equivalent cylinders and ports share initial and boundary conditions
• Click Finish to assemble the overall model
Combustion
Open the Combustion view of the Star controls panel (see Figure 14-14) to check
that the default settings are acceptable for this case. Remember that you are
employing the Wiebe heat release correlation to reduce processing times (as the
case contains a large numbers of cells) but this will affect the solution quality as
there is no reaction between scalars and the flame propagation cannot be tracked.

Figure 14-14 Multiple cylinder Star Controls > Combustion panel

Version 4.20 14-11


MULTIPLE CYLINDERS Chapter 14
STAR Set-Up in es-ice

Initialization
In the Initialization view of the Star controls panel, specify initial conditions for all
engine components.
For the cylinder component of Cylinder 1 (see Figure 14-15), set the following
conditions:
• Check that Cylinder of Cylinder 1 is selected from the domain drop-down
menus at the top of the panel
• Set the Absolute pressure to Table in image. Typically, pressure data would
be imported from a file but, for the sake of convenience, the data for this case
have already been saved as an image in the model file.
• Check that the cylinder-3600.dat image is selected and that the
column number is set to 2
• Set the pressure units to bar
• Set the Temperature to Table in image
• Check that the cylinder-3600.dat image is selected and that the
column number is set to 3
• Check that the temperature units are K

Figure 14-15 Multiple cylinder Star Controls > Initialization panel for Cylinder

14-12 Version 4.20


Chapter 14 MULTIPLE CYLINDERS
STAR Set-Up in es-ice

For Port 1 of Cylinder 1 (see Figure 14-16), specify the following initial conditions:
• Set the domain to Port 1 of Cylinder 1 from the drop-down menus at the top
• Ensure that Valve function is set to Intake

Figure 14-16 Multiple cylinder Star Controls > Initialization panel for Port1

Version 4.20 14-13


MULTIPLE CYLINDERS Chapter 14
STAR Set-Up in es-ice

For Port 2 of Cylinder 1 (see Figure 14-17), specify the following initial conditions:
• Set the domain to Port 2 of Cylinder 1 from the drop-down menus at the top
• Set the Valve function to Exhaust

Figure 14-17 Multiple cylinder Star Controls > Initialization panel for Port 2

As you have already selected the Set uses toggle button in the Assembly view of the
Star controls panel, only Port 1 and Port 2 of Cylinder 1 have been fully defined.
The remaining intake ports will automatically use the initial conditions defined for
Port 1 and the exhaust ports will use the initial conditions defined for Port 2.
Similarly, the Cylinder of Cylinder 2 will use the initial conditions for Cylinder of
Cylinder 1.
Check that the remaining ports and cylinder are using the correct settings as
follows:
• Set the domain to Port 3 of Cylinder 1 (see Figure 14-18)
• Check that Use data of is set to Port 2 of Cylinder 1 as it is an exhaust port

Figure 14-18 Port 3 of Cylinder 1 check

14-14 Version 4.20


Chapter 14 MULTIPLE CYLINDERS
STAR Set-Up in es-ice

• Set the domain to Port 4 of Cylinder 1


• Check that Use data of is set to Port 1 of Cylinder 1 as it is an intake port
• Check that the remaining cylinder components are correct by referring to the
following table:

Domain Use data of


Cylinder of Cylinder 2 Cylinder of Cylinder 1
Port 1 of Cylinder 2 Port 1 of Cylinder 1
Port 2 of Cylinder 2 Port 2 of Cylinder 1
Port 3 of Cylinder 2 Port 2 of Cylinder 1
Port 4 of Cylinder 2 Port 1 of Cylinder 1

Boundary Conditions
In the Boundary conditions view of the Star controls panel, specify boundary
conditions for all engine components.
For the cylinder component of Cylinder 1 (see Figure 14-20), set the following
conditions:
• Select domain Cylinder of Cylinder 1 from the drop-down menus at the top
• Set the Combustion dome regions type to Fixed and the Temperature to 450 K
• Set the Piston crown regions type to Fixed and the Temperature to 550 K
• Set the Cylinder wall regions type to Fixed and the Temperature to 500 K
• Select the Extra regions toggle button to create a region for the spark plug
• Click Define to open the Boundary Tool
• In the Boundary Tool, click Display all to display all cylinder surface shells
• Click Keep picked to select the spark plug patches, as shown in Figure 14-19

Figure 14-19 Spark plug patches for Cylinder 1

• Press q on the keyboard to exit from the pick mode


• Click Define in the Boundary Tool to define the patches as a spark plug
• Set the Name to Spark Plug
• Set the Regions type to Fixed wall
• Set the Temperature to 600 K
Version 4.20 14-15
MULTIPLE CYLINDERS Chapter 14
STAR Set-Up in es-ice

Figure 14-20 Multiple cylinder Star Controls > Boundary conditions panel for Cylinder

For the Port and Valve 1 of Cylinder 1 (see Figure 14-22), specify the following
conditions:
• Select domain Port and Valve 1 of Cylinder 1 from the drop-down menus
• Check that the Valve stem, Valve face and Port wall regions are set to
Adiabatic
• Under Extra regions, click Define to open the Boundary Tool
• In the Boundary Tool, click Display all to display all surface shells
• Click Keep picked to select the intake flow patch, as shown in Figure 14-21.
The intake flow boundary region is split between Cylinder 1 and Cylinder 2,
which is why it appears to be incomplete.

Intake flow patch

Figure 14-21 Intake flow boundary patch for Cylinder 1

14-16 Version 4.20


Chapter 14 MULTIPLE CYLINDERS
STAR Set-Up in es-ice

• Press q on the keyboard to exit from the pick mode


• Click Define in the Boundary Tool to define the displayed patch as the intake
flow region
• Set the Name to Intake Flow
• Check that the Regions type is Pressure
• Set the Absolute pressure to Constant and Environmental using the
drop-down menus
• Check that the Pressure is 101325 Pa (for atmospheric pressure)
• Check that the Temperature is 293.15 K (for atmospheric temperature)

Figure 14-22 Multiple cylinder Star Controls > Boundary conditions panel for Port 1

Since the relevant flow boundary patch belongs to Cylinder 2, it will be used here
to define the boundary conditions (see Figure 14-24):
• Select domain Port and Valve 2 of Cylinder 2 from the drop-down menus
• Set Use data of to Port and Valve 2 of Cylinder 2 from the drop-down
menus
• Under Extra regions, click Define to open the Boundary Tool
• Click Display all to display all surface shells

Version 4.20 14-17


MULTIPLE CYLINDERS Chapter 14
STAR Set-Up in es-ice

• Click Keep picked to select the exhaust flow patch, as shown in Figure 14-23

Exhaust flow patch

Figure 14-23 Exhaust flow boundary patch

• Press q on the keyboard to exit from the pick mode


• Click Define in the Boundary Tool to define the displayed patch as an exhaust
• Set the Name to Exhaust Flow
• Check that the Regions type is set to Pressure
• Set the Absolute pressure to Constant and Mean using the drop-down menus
• Check that the Pressure is 101325 Pa (for atmospheric pressure)
• Check that the Temperature is 293.15 K (for atmospheric temperature)

14-18 Version 4.20


Chapter 14 MULTIPLE CYLINDERS
STAR Set-Up in es-ice

Figure 14-24 Multiple cylinder Star Controls > Boundary conditions panel for Port 2

As with initialisation, the remaining ports and cylinders use the boundary conditions
that were defined for their equivalent components, i.e. cylinder, intake or exhaust.
However, for boundary conditions, you also need to define patches for the spark
plug and the intake and exhaust boundary regions for Cylinder 2.
• Select domain Cylinder of Cylinder 2 from the drop-down menus
• Select the Extra regions toggle button and click Define
• Click Display all to display all surface shells
• Click Keep picked to select the spark plug patches, as shown in Figure 14-25
• Press q on the keyboard to exit from the pick mode
• Click Define in the Boundary Tool to define the displayed patches as the
spark plug

Version 4.20 14-19


MULTIPLE CYLINDERS Chapter 14
STAR Set-Up in es-ice

Figure 14-25 Spark Plug patches for Cylinder 2

• Select domain Port and Valve 1 of Cylinder 2 from the drop-down menus
• Under Extra regions, click Define to open the Boundary Tool
• Click Display all to display all surface shells
• Click Keep picked to select the intake flow patch, as shown in Figure 14-26
• Press q on the keyboard to exit from the pick mode
• Click Define in the Boundary Tool to define the displayed patch as an intake

Intake flow patch

Figure 14-26 Intake flow boundary patch for Cylinder 2

• Select domain Port and Valve 2 of Cylinder 1 from the drop-down menus
• Set Use data of to Port and Valve 2 of Cylinder 2 from the drop-down
menus

As there are numerous boundaries in this case, it is advantageous to use the


Summary feature to check that all boundary regions are correctly defined.
• Select Cylinder of Cylinder 1 and click the Summary toggle button to open
the Summary view of Boundary conditions, as shown in Figure 14-27.

14-20 Version 4.20


Chapter 14 MULTIPLE CYLINDERS
STAR Set-Up in es-ice

Figure 14-27 Boundary summary of Cylinder 1

• If you wish to verify the boundary region in the Controls Workspace window,
click the D button next to the required boundary. This button also opens the
Boundary Tool, so that you can redefine the boundary region if necessary.

Finally, select Standard for the wall function model and combine all patches for a
given boundary type into a single boundary region (see Figure 14-28).
• Exit from the Summary view by deselecting the Summary toggle button
• Select Global settings of Cylinder 1 from the drop-down menus at the top
• Set Wall function model to Standard
• Note that as the Wiebe model does not provide thermal conductivity, you
can only use the Standard or Han/Reitz wall function models
• Click Check regions to ensure that all regions are valid
• Select the consistently toggle button and click Join regions

Figure 14-28 Multiple cylinder Star Controls > Boundary conditions for Global settings

Post Setup
In the Post-setup view of the Star controls panel, specify your requirements for
post-processing the analysis results.
• For Cylinder of Cylinder 1 (see Figure 14-29), deselect the Monitoring
positions toggle button

Version 4.20 14-21


MULTIPLE CYLINDERS Chapter 14
STAR Set-Up in es-ice

Figure 14-29 Multiple cylinder Star Controls > Post-setup panel for Cylinder 1

• Accept the default settings for Port 1 and Port 2. As before, ports and
cylinders use the same settings as their equivalent counterparts.
• Select Global settings of Cylinder 1 from the drop-down menu
• Set Sectors to 8 to split the circumference of the valve curtain into eight
sections for post-processing purposes
• Select Global settings of Cylinder 2 and ensure that Sectors is also set to 8,
as shown in Figure 14-30

Figure 14-30 Multiple cylinder Star Controls > Post-setup panel for Global settings

Time Step Control


In the Time step control view of the Star Controls panel:
• Check that Global of Cylinder 1 is selected from the drop-down menus
• Set Step to 0.1 for a time step of 0.1 degrees crank angle
• Check that the Use valves toggle button is selected, as shown in Figure 14-31

14-22 Version 4.20


Chapter 14 MULTIPLE CYLINDERS
Saving the es-ice Model File

Figure 14-31 Multiple cylinder Star Controls > Time step control panel

Write Data
In the Write data view of the Star Controls panel:
• Accept the default settings and then click Write data to generate the files
required by pro-STAR

Saving the es-ice Model File


Finally, save the model file and exit from es-ice.
• In the Select panel, click Write data to open
the Write Tool
• Enter
save_es-ice.multiCylinderFinal
and click Save to save the model file
• Close es-ice

The case can now be set up in pro-STAR, as described in Chapter 7 of this volume.

Version 4.20 14-23


Chapter 15 DIESEL ENGINE: FULL-CYLINDER CLOSED-CYCLE MODEL

Chapter 15 DIESEL ENGINE: FULL-CYLINDER


CLOSED-CYCLE MODEL
The following tutorial data files are used in this chapter:
CLOSED-CYCLE_POLYMESH/closed-cycleDiesel.dbs
CLOSED-CYCLE_POLYMESH/uisDiesel.dbs
PANELS/training.pnl

This chapter demonstrates an engine model set-up that uses the closed-cycle
polyhedral meshing facility and includes a spray-optimised zone. A closed-cycle
analysis occurs when all valves are closed and hence there is no gas exchange
between the ports and cylinder. This stage of the engine cycle occurs during
injection, ignition and the start of combustion, i.e. after the intake valves close and
before the exhaust valves open. During this time, a number of important physical
processes and property changes take place that must be accurately captured in the
solution. A polyhedral mesh can usually model these highly dynamic conditions
better than a trimmed mesh so it is often beneficial to use it under these conditions.
Polyhedral meshing also generates a spray-optimised mesh zone, employing
hexahedral and pentahedral cells that are orthogonal to the spray direction. This
type of mesh is better at tracking droplets and therefore better at modelling fuel
injection. es-ice provides several parameters that can be used to modify the
spray-optimised zone so that it matches the fuel spray characteristics. The interface
between the spray zone and the surrounding polyhedral mesh has one-to-one cell
connectivity which in turn improves solver stability and accuracy.
In order to model the piston motion, cell layers are added and removed between
the upper and lower portions of the polyhedral mesh. The separation between these
portions is determined by the ‘user intermediate surface’, which is a surface mesh
imported into es-ice. In this tutorial, a user intermediate surface suitable for the
current engine geometry and operating conditions is provided. Note that there are
several points to consider when creating such a surface for your own cases, as
described in “User intermediate surfaces” on page 6-34 of the User Guide.
This tutorial simulates the operation of a diesel compression-ignition engine in
the interval between the intake valves closing and the exhaust valves opening (680
to 800 degrees crank angle). The fuel, n-dodecane with a cetane number of 60, is
injected at 715.14 degrees crank angle for a duration of 7.11 degrees. A total of
–4
0.8831 ×10 kg of fuel is injected through eight injectors during this period. The
fluid in the cylinder is given an initial rotational velocity of 2,000 rpm about the
z-axis, which induces turbulent fuel mixing after injection.
Table 15-1 summarises the engine characteristics and operating conditions.
Table 15-1: Engine characteristics and operating conditions

Bore 130 mm
Stroke 158.54 mm
Connecting Rod Length 270 mm
Speed 1100 rpm

The steps necessary to set up the tutorial are summarised below:

Version 4.20 15-1


DIESEL ENGINE: FULL-CYLINDER CLOSED-CYCLE MODEL Chapter 15
Importing the Geometry

1. Import the engine geometry


2. Create the mesh using the closed-cycle polyhedral method
3. Set up the necessary Star Controls in es-ice
4. Set up the fuel injection, liquid film and analysis controls in pro-STAR

Importing the Geometry


The tutorial starts by importing a .dbs file containing a discretised surface that
defines the engine geometry. Note that, as this tutorial is a closed-cycle analysis, the
valves are closed and the ports are removed as they are not needed. Also, as for all
es-ice geometry surfaces, the piston is at the TDC position (see Chapter 6,
“Preparing the geometry” in the User Guide for more information on preparing
geometry for closed-cycle analyses).
To import the surface:
• Check that
closed-cycleDiesel.dbs is in
your current working directory and
then launch es-ice in the usual manner
• In the Select panel, click Read data
• In the Read Tool, click the ellipsis (...)
button next to the DBase box and
select
closed-cycleDiesel.dbs via
the file browser
• Click the ellipsis (...) button next to
the Get box and select entry 1
Cylinder via the database browser
• In the Plot Tool, click CPlot to view
the imported geometry, shown in
Figure 15-1

Figure 15-1 Closed-cycle engine geometry

15-2 Version 4.20


Chapter 15 DIESEL ENGINE: FULL-CYLINDER CLOSED-CYCLE MODEL
Generating the Closed-Cycle Polyhedral Mesh

Generating the Closed-Cycle Polyhedral Mesh


In this section, you will generate a closed-cycle polyhedral mesh that includes a
spray-optimised zone. The mesh represents the engine as a 3D discretised volume
suitable for a fuel spray and combustion analysis.
The steps needed to generate the mesh are as follows:
1. Assign surface shells to geometry cell sets
2. Specify the General, Events and Cylinder parameters
3. Create a spray-optimised mesh zone to improve fuel injection modelling
4. Import a user intermediate surface to separate the upper and lower portions of
the polyhedral mesh and thus facilitate the addition and deletion of cell layers
5. Check that the spray-optimised zone is suitable for the supplied engine
geometry and user intermediate surface
6. Create the closed-cycle polyhedral mesh
Assigning shells to geometry cell sets
The first stage of the meshing process is to assign surface shells to a number of
special geometry cell sets. The es-ice mesher uses these sets to define the essential
engine cylinder components. Shells are assigned to geometry cell sets using either
the training panel or es-ice commands (if you are familiar with them).
• In the menu bar, select Panels > Directory
• In the Main es-ice window, enter the directory of the training user panel
• In the menu bar, select Panels > training to open the training panel

To define the geometry cell sets:


• Enter the following command to isolate the cylinder shells shown in Figure
15-2:

CSet, Newset, Name, Liner

• In the training panel, click Cylinder Shells to save cylinder wall shells into
CSet 1

Figure 15-2 Cylinder shell selection

• Enter the following command to isolate the piston shells shown in Figure

Version 4.20 15-3


DIESEL ENGINE: FULL-CYLINDER CLOSED-CYCLE MODEL Chapter 15
Generating the Closed-Cycle Polyhedral Mesh

15-3

CSet, Newset, Name, Piston

• In the training panel, click Piston Shells

Figure 15-3 Piston shells

• Enter the following commands to isolate the trimming shells shown in Figure
15-4

CSet, All

• In the training panel, click Trimming Shells

Figure 15-4 Trimming shells

Specifying General, Events and Cylinder parameters


Next, set the General, Events and Cylinder parameters that define various engine
characteristics and operating conditions.
• In the Select panel, click Create Template
• In the Create Template panel, select Closed cycle from the drop-down menu
at the top of the panel, as shown in Figure 15-5.

15-4 Version 4.20


Chapter 15 DIESEL ENGINE: FULL-CYLINDER CLOSED-CYCLE MODEL
Generating the Closed-Cycle Polyhedral Mesh

Figure 15-5 Closed-cycle Create Template panel

• Click General
• In the General parameters panel (see Figure 15-6), set the Engine type
drop-down menu to Diesel
• Set the Cylinder radius to 65
• Click Ok to accept these settings and close the panel

Figure 15-6 Closed-cycle General parameters panel

• In the Create Template panel, click Events


• In the Events parameters panel (see Figure 15-7), set Crank angle start (deg)
to 680 to specify the beginning of the analysis (i.e. the point at which the
intake valves close)
• Set Crank angle stop (deg) to 800 to specify the end of the analysis (i.e. the
point at which the exhaust valves open)
• Set Engine RPM to 1100
• Set Connecting rod length to 270

Version 4.20 15-5


DIESEL ENGINE: FULL-CYLINDER CLOSED-CYCLE MODEL Chapter 15
Generating the Closed-Cycle Polyhedral Mesh

• Click Ok to accept these settings and close the panel

Figure 15-7 Closed-cycle Events parameters panel

• In the Create Template panel, click Cylinder


• In the Cylinder parameters panel (see Figure 15-8), set the Piston stroke
length to 158.54
• Click Ok to accept these settings and close the panel

Figure 15-8 Closed-cycle Cylinder parameters panel

Creating a spray-optimised mesh zone


To define the spray-optimised zone, you must first create eight coordinate systems
that define the location and direction of the spray zones. These systems correspond
to the fuel injector nozzles. Note that if you intend to use an axisymmetric spray

15-6 Version 4.20


Chapter 15 DIESEL ENGINE: FULL-CYLINDER CLOSED-CYCLE MODEL
Generating the Closed-Cycle Polyhedral Mesh

type in your own cases, you do not need to specify these coordinate systems.
• Enter the following commands to define the coordinate systems.
Local, 11, Cylindrical, 1.5, 0, -1.2, Local, 2, Y, 103, Z, 0
RP8, 1, , , 45, , , , , , , 45

• In the Plot Tool, select the Workspace window from the drop-down menu as
this window is where the spray zones are displayed
• Select the Local toggle button to display the local coordinate systems
• Enter the following command to zoom out and show all coordinate systems

Zoom, MinMax, -2, 2, -2, 0, Plot

The Workspace window will display the coordinate systems shown in Figure 15-9.
The origin of each system defines the centre of the interface between the spray cone
and the recess; the z-axis defines the direction of each spray zone (see Chapter 6,
“Spray zones” in the User Guide for a definition and illustration of spray zone
components).

Figure 15-9 Local coordinate system display

Next, specify the Spray zone parameters defining the dimensions and cell sizes of
the spray zone (see Chapter 6, “Spray zone parameters” in the User Guide for
definitions and illustrations of the spray zone parameters).
• In the Create Template panel, click Make polymesh
• In the Closed cycle polymesh panel shown in Figure 15-10, ensure that Spray
type is set to Multihole and Lagrangian. These settings specify one spray
zone per injection point and also that the droplets are defined as Lagrangian
parcels (see Chapter 6, “Spray injection mode” in the User Guide)
• Set Coordinate system to 11 to assign the first local coordinate system to the
first spray hole
• Set Nozzle radius to 0.1 to specify the diameter of the refinement region
around the injector nozzle
• Set Radius and cell size to 0.2 and 0.05 to define the radius at the start of the
Version 4.20 15-7
DIESEL ENGINE: FULL-CYLINDER CLOSED-CYCLE MODEL Chapter 15
Generating the Closed-Cycle Polyhedral Mesh

spray cone and recess, and also the cell size in the radial direction
• Set Recess and cell size to 0.5 and 0.1 to define the length and cell size in the
recess axial direction
• Set Penetration length to 25 to specify the extent of the spray cone
• Set Sizes zone 1 and 2 to 0.2 and 0.4 to specify the cell sizes in zones 1 and 2,
respectively.
• Set Zone 1 length fraction to 0.3 to specify the length of zone 1
• Set Cone angle to 15 to specify the angle of the spray cone
• Set Aspect ratio to 1 to specify the cell aspect ratio that es-ice aims to
maintain throughout the spray zone

Figure 15-10 Closed cycle polymesh panel: Spray zone parameters

The remaining spray holes are identical to the first, except for the fact that they are
defined in terms of different coordinate systems. You can therefore take advantage
of the Use data of menu to apply the same spray zone parameters to all spray holes.
• Increase the number of spray holes to 8 spray holes via the up/down scroll
arrows and select Spray hole 2 from the drop-down menu
• Check that Use data of is set to Spray hole 1, as shown in Figure 15-11
• Set the Coordinate system to 12

15-8 Version 4.20


Chapter 15 DIESEL ENGINE: FULL-CYLINDER CLOSED-CYCLE MODEL
Generating the Closed-Cycle Polyhedral Mesh

Figure 15-11 Use data of drop-down menu

• Repeat the previous steps so that each subsequent spray hole will also use
these parameters, and that each coordinate system is assigned as shown in
Table 15-2:
Table 15-2: Spray hole coordinate system assignment

Spray Hole Coordinate System

Spray hole 3 Coordinate system 13


Spray hole 4 Coordinate system 14
Spray hole 5 Coordinate system 15
Spray hole 6 Coordinate system 16
Spray hole 7 Coordinate system 17
Spray hole 8 Coordinate system 18

Finally, create the complete spray zone configuration.


• In the Closed cycle polymesh panel, click Create spray zone
• In the Plot Tool, deselect the Local toggle and click the Off button to display
all spray zones in the Workspace panel, as shown in Figure 15-12.

Figure 15-12 Spray zone display

Version 4.20 15-9


DIESEL ENGINE: FULL-CYLINDER CLOSED-CYCLE MODEL Chapter 15
Generating the Closed-Cycle Polyhedral Mesh

Importing a user intermediate surface


The user intermediate surface separates the upper portion of polyhedral cells from
the lower portion, thus facilitating the addition and deletion of cell layers. For more
information on user intermediate surfaces and a list of important considerations
when creating them for your own cases see Chapter 6, “User intermediate surfaces”
in the User Guide.
The user intermediate surface for this tutorial is supplied with the STAR-CD
installation and should now be imported into es-ice.
• In the Closed cycle polymesh panel, ensure that the User intermediate
surface toggle button is selected as shown in Figure 15-13
• Click the ellipsis (...) button next to the Database file box and select
uisDiesel.dbs via the file browser
• Click the ellipsis (...) button next to the Database id box and select entry 1
User Intermediate Surface via the database browser
• Click the Add toggle button to add the user intermediate surface shells to the
previously created spray zone meshes
• Click Read into general workspace to load the user intermediate surface in
the Workspace panel, as shown in Figure 15-14

Figure 15-13 Closed cycle polymesh panel: User intermediate surface

15-10 Version 4.20


Chapter 15 DIESEL ENGINE: FULL-CYLINDER CLOSED-CYCLE MODEL
Generating the Closed-Cycle Polyhedral Mesh

Figure 15-14 User intermediate surface and spray zones

Checking the spray-optimised zone


If the spray zone intersects the user intermediate surface, es-ice cannot generate a
closed-cycle polyhedral mesh. In addition, the spray zone must intersect the
geometry surface so that it is trimmed to the injector surface. If there is a gap
between the spray zone and the geometry surface, es-ice generates very small
polyhedral cells in the gap which can make the solver unstable. Therefore, you
should check the spray zone using a section plot before creating the polyhedral
mesh. You can also view the position of the spray zone within the engine geometry.
• Specify the section using commands that
define a point on the section plane and the
direction of the normal to that plane:

SPoint, 0, 0, 0
SNormal, 0, 1, 0

• In the Plot Tool, change the plot type setting


to Section as shown in the adjacent
screenshot
• Change the Views setting to View 0, 1, 0
• Click the DPlot button to plot the spray zone, user intermediate surface and
geometry surface together, as shown in Figure 15-15

Figure 15-15 Section plot of the spray zone, user intermediate surface and geometry

Figure 15-15 indicates that the spray zone does not intersect the user intermediate
surface and is positioned correctly within the engine geometry. Figure 15-16 shows
that the recess slightly overlaps the injector surface, thus ensuring that the spray
zone is trimmed to the injector surface.

Version 4.20 15-11


DIESEL ENGINE: FULL-CYLINDER CLOSED-CYCLE MODEL Chapter 15
Generating the Closed-Cycle Polyhedral Mesh

Figure 15-16 Close-up of spray zone intersecting the geometry surface

Creating the closed-cycle polyhedral mesh


Having obtained suitable spray zone parameters and a user intermediate surface,
you can now proceed to generate a polyhedral mesh. At this stage, you should also
check the parameters that define an extrusion cell layer on wall boundaries.
• In the Closed cycle polymesh panel, set the Polymesh cell size to 1.2
• Click Extrusion set-up
• In the Polymesh-extrusion panel, check that the parameters are set as follows:
• Global > Thickness: 0.2
• Global > Layers: 1
• Global > Ratio: 1
• Click Create polymesh

Once the child process is complete, the resulting mesh is displayed in the Template
panel as shown in Figure 15-17.

Figure 15-17 Closed-cycle polyhedral mesh


15-12 Version 4.20
Chapter 15 DIESEL ENGINE: FULL-CYLINDER CLOSED-CYCLE MODEL
Generating the Closed-Cycle Polyhedral Mesh

Running Star Setup


Running the Star setup process will store the
geometry data obtained so far and generate files
required by pro-STAR and STAR.
• In the Select panel, click Star Setup
• In the Star setup panel, deselect the Use
unwarper toggle button
• Select pro-STAR 4.20 from the pro-STAR
drop-down menu
• Click Star setup

Creating and checking the computational mesh


You can now create the computational mesh at
TDC (720 degrees crank angle) and check that
it does not contain any negative-volume cells.
• In the Select panel, click Create Result
• In the Create Result panel, select the
Interpolate toggle button to interpolate
vertex locations between events (as
opposed to using internal es-ice
smoothing algorithms)
• Ensure that the Use database toggle
button is selected so as to store the mesh
data to a .dbs file
• Set the Angle (deg) to 720
• Click Create Result to create the mesh at
720 degrees CA. Note that a
result.d720.0.dbs file is added in
your working directory. This is a
database-format file containing the mesh at the specified crank angle

Version 4.20 15-13


DIESEL ENGINE: FULL-CYLINDER CLOSED-CYCLE MODEL Chapter 15
Saving the Model File

• When the child process is complete, click Read Result to read the mesh into
the Workspace window, as shown in Figure 15-18
• Enter the following command to check that there are no cells with negative
volumes:

Check, NegVolume

Figure 15-18 Section plot of the computational mesh at 720 degrees crank angle

Saving the Model File


Having completed the es-ice part of the CFD model
set-up, save your work up to this point in an es-ice
model file.
• In the Select panel, click Write data
• In the Write Tool, enter
save_es-ice.closed-cycle and click
Save to save the model
• Close es-ice

At this stage, you can continue setting up the model physics in es-ice and pro-STAR
by going to Chapter 17 and following the description therein.

15-14 Version 4.20


DIESEL ENGINE: FULL-CYLINDER CLOSED-CYCLE MODEL Chapter 15
Saving the Model File

15-16 Version 4.20


Chapter 16 DIESEL ENGINE: SECTOR MODEL

Chapter 16 DIESEL ENGINE: SECTOR MODEL


The following tutorial data files are used in this chapter:
SECTOR_TUTORIALS/bowl.dbs

This tutorial describes the generation of a typical sector mesh, suitable for
modelling diesel fuel injection and combustion. The main advantage of using a
sector mesh is the run time reduction as you are only modelling a fraction of the
actual cylinder volume. However, you cannot model the gas exchange phases as the
sector mesh cannot handle valve opening and closing events. In addition, the piston
bowl is assumed to be axisymmetric so you are unable to model valve pockets or
similar features on the piston bowl. Therefore, sector meshing is best suited to
modelling the fuel injection and combustion phase of axisymmetric cylinders.
The tutorial compliments the case described in Chapter 15 of this volume by
using a similar cylinder geometry and the same operating conditions and engine
characteristics. The piston geometry is now a 45° sector of the geometry used in
Chapter 15, with the valve pockets removed. The generated volume mesh then only
includes one of the eight fuel injectors. As the two cases share a similar set-up, this
chapter only describes the es-ice sector meshing stage. To run the analysis, you
must first go back to Chapter 15 to continue the physics set-up in es-ice and
pro-STAR.
Figure 16-1 shows the bowl geometry used in this case and also an example of
the analysis results to be expected from a sector mesh model.

Figure 16-1 Example of spray and liquid film results from a sector mesh analysis

Note that when producing piston bowl surface meshes for your own case, the bowl
geometry must be at BDC. es-ice generates a spline that represents the bowl at TDC
during the sector meshing process.
The steps to be followed in this tutorial are outlined below:
1. Import the piston bowl geometry surface
2. Create a 2D profile of the piston bowl shape
3. Generate a 2D template mesh
4. Generate a 3D sector mesh of the cylinder

Version 4.20 16-1


DIESEL ENGINE: SECTOR MODEL Chapter 16
Importing the Bowl Geometry

Importing the Bowl Geometry


To import the geometry surface mesh:
• Launch es-ice in the usual manner
• In the Select panel, click Read Data
• In the Read Tool, click the ellipsis (...)
button next to the DBase box and
select bowl.dbs via the file browser
• Click the ellipsis (...) button next to
the Get box and select 1 bowl
geometry via the database browser
• In the Plot Tool, set the Views option
to View 1 -1 1
• Click CPlot to display the imported
bowl geometry shown in Figure 16-2

Figure 16-2 Bowl geometry surface

Defining the Bowl Shape


Based on the imported 3D surface mesh, es-ice requires a 2D profile of the bowl
shape in order to generate a 2D section of the cylinder. The profile is used at a later
stage to trim the 3D template and generate a cylinder volume mesh.

16-2 Version 4.20


Chapter 16 DIESEL ENGINE: SECTOR MODEL
Defining the Fuel Injector

• Enter the following command to create a spline representing the 2D profile of


the bowl:

Spline, 1, RadShell

If the bowl is not axisymmetric in your own case (e.g. it contains valve pockets),
only include the axisymmetric part of the bowl in the current cell set before using
the above command.
• In the Plot Tool, set Views View 0 -1 0 to display the spline, as shown in
Figure 16-3

Figure 16-3 Displaying the spline representing the bowl

Defining the Fuel Injector


At this stage, you will create a coordinate system for the fuel injector. The origin of
the coordinate system defines the point of injection and the z-axis defines the
direction of the fuel spray. Alternatively, you can create the injector coordinate
system after importing the model into pro-STAR.
• Enter the following command to create the injector coordinate system:

Local, 11, Cylinder, 1.5, 0, -1.2, 0, 0, 103

• In the Plot Tool, select the Local toggle button


• Click CPlot
• Enter the following command to view the injector coordinate system relative
to the global coordinate system, as shown in Figure 16-4:

Zoom, MinMax, -30, -20, 165, 175, Plot

Version 4.20 16-3


DIESEL ENGINE: SECTOR MODEL Chapter 16
Creating the 2D Template

Figure 16-4 Fuel injector coordinate system relative to the global coordinate system

Creating the 2D Template


The first step in creating the 2D template is to define the engine characteristics and
operating conditions in the General parameters and Events parameters panels.
• In the Select panel, click Create Template
• In the Create Template panel, select Sector
from the drop-down menu
• Click Events
• In the Events parameters panel (see Figure
16-5), set the Crank angle start (deg) to 680
• Set the Crank angle stop (deg) to 800
• Set the Engine RPM to 1100
• Set the Connecting rod length to 270
• Click Ok to accept the settings and close the
panel
• In the Create Template panel, click Cylinder
• In the Cylinder parameters panel (see Figure
16-5), set the Piston stroke length to 158.54
• Click Ok to accept the settings and close the
panel

16-4 Version 4.20


Chapter 16 DIESEL ENGINE: SECTOR MODEL
Creating the 2D Template

Figure 16-5 Events parameters and Cylinder parameters panels

Next, create the 2D mesh template. In the following steps, you will set parameters
in the Sector panel to define the cell count and cell distribution in certain parts of
the template. For definitions and illustrations of these parameters, see Chapter 6,
“Axisymmetric Sector Meshing” in the User Guide.
To begin creating the 2D mesh template:
• In the Create Template panel, click Make Sector
• In the Sector panel (Figure 16-6), click Create TDC Spline to create the bowl
profile at the TDC position
• Set the Number of holes to 8 to define the total number of injectors in the
cylinder
• Set the Azimuthal cells to 16
• Set the Minimum TDC layers to 5
• Select the Modify prisms toggle button and ensure that the adjacent value is
set to 2
• Select the Edit toggle button and set the Radial cells to 60 (third column)
• Set the Axial cells to 130 (first column)
• Set the Axial block cells to 40 (first column)
• Click Create 2D

Version 4.20 16-5


DIESEL ENGINE: SECTOR MODEL Chapter 16
Creating the 2D Template

Figure 16-6 Sector panel

Finally, create a plot of the 2D template overlaying the piston splines to check that
enough cell layers have been defined to create a sector mesh.
• In the Plot Tool, select Geometry from the drop-down menu to activate the
Geometry window
• Enter the following command to remove the bowl surface mesh from the
display:

CSet, None

• Select Workspace from the drop-down menu to activate the Workspace


window
• Deselect the Fill toggle button
• Click DPlot to display the template on top of the bowl splines, as shown in
Figure 16-8

16-6 Version 4.20


Chapter 16 DIESEL ENGINE: SECTOR MODEL
Creating the Sector Mesh

Figure 16-7 Overlay of 2D template and bowl splines

Creating the Sector Mesh


The final stage in the sector meshing process is to trim the 2D template to the bowl
splines and generate the 3D sector mesh representing the cylinder sector.
• In the Sector panel, click Trim to create the trimmed sector mesh
• When the child process is complete, click Get sector to read the trimmed
sector mesh into the Template window, as shown in Figure 16-8

Version 4.20 16-7


DIESEL ENGINE: SECTOR MODEL Chapter 16
Creating the Sector Mesh

Figure 16-8 Mesh before and after trimming

Finally, complete the mesh so that it is ready for use in pro-STAR. This process is
similar to the one described in Chapter 4, “Running Star Setup”, except that it is
entirely contained within the Sector panel. If you wish to utilize any of the toggle
button options provided in Star Setup for your own case, do so before executing the
steps below.
• In the Sector panel (see Figure 16-9), set the Extrusion ratio to 0.4 to create

16-8 Version 4.20


Chapter 16 DIESEL ENGINE: SECTOR MODEL
Creating and Checking the Mesh

an extrusion layer on the wall boundaries. The specified value defines the
layer thickness as a ratio of the adjacent cell thickness
• Click Create to finalise the mesh set-up
[

Figure 16-9 Finalising the mesh set-up in the Sector panel

Creating and Checking the Mesh


You now need to create the mesh to be used by the STAR solver. This allows you
to check that the mesh is suitable for your case and valid for a full CFD analysis.
You are advised to create and check the mesh at several crank angles to evaluate
mesh quality at every stage.

Version 4.20 16-9


To create the computational mesh at TDC:
• In the Select panel, click Create Result
• In the Create Result panel, set the Angle
(deg) to 720
• Select the Interpolate toggle button to
interpolate vertex locations (as opposed
to using internal es-ice smoothing
algorithms). Interpolation is slower, but
uses the same method as the STAR
solver.
• Click Create Result to create the
computational mesh
• When the child process is complete,
click Read Result to import the mesh
into in the Workspace window
• In the Plot Tool, select the Fill toggle
button and click CPlot to view the mesh,
as shown in Figure 16-10

Figure 16-10 The mesh at TDC

• Enter the following command to check for negative-volume cells (and, if any
are found, put them in CSet 25):
Check, NegVolume, 25

Saving the Model

• In the Write Tool, enter


save_es-ice.sector and then click Save

At this stage, you can continue setting up the model physics in es-ice and pro-STAR
by going to Chapter 17 and following the description therein. Note, however, that
you need to specify eight injectors in that tutorial, whereas only the first injector is
required for this sector model.
Chapter 17 DIESEL ENGINE: STAR SET-UP IN ES-ICE AND PRO-STAR
STAR Set-up in es-ice

Chapter 17 DIESEL ENGINE: STAR SET-UP IN es-ice and


pro-STAR
The following tutorial data files are used in this chapter:
CLOSED-CYCLE_POLYMESH/injection.tbl

This chapter details the physics set-up in es-ice and pro-STAR for both the
full-cylinder and sector Diesel engine models presented in Chapter 15 and Chapter
16 of this volume.

STAR Set-up in es-ice


This section covers the settings required in the Star Controls panel, which is where
the model physics (combustion model, initial conditions, boundary conditions, etc.)
are defined. Before attempting this part of the tutorial, it is important that you
familiarize yourself with the Star Controls panel by completing the example in
Chapter 6 of this volume. In the following sections, most of that panel’s settings are
presented in summary form, but information specific to diesel models is described
in more detail.
The required Star Controls panel settings are as follows:
1. Load model — load the model into Star Controls
2. Analysis setup — select the desired combustion model and define parameters
for scalar initialisation
3. Combustion — specify combustion and ignition parameters
4. Initialization — specify the engine initial conditions
5. Boundary conditions — specify the engine boundary conditions
6. Post-setup — specify the post-processing requirements
7. Time step control — specify the time step settings
8. Write data — write the files needed to import the model into pro-STAR
Load model
In the Load model view of the Star Controls panel, (see Figure 17-1):
• Click Load model to load the model in the Controls Workspace window

Figure 17-1 Closed-cycle Star Controls > Load model panel

Analysis setup
In the Analysis setup view of the Star Controls panel (see Figure 17-2):
• Check that the Combustion toggle button is selected

Version 4.20 17-1


DIESEL ENGINE: STAR SET-UP IN ES-ICE AND PRO-STAR Chapter 17
STAR Set-up in es-ice

• Select ECFM-3Z, compression from the combustion model drop-down


menu to specify compression ignition conditions
• Select n-dodecane from the fuel drop-down menu
• Set the Cetane number to 60
• Ensure that Mixture option is set to Phi and enter 0.85 for the air-fuel ratio
• Ensure that EGR definition is set to Air+Exhaust and enter 10% for the EGR
percentage
• Set Residual to 5% to specify that the cylinder contains 5% residual gas at the
start of the analysis

Figure 17-2 Closed-cycle Star Controls > Analysis setup panel

Assembly
In the Assembly view of the Star Controls panel (see Figure 17-3):
• Click Finish as you do not need to add any static meshes to the model

17-2 Version 4.20


Chapter 17 DIESEL ENGINE: STAR SET-UP IN ES-ICE AND PRO-STAR
STAR Set-up in es-ice

Figure 17-3 Closed-cycle Star Controls > Assembly panel

Combustion
In the Combustion view of the Star Controls panel (see Figure 17-4):
• Set the Tabulated Double-Delay Autoignition Model option to On (see “The
Double-Delay autoignition model” on page 8-46 of the User Guide and “The
Double-Delay autoignition model” on page 11-72 of the Methodology
volume for more information on this model).
[

Figure 17-4 Closed-cycle Star Controls > Combustion panel

Initialization
In the Initialization view of the Star Controls panel (see Figure 17-5):
• Select Constant Omega from the Velocity drop-down menu to specify an
Version 4.20 17-3
DIESEL ENGINE: STAR SET-UP IN ES-ICE AND PRO-STAR Chapter 17
STAR Set-up in es-ice

initial rotational velocity about the global z-axis


• Set the rotational velocity magnitude Omega to 2000
• Set the Pressure to 9.87 and the units to bar
• Set the Temperature to 583 K
• Select I-L (turbulence intensity and length scale) from the Turbulence
drop-down menu. Note that you should only use this option if the initial
velocity is non-zero. This is because the initial turbulence level is calculated
using velocity data, so a zero value causes the solver to fail.

Figure 17-5 Closed-cycle Star Controls > Initialization panel

Boundary conditions
In the Boundary conditions view of the Star Controls panel (see Figure 17-6):
• Set the Combustion dome regions boundary type to Fixed and the
Temperature to 450 K
• Set the Piston crown region boundary type to Fixed and the Temperature to
450 K
• Set the Cylinder wall region boundary type to Fixed and the Temperature to
400 K

17-4 Version 4.20


Chapter 17 DIESEL ENGINE: STAR SET-UP IN ES-ICE AND PRO-STAR
STAR Set-up in es-ice

Figure 17-6 Closed-cycle Star Controls > Boundary Conditions panel for the Cylinder

Next, choose Angelberger as the wall function model and combine all patches for
a given boundary type into a single boundary region (see Figure 17-7):
• Select Global settings from the drop-down menu at the top of the panel
• Check that the Wall function model is set to Angelberger
• Click Check regions to check that all regions are valid
• Ensure the consistently toggle button is selected and then click Join regions

Figure 17-7 Closed-cycle Star Controls > Boundary Conditions panel for Global
settings

Post setup
In a diesel engine analysis, it is particularly useful to output and plot scatter data of
equivalence ratio vs. temperature on a per-cell basis (see Chapter 8, “Post set-up”
in the User Guide). The plots are then used to evaluate the fuel-air mixture quality
distribution in the cylinder.
In the Post-setup view of the Star Controls panel (see Figure 17-8):
• Select the Phi vs temperature toggle button to output equivalence ratio and
temperature data
• Use the data range up/down scroll arrows to increase the number to 4 data
ranges

Version 4.20 17-5


DIESEL ENGINE: STAR SET-UP IN ES-ICE AND PRO-STAR Chapter 17
STAR Set-up in es-ice

• Define each data range as follows:


• Data range 1: Set Begin angle to 732, End angle to 736 and Interval to 2
• Data range 2: Set Begin angle to 750, End angle to 752 and Interval to 2
• Data range 3: Set Begin angle to 770, End angle to 772 and Interval to 2
• Data range 4: Set Begin angle to 790, End angle to 792 and Interval to 2

Figure 17-8 Closed-cycle Star Controls > Post-setup panel

Time step control


In problems involving complex spray and combustion models, stability and
accuracy considerations dictate that the time step size is suitably adjusted before
continuing the analysis past the fuel injection and onset of combustion stages.
In the Time step control view of the Star Controls panel (see Figure 17-9):
• Use the time step up/down scroll arrows to increase the number to 2 time
steps
• Set the step size applicability range and magnitude (in terms of crank angle)
as follows:
• Time step 1: Set Angle to 680 and Step to 0.05
• Time step 2: Set Angle to 700 and Step to 0.025

17-6 Version 4.20


Chapter 17 DIESEL ENGINE: STAR SET-UP IN ES-ICE AND PRO-STAR
Saving the Model File

Figure 17-9 Closed-cycle Star Controls > Time step control panel

Write data
In the Write data view of the Star Controls panel:
• Accept the default settings and click Write data to generate the files required
by pro-STAR

Saving the Model File


Having completed the es-ice part of the CFD model
set-up, save your work up to this point in an es-ice
model file.
• In the Select panel, click Write data
• In the Write Tool, enter
save_es-ice.diesel and click Save to
save the model
• Close es-ice

At this stage, you can continue setting up the model physics in es-ice and pro-STAR
by going to Chapter 17 and following the description therein.

STAR Set-up in pro-STAR


This section covers the required settings in pro-STAR for a diesel fuel injection
engine, which is where the fuel spray, liquid film and STAR analysis controls are
defined. Before attempting this part of the tutorial, it is important that you
familiarize yourself with the pro-STAR interface by completing the example in
Chapter 7 of this volume. In the following sections, most panel settings are only
presented in summary form, but information specific to diesel models and fuel
injection is described in more detail.
The required steps are as follows:
1. Start up pro-STAR, open panel es-ice.PNL and use it to import the data
created in es-ice
2. Select the Lagrangian and Liquid Film modelling options
3. Set up fuel injection parameters
4. Set up liquid film properties
5. Set up the STAR analysis controls

Version 4.20 17-7


DIESEL ENGINE: STAR SET-UP IN ES-ICE AND PRO-STAR Chapter 17
STAR Set-up in pro-STAR

6. Save the model and create the STAR geometry and problem files
Using the es-ice Panel
Use the es-ice panel to import the mesh and physics settings created in es-ice and
saved via the Write data operation in Star Controls. Also resize the pro-STAR
memory allocation and define moving mesh events.
• Launch pro-STAR in the usual manner
• Select Panels > .es-ice from the menu bar to open the es-ice panel, as shown
in Figure 17-10
• Click Resize, Model and Events in sequence
• Close the es-ice panel

Figure 17-10 es-ice panel

Selecting Lagrangian and Liquid Film Modelling


To model fuel injection, activate the pro-STAR Lagrangian and Liquid Film
options.
• In the pro-STAR Model Guide, select Analysis Features as shown in Figure
17-11
• Set the Multi-Phase Treatment option to Lagrangian
• Set the Liquid Films option to On
• Click Apply

17-8 Version 4.20


Chapter 17 DIESEL ENGINE: STAR SET-UP IN ES-ICE AND PRO-STAR
STAR Set-up in pro-STAR

Figure 17-11 Analysis Features panel

Setting up the Fuel Injection Model


Enter control parameters that determine how fuel droplets are handled in the STAR
solver.
• In the pro-STAR Model Guide, select Lagrangian Multi-Phase > Droplet
Controls (see Figure 17-12) and set the panel parameters as follows:
• Set the Interpolation Method to Use Vertex Data
• Set the Under-Relaxation of Lagrangian Sources to 0.5
• Set the Droplet Trajectory Maximum File Size (Mb) to 400
• Set the Maximum Number of Parcels to 500000
• Click Apply

Version 4.20 17-9


DIESEL ENGINE: STAR SET-UP IN ES-ICE AND PRO-STAR Chapter 17
STAR Set-up in pro-STAR

Figure 17-12 Droplet Controls panel

Specify the droplet physical models that determine the droplet behaviour during the
analysis.
• In the pro-STAR Model Guide, select Lagrangian Multi-Phase > Droplet
Physical Models
• In the Global Physical Models tab (see Figure 17-13), set the panel
parameters as follows:
• Set the Turbulent Dispersion to On
• Set the Gravity Effects to On
• Set the Collision Model to Advanced (you may choose to turn Off this
model to reduce the run time)
• Click Apply

17-10 Version 4.20


Chapter 17 DIESEL ENGINE: STAR SET-UP IN ES-ICE AND PRO-STAR
STAR Set-up in pro-STAR

Figure 17-13 Global Physical Models panel

• In the Droplet Physical Models tab (see Figure 17-14), set the panel
parameters as follows:
• Set the Momentum Transfer > Correlation to Standard
• Set the Mass Transfer Calculation to Standard
• Set the Heat Transfer Calculation to Standard
• Set the Droplet Break-Up > Break-Up Model to Reitz
• Set the Droplet-Wall Interaction > Droplet Behavior to Bai
• Set the Droplet-Wall Interaction > Wall Heat Transfer to On
• Ensure that Droplet-Wall Interaction > Thermal break-up is activated
• Set Boiling to On
• Click Apply

Version 4.20 17-11


DIESEL ENGINE: STAR SET-UP IN ES-ICE AND PRO-STAR Chapter 17
STAR Set-up in pro-STAR

Figure 17-14 Droplet Physical Models panel

Specify the droplet physical properties by selecting the appropriate droplet material.
• In the pro-STAR Model Guide, select Lagrangian Multi-Phase > Droplet
Properties (see Figure 17-15) and set the panel parameters as follows:
• From the drop-down menu at the top of the panel, select the Define from
NIST table option to open the droplet properties database
• In the Component Properties table, select row 1
• In the NIST database, select C14H30 (N-TETRADECANE). This fuel is
selected because the NIST database provides the correct liquid fuel
density for the analysis conditions. The fuel evaporates to Scalar 1, which
is C12H26 in this case.
• Click Select
• In the Component Properties table (see Figure 17-16):
• Set Mass Fraction to 1 and press <Enter> on the keyboard
• Set Evaporates to Scalar to 1 and press <Enter> on the keyboard
• Click Apply

17-12 Version 4.20


Chapter 17 DIESEL ENGINE: STAR SET-UP IN ES-ICE AND PRO-STAR
STAR Set-up in pro-STAR

Figure 17-15 Droplet Properties database

Figure 17-16 Droplet Properties panel

Version 4.20 17-13


DIESEL ENGINE: STAR SET-UP IN ES-ICE AND PRO-STAR Chapter 17
STAR Set-up in pro-STAR

Finally, specify the fuel injection and atomisation parameters.


• In the pro-STAR Model Guide, select Lagrangian Multi-Phase > Spray
Injection With Atomization (see Figure 17-17) and set the panel parameters as
follows:
• Set the Atomization Model to Huh
• Set the Nozzle L/D to 6
• Set the Nozzle CD to 0.7
• Click Apply Spray Options
• Set the Injection Temperature (K) to 310
• Set the Hole Diameter (m) to 0.0004
• Set the Coordinate System to 11
• Select Table from the Mass Flow Rate drop-down menu and enter
injection.tbl in the Table filename box
• Set the Number of Parcels/Injector (/sec) to 5e7
• Click Update Injector

Figure 17-17 Spray Injection With Atomization panel

• If you are continuing from the closed-cycle polyhedral meshing tutorial,


repeat the previous steps for all injectors so that each uses the same settings
except for Coordinate System. The Injector Number is increased using the

17-14 Version 4.20


Chapter 17 DIESEL ENGINE: STAR SET-UP IN ES-ICE AND PRO-STAR
STAR Set-up in pro-STAR

scroll box at the bottom of the panel. The correspondence between injector
and coordinate system is summarised in Table 17-1.
Table 17-1: Injector number coordinate assignment

Injector Number Coordinate System

2 Coordinate system 12
3 Coordinate system 13
4 Coordinate system 14
5 Coordinate system 15
6 Coordinate system 16
7 Coordinate system 17
8 Coordinate system 18

Setting up the Liquid Film Model


When fuel is sprayed into the cylinder, any fuel droplets that fall on the cylinder
wall will generate a thin liquid film. To model this behaviour, activate the liquid
film model, select the film physical properties and allow evaporation to take place.
• In the pro-STAR Model Guide, select Liquid Films > Film Physical Models
and Properties (see Figure 17-18) and set the panel parameters as follows:
• Ensure that Liquid Film Activation is set to On
• Set the Evaporation and Condensation option to Evaporation only
• Click Database and select C12H26_l (DODECANE(L))
• Click Apply

Figure 17-18 Film Physical Models and Properties panel

Version 4.20 17-15


DIESEL ENGINE: STAR SET-UP IN ES-ICE AND PRO-STAR Chapter 17
STAR Set-up in pro-STAR

Since this tutorial describes a closed-cycle case, there is only one solution domain
(Material # 1) in the mode. You therefore only need to set properties for one film
material.
Setting up Analysis Controls
Specify solver solution controls and output parameters that enable post-processing
of the results.
• In the pro-STAR Model Guide window, select Analysis Controls > Solution
Method (see Figure 17-19) and set the panel parameters as follows:
• Set the Under Relaxation for Pressure Correction to 0.5
• Click Apply

Figure 17-19 Solution Method panel

• In the Analysis Controls > Primary Variables panel, select the Solver
Parameters tab (see Figure 17-20) and change the Residual Tolerance values
as follows:
• Set all momentum residuals (U-Momentum, V-Momentum and
W-Momentum) to 0.001
• Set the Pressure to 0.0001
• Set the turbulence residuals (Turbulence KE and Turbulence Diss) to
0.001
• Click Apply

17-16 Version 4.20


Chapter 17 DIESEL ENGINE: STAR SET-UP IN ES-ICE AND PRO-STAR
STAR Set-up in pro-STAR

Figure 17-20 Primary Variables panel

• In Analysis Controls > Analysis Output, select the Post tab (see Figure 17-21)
and set the panel parameters as follows:
• Set the Output Frequency to 5
• Set the Backup Frequency to 400
• Click Apply

Version 4.20 17-17


DIESEL ENGINE: STAR SET-UP IN ES-ICE AND PRO-STAR Chapter 17
STAR Set-up in pro-STAR

Figure 17-21 Post Analysis Output panel

• Select the Transient tab (see Figure 17-22) and set the panel parameters as
follows:
• Set the Starting at time (degCA) to 680
• Set the Output interval (degCA) to 2
• In the displayed list of available output data, select Density and click the Post
check box
• Repeat the previous step for the following variables:
• C12H26
• Dissipation
• Film Mass Fractions
• Temperature
• Turb Kinetic Energy
• Click Apply

17-18 Version 4.20


Chapter 17 DIESEL ENGINE: STAR SET-UP IN ES-ICE AND PRO-STAR
STAR Set-up in pro-STAR

Figure 17-22 Transient Analysis Output panel

Writing the Geometry and Problem Files and Saving the Model
Finally, write the STAR geometry and problem files and save the pro-STAR model
file.
• From the main pro-STAR menu bar, select File > Save Geometry to open the
Save Geometry File panel
• Set the Geometry Scale Factor to 0.001 and click Apply followed by Close
• Select File > Save Problem and click Save
• Select File > Quit and click Save & Quit

Figure 17-23 File writing and exit from pro-STAR

The solver can now be run, as described in Chapter 8 of this volume.


Version 4.20 17-19
Chapter 18 DIESEL ENGINE: POST-PROCESSING
Creating a Scatter Plot

Chapter 18 DIESEL ENGINE: POST-PROCESSING


The following tutorial data files are used in this chapter:
es-ice_phi-t.pos
star.mdl
star.evn (created in Chapter 15)
star.ccmg
star.ccmt
star.trk
SECTOR_TUTORIALS/droplets.inp
SECTOR_TUTORIALS/scriptDroplets.sh

This chapter presents a tutorial for post-processing solution data for diesel models
in both es-ice and pro-STAR.
es-ice can create scatter plots from information contained within a scatter data
file (es-ice_phi-t.pos). This file is used here to create a scatter plot of
equivalence ratio vs. gas temperature for every cell in the cylinder. Individual data
sets are supplied at the crank angles specified by using the Post- setup tool in the
Star Controls panel (see Chapter 17, “Post setup” of this volume).
pro-STAR can produce three-dimensional images displaying droplets within the
model geometry; a feature that can be used to analyse spray characteristics inside
the engine cylinder at any time step. A series of images can also be exported at each
time step so that you can create animations of the transient solution using third-party
software.
The tutorial covers the following operations:
1. Creating a scatter plot displaying equivalence ratio versus temperature
2. Creating a three-dimensional animation of fuel spray inside the cylinder
throughout the simulation

Examples of general post-processing techniques are also given in Chapter 9 of this


volume.

Creating a Scatter Plot


This section describes a scatter plot creation using the es-ice Graph Tool. The plot
displays equivalence ratio versus temperature at 734 degrees CA.
First, load the es-ice scatter data file (es-ice_phi-t.pos) into the Graph
Tool.
• Launch es-ice in the usual manner
• In the Select panel, click Post-process. The Graph Tool is included in the
Post-process panel by default.
• Click the ellipsis (...) button and select es-ice_phi-t.pos from the file
browser
• Select Scatter POS file from the drop-down menu
• Click Read

To plot a graph of equivalence ratio versus temperature at 734 degrees CA:


• Select item 2 in the list, labelled Phi-T: cylinder 1 angle 734
• Click Plot

Version 4.20 18-1


DIESEL ENGINE: POST-PROCESSING Chapter 18
Creating a Scatter Plot

Now modify the data range and add grid lines and labels to improve the graph
appearance, as shown in Figure 18-1.
• Select the Domain toggle button
• Enter 0 and 3000 in the next two text boxes to cover a suitable data range
• Select Lines (as opposed to Ticks) from the drop-down menu and enter 6 in
the adjacent box
• Set the Label to Temperature
• Select the Range toggle button
• Enter 0 and 10 in the next two text boxes to cover a suitable data range
• Select Lines (as opposed to Ticks) from the drop-down menu and enter 10 in
the adjacent box
• Set the Label to Equivalence Ratio

Figure 18-1 Equivalence ratio versus temperature scatter plot


18-2 Version 4.20
Chapter 18 DIESEL ENGINE: POST-PROCESSING
Creating a Spray Droplet Animation

Creating a Spray Droplet Animation


This section gives an example of how you can use a pro-STAR input file
(droplets.inp) to create an animation of fuel injection during the simulation.
Opening the input file with a text editor will display its contents, as shown in the
following section. For clarity, the full command names have been used although the
usual four-letter abbreviations can be substituted for them.
• Connect the events file and load the transient data

RESUME, ,
EVFILE, CONNECT
TRLOAD, ,
• Create a custom colour table for use with the colour scale

CLRTABLE, POST, 1, 1.00, 0.00, 0.00, 1.0


CLRTABLE, POST, 2, 1.00, 0.20, 0.00, 1.0
CLRTABLE, POST, 3, 1.00, 0.40, 0.00, 1.0
CLRTABLE, POST, 4, 1.00, 0.55, 0.00, 1.0
CLRTABLE, POST, 5, 1.00, 0.70, 0.00, 1.0
CLRTABLE, POST, 6, 1.00, 0.80, 0.00, 1.0
CLRTABLE, POST, 7, 1.00, 0.90, 0.00, 1.0
CLRTABLE, POST, 8, 1.00, 1.00, 0.00, 1.0
CLRTABLE, POST, 9, 0.85, 1.00, 0.10, 1.0
CLRTABLE, POST, 10, 0.70, 1.00, 0.25, 1.0
CLRTABLE, POST, 11, 0.55, 1.00, 0.40, 1.0
CLRTABLE, POST, 12, 0.40, 1.00, 0.55, 1.0
CLRTABLE, POST, 13, 0.25, 1.00, 0.70, 1.0
CLRTABLE, POST, 14, 0.10, 1.00, 0.85, 1.0
CLRTABLE, POST, 15, 0.00, 1.00, 1.00, 1.0
CLRTABLE, POST, 16, 0.00, 0.90, 1.00, 1.0
CLRTABLE, POST, 17, 0.00, 0.80, 1.00, 1.0
CLRTABLE, POST, 18, 0.00, 0.70, 1.00, 1.0
CLRTABLE, POST, 19, 0.00, 0.55, 1.00, 1.0
CLRTABLE, POST, 20, 0.00, 0.40, 1.00, 1.0

• Specify a 20-colour scale with a user-defined value range of 0 to 0.2

CSCALE, 20, USER, 0, 0.1

• Set up the display items

PLLOCALCOOR, OFF, ALL


PLDISPLAY, OFF, ALL
PLDISPLAY, ON, LOGO
PLDISPLAY, ON, HEAD
PLDISPLAY, ON, MINMAX
PLDISPLAY, ON, SCALE, ,8
PLMESH, OFF

Version 4.20 18-3


DIESEL ENGINE: POST-PROCESSING Chapter 18
Creating a Spray Droplet Animation

• Set up the viewing position

VIEW, -1, 1, 1
CENTER, 40, 0, -42
DISTANCE, 60

• Select the Extended Graphics option and set up image output with a 1024 x
768 image resolution

TERMINAL, , EXTE
HRSDUMP, IMAGE, 1024, 768

• Specify the cylinder geometry colour

CLRTABLE, GEOM, 10, 0.6, 0.6, 0.6, 0.3


CTABLE, 501, FLUID, 10
CSET, ALL
CMODIFY, CSET

• Collect the piston surface data into a cell set

CTABLE, 502, FLUID


BSET, NEWSET, REGION, 6
CSET, NEWSET, BSET
CMODIFY, CSET

• Set up the droplet display options

DOPTION, EDGE, OFF


DOPTION, PERIMETER, 1
DOPTION, RADIUS, CONSTANT, 0.1
DOPTION, VECTOR, NONE, 1

• Increase the memory allocation

MEMORY, MAXDRP, 500000


MEMORY, MAXSC2, 1E7

• Set up a variable, it, which is incremented at each loop iteration and begin
the loop definition

*SET, it, 1, 1
*DEFINE, NOEXECUTE

• Store the next time step

STORE, NEXT

• Set up a crank angle display label positioned in the lower-right corner of the

18-4 Version 4.20


Chapter 18 DIESEL ENGINE: POST-PROCESSING
Creating a Spray Droplet Animation

screen

*GET, TIME, time


*SET, CRANK, 1100 * TIME * 6 + 680
TSCALE, 4, 15
PLLABEL, 1, FORMAT, , 4, 10, 0.5
CRANK
F6.1, ' degCA'

• Merge vertices for a clear view of the display

CSET, ALL
VSET, NEWSET, CSET
VMERGE, VSET

• Read and plot droplets at the current time step

PTREAD, , TIME
DSET, ALL
POPTION, GEOM
CPLOT
DOPTION, FILL, COLOR, 0
DPLOT

• Create a pro-STAR “layer” for the droplet display

LAYER, DROP, STORE


LAYER, DROP, HIDE

• Plot cell-averaged fuel scalar data on the piston surface

GETCELL, CONC, 1
CSET, NEWSET, TYPE, 502
CAVERAGE, CSET
POPTION, CONT
CPLOT

• Create a layer for the fuel scalar display

LAYER, CONT, STORE


LAYER, CONT, HIDE

• Show all layers

LAYER, ALL, SHOW


REPLOT

• Create a counter for the filenames

Version 4.20 18-5


DIESEL ENGINE: POST-PROCESSING Chapter 18
Creating a Spray Droplet Animation

*SET, itn, 1000 + it


*SCOPY, itn, sitn, i4

• Export the current plot to a .gif file

*SSET, sname, image_1_{sitn}


HRSDUMP, GIF, {sname}

• End the loop definition and then execute the loop for all time steps

*END
*LOOP, 0, 60
Note that useful information on creating post-processing input files can be found in
the pro-STAR Commands and Post-Processing User Guide volumes of the
STAR-CD documentation set.
Input files can be used with pro-STAR in batch mode to generate images and
animations without opening the GUI. This facility is useful for producing consistent
output from a number of different models and thus simplifying the comparison of
results.
For Windows systems, off-screen rendering using pro-STAR is not currently
supported. This means that the ability to use pro-STAR in batch mode to generate
images and animations is not available. However, you can use input files within the
pro-STAR GUI by issuing the following command:

IFILE, droplets.inp

Note that when importing an input file via the pro-STAR GUI, you need to add a c
after the TRLOAD, , and VMERGE, VSET commands as the software prompts you
to continue listing. This addition is not required when pro-STAR is running in batch
mode as the software does not prompt for input.
An example of a Linux script for creating a droplet movement animation in batch
is given below. The script employs third-party software (Gifsicle) to create
animations and uses several .gif files. This software can be substituted by a
different application if Gifsicle is unavailable.
• Run pro-STAR in batch mode, with input redirection to disable prompts, and
load the sector.mdl model file

$STARDIR/bin/prostar gl -b << EOF


star
y
y

• Import the input file and run the commands

IFILE, droplets.inp

• Quit pro-STAR without saving and complete the input redirection

QUIT, NOSAVE

18-6 Version 4.20


Chapter 18 DIESEL ENGINE: POST-PROCESSING
Creating a Spray Droplet Animation

EOF

• Create an animation called droplets.gif using Gifsicle

gifsicle -d 10 -l -o droplets.gif image*.gif

Figure 18-2 shows the fuel droplets and fuel concentration on the piston surface.

Figure 18-2 Fuel droplets and fuel distribution on piston surface.

Version 4.20 18-7


Chapter 19 TWO-STROKE ENGINES

Chapter 19 TWO-STROKE ENGINES


The following tutorial data files are used in this chapter:
TWO_STROKE/twoStrokeCylinder.dbs
TWO_STROKE/twoStrokePort.dbs
PANELS/training.pnl

This chapter describes a two-stroke engine set-up using the Partial Arbitrary Sliding
Interface (PASI) feature. PASIs are attachment boundaries that help simulate the
opening and closing of two-stroke-type ports on the cylinder wall. es-ice detects the
interface between the ports and cylinder and also identifies which cell faces act as
master or slave attachment boundaries when the model is imported into pro-STAR.
During a two-stroke cycle, the piston movement exposes the port openings and
allows fluid to flow in or out of the cylinder. This process is simulated using
attachment boundaries and sliding-interface events so that, when the piston exposes
the port, the master and slave attachment boundaries are coupled, allowing fluid
flow. To avoid a large pressure difference across a small opening, and thus enhance
solver stability, you can apply an overlap tolerance. The latter forces the port to be
effectively “closed” even when the piston exposes the port. As long as the opening
distance is less than the overlap tolerance, the attachment boundary is treated as a
wall, which in turn prevents fluid flow. When the opening distance exceeds the
overlap tolerance, fluid is allowed to flow between port and cylinder.
The cylinder wall and port-opening meshes are likely to be different and
therefore non-conformal. To address this issue, as Ice generates the mesh it also
performs a CPMatch operation when the port is open. This creates one-to-one
connectivity between the two meshes and therefore improves the solution stability
and accuracy of the flow between ports and cylinder.
The piston movement keeps exposing new cell faces, some of which are likely
to be partially exposed. In this instance, the unexposed part of the cell face is defined
as a wall boundary to stop any flow through it. The rest of the cell face allows fluid
flow between the port and cylinder.
The tutorial simulates the operation of a two-stroke, spark-ignition engine over
one cycle (360 degrees). The engine has four transfer ports and three exhaust ports
connected to the cylinder wall, with no poppet valves. Therefore, the piston
movement determines the port opening and closing and this in turn requires the use
of PASIs. The pressure of the intake charge supplied to the transfer ports is higher
than atmospheric pressure, as it is assumed that a crankcase mechanism drives the
flow to the transfer ports. This condition initiates the gas exchange between the
transfer ports and cylinder and fills the cylinder with premixed fuel following the
combustion phase. Table 19-1 summarises the engine characteristics and operating
conditions.

Version 4.20 19-1


TWO-STROKE ENGINES Chapter 19
Importing the Geometry

Table 19-1: Engine characteristics and operating conditions

Bore 100 mm
Stroke 130 mm
Connecting Rod Length 160 mm
Speed 2000 rpm

The steps needed for this tutorial are summarised below:


1. Import the engine geometry
2. Create the mesh using the trimming method
3. Set up the necessary Star Controls in es-ice

Importing the Geometry


The tutorial starts by importing a .dbs file containing the discretised surface that
defines the engine geometry.
To import this surface:
• Check that file
twoStrokeCylinder.dbs is in
your current working directory and
launch es-ice in the usual manner
• In the Select panel, click Read data
• In the Read Tool, click the ellipsis (...)
button next to the DBase file box and
select twoStrokeCylinder.dbs
via the file browser
• Click the ellipsis (...) button next to
the Get button and select 1 Cylinder
from the database browser
• Click CPlot in the Plot Tool to view
the imported geometry, shown in
Figure 19-1

19-2 Version 4.20


Chapter 19 TWO-STROKE ENGINES
Meshing with the Trimming Method

Figure 19-1 Two-stroke engine geometry

Meshing with the Trimming Method


Generate a trimmed mesh for the two-stroke engine volume. The alternative to
trimming is to use the mapping method, but given that mapping requires more
computer time and user intervention, trimming is the recommended option.
The steps needed to generate a trimmed mesh are as follows:
1. Assign shells to geometry cell sets
2. Create a 2D template
3. Create a 3D template
4. Trim the 3D template to the engine geometry
5. Assemble the trimmed template
6. Run Star Setup
Assigning shells to geometry cell sets
The first stage of the trimming process is to assign surface shells to certain special
geometry cell sets. These are then used to define the essential engine cylinder
components. Shells are assigned to geometry cell sets using either via the training
panel or via es-ice commands (if you are familiar with them).
• Select Panels > Directory from the menu bar of the Main es-ice window
• Enter the directory of the training user panel
• In the menu bar, select Panels > training to open the training panel shown in
Figure 19-2

Version 4.20 19-3


TWO-STROKE ENGINES Chapter 19
Meshing with the Trimming Method

Figure 19-2 Training panel

First, define the G: cylinder shells 1 geometry cell set:


• Enter the following command to begin selecting the cylinder shells

CSet, Newset, Type, Cursor

• Pick the cylinder shells in the Geometry panel, as shown in Figure 19-3

Figure 19-3 Cylinder shell selection

• In the training panel, click Cylinder Shells to define all cells within the
current cell set as the cylinder shells
• Enter the following command to re-display all shells:
CSet, All $CPlot

• Repeat the above process for the Piston Shells and Trimming Shells cell sets
shown in Figure 19-4 and Figure 19-5, respectively. Note that the trimming
shells include all the geometry surface shells, including the spark plug and the
feature lines.

19-4 Version 4.20


Chapter 19 TWO-STROKE ENGINES
Meshing with the Trimming Method

Figure 19-4 Piston shells

Figure 19-5 Trimming shells

Creating the 2D template


You can now begin creating the 2D template of the cylinder cross-section. First, set
the General and Events parameters that define certain engine characteristics and
operating conditions:
• In the Select panel, click Create Template
• In the Create Template panel, click General
• In the General parameters panel (see Figure 19-6), set the Base style to 0 or 1
Valve as this engine has no poppet valves
• Set the Cylinder radius to 50
• Click Ok to accept the settings and close the panel

Version 4.20 19-5


TWO-STROKE ENGINES Chapter 19
Meshing with the Trimming Method

Figure 19-6 Two-stroke General parameters

• In the Create Template panel, click Events


• In the Events parameters panel (see Figure 19-7), set the Crank angle start
(deg) to 470 to begin the analysis at the instant before the exhaust ports open.
This starting crank angle allows you to specify appropriate initial conditions
in the cylinder by assuming the fluid composition has no residual exhaust gas.
• Set the Crank angle stop (deg) to 830 to cover a two-stroke engine cycle
• Set the Connecting rod length to 160
• Click Ok to accept the settings and close the panel

Figure 19-7 Two-stroke Events parameters

Note that in this case you can accept the default settings for Valve lift periodicity
(deg) as the cylinder has no poppet valves. However, in other two-stroke engine
cases, you may need to set this parameter to 360. Setting the valve lift periodicity to
360 also changes the periodicity of ignition in multiple-cycle cases to once every
360 degrees.
Next, create Section 1 of the 2D template. In this case, Section 1 defines the entire
2D template as the Base style was set to 0 or 1 Valve in the General parameters
panel. Note that although the cylinder has no valves, you can use the valve settings
to improve the cell distribution around the spark plug.

19-6 Version 4.20


Chapter 19 TWO-STROKE ENGINES
Meshing with the Trimming Method

To create the 2D template:


• In the Create Template panel, select
Section 1 from the Sections drop-down
menu
• In the Section 1 Tool panel, select the Edit
section parameters toggle button to
access the valve-specific settings
• Set the Valve radius to 20 (see Table 4-10
in the User Guide for a definition of this
and other Section parameters)
• Set the Valve inner radius to 18
• Set the Bottom ring radial cells to 5
• Set the Inner ring radial cells to 2
• Set the Outer ring radial cells to 24
• Click Create to create the 2D template, as
shown in Figure 19-8
• Close the Section 1 Tool panel
• In the Create Template panel, click Store
to store Section 1

Version 4.20 19-7


TWO-STROKE ENGINES Chapter 19
Meshing with the Trimming Method

Figure 19-8 Two-stroke 2D template

Creating the 3D template


With the 2D template complete, you can now begin creating the 3D template. First,
enter appropriate Valve parameters for an engine with no poppet valves:
• In the Create Template panel, select
Valve 1 from the Valves drop-down menu
• In the Valve 1 parameters panel, set Style
(Trimmed) to None from the drop-down
menu to specify no poppet valves in the
engine
• Click Ok to accept the settings and close the panel

Next, define Cylinder and Trim properties for the 3D template:


• In the Create Template panel, click Cylinder
• In the Cylinder parameters panel, set the Piston stroke length to 130 to define
the piston position at BDC
• Click Ok to accept the settings, shown on the left-hand side of Figure 19-9
• In the Create Template panel, click Trim

19-8 Version 4.20


Chapter 19 TWO-STROKE ENGINES
Meshing with the Trimming Method

• In the Trim parameters panel, set Piston DZ to -10 (see Table 4-14 in the User
Guide for a definition of this and other Trim parameters)
• Set the Layers below to 40
• Set the Layers above to 50
• Set the Cell height to 0.8
• Click Ok to accept the settings, shown on the right-hand side of Figure 19-9

Figure 19-9 Two-stroke Cylinder parameters and Trim parameters

Finally, create the 3D template and read it into es-ice. You should also check that
the template is suitable for trimming to the engine geometry.
• In the Create Template panel, click Make Template to create the 3D template
• When the child process is complete, click Read Template to read the 3D
template into the Template panel, as shown in Figure 19-10

Version 4.20 19-9


TWO-STROKE ENGINES Chapter 19
Meshing with the Trimming Method

Figure 19-10 Two-stroke 3D template

• In the Plot Tool, deselect the Fill toggle


button to display the template as a transparent
wire-frame plot
• Set the Views option to View 0 1 0
• Click DPlot to plot the 3D template on top of
the engine geometry

Figure 19-11 shows that the template is suitable for trimming as it covers the entire
engine volume.

19-10 Version 4.20


Chapter 19 TWO-STROKE ENGINES
Meshing with the Trimming Method

Figure 19-11 Two-stroke template and geometry DPlot

Trimming the 3D template to the geometry


You can now trim the 3D template to the engine geometry to produce a mesh for the
engine cylinder’s internal volume:
• In the Select panel, click Trimming to open the
Trim panel
• Click Cut to begin trimming the template to the
engine geometry
• When the child process is complete, check that
Cylinder is selected and then click Get to read
the trimmed cylinder template into the Template
panel
• In the Plot Tool, select the Fill option, click
CPlot and adjust the view to display the
trimmed template as shown in Figure 19-12

Version 4.20 19-11


TWO-STROKE ENGINES Chapter 19
Meshing with the Trimming Method

Figure 19-12 Two-stroke trimmed cylinder template

At this stage, you can also merge the vertices on


small-scale edges to improve the cell connectivity:
• Ensure the VMerge drop-down menu is set to
Edges
• In the Trim panel, enter 0.05 in the box next to
the VMerge button and click VMerge
• Click Put to put the updated template back into
the trim database

Assembling the trimmed template


The final stage in generating a trimmed template is to add an extrusion layer and
then assemble the full model:
• In the Trim panel, set Extrusion to 0.3
• Click Assemble
• When the child process is complete, the
trimmed template is loaded into the Template
panel, as shown in Figure 19-13

19-12 Version 4.20


Chapter 19 TWO-STROKE ENGINES
Meshing with the Trimming Method

Figure 19-13 Two-stroke trimmed and assembled template

To display the extrusion layer, create a section plot through the centre of the
cylinder, as shown in Figure 19-14:
• Enter the following commands to define the
section, by specifying a point on the section
plane and the direction of the normal to that
plane:

SPoint, 0, 0, 0
SNormal, 0, 1, 0

• In the Plot Tool, change the display mode


from Hidden to Section
• Set the Views option to View 0, 1, 0

Figure 19-14 Cross-section showing the extrusion layer


Version 4.20 19-13
TWO-STROKE ENGINES Chapter 19
Meshing with the Trimming Method

Running Star Setup


Run Star Setup to store the geometry data obtained
so far and generate the files used in pro-STAR and
STAR:
• In the Select panel, click Star Setup to open
the Star setup panel
• Deselect the Use unwarper toggle button
• Select the Reset smoothers toggle button
• Select pro-STAR 4.20 from the pro-STAR
drop-down menu
• Click Star setup

Checking the mesh


The Create Result panel generates the
computational meshes used in STAR at
specified crank angles. You can then check the
mesh quality and validity before starting the
analysis. The following description shows
how to check the computational mesh at BDC
and TDC.
To create a mesh at BDC:
• In the Select panel, click Create Result
• In the Create Result panel, set Angle
(deg) to 540
• Select the Interpolate toggle button
• Click Create Result to create the mesh
at 540 degrees crank angle. Note that a
result.d540.0.dbs file is created
in the working directory. This is a
database-format file containing the mesh
at the specified crank angle
19-14 Version 4.20
Chapter 19 TWO-STROKE ENGINES
Meshing with the Trimming Method

• When the child process is complete, click Read Result to read the mesh into
the General Workspace window, as shown in Figure 19-15
• Enter command, Check, NegVolume to check that there are no cells with
negative volumes

Figure 19-15 Two-stroke engine at 540 degrees crank angle

• Repeat the above process with Angle (deg) set to 720 to check the
computational mesh at TDC, as shown in Figure 19-16

Figure 19-16 Two-stroke engine at 720 degrees crank angle

Version 4.20 19-15


TWO-STROKE ENGINES Chapter 19
STAR Set-up in es-ice

STAR Set-up in es-ice


This section describes the required settings in the Star Controls panel, which is
where the static meshes for ports are imported and model physics defined. Before
attempting this part of the tutorial, it is important that you familiarize yourself with
the Star Controls panel by completing the example in Chapter 6 of this volume. In
the following sections, most of this panel’s settings are only presented in summary
form, but information specific to two-stroke models is described in more detail.
The required Star Controls panel settings are as follows:
1. Analysis setup — load the model into Star Controls and select the desired
combustion model
2. Valve lifts — there are no poppet valves, so this Star Controls panel can be
ignored
3. Assembly — import the port meshes and create PASIs, with an overlap
tolerance to improve solver stability
4. Combustion — specify combustion and ignition parameters
5. Initialization — specify the engine initial conditions
6. Boundary conditions — specify the engine boundary conditions
7. Post-setup — specify the post-processing requirements
8. Time step control — specify the time-step settings
9. Write data — write the files needed to import the model into pro-STAR
Analysis setup
In the Analysis setup view of the Star Controls panel (see Figure 19-17):
• Click Load model
• Check that the Combustion toggle button is selected
• Select ECFM-3Z, spark from the combustion model drop-down menu
• Ensure that the fuel type is set to n-octane / iso-octane
• Set the Mixture option to Equivalence ratio and enter 0.9 for the air-fuel ratio
• Select the Premixed toggle button as the fuel and air are mixed upstream of
the intake port

19-16 Version 4.20


Chapter 19 TWO-STROKE ENGINES
STAR Set-up in es-ice

Figure 19-17 Two-stroke Star Controls > Analysis setup panel

Assembly
In the Assembly view of the Star Controls panel, import the transfer and exhaust port
meshes (see Figure 19-18):
• Click the ellipsis (...) button next to Database file and select
twoStrokePorts.dbs via the file browser
• Click the ellipsis (...) button next to Database ID and select 1 Transfer Ports
• Click Get to load the transfer ports into the Controls Workspace
• Click the ellipsis (...) button next to Database ID and select 2 Exhaust Ports
• Click Get to load the exhaust ports into the Controls Workspace

Version 4.20 19-17


TWO-STROKE ENGINES Chapter 19
STAR Set-up in es-ice

Figure 19-18 Two-stroke Star Controls > Assembly panel

Next, create the PASIs and specify an overlap tolerance. Although a port can be
physically open, using an overlap tolerance will effectively keep the port closed
until the port opening distance is greater than or equal to the overlap tolerance. This
facility improves the solution stability by avoiding a situation where a large pressure
difference occurs across a very small area.
To create PASIs and set the overlap tolerance (see Figure 19-19):
• In the Star Controls panel, click Create PASI to create the Partial Arbitrary
Sliding Interfaces between the cylinder and ports. Note that the current vertex
set contains the vertices of the PASI faces
• Select the Overlap tolerance toggle button and set the value to 1
• Click Finish to assemble the model
• In the main es-ice window, click Yes to answer the prompt.

Figure 19-19 Create PASI and overlap tolerance

Combustion
In the Combustion view of the Star Controls panel (see Figure 19-20), enter the
ignition time and location.
• Set the Knock drop-down menu to On to activate the knock model
• Set the Spark time to 700 deg CA to specify ignition 20 degrees before TDC
during the first cycle
• Set the Location XYZ to 0, 0, 29 to define the first ignition location

19-18 Version 4.20


Chapter 19 TWO-STROKE ENGINES
STAR Set-up in es-ice

Figure 19-20 Two-stroke Star Controls > Combustion panel

Initialization
In the Initialization view of the Star Controls panel, set the engine initial conditions
as described below.
For the Cylinder (see Figure 19-21):
• Check that Cylinder is selected from the domain drop-down menu
• Set the Valve function to Intake
• Set the Pressure to 3 and select bar from the drop-down menu
• Set the Temperature to 1000 K

Version 4.20 19-19


TWO-STROKE ENGINES Chapter 19
STAR Set-up in es-ice

Figure 19-21 Two-stroke Star Controls > Initialization panel for the cylinder

For the Grid Pieces, there are seven regions that correspond to each of the transfer
and exhaust ports.
First, set the initial conditions for the transfer ports (see Figure 19-22):
• Select Grid Pieces from the domain drop-down menu
• Check that Region 1 is selected and then set the Name to Transfer Port 1
• Set the Pressure to 1.3 and select bar from the drop-down menu

19-20 Version 4.20


Chapter 19 TWO-STROKE ENGINES
STAR Set-up in es-ice

Figure 19-22 Two-stroke Star Controls > Initialization panel for Transfer Port 1

• Select Region 2 from the drop-down menu


• Set the Copy data of option to Region 1 so as to use the same initial
conditions as Region 1 (see Figure 19-23)
• Reply Yes to the prompt to confirm the use of Region 1 parameters
• Set the Name to Transfer Port 2
• Repeat the previous four steps (with appropriate names) for Region 3 and
Region 4, as they are also transfer ports

Figure 19-23 Two-stroke Star Controls > Initialization panel for remaining transfer ports

Next, set the initial conditions for the exhaust ports (see Figure 19-24):
• Select Region 5 from the drop-down menu
Version 4.20 19-21
TWO-STROKE ENGINES Chapter 19
STAR Set-up in es-ice

• Set the Name to Exhaust Port 1


• Set the Valve function to Exhaust
• Set the Pressure to 1.1 and select bar from the drop-down menu
• Set the Temperature to 350 and select K from the drop-down menu

Figure 19-24 Two-stroke Star Controls > Initialization panel for Exhaust Port 1

• Utilize the Copy data of menu to apply the initial conditions for Region 5 to
Region 6 and Region 7, as they are also exhaust ports (see Figure 19-25)

Figure 19-25 Two-stroke Star Controls > Initialization panel for remaining exhaust ports

Boundary conditions
In the Boundary conditions view of the Star Controls panel, set the boundary
conditions in the engine components as described below.
19-22 Version 4.20
Chapter 19 TWO-STROKE ENGINES
STAR Set-up in es-ice

For the cylinder (see Figure 19-27):


• Ensure that Cylinder is selected from the domain drop-down menu
• Set the Combustion dome regions type to Fixed and the Temperature to 450 K
• Set the Piston crown regions type to Fixed and the Temperature to 550 K
• Set the Cylinder wall regions type to Fixed and the Temperature to 500 K

Next, create an extra boundary region that defines a fixed temperature on the spark
plug:
• In the Star Controls panel, select the Extra regions toggle button to create a
region for the spark plug
• Under Extra regions, click Define to open the Boundary Tool
• In the Boundary Tool, click Display all to display all cylinder surface shells
• Click Keep picked to select the spark plug patches as shown in Figure 19-26
• Press q on the keyboard to exit from the pick mode
• Click Define in the Boundary Tool to assign the selected patches to the spark
plug region

Figure 19-26 Spark plug patches

• Enter Spark Plug in the Name box


• Set the Regions type to Fixed wall
• Set the Temperature to 600 K

Version 4.20 19-23


TWO-STROKE ENGINES Chapter 19
STAR Set-up in es-ice

Figure 19-27 Two-stroke Star Controls > Boundary conditions panel for the cylinder

Now define flow boundaries for each of the seven transfer ports (see Figure 19-29):
• Select Grid Pieces from the domain drop-down menu
• Check that the Port wall regions setting is Adiabatic for all seven regions
• Under Extra regions, use the up/down scroll arrows to increase the number to
7 regions
• Click Define to open the Boundary Tool
• In the Boundary Tool, click Display all to display all surface shells
• Click Keep picked and select the transfer port flow patch, as shown in Figure
19-28

Transfer port
flow patch

Figure 19-28 Transfer port flow patch

• Press q on the keyboard to exit from the pick mode


• Click Define in the Boundary Tool to assign the displayed patch to the
transfer port flow region
• Enter Transfer Flow 1 in the Name box
• Ensure that the Region type is set to Pressure

19-24 Version 4.20


Chapter 19 TWO-STROKE ENGINES
STAR Set-up in es-ice

• Set the Absolute pressure to Constant and Environmental using the


drop-down menus
• Set the Pressure to 1.3 and select bar from the drop-down menu

Figure 19-29 Two-stroke Star Controls > Boundary conditions panel for a transfer port

Following a similar procedure to that for initial conditions, specify that the
remaining transfer flow boundaries should use the same boundary conditions as
Region 1.
• Under Extra regions, select Region 2 from the drop-down menu
• Set Copy data of to Region 1 to use the same initial conditions as Region 1
• Reply Yes to the subsequent prompt to confirm the use of Region 1
parameters
• Enter Transfer Flow 2 in the Name box
• Pick the appropriate patches, as shown in Figure 19-30
• Repeat the previous steps (with appropriate names) for Region 3 and Region
4 as they are also transfer flow regions

Version 4.20 19-25


TWO-STROKE ENGINES Chapter 19
STAR Set-up in es-ice

Region 3 Region 1

Region 4 Region 2
Figure 19-30 Transfer port flow patches

For the exhaust ports (see Figure 19-32):


• Select Region 5 from the drop-down menu
• Under Extra regions, click Define to open the Boundary Tool
• In the Boundary Tool, click Display all to display all surface shells
• Click Keep picked to select the exhaust port flow patch as shown in Figure
19-31

Exhaust port
flow patch

Figure 19-31 Exhaust port flow patch

• Press q on the keyboard to exit from the pick mode


• Click Define in the Boundary Tool to define the displayed patch as the
exhaust port flow region
• Enter Exhaust Flow 1 in the Name box
• Ensure that the Region type is set to Pressure
• Set the Absolute pressure to Constant and Mean using the drop-down menus
• Set the Pressure to 1.1 and select bar from the drop-down menu
• Set the Temperature to 350 and select K from the drop-down menu

19-26 Version 4.20


Chapter 19 TWO-STROKE ENGINES
STAR Set-up in es-ice

Figure 19-32 Two-stroke Star Controls > Boundary conditions panel for an exhaust port

• Utilize the Copy data of menu to apply Region 5 boundary conditions to


Region 6 and Region 7, as they too are exhaust flow boundaries. Figure
19-30 shows the relevant patch selections for each boundary region.

Region 7 Region 6 Region 5


Figure 19-33 Exhaust port flow patches

Finally, select the Angelberger wall function model and combine all patches for a
given boundary type into a single boundary region (see Figure 19-34):
• Select Global settings from the drop-down menu at the top of the panel
Version 4.20 19-27
TWO-STROKE ENGINES Chapter 19
STAR Set-up in es-ice

• Check that Wall function model is set to Angelberger


• Click Check regions to check that all regions are valid
• Ensure the consistently toggle button is selected and then click Join regions

Figure 19-34 Two-stroke Star Controls > Boundary conditions for Global settings

Post setup
In the Post-setup view of the Star Controls panel, specify your requirements for
post-processing the analysis results (see Figure 19-35):
• Check that Cylinder is selected from the domain drop-down menu
• Ensure that all toggle buttons are selected, except Phi vs temperature
• Set the Monitor positions XYZ to 0, 0, 29 and the Radius to 6
• Use the radius up/down scroll arrows to increase the number to 2 radii
• Select Radius 2 from the drop-down menu and set the Radius to 12

Figure 19-35 Two-stroke Star Controls > Post-setup panel for the cylinder

• Accept the default settings for Grid Pieces and Global settings
Time step control
In the Time step control view of the Star Controls panel (see Figure 19-36):
• Set the Step to 0.1 for a time step of 0.1 degrees crank angle

19-28 Version 4.20


Chapter 19 TWO-STROKE ENGINES
Saving the es-ice Model File

• Ensure that the Use valves toggle button is selected. This will reduce the time
step when the valves open and thus improve the solver stability.

Figure 19-36 Two-stroke Star Controls > Time step control panel

Write data
In the Write data view of the Star Controls panel:
• Accept the default settings and click Write data to generate files that import
the model into pro-STAR

Saving the es-ice Model File


Finally, save the model file and exit from es-ice:
• In the Select panel, click Write data to open
the Write Tool
• Enter save_es-ice.twoStroke and click
Save to save the model file
• Close es-ice

The case set-up can now be completed in pro-STAR, as described in Chapter 7 of


this volume.

Version 4.20 19-29


Chapter 20 MESHING WITH THE MAPPING METHOD
Creating the Stub Surface in the Geometry

Chapter 20 MESHING WITH THE MAPPING METHOD


The model at the beginning of this chapter can be resumed from file:
save_es-ice.1-valves (created in Chapter 3)

The following tutorial data files are used in this chapter:


MAPPING_TUTORIALS/vlift01.dat
(valve lift file for Valve 1)
MAPPING_TUTORIALS/vlift02.dat
(valve lift file for Valve 2)
MAPPING_TUTORIALS/exhaust.dbs
exhaust port mesh from pro-STAR’s AutoMesh module)

The model in this chapter is intermittently saved to files:


save_es-ice.2-template
save_es-ice.3-flat
save_es-ice.4-starsetup

An es-ice mesh can be generated using the Trimming method or the original
Mapping method. The latter involves mapping of surface vertices to shells of the
geometry through the use of edges, splines and patches and is covered in this
chapter. The Trimming method is covered in Chapter 4.
The meshing process using the Mapping method can be divided into five major
steps:
1. Creating the 2D base template
2. Creating the 3D template
3. Creating edges, splines and patches based on geometrical features
4. Mapping the 3D template surface to the geometry
5. Meshing the piston

Creating the Stub Surface in the Geometry


es-ice gives you the option of creating a mesh for arms externally, via a software
package such as the AutoMesh version of pro-STAR. The externally-created arms
may then be read into es-ice and matched with the rest of the model via a
coupled-cell interface. Typically, this interface is shaped like a stair step and is
called a “stub”. For this tutorial example, the exhaust port above Valve 2 will be
meshed using pro-STAR’s AutoMesh module. As a result, a stub surface must first
be created in the geometry to serve as an interface between the es-ice and pro-STAR
meshes.
We create a stub shell surface by first creating splines that define the corners of
the shell surface. We then create shells that span across the splines and define the
surface. Usually, four splines are needed for this. Two of them will be created on
the geometry surface and the other two inside the geometry. A detailed description
of how to create a stub can be found in Chapter 3, “Generating the stub geometry”
of the User Guide volume. The large cross-hair arrow will help to create all splines
accurately at the same θ position (see Figure 20-1).

Version 4.20 20-1


MESHING WITH THE MAPPING METHOD Chapter 20
Creating the Stub Surface in the Geometry

Begin by isolating Valve 2 and inspecting the


valve stem. The mesh above the stub is assumed
to be static, hence it is important to find a vertex
on a lower section of the valve stem, above
which the stem radius is constant, and create a
circular spline there. To do this:
• Click Edge or Spline in the Select panel
• In the Edge or Spline Tool panel that now
appears, click Point Circle
• Left-click with the mouse on a vertex to
create a circular spline with the next
highest available ID number (see Figure
20-1). This operation uses the nearest
cylindrical coordinate system, which will be the local coordinate system for
Valve 2.
• Type q with the cursor inside the window or click on an empty part of the
window to quit the ‘pick’ mode and accept the spline. Since there are no other
existing splines, the created spline has an ID of 1.

Figure 20-1 Geometry window: Circular spline created around Valve 2

• In anticipation of future events, renumber this first spline so that it has an ID


of 51 using the following command:

20-2 Version 4.20


Chapter 20 MESHING WITH THE MAPPING METHOD
Creating the Stub Surface in the Geometry

spline,1,renumber,51

All future splines will be created with larger ID numbers, thus leaving the lower ID
numbers free for default splines to be employed later on.
Next, isolate the valve seat and port arm areas for the exhaust side and inspect
the shells between them. Find a vertex on the highest machined point of the valve
seat shells, such that it is as close as possible to the circumferential position of the
previously used valve stem vertex (this will help reduce the skewness in the stub’s
geometry shells when they are created later). The large cross-hair will be helpful in
this process.
• As for the previously created spline, click Point Circle in the Edge or Spline
Tool panel and left-click on a vertex to create another concentric spline (see
Figure 20-2). This figure shows three possible locations where you can create
the next spline. These locations will give a near-perfect circular shape. In this
tutorial, we choose location #1 as indicated in Figure 20-2. The resulting map
mesh is shown in the same Figure, at the location where the stub has been
coupled with the polyhedral mesh of the exhaust port.
• Type q with the cursor in the window or click on an empty part of the window
to accept the spline.

1
2
3

Valve Seat

Figure 20-2 Geometry window: Circular spline around the valve seat and port

The previous two splines were created on the surface geometry. Two more splines
need to be created inside the model. For this you need to view all the geometry
shells in a section passing through the exhaust valve centreline. Since the local
coordinate system of the exhaust valve has been defined already (see Chapter 3,
“Modelling the Valves” in this volume) you can use the training panel to view the

Version 4.20 20-3


MESHING WITH THE MAPPING METHOD Chapter 20
Creating the Stub Surface in the Geometry

geometry shells in a section, by clicking the valve 2 section button. Make sure that
the geometry shells of the exhaust valve and port are in the current cset.
You can take measurements in the local valve coordinate system from the section
plot using command:

sxyz,12,relative

This command will give relative distances between successively selected points in
coordinate system 12. These distances are what will be used to create the final two
splines for the stub.
One spline will be created radially outwards from the first spline created on the
valve stem, such that there is room for at least a few cells in the radial direction in
both the stub and the externally generated mesh. The other spline will be created
below it and slightly further out radially such that
(a) it is not too close to the valve surface, and
(b) the two flat surfaces connected to this spline are approximately parallel
with the top surface of the valve and with the lower portion of the valve
stem.
• Click on approximately the three points shown in Figure 20-3 and then type q
with the cursor in the window to quit this operation.

2 1

Figure 20-3 Geometry window: Points picked during the sxyz command

The text output in the es-ice window should be similar to that shown below:

The first line shows the relative distances from the origin of coordinate system 12
20-4 Version 4.20
Chapter 20 MESHING WITH THE MAPPING METHOD
Creating the Stub Surface in the Geometry

to the first point, which approximately represents a point on the spline created on
the valve stem. This can be ignored. The second line shows the relative distances
from the first point to the second point. We will be using the approximate relative
radial distance to create one of the splines. The third line shows the relative
distances from the second point to the third point. We will be using the approximate
relative radial and axial distances to create the other spline.
• Type the following commands to create spline 53 radially outwards from
spline 51 and then create spline 54 radially outwards and axially downwards
from spline 53:

spline,51,to,53,1.8,0,0,12
spline,53,to,54,2.6,0,-19,12

The four splines needed to create the stub shell surface are shown in Figure 20-4.

Figure 20-4 Geometry window: All four splines created for the stub surface

• Return to a hidden view, select an isometric viewing angle and delete all cells
from the current cell set in order to be able to see the effect of subsequent
commands.
• Create a layer of shells with cell type 22 between each pair of splines that
represents the stub surface:

sshell,Cursor,1,22

• Select spline nos. 51 and 53 to generate the first section of the stub.
• Repeat the above steps for the other two sections of the stub: section 2 (spline

Version 4.20 20-5


MESHING WITH THE MAPPING METHOD Chapter 20
Creating the Stub Surface in the Geometry

nos. 53 and 54) and section 3 (spline nos. 54 and 52).

Plots of a correct and incorrect stub surface are shown in Figure 20-5. These plots
emphasize the importance of making the splines start at the same θ position. This is
also important for mapping edges with the splines, as will be seen later. Chapter 3,
“Generating the stub geometry” in the User Guide provides more detailed
information on how to generate an ideal stub geometry.

Figure 20-5 Geometry window: Correct stub (top left), incorrect stub (top right) and
section (bottom) of stub surface

The necessary cells can now be exported to a database file so that pro-STAR’s
AutoMesh module can be used to mesh them.
• Gather the stub, exhaust valve and port into the currently active cell set and
remove all splines from the currently active spline set, see Figure 20-6.
• Click Read Data in the Select panel to open the Read Tool panel
• Type the file name, exhaust-proam.dbs, into the input field next to the
Dbase button and deactivate the Exists button since this will be a new file.
• Click the Dbase button to open a new database file called
exhaust-proam.dbs
• Type the following commands to store the cells and vertices in the currently
active cell set under database ID 1 as a surface definition entitled Exhaust
valve+port+stub and close the database file:
dbase,put,1,surface

20-6 Version 4.20


Chapter 20 MESHING WITH THE MAPPING METHOD
Creating the Stub Surface in the Geometry

Exhaust valve+port+stub
dbase,close

Figure 20-6 Selected geometry to be exported to exhaust-proam.dbs

Now this database file may be used by the AutoMesh module to generate the
necessary mesh. For the purposes of this tutorial example, the exhaust port mesh is
assumed to have been created already in file exhaust.dbs along with the other
tutorial example files.

Version 4.20 20-7


MESHING WITH THE MAPPING METHOD Chapter 20
Creating the 2D Base Template

Creating the 2D Base Template


The first step in creating the 2D base template is to set some parameters in the
General parameters and Events parameters panels.
• Click Create Template in the Select
panel to open the Create Template panel
• Select the Mapping option
• Now click General to open the General
parameters panel (see Figure 20-7)
• Change the Base style to 2/4 Valve, which
is the option for modelling half of a
symmetric 4-valve engine
• Check that the Engine type is Gasoline
and the Cylinder radius is 45
• Click Ok at the bottom-left of the panel to
accept the values and close the panel
(Apply will accept the values but keep the
panel open)
• Next, click Events in the Create Template
panel to open the Events parameters panel
(see Figure 20-7)

Since the analysis in this example will only consider the intake and compression
strokes, the starting crank angle will be the 0-lift point before the valve begins to
move (see vlift01.dat).
• Click Events in the Create Template panel to open the Events parameters
panel (see Figure 20-7)
• Set the Crank angle start (deg) to 320 and the Crank angle stop (deg) to 720
• Check that the Engine RPM is set to 3600, the Connecting rod length to 145,
the Piston pin offset to 0 and the Valve lift periodicity (deg) to 720
• Click Ok

Figure 20-7 Modified General parameters and Events parameters panels

20-8 Version 4.20


Chapter 20 MESHING WITH THE MAPPING METHOD
Creating the 2D Base Template

• In the Create Template panel, select


Section 1 from the Sections pull-down
menu to open the Section 1 Tool panel.
This will help you create the 2D mesh in a
quadrant around Valve 1.
• First, click on the upper Load button
located next to the valve01.dat field
to load the internal valve information for
Valve 1. Note that Valve01.dat is an
image file created in Chapter 3,
“Modelling the Valves” of this volume.
• Click Create to activate the General
Workspace window and plot the section, as
shown in Figure 20-8.

Figure 20-8 General Workspace window:


Section 1 after loading valve
information

The mesh in this section needs to be modified


next. The cell density in the valve region is a major factor affecting the overall cell
count of the model and is controlled by the number of circumferential cells around
the valve.
• A coarse model will be built in this tutorial example, so change the
Circumferential cells (section) parameter at the top of the panel to a value of
56
• To see the result of this modification, click Create in the Section 1 Tool panel

For most mesh adjustments, it is generally useful and easier to use the cursor in a
graphical interactive mode.
• Click Adjust in the Section 1 Tool panel and notice the several red dots
appearing on the plotting window, shown in Figure 20-9. Interactive GUI
tools can then be used to alter the section until a mesh of reasonable cell size
and quality is achieved.
Version 4.20 20-9
MESHING WITH THE MAPPING METHOD Chapter 20
Creating the 2D Base Template

Adjusts “Bottom ring


radial cells”

Adjusts number of
circumferential cells
around valve

Adjusts
“Outer ring
radial cells”

Figure 20-9 General Workspace window: Section 1 in ‘Adjust’ mode

The red dot in the centre of the valve grid can also be used to change the number of
circumferential cells around the valve. Note the text at the bottom of the General
Workspace window when moving the cursor over this dot:
• A left-click or middle-click will decrease or increase, respectively, the value
by 2
• A right-click will reset the value to the default of 72
• Typing a number followed by a left-click or right-click will decrease or
increase, respectively, the value by that typed number
• Typing u or r will successively undo or redo, respectively, the latest
adjustments
• Clicking with any mouse button off the mesh in an empty part of the window
or typing q will quit the ‘Adjust’ mode

The valve mesh is known as an O-grid, being made up of a 12x12 Cartesian mesh
with a single polar mesh layer surrounding it. This mesh is called the “Bottom ring
radial cells” and is shown in the Section 1 Tool panel. The red dot associated with
this parameter is located along the mesh line of the core Cartesian grid. We will
coarsen the polar mesh around the valve region called the “Outer ring radial cells”.
• Left-click with the cursor over the red dot labelled in Figure 20-9 twice to
decrease their numbers from the default of 5 to a value of 3. The “Inner ring
radial cells” can be left at the default of 1.

20-10 Version 4.20


Chapter 20 MESHING WITH THE MAPPING METHOD
Creating the 2D Base Template

The end result of the above adjustments is shown in Figure 20-10.

Figure 20-10 General Workspace window: Section 1 after valve modifications

If possible, matching some areas of the 2D base template with features of the
cylinder dome should always be attempted. For this tutorial example, there is a
feature between the flat and angled portions of the combustion dome that can be
matched with a mesh line in Section 1. This line can be obtained by adding a special
triangular region to the section. From the current viewpoint of looking down from
the +z axis, this geometric feature appears to the right of Valve 1.
Let us use the ‘double-plotting’ feature by overlaying both the Geometry and
General Workspace windows with the suggested plot settings shown in Figure
20-11:
• In the Geometry window, isolate the cylinder dome cells and turn off the
Mesh option while keeping the Fill option on in the Plot Tool panel.
• Activate the General Workspace window and turn off the Fill option while
keeping the Mesh option on in the Plot Tool panel.
• Click the Dplot button in the Plot Tool panel. The currently active cell set of
the Geometry window is plotted first and then the General Workspace
window is plotted over it.
Version 4.20 20-11
MESHING WITH THE MAPPING METHOD Chapter 20
Creating the 2D Base Template

Figure 20-11 Plot Tool panel settings for double-plotting

2. Left-click and
drag to feature

1. Left-click
to choose

Figure 20-12 General Workspace-Dplot: Adjusting the right bottom position

From the difference in colour shades on the cylinder dome appearing in Figure
20-12, the feature between the flat and angled portions of the dome can be seen as
a vertical line.
• Click Adjust again in the Section 1 Tool panel and left-click the red dot on
the lower-right corner to change the bottom position
• Left-click and drag the mouse until the cursor is at the previously mentioned
feature to move the vertical mesh line along the bottom edge of the x-axis to a
new parallel position, as shown in Figure 20-12

20-12 Version 4.20


Chapter 20 MESHING WITH THE MAPPING METHOD
Creating the 2D Base Template

The right-hand boundary of the section has now moved to match the feature, as
shown in Figure 20-13.

Figure 20-13 General Workspace-Dplot: After right bottom adjustment

• Quit the ‘Adjust’ mode


• In the Section 1 Tool panel, change the Right triangle exists option to Yes and
then click Create

A new triangular region will be created to the right of the 2D template. Note that,
with the Right triangle exists option turned on, further adjustment of the vertical
mesh line will also automatically adjust the newly created triangular region.

Version 4.20 20-13


MESHING WITH THE MAPPING METHOD Chapter 20
Creating the 2D Base Template

Figure 20-14 General Workspace-Dplot: With Right triangle exists option

• With this mesh line in the correct place, return the plot in the General
Workspace window back to the previous settings by turning on the Fill option
and clicking Cplot in the Plot Tool panel

Other important areas needing modification are the three triangular regions on the
corners of the section and the “Right triangle”. There are two issues with these
regions:
1. The placement of the corner attachment points
2. The cell density within the regions
• Move the cursor over the upper red dot of the “Right triangle” region and note
the text at the bottom of the window, shown in Figure 20-15

20-14 Version 4.20


Chapter 20 MESHING WITH THE MAPPING METHOD
Creating the 2D Base Template

1. Left-click
to choose

2. Left-click to
choose new
attachment point

Figure 20-15 General Workspace window: Adjusting the attachment point of the right
triangle

• Left-click to choose this point for adjustment. All other red dots will become
clear and the text will then change to the following:

You can now select a vertex along the perimeter of the “Outer ring radial cells” to
be the new attachment point.
• Left-click the vertex that is one position away in the clockwise direction, as
shown in Figure 20-15. Notice the improvement in the interior angles
connected to the new attachment point and the improved mesh orthogonality
in the region outside the valve and closest to the cylinder wall.

Similar improvements can be made by repeating the above steps for the other three
triangular regions. The triangular region located at the lower-right can have the left
attachment point moved counter-clockwise by one position. The triangular region
located at the lower-left can have the right attachment point moved clockwise by
one position and the top attachment point moved counter-clockwise by one
position. The triangular region located at the upper-left can have the bottom
attachment point moved clockwise by one position and the right attachment point
moved clockwise by two positions.

Version 4.20 20-15


MESHING WITH THE MAPPING METHOD Chapter 20
Creating the 2D Base Template

The above operations will result in greater cell size uniformity in the “Outer ring
radial cells” region, as shown in Figure 20-16.

Figure 20-16 General Workspace window: Section 1 after attachment point adjustments

Since the spark plug is located in the triangular region on the lower-left of section
1, it also desirable to increase the cell density there.
• Move the cursor over the red dot located at the centre of this triangular region
and note the text at the bottom of the plotting window. Notice the three red
dots in the middle of each edge of the triangular region, shown in Figure
20-17, and the change in the text.

20-16 Version 4.20


Chapter 20 MESHING WITH THE MAPPING METHOD
Creating the 2D Base Template

Before After

Electrode

2. Middle-click
to increase

1. Left-click
to choose

Figure 20-17 General Workspace window: Changing the cell count within a triangular
region

The cell density and distribution in the triangular region may be altered by
increasing or decreasing the number of cell layers from the centre to each of the
three edges.
• Middle-click the red dot in the interior of the section, as shown in Figure
20-17, to add another cell layer between the centre and the corresponding
edge
• Quit the adjustment of the triangular region by clicking off the mesh or typing
q on the keyboard

The increase in cell density for that triangular region can now be seen and you are
still in ‘Adjust’ mode.
The cell count in the “Right triangle” region should also be reduced in a similar
way.
• Left-click the red dot in the centre of this region to choose it and then
middle-click the bottom red dot three times to increase the number of cells
from that edge to the centre. This will decrease the cell count in the region.
• Quit the region adjustment by clicking off the mesh or typing q on the
keyboard.

Version 4.20 20-17


MESHING WITH THE MAPPING METHOD Chapter 20
Creating the 2D Base Template

Section 1 now has an acceptable cell size and cell quality, as shown in Figure 20-18.

Figure 20-18 General Workspace window: Final Section 1

• Type q with the cursor in the window or click on an empty part of the window
to quit the ‘Adjust’ mode
• The Section 1 Tool panel is no longer needed, so click Close to close it.

Section 2 can now be built in a similar way. Starting with the valve region, click the
Load button to load the valve information and reduce the number of circumferential
cells to 48. The “Outer ring radial cells” should be decreased to 4. Usually the
exhaust valve is smaller than the intake valve. Therefore, the exhaust valve section
should have fewer circumferential cells but more “Outer ring radial cells” in order
to maintain a consistent cell spacing. These modifications can be made using the
GUI tools and red dots that aid adjustments.
For Section 2, a “Left triangle” will be needed and the left boundary of the
section can be moved to match the geometric feature between the flat and angled
portions on the exhaust side of the cylinder dome. The attachment points of the
triangular regions can be moved similarly to those of Section 1. Then the cell
density of the triangular regions and “Left triangle” can also be modified.
To minimize the amount of plastering during piston modelling in this chapter, we
need to align the mesh line to match the bowl feature more closely:
• Go to the Geometry window
• Isolate the piston shells in the currently-active cell set
20-18 Version 4.20
Chapter 20 MESHING WITH THE MAPPING METHOD
Creating the 2D Base Template

• Turn Off the Mesh plotting and turn On the Fill options
• Go to the General Workspace window
• Turn On the Mesh plotting and turn Off the Fill options
• Select Dplot

To rotate Valve 1, you need to open the Section 1 Tool panel by selecting Section
1 from the Sections pull-down menu in the Create Template panel, as shown in
Figure 20-19.
• Select Edit section parameters
• Select Show all section parameters
• Change the Valve rotation (section) parameter to 30 (see Valve Rotation, page
4-37 of the User Guide, on how to rotate the valve using a control point)
• Click Create to update the Valve 1 section
• Using similar steps, enter a value of 45 for the Valve rotation (section)
parameter of Valve 2.

The resulting views before and after the valve rotation are shown in Figure 20-20.

Figure 20-19 Modified 2D parameters for Valves 1 and 2


Version 4.20 20-19
MESHING WITH THE MAPPING METHOD Chapter 20
Creating the 2D Base Template

Before Rotation

After Rotation

Figure 20-20 2D Template before and after the valve rotation

With every modification made, the es-ice window will update the number of cells
on each side of the shared interface. Only when they are equal is the user in a
position to continue.
• Click Store in the Create Template panel to connect and smooth the mesh of
the two sections together, as shown in Figure 20-21.

20-20 Version 4.20


Chapter 20 MESHING WITH THE MAPPING METHOD
Creating the 3D Template

Figure 20-21 General Workspace window: Completed 2D base template

Creating the 3D Template


Now that the 2D template has been created, you can adjust the remaining parameters
through the Create Template panel for the third template dimension. Note that, in
general, a value of 0 in the parameter boxes denotes a default value calculated by
es-ice for the geometry. It is recommended that you initially use as many parameter
defaults as possible.
• In the Create Template panel, select Valve 1 from the Valves pull-down menu
to bring up the Valve 1 parameters panel. Some key parameters to be
specified in this and subsequent panels are indicated in Figure 20-22.
• Since the port associated with this valve will be modelled entirely within
es-ice, leave the Style setting to Normal.
• Since Valve 1 has a sizeable chamfer, leave the Edge triangle option to Yes
• The Chamber height, which is the approximate height of the region above the
valve (see Figure 20-22), should be specified in model units (millimetres).
Enter a value of 40. This value can be obtained using command vdist to
pick vertices in a geometry plot of type ‘Hidden’ or using command sxyz in
a section plot, as was done earlier for “Creating the Stub Surface in the
Geometry”.
• The Chamber axial cells parameter is the number of axial cells throughout
that chamber height and should be set to 25 to obtain a reasonable but coarse
cell spacing.
• The Chamber radial cells parameter is the number of radial cells in the
chamber and this can be left at a value of 0 to accept whatever default value
es-ice calculates later to obtain well-proportioned cells in that region.
• By looking at the valve lift files, it can be seen that the maximum valve lift for
Valve 1 is close to 9.4 millimetres. Enter a value of 9.4 for Reference lift.

es-ice will try to keep the vertical cell spacing in the valve curtain to a value given
by Reference lift divided by Reference cells. For this tutorial example, we will
accept a cell spacing of around 1 millimetre:
• Change the Reference cells parameter to 9. Note that an exact value of
maximum valve lift is not important. The idea is to assign a value close to the
Version 4.20 20-21
MESHING WITH THE MAPPING METHOD Chapter 20
Creating the 3D Template

maximum valve lift and form a ratio with the Reference cells to get the
desired cell spacing in the valve curtain at maximum valve lift.
• To improve the mesh density for low valve lifts, enter values of 2 and 4 for the
early reference lift and early reference cells, respectively (see Chapter 4, “The
Valve parameters panel” in the User Guide for more information).
• At the bottom of the panel, change the Exclude on close parameter to No
• Leave the other parameters at their default values and click Ok

r1
Chamber
height
Stub down
height r2

r2/r1 = Stub trim fraction

Figure 20-22 Geometry window: Template parameters for stub

Next, adjust the Valve 2 settings:


• In the Create Template panel, select Valve 2 from the Valves pull-down menu
to bring up the Valve 2 parameters panel
• Since the port associated with this valve will be modelled externally by es-ice
and a stub surface was created above this valve, change the Style setting to
Stub
• As for Valve 1, leave the Edge triangle option to Yes
• The Chamber height parameter is now the height of the area above the valve,
up to the top of the stub. Set this value to 16
• Enter a value of 16 for the Chamber axial cells parameter
• The Chamber radial cells should be specified as 8 to maintain a
well-proportioned spacing
• The Stub down height will be the approximate height of the stub step (see
Figure 20-22) and a value of 12 can be entered
• The Stub trim fraction will be the ratio of the radial distance of the stub step to
the radial distance of the entire stub (see Figure 20-22). Enter a value of 0.65
for this parameter.

20-22 Version 4.20


Chapter 20 MESHING WITH THE MAPPING METHOD
Creating the 3D Template

Chamber height, Stub down height, Chamber axial cells and Stub trim fraction
values should be carefully chosen such that uniform axial and radial cell distribution
can be obtained.
Upon closer inspection of the geometry, it will be noticed that Valve 2 is
recessed. This appears as a step-like feature around the outside of the valve seat
area. To improve the quality of the eventual mapping process, a similar step-like
feature can be applied to the template. With a step of this size in the geometry, you
can improve the 3D template by adding a single radial cell layer around the valve
seat cells. To do this:
• Enter a value of 1 for Layers above dome and Rings above dome. The other
values can be left as default.

The panel settings mentioned above are shown in Figure 20-23. When finished
entering parameters, click Ok to apply the values and close the panel.

Figure 20-23 Modified 3D parameters for Valve 1 and 2

Version 4.20 20-23


MESHING WITH THE MAPPING METHOD Chapter 20
Creating the 3D Template

• In the Create Template panel, select Arm 1 from the Arms pull-down menu to
bring up the Arm 1 parameters panel (see Figure 4-26 in the User Guide for
definitions of the Arm Parameters)
• Enter 0.75 for the Height fraction and 58 for the Length
• The Width layers and Length layers should be left at 0 so that es-ice can
calculate default values for these parameters. The default number of Width
Layers is generally 1/3 of the number of circumferential layers in the port.
• The intake arm should extend out in the global +x direction from the intake
valve, so enter values of 1, 0 and 0 for the Axis X, Axis Y and Axis Z
parameters, respectively.
• The intake arm is a siamese-type arm so choose Siamese for the Type
parameter. By measurement of the geometry, we can enter values of 0.55, 0.8
and 1 for the Siamese start fraction, Siamese stop fraction and Siamese
layers, respectively.
• Click Ok when finished. The completed Arm 1 parameters panel is shown in
Figure 20-24.

Since the exhaust arm will not be modelled in es-ice, the parameters for Arm 2 will
not be used.
• Next, click the Cylinder button in the Create Template panel to bring up the
Cylinder parameters panel
• Since the stroke in the tutorial example is 68.5 millimetres, enter 68.5 for the
Piston stroke length

The Piston Z at TDC parameter is only used when a flat piston is being modelled.
Although this is not the case in this example, it is usually a good idea to check the
combustion-dome mapping results before proceeding to model the piston. One
method of doing this is to assume a flat piston for the model after the combustion
dome mapping is complete:
• Enter a value of -1.5 for Piston Z at TDC to assume a flat piston with a 1.5
millimetre TDC clearance if the real piston geometry is ignored. Note that this
parameter will in fact be ignored once the real piston geometry is modelled.
• Leave all other parameters at their default values and then click Ok. The
completed Cylinder parameters panel is shown in Figure 20-24.

20-24 Version 4.20


Chapter 20 MESHING WITH THE MAPPING METHOD
Creating the 3D Template

Figure 20-24 Modified parameters for the Arm 1 and Cylinder parts

• After all parameters have been set, click Make Template in the Create
Template panel to make the template and write its information to a file called
save_ice by default. This file will be required later, as discussed on page
20-50.

We have already created some splines for the stub and es-ice will create a few more
by default. Since the existing splines start at ID 51, we can leave the reading option
to its default Replace curves setting.
• Click the Read Template button to read the 3D template into the current
working session and plot it on the screen, as shown in Figure 20-25.

Note that new local coordinate systems are created (coordinate system ID numbers
13 and 14) which are re-positioned at the bottom of the closed valve and re-oriented
so that the x-y rotation is 0. A number of default edges and splines have also been
created automatically.

Version 4.20 20-25


MESHING WITH THE MAPPING METHOD Chapter 20
Creating the 3D Template

Figure 20-25 Template window: Default 3D template

Next, you need to make a region of the template conform more closely to the spark
plug geometry. Because of the relatively coarse template cell size and the relative
small size of the spark plug geometry, a few cells from the template in that area will
need to be deleted.
After inspecting the spark plug geometry and measuring some vertical distances
along the global z-axis, it can be established which cells can be deleted and taken
out of the currently active cell set, as shown in Figure 20-26. Because of the simple
spark plug geometry, this can be done with cursor picks using the pull-down menus
and choosing Sets > Cset > Delete > Cursor.

20-26 Version 4.20


Chapter 20 MESHING WITH THE MAPPING METHOD
Creating the 3D Template

Figure 20-26 Template window: Template with deleted spark plug cells

Taking cells out of the currently active cell set is not enough to tell es-ice that you
wish to remove these cells from the CFD calculation. Cells in Template Cset 1 are
regarded as the cells used in this calculation, so that set must be modified as well.
• Choose Sets > Cset > List from the pull-down menus. A listing of the
Template Csets will be displayed (see Figure 20-27), where Cset 0 is the
currently active cell set.

After removing spark plug cells

Figure 20-27 A listing of the Template Cset

The “L” on the left-hand side of the above listing indicates a locked cell set and
prevents accidental modifications. When the 3D template was first read in and
displayed on screen, Template Cset 1 was made the currently active cell set. Now
that we have deleted several cells from that set, there are fewer cells in Template
Cset 0 then in Template Cset 1. We therefore need to update Template Cset 1 with
the cells that we have in the currently active cell set by clicking update cset 1 in the
training panel (Note: this button updates Cset 1 of the currently active window so
make sure the Template window is active).
es-ice will now exclude the cells in the spark plug cut-out and, after mapping, the
mesh will conform to the problem geometry with less distortion than it would have
Version 4.20 20-27
MESHING WITH THE MAPPING METHOD Chapter 20
General Notes About Edges and Splines

done otherwise.
The user is recommended to save the work up to this point by writing the current
working session’s data into a new save_es-ice file using the Write Tool panel.
In the tutorial example files, the work up to this point is saved in file
save_es-ice.2-template.

General Notes About Edges and Splines


The template vertices must be moved so that the template acquires the problem
geometry’s shape. This movement is accomplished by a sequence of es-ice steps
involving feature lines, surfaces and volumes.
The first step involves mapping feature lines in the template called edges to
corresponding feature lines in the geometry called splines. Edges are ordered sets
of vertices whereas splines are ordered sets of knots that, in general, are smoothly
connected. Knots defining a spline may be located on a vertex of the geometry, on
a surface shell or on another spline. Thus, splines are more complicated than edges.
In the Select panel, an Edge or Spline Tool panel is available to work with these two
entity types. Like cells and vertices, splines and edges have ID numbers, can be
collected into sets and displayed or hidden with appropriate commands and
pull-down menu options.
For every edge in the template, there must be a corresponding spline in the
geometry. Edges will be mapped to that spline so that their first and last points
coincide and so that the other edge vertices lie on the spline. The vertex spacing can
be selected in the Edge or Spline Tool so that the vertices are spaced at equal
intervals (linear spacing), proportional to their original spacing in the template
(original spacing) or fixed (fixed spacing). Notice that edges and splines can be
created in any order but, eventually, corresponding splines and edges must have the
same ID number. Exactly how many spline/edge pairs to create and where to create
them depends on the complexity of the geometry but also to some extent on the
user’s discretion. Note that some splines and edges are generated automatically by
es-ice when the 3D template is created.
A number of guidelines concerning splines and edges are listed below:
1. Splines must not intersect. They may be joined end-to-end, but they cannot
cross themselves or another spline. Similarly, edges must not intersect.
2. Spline starting and ending points are control points. By breaking one spline
into several splines, the user can obtain more control points. The vertices at
the ends of the corresponding edges will be mapped to those control points.
As indicated previously, intermediate vertices will be spaced either linearly
with constant spacing, proportionally to their original template spacing or
with fixed spacing, depending on the user’s choice for the edge spacing.
3. Since splines are defined by their knots and knots exist independently of the
geometry, there is a variety of pick modes for splines in the Edge or Spline
Tool panel. Edges, by contrast, are always placed on vertices of the template
and therefore have only one pick mode.
4. To insure that splines connect to each other, the pick mode for the first knot of
a new spline should be Knot so that the spline truly begins at the last knot of
the previous spline. This will avoid connectivity problems when checks are
performed later. Toggling with the right mouse button, the user can change
the pick mode for subsequent knots.
20-28 Version 4.20
Chapter 20 MESHING WITH THE MAPPING METHOD
Creating Edges and Splines Near the Valve Seat

Creating Edges and Splines Near the Valve Seat


Let us first focus on the region around the valve seat for Valve 1. It is important that
cells in this region are carefully controlled to avoid excessive skew during mesh
motion. Typically for each valve, four concentric edges are mapped to four
concentric splines in this region.
• In the Geometry window, examine a cross-section of the valve and valve seat
region (including a spline plot) by choosing Sets > Sset > All from the
pull-down menus. This puts all splines into the current spline set.
• View a section plot through Valve 1 by clicking valve 1 section in the training
panel.
• View the section from the direction of the section normal by choosing View
Snormal or View 0 1 0 from the Views pull-down menu in the Plot Tool
window
• Zoom into the region closer to the other valve

You can see that you need to move two of the automatically-generated splines,
spline nos. 3 and 5. This is because these are needed on the outside surface of the
problem geometry to control the mesh, not on the valve. Therefore, you need to
move the splines to the outside surface. Typically, for steeply angled valves, you
can translate the spline at “p4” (spline no. 3) in the global z-direction and the spline
at “p3” (spline no. 5) in the local z-direction (see Figure 5-13 on page 5-11 of the
User Guide). The easiest way of doing this is to create new splines in the desired
locations using the old splines as visual guides.

p4
p5

Figure 20-28 Geometry window: Moving automatically-generated valve splines to the


surface

Version 4.20 20-29


MESHING WITH THE MAPPING METHOD Chapter 20
Creating Edges and Splines Near the Valve Seat

• Click Hidden in the Plot Tool to go back to a ‘hidden’ plot type

We want to create another spline on the surface. This is to be located above the
outer, automatically-generated valve spline in the local z-direction, as shown in
Figure 20-28.
• View the geometry looking down the +z axis of the local valve coordinate
system (ID no. 11) using the following command:

view,0,0,1,11

We will use the Surface option in ‘Pick Knot’ mode. Before doing this, since the
valve is very close to the surface in that area, the valve should be deleted from the
currently active cell set so that the incorrect surface is not used as a result of
tolerance issues.
• Now zoom into the area closer to the other
valve
• Starting in ‘Pick Knot’ mode, choose the
Surface option from the Edge or Spline
Tool panel and then click Point Circle.
• Using the existing spline as a visual guide,
try to left-click as close to the existing
knot on Spline 5 as possible, as shown in
Figure 20-29
• Type q to quit the pick mode and accept
the circular spline created

Left-click here

Figure 20-29 Geometry window: Creating a surface spline in the local z-direction
20-30 Version 4.20
Chapter 20 MESHING WITH THE MAPPING METHOD
Creating Edges and Splines Near the Valve Seat

The same thing should be done with the other automatically-generated valve
splines:
• View the geometry looking down the +z-axis of the global coordinate system
by choosing View 0 0 1 from the Views pull-down menu in the Plot Tool panel
• Zoom into the same area as before, using the Surface option for the ‘Pick
Knot’ mode
• Click Point Circle
• Left-click as close as possible to the existing knot of Spline 3
• Type q to quit and accept the newly created circular spline
• Return to the former section view, put all cells into the currently active cell set
and plot them, as shown in Figure 20-30. This will enable you to check the
new splines visually and decide whether they were created correctly.

Figure 20-30 New splines

Once you verify that everything is correct, the automatically-generated splines are
no longer needed. Also, since the edge numbers correspond to these splines on the
valve, we would like to renumber the newly created surface splines so that they have
the same numbers as their corresponding automatically-generated splines.
• Type the following command:

spline,55,renumber,5

The output shown in Figure 20-31 should appear in the es-ice window between the
input and output text boxes:

Figure 20-31 Output text in the es-ice window

Version 4.20 20-31


MESHING WITH THE MAPPING METHOD Chapter 20
Creating Edges and Splines Near the Valve Seat

• Click the Yes option with the mouse or type y

This will not only renumber spline no. 55 as spline no. 5, but also overwrite and
destroy the previously-numbered spline no. 5 in the process. The same thing may
be done for Spline 56 and 3.
The next step is to add two more concentric splines to indicate the precise
location of the valve seat region, as shown in Figure 20-32. These circular splines
should be placed at the ends of the shells that define the surface of revolution of the
valve seat, in other words the borders of the contact area.

Two additional concentric splines

Figure 20-32 Geometry window: Additional splines needed on each end of the valve seat

We return to a zoomed hidden view of the previous valve seat area that is closer to
the other valve but without the shells for Valve 1. A mesh line that is parallel to the
global x-axis is visible in the shells that define the valve curtain region. Note that
most of the other circular splines around both valve seat regions have
starting/ending knots along this circumferential reference position. When creating
new circular splines, it is strongly recommended that you maintain this reference
position whenever possible to minimize the possibility of skewing the mesh during
the mapping process. Bearing this in mind, note the two vertices shown in Figure
20-33. These lie at the intersection of the reference mesh line parallel to the x-axis
and the border of the valve seat shells.

20-32 Version 4.20


Chapter 20 MESHING WITH THE MAPPING METHOD
Creating Edges and Splines Near the Valve Seat

Figure 20-33 Geometry window: Two vertices used to create additional valve splines

• In ‘Pick Knot’ mode, click Vertex in the


Edge or Spline Tool panel
• Click Point Circle to create a circular
spline by picking a vertex as the
starting/ending knot
• Click one of the two vertices shown in
Figure 20-33 and type q to accept the new
spline
• Click Point Circle again, choose the other
vertex and then type q to create the other
circular spline

A section view through Valve 1, shown in


Figure 20-34, will now display the four splines
to be used in defining the valve seat region.

Version 4.20 20-33


MESHING WITH THE MAPPING METHOD Chapter 20
Creating Edges and Splines Near the Valve Seat

Figure 20-34 Geometry window: Four concentric circular splines for valve seat

We will now visualize the four radial cells that will span this region. In the template,
there are five edges covering each radial mesh line for those four cells. Since we
only need the four splines for this region, one of the edges will need to be cleared.
This means that out of the three radial regions defined between the splines, one of
them will include two cell layers and the others just one cell layer.
Inspecting the radial distances between the four splines shown on the left-hand
side of Figure 20-35, we see that it is best to put two radial cell layers between spline
nos. 3 and 55 as these are separated by the largest distance. Then by looking at the
five edges that were automatically generated for the valve seat region, we can
establish that edge no. 7 (see the right-hand side of Figure 20-35) can be cleared.

One radial cell layer


Two radial cell layers

Edge to clear

Figure 20-35 Geometry (left) and Template (right) windows: Radial cell distribution at
the valve seat
20-34 Version 4.20
Chapter 20 MESHING WITH THE MAPPING METHOD
Creating Edges and Splines Near the Valve Seat

To do this:
• Change to the Template panel
• From the menu bar, click Sets > Eset > All
• Click Clear edge and pick a knot on edge no. 7
• Type q to quit the pick mode

Comparison of the corresponding spline and edge numbers in this region will reveal
that two of the splines created need to have their ID numbers changed to match their
corresponding edges. The spline,#,renum, # command may be used again or,
alternatively, the Associate button in the Edge or Spline Tool panel. This is a
renumbering function that involves clicking the appropriate splines and edges with
the mouse.
• Click Associate. The Template window will become active and the text at the
bottom of the window will indicate that we should click on an edge that needs
to be associated.
• Left-click on a knot of edge no. 8. es-ice will then make the Geometry
window active and the text at the bottom will indicate that we should click on
a spline to be associated with the edge we have just picked.
• Left-click on a knot for spline no. 55. This will renumber spline no. 55 to
spline no. 8, thus matching the ID number of the edge.
• Similarly, associate Edge 9 with Spline 56

The active window will then be switched to Template and the process repeated until
a q is typed to quit. If during the association process the new spline ID is the same
as the ID of another spline, the other spline’s ID will be changed to the next
available number. Note that the dynamic mode is also available and may be useful
in this operation.
The process outlined in this section should be repeated for Valve 2. Note,
however, that this valve is recessed and contains a sharp, step-like feature.
Therefore, in addition to the actions described so far, two more splines should be
created to accommodate it. Since two edges have been generated automatically for
that feature, we need to create the two splines corresponding to it, which will be
circular and concentric with the other Valve 2 splines. Recall that:
1. The Point Circle option can be used
2. The circumferential reference position of the starting/ending point should be
taken into account
3. The ID numbers as well as the directions of corresponding splines and edges
should match

The total number of splines created for both valve regions is shown in Figure 20-36.

Version 4.20 20-35


MESHING WITH THE MAPPING METHOD Chapter 20
Creating the Remaining Edges and Splines

Figure 20-36 Geometry window: Ten circular splines generated for both valve seat
regions

Creating the Remaining Edges and Splines


Next, we need to add more edges and splines to control the surfaces of the intake
port and cylinder head. We will first work with the template, where features that are
good candidates for control purposes are more obvious.
Starting with Valve 2, the step-like stub can be seen to have several
automatically-generated edges. Upon inspection, they are on mesh lines that divide
horizontal and vertical template faces. There are also large angles between the cell
faces on either side of the vertices belonging to those edges, making the latter an
important feature. The edges belonging to the stub region of Valve 2 seem to be
complete.
The intake port region of the template contains a few automatically-generated
edges, around the port face and around the symmetry area across the siamese
portion of the port. These edges represent features surrounding special boundary
regions so they should be kept. We would like, however, to add a circular edge that
wraps around the top of the valve chamber. This edge will eventually be used to
separate the horizontal surface on the top of the valve chamber from the vertical
surface on the side of the chamber.
• Click Create in the Edge section of the Edge or Spline Tool panel to create
this extra edge, shown in Figure 20-38

Unlike splines, edges are defined strictly in terms of vertices that belong to existing
20-36 Version 4.20
Chapter 20 MESHING WITH THE MAPPING METHOD
Creating the Remaining Edges and Splines

cells. Therefore, the variety of pick modes available for splines does not exist for
them. However, edges are created in chain mode by default, meaning that when two
non-neighbouring vertices are selected, any intervening vertices will be
automatically included in the edge. As a result, every vertex along an arc does not
need to be picked to define the edge.
Because edges will be mapped to their corresponding splines starting from their
first to their last points, the arrows which indicate the end of the spline or edge must
be kept consistent in terms of their locations and directions, as shown in Figure
20-37.

Spline Edge

Cross-hair

Figure 20-37 Location and direction of arrows in the Geometry and Template windows

Figure 20-38 Template window: Arc-like edge on top corner of intake valve chamber

Version 4.20 20-37


MESHING WITH THE MAPPING METHOD Chapter 20
Creating the Remaining Edges and Splines

Several edges need to be created to border the region where we have removed cells
for the spark plug cut-out (see Figure 20-26). Zoom in on this region and observe
that there is an edge that conforms to the shape of the template before cell removal.
This edge can be easily fixed by using the “Split” function:
• Click Split in the Edge or Spline Tool panel
• Left-click the two edge knots at the ends of the spark plug cut-outs to split the
edge into three edges. The middle one does not follow a mesh line and so it
should be cleared with the Clear edge button.

Several other edges need to be defined along mesh lines that represent sharp
features and large angles between adjacent template cell faces, as shown in Figure
20-39. While creating these edges, recall that edges cannot cross themselves or each
other and that they must be joined end-to-end. It is usually helpful to keep similarly
aligned edges along a consistent direction.

Figure 20-39 Template window: Edges at the spark plug cut-out

On both ends of the cylinder head, there are flat triangular regions. In “Creating the
2D Base Template”, we captured the intersection between the flat surface and the
angled region of the cylinder dome with a mesh line in the template through the use
of “Left/Right Triangles”. That mesh line is a feature that should have an edge on
it, as shown in Figure 20-40. Remember again that edges can not intersect
themselves or cross each other and that they must be joined end-to-end. Where those
edges meet the automatically-generated edges at the cylinder wall and symmetry
plane perimeters of the cylinder head, the “Split” function should be used so that
edges are joined end-to-end. Conversely, a few of the automatically-generated
edges at the cylinder radius can be joined with the “Join” function into one edge. By

20-38 Version 4.20


Chapter 20 MESHING WITH THE MAPPING METHOD
Creating the Remaining Edges and Splines

default, es-ice splits edges at the cylinder radius at points where they are closest to
each valve. These automatically-generated control points are normally useful, but
the geometry of the tutorial example is simple enough to make them unnecessary.

Figure 20-40 Template window: Edges on cylinder head at the intake side

After all edges have been created, you can proceed to create the additional splines
needed. The location, starting/ending knots, ID numbers and direction of the splines
should be consistent with that of their corresponding edges. To aid with the ID
numbering, you can manually renumber edges and splines using
1. the edge/spline,#,renumber,# command, or
2. the “Associate” button in the Edge or Spline Tool panel, or
3. the “Pick ID” function located on the left-side of the Edge or Spline Tool.

Activating the “Pick ID” button and clicking the “Create” button to create splines
allows you to pick an existing edge and then create a spline with the same ID
number as the edge. Note that the reverse is also true if the “Create” button for
creating edges is clicked.
Figure 20-41 shows all the edges needed for this tutorial example.

Version 4.20 20-39


MESHING WITH THE MAPPING METHOD Chapter 20
Creating Patches

Figure 20-41 Template window: Edge display

One important edge/spline pair that should be explained in more detail is the pair
that extends for most of the cylinder radius. In the template, this edge helps to divide
the horizontal cell faces of the top of the cylinder head from the vertical cell faces
of the cylinder wall. With this in mind, the corresponding spline needs to be created
in the geometry.
The strategy here is to create a spline that will approximately divide the
geometry’s horizontal surfaces from the vertical surfaces. Across a filleted curve,
an appropriate transition line should be used such that a balance is maintained
between horizontal and vertical template faces that will eventually map to various
sections of the curved surface.

Creating Patches
We have not yet performed any mapping, but we have laid the groundwork for
mapping all vertices contained in the edges we have defined. The latter bound
surfaces in the template that should be mapped to corresponding shell surfaces. Just
as we assigned vertices along feature lines to edges (so that they could be mapped
to splines), we must also assign vertices on the surfaces of the template between the
edges to patches so that they can be mapped to the surface shells of the geometry.
Patches are only created for the port, stub and cylinder dome surfaces. This is
done almost with one mouse click, using the edges already created. The first step is
to gather only the two edges located at the top of the valve stems being modelled in
the template, as shown in Figure 20-42. As will be seen later, having these two
edges in the currently active edge set will prevent the automatic patch generation
process from creating unwanted patches along the valve.

20-40 Version 4.20


Chapter 20 MESHING WITH THE MAPPING METHOD
Creating Patches

Collect these edges


in the Eset, and
create patches
using the Patch Tool

Figure 20-42 Template window: Two essential edges and final patches

• Click Patch in the Select panel to open the Patch or Vshell Tool panel
• Set the patch Type option to Shell since we intend to have all our patches
projected to geometry shells
• Click Auto Bound
• Click on any cell face except those that represent the valve stem

The picked cell face acts as a seed face and patches are created by growing the
patched area outwards until it hits an edge in the currently active edge set. Thus, the
entire region is patched. The ID number and size of the patches that are formed
depend on the space between the created edges, not just those in the currently active
edge set. All patches created are automatically put into the currently active patch
set.
• Click Patch in the Plot Tool to replot and display patches in the currently
active patch set and produce a legend for them

Notice that there is one patch on the symmetry plane and cylinder wall. This should
be cleared since the symmetry plane and cylinder wall are special regions that are
recognised by es-ice and dealt with automatically.
• Click Clear in the Patch or Vshell Tool
• Left-click any face in the template representing the symmetry plane or
cylinder wall
• Type q or click on a blank part of the Template window to quit
Version 4.20 20-41
MESHING WITH THE MAPPING METHOD Chapter 20
The Mapping Process

The Mapping Process


The mapping process involves vertices that are included in the edges and patches.
These vertices are also surface vertices of the template. Other surface vertices on the
symmetry plane and cylinder wall, as well as most interior vertices of the template,
will be moved at a later stage. It is therefore possible that some of the mapped
vertices will push into those that are not mapped and result in confusing plots in
which the mapped surfaces can not be clearly seen. es-ice has a facility for isolating
cell faces associated with surface mapping so that this confusion is eliminated. To
invoke it, type the following command:

cmark

You will be reminded that your currently active cell set will be changed, so answer
yes. This will invoke a series of commands that will build a new, currently active
cell set and plot only the faces of cells belonging to patches in the currently active
patch set. To improve visualization, the Edge and Patch buttons should be turned
off in the Plot Tool panel. The resulting plot in Figure 20-43 shows only those faces
of the template that are to be mapped.

Figure 20-43 Template window: Result of the cmark command

The currently active cell set of the geometry should also be modified to have only
shells associated with the cmark result on the template, so as to serve as a target
for the mapping process. This will be the geometry shells for the cylinder head,
intake port and exhaust stub only, as shown in Figure 20-44.

20-42 Version 4.20


Chapter 20 MESHING WITH THE MAPPING METHOD
The Mapping Process

Figure 20-44 Geometry window: Target geometry shells for mapping

• Click Mapping in the Select panel to open


the Map Tool panel

This panel is divided into three sections. We will


proceed through the buttons and steps of each
section from top to bottom, starting with the edges:
• In the Edge section at the top of the panel, set
the pull-down menu option to All
• Click Map edges

This will map all edges previously created to their


appropriate splines. Replot the window, as shown
in Figure 20-45, to see the effect of this stage of
mapping.

Version 4.20 20-43


MESHING WITH THE MAPPING METHOD Chapter 20
The Mapping Process

Figure 20-45 Template window: Result of mapping all edges

You will next work with the surface:


• In the Surface section, set the pull-down menu option to All and keep the
default settings of the next two pull-down menus (Map and Full elliptic)
• Change the last pull-down menu option to Target Cset
• Click Map patches to map all the patches, as shown in Figure 20-46

Figure 20-46 Template window: Result of mapping all patches

• Click Project patches to project the patches to the shells in the current
geometry cell set and perform surface smoothing on the vertices of the
patches using the Full elliptic smoothing method, as shown in Figure 20-47.
By isolating the geometry shells that are the target of the mapping and projection
operations, es-ice will not be confused by extraneous geometry surfaces and
tolerance issues. The window will automatically be re-plotted after each patch is
projected and smoothed. Note that some patches were neither mapped nor projected
as indicated in the es-ice output window. This is because those patches are small and
do not contain vertices that are not already defined through edges. In other words,

20-44 Version 4.20


Chapter 20 MESHING WITH THE MAPPING METHOD
The Mapping Process

all vertices in those patches that did not get mapped nor projected are already
included in edges that were already mapped.

Figure 20-47 Template window: Final mapped and projected result

At this point, the mapped template should be visually checked. You should zoom in
to several areas from a variety of perspectives to ensure that no faces are badly
distorted or skewed. Areas of particular concern are the regions of closest approach
between the valve seat and the cylinder circumference. Also, any corners that might
exist on the valve chambers and arms should be carefully inspected.
The Project patches process is an iterative process, so repeated projections can
result in successive improvements of the surface mesh. Also, a different surface
smoothing method could be used with this process. The most common alternative
to the default Full elliptic method is the Elliptic method. For more complex
modifications, splines can be redefined, edges re-mapped and patches redefined and
re-projected on an individual basis. The spacing of edges and patches can also be
changed individually. The default spacing for both edges and patches is Original,
but sometimes the Linear option can be used to improve the surface mapping result.
The valve surface is next and to see the effect of this mapping, look at a section
plot through the valves:
• Turn off the effects of the cmark operation by deselecting the Marked
option in the Plot Tool panel
• To inspect the cell set to be used for the CFD calculation, select Sets > Cset >
Recall > 1 Active cells from the pull-down menus (equivalent to command
cset,recall,1)
• Turn off the Fill option in the Plot Tool panel to improve visualization
• Click Map valves to map the top of the valve surface
• Replot the window and zoom in to see the effect of this mapping, shown in
Figure 20-49

Note that if the Map corners button is toggled On, it will ensure that the corner
vertices of the rectangular grid (edge nos. 1 and 2 in Figure 20-48) are mapped to
point ‘p10’ (which was used to create the valve image, see Figure 5-13 on page 5-11
of the User Guide). If this toggle is not turned on, edge nos. 1 and 2 are mapped to
spline nos. 1 and 2, which are created automatically at point ‘p10’. So, if you are not

Version 4.20 20-45


MESHING WITH THE MAPPING METHOD Chapter 20
The Mapping Process

satisfied with the placement of point ‘p10’, you may move the spline (up or down)
and re-map edge nos. 1 and 2.

Figure 20-48 Automatically generated spline nos. 1 and 2 and edge nos. 1 and 2

Figure 20-49 Template window: Result after “Map Valves”

We will finally work on the mesh interior. We only wish to map the interior vertices
of the static part of the mesh since the moving vertices will be handled during the
CFD analysis run. The template’s current cell set needs to be changed so that it
covers only the non-moving section, composed of cells located above the valves.
• Click Gather cells to perform this operation automatically
• Plot the result, shown in Figure 20-50. Notice that only the intake port and
exhaust stub are in the template’s currently active cell set.

20-46 Version 4.20


Chapter 20 MESHING WITH THE MAPPING METHOD
The Mapping Process

Figure 20-50 Template window: Result after “Gather Cells”

• Keep the defaults of all pop-up menus in this section as Elliptic, Original
spacing and Negative volume
• Click Map interior to map the interior vertices of the currently active cell set
on the screen
• Click Smooth interior to perform volume smoothing on those vertices using
the elliptic method and trying to maintain the original vertex spacing

As with the Project patches process, the Smooth interior process is an iterative
process so repeated smoothings can result in successive improvements:
• Click Smooth interior again to perform another iteration of the volume
smoothing
• Replot the window to see the effect of this mapping, shown in Figure 20-51

Figure 20-51 Template window: Result after “Map Interior” and “Smooth Interior”

• Finally, click Check cells to check the currently active cell set for negative
volumes

Since the currently active cell set contains cells that are static and will not move, if
no negative volumes are currently present among these cells, we can be confident
that none will be present in this region during the CFD analysis.
• You can now recall the active cells using command

cset,recall,1

to display the template shown in Figure 20-52.


Version 4.20 20-47
MESHING WITH THE MAPPING METHOD Chapter 20
The Mapping Process

Recall that only surface vertices contained in patches and internal vertices of the
mesh’s static region have been moved. Since there are vertices that have not been
moved yet, the mesh may look distorted in some places but this can be ignored at
this stage.

Figure 20-52 Template window: 3D template after mapping

es-ice assumes that template surface vertices of the cylinder wall will be located at
the cylinder radius. With the spline that was previously created, it is necessary for
some template vertices on this wall to be projected to geometry shells that have a
smaller radius than the cylinder. Geometry Cset 1 is labelled Cylinder shells and is
reserved for shells that are not at the cylinder radius and to which template vertices
of the cylinder wall will be mapped. These shells provide a surface to which the
corresponding template surface of the cylinder wall, composed of vertical faces, can
be projected.
• Isolate the geometry shells for the cylinder dome and notice that the lower
boundary has vertices on the cylinder radius and at the z = 0 location.
• Using a combination of zone (cset,dele,zone) and cursor delete
(cset,delete,cursor) operations, remove cells above the previously
created spline. This operation can be performed in a somewhat approximate
fashion since we need to include all necessary shells below the spline but can
tolerate some extra shells above it, as shown in Figure 20-53.
• Once this is done, the currently active cell set needs to be saved in Geometry
Cset 1 by clicking update cset 1 in the training panel.

20-48 Version 4.20


Chapter 20 MESHING WITH THE MAPPING METHOD
The Mapping Process

Figure 20-53 Geometry window: Shells placed into Geometry Cset 1

The user is recommended to save the work up to this point by saving the current
working session into a new save_es-ice file. The work up to this point is also
saved in file save_es-ice.3-flat of the tutorial example files.

Version 4.20 20-49


MESHING WITH THE MAPPING METHOD Chapter 20
The Mapping Process

To generate files required by pro-STAR and STAR:


• Click Star Setup in the Select panel to open
the Star Setup panel
• Make sure that the Reset smoothers, Use
unwarper and Use Star controls toggle
buttons are selected.
• Select Prostar 4.16 from the Prostar
pull-down menu
• Click Star setup to save the geometry changes
and create the files needed to set up the model
for STAR-CD.

One can also enter es-ice command line options in


the Extra Parameters box. To search for command
line options, click on the List button above the box.
In the new window that opens, type the text to
search for in the Search box and then click Enter.
The options must be separated by a space, or can be
on a new line.

The work up to this point is saved in file


save_es-ice.4-starsetup of the tutorial
example files.

20-50 Version 4.20


Chapter 21 IMPROVING THE MAPPED MESH QUALITY
Creating Plastered Cells

Chapter 21 IMPROVING THE MAPPED MESH QUALITY


Creating Plastered Cells
es-ice provides facilities for manually changing cell shapes in order to capture
certain features in the geometry.
Consider the intersection between the cylinder wall and dome after mapping.
This intersection region could be a nearly-flat surface in some cases, as depicted in
Figure 21-1.

Hexahedral cells
with 180-degree faces

Figure 21-1 Template (left) and Geometry (right) windows: Intersection between
cylinder wall and dome before (left) and after (right) mapping

The hexahedral cell in the corner contain faces meeting at an angle of 180 degrees.
This area needs to be modified by removing these cells and replacing them with
prisms. This will result in a better mesh, shown in Figure 21-2.

Plastered cell

Figure 21-2 Template (left) and Geometry (right) windows: Result showing
modification using a plastered cell

The above operation may be performed by removing the offending cells from the
dome, creating an edge, and ‘plastering’ the interior of the edge. This new edge
should then be cleared and Cset 1 updated. The required steps are summarised in
Figure 21-3 below.

Version 4.20 21-1


IMPROVING THE MAPPED MESH QUALITY Chapter 21
Creating Plastered Cells

Figure 21-3 Plastering step illustration

After finishing the plaster, click update cset 1 in training panel to update Cset 1.

21-2 Version 4.20


Chapter 22 PISTON MODELING
Meshing the Piston with the Shape Piston Method

Chapter 22 PISTON MODELING


Meshing the Piston with the Shape Piston Method
The Shape Piston method is a flexible method that can model very complex piston
geometries. All meshing for the piston is handled directly by es-ice and it is
currently the only method that allows penetration of cylinder head features into the
piston area, such as the deep spark plug in our tutorial example.
Most of the techniques used for the Shape Piston method are identical to those
used previously to map the cylinder head, intake port and exhaust stub. Thus, cells
may be removed to help the template conform better to the geometry, edges and
splines are created for control, patches are created and a similar mapping and
projecting process is employed. Just like in the previous mapping process, only the
surface of the piston will be mapped and its interior vertices will be moved
automatically by es-ice during the analysis.
Before we can begin creating edges, splines and patches, we need to create shells
that approximately represent the piston surface. These are called “dummy target
shells” as they serve as a target for layers of vertices. The layers will consist of a
user-specified key grid plane from the original template. Since this grid plane
represents the surface of a continuous layer of cells, it must be relatively smooth.
Therefore, the dummy target shells must also be relatively smooth. As a result,
piston features such as bowls and crowns should not be included when creating the
dummy target shells.
We will first create splines and then create the dummy target shells between
these splines:
• Isolate the piston shells in the currently active cell set and make sure that it is
in the correct TDC position
• Using Vertex for the Pick mode, create a spline starting from one corner of
the intersection between the cylinder wall and symmetry plane to the other
corner.
• Choosing as few vertices as possible, click only on vertices where there is a
change in angle between the flat surfaces and stay along the symmetry plane
line of y=0 whenever possible, as shown in Figure 22-1.
• The dashed line shown in the figure indicates the assumed shape of the
dummy target shells.

The curved shape of the spline should also be ignored since flat shells will be
created between the knots at a later stage.

Version 4.20 22-1


PISTON MODELING Chapter 22
Meshing the Piston with the Shape Piston Method

Selected vertices

Figure 22-1 Geometry window: Piston and created spline

Next, create two other splines (copies of the spline we have just created) in both the
+y and -y direction so that they extend beyond the piston shells. To do this:
• Create new splines by a translation of their knots in the global cartesian
y-direction, as shown in Figure 22-2, with the following commands
(assuming the created spline ID is 47):

spline,48,from,47,0,-50,0,1
spline,49,from,47,0,50,0,1

The new splines should extend beyond the piston geometry shells, especially when
viewed from the global +z-axis direction (view,0,0,1).

22-2 Version 4.20


Chapter 22 PISTON MODELING
Meshing the Piston with the Shape Piston Method

Figure 22-2 Geometry window: Two additional projected splines created

• The dummy target shells can now be created between the two outer splines by
typing the following command:

sshell,cursor,1

• Since the cursor is now in pick mode, left-click the two outer splines (splines
48 and 49) with the mouse. Flat shells, our dummy target shells, will then be
created between the picked splines and assigned to the next available cell
type.
• Clear the three created splines as they are no longer needed
• Isolate the newly created dummy target shells in the currently active cell set,
shown in Figure 22-3, and save them to Geometry Cset 2 by clicking the G:
piston shells 2 button of the training panel. For the Shape Piston method,
es-ice will assume that the shells in Geometry Cset 2 are to be used as the
dummy target shells.

Version 4.20 22-3


PISTON MODELING Chapter 22
Meshing the Piston with the Shape Piston Method

Figure 22-3 Geometry window: Dummy target shells saved to Geometry Cset 2

22-4 Version 4.20


Chapter 22 PISTON MODELING
Meshing the Piston with the Shape Piston Method

• Now click the Piston button in the Select


panel to open the Piston panel
• From the pop-up menu at the top of the
panel, select the Shape piston option. Since
it is critical to minimize skew at TDC when
the piston is closest to the cylinder head, the
default value for Crank angle (deg) can be
left at 360.
• Click the Map piston XYZ button. This
instructs es-ice to calculate and store the
position of the bottom layer of template
vertices at a crank angle of 360 degrees,
assuming the piston was shaped like the
dummy target shells in Geometry Cset 2.

After this finishes, this vertex spacing information


can be applied to a number of cell layers starting
from the bottom template cell layer; the distance
between these layers can also be specified.
Judging by our 1 millimetre approximate valve
curtain height and the geometric height of the
piston bowl, we will use ten cell layers to model
the piston.
• Another cell layer must be added to account
for the “key grid plane” so enter a value of
12 for the Layers to read parameter
• Click the Layer DZ button and enter a value of 1 in the adjacent text box
• Click the Read piston XYZ button to display Figure 22-4

Version 4.20 22-5


PISTON MODELING Chapter 22
Meshing the Piston with the Shape Piston Method

Key Grid
Plane

Piston Mesh

Figure 22-4 Template window: Result after “Read Piston XYZ”

The bottom sixteen layers of the template will now be spaced 1 millimetre apart in
the global z-direction, have a vertex spacing defined by the Map piston XYZ
function, and have the shape of the dummy target shells. This results in a piston
mesh that will match most closely to the combustion dome mesh when the piston is
close to the dome, thus minimizing mesh distortion.
Isolate the actual piston shells again in the currently active cell set. The Shape
Piston method is the only method that requires the piston to be at its BDC position
since the mapping process will eventually be done in the BDC position. With only
the piston shells in the currently active cell set, we will gather all piston shell
vertices and move them down by the piston stroke length in the global Cartesian
system.
• Select Sets > Vset > Newset > Cset, 0 from the pull-down menus (equivalent
to command vset,newset,cset)
• Type the following commands:

csys,1
vmod,vset,0,0,-68.5,relative

Similarly to what was done in Chapter 20 with the spark plug (see Figure 20-26),
the appropriate template cells need to be deleted so that the piston bowl and crescent
conform better to the geometry. The double-plotting feature and other similar
techniques should be used as before. An additional technique that needs explanation
here is the use of the Plaster button in the Edge or Spline Tool panel. This creates
non-hexahedral cells in order to improve mapping to curved geometry surfaces (see
also Chapter 20).

22-6 Version 4.20


Chapter 22 PISTON MODELING
Meshing the Piston with the Shape Piston Method

To gather the cells involved in the piston bowl mapping, we recommend creating
three cell sets:
1. A cell cset that includes the bottom twelve layers (the Layers to read
parameter as specified in the Piston panel) (Cset 10)
2. The topmost layer of the above cset labelled as ‘Key grid plane’ in Figure
22-5 (Cset 11)
3. A cell set formed by subtracting Cset 11 from Cset 10 (Cset 12). This is the
‘Piston mesh’ shown in Figure 22-5

• For Cset 10, view the full model (Cset 1) from the +y direction
(view,0,1,0,1) and use command Cset,subs,zone to collect the
bottom 11 layers. Then use command Cset save 10 to save the set to Cset
10.
• For Cset 11, execute the following commands:

Cset recall 10
Cset invert
Cset subset cset 1
vset newset cset
cset recall 10
cset subset vset any
vset none
cplot
cset save 11

• For Cset 12, execute the following commands:

Cset reca 10
Cset dele cset 11
cplot
Cset save 12

The above sets are shown in Figure 22-5

Version 4.20 22-7


PISTON MODELING Chapter 22
Meshing the Piston with the Shape Piston Method

Cset 11 (Key grid plane)

Cset 12 (Piston mesh) Cset 10

Figure 22-5 Template cell sets 10, 11, and 12

After collecting Cset 12, perform the following operations:


• Change to the Geometry window
• Collect the piston shells using command Cset newset type cursor
• Turn Off the Mesh plotting and the Fill options
• Create a spline on the piston crown to capture its features using command
spline angle 30
• Change to the Template window
• Change the viewpoint to view,0,0,1,1
• Turn On the Mesh plotting and turn Off the Fill option
• Select Dplot

The resulting view is shown in Figure 22-6

22-8 Version 4.20


Chapter 22 PISTON MODELING
Meshing the Piston with the Shape Piston Method

cset,delete,zone

Bowl Feature

Figure 22-6 Double plot of Cset 12 together with the piston geometry

• Using command Cset,delete,zone, remove the cells outside the bowl


as shown in Figure 22-6. This process could be repeated several times until
you get the cells that represent the bowl. Unfortunately, selecting the cells
near the bowl feature can be tricky. Three possible cases are illustrated in
Figure 22-7. Figure 22-7a is not desirable because the resulting mesh has
distorted cells. Generally, the cell configuration in Figure 22-7b and Figure
22-7c should give you good mesh quality. Ideally, you want to get a cell
configuration as similar to Figure 22-7c as possible.
• Save this set as Cset 12 again (Cset,save,12). Note that the selected cells
to capture the bowl feature could affect the mesh quality near the bowl region.
• Add Cset 11 to Cset 12, and save this as Cset 13 using the following
commands:
Cset reca 12
Cset add cset 11
Cset save 13

Version 4.20 22-9


PISTON MODELING Chapter 22
Meshing the Piston with the Shape Piston Method

a) b)

c) Ideal

Figure 22-7 Removing cells outside the bowl feature

Cset 13 is shown in Figure 22-8.

22-10 Version 4.20


Chapter 22 PISTON MODELING
Meshing the Piston with the Shape Piston Method

Figure 22-8 Cset 13 obtained by adding Cset 12 (modified) and Cset 11

After gathering all cells to be mapped to the piston bowl, we can improve the
‘stair-step’ mesh resulting from the cell deletion by filling in columns of prismatic
cells. This is accomplished by bounding each set of stair-steps by an edge that runs
diagonally across some cell faces.
• Click the Diagonal button in the Edge or
Spline Tool to allow edges to run
diagonally across a cell face

Rectangular cell faces will eventually be cut


into two triangular faces, resulting in trimmed
cells of type 1, as shown in Appendix A of the
STAR-CD V4.10 Meshing User Guide. Note
that a single edge can be used for multiple,
adjacent stair-steps.
• Click the Plaster button and then left-click
on an edge knot to create the necessary
cells, in this case prisms, shown in Figure
22-9
• As with most other cursor-pick functions, type q or click on an empty part of
the screen to quit this function
• After the plastered cells are created, the edges are no longer useful so they
should be cleared with the Clear edge button

Version 4.20 22-11


PISTON MODELING Chapter 22
Meshing the Piston with the Shape Piston Method

Figure 22-9 Template window: Piston bowl cells before (left) and after (right)
plastering columns

We also wish to put a crown of plastered cells around the piston bowl so that we do
not have to map adjoining side and bottom faces to the smoothly-contoured piston
bowl (this could result in cells with excessively large interior angles). The task is
accomplished by first deleting some cells to obtain a stair-step feature and then
plastering it. The plastering function will automatically create prisms, pyramids,
tetrahedrals and trimmed cells to fill the stair-step correctly, as shown in Figure
22-10.
Note that one can also create new cells using the Cdx Tool, as described in
Chapter 4, “Improving cell connectivity” of this volume. However, new vertices
should not be created or they will be fixed into the grid. Cells created with Cdx
should use vertices from the original template created by es-ice.

Figure 22-10 Template window: Piston bowl cells before (left) and after (right)
plastering crown cells

Similar things can be done for the crescent cells at the other end of the piston.
Edges, splines and patches can then be created and the Edge and Surface mapping
processes performed previously can be repeated to map the piston surface, as shown
in Figure 22-11, Figure 22-12 and Figure 22-13.

22-12 Version 4.20


Chapter 22 PISTON MODELING
Meshing the Piston with the Shape Piston Method

Figure 22-11 Template window: Result before (left) and after (right) plastering crescent
cells

Figure 22-12 Template window (left) and Geometry window (right): Edges/patches and
splines for Shape Piston

Figure 22-13 Template window: Cmark plot of piston after mapping

Version 4.20 22-13


PISTON MODELING Chapter 22
Meshing the Piston with the Shape Piston Method

Once you are satisfied with the mapped piston, you can update Cset 1 to include the
piston cells (Cset 11, bowl cells, crescent cells, and plaster cells). Figure 22-14
illustrates the steps to update Cset 1. In this figure, Cset 14 contains cells from Cset
11, the bowl, crescent, and plaster cells.

cset,add,cset,14

cset,delete,zone

Click update cset 1 button


in the training panel

Figure 22-14 Updating Cset 1 to include piston bowl before mapping

Since the spark plug is deep enough to penetrate the piston bowl at TDC, the
‘discontinuous deletion layer’ feature of es-ice should be used. The deletion layer
normally occurs at a fixed number of layers above the highest bottom face in the
template. By creating attachment boundaries under specified edges, we can create
distinct regions. In each region, the deletion layer is a fixed number of cell layers
above the highest bottom face. The deletion layer can thus be made discontinuous,
allowing the penetration of a cylinder head component into the piston or a piston
component into the cylinder head.
The attachment boundaries are created by making edges on the surface of the
template and saving them into Eset 11. Eset 11 has been reserved for edges that
‘demerge’ their vertices and all the underlying vertices in the z-direction within the
template. This demerging process occurs during the Star Setup operation if the Add
cuts to template option is selected.

22-14 Version 4.20


Chapter 22 PISTON MODELING
Meshing the Piston with the Shape Piston Method

• Isolate the bottom-most edge of the spark


plug, shown in Figure 22-15, and save it in
Eset 11
• Select the Add cuts to template button in the
Star Setup panel

Figure 22-15 Template window: Edge saved in Eset


11

The default values used for the other parameters can be found by clicking Used in
the Create Template tool. It is recommended to check these parameters, reload the
input values by clicking Input and change the parameters if necessary. Clicking on
Input is necessary to save the default values.

Version 4.20 22-15


PISTON MODELING Chapter 22
Meshing the Piston with the Shape Piston Method

• BDC cylinder layers in the Cylinder


parameters panel by default uses 35 for the
piston BDC layers. Since 12 layers were
used for piston modelling, we should add
these layers back into the stroke count by
increasing the parameter to 47.
• Enter 12 for the Bottom small layers
parameter to take advantage of the thin
spacing in the bottom 12 template cell
layers used to model the piston
• Click Ok to accept the new values and close
the panel
• In the Create Template panel, click the
Make Template button to make a new
save_ice file with the new parameters.
This file is included with the other tutorial
example files.
• Click the Read Template button with the
option changed to Modify Template so that
the new template information is read and
applied without losing the previous work.

22-16 Version 4.20


Chapter 23 ELSA SPRAY MODELLING

Chapter 23 ELSA SPRAY MODELLING


The following tutorial data files are used in this chapter:
ELSA/bowl.dbs
ELSA/injector_hole.spl
ELSA/ufile/dropro.f (ufile directory is required)
ELSA/injection.tbl

The model created at the end of this tutorial is saved to file:


save_es-ice.ELSA

The ELSA model captures fuel injection to a high degree of detail by utilizing both
the Eulerian and Lagrangian simulation approaches in its implementation. The
Eulerian part of the model treats the fuel injected from the nozzle as a continuous
liquid phase within the solution domain. The Lagrangian part treats the fuel droplets
as a set of Lagrangian parcels once they have separated from the liquid fuel stream.
This approach allows you to simulate the spray evolution from the injector nozzle
without the need for atomization models or droplet size distributions.
The transition from the Eulerian to the Lagrangian treatment occurs when the
liquid phase is sufficiently dilute and the droplet size is determined by the liquid/gas
interface area density. For more information on the ELSA methodology and
implementation, see Chapter 19 in the STAR-CD Supplementary Notes volume.
This tutorial uses a geometry and engine characteristics similar to those for the
closed-cycle polyhedral and sector meshing tutorials. However, certain differences
have been introduced to make the model suitable for use in an ELSA analysis.
The screen shots below show in some detail the kind of information available
with the ELSA model. Figure 23-1 shows the Eulerian liquid fuel being injected
from the nozzle into the cylinder. Figure 23-2 shows the Lagrangian droplets
generated from the Eulerian phase after break-up. Figure 23-3 shows the fuel
vapour generated that participates in the combustion process.

Figure 23-1 ELSA Eulerian liquid fuel stream

Version 4.20 23-1


ELSA SPRAY MODELLING Chapter 23

Figure 23-2 ELSA Lagrangian droplets

Figure 23-3 ELSA fuel vapour distribution

The steps necessary to set up the tutorial are summarised below:


1. Import the piston bowl geometry
2. Create a 2D profile of the piston bowl shape
3. Create the spray zone mesh with a dummy sector mesh
4. Create the cylinder sector mesh and add the spray zone
5. Set-up the Star Controls parameters in es-ice
6. Set up the ELSA model’s analysis control parameters as Extended Data in
pro-STAR

23-2 Version 4.20


Chapter 23 ELSA SPRAY MODELLING
Importing the Bowl Geometry

Importing the Bowl Geometry


To import the geometry surface mesh:
• Launch es-ice in the usual manner
• In the Select panel, click Read Data
• In the Read Tool, click the ellipsis (...)
button next to the DBase box and
select bowl.dbs via the file browser
• Click the ellipsis (...) button next to
the Get box and select 1 bowl
geometry via the database browser
• In the Plot Tool, set the Views option
to View 1 -1 1
• Click CPlot to display the imported
bowl geometry shown in Figure 23-4

Figure 23-4 Bowl geometry surface

Defining the Bowl Shape


Based on the imported 3D surface mesh, es-ice requires a 2D profile of the bowl
shape in order to generate a 2D section of the cylinder. This profile is used at a later
stage to trim the 3D template and generate a cylinder volume mesh.

Version 4.20 23-3


ELSA SPRAY MODELLING Chapter 23
Setting the Events and Cylinder Parameters

• Enter the following command to create a spline representing the bowl’s 2D


profile:

Spline, 1, RadShell

• In the Plot Tool, set the Views option to View 0 -1 0 to display the spline, as
shown in Figure 23-5

Figure 23-5 Displaying the spline representing the bowl

Setting the Events and Cylinder Parameters


The events and cylinder parameters define the engine characteristics and operating
conditions. To set these parameters:
• In the Select panel, click Create Template
• In the Create Template panel, select Sector
from the drop-down menu
• Click Events
• In the Events parameters panel (see Figure
23-6), set the Crank angle start (deg) to 680
• Set the Crank angle stop (deg) to 800
• Set the Engine RPM to 4000
• Set the Connecting rod length to 270
• Click Ok to accept the settings and close the
panel
• In the Create Template panel, click Cylinder
• In the Cylinder parameters panel (see Figure
23-6), set the Piston stroke length to 158.54
• Click Ok to accept the settings and close the
panel

23-4 Version 4.20


Chapter 23 ELSA SPRAY MODELLING
Creating the Spray Zone

Figure 23-6 Events parameters and Cylinder parameters panels

Creating the Spray Zone


In this section you will create a dummy sector mesh from which you can extract a
spray zone mesh suitable for the ELSA model. This spray zone will be used at a later
stage in this tutorial. You will also use the Sector panel to define cell counts and
distributions within the template mesh. For definitions and illustrations of these
parameters, see Chapter 6, “Axisymmetric Sector Meshing” in the User Guide.
To create the spray zone mesh:
• In the Create Template panel, click Make Sector
• In the Sector panel (see Figure 23-7), select Trimmed, spray from the
drop-down menu at the top-left of the panel
• Set Azimuthal cone angle to 22.5
• Set Number of holes to 8
• Set Azimuthal cells to 9 and 18
• Select the Modify prisms toggle button and make sure that its value is set to 2
• Deselect the Include injector cells toggle button
• Select the Edit toggle button
• Set Source R, Z, diameter to 1.5, -1.2 and 1
• Set Spray extent to 15
• Set Axis angle to 13
• Set Planar cone angle to 26
• Set Radial cells to 6, 36 and 10

Version 4.20 23-5


ELSA SPRAY MODELLING Chapter 23
Creating the Spray Zone

• Set Axial cells to 180, 30 and 4


• Click Create 2D

Figure 23-7 Sector panel for spray zone mesh

At this stage, you can create an edge that defines the top of the cylinder without the
spray zone mesh. This edge is converted to a spline which will be used at a later
stage in the tutorial. To create this spline:
• Zoom into the top of the cylinder mesh
• Enter the following command to create an edge that defines the bottom of the
injector, the edges of the spray zone and the cylinder head, as shown in Figure
23-8

Edge, 1, Cursor

23-6 Version 4.20


Chapter 23 ELSA SPRAY MODELLING
Creating the Spray Zone

Figure 23-8 Spray zone edge

• Enter the following command to create Spline 3 from Edge 1

Spline, 3, Edge, 1

• In the Plot Tool, activate the Geometry window from the drop-down menu
• Click CPlot and zoom into Spline 3 near the spray zone
• Enter the following command to create spline break points in places where
there should be sharp corners, as shown in Figure 23-9

SBreak

Version 4.20 23-7


ELSA SPRAY MODELLING Chapter 23
Creating the Spray Zone

3
4

2
Figure 23-9 Spline break points

Next, create the dummy sector mesh and isolate the spray zone:
• In the Sector panel, click Trim
• When the corresponding child process is complete, click Get sector
• In the Plot Tool, set the Views option to View 0, -1, 0
• Enter the following command to isolate the spray zone cells by drawing a
polygonal zone around them, as shown in Figure 23-10

CSet, Newset, Zone

Figure 23-10 Polygonal zone around spray zone cell

Figure 23-11 shows the spray zone cells.

23-8 Version 4.20


Chapter 23 ELSA SPRAY MODELLING
Creating the Spray Zone

Figure 23-11 Spray zone cells

Finally, modify some cells so that they match the nozzle shape and export the spray
zone so that it can be used later on in the tutorial:
• Enter the following command to import a spline that represents the nozzle.
This spline will be used as a guide for modifying cells in the spray zone.

Spline, Read, injector_hole.spl


• In the Plot Tool, deselect the Fill toggle button and click DPlot to display the
spray zone and nozzle together
• Zoom into the area close to the nozzle, as shown in Figure 23-12

Figure 23-12 Nozzle spline and mesh

Version 4.20 23-9


ELSA SPRAY MODELLING Chapter 23
Creating the Spray Zone

• Enter the following command to create diagonal mesh lines that approximate
the nozzle, as shown in Figure 23-13.

CutHex, Cursor

Figure 23-13 Nozzle with modified cells

This operation creates a mesh line across a quad face between two picked
vertices. Therefore, you can only use the CutHex command to cut one cell
face at a time.
• Enter the following command to select vertices that are closest to the nozzle,
as shown in Figure 23-14

VSet, Newset, Cursor

Figure 23-14 Nozzle vertices

23-10 Version 4.20


Chapter 23 ELSA SPRAY MODELLING
Creating the Sector Mesh

• Enter the following commands to create a cylindrical coordinate system at the


centre of the nozzle and move the selected vertices to a radius of 0.101
relative to this coordinate system, as shown in Figure 23-15

Local, 11, Cylindrical, 1.5, 0, -1.2, 0, 0, 103


VModify, VSet, 0.101, Fixed, Fixed, Absolute, 11

Note that this coordinate system will also be used at a later stage in the
tutorial to define the spray location and direction.
• Reply Yes to the prompt in the main es-ice window

Figure 23-15 Modified nozzle vertices

• Enter the following commands to save the spray zone mesh to a .dbs file

DBase, Open, spray_zone.dbs


DBase, Put, 1, , , “Spray Zone”
DBase, Close

Creating the Sector Mesh


In this section, you will create the actual sector mesh to be used in the analysis. This
includes Spline 3 (created in the previous section) which modifies the dome mesh
to accommodate the spray zone.
To create the sector mesh:
• In the Sector panel (see Figure 23-16), select Trimmed, no spray from the
drop-down menu at the top-left of the panel
• Select the Dome spline ID toggle button and make sure that its value is set to
3
• Set Azimuthal cells to 20
• Set Minimum TDC layers to 5
• Set Dome Z, cells to 1 and 1
• Set Radial cells to 90

Version 4.20 23-11


ELSA SPRAY MODELLING Chapter 23
STAR Set-up in es-ice

• Set Axial cells to 230


• Set Axial block cells to 40
• Set Extrusion ratio to 0.4
• Click Create

Figure 23-16 Sector panel

STAR Set-up in es-ice


This section covers the Star Controls panel settings where the model physics
(combustion model, initial conditions, boundary conditions, etc.) are defined.
Before attempting this part of the tutorial, it is important that you familiarize
yourself with the Star Controls panel by completing the example in Chapter 6 of this
volume. In the following sections, most of this panel’s settings are only presented
in summary form, but more details are given for parameters specific to the ELSA
and ECFM-CLEH models.
The required Star Controls panel settings are as follows:
1. Load model — load the model into Star Controls
2. Analysis setup — select the desired combustion model and define the scalar
initialisation method
3. Combustion — specify combustion and ignition parameters
4. Initialization — specify the engine initial conditions
5. Boundary conditions — specify the engine boundary conditions
6. Post-setup — specify the post-processing requirements

23-12 Version 4.20


Chapter 23 ELSA SPRAY MODELLING
STAR Set-up in es-ice

7. Time step control — specify the time step settings


8. Write data — write the files needed to import the model into pro-STAR

Load model
In the Load model view of the Star Controls panel (see Figure 23-17):
• Click Load model to load the model into the Controls Workspace window

Figure 23-17 ELSA Star Controls > Load model panel

Analysis setup
In the Analysis setup view of the Star Controls panel (see Figure 23-18):
• Select ECFM-CLEH, compression from the combustion model drop-down
menu
• Select Diesel-C10H18 from the fuel drop-down menu
• Set the Mixture option to Phi and its value to 0.7
• Set the EGR definition to Air+Exhaust and its value to 10%
• Set the Trapped mass to 1831.789 mg
• This value is the mass of intake charge and residual exhaust in the model
when all valves are closed. This information is used to initialise the
cylinder temperature at a later stage.
• Set the Mass of fuel to 80.08 mg
• This value is the total mass of fuel injected into the cylinder during the
engine cycle.
• In the Tracers section, click Add
• In the main es-ice panel, type LIQM_ELSA as a label for Tracer 48
• Add another tracer (no. 49) and label it as LSFD_ELSA
• These scalars will be required by the ELSA model during the pro-STAR
set-up. At this stage, they are just passive scalars (tracers), but will be
fully defined at a later stage in the tutorial. Creating them in es-ice

Version 4.20 23-13


ELSA SPRAY MODELLING Chapter 23
STAR Set-up in es-ice

ensures that the subroutines in es-ice.inp are correct.


l

Figure 23-18 ELSA Star Controls > Analysis setup panel

Assembly
In the Assembly view of the Star Controls panel (see Figure 23-22):
• Click the ellipsis (...) next to Database file and select spray_zone.dbs via
the file browser
• Click Get to load the spray zone into the Controls Workspace window
• In the Plot Tool, deselect the Fill toggle button
• Click CPlot and zoom into the spray zone as shown in Figure 23-19

23-14 Version 4.20


Chapter 23 ELSA SPRAY MODELLING
STAR Set-up in es-ice

Figure 23-19 Spray zone close-up

• In the Star Controls panel, click CPMatch and pick the interior face between
the spray zone and mesh, as shown in Figure 23-20

Figure 23-20 First CPMatch

• Click CPMatch and pick the second interior face, as shown in Figure 23-21

Version 4.20 23-15


ELSA SPRAY MODELLING Chapter 23
STAR Set-up in es-ice

Figure 23-21 Second CPMatch

• Click CPTransform
• When the child process has finished, click Finish

Figure 23-22 ELSA Star Controls > Assembly panel

Combustion
The default combustion model coefficients are suitable for this case (see Figure
23-23).

23-16 Version 4.20


Chapter 23 ELSA SPRAY MODELLING
STAR Set-up in es-ice

Figure 23-23 ELSA Star Controls > Combustion panel

Initialization
In the Initialization view of the Star Controls panel (see Figure 23-24):
• Set Velocity to Constant Omega
• Set Omega to 2000 rpm
• Set Pressure to 14.602 and select bar from the drop-down menu
• Set Turbulence Energy to 10 m2/s2
• Set Turbulence Dissipation to 2500 m2/s3
• Select the Temperature from trapped mass toggle button and make sure
that the Model length unit is set to mm

Figure 23-24 ELSA Star Controls > Initialization panel

Version 4.20 23-17


ELSA SPRAY MODELLING Chapter 23
STAR Set-up in es-ice

Boundary Conditions
Typically, es-ice identifies the cyclic boundaries in a sector model automatically
when loading the model into pro-STAR. However, this case has an added static
mesh (injector zone) whose cyclic boundaries must be defined manually.
In the Boundary conditions view of the Star Controls panel (see Figure 23-30):
• Use the drop-down menu to set the boundary type of all cylinder regions to
Fixed
• For the Combustion dome, set the Temperature to 450
• For the Piston crown, set the Temperature to 450
• For the Cylinder wall, set the Temperature to 400
• For the Cyclic regions, click Define lead
• In the Plot Tool, select the Fill toggle button
• In the Boundary Tool, click Display all
• Click Keep picked and pick the lead cyclic boundary as shown in Figure
23-25. Note that the angle between cyclic boundaries is defined in a
clockwise direction.

Lead Cyclic Boundary

Figure 23-25 Lead cyclic boundary

• In the Boundary Tool, click Define


• For the Cyclic regions, click Define trail
• In the Boundary Tool, click Display all
• Click Keep picked and pick the trailing cyclic boundary as shown in Figure
23-26

23-18 Version 4.20


Chapter 23 ELSA SPRAY MODELLING
STAR Set-up in es-ice

Trailing Cyclic Boundary

Figure 23-26 Trailing cyclic boundary

• In the Boundary Tool, click Define


• Select the Extra regions toggle button and use the regions up/down scroll
arrows to increase the number to 2 regions
• For Region 1, set the Name to Nozzle
• Set the type to Inlet. No other boundary conditions are defined here as this
boundary will be fully defined in pro-STAR.
• Click Define to open the Boundary Tool
• In the Boundary Tool, click Display All and zoom into the area around the
nozzle, as shown in Figure 23-27

Figure 23-27 Boundary view of the nozzle area

Version 4.20 23-19


ELSA SPRAY MODELLING Chapter 23
STAR Set-up in es-ice

• Click Split by edge and draw an edge around the circumference of the nozzle.
When complete, the nozzle area will become Patch 63 and is shown in Figure
23-28.

Figure 23-28 Nozzle patch

• Press q on the keyboard to exit the pick mode


• Click Keep picked and select the newly created patch
• Press q on the keyboard to exit the pick mode
• Click Define to define the displayed patch as the nozzle
• Use a technique similar to the one described above to define the injector wall
(see Figure 23-29) and assign the following properties to it:
• Region Number: 2
• Name: Injector Wall
• Type: Adiabatic Wall

23-20 Version 4.20


Chapter 23 ELSA SPRAY MODELLING
STAR Set-up in es-ice

Injector Wall

Figure 23-29 Patches for extra regions

Figure 23-30 ELSA Star Controls > Boundary controls panel for the Cylinder

Next, choose Angelberger as the wall function model and combine all patches for
a given boundary type into a single boundary region (see Figure 23-31):

Version 4.20 23-21


ELSA SPRAY MODELLING Chapter 23
STAR Set-up in es-ice

• Select Global settings from the drop-down menu at the top of the panel
• Check that the Wall function model is set to Angelberger
• Click Check regions to ensure that all regions are valid
• Make sure the consistently toggle button is selected and then click Join
regions

Figure 23-31 ELSA Star Controls > Boundary Conditions panel for the Global settings

Time step control


Following the ELSA spray model recommendations, use the following settings for
the time step size:
–6 –5
• A range between 1 ×10 and 1 ×10 seconds during the compression and
expansion phases
–8
• A minimum of 1 ×10 seconds when the rate of injection changes rapidly
(i.e. during the start or end of injection)
–7
• A maximum of 1 ×10 seconds when the rate of injection is relatively
constant

In the Time step control view of the Star Controls panel (see Figure 23-32):
• Use the time step up/down scroll arrows to increase the number to 6 time
steps
• Set the step size applicability range (in terms of crank angle) and magnitude
as follows:
• Time step 1: Set Angle to 680 and Step to 0.15
• Time step 2: Set Angle to 699.75 and Step to 0.003
• Time step 3: Set Angle to 700 and Step to 0.000198
• Time step 4: Set Angle to 700.5 and Step to 0.00198
• Time step 5: Set Angle to 721.2 and Step to 0.0198
• Time step 6: Set Angle to 731.2 and Step to 0.075

23-22 Version 4.20


Chapter 23 ELSA SPRAY MODELLING
STAR Set-up in es-ice

Figure 23-32 ELSA Star Controls > Time step control panel

Write data
In the Write data view of the Star Controls panel (see Figure 23-33):
• Deselect the Bcdefi toggle button as the nozzle inlet boundary conditions will
be defined in pro-STAR
• Click Write data

Figure 23-33 ELSA Star Controls > Write data panel

Version 4.20 23-23


ELSA SPRAY MODELLING Chapter 23
Saving the Model File

Saving the Model File


Having completed the es-ice part of the CFD model
set-up, save your work up to this point in an es-ice
model file.
• In the Select panel, click Write data
• In the Write Tool, enter save_es-ice.ELSA
and click Save to save the model
• Close es-ice

STAR Set-up in pro-STAR


This section covers the required settings in pro-STAR, which is where the ELSA
spray model, boundary conditions and STAR analysis controls are specified. Before
attempting this part of the tutorial, it is important that you familiarize yourself with
the pro-STAR interface by completing the example in Chapter 7 of this volume. In
the following sections, most panel settings are only presented in summary form but
information specific to ELSA and ECFM-CLEH is given in more detail.
The required steps are as follows:
1. Start up pro-STAR, open panel es-ice.PNL and use it to import the data
created in es-ice
2. Activate the Lagrangian model for particle tracking
3. Define scalars required by the ELSA model
4. Set up the Lagrangian droplet physical models and controls
5. Define the injector boundary conditions
6. Set up the numerical analysis controls
7. Add an Extended Data segment to the problem file, as currently required by
the ELSA model

Using the es-ice panel


Use the es-ice panel to import the mesh and physics settings created in es-ice and
saved via the Write data operation in Star Controls. Also increase the pro-STAR
memory allocation and define moving mesh events.
• Launch pro-STAR in the usual manner
• Select Panels > .es-ice from the menu bar to open the es-ice panel (see Figure
23-34)
• Click the Resize, Model and Events buttons in sequence
• Close the es-ice panel

23-24 Version 4.20


Chapter 23 ELSA SPRAY MODELLING
STAR Set-up in pro-STAR

Figure 23-34 es-ice panel

Activating the Lagrangian model


To set up an ELSA run, you must first activate the Lagrangian model in pro-STAR:
• In the pro-STAR Model Guide, select Analysis Features (see Figure 23-35)
• Set the Multi-Phase Treatment option to Lagrangian
• Click Apply

Figure 23-35 ELSA Analysis Features panel

Defining the ELSA scalars


Three ELSA-specific scalars are required for this case:
• LIQM_ELSA — The liquid phase of the fuel injected through the nozzle
• LSFD_ELSA — The liquid surface area density, used to determine the mean
size of the liquid droplets (i.e. the droplet diameters)
• LIQV_ELSA — The vapour phase of the fuel taking part in combustion
Version 4.20 23-25
ELSA SPRAY MODELLING Chapter 23
STAR Set-up in pro-STAR

The LIQM_ELSA and LSFD_ELSA scalars were defined as passive scalars


(tracers) in the es-ice Star Controls panel. In this section, you must redefine
LIQM_ELSA as an active scalar with properties that match the liquid fuel. The
LSFD_ELSA scalar remains passive. You must also change the settings defining
the mass diffusivity constant for both scalars.
A fuel vapour scalar (Scalar 1) has already been defined automatically by the
ECFM-CLEH model, but you must change its name here to LIQV_ELSA so that it
is compatible with ELSA’s naming conventions. Changing the fuel vapour scalar
name also requires redefinition of the reaction scheme.
First, redefine the LIQM_ELSA scalar:
• In the pro-STAR Model Guide, select Thermophysical Models and
Properties > Additional Scalars > Molecular Properties (Scalars) (see
Figure 23-36)
• Set the Scalar # to 48
• Set Influence to Active
• Set the panel parameters as follows:
• Density (kg/m3) — 824.6
• Molecular Weight (kg/kmol) — 208.2
• Expansion Coefficient — 0
• Molecular Viscosity (kg/ms) — 0.00137563
• Specific Heat (J/kgK) — 2203.67
• Conductivity (W/mK) — 0.134905
• Heat of Formation (J/kg) — -1.69896e+06
• Temperature of Formation (K) — 298.15
• Click Apply and then click OK to close the warning message

23-26 Version 4.20


Chapter 23 ELSA SPRAY MODELLING
STAR Set-up in pro-STAR

Figure 23-36 LIQM_ELSA properties

• Click Define Polynomials


• In the Polynomial Function Definition panel (see Figure 23-37), set the panel
parameters as follows:
• Tmin — 200
• Tmax — 750
• C1 — 6.8912
• C2 — 0.0895922
• C3 — 0.000294643
• C4 — -1.05188e-06
• C5 — 1.04676e-09
• Enthalpy — -42247.5
• Entropy — -48.5848
• Click Apply Coefficients followed by Close

Version 4.20 23-27


ELSA SPRAY MODELLING Chapter 23
STAR Set-up in pro-STAR

Figure 23-37 LIQM_ELSA polynomial

Check the LSFD_ELSA scalar:


• Set the Scalar # to 49 (see Figure 23-38)
• Make sure that the Influence setting is Passive
• Click Apply

Figure 23-38 LSFD_ELSA properties

23-28 Version 4.20


Chapter 23 ELSA SPRAY MODELLING
STAR Set-up in pro-STAR

Define the LIQV_ELSA scalar:


• Enter the following commands to rename Scalar 1 (fuel vapour) as
LIQV_ELSA

SCMODIFY, 1, NAME
LIQV_ELSA
• Set the Scalar # to 1. Note that the name displayed on the panel has changed
to LIQV_ELSA (see Figure 23-39)

Figure 23-39 LIQV_ELSA properties

Redefine the reaction scheme:


• Enter the following commands to define the leading reactant (i.e.
LIQV_ELSA)

CRTYPE, 1
LREACT, 1
LIQV_ELSA
• Enter the following commands to define the reaction scheme

REACTION, 1
1
14.9
0
10.3
9.2

Version 4.20 23-29


ELSA SPRAY MODELLING Chapter 23
STAR Set-up in pro-STAR

where:
1 — the number of LIQV_ELSA kilomoles in the reaction
14.9 — the number of Oxygen kilomoles in the reaction
0 — the number of Oxygen kilomoles in the products
10.3 — the number of CO2 kilomoles in the products
9.2 — the number of H2O kilomoles in the products
• Enter the following command for a stoichiometric check of the chemical
reaction scheme

CRSCALAR, MAP, 1, DBASE

Define the binary properties of the ELSA scalars:


• In the pro-STAR Model Guide, select Additional Scalars > Binary
Properties (see Figure 23-40)
• Select the Diffusion Velocity Correction check box
• In Scalar Mass Diffusivity, select Scalar Number 48 and set the Constant
(m2/s) to 1e-10
• Click Apply
• Select Scalar Number 49 and set the Constant (m2/s) to 1e-10
• Click Apply

23-30 Version 4.20


Chapter 23 ELSA SPRAY MODELLING
STAR Set-up in pro-STAR

Figure 23-40 ELSA scalar binary properties

Setting up the Lagrangian droplets


In this section, you will specify physical models, properties and solution controls
for the Lagrangian droplets. The creation process for these droplets is controlled by
the ELSA model.
Define droplet solution controls:
• In the pro-STAR Model Guide, select Lagrangian Multi-Phase > Droplet
Controls (see Figure 23-41)
• Make sure that Two-Phase Lagrangian Calculations is set to Coupled
• Set the Droplet Mode to Explicitly defined parcel injection
• Click Apply

Version 4.20 23-31


ELSA SPRAY MODELLING Chapter 23
STAR Set-up in pro-STAR

Droplet

Figure 23-41 Droplet Controls panel

Define droplet physical models:


• In the pro-STAR Model Guide, select Lagrangian Multi-Phase > Droplet
Physical Model
• In the Global Physical Models tab (see Figure 23-42), set the Turbulent
Dispersion to On
• Click Apply

Figure 23-42 Global Physical Models panel

• In the Droplet Physical Models tab (see Figure 23-43), set the panel

23-32 Version 4.20


Chapter 23 ELSA SPRAY MODELLING
STAR Set-up in pro-STAR

parameters as follows:
• Momentum Transfer > Correlation — Standard
• Mass Transfer Calculation — Standard
• Heat Transfer Calculation — Standard
• Droplet Break-Up > Break-Up Model — Off
• Droplet-Wall Interaction > Droplet Behaviour — Rebound
• Boiling — On
• Click Apply

Figure 23-43 Droplet Physical Models panel

Specify the droplet properties:


• In the pro-STAR Model Guide, select Lagrangian Multi-Phase > Droplet
Properties (see Figure 23-44)
• Set Evaporates to Scalar to LIQV_ELSA

Version 4.20 23-33


ELSA SPRAY MODELLING Chapter 23
STAR Set-up in pro-STAR

• Select option User from the drop-down menu for all droplet properties, as
these are specified via the dropro.f subroutine
• Click Apply

Figure 23-44 Droplet Properties panel

Defining boundary regions and boundary conditions


In this section, you will set the nozzle inlet boundary conditions. This defines the
Eulerian part of the spray model.
Define the nozzle inlet:
• In the pro-STAR Model Guide, select Define Boundaries > Define Boundary
Regions (see Figure 23-45)
• Select Region 31 from the table and set the panel parameters as follows:
• User Option — Table
• Table Name — injection.tbl
• Coordinate System — 11
• Turbulence Switch — TI/Length
• Turb. Intensity — 0.01
• Length (m) — 2e-05
• Density — 824.6
• Temperature — 310
• Click Apply

23-34 Version 4.20


Chapter 23 ELSA SPRAY MODELLING
STAR Set-up in pro-STAR

Figure 23-45 Nozzle region definition

• In the pro-STAR Model Guide, select Define Boundaries > Scalar


Boundaries (see Figure 23-46)
• In the Boundary Regions list, select Boundary Region 31
• In the Scalars table, select Scalar Number 48 (LIQM_ELSA)
• Set Value to 1
• Click Apply
• In the Scalars table, select Scalar Number 49 (LSFD_ELSA)
• Set Value to 0.1
• Click Apply
Version 4.20 23-35
ELSA SPRAY MODELLING Chapter 23
STAR Set-up in pro-STAR

Figure 23-46 Nozzle scalar definition

Setting up analysis controls


The ELSA model is a complex simulation that requires tighter residuals and lower
under-relaxation settings, to be defined in this section. You must also specify the
run’s post-processing requirements.
Define the solution method, differencing scheme and scalar residual tolerance:
• In the pro-STAR Model Guide, select Analysis Controls > Solution Method
(see Figure 23-47) and set the panel parameters as follows:
• Maximum Residual Tolerance — 1e-05
• Maximum Number of Corrector Stages — 500
• Under-Relaxation for Pressure Correction — 0.3
• Click Apply

23-36 Version 4.20


Chapter 23 ELSA SPRAY MODELLING
STAR Set-up in pro-STAR

Figure 23-47 Solution Method panel

• In the pro-STAR Model Guide, select Analysis Controls > Primary


Variables (see Figure 23-48)
• In the Differencing Scheme tab, set the Differencing Scheme to UD for
U-Momentum, V-Momentum and W-Momentum
• Set Differencing Scheme to UD for Turbulence KE and Turbulence Diss.
• Click Apply

Figure 23-48 Differencing Schemes panel

Version 4.20 23-37


ELSA SPRAY MODELLING Chapter 23
STAR Set-up in pro-STAR

• In the pro-STAR Model Guide, select Analysis Controls > Additional


Scalars (Controls) (see Figure 23-49)
• In the Scalar table, select Scalar Number 48 and set the Residual Tolerance
to 1e-12
• Click Apply
• Select Scalar Number 49 and set the Residual Tolerance to 1e-12
• Click Apply

Figure 23-49 Scalar residual tolerances

Specify the analysis controls for post-processing:


• In the pro-STAR Model Guide, select Analysis Controls > Analysis Output
• Select the Post tab (see Figure 23-50) and set the panel parameters as follows:
• Output Frequency — 100
• Backup Frequency — 600
• Click Apply

23-38 Version 4.20


Chapter 23 ELSA SPRAY MODELLING
STAR Set-up in pro-STAR

Figure 23-50 Analysis Output > Post panel

• Select the Transient tab (see Figure 23-51) and set the panel parameters as
follows:
• Starting at time (degCA) — 680
• Output interval (degCA) — 2
• In the displayed list of available output data, select LIQM_ELSA and click
the Post check box
• Repeat the previous step for the following variables:
• LIQV_ELSA
• Temperature
• Click Apply

Version 4.20 23-39


ELSA SPRAY MODELLING Chapter 23
STAR Set-up in pro-STAR

Figure 23-51 Analysis Output > Transient tab

Enter the following commands in pro-STAR’s I/O window to set the special
switches and constants required for an ELSA analysis:
• Switch 127, which switches off diffusion at inlets for all scalars:

SWITCH, 127, ON
• Real Constant 23, which sets the supplied value as the maximum permissible
void fraction

RCONSTANT, 23, 1e-10


• Real Constant 196, which deletes parcels whose mass is less than the supplied
value

RCONSTANT, 195, 1e-15

Adding extended data for the ELSA model


The ELSA model is controlled by keywords and parameter values specified in the
Extended Data section of the problem file. For more information on the required
keywords and values see Chapter 19, “Extended Data” in the STAR-CD
Supplementary Notes volume.
23-40 Version 4.20
Chapter 23 ELSA SPRAY MODELLING
STAR Set-up in pro-STAR

Edit the Extended Data section:


• From the menu bar, select Utility > Extended Data
• Enter the following text at the bottom of the Extended Data panel (see Figure
23-52)

BEGIN ELSA_MODEL
1 1
iSigmaModel
1
surf_tens
2.48679d-2
time_inj4
3.0d-1
crit_nap
0.01d0
Pbig
2.0d19
drmin
1.0d-10
nparcel
1.0
elsaEL_forced
minliq1
0.01d0
minliq2
1.0d-6
elsaST_EXP
elsaOmega_LIMIT
1.0d-8
END ELSA_MODEL
• Click Save followed by Close

Version 4.20 23-41


ELSA SPRAY MODELLING Chapter 23
Writing the Geometry and Problem Files and Saving the Model

Figure 23-52 ELSA Extended Data

Writing the Geometry and Problem Files and Saving the Model
Finally, write the STAR geometry and problem files and save the pro-STAR model
file (see Figure 23-53).
• From the main pro-STAR menu bar, select File > Save Geometry to open the
Save Geometry File panel
• Set the Geometry Scale Factor to 0.001 and click Apply followed by Close
• Select File > Save Problem and click Save
• Select File > Quit and click Save & Quit

Figure 23-53 File writing and exit from pro-STAR

The solver can now be run, as described in Chapter 8 of this volume.

23-42 Version 4.20

Você também pode gostar