- •TABLE OF CONTENTS
- •Chapter 1 INTRODUCTION
- •The es-ice Environment
- •es-ice Meshing Capabilities
- •Tutorial Structure
- •Trimming Tutorial Overview
- •Required Files
- •Trimming Tutorial files
- •Automatic 2D Tutorial files
- •Wall Temperature Tutorial files
- •Mesh Replacement Tutorial files
- •Multiple Cylinder Tutorial files
- •Closed-Cycle Tutorial files
- •Sector Tutorial files
- •Two-Stroke Tutorial files
- •Mapping Tutorial files
- •ELSA Tutorial files
- •Chapter 2 SURFACE PREPARATION IN STAR-CCM+
- •Importing and Scaling the Geometry
- •Creating Features
- •Defining Surfaces
- •Remeshing and Exporting the Geometry
- •Chapter 3 GEOMETRY IMPORT AND VALVE WORK
- •Importing the Surfaces
- •Modelling the Valves
- •Saving the Model
- •Chapter 4 MESHING WITH THE TRIMMING METHOD
- •Modifying Special Cell Sets in the Geometry
- •Defining Flow Boundaries
- •Creating the 2D Base Template
- •Creating the 3D Template
- •Trimming the 3D Template to the Geometry
- •Improving cell connectivity
- •Assembling the Trimmed Template
- •Running Star Setup
- •Saving the Model
- •Chapter 5 CREATING AND CHECKING THE MESH
- •Chapter 6 STAR SET-UP in es-ice
- •Load Model
- •Analysis Set-up
- •Valve Lifts
- •Assembly
- •Combustion
- •Initialization
- •Cylinder
- •Port 1 and Port 2
- •Boundary Conditions
- •Cylinder
- •Port and Valve 1
- •Port and Valve 2
- •Global settings
- •Post Set-up
- •Cylinder
- •Port 1 and Port 2
- •Global settings
- •Time Step Control
- •Write Data
- •Saving the Model
- •Chapter 7 STAR SET-UP in pro-STAR
- •Using the es-ice Panel
- •Setting Solution and Output Controls
- •File Writing
- •Chapter 8 RUNNING THE STAR SOLVER
- •Running in Serial Mode
- •Running in Parallel Mode
- •Running in Parallel on Multiple Nodes
- •Running in Batch
- •Restarting the Analysis
- •Chapter 9 POST-PROCESSING: GENERAL TECHNIQUES
- •Creating Plots with the es-ice Graph Tool
- •Calculating Apparent Heat Release
- •Plotting an Indicator Diagram
- •Calculating Global Engine Quantities
- •Creating a Velocity Vector Display
- •Creating an Animation of Fuel Concentration
- •Creating an Animation of Temperature Isosurfaces
- •Chapter 10 USING THE AUTOMATIC 2D TEMPLATE
- •Importing the Geometry Surface
- •Defining Special Cell Sets in the Geometry
- •Modelling the Valves
- •Creating the Automatic 2D Template
- •Refining the 2D Template Around the Injector
- •Adding Features to the Automatic 2D Template
- •Using Detailed Automatic 2D Template Parameters
- •Saving the es-ice Model File
- •Chapter 11 MULTIPLE-CYCLE ANALYSIS
- •Setting Up Multiple Cycles in es-ice
- •Setting Up Multiple Cycles in pro-STAR
- •Chapter 12 HEAT TRANSFER ANALYSIS
- •Resuming the es-ice Model File
- •Mapping Wall Temperature
- •Exporting Wall Heat Transfer Data
- •Saving the es-ice Model File
- •Cycle-averaging Wall Heat Transfer Data
- •Post-processing Wall Heat Transfer Data in pro-STAR
- •Plotting average wall boundary temperatures
- •Plotting average heat transfer coefficients
- •Plotting average near-wall gas temperature at Y-plus=100
- •Mapping Heat Transfer Data to an Abaqus Model via STAR-CCM+
- •Chapter 13 MESH REPLACEMENT
- •Preparing the File Structure
- •Rebuilding the Dense Mesh
- •Creating Ahead Files for the Dense Mesh
- •Defining Mesh Replacements
- •Setting Up Mesh Replacement in pro-STAR
- •Setting up the coarse model
- •Setting up the dense model
- •Chapter 14 MULTIPLE CYLINDERS
- •Resuming the es-ice Model File
- •Making, Cutting and Assembling the Template
- •Setting Up Multiple Cylinders
- •Checking the Computational Mesh
- •STAR Set-Up in es-ice
- •Analysis set-up
- •Assembly
- •Combustion
- •Initialization
- •Boundary Conditions
- •Post Setup
- •Time Step Control
- •Write Data
- •Saving the es-ice Model File
- •Importing the Geometry
- •Generating the Closed-Cycle Polyhedral Mesh
- •Assigning shells to geometry cell sets
- •Specifying General, Events and Cylinder parameters
- •Creating a spray-optimised mesh zone
- •Importing a user intermediate surface
- •Checking the spray-optimised zone
- •Creating the closed-cycle polyhedral mesh
- •Running Star Setup
- •Creating and checking the computational mesh
- •Saving the Model File
- •Chapter 16 DIESEL ENGINE: SECTOR MODEL
- •Importing the Bowl Geometry
- •Defining the Bowl Shape
- •Defining the Fuel Injector
- •Creating the 2D Template
- •Creating the Sector Mesh
- •Creating and Checking the Mesh
- •Saving the Model
- •Chapter 17 DIESEL ENGINE: STAR SET-UP IN es-ice and pro-STAR
- •STAR Set-up in es-ice
- •Load model
- •Analysis setup
- •Assembly
- •Combustion
- •Initialization
- •Boundary conditions
- •Post setup
- •Time step control
- •Write data
- •Saving the Model File
- •STAR Set-up in pro-STAR
- •Using the es-ice Panel
- •Selecting Lagrangian and Liquid Film Modelling
- •Setting up the Fuel Injection Model
- •Setting up the Liquid Film Model
- •Setting up Analysis Controls
- •Writing the Geometry and Problem Files and Saving the Model
- •Chapter 18 DIESEL ENGINE: POST-PROCESSING
- •Creating a Scatter Plot
- •Creating a Spray Droplet Animation
- •Chapter 19 TWO-STROKE ENGINES
- •Importing the Geometry
- •Meshing with the Trimming Method
- •Assigning shells to geometry cell sets
- •Creating the 2D template
- •Creating the 3D template
- •Trimming the 3D template to the geometry
- •Assembling the trimmed template
- •Running Star Setup
- •Checking the mesh
- •STAR Set-up in es-ice
- •Analysis setup
- •Assembly
- •Combustion
- •Initialization
- •Boundary conditions
- •Post setup
- •Time step control
- •Write data
- •Saving the es-ice Model File
- •Chapter 20 MESHING WITH THE MAPPING METHOD
- •Creating the Stub Surface in the Geometry
- •Creating the 2D Base Template
- •Creating the 3D Template
- •General Notes About Edges and Splines
- •Creating Edges and Splines Near the Valve Seat
- •Creating the Remaining Edges and Splines
- •Creating Patches
- •The Mapping Process
- •Chapter 21 IMPROVING THE MAPPED MESH QUALITY
- •Creating Plastered Cells
- •Chapter 22 PISTON MODELING
- •Meshing the Piston with the Shape Piston Method
- •Chapter 23 ELSA SPRAY MODELLING
- •Importing the Bowl Geometry
- •Defining the Bowl Shape
- •Setting the Events and Cylinder Parameters
- •Creating the Spray Zone
- •Creating the Sector Mesh
- •STAR Set-up in es-ice
- •Load model
- •Analysis setup
- •Assembly
- •Combustion
- •Initialization
- •Boundary Conditions
- •Time step control
- •Write data
- •Saving the Model File
- •STAR Set-up in pro-STAR
- •Using the es-ice panel
- •Activating the Lagrangian model
- •Defining the ELSA scalars
- •Setting up the Lagrangian droplets
- •Defining boundary regions and boundary conditions
- •Setting up analysis controls
- •Adding extended data for the ELSA model
- •Writing the Geometry and Problem Files and Saving the Model
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 |