You are on page 1of 264

Forte Tutorials

ANSYS, Inc. Release 2021 R2


Southpointe July 2021
2600 Ansys Drive
Canonsburg, PA 15317 ANSYS, Inc. and
ansysinfo@ansys.com Ansys Europe,
Ltd. are UL
http://www.ansys.com registered ISO
(T) 724-746-3304 9001: 2015
(F) 724-514-9494 companies.
Copyright and Trademark Information

© 2021 ANSYS, Inc. Unauthorized use, distribution or duplication is prohibited.

Ansys, Ansys Workbench, AUTODYN, CFX, FLUENT and any and all ANSYS, Inc. brand, product, service and feature
names, logos and slogans are registered trademarks or trademarks of ANSYS, Inc. or its subsidiaries located in the
United States or other countries. ICEM CFD is a trademark used by ANSYS, Inc. under license. CFX is a trademark
of Sony Corporation in Japan. All other brand, product, service and feature names or trademarks are the property
of their respective owners. FLEXlm and FLEXnet are trademarks of Flexera Software LLC.

Disclaimer Notice

THIS ANSYS SOFTWARE PRODUCT AND PROGRAM DOCUMENTATION INCLUDE TRADE SECRETS AND ARE CONFID-
ENTIAL AND PROPRIETARY PRODUCTS OF ANSYS, INC., ITS SUBSIDIARIES, OR LICENSORS. The software products
and documentation are furnished by ANSYS, Inc., its subsidiaries, or affiliates under a software license agreement
that contains provisions concerning non-disclosure, copying, length and nature of use, compliance with exporting
laws, warranties, disclaimers, limitations of liability, and remedies, and other provisions. The software products
and documentation may be used, disclosed, transferred, or copied only in accordance with the terms and conditions
of that software license agreement.

ANSYS, Inc. and Ansys Europe, Ltd. are UL registered ISO 9001: 2015 companies.

U.S. Government Rights

For U.S. Government users, except as specifically granted by the ANSYS, Inc. software license agreement, the use,
duplication, or disclosure by the United States Government is subject to restrictions stated in the ANSYS, Inc.
software license agreement and FAR 12.212 (for non-DOD licenses).

Third-Party Software

See the legal information in the product help files for the complete Legal Notice for Ansys proprietary software
and third-party software. If you are unable to access the Legal Notice, contact ANSYS, Inc.

Published in the U.S.A.


Table of Contents
1. Introduction ............................................................................................................................................ 1
2. Simulating a Diesel Engine Using a Sector Mesh .................................................................................... 3
2.1. Data Provided ................................................................................................................................... 3
2.1.1. Files Used in This Tutorial .......................................................................................................... 3
2.1.2. Project Comparison Utility ........................................................................................................ 4
2.1.3. Time Estimate .......................................................................................................................... 4
2.2. Generating the Sector Mesh .............................................................................................................. 4
2.2.1. Define the Engine Parameters .................................................................................................. 4
2.2.2. Select the Mesh Topology ........................................................................................................ 6
2.2.3. Specify the Mesh-Size Parameters ............................................................................................. 6
2.2.4. Generate the Mesh and Review ................................................................................................ 7
2.2.5. Import the Mesh into the Open Ansys Forte Project .................................................................. 7
2.2.6. Set Up the Case ........................................................................................................................ 8
2.2.6.1. Run the Case Using Defaults .......................................................................................... 14
2.2.6.2. Results .......................................................................................................................... 15
2.3. Reference ....................................................................................................................................... 15
3. Simulating Dual Fuel Combustion ........................................................................................................ 17
3.1. Data Provided ................................................................................................................................. 17
3.1.1. Files Used in This Tutorial ........................................................................................................ 17
3.1.2. Project Comparison Utility ...................................................................................................... 18
3.1.3. Time Estimate ........................................................................................................................ 18
3.2. Pre-Processing the Chemistry Set .................................................................................................... 18
3.3. Importing the Mesh ........................................................................................................................ 19
3.3.1. Set Up the Case ...................................................................................................................... 20
3.3.1.1. Save the Project ............................................................................................................. 27
3.3.1.2. Run the Case Using Defaults .......................................................................................... 27
3.3.1.3. Visualizing the Results ................................................................................................... 28
3.4. Reference ....................................................................................................................................... 28
4. Spray Bomb Modeling ........................................................................................................................... 31
4.1. Data Provided ................................................................................................................................. 31
4.1.1. Files Used in This Tutorial ........................................................................................................ 31
4.1.2. Project Comparison Utility ...................................................................................................... 31
4.1.3. Time Estimate ........................................................................................................................ 32
4.2. Modeling Solid-Cone Spray Injection ............................................................................................... 32
4.2.1. Spray Bomb ........................................................................................................................... 33
4.2.1.1. Problem Description ...................................................................................................... 33
4.2.1.2. Mesh Setup ................................................................................................................... 35
4.2.1.3. Models Setup ................................................................................................................ 36
4.2.1.3.1. Boundary Conditions ............................................................................................ 38
4.2.1.3.2. Initial Conditions ................................................................................................... 39
4.2.1.3.3. Parameter Study on Pressure ................................................................................. 39
4.2.1.3.4. Simulation Controls .............................................................................................. 40
4.2.1.3.5. Chemistry Solver ................................................................................................... 40
4.2.1.3.6. Transport Terms .................................................................................................... 40
4.2.1.4. Output Controls ............................................................................................................ 40
4.2.1.5. Save Project ................................................................................................................... 41
4.2.1.6. Run Settings .................................................................................................................. 41
4.2.1.7. Run Simulation .............................................................................................................. 41
4.2.1.8. Results .......................................................................................................................... 42

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. iii
Tutorials

4.3. Reference ....................................................................................................................................... 44


5. Port-Injected Spark Ignition Engine ..................................................................................................... 45
5.1. Data Provided ................................................................................................................................. 45
5.1.1. Files Used in This Tutorial ........................................................................................................ 45
5.1.2. Project Comparison Utility ...................................................................................................... 45
5.1.3. Time Estimate ........................................................................................................................ 46
5.2. Port-Injected Spark Ignition Engine ................................................................................................. 46
5.2.1. Problem Description .............................................................................................................. 46
5.2.1.1. Import the Geometry ..................................................................................................... 46
5.2.1.2. Subvolume Creation ...................................................................................................... 47
5.2.1.3. Automatic Mesh Generation Setup ................................................................................ 47
5.2.1.4. Models Setup ................................................................................................................ 49
5.2.1.5. Boundary Conditions: .................................................................................................... 50
5.2.1.6. Initialization .................................................................................................................. 53
5.2.1.7. Simulation Controls ....................................................................................................... 54
5.2.1.8. Output Controls ............................................................................................................ 55
5.2.1.9. Preview Simulation ........................................................................................................ 57
5.2.1.10. Run Simulation ............................................................................................................ 57
5.2.1.11. Run Settings ................................................................................................................ 57
5.2.2. Results ................................................................................................................................... 58
6. Tracking Soot Particles Evolution in a Diesel Engine ............................................................................ 63
6.1. Data Provided ................................................................................................................................. 63
6.1.1. Files Used in This Tutorial ........................................................................................................ 63
6.1.2. Project Comparison Utility ...................................................................................................... 63
6.1.3. Time Estimate ........................................................................................................................ 64
6.1.4. Prerequisites for This Tutorial .................................................................................................. 64
6.2. Project Setup .................................................................................................................................. 64
6.2.1. Sector Mesh Details ................................................................................................................ 64
6.2.2. Chemistry Set Details ............................................................................................................. 66
6.2.3. Transport Property Settings .................................................................................................... 67
6.2.4. Spray Model Settings ............................................................................................................. 67
6.2.5. Soot Model Settings ............................................................................................................... 68
6.2.6. Boundary Conditions ............................................................................................................. 69
6.2.7. Initial Conditions .................................................................................................................... 69
6.2.8. Simulation Control ................................................................................................................. 70
6.2.9. Output Control ....................................................................................................................... 70
6.3. Project Results ................................................................................................................................ 70
7. Gasoline Direct Injection Engine Simulation ........................................................................................ 77
7.1. Data Provided ................................................................................................................................. 77
7.1.1. Files Used in This Tutorial ........................................................................................................ 77
7.1.2. Project Comparison Utility ...................................................................................................... 78
7.1.3. Time Estimate ........................................................................................................................ 78
7.1.4. Prerequisites for This Tutorial .................................................................................................. 78
7.2. Direct Injection Spark Ignition Engine ............................................................................................. 78
7.2.1. Problem Description .............................................................................................................. 78
7.2.1.1. Import the Geometry ..................................................................................................... 79
7.2.1.2. Subvolume Creation ...................................................................................................... 80
7.2.1.3. Automatic Mesh Generation Setup ................................................................................ 81
7.2.1.4. Models Setup ................................................................................................................ 82
7.2.1.5. Boundary Conditions ..................................................................................................... 86
7.2.1.6. Initialization .................................................................................................................. 88

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
iv of ANSYS, Inc. and its subsidiaries and affiliates.
Tutorials

7.2.1.7. Simulation Controls ....................................................................................................... 89


7.2.1.8. Output Controls ............................................................................................................ 90
7.2.1.9. Preview Simulation ........................................................................................................ 91
7.2.1.10. Run Simulation ............................................................................................................ 92
7.2.1.11. Run Settings ................................................................................................................ 92
7.2.2. Results ................................................................................................................................... 93
8. Two-Stroke Engine Simulation .............................................................................................................. 97
8.1. Data Provided ................................................................................................................................. 97
8.1.1. Files Used in This Tutorial ........................................................................................................ 97
8.1.2. Project Comparison Utility ...................................................................................................... 98
8.1.3. Time Estimate ........................................................................................................................ 98
8.1.4. Prerequisites for This Tutorial .................................................................................................. 98
8.2. Two-Stroke Marine Engine Project Setup ......................................................................................... 98
8.2.1. Problem Description .............................................................................................................. 98
8.2.1.1.Two-Stroke Engine Details ............................................................................................ 100
8.2.1.2. Automatic Mesh Generation Setup ............................................................................... 101
8.2.2. Chemistry Set Details ........................................................................................................... 102
8.2.3. Transport Property Settings .................................................................................................. 103
8.2.4. Spray Model Settings ............................................................................................................ 103
8.2.5. Boundary Conditions ............................................................................................................ 104
8.2.6. Initial Conditions .................................................................................................................. 107
8.2.7. Simulation Controls .............................................................................................................. 109
8.2.8. Output Controls ................................................................................................................... 111
8.2.9. Preview Simulation ............................................................................................................... 112
8.2.10. Run Settings ....................................................................................................................... 114
8.2.11. Run Simulation ................................................................................................................... 114
8.3. Project Results .............................................................................................................................. 115
9. Multi-Cylinder Four-Stroke Engine Simulation ................................................................................... 119
9.1. Data Provided ............................................................................................................................... 119
9.1.1. Accessing Tutorial Files ......................................................................................................... 119
9.1.2. Files Used in This Tutorial ...................................................................................................... 119
9.2. Engine Configuration and Problem Description ............................................................................. 120
9.3. Multi-Cylinder Spark-Ignition Engine Project Setup ........................................................................ 121
9.3.1. Geometry Import ................................................................................................................. 121
9.3.2. Defining Reference Frames and Time Frames ........................................................................ 121
9.3.2.1. Reference Frames ........................................................................................................ 121
9.3.2.2. Time Frames ................................................................................................................ 122
9.3.3. Automatic Mesh Generation Setup ....................................................................................... 123
9.3.4. Model Setup ........................................................................................................................ 124
9.3.5. Boundary Conditions ............................................................................................................ 125
9.3.6. Initial Conditions .................................................................................................................. 126
9.3.7. Simulation Controls .............................................................................................................. 127
9.4. Result Visualization ....................................................................................................................... 127
10. Rotary Lobe Compressor Simulation ................................................................................................ 129
10.1. Data for Tutorial .......................................................................................................................... 129
10.1.1. Files Used in This Tutorial .................................................................................................... 129
10.1.2. Time Estimate ..................................................................................................................... 130
10.1.3. Prerequisites for This Tutorial .............................................................................................. 130
10.1.4. Project Comparison Utility .................................................................................................. 130
10.2. Problem Description ................................................................................................................... 130
10.3. Rotary Lobe Compressor Project Setup ........................................................................................ 132

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. v
Tutorials

10.3.1. Prepare and Import Surface Geometry ................................................................................ 132


10.3.2. Automatic Mesh Generation Setup ..................................................................................... 135
10.3.3. Chemistry Set ..................................................................................................................... 137
10.3.4. Transport Property Settings ................................................................................................ 138
10.3.5. Boundary Conditions ......................................................................................................... 138
10.3.6. Initial Conditions ................................................................................................................ 139
10.3.7. Simulation Controls ............................................................................................................ 139
10.3.8. Output Controls ................................................................................................................. 140
10.4. Preview Simulation ..................................................................................................................... 141
10.5. Run Settings and Run Simulation ................................................................................................. 141
10.6. Simulation Results ....................................................................................................................... 141
10.6.1. Spatially Averaged Solutions ............................................................................................... 141
10.6.2. Spatially Resolved Solutions ............................................................................................... 142
11. Scroll Compressor Simulation ........................................................................................................... 145
11.1. Data Provided ............................................................................................................................. 145
11.1.1. Files Used in This Tutorial .................................................................................................... 145
11.1.2. Time Estimate ..................................................................................................................... 146
11.1.3. Prerequisites for This Tutorial .............................................................................................. 146
11.1.4. Project Comparison Utility .................................................................................................. 146
11.2. Problem Description ................................................................................................................... 146
11.3. Scroll Compressor Project Setup .................................................................................................. 147
11.3.1. Prepare and Import Surface Geometry ................................................................................ 147
11.3.2. Automatic Mesh Generation Setup ..................................................................................... 148
11.3.3. Chemistry Set ..................................................................................................................... 150
11.3.4. Transport Property Settings ................................................................................................ 150
11.3.5. Boundary Conditions ......................................................................................................... 150
11.3.6. Initial Conditions ................................................................................................................ 151
11.3.7. Simulation Controls ............................................................................................................ 151
11.3.8. Output Controls ................................................................................................................. 152
11.4. Preview Simulation ..................................................................................................................... 152
11.5. Run Settings and Run Simulation ................................................................................................. 153
11.6. Simulation Results ....................................................................................................................... 153
11.6.1. Spatially Averaged Solutions ............................................................................................... 153
11.6.2. Spatially Resolved Solutions ............................................................................................... 154
12. Piston Compression Pump With Built-in FSI ..................................................................................... 157
12.1. Data Provided ............................................................................................................................. 157
12.1.1. Files Used in This Tutorial .................................................................................................... 157
12.1.2. Project Comparison Utility .................................................................................................. 158
12.1.3. Prerequisites for This Tutorial .............................................................................................. 158
12.1.4. Time Estimate ..................................................................................................................... 158
12.2. Problem Description ................................................................................................................... 158
12.3. Piston Compression Pump Setup ................................................................................................. 159
12.3.1. Import the Geometry ......................................................................................................... 159
12.3.2. Automatic Mesh Generation Setup ..................................................................................... 161
12.3.3. Models Setup ..................................................................................................................... 162
12.3.3.1. Chemistry Set ............................................................................................................ 162
12.3.4. Boundary Conditions ......................................................................................................... 163
12.3.5. Initial Conditions ................................................................................................................ 163
12.3.6. Simulation Controls ............................................................................................................ 163
12.3.7. Output Controls ................................................................................................................. 165
12.4. Preview Simulation ..................................................................................................................... 165

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
vi of ANSYS, Inc. and its subsidiaries and affiliates.
Tutorials

12.5. Run Settings and Run Simulation ................................................................................................. 165


12.6. Simulation Results ....................................................................................................................... 166
13. Valved Pulse-Jet With Built-in FSI ...................................................................................................... 173
13.1. Data for Tutorial .......................................................................................................................... 173
13.1.1. Files Used in This Tutorial .................................................................................................... 173
13.1.2. Time Estimate ..................................................................................................................... 174
13.1.3. Prerequisites for This Tutorial .............................................................................................. 174
13.1.4. Project Comparison Utility .................................................................................................. 174
13.2. Problem Description ................................................................................................................... 174
13.3. Valved Pulse Jet Setup ................................................................................................................. 176
13.3.1. Import the Geometry ......................................................................................................... 176
13.3.2. Automatic Mesh Generation Setup ..................................................................................... 177
13.3.3. Models Setup ..................................................................................................................... 178
13.3.4. Boundary Conditions ......................................................................................................... 179
13.3.5. Initial Conditions ................................................................................................................ 179
13.3.6. Simulation Controls ............................................................................................................ 179
13.3.7. Output Controls ................................................................................................................. 180
13.4. Preview Simulation ..................................................................................................................... 181
13.5. Run Settings and Run Simulation ................................................................................................. 181
13.6. Simulation Results ....................................................................................................................... 181
14. Oscillating Plate FSI Using System Coupling .................................................................................... 185
14.1. Data Provided ............................................................................................................................. 185
14.1.1. Files Used in This Tutorial .................................................................................................... 185
14.1.2. Time Estimate ..................................................................................................................... 186
14.2. Setting Up the FSI Simulation ...................................................................................................... 186
14.2.1. Creating the Working Directory to Run the Coupled Simulation ........................................... 187
14.2.2. Setting Up the Forte Simulation .......................................................................................... 188
14.2.3. Setting Up the Mechanical Simulation ................................................................................ 189
14.2.4. Setting Up System Coupling ............................................................................................... 190
14.3. Launching the FSI Simulation ...................................................................................................... 191
14.4. Analyzing Simulation Results ....................................................................................................... 191
15. System Coupling CHT for T-junction Pipe Flow ................................................................................ 195
15.1. Data Provided ............................................................................................................................. 195
15.1.1. Files Used in This Tutorial .................................................................................................... 195
15.1.2. Time Estimate ..................................................................................................................... 196
15.2. Setting Up the Conjugate Heat Transfer Simulation ...................................................................... 196
15.2.1. Setting Up the Forte Simulation .......................................................................................... 198
15.2.2. Setting Up the Fluent Simulation ........................................................................................ 200
15.2.3. Setting Up System Coupling ............................................................................................... 200
15.3. Launching the CHT Simulation .................................................................................................... 202
15.4. Analyzing Simulation Results ....................................................................................................... 212
16. Conjugate Heat Transfer Simulation of a Single-Cylinder Internal Combustion Engine .................. 215
16.1. Data Provided ............................................................................................................................. 215
16.1.1. Files Used in This Tutorial .................................................................................................... 215
16.1.2. Time Estimate ..................................................................................................................... 216
16.2. Setting Up the Conjugate Heat Transfer Simulation ...................................................................... 216
16.2.1. Creating the Working Directory to Run the Coupled Simulation ........................................... 218
16.2.2. Setting Up the Forte Simulation .......................................................................................... 219
16.2.3. Setting Up the Fluent Simulation ........................................................................................ 221
16.2.4. Setting Up System Coupling ............................................................................................... 221
16.3. Launching the CHT Simulation .................................................................................................... 223

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. vii
Tutorials

16.4. Analyzing Simulation Results ....................................................................................................... 223


17. Generic Full-cycle Diesel Engine CHT Using System Coupling .......................................................... 227
17.1. Data Provided ............................................................................................................................. 227
17.1.1. Files Used in This Tutorial .................................................................................................... 227
17.1.2. Time Estimate ..................................................................................................................... 228
17.2. Setting Up the Conjugate Heat Transfer Simulation ...................................................................... 228
17.2.1. Creating the Working Directory to Run the Coupled Simulation ........................................... 229
17.2.2. Setting Up the Forte Simulation .......................................................................................... 230
17.2.3. Setting Up the Fluent Simulation ........................................................................................ 232
17.2.4. Setting Up System Coupling ............................................................................................... 234
17.3. Launching the CHT Simulation .................................................................................................... 235
17.4. Analyzing Simulation Results ....................................................................................................... 236
18. Links to Third-Party Software ........................................................................................................... 245
18.1. Installing Forte and GT-SUITE for Coupling ................................................................................... 245
18.2. Setting Up a GT-SUITE Model for CFD Coupling ............................................................................ 245
18.3. Setting Up a Forte Model for Coupling with GT-SUITE .................................................................. 245
18.4. Restarting or Continuing a Co-simulation .................................................................................... 249
18.5. References .................................................................................................................................. 249

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
viii of ANSYS, Inc. and its subsidiaries and affiliates.
List of Figures
2.1. Sector Mesh Generator Utility with New Profile and Editor panel .............................................................. 5
2.2. Template for Topology #3 ........................................................................................................................ 6
2.3. Diesel sector sample mesh as generated in the Sector Mesh Generator. ................................................... 8
2.4. Injection Profile Parameter Settings ....................................................................................................... 11
2.5. Run Simulation - Icon bar ...................................................................................................................... 14
3.1. Geometry visualized in Simulate’s 3-D View after import ........................................................................ 20
3.2. Spray cone shown after nozzle specification. ......................................................................................... 22
3.3. Injection profile parameter settings ....................................................................................................... 23
3.4. Gas Mixture Editor ................................................................................................................................ 25
3.5. Simulation result in EnSight .................................................................................................................. 28
3.6. Pressure and apparent heat release rate vs. crank angle ......................................................................... 29
3.7. CO and UHC emissions vs. crank angle ................................................................................................... 30
4.1. KH-RT spray model definitions. .............................................................................................................. 32
4.2. View injection profile ............................................................................................................................ 38
4.3. Spray - Parameter study on pressure ...................................................................................................... 40
4.4. Monitor Ansys Forte run ........................................................................................................................ 42
4.5. Mesh sensitivity on spray penetration depth ......................................................................................... 43
4.6. Mesh sensitivity on droplet mass and vapor mass .................................................................................. 43
4.7. Spray bomb penetration for 2 mm mesh. ............................................................................................... 44
4.8. Results of automated parameter study on ambient pressure in the spray bomb. ..................................... 44
5.1. Port-injected engine geometry with valves and ports defined ................................................................ 47
5.2. Gas Mixture Editor: Defining Inlet gas composition ................................................................................ 51
5.3. Output control panel - Spatially Resolved .............................................................................................. 56
5.4. User-defined spatially resolved output controls ..................................................................................... 56
5.5. Screen view of the solution file in EnSight .............................................................................................. 58
5.6. Pressure and Apparent heat release rate vs. crank angle ......................................................................... 59
5.7. NO and CO emissions g/kg-fuel) vs. crank angle ..................................................................................... 60
5.8. Iso-contours at 1000 K showing the progression of the flame front from CA 694-702 degrees ................. 61
6.1. Sector Mesh Generator settings for this tutorial ..................................................................................... 66
6.2. Calculated pressure and apparent heat release rate curves .................................................................... 71
6.3. Predicted spatially averaged soot as a function of crank angle ............................................................... 72
6.4. A 2000K temperature isosurface showing the region of combustion at TDC (the cut plane shown here is
used to plot values in the next figure) ......................................................................................................... 73
6.5. Soot particle number density (#particles/cm3), volume fraction (cm3/cm3) and average diameter (nm)
shown on the cut plane from 0-40 CA degree ATDC ..................................................................................... 74
6.6. Filter used in EnSight for average particle diameter ................................................................................ 75
6.7. Particle number count reported for various particle bins ........................................................................ 75
7.1. Schematic of GDI engine ....................................................................................................................... 79
7.2. Engine geometry with valves and ports defined .................................................................................... 80
7.3. Subvolume for the chamber .................................................................................................................. 81
7.4. Import injection profile from CSV dialog ................................................................................................ 84
7.5. Injection profile after import ................................................................................................................. 84
7.6. Nozzles after specifying location and orientation ................................................................................... 85
7.7. Gas Mixture Editor: Defining inlet gas composition ................................................................................ 86
7.8. Profile of spatially resolved output control data ..................................................................................... 91
7.9. Pressure trace result from Forte ............................................................................................................. 92
7.10. Screen view of the solution file in CFD-Post ......................................................................................... 93
7.11. Turning on the spray particles ............................................................................................................. 94
7.12. Spray particles in the combustion chamber ......................................................................................... 95

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. ix
Tutorials

7.13. Iso-surface of the flame showing the flame location at 728CA .............................................................. 96
8.1. Components of direct-injection two-stroke engine simulation project ................................................... 99
8.2. Two-stroke geometry after import ....................................................................................................... 100
8.3. Composition editor specifying inlet Air mixture ................................................................................... 105
8.4. Import CSV data for pressure profile .................................................................................................... 105
8.5. Importing the intake pressure profile .................................................................................................. 106
8.6. TimeSteps profile for Max Time Step Profile ......................................................................................... 110
8.7. Output CAs profile for Spatially Resolved output .................................................................................. 112
8.8. Preview mesh in EnSight at 98 CA degrees, the start of the simulation .................................................. 113
8.9. Monitoring the pressure from Run Simulation ..................................................................................... 114
8.10. Screen view of the solution file in CFD-Post ........................................................................................ 115
8.11. Temperature contour plot on a plane through the centerline of the combustion chamber .................. 116
8.12. Spray particles in the chamber at 291 CA degrees .............................................................................. 117
8.13. Isosurface at 334 CA degrees showing the location of the flame front ................................................. 118
9.1. Configuration of the inline four-stroke multi-cylinder engine ............................................................... 120
9.2. Tilt angles of intake and exhaust valve stems ....................................................................................... 122
10.1. Configuration of the sample blower case ........................................................................................... 131
10.2. Surface normal vectors of the casing and rotors ................................................................................. 133
10.3. Fluid volume formation between casing and rotors ........................................................................... 134
10.4. Use Transform Mesh to shrink the rotors along the radial direction ..................................................... 135
10.5. Example for setting up a new gas mixture .......................................................................................... 138
10.6. Line plots created in Forte Monitor .................................................................................................... 142
10.7. Post-processing the compressor simulation results using EnSight ...................................................... 143
10.8. Sample Forte simulation results visualized in EnSight ......................................................................... 144
11.1. Configuration of the example scroll compressor ................................................................................ 147
11.2. Line plots created in Forte Monitor .................................................................................................... 154
11.3. Post-processing simulation results using EnSight ............................................................................... 155
11.4. Sample Forte simulation results on clip planes in EnSight ................................................................... 156
12.1. Piston compression pump geometry ................................................................................................. 159
12.2. Clip view of the Geometry and Reference Frames ............................................................................... 160
12.3. Built-in FSI Spring-Mass-System Editor panel ..................................................................................... 164
12.4. Spatially averaged Intake_Valve applied deflection and piston position .............................................. 166
12.5. Spatially averaged Discharge_Valve applied deflection and piston position ........................................ 167
12.6. Spatially averaged pressure force applied to each valve and piston position ....................................... 168
12.7. Pressure distribution on a z-plane at BDC and TDC, respectively ......................................................... 169
12.8. Spatially averaged in-cylinder pressure and piston position ............................................................... 169
12.9. Spatial distribution of Air_IN and Air_OUT at various crank angles ...................................................... 170
12.10. Spatial distribution of velocity magnitude at BDC and TDC, respectively ........................................... 171
13.1. Valved pulse jet geometry ................................................................................................................. 175
13.2. Exploded geometry .......................................................................................................................... 175
13.3. Built-in FSI Bending Beam panel ........................................................................................................ 180
13.4. Tip deflection of Reed 1, spatially averaged chamber pressure and inlet pressure profile ..................... 182
13.5. Instantaneous pressure on reed valves during an opening/closing cycle ............................................ 182
13.6. Pressure distribution on a z-plane, 3D and 2D view ............................................................................ 183
13.7. Velocity magnitude contours on a z-plane ......................................................................................... 184
13.8. Temperature distribution on a z-plane ............................................................................................... 184
14.1. Forte simulation domain ................................................................................................................... 187
14.2. Mechanical simulation domain .......................................................................................................... 187
14.3. Enable the System Coupling node ..................................................................................................... 189
14.4. Mechanical setup .............................................................................................................................. 190
14.5. Oscillating plate and x displacement evolution at node 320 ......................................................... 192

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
x of ANSYS, Inc. and its subsidiaries and affiliates.
Tutorials

14.6. Velocity magnitude evolution on a Z cut-plane .............................................................................. 193


15.1. Simulation domain in Forte for the T-junction pipe flow problem ....................................................... 197
15.2. Simulation domain in Fluent for the pipe wall’s thermal analysis ......................................................... 197
15.3. Enable System Coupling at the Wall boundary condition in Forte ....................................................... 199
15.4. Enable System Coupling at the wall_internal boundary condition in Fluent ........................................ 200
15.5. Forte’s simulation results in seven coupling iteration steps, showing wall heat transfer rate as a function
of time ..................................................................................................................................................... 212
15.6. Forte’s normalized RMS change in Target value: Heatflow and Temperature ........................................ 213
16.1. Simulation domain in Forte of flow and combustion analysis ............................................................. 217
16.2. Simulation domain in Fluent for the cylinder wall's thermal analysis ................................................... 218
16.3. Enable System Coupling for the cylinder head and liner boundary conditions in Forte ........................ 220
16.4. Enable System Coupling at the cylinderhead boundary condition in Fluent ........................................ 221
16.5. Averaged heat transfer flux on the engine cylinder liner as a function of crank angle in Forte .............. 224
16.6. Forte’s normalized RMS change in Target value: Heat flow and Temperature ....................................... 225
17.1. Forte simulation domain ................................................................................................................... 228
17.2. Fluent simulation domain ................................................................................................................. 229
17.3. Enable the System Coupling node ..................................................................................................... 231
17.4. Inside of the Fluent domain ............................................................................................................... 233
17.5. Setting up Fluent coupled boundaries ............................................................................................... 234
17.6. Averaged heat transfer flux on the engine cylinder liner as a function of crank angle in Forte .............. 237
17.7. Averaged Pressure and Apparent Heat Release Rate as a function of crank angle ................................ 238
17.8. Averaged Temperature as a function of crank angle ........................................................................... 239
17.9. Temperature contour on a zx-plane at y= -0.018 m OUTSIDE the engine cylinder ................................ 240
17.10.Temperature contour on a zx-plane at y= -0.018 m INSIDE the engine cylinder .................................. 241
17.11. Heat flux and temperature distribution averaged in time on the head and liner ................................ 242
17.12. Normalized RMS Change in Target Value .......................................................................................... 243
18.1. GTI Model co-simulation panel under Simulation Controls ................................................................. 247
18.2. Species and boundaries extracted from the sample GT-SUITE project in Forte setup ........................... 248

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. xi
Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
xii of ANSYS, Inc. and its subsidiaries and affiliates.
List of Tables
4.1. Description of default Ansys Forte spray constants. ................................................................................ 33
4.2. Spray bomb simulation case set-up and test conditions. ........................................................................ 34
4.3. Injector Settings ................................................................................................................................... 37
4.4. Nozzle settings ..................................................................................................................................... 37
4.5. Injection settings. ................................................................................................................................. 38
6.1. Details of the diesel engine geometry used in this tutorial ..................................................................... 64
6.2. Details of the bowl profile in the Ansys Forte profile editor ..................................................................... 64
6.3. Nozzle settings ..................................................................................................................................... 67
6.4. Details of nozzle (Nozzle-1) and fuel injection (Injection-1) ..................................................................... 68
7.1. Details of the refinement types and settings .......................................................................................... 82
8.1. Details of the diesel engine geometry used in this tutorial ................................................................... 100
8.2. Settings for Mesh Control refinements ................................................................................................. 101
8.3. Injection settings used in this tutorial .................................................................................................. 103
8.4. Nozzle settings used in this tutorial ..................................................................................................... 103
8.5. Details of boundaries created from Copy and Paste operations ............................................................ 107
9.1. Origins of local reference frames for four cylinders ............................................................................... 122
9.2. Piston positions and strokes to begin in each cylinder .......................................................................... 126
10.1. Dimensions and operating conditions of the sample blower .............................................................. 131
10.2. Settings for Mesh Control refinements ............................................................................................... 136
11.1. Dimensions and operating conditions of the example scroll compressor ............................................ 147
11.2. Settings for Mesh Control refinements ............................................................................................... 149
12.1. Dimensions and operating conditions ............................................................................................... 159
12.2. New Reference Frame Origins in global coordinates ........................................................................... 160
12.3. Settings for Mesh Control refinements ............................................................................................... 161
13.1. Dimensions and operating conditions ............................................................................................... 175
13.2. New reference frame origins in global coordinates ............................................................................. 176
13.3. Settings for Mesh Control refinements ............................................................................................... 177
16.1. Engine specification in Forte Setup .................................................................................................... 219
17.1. Engine specification .......................................................................................................................... 230

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. xiii
Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
xiv of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 1: Introduction
The Ansys Forte CFD™ software is designed for 3-D, multi-phase engine simulations with combustion.
This manual consists of tutorials that illustrate how to use Ansys Forte CFD to address a variety of engine
designs including compression ignition and spark ignition. The tutorials generally represent realistic
situations that might be encountered by practicing scientists or engineers. They have been chosen to
demonstrate the wide range of software capabilities, and the different ways Ansys Forte can be used.

In this manual, we address major types of engine simulations: Diesel modeling with sector mesh gener-
ation is covered in Simulating a Diesel Engine Using a Sector Mesh (p. 3), modeling of Dual Fuels is
covered in Simulating Dual Fuel Combustion (p. 17), Evaporating Spray modeling is covered in Spray
Bomb Modeling (p. 31), and Spark Ignition modeling with moving valves, and automatic mesh generation
in Port-Injected Spark Ignition Engine (p. 45). Soot particle tracking is demonstrated in Tracking Soot
Particles Evolution in a Diesel Engine (p. 63). In Gasoline Direct Injection Engine Simulation (p. 77),
gasoline direct injection in an SI engine is modeled. A rotary-lobe compressor and a scroll compressor
are described in Rotary Lobe Compressor Simulation (p. 129) and Scroll Compressor Simulation (p. 145),
respectively. The Built-in FSI feature is employed in the examples in Piston Compression Pump With
Built-in FSI (p. 157) and Valved Pulse-Jet With Built-in FSI (p. 173). FSI combines with Ansys Mechanical
via System Coupling in Oscillating Plate FSI Using System Coupling (p. 185). In Two-Stroke Engine Simu-
lation (p. 97), a two-stroke marine engine with intake and exhaust ports is described. This lesson also
includes a restart file, pressure profiles, plus an .stl file, to try starting from only the geometry. A four-
stroke engine is modeled in Multi-Cylinder Four-Stroke Engine Simulation (p. 119).

System coupling with Ansys System Coupling is covered: a simple case in System Coupling CHT for T-
junction Pipe Flow (p. 195) and a single-cylinder engine CHT analysis with coupled thermal analysis from
Ansys Fluent in Conjugate Heat Transfer Simulation of a Single-Cylinder Internal Combustion En-
gine (p. 215) and a diesel engine CHT analysis appears in Generic Full-cycle Diesel Engine CHT Using
System Coupling (p. 227). System Coupling unites interfaces between Ansys Forte FSI and Ansys Mech-
anical in Oscillating Plate FSI Using System Coupling (p. 185). To learn about co-simulation with GT-SUITE,
read Links to Third-Party Software (p. 245). This includes installation and model set-up.

To access tutorials and their input files, go to the Ansys Help site. Forte tutorial manuals are available
and each tutorial lesson lists a download link for its sample files.

Note:

Before working with these tutorials, we recommend that you first review the Forte Quick
Start Guide to become familiar with the operation of the Ansys Forte interface and how to
set up, run, and visualize results.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 1
Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
2 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 2: Simulating a Diesel Engine Using a Sector
Mesh
For diesel engines, the engine combustion is often simulated from intake valve closure (IVC) to exhaust
valve opening (EVO), rather than modeling the full air intake or exhaust flow processes involving the
intake and exhaust ports, respectively. This is usually a reasonable approximation since the gas in the
cylinder at IVC is a relatively homogeneous mixture of air and exhaust gas (due to internal residual or
from exhaust-gas recycling), prior to fuel injection. Furthermore, the nozzle hole pattern of the fuel in-
jection usually gives rise to a periodic symmetry, based on the number of nozzle holes. In this tutorial
we describe the use of a sector mesh that takes advantage of such symmetry for simulating a diesel
engine operating in low-temperature-combustion (LTC) mode. The LTC mode involves an early injection
timing, relative to more conventional diesel operation.

A sector can represent the full geometry, since we can take advantage of the periodicity of the cylinder
and injector nozzle-hole pattern. For example, an eight-hole injector allows simulation using a 45° sector
(360/8). By using the symmetry of the problem in this way, the mesh created is much smaller and the
simulation therefore runs faster than it would with a 360° mesh. Such a simplification usually cannot
be made for spark-ignited engine cases due to asymmetries introduced by spark plugs, piston shape,
and possibly intake ports.

2.1. Data Provided

2.1.1. Files Used in This Tutorial


The files for this tutorial are obtained by downloading the diesel_sector_mesh.zip file here.

Unzip diesel_sector_mesh.zip to your working folder.

• sandia_bowl_profile.csv: Data describing the piston bowl shape. This profile can be imported or
manually entered in the Profile Editor for use by the Sector Mesh Generator to define the bowl
shape.

• InjectionProfile.csv: Data describing the spray injection. The data can be imported from this file
through the User Interface or manually entered once you reach the Spray node on the Workflow
tree through use of the Profile Editor.

• UserCrankAngleOutputs.csv: Table of data that contains crank angles going from -22 to +20.

• Sandia_Engine_LTC_EarlyInj.ftsim: A project file of the completed tutorial, for verification or


comparison of your progress in the tutorial set-up.

The sample files are provided as a download. You have the opportunity to select the location for the
files when you download and uncompress the sample files.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 3
Simulating a Diesel Engine Using a Sector Mesh

2.1.2. Project Comparison Utility


The Ansys Forte installation includes the cgns_util export command, which you can use to
compare the parameter settings in the project file generated at any point during your tutorial set-up
against the provided .ftsim , which has the parameter settings for the final, completed tutorial. This
command is described in the Forte User's Guide.

Briefly, you can double-check project settings by saving your project and then running the cgns_util
to export your tutorial project, and then to export the provided final version of the tutorial. Save both
versions and compare them with your favorite diff tool, such as DIFFzilla. If all the parameters are in
agreement, you have set up the project successfully. If there are differences, you can go back into
the tutorial set-up, re-read the tutorial instructions, and change the setting of interest.

2.1.3. Time Estimate


As a guideline for your own simulations, this tutorial is estimated to take 25 minutes on an Intel®
Xeon® processor E5-2690 at 2.90 GHz (8 total cores).

2.2. Generating the Sector Mesh


The Ansys Forte Sector Mesh Generator provides six different sample mesh topologies for different
piston bowl shapes. The shape of the piston bowl determines which mesh topology is most appropriate.
The overview of the process is:

1. Specify the bowl profile.

2. Enter engine parameters, such as bore, stroke, etc.

3. Select a topology for meshing.

4. Specify the control point locations for the mesh topology if necessary (for Topology 3, these are
assumed and the profile must have exactly 3 points to define them).

5. Specify the number of cells between control points for the mesh.

6. Generate the mesh and import into Ansys Forte.

Note:

All Editor panel options that are not explicitly mentioned in this tutorial should be left at
their default values. Changed values on any Editor panel do not take effect until you press
the Apply button.

2.2.1. Define the Engine Parameters


1. To begin creating a sector mesh, go to the Workflow tree and click Geometry. This opens the

Geometry icon bar. Click the Launch Sector Mesh Generator icon to open the Sector Mesh
Generator Utility (SMG).

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
4 of ANSYS, Inc. and its subsidiaries and affiliates.
Generating the Sector Mesh

2. Start by clicking the Engine Parameters node in the SMG Project tree to open an Editor panel.

3. In that panel, the first step is to import the simple bowl profile that was provided with the sample.
To do this, go to the Bowl Profile pull-down menu and select Create New... and click the Pencil
icon. This opens the Profile Editor window.

4. In the Profile Editor, click the Load CSV button (you may need to expand the window vertically
to see the button below the table) and then browse to, select, and open the sandia_bowl_pro-
file.csv file. In the dialog, select Comma as the Column Delimiter and uncheck (turn OFF) the
Read Column Titles box and click OK.

5. In the .csv file, the first column is the X-coordinate and the second column is the Z-coordinate.
For this example the "bowl" is completely flat and the wall of the bowl is vertical. For this very
simple geometry, only three coordinate points are needed to define the bowl. The profile should
look like a flat line in the Profile Editor display, as shown in Figure 2.3: Diesel sector sample mesh
as generated in the Sector Mesh Generator. (p. 8) . At the bottom of the Profile Editor panel in
the text entry field under Profile Name, enter a name for the profile, such as "Sandia Bowl Profile".
See Figure 2.1: Sector Mesh Generator Utility with New Profile and Editor panel (p. 5) . Click Save.

Figure 2.1: Sector Mesh Generator Utility with New Profile and Editor panel

6. Next, in the Sector Mesh Generator, specify the engine parameters, which are:

• Sector Angle = 45 degrees

• Bore = 13.97 cm

• Stroke = 15.24 cm

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 5
Simulating a Diesel Engine Using a Sector Mesh

• Squish = 0.56 cm

• Crevice Width = 0.167 cm

• Select and expand the Include Crevice Block option and set Crevice Height = 3.72621 cm.
Click Apply. A diagram preview of the engine geometry appears.

2.2.2. Select the Mesh Topology


Once you have a profile, the first step in the mesh workflow is to specify the desired mesh topology
that is appropriate for the imported piston-bowl shape. For this simple flat-piston-bowl geometry,
Topology 3 will be used since it is a square-shaped bowl, as shown in Figure 2.2: Template for Topology
#3 (p. 6) . For this topology there are only 3 coordinates needed to define the profile and exactly 3
are required.

Figure 2.2: Template for Topology #3

1. Now go to the Mesh Parameters node in the SMG tree. Select Topology 3 in the Topology pull-
down menu. If you would like to see the topology template selected, click the Show Topology
button. It should look like that shown in Figure 2.2: Template for Topology #3 (p. 6) .

2.2.3. Specify the Mesh-Size Parameters


Next, enter the cell counts between the different control points, as indicated in the Topology #3
diagram, and in the schematic drawing in the 3-D display window. The parameters we will enter are
as follows:

• Circumferential Cell Count = 21

• Radial Cell Count i1 = 16

• Radial Cell Count i2 = 11

• Radial Cell Count i3 = 3

• Axial Cell Count k1 = 11

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
6 of ANSYS, Inc. and its subsidiaries and affiliates.
Generating the Sector Mesh

• Axial Cell Count k4 = 21

• Axial Cell Count k5 = 11

• Smoothing Passes = 20 (default value; works well for most cases)

2.2.4. Generate the Mesh and Review


1. Once all the settings are specified, click Apply. Review the outline of the profile information in
the 3-D View panel to verify that the settings make sense.

2. Then use the Generate a Mesh icon at the top of the Mesh Parameters Editor panel in the
Sector Mesh Generator. Ansys Forte will automatically generate the sector mesh. When it is finished,
the resulting mesh will appear for your review in the 3-D View window within the Sector Mesh
Generator window, as shown in Figure 2.3: Diesel sector sample mesh as generated in the Sector

Mesh Generator. (p. 8) . (You may need to click the Refit icon.)

Note:

You can modify settings here to refine or coarsen the mesh, for example, and re-generate,
or you can open (import) the newly created mesh into the sample project into Ansys Forte.
Alternatively, you can use the Save to File button to export to a mesh file that can later
be imported into Ansys Forte.

2.2.5. Import the Mesh into the Open Ansys Forte Project
1. For this tutorial, click Mesh Parameters in the Sector Mesh Generator's Project tree, then click the

Import to Forte Project icon in the Editor panel. Now go to the Simulate window and see
the new Geometry items added to the Workflow tree. If you cannot see the mesh that you just
generated displayed in the main 3-D View panel, right-click these Geometry items for options to

make their Mesh visible. To center and resize the mesh display, click the Refit icon on the
View toolbar.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 7
Simulating a Diesel Engine Using a Sector Mesh

Figure 2.3: Diesel sector sample mesh as generated in the Sector Mesh Generator.

2. If the Sector Mesh Generator window is still open, you can close it.

2.2.6. Set Up the Case


Now that the mesh has been defined, you can set up the models and solver options using the guided
tasks in the Ansys Forte Simulate Workflow tree. In many cases, default parameters are assumed and
employed, such that no input is required. The required inputs and changes to the setup panels for
this case are described here.

In the Workflow tree, expand Models. In the following steps you will turn ON (check-mark) several
models and configure parameters for them in their Editor panels.

Note:

You can change the display properties of items in the 3-D View by selecting the items in
the Workflow tree and right-clicking then selecting options from the context menu, such
as turning their visibility ON/OFF, display of the mesh, or level of opacity.

1. Models > Chemistry: In the Workflow tree, under Models, select Chemistry. On the Chemistry icon

bar, click the Import Chemistry icon. This opens a file browser where you can navigate to
and select a chemistry set file. For this project, however, we use a pre-installed chemistry set that
comes with Ansys Forte. This is a simplified, reduced n-heptane mechanism that can be used to
represent the diesel fuel under conventional diesel-engine combustion conditions. To load this
file, browse to the System Data directory and locate the pre-installed Diesel_1comp_35sp.cks
file. The System Data directory can be accessed from this file browser by clicking the data radio
button in the upper right-hand sub-panel of the browser window. The chemistry file is a standard

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
8 of ANSYS, Inc. and its subsidiaries and affiliates.
Generating the Sector Mesh

Ansys Chemkin-Pro chemistry-set file. More information about the chemistry set and the files ref-
erenced within it can be found in the Forte User's Guide.

Note:

You can respond Yes or No to the "View chemistry set information?" prompt. A Yes
response displays the chemistry set file in a viewer.

2. Models > Transport: For this node, keep all the default settings.

3. Models > Spray Model: Since this is a direct-injection case, turn ON (check) Spray Model to display
its icon bar (action bar) in the Editor panel.

a. For the basic Spray Properties, keep Radius of Influence Model for the Droplet Collision
Model and set 0.2 cm as the Radius of Influence. The Use Vaporization Model option should
be ON (checked, its default value).

b. Create Injector: Click Spray Model in the Workflow tree. The icon bar provides two spray-injector

options: Hollow Cone or Solid Cone. For the diesel injector, click the Solid Cone icon.
In the dialog that opens, name the Spray Model as "Injector 1". This opens another icon bar
and Editor panel for the new solid-cone spray model. In the Editor panel, configure the model
parameters for the solid-cone spray model.

• Composition: Select Create New... in the Composition drop-down menu under Settings
and click the Pencil icon to open the Fuel Mixture Editor. In the Fuel Mixture panel, click
the Add Species button and select nc7h16 (that is, n-heptane) as the Species, n-Tetradecane
as the Physical Properties and 1.0 as the Mass Fraction. (Note that you must press ENTER
after entering the values in the table.)

• At the bottom of the panel, type a name such as "n-heptane". Click Save and Close the
window.

• Under the Injection Type, select Pulsed Injection and change the Parcel Specification to
Number Of Parcels and set Injected Parcel Count = 4,000.

• Set Inflow Droplet Temperature = 368.0 K.

• Set Spray Initialization to Discharge Coefficient and Angle, and Discharge Coefficient
= 0.7, and Cone Angle = –15.0 degrees.

• Keep default values for Droplet Size Distribution and, under the Solid Cone Breakup
Model Settings, the KH Model Constants, RT Model Constants, and Use Gas-Jet Model.

• Click Apply.

c. Create a Nozzle: Click the New Nozzle icon on the Spray icon bar and name the nozzle
"Nozzle 1". Nozzle 1 then appears in the Workflow tree, and the Editor panel and icon bar
transform to allow specification of the Nozzle geometry and orientation. In the Editor panel,

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 9
Simulating a Diesel Engine Using a Sector Mesh

set the Reference Frame parameters to specify the nozzle location and direction. Keep the
default Global Origin and use the following settings:

• Location > Coord. System = Cylindrical, with R = 0.15 cm, θ = 22.5 degrees, and A =
19.368 cm.

• Spray Direction > Coord. System = Spherical, θ = 104.0 degrees, and ϕ = 22.5 degrees.

• Nozzle Size > Area = 0.000302 cm2.

• Click Apply. You can see the nozzle appear at the top of the geometry. (You may wish to
make the Geometry less opaque by right-clicking the Geometry item and selecting a lower
value for Opacity, or change the color of the nozzle itself, to make the nozzle easier to see
in the interior.)

d. Create an Injection: In the Workflow tree, click Injector 1 again and click the New Injection

icon on the Injector 1 icon bar and name the injection Injection 1. The new Injection
item appears in the Workflow tree, and the Editor panel and the icon bar transform to allow
specification of the injection properties. In the Editor panel, keep the Pulsed Injection Type
(default), select Crank Angle as the Timing option and then specify the Start of injection and
Duration of injection as –22.5 and 7.75 degrees ATDC, respectively. Set the Total Injected
Mass = 0.0535 g. Click Apply.

e. Injection Profile: Click the Create new... option in the profile selection menu next to Velocity
Profile, then click the pencil icon to open a new window with the Profile Editor. The new
Injection Profile item appears in the Workflow tree; also the Editor panel and the icon bar
transform to the new Injection Profile. In the Profile Editor window, make sure all the Units
are set to None for both columns (the dimensionless data is automatically scaled within Ansys
Forte to match the mass and duration of injection) and click the Load CSV button at the
bottom of the panel (you may have to expand the panel size to see the button). Navigate to
the InjectionProfile.csv file (see Data Provided (p. 3) ). Select Comma as the Column delim-
iter and turn ON Read Column Titles and load the profile file. Alternatively, you can type in
the Injection Profile data in the table on the Editor panel or copy and paste from a spreadsheet
or 3rd-party editor. Go to Profile Name at the bottom-left of the panel and name the new
profile Injection Profile. Once the data is entered, click Save in the Profile Editor and then
click Apply in the Ansys Forte Editor panel.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
10 of ANSYS, Inc. and its subsidiaries and affiliates.
Generating the Sector Mesh

Figure 2.4: Injection Profile Parameter Settings

4. Models > Soot Model: Turn ON the Soot Model. This creates the Settings item. In the Editor panel,
accept all the defaults.

5. Boundary Conditions: Under Boundary Conditions in the Workflow tree, specify the Boundary
conditions in the Editor panels associated with each of the four boundary conditions created by
importing the mesh. By default the Wall Model for all of the wall boundaries will be set to Law
of the Wall. Leave this default setting as well as the default check box that turns ON heat transfer
to the wall.

• Boundary Conditions > Piston: Set Piston Temperature = 500.0 K. Turn ON Wall Motion with
Motion Type set to Slider Crank. The other parameters should be:

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 11
Simulating a Diesel Engine Using a Sector Mesh

• Stroke = 15.24

• Connecting Rod Length = 30.48

• Bore = 13.97 (pre-determined by the Sector Mesh Generator)

• Accept the defaults of Piston is Offset = unchecked (OFF).

• For Reference Frame, accept the default Global Origin and Direction parameters.

• Click Apply.

• Boundary Conditions > Periodicity: Set the Sector Angle = 45 degrees, and multi-select both
Periodic A and Periodic B boundaries on which to apply this boundary condition. Click Apply.

• Boundary Conditions > Head: Set Head Temperature = 470.0 K. Click Apply.

• Boundary Conditions > Liner: Set Liner Temperature = 420.0 K. Click Apply.

6. Initial Conditions > Region 1 Initialization (Main): Specify the parameters for the initial conditions
as follows:

• Composition: Select Constant and then Create New and click the Pencil icon and to launch
the Composition Editor. Set these parameters: set the Composition = Mole Fraction (not the
default Mass Fraction). Then click the Add Species button and select both o2 and n2 to add.
When both o2 and n2 are in the Species column in the Composition table, enter 0.126 for the
o2 Fraction and 0.874 for n2. Name this "Composition 1" in the text field at the bottom of the
Gas Mixture window. Click Save and close the Composition Editor.

• Temperature = 362.0 K

• Pressure = 2.215 bar (Note: This is not the default unit.)

• Turbulence: Select Constant, and then in the pull-down menu for the initial Turbulence para-
meters, select Turbulent Kinetic Energy and Length Scale as the way in which we will specify
the initial turbulence. For this option we provide an explicit value for the initial turbulent kinetic
energy, but use a length-scale approximation to determine the turbulence dissipation energy.
Use these values.

• Turbulent Kinetic Energy = 10,000cm2/sec2

• Turbulent Length Scale = 1.0 cm

• Velocity: Select Engine Swirl in the Velocity pull-down and then specify the swirl profile
parameters:

– Initial Swirl Ratio = 0.5

– Initial Swirl Profile Factor = 3.11

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
12 of ANSYS, Inc. and its subsidiaries and affiliates.
Generating the Sector Mesh

– Initialize Velocity Components Normal to Piston = ON

Note:

If you want to estimate the turbulent kinetic energy (TKE) as a fraction of the piston
speed, let the fraction be F and stroke is ms-1, the value you would enter then
would be

• Click Apply in the Region 1 Initialization Editor panel.

7. Simulation Controls: Under Simulation Limits, for the Simulation End Points, specify:

• Crank Angle Based

• Initial Crank Angle = -165.0

• Final Simulation Crank Angle = 125.0 degrees. (These two angles correspond to Intake Valve
Open and Exhaust Valve Closing, respectively.)

• RPM = 1,200.0

• Cycle Type is 4-Stroke.

• Click Apply.

8. Simulation Controls > Time Step: For the Advanced Time Step Control Options, specify:

• Rate of Strain Factor = 0.6

• Convection Factor = 0.2

• Click Apply.

9. Simulation Controls > Chemistry Solver:

• Turn ON (check) Use Dynamic Cell Clustering and accept its defaults.

• At the bottom of the panel, set Activate Chemistry to Conditionally, specifying When Tem-
perature is Reached, setting Threshold Temperature = 600.0 K. Click Apply.

10. Output Controls > Spatially Resolved: For the Spatially Resolved Output Control, specify:

• Crank Angle Output Control

• Output every = 5.0 degrees.

• Also check the box next to User Defined Crank Angle Outputs and then import the User-
CrankAngleOutputs.csv table of data using the Profile Editor that contains crank angles going
from -22 to +20, with increment 1, units of Angle and Degree, and file named User-

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 13
Simulating a Diesel Engine Using a Sector Mesh

CrankAngleOutputs. This assures that we get more resolved outputs around the spray,
without requiring the same resolution throughout the simulation.

• For Spatially Resolved Species, move these species to the Selection list: nc7h16, o2, n2, co2,
h2o, co, no, and no2. Click Apply.

11. Output Controls > Spatially Averaged:

• For the Spatially Averaged Output Control, select the Crank Angle option and specify Output
Every = 1.0 degree.

• For Spatially Averaged Species, select all and move all species to the Selection list. Click Apply.

12. Output Controls > Restart Data: In the Workflow tree, check the box for Restart Data and then
in the Restart panel, check the box that says, Write Restart File at Last Simulation Step. Uncheck
(turn OFF) any other boxes on the panel. Click Apply.

2.2.6.1. Run the Case Using Defaults


1. In the Workflow tree, click the Run Simulation node to open the run control interface.

2. Click the green arrow under Start to start the case running. The Status changes to "Running."

3. To interrupt the run, click the red button under Stop. Then the Status becomes "Stopped".

4. To start over or restart, click Start again.

5. The progress of the simulation can be monitored during a run. To monitor the averaged value

of simulation variables, click the Monitor Runs icon on the Run Simulation icon bar.

Figure 2.5: Run Simulation - Icon bar

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
14 of ANSYS, Inc. and its subsidiaries and affiliates.
Reference

A new window then appears, with a list of variables that can be plotted on the left panel in the
window (as described in the Forte User's Guide). To select one or more variables to plot, check
the boxes in front of them in the Monitor Data panel.

While the simulation jobs are running, they are writing results into the solution file (.ftind
and .ftres) and also writing to several .csv files that can be used for plotting intermediate
results. Learn more about monitoring runs in the Forte User's Guide.

6. You can save the project at this point using the File > Save command. Rename the project to
avoid overwriting the original .ftsim file.

2.2.6.2. Results
When a run is finished, the Status becomes Complete in the Run panel of the main Simulate User
Interface window. In the Editor panel, click the EnSight button to export to that application.

2.3. Reference
This case models the engine experiment from the following paper:

Singh, S., Reitz, R. D., and Musculus, M. P. B. Comparison of the characteristic time (CTC), representative
interactive flamelet (RIF), and direct integration with detailed chemistry models against optical diagnostic
data for multi-mode combustion in a heavy-duty DI diesel engine. SAE paper 2006-01-0055, 2006.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 15
Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
16 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 3: Simulating Dual Fuel Combustion
Many engine companies are now investigating the technical challenges posed by dual-fuel combustion
in engines. Dual-fuel combustion has the advantage of providing diesel-like efficiency with gasoline as
the primary fuel, providing potential increases in efficiency of 50% while reducing emissions. Typical
dual-fuel combustion designs involve the use of a small pilot injection of a liquid fuel that is relatively
easy to ignite. The pilot is injected into a lean mixture of air and a more volatile fuel that is less inclined
to autoignite, but which is port-injected to provide good mixing with the air prior to ignition. Diesel is
typically used as the pilot and it can be injected in very small amounts, sometimes referred to as micro-
pilots. Gasoline is the typical port-injected fuel for transportation applications and natural gas for power
applications. Other liquid and gaseous fuels are of interest for power applications such as landfill gas,
process gas and refinery gas. Ansys Forte allows the use of accurate fuel models to capture fuel effects
of both the ignition and flame propagation processes in a computationally efficient manner.

Ansys Forte uses the well established G-equation model for tracking flame propagation. In spark-ignited
engines, flame propagation is initiated by a spark event, using a kernel ignition model. For dual-fuel
cases, however, the injection and auto-ignition of the liquid pilot fuel serves to initiate the flame
propagation. In Ansys Forte, the simulation can consider both auto-ignition and flame-propagation
modes of combustion progress simultaneously. The Ansys Forte auto-ignition mode of initiating flame
propagation models takes advantage of a good fuel model's ability to accurately predict ignition under
auto-ignition conditions of temperature and pressure. In addition, the flame-propagation model uses
a locally calculated turbulent flame-speed that derives from fuel-specific flame-speed calculations using
detailed kinetics models. In this way, both auto-ignition and flame-propagation benefit from accurate
fuel models for low-temperature and high-temperature kinetics. The details of the autoignition-induced
flame propagation model are included in the Ansys Forte Theory Manual.

The Ansys Forte Simulation workflow allows the use of either a body-fitted mesh or an automatically
generated mesh. In this tutorial, we will focus on the use of a mesh previously generated using the
Sector Mesh Generator.

A sector can represent the full geometry because we can take advantage of the periodicity of injector
nozzle-hole pattern and the symmetry of the cylinder. For example, a six-hole injector allows simulation
using a 60° sector (360/6). By using the symmetry of the problem in this way, the mesh created is much
smaller and the simulation therefore runs faster than it would with a complete 360° mesh.

This tutorial describes the use of 82% premixed gasoline with an 18% liquid diesel pilot for ignition.
The tutorial is based upon work previously published that also looks at 78% gasoline and 85% gasoline
cases (Puduppakkam et al. 2011, as described in Reference (p. 28)).

3.1. Data Provided

3.1.1. Files Used in This Tutorial


The files for this tutorial are obtained by downloading the dualfuel_gasoline.zip file here.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 17
Simulating Dual Fuel Combustion

Unzip dualfuel_gasoline.zip to your working folder.

• itape.fmsh: This is the sector mesh file. It can only be used with body-fitted mesh calculations.

• Profile1.csv: Data describing the spray injections. These data can be entered using cut and paste
or using the Import option within the Profile Editor tool, which can be opened in the context of
the spray-injection panel on the Simulation User Interface.

• reduced-mech__RCCI-conditions_e.inp: This is the chemistry input file specifically assembled for


this tutorial, using Reaction Design’s Model Fuels Consortium II (MFC II) database to assemble a
multi-component full mechanism. This mechanism was then reduced specifically for use in the dual
fuels engine case. Details of the mechanism can be found in Puduppakkam et al. (2011). After
downloading this file, it must be pre-processed (see Pre-Processing the Chemistry Set (p. 18)).

• Dual_Fuels_82percentGasoline_BFMesh_Tutorial.ftsim: A project file of the completed tutorial,


for verification or comparison of your progress in the tutorial set-up.

The sample files are provided as a download. You have the opportunity to select the location for the
files when you download and uncompress the sample files.

3.1.2. Project Comparison Utility


The Ansys Forte installation includes the cgns_util export command, which you can use to
compare the parameter settings in the project file generated at any point during your tutorial set-up
against the provided .ftsim , which has the parameter settings for the final, completed tutorial. This
command is described in the Ansys Forte User Guide.

Briefly, you can double-check project settings by saving your project and then running the cgns_util
to export your tutorial project, and then to export the provided final version of the tutorial. Save both
versions and compare them with your favorite diff tool, such as DIFFzilla. If all the parameters are in
agreement, you have set up the project successfully. If there are differences, you can go back into
the tutorial set-up, re-read the tutorial instructions, and change the setting of interest.

3.1.3. Time Estimate


As a guideline for your own simulations, this tutorial is estimated to take approximately 1.5 hours on
an Intel® Xeon® processor E5-2690 at 2.90 GHz (8 total cores).

3.2. Pre-Processing the Chemistry Set

Note:

All Editor panel options that are not explicitly mentioned in this tutorial should be left at
their default values. Changed values on any Editor panel do not take effect until you press
the Apply button.

The mechanism has been encrypted for use only with Ansys Forte and Ansys Chemkin-Pro. The encrypted
mechanism .inp file must be pre-processed.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
18 of ANSYS, Inc. and its subsidiaries and affiliates.
Importing the Mesh

Under Utility on the ribbon or menu, select Pre-Processing. Choose a Working Directory and select
New Chemistry Set. Enter a Short Name for the chemistry set, such as DualFuels. For the Gas-Phase
Kinetics File entry, browse to the directory where you saved the .inp file and select reduced-mech__RCCI-
conditions_e.inp, and click the Open/Create button in the file browser. In the Pre-processing dialog,
click the Save As button. The .cks file with the assigned Short Name should be in the File Name entry;
click Save. In the Pre-processing dialog, click Run Pre-Processor to create the .cks file that will be im-
ported into Ansys Forte. You will use this .cks file later in the tutorial. Close the confirmation dialog
and the Pre-processing window.

3.3. Importing the Mesh


You can import many different mesh and geometry file types in Ansys Forte. In this tutorial, we will
import a sector-mesh file previously created using the Sector Mesh Generator, which is compatible with
KIVA-3V formatted files (itape file).

Select the Geometry item on the Workflow tree, then click the Import Geometry icon and select
Body Fitted Mesh. In the dialog that displays, select the downloaded itape.fmsh file described in Files
Used in This Tutorial (p. 17) and accept the defaults in the Import Options dialog. Ansys Forte will
automatically create the defined surfaces in the Boundary Conditions section of the Workflow tree based
on boundary flags contained in this file. If you wish, you can rename the geometry elements by right-
clicking on an element’s name. As shown in Figure 3.1: Geometry visualized in Simulate’s 3-D View after
import (p. 20), you can see the sector geometry in the 3-D View window in the center. The geometry
elements and Boundary Conditions are listed in the Visualization tree on the right, where you can perform
many operations such as turning the visibility of the mesh ON and OFF, increasing opacity, changing
color, etc., by right-clicking on the element.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 19
Simulating Dual Fuel Combustion

Figure 3.1: Geometry visualized in Simulate’s 3-D View after import

3.3.1. Set Up the Case


Now that the mesh has been imported, you can set up the models and solver options using the
guided tasks in the Simulation Workflow tree. In many cases, default parameters are assumed and
employed, such that no input is required. The required inputs and changes to the setup panels for
this case are described here.

1. In the Workflow tree, expand Models. In the following steps you will turn ON (check-mark) some
optional models and configure parameters for each model in its Editor panel.

2. Models > Chemistry: On the Chemistry icon bar, click the Import Chemistry icon. This opens
a file browser where you can navigate to and select a chemistry set file. For this project, however,
we use a pre-installed chemistry set that comes with Ansys Forte. This is a reduced mechanism
specifically for these dual-fuel conditions. To load this file, browse to the directory where you
saved pre-processed .cks file and locate the .cks file you created from the reduced-mech__RCCI-
conditions_e.inp file (see Pre-Processing the Chemistry Set (p. 18)). The chemistry file (.cks ) is a
standard Ansys Chemkin-Pro chemistry-set file. More information about the chemistry set and the
files referenced within it can be found in the Ansys Forte User Guide .

3. Models > Transport: For this node, keep all the default settings.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
20 of ANSYS, Inc. and its subsidiaries and affiliates.
Importing the Mesh

4. Models > Spray Model: Since this is a direct-injection case, turn ON (check) Spray Model to display
its icon bar (action bar) in the Editor panel. In the panel, keep the defaults. Leave the Use Vapor-
ization Model (default) check ON.

a. Add an Injector: The icon bar provides two spray-injector options: Hollow Cone or Solid Cone.

For the diesel injector, click the Solid Cone icon. In the dialog that opens, name the new
solid-cone injector as "Solid Injector". This opens another icon bar and Editor panel for the
new solid-cone injector. In the Editor panel, configure the model parameters for the solid-cone
injector.

• Composition: Select Create New... in the Composition drop-down menu under Settings
and click the pencil icon to open the Fuel Mixture Editor. In the Fuel Mixture panel, click
the Add Species button and select nc7h16 (that is, n-heptane) as the Species, n-Tetradecane
as the Physical Properties and enter 1.0 as the Mass Fraction. At the bottom of the panel,
you can keep the default name of "Fuel Mixture 1". Click Save and Close the window.

• Change the Parcel Specification to Number of Parcels, and the Injected Parcel Count =
3,000, its default value.

• Set Inflow Droplet Temperature = 322.0 K.

• Set Spray Initialization to Discharge Coefficient and Angle, and Discharge Coefficient
= 0.7 and Cone Angle = 10.0 degrees.

• The Droplet Size Distribution is set to Uniform Size by default.

• Under the Solid Cone Breakup Model Settings, leave the KH Model Constants, and RT
Model Constants, at their default values, except for the Size constant of RT Breakup; set
this value to 0.15.

• Use the Gas Jet Model, with the default parameters.

• Click Apply.

b. Create a Nozzle: While Solid Injector is selected in the Workflow tree, click the New Nozzle

icon on the icon bar and name the nozzle Nozzle. "Nozzle" then appears in the Workflow
tree, and the Editor panel and icon bar transform to allow specification of the Nozzle geometry
and orientation. Set the parameters in the Editor panel to:

• Reference Frame: Select Global Origin from the drop-down menu. For Coord. System =
Cylindrical, with R = 0.097 cm, Θ= 30.0 degrees, and A = 18.44 cm.

• For Spray Direction, select Spherical from the drop-down menu and then Θ = 107.5 degrees
and φ = 30.0 degrees.

• For Nozzle Size, select Area and set Nozzle Area = 0.000491 cm2.

• Click Apply. You can see the nozzle appear at the top of the geometry. (You may want to
make the Geometry non-opaque or change the color of the nozzle itself by right-clicking in
the Workflow tree and selecting Color or Opacity to make the nozzle easier to see in the
interior.)

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 21
Simulating Dual Fuel Combustion

Figure 3.2: Spray cone shown after nozzle specification.

c. Add an Injection: In the Workflow tree, click Solid Injector again and click the New Injection

icon on the Solid Injector icon bar and name the injection "Injection 1". The new Injection
item appears in the Workflow tree, and the Editor panel and the icon bar transform to allow
specification of the injection properties. In the Editor panel, select Crank Angle as the Timing
option and then specify the Start of injection and Duration of injection as -67.0 and 5.46
degrees, respectively. Accept the default of Pulsed Injection Type. Set the Total Injected
Mass = 0.015042 g.

d. Injection Profile: Click the Create new... option in the profile selection menu next to Velocity
Profile, then click the pencil icon to open the Profile Editor. The new Injection Profile item
appears in the Workflow tree, and the Editor panel and the icon bar transform to the new In-
jection Profile. In the Editor panel, make sure all the Units are set to None for both columns
(the dimensionless data is automatically scaled within Ansys Forte to match the mass and
duration of injection) and click the Load CSV button at the bottom of the panel (you may
have to expand the panel size to see the button). Then navigate to the Profile1.csv file (see
Files Used in This Tutorial (p. 17)). In the new Import CSV Data dialog that opens, select Comma
as the Column delimiter and turn OFF Read Column Titles and load the profile file. Alternat-
ively, you can type in the Injection Profile data in the table on the Editor panel or copy and
paste from a spreadsheet or 3rd-party editor. Once the data are entered, go to Profile Name
at the bottom-left of the panel and name the new profile "Profile1" and click Save in the
Profile Editor and then click Apply in the Editor panel.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
22 of ANSYS, Inc. and its subsidiaries and affiliates.
Importing the Mesh

Figure 3.3: Injection profile parameter settings

5. Add a second injection. For the second injection, the start of injection is -32.7 degrees ATDC and
the duration of injection is 2.73 CA degrees. Use the same profile as above for this injection by
selecting it from the pull-down menu next to Injection Profile. Enter the Total Injected Mass as
0.007521 g.

6. Boundary Conditions: Under Boundary Conditions in the Workflow tree, specify the boundary
conditions in the Editor panels associated with each of the four boundary conditions created by
importing the mesh. By default the Wall Model for all of the wall boundaries will be set to Law
of the Wall. Leave this default setting as well as the default check box that turns ON heat transfer
to the wall.

• Boundary Conditions > Piston: Set Piston Temperature = 500.0 K. Turn ON Wall Motion with
Motion Type set to Slider Crank.

– Stroke = 16.51 cm

– Connecting Rod Length = 26.16 cm

– Bore = 13.716 cm (this is pre-determined from the mesh)

– Accept the defaults of Piston is Offset = unchecked (OFF).

– For Reference Frame, accept the default Global Origin and Direction parameters.

– For Direction, accept the defaults of X and Y = 0.0 and Z = 1.0 for the direction of piston
motion.

– Click Apply.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 23
Simulating Dual Fuel Combustion

• Boundary Conditions > Periodicity: Keep the default Sector Angle = 60 degrees. The periodic
boundaries, Periodic A and Periodic B, for this boundary condition are automatically selected,
based on the boundary flags contained in the imported mesh.

• Boundary Conditions > Head: Set Head Temperature = 500.0 K. Click Apply.

• Boundary Conditions > Liner: Set Liner Temperature = 430.0 K. Click Apply.

7. Initial Conditions > Region 1 Initialization (Main): Specify the parameters for the initial conditions
as follows:

• In the Composition drop-down menu, select Create New... and click the pencil icon to
open the Gas Mixture Editor. In the Gas Mixture panel, change the Composition setting to Mole
Fraction (not the default Mass Fraction). Then click the Add Species button and select the
species in the list indicated in Figure 3.4: Gas Mixture Editor (p. 25). Once all the species are
entered, provide the mole fraction values as indicated in Figure 3.4: Gas Mixture Editor (p. 25).
Enter a name for the Mixture if you desire or leave the default as Mixture 1 in the bottom left
text box; click Save, then Close the window.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
24 of ANSYS, Inc. and its subsidiaries and affiliates.
Importing the Mesh

Figure 3.4: Gas Mixture Editor

• Temperature = 391.0 K

• Pressure = 3.34 bar (note this is not the default unit, so you need to use the pull-down next
to the text box to select the correct units option)

• In the pull-down menu for the initial Turbulence parameters, select Turbulence Intensity and
Length Scale as the way in which we will specify the initial turbulence. For this option we leave
the settings with the default values:

• Turbulence Intensity Fraction = 0.1 (default value).

• Turbulent Length Scale = 1.0 cm (default value).

• Velocity is set to Constant.

• Select Engine Swirl in the Velocity pull-down and then specify the swirl profile parameters:

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 25
Simulating Dual Fuel Combustion

– Initial Swirl Ratio = -0.7

– Initial Swirl Profile Factor = 3.11

– Initialize Velocity Components Normal to Piston = ON (checked)

– Piston Boundary: Move Piston to the Selected list.

• Also keep other options at their defaults.

• Click Apply in the Region 1 Initialization Editor panel.

8. Simulation Controls: Under Simulation Limits, for the Simulation End Points, specify:

• Crank Angle Based

• Initial Crank Angle = -95.0

• RPM = 1,300.0

• Cycle Type is 4-Stroke.

• Final Simulation Crank Angle = 130.0 degrees. (These two angles correspond to Intake Valve
Open and Exhaust Valve Closing, respectively.) Click Apply.

9. Simulation Controls > Time Step:

• Maximum Time Step Option = Constant and enter the value 1.0E-5 sec. (This value is selected
so the tutorial example will run fast; the default value is 5.0E-6.)

• Leave other settings at their defaults. Click Apply.

10. Simulation Controls > Chemistry Solver:

• Accept the default state of ON (check) for Use Dynamic Cell Clustering and accept its defaults.

• Set the Activate Chemistry drop-down menu to Conditionally, specifying During Crank Angle
Interval, with Starting and Ending values of -45.0 and 40.0, respectively. Near the bottom of
the panel, turn OFF (uncheck) When temperature is Reached. Click Apply.

Note:

More details about the chemistry solver options, such as Dynamic Cell Clustering
and Dynamic Adaptive Chemistry, are available in the Ansys Forte User Guide.

11. Output Controls > Spatially Resolved: For the Spatially Resolved Output Control, specify:

• Crank Angle Output Control.

• Output every = 5.0 degrees.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
26 of ANSYS, Inc. and its subsidiaries and affiliates.
Importing the Mesh

• For Spatially Resolved Species, move all the fuel-related and emissions species, such as these,
to the Selection list: nc7h16, o2, co2, h2o, co, no, ic8h18, c6h12-1, c6h5ch3 and ic6h14. Click
Apply.

12. Output Controls > Spatially Averaged:

• For the Spatially Averaged Output Control, select the Crank Angle option and specify Output
Every = 1.0 degree.

• For Spatially Averaged Species, select o2, co2, co, no, nc7h16, ic8h18, c6h12-1, c6h5ch3,
ic6h14, n2, h20, and move all species to the Selection list. Click Apply.

13. Output Controls > Restart Data: In the Workflow tree, check the box for Restart Data and then
in the Restart panel, check the box that says, Write Restart File at Last Simulation Step. Uncheck
(turn OFF) any other boxes on the panel. Click Apply.

3.3.1.1. Save the Project


1. Under File on the ribbon or menu, use the Save As command to rename and save this project.
The project must be saved before running.

3.3.1.2. Run the Case Using Defaults


1. In the Workflow tree, click the Run Simulation node to open the run control interface.

2. Click the green arrow "play" button under Start/Save to start the case running. The Status
changes to "Running."

3. To interrupt the run, click the red button under Stop. Then the Status becomes "Stopped".

4. To start over or restart, first select the file from which you want to start, by clicking on the
Browse button in the Run row. Once an appropriate ftrst file is selected, click the green Start
again.

5. The progress of the simulation can be monitored during a run. To monitor the averaged value

of simulation variables, click the Monitor Runs icon in the Run Simulation icon bar. A
new window will appear, with a list of variables that can be plotted on the left panel in the
window. To select one or more variables to plot, check the boxes in front of them in the Monitor
Data panel. These plots are shown in Figure 3.4: Gas Mixture Editor (p. 25) to Figure 3.7: CO and
UHC emissions vs. crank angle (p. 30).

Note:

To change the units of the plotted variables, go back to the Simulation Interface, Edit
on the ribbon or menu and choose Edit Preferences. In the Preferences panel, select
the units desired. The next time the Monitor window updates the plots, it will automat-
ically reflect these updated unit preferences.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 27
Simulating Dual Fuel Combustion

3.3.1.3. Visualizing the Results


1. When a run is finished, the Status becomes Complete in the Run panel of the main Simulate
User Interface window. In the Editor panel, we choose Ansys EnSight to post-process the results.

2. We are interested in creating some average line plots for Pressure, Apparent Heat Release Rate
(Apparent HRR) and emissions such as CO vs. Crank Angle. The EnSight view when you read in
the Nominal.ftind file is shown in Figure 3.5: Simulation result in EnSight (p. 28). The
thermo.csv file is used to create line plots for Pressure, Apparent HRR, UHC, and CO. These
figures are shown as Figure 3.6: Pressure and apparent heat release rate vs. crank angle (p. 29)
and Figure 3.7: CO and UHC emissions vs. crank angle (p. 30).

3.4. Reference
This case models the engine experiment from the following paper:

Karthik V. Puduppakkam, Long Liang, Chitralkumar V. Naik, Ellen Meeks, Sage L. Kokjohn and Rolf D.
Reitz, "Use of Detailed Kinetics and Advanced Chemistry-Solution Techniques in CFD to Investigate Dual-
Fuel Engine Concepts", SAE International Journal of Engines, Vol. 4, No. 1, pp. 1127-1149, 2011.

Figure 3.5: Simulation result in EnSight

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
28 of ANSYS, Inc. and its subsidiaries and affiliates.
Reference

Figure 3.6: Pressure and apparent heat release rate vs. crank angle

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 29
Simulating Dual Fuel Combustion

Figure 3.7: CO and UHC emissions vs. crank angle

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
30 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 4: Spray Bomb Modeling
Accurately capturing fuel injection, spray breakup and spray vaporization are important aspects of engine-
design simulations for direct-injection engines. However, it is difficult to isolate the effects of spray be-
havior in a full engine simulation involving combustion, moving boundaries and complex turbulent
flow. Spray bomb experiments are an excellent method for isolating the spray behavior prior to engine
design and analysis. A spray bomb is a quiescent environment where liquid is injected without any
moving boundaries, such that the spray characteristics can be examined in detail. Any engine simulation
involving liquid injection must account for the key aspects of atomization such as liquid-jet breakup,
droplet formation, secondary breakup, droplet collisions, droplet coalescence and vaporization. This
tutorial describes how to use Ansys Forte in spray bomb simulations that account for all of these phe-
nomena.

4.1. Data Provided

4.1.1. Files Used in This Tutorial


The files for this tutorial are obtained by downloading the spray_chamber.zip file here.

Unzip spray_chamber.zip to your working folder.

• Evaporating_Spray_Tutorial.fmsh: This is an Ansys Forte body-fitted mesh file. This file will provide
the spray bomb geometry for this Automatic Mesh Generator (AMG) tutorial.

• Evaporating_Spray_Tutorial.ftsim: A project file of the completed tutorial, for verification or


comparison of your progress in the tutorial set-up.

The tutorial sample files are provided as a download. You have the opportunity to select the location
for the files when you download and unzip or untar the sample files.

4.1.2. Project Comparison Utility


The Ansys Forte installation includes the cgns_util export command, which you can use to
compare the parameter settings in the project file generated at any point during your tutorial set-up
against the provided .ftsim , which has the parameter settings for the final, completed tutorial. This
command is described in the Ansys Forte User Guide.

Briefly, you can double-check project settings by saving your project and then running the cgns_util
to export your tutorial project, and then to export the provided final version of the tutorial. Save both
versions and compare them with your preferred diff tool, such as DIFFzilla. If all the parameters are
in agreement, you have set up the project successfully. If there are differences, you can go back into
the tutorial set-up, re-read the tutorial instructions, and change the setting of interest.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 31
Spray Bomb Modeling

4.1.3. Time Estimate


As a guideline for your own simulations, this tutorial is estimated to take 2.6 hours on an Intel® Xeon®
processor E5-2690 at 2.90 GHz (8 cores).

4.2. Modeling Solid-Cone Spray Injection


For solid-cone spray injections, Ansys Forte utilizes the Kelvin-Helmholtz/Rayleigh-Taylor (KH-RT) spray-
breakup models that have been proven to be accurate over a wide range of direct-injection conditions.
Together with the gas-jet model, which provides accurate gas-jet entrainment calculations without re-
quiring mesh refinement around the spray, the Ansys Forte spray model provides results that are insens-
itive to mesh resolution or simulation time step. These spray model components are described in detail
in the Ansys Forte Theory Manual.

In many cases, the starting point for a spray injection specification is an estimate of the nozzle discharge
coefficient and spray-cone angle. Ansys Forte's nozzle-flow model can optionally provide initial conditions
for the spray model by including detailed calculation of the nozzle-flow including cavitation effects.

The droplet breakup model consists of two key models. The KH breakup model is applied within the
breakup length (see Figure 4.1: KH-RT spray model definitions. (p. 32)). The RT model is then used further
downstream with the KH model to predict secondary breakup. The unsteady gas-jet model effectively
removes mesh dependency by calculating the gas velocity in the spray region using an analytical
model.

Figure 4.1: KH-RT spray model definitions.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
32 of ANSYS, Inc. and its subsidiaries and affiliates.
Modeling Solid-Cone Spray Injection

Ansys Forte allows you to set several constants that control the initial breakup in the KH region and
the secondary breakup in the RT region. Defaults for these constants are provided in Ansys Forte that
have been determined after extensive validation with experimental data and should be used initially.
However, there could be some cases where an adjustment in these constants would prove useful. The
following table describes the specific spray constant name, its default value, a suggested range of ad-
justment and what the constant controls.

Table 4.1: Description of default Ansys Forte spray constants.

Constant Name Default Adjustment Description


Value Range
Size Constant of KH 1.0 0.5 - 2.0 Affects radius of new
Breakup droplets formed from
initial breakup.
Time Constant of KH 40 10 - 80 Most important
Breakup constant for controlling
spray penetration
length.
Critical Mass Fraction 0.03 N/A Determines fraction at
for New Droplet which new droplets can
Generation leave their parent
parcel.
Size Constant of RT 0.15 0.1 - 0.3 Affects the radius of
Breakup the secondary droplets
arising from the
catastrophic breakup of
the parent droplet
Time Constant of RT 1.0 0.5 - 2.0 Affects the
Breakup characteristic time
required to break the
parent droplet
RT Distance Constant 1.9 1.5 - 3.0 Affects the initial
breakup length when
the RT model is
initiated

4.2.1. Spray Bomb

4.2.1.1. Problem Description


This tutorial considers a cylindrical chamber with no moving walls and quiescent gas (see
Table 4.2: Spray bomb simulation case set-up and test conditions. (p. 34)). In this case, pure n-heptane
is injected into the chamber. This single component, fuel is injected from a single solid-cone injector,
where the nozzle hole is located on the wall and the injection is directed towards the center of the
chamber. The initial gas in the chamber is a blend of N2, CO2, and H2O, such that the mixture is
non-reacting. As the intention of this example is to represent diesel-fuel injection, we use the
physical properties of n-tetradecane to represent the fuel. This combination of chemistry model
being represented by one fuel surrogate (in this case, n-heptane) while the physical model is rep-
resented by another fuel surrogate (in this case, n-tetradecane) is an approach often taken in sim-

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 33
Spray Bomb Modeling

ulating diesel engine combustion. In this way, the spray-bomb simulation comparisons to experiment
can be used to verify the behavior of the surrogate model approach as it will be used in a combustion
simulation. For this case, a square injection profile is used. Chemistry calculations are effectively
stopped by setting the chemistry solver to begin at a temperature that will not be reached during
the simulation.

This tutorial shows the use of the Automatic Mesh Generator. We import a previously generated
mesh to provide the spray bomb geometry and select the option upon import to only import the
geometry surfaces for use with Automatic Mesh Generation. Mesh sizes of 1 mm, 2 mm and 3 mm
are then used to test mesh dependency. Results for penetration length of the three different mesh
sizes are compared against experimental data from SAE Technical Paper 960034 by J.D. Naber and
D.L. Siebers [1 (p. 44)].

Note:

All Editor panel options that are not explicitly mentioned in this tutorial should be left
at their default values. Changed values on any Editor panel do not take effect until you
press the Apply button.

Table 4.2: Spray bomb simulation case set-up and test conditions.

Parameter Evaporating Spray Case


Mesh Disc-shaped constant-volume combustion chamber with 114.3 mm
diameter and 28.6 mm thickness

Fuel Type Diesel DF2 (Experiment)Tetradecane (Surrogate)


Fuel 436 K
Temperature
Injection 1,370 bar
Pressure
Injection 4 ms
Duration

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
34 of ANSYS, Inc. and its subsidiaries and affiliates.
Modeling Solid-Cone Spray Injection

Parameter Evaporating Spray Case


Nozzle 257 μm
Diameter
Chamber Pa= 40; 83; and 170 bar
Conditions
Ta= 1,000 K

4.2.1.2. Mesh Setup


In this tutorial, we will import an existing structured mesh with a size of 2 mm. Mesh sizes of 1 mm,
2 mm, and 3 mm will be investigated to demonstrate mesh independence of the solution. The
spray bomb geometry and test conditions are shown in Table 4.2: Spray bomb simulation case set-
up and test conditions. (p. 34).

• Import the mesh using Geometry on the Workflow tree. Click the Import Geometry icon.
In the dialog, pull down and select Body Fitted mesh, click OK and then select Only import the
geometry surfaces for use with Automatic Mesh Generation. In the dialog that opens, navigate
to the Evaporating_Spray_Tutorial.fmsh file in the location where you saved the downloaded
sample files.

• The imported file displays in the 3-D View area, but may not be ideally zoomed or centered. Click

the Refit icon to center and resize the mesh.

• Mesh Controls: Under Mesh Controls, we need to set the Material Point to a location that will
always be "inside" the boundaries and should be located at least one unit cell length away from
any boundaries. To see the coordinate values, select Geometry > Reference Frames > Solid.1 in
the left-hand Workflow tree. The Editor panel below will show the min/max coordinates. From
here we can see that the minimum and maximum coordinate values are –5.714 and 5.714 cm
for x- and y-axes, and 0 and 2.86 cm for the z-axis. So, return to Mesh Controls > Material Point,
and in the Reference Frame = Global Origin options, set x=1 cm, y=2 cm and z=1 cm, and
click Apply. Once it is set, you can see the Material Point in the 3-D View panel (as a small cube)
and it can be made visible/invisible by right-clicking in the Workflow tree and selecting Visibility
or Opacity, under Mesh Controls. (You may need to adjust the opacity of the Solid.1 Geometry
item as well.)

• In the Workflow tree, set the Global Mesh Size to 0.2 cm. This will set the default size of cells
to be 2 mm long on each side of the cell cube. Click Apply.

• Note:

This is within the recommended mesh range; a coarser setting of 0.3 cm could
be used for tutorial purposes to produce a shorter runtime.

• Click the Mesh Controls node in the Workflow tree. In the icon bar, click the New Surface Refine-

ment Depth icon and name the new control "Surfacedepth". (This indicates that along the
selected surface, cells of this smaller size will be used.) A new SurfaceDepth item appears under

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 35
Spray Bomb Modeling

Mesh Controls in the Workflow tree. In the panel that appears, select the Solid.1 surface from
the Location list, set the mesh Size as Fraction of Global Size to 1/2 with an extension of 1
layer. Click Apply.

• Click the Solution Adaptive Meshing icon on the Mesh Controls Editor panel and name
the new control SAM-Velocity. Set the Quantity Type = Gradient of Solution Field and Solution
Variables = VelocityMagnitude. Bounds = Statistical and Sigma Threshold = 0.5. Set the Size
as Fraction of Global Size = 1/4. The refinement is Active = Always, and the Location option
is Entire Domain. Click Apply.

4.2.1.3. Models Setup


Chemistry: After the mesh, the models are chosen. Chemistry is set with Models > Chemistry. Click

the Import Chemistry icon and import Diesel_1comp_35sp.cks from the installed Ansys Forte
data directory. An option is provided to view the chemistry details such as chemistry source, pre-
processing log, gas phase input, gas phase output, thermodynamic input, transport input and
transport output. Note that in this case, the chemistry is effectively turned off, so the main reason
to import the chemistry set is to obtain the chemical species nc7h16 that will represent the fuel
and n2 for the gas in the chamber.

Transport: The default RNG k-Ε model turbulence settings are used in this tutorial. Those are spe-
cified in the Editor panel for Models > Transport > Turbulence. The default fluid properties are also
used, which are at Models > Transport.

Spray Model: To set up the spray model, turn on (check-mark) Models > Spray Model. First, choose
the global Spray Properties, which include using the Adaptive Collision Mesh Model. Also check
Use Vaporization Model to include the effects of vaporization, since this case is into a relatively
hot gas, where vaporization will occur.

• Create Injector: Add a solid-cone spray injector through the Models > Spray Model panel, by

clicking on the Solid Cone Spray Injector icon. Name the injector (Injector) and configure
the injector and its fuel. In the Injector Editor panel, select Create New... in the Composition
drop-down menu and click the pencil icon to open the Fuel Mixture Editor. In the Fuel Mixture
panel, click the Add Species button and select nc7h16 (that is, n-heptane) as the Species, n-
Tetradecane as the Physical Properties and 1.0 as the Mass Fraction. (Note that you must
press ENTER after entering the values in the table.) At the bottom of the panel, type a name such
as "Fuel mixture 1". Click Save and Close the window.

• Using an Injection Type of Pulsed Injection, change the Parcel Specification to Number of
Parcels, then set Injected Parcel Count = 5,000.

• Set Inflow Droplet Temperature = 436.0 K.

• Set Spray Initialization to Discharge Coefficient and Angle, and Discharge Coefficient = 0.78,
and Cone Angle = 19.04 degrees.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
36 of ANSYS, Inc. and its subsidiaries and affiliates.
Modeling Solid-Cone Spray Injection

• Keep default values for Droplet Size Distribution and, under the Solid Cone Breakup Model
Settings, for the KH Model Constants, RT Model Constants, and Use Gas-Jet Model. Click
Apply.

Next we will add the nozzle and specify the injection parameters under this new injector (see
Table 4.4: Nozzle settings (p. 37) and Table 4.5: Injection settings. (p. 38)).

Table 4.3: Injector Settings

Parameter Setting
Injected Spray Parcels 5,000
Inflow Droplet Temperature 436.0 K
Spray Initialization Discharge Coefficient and
Angle
Discharge Coefficient 0.78
Cone Angle 19.04

• Create a Nozzle: Click the New Nozzle icon on the Injector icon bar and name the nozzle
"Nozzle". The Nozzle item then appears in the Workflow tree, and the Editor panel and icon bar
transform to allow specification of the Nozzle geometry and orientation. Set the parameters in
the Editor panel to use the Reference Frame parameters to specify the nozzle location and dir-
ection. Keep the Global Origin and use the following settings:

Table 4.4: Nozzle settings

Parameter Setting
Location
Coordinate System Cylindrical
R 5.7 cm
θ .0 degrees
A 1.43 cm
Spray Direction
Coord. System Spherical
θ 90.0 degrees
ϕ 0.0 degrees
Nozzle Size
Nozzle Diameter 257 microns

• If you cannot see the nozzle in the 3-D View, you may need to adjust the opacity or color choice
of the nozzle or the boundary conditions that may be blocking your view of it. Select the desired
item in the Visualization tree (on the right side) and right-click to turn ON/OFF visualization,
change opacity levels, or change the color assigned to that item.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 37
Spray Bomb Modeling

• Create an Injection: In the Workflow tree, click Injector again and click the New Injection
icon on the Injector icon bar and name the injection Injection. The new Injection item appears
in the Workflow tree, and the Editor panel and the icon bar transform to allow specification of
the injection properties. In the Editor panel, use the following settings:

Table 4.5: Injection settings.

Parameter Setting
Timing Time
Start 0.0 sec
Duration 0.004 sec
Velocity Profile Square Profile
Total Injected Mass 0.058 g

The resulting injection profile can be viewed by clicking the pencil icon next to the Velocity
Profile entry box. In this window, you can also import a new velocity profile for the injection from
a .csv file or make edits directly in the table (see Figure 4.2: View injection profile (p. 38)).

Figure 4.2: View injection profile

4.2.1.3.1. Boundary Conditions


Create a new boundary by right-clicking on the Boundary Conditions Workflow tree, and Add a
Wall. Now, under the Boundary Conditions Workflow tree node, a new entry called Wall will be
found. For this Wall boundary condition, select the No Slip model for handling the boundary

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
38 of ANSYS, Inc. and its subsidiaries and affiliates.
Modeling Solid-Cone Spray Injection

layer near the wall and set the Temperature = Constant and Temperature = 451 K. Keep Heat
Transfer checked (ON).

4.2.1.3.2. Initial Conditions


Initial conditions will be set only for the Default Initialization region. Specify the parameters for
the initial conditions as follows:

• Composition: Use the Composition Editor to set these parameters: In the Gas Mixture Editor,
keep the Composition = Molar Fraction. Then click the Add Species button and select h2o,
co2 and n2 to add. When these 3 species are in the Species column in the Composition table,
enter 0.9033 for the n2 Fraction, 0.0611 for co2 and 0.0356 for h2o. Name this Gas Mixture
1 in the text field at the bottom of the Gas Mixture window. Click Save and close that window.

• Temperature = 1,000.0 K.

• Pressure = 83.04 atm.

• In the pull-down menu for the Turbulence parameters, select Turbulence Intensity and
Length Scale as the way in which we will specify the initial turbulence. For this option we
provide an explicit value for the initial turbulence intensity, but use a length-scale approximation
to determine the turbulence dissipation energy. Use these values:

– Turbulence Intensity Fraction = 0.0.

– Turbulent Length Scale = 1.0 cm.

• Select Velocity Components in the Velocity pull-down and then specify the velocity compon-
ents, using the default Reference Frame with Global Origin and Cartesian coordinates set
at 0.0, 0.0, 0.0.

• Click Apply in this panel.

4.2.1.3.3. Parameter Study on Pressure

To create a parameter study on pressure, click the Parameter Study icon next to the Pressure
setting (at 83.04 atm). In the resulting dialog, change the specification to From End Points, set
these values: First run value (A) 40.0, Last run value (B) 170.0, Number of runs (n) 2. Click
OK.

Close or minimize the Parameter Studies window. Note that the Pressure label in the Editor
panel is now blue to indicate that it is associated with a parameter study.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 39
Spray Bomb Modeling

Figure 4.3: Spray - Parameter study on pressure

When this simulation runs, a run will occur at each of these pressure settings. See Results (p. 42)
to see how the results vary with the changes in pressure.

4.2.1.3.4. Simulation Controls


Simulation controls allow you to define the simulation limits, time step, chemistry solver and
transport terms.

Simulation Limits: Select the Simulation Controls node and then use Simulation Limits to select
a Time-based simulation with a Max. Simulation Time of 0.004 sec.

Time Step: Use Simulation Controls > Time Step to set the Initial Simulation Time Step to 5.0E-
7 sec and use a Constant Max. Time Step Option of 5.0E-6 sec. Advanced Time Step Control
Options can be left at the default settings.

4.2.1.3.5. Chemistry Solver


Use Simulation Controls > Chemistry Solver so Activate Chemistry is Always Off (at the bottom
of the panel) to prevent the chemistry from being solved in this non-reacting case.

4.2.1.3.6. Transport Terms


The transport tolerances and maximum number of iterations are left at their default values.

4.2.1.4. Output Controls


Output controls determine what data are stored for viewing during the simulation and for creating
plots, graphs and animations.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
40 of ANSYS, Inc. and its subsidiaries and affiliates.
Modeling Solid-Cone Spray Injection

Spatially Resolved: Set the Temporal Output Control reporting every 0.0004 sec. To create the
Spatially Resolved Species list, be sure to move nc7h16 to the Selection list. Also move n2, co2,
and h2o. Under Restart, clear (uncheck) the option Write Restart File at Last Simulation Step.
Click Apply.

Spatially Averaged: Set the Temporal Output Control reporting every 4.0E-5 sec. To create the
Spatially Averaged Species list, be sure to move nc7h16 to the Selection list. Also move co2, o2,
and n2. Click Apply.

4.2.1.5. Save Project


Save your project with the Save command under File on the ribbon or menu, but choose a new
name for the project to avoid overwriting the original .ftsim file. The saving step includes validation
of the project.

4.2.1.6. Run Settings


The settings here depend on the system and environment for your simulations. The default for the
Run Settings panel is to have nothing selected.

Run Options: Under Job Script Options, change Default Run Type to Parallel and change the
default MPI Arguments to 8. (If you do not have MPI installed and configured, keep the default of
a serial run.)

4.2.1.7. Run Simulation


All that is needed to be done now is to select Run Simulation and click on Start once Ansys Forte
has given you the green light and reports that it is ready for the simulation. You can monitor the
results by clicking on the Monitor icon. In the Monitor window that opens, you can select which
result you want to monitor for the spray such as Mass Injected and Penetration Length.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 41
Spray Bomb Modeling

Figure 4.4: Monitor Ansys Forte run

4.2.1.8. Results
This spray bomb case was run with three mesh sizes (1 mm, 2 mm and 3 mm) and then compared
against experimental data from Naber and Siebers 1 (p. 44). The experimental data provided con-
sisted of penetration depth for the test spray. The experimental data show a penetration depth of
22.6 mm as is shown in Figure 4.5: Mesh sensitivity on spray penetration depth (p. 43). The simulation
results show good agreement with the spray penetration depth as is also seen in Figure 4.5: Mesh
sensitivity on spray penetration depth (p. 43). It is important to note that Ansys Forte defines the
spray penetration depth that captures 95% of the liquid. These results also show that the spray is
relatively insensitive to the mesh for the three mesh sizes considered. The 1 mm and 2 mm results
lie on top of each other. The diversion of the results for 3 mm, suggest that size is a little too large
to resolve the fluid mechanics overall and so for these types of cases we would recommend the 2
mm resolution. However, even the coarse mesh results are not far from the resolved-mesh solution,
which is an important feature of the Ansys Forte simulations. Another interesting feature is to look
at the how the droplet mass and vapor mass evolve during the simulation time. These results are
shown in Figure 4.6: Mesh sensitivity on droplet mass and vapor mass (p. 43), where the mesh is
also shown to be insensitive to the mesh size, even with the coarsest mesh. Visualization of the
spray results are shown in Figure 4.7: Spray bomb penetration for 2 mm mesh. (p. 44) at time =
0.0015 sec.

The results of the automated parameter study on ambient pressure in the spray bomb are shown
as Figure 4.8: Results of automated parameter study on ambient pressure in the spray bomb. (p. 44).
The spray penetration is decreased as the ambient pressure increases due to the increased chamber
gas density and drag.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
42 of ANSYS, Inc. and its subsidiaries and affiliates.
Modeling Solid-Cone Spray Injection

Figure 4.5: Mesh sensitivity on spray penetration depth

Figure 4.6: Mesh sensitivity on droplet mass and vapor mass

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 43
Spray Bomb Modeling

Figure 4.7: Spray bomb penetration for 2 mm mesh.

Figure 4.8: Results of automated parameter study on ambient pressure in the spray bomb.

4.3. Reference
This tutorial is based on the work in this published paper:

1. Naber, J. D. and Siebers, D. L., "Effects of Gas Density and Vaporization on Penetration and Dispersion
of Diesel Sprays", SAE Technical Paper 9p60034, 1996.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
44 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 5: Port-Injected Spark Ignition Engine
This tutorial describes how to use Ansys Forte CFD to simulate combustion in a port-injected spark ig-
nition internal combustion engine with moving valves. Engine geometry is imported and Ansys Forte's
automatic mesh generation is used to create the computational mesh on-the-fly during the simulation.

5.1. Data Provided

5.1.1. Files Used in This Tutorial


The files for this tutorial are obtained by downloading the siengine_pfi_automesh.zip file
here.

Unzip siengine_pfi_automesh.zip to your working folder.

• SIEngine_Sample.stl : This is the geometry file.

• ExhaustLift.csv and IntakeLift.csv: Two files of data describing the intake and exhaust valve lifts.
Profiles such as these can be imported (from .csv files) or manually entered in the Profile Editor.

• Spatial_Output_CAs.csv : Specifies when spatially resolved data such as velocity, temperature,


species concentrations, etc., will be output.

• SIEngine_PortInjected_AMG_Tutorial.ftsim: A project file of the completed tutorial, for verification


or comparison of your progress in the tutorial set-up.

The sample files are provided as a download. You have the opportunity to select the location for the
files when you download and uncompress the sample files.

5.1.2. Project Comparison Utility


The Ansys Forte installation includes the cgns_util export command, which you can use to
compare the parameter settings in the project file generated at any point during your tutorial set-up
against the provided .ftsim , which has the parameter settings for the final, completed tutorial. This
command is described in the Ansys Forte User Guide.

Briefly, you can double-check project settings by saving your project and then running the cgns_util
to export your tutorial project, and then to export the provided final version of the tutorial. Save both
versions and compare them with your favorite diff tool, such as DIFFzilla. If all the parameters are in
agreement, you have set up the project successfully. If there are differences, you can go back into
the tutorial set-up, re-read the tutorial instructions, and change the setting of interest.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 45
Port-Injected Spark Ignition Engine

5.1.3. Time Estimate


As a guideline for your own simulations, this tutorial is estimated to take approximately 6.3 hours
using the Intel® Xeon® processor E5-2690 at 2.60 GHz (56 total cores).

5.2. Port-Injected Spark Ignition Engine

5.2.1. Problem Description


The port-fuel injection is approximated by a premixed, pre-vaporized blend of fuel and air in the intake
port. There are two exhaust and intake valves and the simulation domain includes the intake and
exhaust manifolds (Figure 5.1: Port-injected engine geometry with valves and ports defined (p. 47) ).
In other words, the initialization of the gas composition is used to specify the fuel-air mixture in the
intake-port region and perfect mixing within the port is assumed. The case is reacting flow, with a
single component, 59-species single-component fuel that is appropriate for engine simulations that
are not concerned with knock. See the Ansys Forte User Guide for details of the chemistry.

5.2.1.1. Import the Geometry

Note:

All Editor panel options that are not explicitly mentioned in this tutorial should be left
at their default values. Changed values on any Editor panel do not take effect until you
press the Apply button. Always press the Apply button after modifying a value, before
moving to a new panel or the Workflow tree.

In this tutorial, we will import an existing geometry into Ansys Forte and set up the automatic mesh
generation using a global mesh size and adapting the mesh near the valves. To import the geometry,
go to the Workflow tree and click Geometry. This opens the Geometry icon bar. Click the Import

Geometry icon. In the resulting dialog, pull down and select Surfaces from one or more STL
files. In the dialog that opens with STL file import options, accept the defaults.

The mesh will be automatically generated during the simulations. When the file browser launches,
navigate to the folder Tutorial_SIENGINE_PFI_Automesh then select SIEngine_sample.stl. Note
that once you have imported the geometry, there are a number of actions that you can perform
on the items in the Geometry node, such as scale, rename, transform, invert normals, or delete
geometry elements.

The Geometry imports in an opaque mode and possibly preset zoom level. It is often helpful to

Refit the view or use the mouse wheel to re-zoom. To change opacity, right-click the Geometry
node in the Workflow tree and select Medium for the Opacity level of all geometry elements, as
shown in Figure 5.1: Port-injected engine geometry with valves and ports defined (p. 47) .

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
46 of ANSYS, Inc. and its subsidiaries and affiliates.
Port-Injected Spark Ignition Engine

Figure 5.1: Port-injected engine geometry with valves and ports defined

5.2.1.2. Subvolume Creation


Subvolumes are useful to refine regions of interest, such as the chamber. The subvolume can then
be used in the mesh controls to control the size of the mesh in the selected subvolume. On the
Workflow tree, use Geometry > Sub-Volume to create a subvolume named Sub-Volume-Cylinder.
Select the following surfaces to define the subvolume: Head, Liner, and Piston. For the Material
point, accept the default Reference Frame using the Global Origin. Set the Location using
Cartesian Coord. System to X = 0, Y = 0 and Z = 1.0 cm. Click Apply.

5.2.1.3. Automatic Mesh Generation Setup


The Material Point is the point in the domain that tells Ansys Forte where the mesh will be generated
and should be located at least one unit cell length away from any boundaries. This point must be
inside of the domain throughout the entire simulation. Typically it is located near the head so it is
still inside the domain at TDC.

• Mesh Controls > Material Point: Accept the default Reference Frame using the Global Origin.
Set the Location using Cartesian Coord. System to X = 0, Y = 0 and Z = 1.0 cm. Apply.

• From the Workflow tree, use Mesh Controls > Global Mesh Size to set the global Mesh Size to
0.2 cm.

Note:

This is the recommended mesh size; a coarser setting of 0.3 cm could be used for tutorial
purposes to produce a shorter runtime.

• Set the Small Feature Deactivation Factor to 0.5.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 47
Port-Injected Spark Ignition Engine

Next, you will refine the mesh around key geometric features such as valves and the piston, walls,
and open boundaries ("continuative outflows"). The following steps show how the mesh is refined
for key geometric features. From the Mesh Controls node, you can add Point, Surface, Line, or
Feature Refinements, or Small Feature Avoidance Controls. We recommend the following gen-
eral practices for setting mesh refinement in a full-cycle 4-stroke engine simulation that includes
ports and valves:

1. Refinement at Wall Boundaries. Use ½ the global mesh size where the mesh intersects with
the wall boundaries. An extended layer of refinement is added by default to ensure that the
refinement includes a full layer when the Cartesian mesh intersects curved or slanted boundaries.

• Surface Refinement: Click the Mesh Controls node in the Workflow tree. In the icon bar, click

the New Surface Refinement Depth icon and name the new control AllWalls. (This in-
dicates that along the selected surfaces, cells of this smaller size and greater refinement will
be used.) A new AllWalls item appears under Mesh Controls in the Workflow tree. In the
panel that appears, select all of the items in the Location list, except be sure to exclude the
Pressure_In and Pressure_Out open-boundary surfaces (we will set up refinement along these
surfaces separately). Be sure the list’s scroll bar is showing to ensure all the list items are dis-
played. Accept the default mesh Size as Fraction of Global Size as ½. Set the Number of
Cell Layers to Extend Refinement from Surface to 1. Keep the default of Active to Always
in the pull-down list below the refinement-layer entry. Click Apply. An initial refinement is
applied over all wall boundaries with a ½ Size Fraction of Global Size.

2. Refinement at Open Boundaries (Continuative Outflows). Again, we will use ½ the global
mesh size at continuative outflows, but use 2 extended layers of refinement, to make sure the
continuative outflows have smooth refinement where the inlet intersects walls.

• In the Mesh Controls icon bar, click the New Surface Refinement Depth icon and name
the new control OpenBoundaries. In the panel that appears, select all of the open-boundary
surfaces (the Pressure_In and Pressure_Out boundary surfaces) from the Location list. Accept
the default mesh Size as Fraction of Global Size as 1/2. Set the Number of Cell Layers to
Extend Refinement from Surface to 2. Click Apply. An initial refinement control is applied
over all wall boundaries with a ½ Size Fraction of Global Size.

3. Refinement Around the Valve Stems. Here we want to make sure we have smaller cells in the
regions around the valve stems, where velocities will be greatest during intake and exhaust
portions of the cycle.

• Click the New Surface Refinement Depth icon (on the Mesh Controls icon bar) and
name the new item ValveStems. Select IntakeValve1_Stem, IntakeValve2_Stem, and Ex-
haustValve1_Stem, and ExhasutValve2_Ste in the Location list. Set the Size as Fraction of
Global Size to 1/2 and set the Number of Cell Layers to Extend Refinement from Surface
to 2. Make this Active = Always.

4. Refinement Around the Valve Ends that Seat to the Port. As above, we want to assure suffi-
cient refinement where velocities will be greatest during valve opening and closing.

• Click the New Surface Refinement Depth icon and name the new item ValveSeats.
Select ExhaustValve1_Seat, ExhaustValve2_Seat, IntakeValve1_Seat and IntakeValve2_Seat

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
48 of ANSYS, Inc. and its subsidiaries and affiliates.
Port-Injected Spark Ignition Engine

in the Location list. Set Size as Fraction of Global Size to 1/4 and set the Number of Cell
Layers to Extend Refinement from Surface to 1. Make this Active = Always.

5. Refinement Near Piston and Head at TDC positions (Squish regions): The squish regions
require refinement near TDC at the end of compression strokes to make sure that there are at
least a couple of cells separating the head and piston surfaces in all locations. These controls
are dynamic controls, since they are only necessary near the TDC position of the crank.

• Click the New Surface Refinement Depth icon and name the new item Squish1. Select
Head, ExhaustValve1_Seat, ExhaustValve2_Seat, IntakeValve1_Seat, IntakeValve2_Seat,
Linerand Piston from the Location list. Change Size as Fraction of Global Size to 1/4. Set
Number of Cell Layers to Extend Refinement from Surface to 1. Make this Active = During
Crank Angle Interval and Start angle = 340.0 degrees and End angle = 380.0 degrees.
Click Apply.

• Use the Copy and Paste icons in the icon bar of the Squish1 panel and name the new item
Squish2. Make this Active = During Crank Angle Interval and set Start angle = 690.0 de-
grees and End angle = 790.0 degrees. Click Apply.

6. Add a Point Refinement Depth for the region of the spark: Capture the chemistry around
the spark.

• Click the Point Refinement Depth icon and name it SparkRegion. Set the Location
as: X = -0.36 cm, Y = 0 cm, Z = 0.33 cm, with the Radius of Application = 0.5 cm and
the Refinement level = 1/4. The refinement is Active between Crank Angle 680 and
720 degrees. Click Apply.

7. Adaptive Refinements: Adaptively refine based on the solution variables temperature and ve-
locity.

• Click the Solution Adaptive Meshing icon and name the new control SAM-Temperature.
Set the Quantity Type = Gradient of Solution Field and Solution Variables = Temperature.
Bounds Option = Statistical and Sigma Threshold = 0.5. Set the Size as fraction of Global
Size = 1/4. The refinement is Active between Crank Angle 680 and 800 degrees, and the
Location option is Sub-Volumes = Sub-volume-Cylinder. Click Apply.

• Click the Solution Adaptive Meshing icon and name the new control SAM-Velocity.
Set the Quantity Type = Gradient of solution field and solution variable = VelocityMag-
nitude. Bounds Option = Statistical and Sigma Threshold = 0.5. Set the Refinement level
= 1/2. The refinement is Active = Always, and the Location option is Entire Domain. Click
Apply.

5.2.1.4. Models Setup


Chemistry: Now that the mesh has been set up, assigning models is next. Assign the chemistry

with Models > Chemistry and use the Import Chemistry icon and select the file Gasol-
ine_1comp_49sp.cks from the Ansys Forte data directory. If you are curious, you can view the

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 49
Port-Injected Spark Ignition Engine

chemistry details, such as chemistry source, pre-processing log, gas phase input, gas phase output,
thermodynamic input, transport input and transport output.

• Flame Speed Model: Use Models > Chemistry > Flame Speed Model to access the settings for
the Flame Speed model. Keep all the defaults, except under Turbulent Flame Speed (at the
bottom of the Editor panel), set Turbulent Flame Speed Ratio (b1) to 2.0. Click Apply.

Transport: The default RNG k-ε model turbulence settings are used in this tutorial. Those are specified
in the Editor panel for Models > Transport > Turbulence. The default fluid properties are also used,
which are at Models > Transport.

Spark Ignition: Turn on the spark ignition model by checking the box at Models > Spark Ignition.

The spark ignition model defaults include a Kernel Flame to G-Equation Switch Constant of 2.0 and
the Flame Development Coefficient of 0.5.

Use the New Spark icon to create a new spark event and name it Spark.

Use Models > Spark Ignition > Spark to set up the details of the spark event. In the Reference
Frame, use Global Origin and Cartesian coordinates for the Location, and set X= -0.36 cm, Y=1.0E-
6 cm, and Z=0.33 cm. Select Crank Angle for Timing and Starting Angle = 688.0 degrees, Dur-
ation = 10.0 degrees. Under Spark Energy, set Energy Release Rate = 20.0 J/sec. Accept the
default 0.5 for Energy Transfer Efficiency and 0.5 mm for Initial Kernel Radius. Click Apply.

5.2.1.5. Boundary Conditions:


Boundary conditions are specified for each of the geometry elements in Boundary Conditions >
geometry-element-name, where geometry-element-name is each of the items under Geometry in the
Workflow tree.

Inlet: From the Boundary Conditions node, click the New Inlet icon and create Inlet. Select
Pressure_In from the Location list. Select Pressure Inlet as the Inlet Option with a constant
pressure of 0.8 bar. You will set the inlet composition to the correct Mass Fraction values corres-
ponding to the premixed fuel and air:

• o2=0.1967

• h2o=0.0089

• co2=0.0192

• ic8h18=0.0562

• n2=0.7190

To do this, select Create New in the Composition drop-down list above the Location list and click
the Pencil icon. This opens the Gas Mixture panel, where you select Add Species and then
choose the species you want from the mechanism (see Figure 5.2: Gas Mixture Editor: Defining Inlet
gas composition (p. 51) ). You can find a species more quickly by typing (the beginning of ) the
species name to filter the list. Save the inlet gas mixture as StoichWith10PercEGR. You will then see

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
50 of ANSYS, Inc. and its subsidiaries and affiliates.
Port-Injected Spark Ignition Engine

a list to define turbulence using Turbulent Kinetic Energy and Length Scale of 7,900 cm2 /sec2
and 0.5 cm, respectively.

Figure 5.2: Gas Mixture Editor: Defining Inlet gas composition

Outlet: From the Boundary Conditions node, click the New Outlet icon and create Outlet. Select
the Pressure_Out geometry item and select the Total Pressure as the Outlet Option. Give the
outlet a Pressure of 0.9 bar, which arises from the back-pressure of the exhaust system with an
Offset Distance to Apply Pressure of 0.1 cm. Set the Turbulence Boundary Conditions to Turbulent
Kinetic Energy and Length Scale of 7,900 cm2/sec2 and 0.5 cm,respectively.

Piston: From the Boundary Conditions node, click the New Wall icon and name it Piston. Select
the Piston item in the Location list. Set the Temperature Option to Constant and 420 K. Turn
ON the Wall Motion option and set the piston Motion Type to use a Slider-Crank Model with a
Stroke of 7.95 cm and a Connecting Rod Length of 13.81 cm with 0.0 Piston Offset. Change
the Movement Type to Moving Surface and accept the default Global Origin Reference Frame.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 51
Port-Injected Spark Ignition Engine

Intake: Click the New Wall icon and name it Intake. Select the IntakeManifold item in the
Location list and set the Temperature to 300 K.

Exhaust: Click the New Wall icon and name it Exhaust. Select the ExhaustManifold item in
the Location list and set the Temperature to 650 K.

Liner: Click the New Wall icon and name it Liner. Select the Liner item in the Location list and
set the Temperature to 385 K.

Head: Click the New Wall icon and name it Head. Select the Head item in the Location list and
set the Temperature to 385 K.

Intake Valves: Click the New Wall icon and name it IntakeValve 1. The valve specification is a
little more complicated than the stationary walls, such that several steps are required within the
wall panel. These steps specify the wall motion and the way we want the mesh to adapt to the gap
opening near the valve seat when the valve opens or closes.

• Multiselect both the IntakeValve1_Seat and IntakeValve1_Stem items in the Location list.

• Check the Heat Transfer option and set the Temperature to the constant value of 385 K.

• Turn ON (check) the Wall Motion and set the Motion Type to Offset Table.

• Accept the default Global Origin for the Reference Frame. Select Spherical for the Coord.
System under Direction for the valve motion and set =199 degrees and =0.0 degrees.

• To import the lift profile (named IntakeLift.csv in the same location as the .stl file you started
this tutorial with), select Create New from the Lift Profile drop- down list and click the Pencil
icon. In the Profile Editor, click the Load CSV button and navigate to the IntakeLift.csv file.
Accept the defaults in the import dialog and click OK. At the bottom of the Profile Editor window,
name this IntakeValves. Ensure that the units in the first column are set to Angle and the second
column is set to cm. Save the Profile.

• For Movement Type, change the pull-down menu to Valve. Then select just the surface boundary
portion of the valve that comes into contact with the valve seat on the port, as well as the surface
boundary that contains the seat region. In this case, select both the IntakeManifold and the
IntakeValve1_Seat.

• Finally, set the Valve Motion Activation Threshold to 0.15 cm. This indicates that the valve will
not open until the lift value specified in the valve-lift profile exceeds this threshold. A smaller
value will cause the valves to open sooner, but the mesh refinement required to resolve the gap
will be higher. This is a trade-off that will need to be determined based on the goals and outcomes
desired from the simulation. In addition to the activation threshold, you may also change the
minimum number of cells desired at the smallest gap opening. In this case, accept the default
value for Approx. Cells in Gap at Min. Lift of 3.0.

Follow the same procedure to set the boundary conditions for IntakeValve 2. This time you can
select the existing IntakeValves profile instead of creating a new one. And for IntakeValve 2, the
Location selected should be IntakeValve2_Seat and IntakeValve2_Stem, while the surfaces selected

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
52 of ANSYS, Inc. and its subsidiaries and affiliates.
Port-Injected Spark Ignition Engine

under Multiselect the Valve Seat and Surface it Contacts should be the IntakeManifold and In-
takeValve2_Seat.

Exhaust Valves: Click the New Wall icon and name it ExhaustValve1. Follow a similar procedure
as for the Intake Valves. This time, select the ExhaustValve1_Seat and ExhaustValve1_Stem items
in the Location list and set the Temperature to 497 K. Turn ON the Wall Motionand set the Motion
Type to Offset Table and the Vertices to Transform to Interior. Select Global Origin for the
Reference Frame. Select Spherical for the Coord. System under Direction and set = -199 de-
grees and =0.0 degrees (note that this is the opposite direction from the intake valves, relative
to the z-axis). Similarly to the intake valves, first import the .csv (named ExhaustLift.csv ) file, accept
the defaults, and name it ExhaustValves. Then follow the same procedures for specifying the
Movement Type to Valve, selecting the Valve Seat and Surface it Contacts(ExhaustManifold
and ExhaustValve1_Seat), and setting the Valve Motion Activation Threshold to 0.15 cm.

Follow the same procedure to set the boundary conditions for ExhaustValve2. Use the ExhaustValves
profile again for ExhaustValve2, but select the appropriate surfaces for the ExhaustValve2 in the
Location list and in the Multiselect the Valve Seat and the Surface it Contacts list.

5.2.1.6. Initialization
The domain is initialized with the operating conditions, species concentrations and temperatures.
The Default Initialization species composition is at the expected exhaust composition, assuming
complete combustion. The intake and exhaust must also be initialized to the boundary condition
values. Set the following initialization parameters:

Default Initialization:

• Select Default Initialization in the Workflow tree. Set the Initialization Order to 2. Since flow
goes generally from the intake to the cylinder and then to the exhaust, this indicates that this
default (cylinder) region will be the second in the initialization order precedence list.

• Select Create New in the Composition drop-down list and click the Pencil icon. This opens
the Gas Mixture panel, where you select Add Species, set to a Mass Fraction of n2=0.7192,
co2=0.1923 and h2o=0.0885 and Save this composition as ExhaustEst_w10percEGR.

• Set a Temperature of 1,000 K and the Pressure to 1.0 bar.

• The Turbulence initialization uses the Turbulent Kinetic Energy and Length Scale option with
values 7,900 cm2/sec2 and 0.4 cm, respectively.

• The Velocity is initialized using Engine Swirl, with an Initial Swirl Ratio of -0.0739, an Initial
Swirl Profile Factor of 3.11, and checking (ON) Initialize Velocity Components Normal to
Piston.

• Click Apply.

Intake Initialization: The intake manifold Initial Condition is set to match the Boundary Condition
at the Inlet. Since this is a separate port that can be closed off from the main cylinder region, we
also need to set the equivalent of a material point to identify the region, as well as an initialization
order that helps determine what region takes precedence in initializing new cells that appear when
gaps are opened.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 53
Port-Injected Spark Ignition Engine

• From the Initial Conditions Workflow tree item, select the New Port Initialization icon and
name it Intake.

• To identify the region, select a point for the Location under the Reference Frame selection,
which is a point that will always be within the Intake port. Set the coordinates for this case to
X=6.0, Y=2.0, Z=5.0 cm, which is a point just inside the inlet.

• Set the Initialization Order to 1. Flow is expected to go from the intake to the main region; for
this reason, we give it the first order in initialization precedence.

• Set the Composition by selecting in the previously saved profile, StoichWith10PercEGR. Set
the Temperature to 300 K and Pressure to 0.8 bar.

• The Turbulence initialization uses Turbulent Kinetic Energy and Length Scale option set to
7,900 cm2/sec2and 0.5 cm, respectively. ClickApply.

Exhaust Initialization: The Initial Conditions of the Exhaust is set to match the Boundary Condition
of the Outlet.

• From the Initial Conditions Workflow tree item, select the New Port Initialization icon and
name it Exhaust.

• To identify the region, select a point for the Location under the Reference Frame selection,
which is a point that will always be within the ExhaustPort region. Set the coordinates for this
case to X= -4.0, Y=2.0, Z=2.0 cm, which is a point just inside the outlet.

• Set the Initialization Order to 3. Flow is expected to go from the cylinder to the exhaust port; for
this reason, we give it the last order in initialization precedence for the 3 regions defined.

• Set the Composition to the existing profile, ExhaustEst_w10percEGR. Set the Temperature to
650K and Pressure to 0.9 bar.

• The Turbulence initialization uses the Turbulent Kinetic Energy and Length Scale option; these
are set to 7,900 cm2/sec2 and 0.5cm, respectively. Click Apply.

5.2.1.7. Simulation Controls


Simulation controls allow you to define the simulation limits, time step, chemistry solver and
transport terms.

Simulation Limits: Use the Simulation Controls panel to select a Crank Angle-based simulation
from a CA of 340 to 900 degrees. Set RPM = 1,500 rpm. The engine Cycle Type is 4-Stroke.

Time Step: Use Simulation Controls > Time Step and set the following parameters:

• Initial Simulation Time Step to 5.0E-7 seconds

• Select Restrict Time Step by Crank Angle

• Max. Crank Angle Delta Per Time Step of 1.1 degrees

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
54 of ANSYS, Inc. and its subsidiaries and affiliates.
Port-Injected Spark Ignition Engine

• Set the Max. Time Step Option to Constant and set the value of Max. Simulation Time Step
to 3.E-5 sec. The time step will be adaptively determined throughout the simulation, based on
local solution gradients, so this just sets the maximum value allowed.

TheAdvanced Time Step Control Options settings are kept at the defaults:

• Time Step Growth Factor = 1.3

• Fluid Acceleration Factor = 0.5

• Rate of Strain Factor = 0.6

• Convection factor = 0.2

• Internal Energy Factor = 1.0

• Max. Convection Subcycles = 8

Chemistry Solver: Simulation Controls > Chemistry Solver is also kept at the defaults, with the
following parameters:

• Absolute Tolerance = 1.0E-12

• Relative Tolerance = 1.0E-5

• Use Dynamic Cell Clustering to take advantage of groups of cells with similar conditions. Select
2 features to introduce Dynamic Cell Clustering: 1) Max. Temperature Dispersion of 10 K and
2) a Max. Equilibrium Ratio Dispersion of 0.05.

• To increase the time-to-solution speed, you have the ability to choose when chemistry is activated.
In this tutorial, select Activate Chemistry Conditionally, and select When Temperature is
Reached with Threshold Temperature 600 K and also select During Crank Angle Interval
between 650 and 850 crank angle. This ensures that chemistry is active during the time that
combustion is expected even if temperature does not rise above 600 K. Click Apply.

Transport Terms:Use the default transport tolerances and maximum number of iterations.

5.2.1.8. Output Controls


Output controls determine what data are stored for viewing during the simulation and for creating
plots, graphs and animations in Ansys EnSight.

Spatially Resolved: Allows you to control when spatially resolved data such as velocity, temperature,
species concentrations, etc., will be output. In the Spatially Resolved panel, set theCrank Angle
Output Control to report every 20 degrees (to manage the size of the output file). You can option-
ally increase the frequency of output during the cycle by selecting User Defined Output Control
and importing the Spatial_Output_CAs.csv file, which has a list of specific crank angles where
spatially resolved output will occur (illustrated in Figure 5.3: Output control panel - Spatially Re-
solved (p. 56) ). Alternatively, you could select User Defined Output Control, and use the Profile
Editor to create some other file specifying an output crank-angle profile (the provided profile is il-
lustrated in Figure 5.4: User-defined spatially resolved output controls (p. 56) ). Select the following
species for Spatially Resolved Output: h2o, no, no2, co, co2, o2, ic8h18 and n2.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 55
Port-Injected Spark Ignition Engine

Figure 5.3: Output control panel - Spatially Resolved

Figure 5.4: User-defined spatially resolved output controls

Spatially Averaged:Allows you to control the output of values that are averaged across the domain.
Spatially Averaged panels, set the Crank Angle Output Control to reporting every 1 degree.
Select the following species for Spatially Averaged Output: h2o, no, no2, co, co2, o2, ic8h18 and
n2.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
56 of ANSYS, Inc. and its subsidiaries and affiliates.
Port-Injected Spark Ignition Engine

Restart Data: If you anticipate that the case will be stopped and you want the ability to restart it
from the last time step solved, select Output Controls > Restart Data. You can specify certain Restart
Points using a separate file. Turn on (check) User Defined Restart Points and use the Profile Editor
to create a Restart profile. You can view, edit or import new Restart Points in this 1-D Profile Editor.
Sometimes it is helpful in spark ignition cases to save a restart file after IVC but before the spark
occurs (CA=687 in this case) so you can use the compression portion of the cycle as a start point
in additional runs. Create a new profile for this purpose called RestartOutput and add one line
with CA value set to 650.

5.2.1.9. Preview Simulation


As a method for checking the automatically generated mesh, you can generate a Preview Mesh.
Select Preview Simulation > Mesh Generation. Select Crank Angle as the Time Option and set it
to 720.0 CA. Enter the Data Set Name as FTDC. Check the Include Volume Mesh option and then

click the Generate Mesh icon. Then select the Data Set Name to view in EnSight. If you want
to see the cut plane where the mesh will be generated, create a clip plane in EnSight. Select all
parts and then select Create > Clips.... Use XYZ as Tool and Mesh Slice Y with Value = 0.0, and
then click on Create with selected parts. It is a good practice to look at meshes at key points in
the cycle such as Firing Top Dead Center (FTDC), Exhaust Valve Opening (EVO), Intake Valve Closed
(IVC), Intake Valve Open (IVO) and Exhaust Valve Closed (EVC). You can create a preview mesh
similarly by using the following information:

1. FTDC @ CA=720: Mesh Slice Y (Value=0.0 cm)

2. EVO @ CA=192: Mesh Slice Y (Value=2.0 cm)

3. IVC @ CA=601: Mesh Slice Y (Value=2.0 cm)

4. IVO @ CA=363: Mesh Slice Y (Value= –1.0 cm)

5.2.1.10. Run Simulation


To complete the lesson, select Run Simulation on the Workflow tree and, once Ansys Forte displays
the green START button on the Run Simulation panel and reports a "Ready" status, click Start. You

can monitor the results by clicking on the Monitor Runs icon. In the Monitor window that
opens, you can select the run you wish to monitor.

5.2.1.11. Run Settings


The settings here depend on the system and environment for your simulations. The default for the
Run Settings panel is to have nothing selected.

Run Options: This tutorial does not require changes to this panel’s defaults; adjust them as necessary
for your environment.

Windows Settings: This tutorial does not require changes to this panel’s defaults; adjust them as
necessary for your environment.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 57
Port-Injected Spark Ignition Engine

Linux Settings: This tutorial does not require changes to this panel’s defaults; adjust them as ne-
cessary for your environment.

5.2.2. Results
To view the results of the simulation, open Ansys EnSight. In EnSight, open the solution file for the
case ( Nominal.ftres ). Figure 5.5: Screen view of the solution file in EnSight (p. 58) shows the screen
view once the solution file has been loaded.

Figure 5.5: Screen view of the solution file in EnSight

We are interested in creating some average line plots for Pressure, Apparent Heat Release Rate (Ap-
parent HRR) and emissions such as CO and NOx vs. Crank Angle. The thermo.csv file is used to
create line plots for Pressure, Apparent HRR, NO, and CO. These figures are shown as Figure 5.6: Pressure
and Apparent heat release rate vs. crank angle (p. 59) and Figure 5.7: NO and CO emissions g/kg-fuel)
vs. crank angle (p. 60). Another interesting feature is to use the Iso-Contour Wizard to track the flame
front across the cylinder volume using the iso-contour wizard in EnSight, as shown in Figure 5.8: Iso-
contours at 1000 K showing the progression of the flame front from CA 694-702 degrees (p. 61). Use
a temperature value of 1000 K for this purpose.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
58 of ANSYS, Inc. and its subsidiaries and affiliates.
Port-Injected Spark Ignition Engine

Figure 5.6: Pressure and Apparent heat release rate vs. crank angle

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 59
Port-Injected Spark Ignition Engine

Figure 5.7: NO and CO emissions g/kg-fuel) vs. crank angle

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
60 of ANSYS, Inc. and its subsidiaries and affiliates.
Port-Injected Spark Ignition Engine

Figure 5.8: Iso-contours at 1000 K showing the progression of the flame front from CA 694-702
degrees

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 61
Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
62 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 6: Tracking Soot Particles Evolution in a
Diesel Engine
This tutorial presents the soot particle tracking capability in Ansys Forte, applying the method of moments
to a diesel engine case. With the soot particle tracking feature, several spatially resolved values of soot
can be simulated, including particle number density, volume fraction and average diameter. The tutorial
explains the setup for using the particle tracking capability, and presents visualizations of soot predictions.

6.1. Data Provided

6.1.1. Files Used in This Tutorial


The files for this tutorial are obtained by downloading the soot_particle_tracking.zip file
here.

Unzip soot_particle_tracking.zip to your working folder.

• Soot-particle-tracking__tutorial.ftsim: A project file of the completed tutorial, for verification or


comparison of your progress in the tutorial set-up. The project file includes all the relevant geometry,
chemistry set and spray profile details.

The tutorial sample file is provided as a download. You have the opportunity to select the location
for the file when you download and uncompress the sample files.

Note:

This tutorial is based on a fully configured sample project that contains the tutorial project
settings. The description provided here covers the key points of the project set-up but is
not intended to explain every parameter setting in the project. The .ftsim file has all custom
and default parameters already configured; the text highlights only the significant points
of the tutorial.

6.1.2. Project Comparison Utility


The Ansys Forte installation includes the cgns_util export command, which you can use to
compare the parameter settings in the project file generated at any point during your tutorial set-up
against the provided .ftsim , which has the parameter settings for the final, completed tutorial. This
command is described in the Ansys Forte User Guide.

Briefly, you can double-check project settings by saving your project and then running the cgns_util
to export your tutorial project, and then to export the provided final version of the tutorial. Save both
versions and compare them with your preferred diff tool, such as DIFFzilla. If all the parameters are

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 63
Tracking Soot Particles Evolution in a Diesel Engine

in agreement, you have set up the project successfully. If there are differences, you can go back into
the tutorial set-up, re-read the tutorial instructions, and change the setting of interest.

6.1.3. Time Estimate


As a guideline for your own simulations, this tutorial is estimated to take approximately 1.4 hours
using the Intel® Xeon processor E5-2690 at 2.60 GHz (28 total cores).

6.1.4. Prerequisites for This Tutorial


We recommend starting with the Ansys Forte Quick Start Guide, which explains the workflow of the
Ansys Forte user interface, before doing this tutorial.

6.2. Project Setup


The Soot-particle-tracking__tutorial.ftsim project file has been preconfigured with all the information
that will be discussed in this section. You do not need to input any values but can just follow along,
reading the instructions and viewing the settings in the loaded .ftsim. This chapter nevertheless explains
step-by-step the process of setting up the project, as an illustration of the features in the user interface.

Open the project file, Soot-particle-tracking__tutorial.ftsim, from the location where you stored the
downloaded tutorial files.

6.2.1. Sector Mesh Details


A simple engine configuration is used in this tutorial for demonstration purposes. The details of the
configuration and simulation settings are presented in Table 6.1: Details of the diesel engine geometry
used in this tutorial (p. 64).

Table 6.1: Details of the diesel engine geometry used in this tutorial

Compression ratio 15
Displacement volume (cm3) 508.7
Sector angle 45
Bore (cm) 9
Stroke (cm) 8
Squish (cm) 0.1
Flat piston bowl depth, diameter (cm) 0.85, 6
Crevice width and height (cm) 0.1, 1

The bowl profile used in the Sector Mesh Generator is described in Table 6.2: Details of the bowl
profile in the Ansys Forte profile editor (p. 64).

Table 6.2: Details of the bowl profile in the Ansys Forte profile editor

Column 1 Distance (cm) Column 2 Distance (cm)


3 0

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
64 of ANSYS, Inc. and its subsidiaries and affiliates.
Project Setup

Column 1 Distance (cm) Column 2 Distance (cm)


3 -0.85
0 -0.85

The 45° sector mesh was created using the Sector Mesh Generator in Ansys Forte. The values described
in Table 6.1: Details of the diesel engine geometry used in this tutorial (p. 64) can be accessed in the
Soot-particle-tracking__tutorial.ftsim project file, by launching the Sector Mesh Generator, as shown
in Figure 6.1: Sector Mesh Generator settings for this tutorial (p. 66). In the Sector Mesh Generator,
Topology 3 was deemed the most appropriate to represent this piston bowl geometry. The mesh
parameters for this topology were selected as follows:

1. ~1 mm resolution along the radial direction.

2. 3° along the azimuthal direction.

3. Along the z-direction:

• 0.7 mm in the piston bowl, to capture spray and events close to TDC accurately.

• 1.6 mm resolution in the squish region. Four minimum cells will be present, as specified in the
Mesh Controls Editor panel, to ensure resolution close to TDC. Away from TDC, the mesh is set
to be coarse in the squish region, for the sake of faster simulation in this simplistic demonstration
case.

These settings resulted in a sector mesh with 40,890 cells when the piston is at bottom dead center
(BDC).

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 65
Tracking Soot Particles Evolution in a Diesel Engine

Figure 6.1: Sector Mesh Generator settings for this tutorial

In the Mesh Controls > Remeshing Editor panel, the Smooth check box is unchecked. All other controls
are left at default values.

6.2.2. Chemistry Set Details


On the Models > Chemistry Editor panel, the Diesel_2comp_189sp__soot-particle-tracking.cks
chemistry set has been selected.

This chemistry set includes a gas-phase mechanism (Diesel_2comp_189sp__soot-particle-track-


ing_chem.inp), and a surface mechanism file (surf_soot_chem.inp). The thermodynamic data are in-
cluded in the mechanism files.

The gas-phase mechanism contains 189 species participating in 1392 reactions. This mechanism has
been generated for use with the 66.8/33.2 wt% n-decane/AMN diesel surrogate. It has reaction
pathways to accurately predict soot precursors needed for the surface soot mechanism, all the way
from small hydrocarbons such as acetylene to polycyclic aromatic species such as pyrene and coronene.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
66 of ANSYS, Inc. and its subsidiaries and affiliates.
Project Setup

If you were to create your own chemistry set for use with particle tracking, the surface mechanisms
would have to conform to certain standards, as defined in the Chemkin-Pro Input Manual and Chemkin-
Pro Theory Manual. The soot surface mechanism that is part of this tutorial's chemistry set includes:

1. Soot nucleation through multiple pathways.

2. HACA- and PAH-based soot growth pathways.

3. Soot oxidation through O2 and OH.

6.2.3. Transport Property Settings


The default values are used in the Transport property panel. In the Transport > Turbulence panel, the
RANS RNG k-epsilon model is used, with default values.

6.2.4. Spray Model Settings


Under Models > Spray model, the spray models, nozzle and fuel injection values have been set.

The nozzle-1 settings are provided in Table 6.3: Nozzle settings (p. 67).

Table 6.3: Nozzle settings

Location
Reference frame Global origin
Coordinate system Cylindrical
R 0.1 cm
q 22.5 degrees
A 9 cm
Spray direction

Reference frame Global origin


Coordinate system Spherical
q 110 degrees
f 22.5 degrees
Nozzle size
Nozzle diameter 150 micron

The following spray models are being used in this project, with default Ansys Forte settings:

1. KH droplet breakup model

2. RT droplet breakup model

3. Gas-jet

4. Vaporization model

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 67
Tracking Soot Particles Evolution in a Diesel Engine

5. Adaptive Collision Mesh droplet collision model

The diesel fuel was simulated using a 2-component surrogate consisting ([1]) of 66.8 weight%
n-decane/33.2 weight% 1-methylnaphthalene. This particular surrogate was designed to model a
European diesel fuel with cetane number of 55. This surrogate has a threshold sooting index of 36,
placing it on the higher end of the typical diesel fuel sooting index. Table 6.4: Details of nozzle (Nozzle-
1) and fuel injection (Injection-1) (p. 68) provides details of the nozzle and the fuel injection. These
values are entered under the Models > Solid Injector-1 node. Specifically, the nozzle location and
spray direction inputs are set on the Nozzle-1 Editor panel, and the fuel injection-related inputs are
specified on the Injection-1 Editor panel.

On the Solid Injector-1 panel, parcel specification has been set using the Number of parcels option.
The Injected parcel count has been set to 3000.

The Inflow Droplet Temperature has been set to 320 K.

Spray was initialized using the Constant Discharge Coefficient and Angle option. A Discharge
Coefficient of 0.9 has been used, with a Mean Cone Angle of 15°.

Table 6.4: Details of nozzle (Nozzle-1) and fuel injection (Injection-1)

Nozzle details
Direct-injector nozzle hole 150 μm
Fuel injection details

Start of injection (° ATDC) -10


Duration of injection (°) 10
Total Injected mass (mg) 20
Injection velocity profile A slightly modified square profile: (0,0), (1E-7,1),
(0.999999,1), (1,0)

6.2.5. Soot Model Settings


Under Models > Soot Model, choose Soot Model. There are three options for modeling soot in Ansys
Forte. One option is to define a "pseudo-gas" soot model that is included in a different gas-phase
chemistry mechanism input. In that case, you would not select Models > Soot Model. With the selected
chemistry in this example, you may either:

• Use a built-in 2-step model, which is one option on the Soot Model panel.

• Use the Method of Moments. This option enables the particle tracking capability. In this tutorial,
Method of Moments is selected.

With the Method of Moments option selected in the Soot Model panel, four inputs are required.
Details regarding these parameters can be found in the Chemkin-Pro Theory Manual.

[1] species names: n-decane is nc10h22; 1-methylnaphthalene is a2ch3.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
68 of ANSYS, Inc. and its subsidiaries and affiliates.
Project Setup

1. Number of Moments: 3-6 moments can be used in the simulations. Typically, it is recommended
that 3 moments are sufficient; that value of 3 is used in this tutorial.

2. Scaling Factor for Moments: This value changes the units of the (internal) solution variable for
particle moments. A recommended value for typical problems is the default 1.0E+12, as the
scaling helps preserve the positivity of the solution during computation.

3. Scaling Factor for Surface Species: This value changes the units of the (internal) solution variable
for particle surface species. For example, setting it to 1.0E+12 results in pico-moles, while a value
of 1 would mean that the unit should be moles. A recommended value for typical problems is
the default 1.0E+12, as the scaling helps preserve the positivity of the solution during numerical
computation.

4. Coagulation is included in this tutorial, with a Coagulation Collision Efficiency of 1.0. This coagu-
lation collision efficiency term is a combined correction factor to the coalescent collision between
particles. The van der Waals forces can enhance the collision frequency while non-coalescent
collision can reduce the frequency.

6.2.6. Boundary Conditions


Piston: The piston temperature is set to 500 K. The Law of the Wall model is used. Under Wall
motion, the Bore is set to 9 cmand Stroke is set to 8 cm, and the Connecting Rod Length is set to
15 cm.

Periodicity: The Sector Angle is set to 45°.

Head: The Temperature is set to 470 K, and the Law of the Wall model is used.

Liner: The Temperature is set to 420 K, and the Law of the Wall model is used.

6.2.7. Initial Conditions


An ~10% EGR case is considered here. This results in an initial composition with a mass fraction of:

• O2=0.2055

• N2=0.7611

• CO2=0.0246

• H2O=0.0088

The initial Temperature and Pressure are set to values of 340 K and 2.0 bar. The initial Turbulent
Kinetic Energy is set to 10,000 cm2/sec2, and the Turbulent Length Scale = 1 cm. Under Velocity,
Engine Swirl is chosen and an Initial Swirl Ratio of 1.0 is used. The Initial Swirl Profile factor is left
at the default value of 3.11.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 69
Tracking Soot Particles Evolution in a Diesel Engine

6.2.8. Simulation Control


The simulation Start Crank Angle (that is, Initial Crank Angle, under Simulation Controls in the
Workflow tree) is set to -130 degrees ATDC, the Engine Speed is specified as 2000 RPM, and the
simulation Final Simulation Crank Angle is set to +130 degrees ATDC.

6.2.9. Output Control


To allow visualizing fuel and soot precursor species, the following species have been named in the
Spatially Resolved and Spatially Averaged Output Control Editor panel. Also included in the list
are species for air, combustion products, co, no, and no2.

1. Coronene (species name coronene)

2. Pyrene (species name a4)

3. Acenaphthalene (species name a2r5)

4. Naphthalene (species name naph)

5. Benzene (species name c6h6)

6. Phenyl (species name c6h5)

7. Acetylene (species name c2h2)

8. n-Decane, a fuel surrogate nc10h22

9. AMN, a fuel surrogate a2ch3

The spatially resolved values are output at (a) uniform intervals of 50 crank angles, and (b) user-
defined crank angle outputs at 0. 10, 20, 30, 40, and 50 crank angle degrees. The spatially averaged
values are output every 0.5 crank angle.

6.3. Project Results


Spatially averaged plots appear below first, followed by some spatially resolved plots. The spatially re-
solved plots have been generated using EnSight.

The simulation results for the pressure and heat release rate are shown in Figure 6.2: Calculated pressure
and apparent heat release rate curves (p. 71). The fuel ignites slightly before TDC.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
70 of ANSYS, Inc. and its subsidiaries and affiliates.
Project Results

Figure 6.2: Calculated pressure and apparent heat release rate curves

Figure 6.3: Predicted spatially averaged soot as a function of crank angle (p. 72) shows a line plot of
the spatially averaged soot values, as a function of crank angle. Soot surface chemistry causes soot
production, and soot reaches a maximum value of ~42.5 g/kg-fuel at ~10 CA degrees ATDC. Following
this, the soot value decreases due to oxidation reactions to a value of 0.1 gm/kg-fuel at EVO (130 CA
degrees ATDC). In addition to soot chemistry (multiple pathways for particle nucleation, growth, and
oxidation), soot particle coagulation has also been accounted for in the simulations.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 71
Tracking Soot Particles Evolution in a Diesel Engine

Figure 6.3: Predicted spatially averaged soot as a function of crank angle

Next, we look at spatially resolved plots to understand more details of the soot evolution inside the
engine. Spatially resolved plots have been generated using Ansys EnSight. Several soot particle outputs
are potentially available to visualize, and a few of them are shown in this section.

Figure 6.4: A 2000K temperature isosurface showing the region of combustion at TDC (the cut plane
shown here is used to plot values in the next figure) (p. 73)shows spatially-resolved values at TDC.
Spray is nearing its end around this time, and ignition has occurred. The isosurface shown is that of
2000K temperature. A cut plane near the middle (25 deg theta) has been used to further understand
soot evolution, and values are shown in this cut plane in the next figure, Figure 6.4: A 2000K temperature
isosurface showing the region of combustion at TDC (the cut plane shown here is used to plot values
in the next figure) (p. 73).

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
72 of ANSYS, Inc. and its subsidiaries and affiliates.
Project Results

Figure 6.4: A 2000K temperature isosurface showing the region of combustion at TDC (the cut
plane shown here is used to plot values in the next figure)

Figure 6.5: Soot particle number density (#particles/cm3), volume fraction (cm3/cm3) and average dia-
meter (nm) shown on the cut plane from 0-40 CA degree ATDC (p. 74) uses iso-surfaces (50 nm) to
show the spatially resolved values of average particle diameter, at 30-70 crank angle degrees. Of the
three crank angles explored here, the 20 nm particles peak at 50 CAD, and the location of these relatively
large particles is in the squish zone.

In Figure 6.5: Soot particle number density (#particles/cm3), volume fraction (cm3/cm3) and average
diameter (nm) shown on the cut plane from 0-40 CA degree ATDC (p. 74), the soot particle number
density, volume fraction and average diameter are shown on the cut plane described above, for 0-40
CA degree ATDC. The following trends are seen:

1. When soot first starts to form near TDC, the particle number density is largest, and the average
particle diameter is smallest. With time, the number density starts to go down, due to particle co-
agulation and due to particle consumption through oxidation. Meanwhile, the particle diameter
starts to go up with time, up to 30-40 CA ATDC, because of coagulation and particle growth reactions.
With more time (not shown here), the particle diameter starts to go down due to particle consumption
through oxidation.

2. Particle volume fraction is highest in the 10-20 CA range.

3. Soot initially starts to form in the piston bowl, but eventually most of the soot is seen in the squish
region.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 73
Tracking Soot Particles Evolution in a Diesel Engine

Figure 6.5: Soot particle number density (#particles/cm3), volume fraction (cm3/cm3) and average
diameter (nm) shown on the cut plane from 0-40 CA degree ATDC

Note that the particle diameter shown in Figure 6.6: Filter used in EnSight for average particle diamet-
er (p. 75) is a filtered value. Even when soot volume fraction is very low (say, less than 1E-10), the average
diameter can potentially be a large value; however in this scenario, the average particle diameter does
not have much meaning as it is essentially due to numerical noise. To filter this kind of values, the fil-
tering shown in Figure 6.6: Filter used in EnSight for average particle diameter (p. 75)has been used.
This filter shows only particle diameter when the local particle volume fraction is greater than 1E-10.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
74 of ANSYS, Inc. and its subsidiaries and affiliates.
Project Results

Figure 6.6: Filter used in EnSight for average particle diameter

Finally, we show another option to analyze soot results. A file named ‘particle_size_distribution.csv’ is
reported in the results directory when using soot Method of Moments in Forte. This file contains inform-
ation on the particle number count for various ‘bins’ of particle sizes, and can be visualized in either
the Forte Monitor. Figure 6.7: Particle number count reported for various particle bins (p. 75)shows
some examples of the particle number counts. The first figure shows a spike around TDC, when soot is
starting to form; this is probably from the nucleation reaction creating a lot of small particles, which
subsequently grows to larger particles either because of coagulation or growth reactions. From 20 CA
ATDC, a zoomed in version of the same plot shows that 2-4 nm particles again start to be formed, which
could be either due to particle nucleation creating new particles, or particle destruction through oxidation
resulting in formation of these size particles from larger particles. Also shown are particles from 64-128
nm, which start to form in substantial numbers around 20 CA, but are mostly consumed by 50 CA.

Figure 6.7: Particle number count reported for various particle bins (p. 75) shows the average particle
size distribution. It can be seen that initially at 5-10 CAD, the particle count is high but the particle size
is low with the majority of particles being smaller than 4 nm. With increasing crank angle, the lower,
zoomed-in plot shows that larger diameter particles form but have lower particle count.

Figure 6.7: Particle number count reported for various particle bins

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 75
Tracking Soot Particles Evolution in a Diesel Engine

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
76 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 7: Gasoline Direct Injection Engine
Simulation
This tutorial describes how to use Ansys Forte to simulate combustion in a direct injection spark ignition
internal combustion engine with moving valves. Engine geometry is imported and Ansys Forte's auto-
matic mesh generation is used to create the computational mesh on-the-fly during the simulation.

7.1. Data Provided


This section describes the provided files, time required, prerequisites, and a utility for comparing your
generated project file (.ftsim) with the one provided in the tutorial download.

7.1.1. Files Used in This Tutorial


The files for this tutorial are obtained by downloading the siengine_gdi_tutorial.zip file
here.

Unzip siengine_gdi_tutorial.zip to your working folder.

• Forte_GDI_Tutorial.stl: This is the geometry file.

• exhaust_valve_lift.csv and intake_valve_lift.csv: Two files of data describing the intake and exhaust
valve lifts. Profiles such as these can be imported (from .csv files) or manually entered in the Profile
Editor

• spatial_output.csv: Specifies when spatially resolved data such as velocity, temperature, species
concentrations, etc., will be output.

• Forte_GDI_Tutorial.ftsim: A project file of the completed tutorial, for verification or comparison


of your progress in the tutorial set-up.

The tutorial sample file is provided as a download. You have the opportunity to select the location
for the file when you download and uncompress the sample files.

Note:

This tutorial is based on a fully configured sample project that contains the tutorial project
settings. The description provided here covers the key points of the project set-up but is
not intended to explain every parameter setting in the project. The .ftsim file has all custom
and default parameters already configured; the text highlights only the significant points
of the tutorial.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 77
Gasoline Direct Injection Engine Simulation

7.1.2. Project Comparison Utility


The Ansys Forte installation includes the cgns_util export command, which you can use to
compare the parameter settings in the project file generated at any point during your tutorial set-up
against the provided .ftsim , which has the parameter settings for the final, completed tutorial. This
command is described in the Ansys Forte User Guide.

Briefly, you can double-check project settings by saving your project and then running the cgns_util
to export your tutorial project, and then to export the provided final version of the tutorial. Save both
versions and compare them with your favorite diff tool, such as DIFFzilla. If all the parameters are in
agreement, you have set up the project successfully. If there are differences, you can go back into
the tutorial set-up, re-read the tutorial instructions, and change the setting of interest.

7.1.3. Time Estimate


As a guideline for your own simulations, this tutorial is estimated to take approximately 6.3 hours
using the Intel® Xenon® processor E5-2690 at 2.60 GHz (56 total cores).

7.1.4. Prerequisites for This Tutorial


We recommend starting with the Ansys Forte Quick Start Guide , which explains the workflow of the
Ansys Forte user interface, before doing this tutorial.

7.2. Direct Injection Spark Ignition Engine


The next sections describe the problem, including how to set up the simulation that is represented in
the provided .ftsim file, and some results relating to surfaces, spray, and flame, that you can generate.

7.2.1. Problem Description


A three-dimensional single cylinder CFD simulation, of a four-stroke spray-guided Gasoline Direct In-
jection (GDI) Spark Ignition (SI) engine, is performed in this tutorial. Detailed boundary conditions are
shown in Figure 7.1: Schematic of GDI engine (p. 79). Engine simulation is started from intake valve
opening (IVO) and fuel is injected during the intake stroke. Homogeneous fuel air mixture is compressed
and the spark ignited 15° before compression Top Dead Center (TDC).

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
78 of ANSYS, Inc. and its subsidiaries and affiliates.
Direct Injection Spark Ignition Engine

Figure 7.1: Schematic of GDI engine

This tutorial illustrates the following steps in setting up and solving a Gasoline Direct Injection com-
bustion simulation.

• Read an existing geometry into the Forte system.

• Define mesh setup and mesh the geometry.

• Set up the injection event.

• Set up the spark timing event.

• Set up the boundary and initial conditions.

• Specify the simulation controls.

• Specify the output variables and frequency.

• Run the simulation.

• Examine the results in the report.

7.2.1.1. Import the Geometry

Note:

All Editor panel options that are not explicitly mentioned in this tutorial should be left
at their default values. Changed values on any Editor panel do not take effect until you
press the Apply button. Always press the Apply button after modifying a value, before
moving to a new panel or to the Workflow tree.

In this tutorial, we will import an existing geometry into Ansys Forte and set up the automatic mesh
generation using a global mesh size and adapting the mesh near the valves. The geometry used
will be half symmetric. To import the geometry, go to the Workflow tree and click Geometry. This

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 79
Gasoline Direct Injection Engine Simulation

opens the Geometry icon bar. Click the Import Geometry icon. In the resulting dialog, pull
down and select Surfaces from one or more STL files. Browse to and select the file called
Forte_GDI_Tutorial. In the dialog that opens with STL file import options, accept the defaults for
units and tolerances. Note that the geometry should always be in centimeters units when read into
Ansys Forte. If it is not, the geometry can be scaled using the appropriate scaling factor to get it
into centimeters. Note that once you have imported the geometry, there are a number of actions
that you can perform on the items in the Geometry node, such as scale, rename, transform, invert
normals, or delete geometry elements.

Once the geometry is read in, you should see the following surfaces: liner, exhaust-port, inlet,
outlet, intake-port, piston, head, exhaust-valve, intake-valve, intake-symmetry, cylinder-
symmetry, exhaust-symmetry, spark-plug.

The Geometry imports in an opaque mode and possibly preset zoom level. It is often helpful to

Refit the view or use the mouse wheel to re-zoom. To change opacity, right-click the Geometry
node on the left-side Workflow tree and select Medium for the Opacity level of all geometry elements,
as shown in Figure 7.2: Engine geometry with valves and ports defined (p. 80).

Figure 7.2: Engine geometry with valves and ports defined

7.2.1.2. Subvolume Creation


Subvolumes are useful to refine regions of interest, such as the chamber. The subvolume can then
be used in the mesh controls to control the size of the mesh in the selected subvolume. Select the
following surfaces to define the subvolume: cylinder-symmetry, head, liner, piston, and
spark_plug. You should see a triangulated region as in Figure 7.3: Subvolume for the chamber (p. 81).

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
80 of ANSYS, Inc. and its subsidiaries and affiliates.
Direct Injection Spark Ignition Engine

Figure 7.3: Subvolume for the chamber

7.2.1.3. Automatic Mesh Generation Setup


The Material Point is the point in the domain that tells Ansys Forte where the mesh will be generated
and should be located at least one unit cell length away from any boundaries. This point must remain
inside of the domain throughout the entire simulation. Typically it is located near the head so it is
still inside the domain at TDC.

• Mesh Controls ¬ Material Point: Accept the default Reference Frame using the Global Origin.
Set the Location using Cartesian Coord. System to X = 0.25, Y = 3.25, and Z = 0.25 cm.
ClickApply.

• From the Workflow tree, use Mesh Controls ¬ Global Mesh Size to set the Global Mesh Size to
0.2 cm.

Note:

This is the recommended mesh size; a coarser setting of 0.3 cm could be used for tutorial
purposes to produce a shorter runtime.

• Add a Solution Adaptive Mesh refinement: Click the Solution Adaptive Meshing icon on
the Mesh Controls Editor panel, and name the new control SAM-Temperature. Set the Quantity
Type = Gradient of Solution Field and Solution Variables = Temperature. Bounds Option =
Statistical and Sigma Threshold = 0.5. Set the Size as fraction of Global Size = 1/4. The refine-
ment is Active between Crank Angle 700 and 800 degrees, and the Location option is Sub-
Volumes = chamber. Click Apply.

• Click the Solution Adaptive Meshing icon on the Mesh Controls Editor panel and name
the new control SAM-Velocity. Set the Quantity Type = Gradient of solution field and solution
variable = VelocityMagnitude. Bounds Option = Statistical and Sigma Threshold = 0.5. Set
the Size as fraction of Global Size = 1/2. The refinement is Active = Always, and the Location
option is Entire Domain. Click Apply.

• Accept the default setting for the Small Feature Deactivation Factor.

Next, you will refine the mesh around key geometric features such as valves and the piston, walls,
and open boundaries ("continuative outflows"). The following steps show how the mesh is refined
for key geometric features. From the Mesh Controls node, you can add Point, Surface, Line, or

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 81
Gasoline Direct Injection Engine Simulation

Feature Refinements, or Small Feature Avoidance Controls. Create the refinements specified in
Table 7.1: Details of the refinement types and settings (p. 82). These are also good guidelines for
the level of refinement for your own engine simulations.

Table 7.1: Details of the refinement types and settings

Name Location Refinement Size Fraction Cell Layers Active


Type
wall Cylinder Surface 1/2 1 Always
symmetry,
exhaust-symmetry,
intake,
symmetry,
exhaust-port,
intake-port,
head, piston,
liner,
spark-plug
open Inlet, outlet Surface 1/2 2 Always
spark 0.551, 0.0945, Point (radius = 1/4 N/A Always
-0.1678 cm 0.6 cm)
valves exhaust-valve, Surface 1/4 2 Always
intake-valve
tdc1 head, piston, Surface 1/4 2 340-380 CA
liner
tdc2 head, piston, Surface 1/4 2 700-740 CA
liner

7.2.1.4. Models Setup


Chemistry: Now that the mesh has been set up, assigning models is next. Assign the chemistry

with Models ¬ Chemistry and use the Import Chemistry icon and select the file Gasol-
ine_1comp_49sp.cks from the Ansys Forte data directory. If you are curious, you can view the
chemistry details, such as chemistry source, pre-processing log, gas phase input, gas phase output,
thermodynamic input, transport input, and transport output.

• Flame Speed Model: Use Models ¬ Chemistry ¬ Flame Speed Model and select the Table Library
Option. Select Create New, then add ic8h18 as the fuel species and specify ic8h18_flame_library
as the name. For the Turbulent Flame Speed settings, keep the defaults except for Turbulent
Flame Speed Ratio (b1), which should be set to 2.0. Click Apply.

Transport: The default RNG k-epsilon model turbulence settings are used in this tutorial. Those are
specified in the Editor panel for Models ¬ Transport ¬ Turbulence. The default fluid properties are
also used, which are at Models ¬ Transport.

Spray Model: Turn on the spray model by checking the box at Models ¬ Spray Model. For Spray
modeling in Ansys Forte, you will create an Injector first, then and Injection events and Nozzles to
the injector. You can have multiple injectors in a Ansys Forte model and they can have different
fuels.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
82 of ANSYS, Inc. and its subsidiaries and affiliates.
Direct Injection Spark Ignition Engine

Create a new Solid Cone Injector and name it Solid Injector. Specify the following for the
injector:

• For Composition, select Create New... then select ic8h18 as the fuel species and specify the
mass fraction as 1.0. Specify gasoline as the name and click Save.

• Set Injection Type to Pulsed Injection and Parcel Specification to Droplet Density with a
Droplet Number Density of 1.

• Set the Inflow Droplet Temperature to 400K.

• For Spray Initialization, select Discharge Coefficient and Angle and specify the Discharge
Coefficient as 0.7 and the Cone Angle as 14.0 degrees.

• Select Rosin-Rammler Distribution for the Drop Size Distribution, use 3.5 for the Shape
Parameter and specify the Initial Sauter Mean Diameter as 120 micron.

• Specify the following for the KH and RT model constants:

– Size Constant of KH Breakup = 0.5

– Time Constant of KH Breakup = 10

– Critical Mass Fraction for New Droplet Generation = 0.03

– Activate the SMR Conservation in KH Breakup option (Note: This option is typically activated
for gasoline injections, but not for diesel injections.)

– Size Constant of RT Breakup = 0.1

– Time Constant of RT Breakup = 1.0

– RT Distance Constant = 1.9

– Activate the Use Gas Jet Model and specify 0.5 for the Gas Entrainment Constant.

Now add an Injection by clicking the Injection icon at the top of the Injector Editor panel or
by right-clicking on the Solid Injector and selecting Add > Injection. Specify the Injection Type
as Pulsed and the Timing as Crank Angle. Specify the Start of injection as 420 degrees and the
Duration as 18.4 degrees.

For the Velocity Profile, select Create New..., the click the Load CSV button. Browse to the directory
containing the tutorial files and select the file called injection_profile.csv. Clear the Read Column
Titles option as shown in Figure 7.4: Import injection profile from CSV dialog (p. 84).

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 83
Gasoline Direct Injection Engine Simulation

Figure 7.4: Import injection profile from CSV dialog

The profile should look like the image in Figure 7.5: Injection profile after import (p. 84) after import.
Specify roi_profile as the profile name.

Figure 7.5: Injection profile after import

Now that the injection event has been added, we need to specify the nozzles. The nozzles require
input for the location, direction, and nozzle hole diameter (or area). Since this is a half-symmetry
model, three nozzles will be specified.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
84 of ANSYS, Inc. and its subsidiaries and affiliates.
Direct Injection Spark Ignition Engine

On the Solid Injector panel, click the New Nozzle icon or right-click Solid Injection and click
Add > Nozzle. Name the new nozzle nozzle1.

For the Location, specify X = -5.296mm, Y = 0.634mm, and Z = 6.468mm and for Spray Direction
specify X = 3.0415mm, Y = 2.73735mm, and Z = -9.12449mm. For the Nozzle Size, select the
Diameter option and specify a nozzle diameter of 300 micron.

Now that the first nozzle has been created, copy and paste nozzle1 and name it nozzle2 using

the Copy and Paste icons. For the Location, specify X = -5.65mm, Y = 1.1885mm, and
Z = 6.5991mm and for Spray Direction specify X = 1.49781mm, Y = 5.08692mm, and Z = -
8.4782mm.

Repeat the copy and paste process by copying nozzle2 and naming it nozzle3 to create the last
nozzle. For the Location, specify X = -6.7647mm, Y = 0.72441mm, and Z = 6.1653mm and for
Spray Direction specify X = -2.90254mm, Y = 2.74977mm, and Z = -9.16592mm.

Now that all the nozzles have been created, they should appear similar to the model in Fig-
ure 7.6: Nozzles after specifying location and orientation (p. 85).

Figure 7.6: Nozzles after specifying location and orientation

Spark Ignition: Turn on the spark ignition model by checking the box at Models ¬ Spark Ignition.

The spark ignition model defaults include a Kernel Flame to G-Equation Switch Constant of 2.0,
Min. Kernel Radius for Kernel to G-equation switch of 0.1cm, Flame Development Coefficient
of 1.0, and Number of Flame Particles for Each Spark Plug of 3000.

Use the New Spark icon to create a new spark event and name it Spark.

Use Models ¬ Spark Ignition ¬ Spark to set up the details of the spark event. In the Reference
Frame, use Global Origin and Cartesian coordinates for the Location, and set X= 0.551 cm,
Y=0.0945 cm, and Z=-0.1678 cm. Select Crank Angle for Timing and Starting Angle = 705.0
degrees, Duration = 10.0 degrees. Under Spark Energy, set Energy Release Rate = 20.0 J/sec.
Accept the default 0.5 for Energy Transfer Efficiency and 0.25 mm (note that the unit is mm) for
Initial Kernel Radius. Click Apply.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 85
Gasoline Direct Injection Engine Simulation

7.2.1.5. Boundary Conditions


Boundary conditions are specified for each of the geometry elements in Boundary Conditions ¬
geometry-element-name, where geometry-element-name is each of the items under Geometry in the
Workflow tree.

Inlet: From the Boundary Conditions node, click the New Inlet icon and create an Inlet. Select
Inlet from the Location list. Select Total Pressure as the Inlet Type with a constant pressure of
8E+04 Pa. You will set the inlet composition to the correct Mass Fraction values corresponding
to the premixed fuel and air:

• o2=0.233

• n2=0.767

To do this, select Create New in the Composition drop-down list above the Location list and click
the Pencil icon. This opens the Gas Mixture panel, where you select Add Species and then
choose the species you want from the mechanism (see Figure 7.7: Gas Mixture Editor: Defining inlet
gas composition (p. 86)). You can find a species more quickly by typing (the beginning of ) the
species name to filter the list. Save the inlet gas mixture as air. You will then see a list to define
turbulence using Turbulent Kinetic Energy and Length Scale of 10000 cm2/sec2 and 1 cm, re-
spectively.

Figure 7.7: Gas Mixture Editor: Defining inlet gas composition

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
86 of ANSYS, Inc. and its subsidiaries and affiliates.
Direct Injection Spark Ignition Engine

Outlet: From the Boundary Conditions node, click the New Outlet icon and create Outlet. Select
the outlet geometry item and select the Total Pressure as the Outlet Type. Give the outlet a
Pressure of 1E+05 Pa, which arises from the back-pressure of the exhaust system with an Offset
Distance to Apply Pressure of 0.0 cm. Set the Turbulence Boundary Conditions to Turbulent
Kinetic Energy and Length Scale of 10000 cm2/sec2 and 1 cm, respectively.

Piston: From the Boundary Conditions node, click the New Wall icon and name it Piston. Select
the Piston item in the Location list. Set the Temperature Option to Constant and 485 K. Turn
ON the Wall Motion option and set the piston Motion Type to use a Slider-Crank Model with a
Stroke of 9.0 cm and a Connecting Rod Length of 14.43 cm with 0.0 Piston Offset. Change the
Movement Type to Moving Surface and accept the default Global Origin Reference Frame. For
Direction, the piston will move along the Z-direction, specify 1.0 for Z.

Intake: Click the New Wall icon and name it intake-port. Select the intake-port item in the
Location list and set the Temperature to 313 K.

Exhaust: Click the New Wall icon and name it exhaust-port. Select the exhaust-port item in
the Location list and set the Temperature to 485 K.

Liner: Click the New Wall icon and name it liner. Select the liner item in the Location list and
set the Temperature to 500 K.

Head: Click the New Wall icon and name it head. Select the head item in the Location list and
set the Temperature to 485 K.

Intake Valves: Click the New Wall icon and name it intake-valve. The valve specification is a
little more complicated than the stationary walls, such that several steps are required within the
wall panel. These steps specify the wall motion and the way we want the mesh to adapt to the gap
opening near the valve seat when the valve opens or closes.

• Select the intake-valve in the Location list.

• Check the Heat Transfer option and set the Temperature to the constant value of 400 K.

• Turn ON (check) the Wall Motion and set the Motion Type to Offset Table.

• Accept the default Global Origin for the Reference Frame. Select Cartesian for the Coord.
System under Direction for the valve motion and set X = 0.241922 cm, Y = 0.0 cm, Z =
−0.970296 cm.

• To import the lift profile (named intake_valve_lift.csv in the same location as the .stl file you
started this tutorial with), select Create New from the Lift Profile drop-down list and click the
Pencil icon. In the Profile Editor, click the Load CSV button and navigate to the in-
take_valve_lift.csv file. Clear the Read Column Titles option and press OK. At the bottom of
the Profile Editor window, name this intake_valve_lift. Ensure that the units in the first column
are set to Angle and the second column for Distance is set to m. Save the Profile.

• For Movement Type, change the pull-down menu to Valve. Then select just the surface
boundary portion of the valve that comes into contact with the valve seat on the head, as well

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 87
Gasoline Direct Injection Engine Simulation

as the surface boundary that contains the seat region. In this case, select both the head and the
intake-valve.

• Finally, set the Valve Motion Activation Threshold to 0.02 cm. This indicates that the valve will
not open until the lift value specified in the valve-lift profile exceeds this threshold. A smaller
value will cause the valves to open sooner, but the mesh refinement required to resolve the gap
will be higher. This is a trade-off that will need to be determined based on the goals and outcomes
desired from the simulation. In addition to the activation threshold, you may also change the
minimum number of cells desired at the smallest gap opening. In this case, specify the Approx.
Cells in Gap at Min. Lift as 1.5.

Exhaust Valves: Click the New Wall icon and name it exhaust-valve. New Wall icon and
name it exhaust-valve. Follow a similar procedure as for the Intake Valves. This time, select the
exhaust-valve item in the Location list and set the Temperature to 777 K Turn ON the Wall
Motion and set the Motion Type to Offset Table. Select Global Origin for the Reference Frame.
Select Cartesian for the Coord. System under Direction and set X = -0.327218 cm, Y = 0.0 cm,
and Z = -0.944949 cm. Similarly to the intake valves, first import the .csv (named ex-
haust_valve_lift.csv) file, clear the Read Column Titles option, and name it exhaust_lift_profile.
Then follow the same procedures for specifying the Movement Type to Valve, selecting the Valve
Seat and Surface it Contacts (exhaust-valve and head), and setting the Valve Motion Activation
Threshold to 0.02 cm. Specify the Approx. Cells in Gap at Min. Lift as 1.5.

Symmetry: Click the New Symmetry icon and name it symmetry. Select the cylinder-symmetry,
exhaust-symmetry, and intake-symmetry item in the Location list.

Spark Plug: Click the New Wall icon and name it spark-plug. Select the spark-plug item in
the Location list and set the Temperature to 485 K.

7.2.1.6. Initialization
The domain is initialized with the operating conditions, species concentrations and temperatures.
The Default Initialization species composition is at the expected exhaust composition, assuming
complete combustion. The intake and exhaust must also be initialized to the boundary condition
values. Set the following initialization parameters:

Default Initialization:

• Select Default Initialization in the Workflow tree. Set the Initialization Order to 2. Since flow
goes generally from the intake to the cylinder and then to the exhaust, this indicates that this
default (cylinder) region will be the second in the initialization order precedence list.

• We will use the Ansys Forte Composition Calculator to compute the exhaust gas composition.
Under Utility, select the IVC Calculation command in the ribbon or menu. In the Composition
calculation, specify the Fuel Mass (27 mg), select the fuel mixture in the Liquid input, for Air
Flow specify Phi and set Phi = 1.0, EGR Fraction = 0.0, and for Internal EGR select the Estimate
from CR and specify a CR of 10. Next, set the Calculate option to Exhaust and click Create
Mixture. Specify a name of exhaust_gas. In the Initial Conditions, select exhaust_gas for the
Composition.

• Set a Temperature of 1,070 K and the Pressure to 1.05359E+05 Pa.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
88 of ANSYS, Inc. and its subsidiaries and affiliates.
Direct Injection Spark Ignition Engine

• The Turbulence initialization uses the Turbulent Kinetic Energy and Length Scale option with
values 10,000 cm2/sec2 and 1.0 cm, respectively.

• The Velocity is initialized using Velocity Components and all the values are set to zero.

• Click Apply.

Intake Initialization: The intake manifold Initial Condition is set to match the Boundary Condition
at the Inlet. Since this is a separate port that can be closed off from the main cylinder region, we
also need to set the equivalent of a material point to identify the region, as well as an initialization
order that helps determine what region takes precedence in initializing new cells that appear when
gaps are opened.

• From the Initial Conditions Workflow tree item, select the New Port Initialization icon and
name it intake.

• To identify the region, select a point for the Location under the Reference Frame selection,
which is a point that will always be within the Intake port. Set the coordinates for this case to
X=-5.6838, Y=1.4295, Z=4.2858 cm, which is a point just inside the inlet.

• Set the Initialization Order to 1. Flow is expected to go from the intake to the main region; for
this reason, we give it the first order in initialization precedence.

• Set the Composition by selecting in the previously saved profile, air. Set the Temperature to
313 K and Pressure to 8.0E+04 Pa. The Turbulence initialization uses Turbulent Kinetic Energy
and Length Scale option set to 10,000 cm2/sec2 and 1.0 cm, respectively. Click Apply.

Exhaust Initialization: The Initial Condition of the Exhaust is set to match the Boundary Condition
of the Outlet.

• From the Initial Conditions Workflow tree item, select the New Port Initialization icon and
name it exhaust.

• To identify the region, select a point for the Location under the Reference Frame selection,
which is a point that will always be within the ExhaustPort region. Set the coordinates for this
case to X=4.7892, Y=1.5061, Z=3.1552 cm, which is a point just inside the outlet.

• Set the Initialization Order to 3. Flow is expected to go from the cylinder to the exhaust port;
for this reason, we give it the last order in initialization precedence for the 3 regions defined.

• Set the Composition to the existing profile, exhaust_gas. Set the Temperature to 1070K and
Pressure to 1.0E+05 Pa.

• The Turbulence initialization uses the Turbulent Kinetic Energy and Length Scale option; these
are set to 10,000 cm2/sec2 and 1.0 cm, respectively. Click Apply.

7.2.1.7. Simulation Controls


Simulation controls allow you to define the simulation limits, RPM, time step, chemistry solver, and
transport terms.

Simulation Limits: Use the Simulation Controls panel to select a Crank Angle- based simulation
from a CA of 328 to 880.2 degrees. Set RPM = 2,000 rpm. The engine Cycle Type is 4-Stroke.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 89
Gasoline Direct Injection Engine Simulation

Time Step: Use Simulation Controls ¬ Time Step and set the following parameters:

• Initial Simulation Time Step to 5.0E-7 seconds

• Max. Crank Angle Delta Per Time Step of 1.1 degrees

• Set the Max. Time Step Option to Constant and set the value of Max. Simulation Time Step
to 1.E-5 sec. The time step will be adaptively determined throughout the simulation, based on
local solution gradients, so this just sets the maximum value allowed. You may also consider re-
ducing the time-step using the Time Varying option. This can be helpful for injection and spark
events.

The Advanced Time Step Control Options settings are kept at the defaults:

• Time Step Growth Factor = 1.3

• Fluid Acceleration Factor = 0.5

• Rate of Strain Factor = 0.6

• Convection factor = 0.2

• Internal Energy Factor = 1.0

• Max. Convection Subcycles = 8

Chemistry Solver: Simulation Controls ¬ Chemistry Solver is also kept at the defaults, with the
following parameters:

• Absolute Tolerance = 1.0E-12

• Relative Tolerance = 1.0E-5

• Use Dynamic Cell Clustering to take advantage of groups of cells with similar conditions. Select
2 features to introduce Dynamic Cell Clustering: 1) Max. Temperature Dispersion of 10 K and
2) a Max. Equilibrium Ratio Dispersion of 0.05.

• To increase the time-to-solution speed, you have the ability to choose when chemistry is activated.
In this tutorial, select Activate Chemistry Conditionally, turn on (check) After First Spark Event,
and select When Temperature is Reached with Threshold Temperature 600 K and also select
During Crank Angle Interval between 670 and 880 Crank Angle. This ensures that chemistry
is active during the time that combustion is expected even if temperature does not rise above
600 K. Click Apply.

Transport Terms: Use the default transport tolerances and maximum number of iterations.

7.2.1.8. Output Controls


Output controls determine what data are stored for viewing during the simulation and for creating
plots, graphs, and animations in Ansys Forte Visualize, CFD-Post, or EnSight.

Spatially Resolved: Allows you to control when spatially resolved data such as velocity, temperature,
species concentrations, etc., will be output. In the Spatially Resolved panel, set the Crank Angle
Output Control to report every 100 degrees (to manage the size of the output file). You can op-

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
90 of ANSYS, Inc. and its subsidiaries and affiliates.
Direct Injection Spark Ignition Engine

tionally increase the frequency of output during the cycle by selecting User Defined Output
Control and importing the spatial_output.csv file, which has a list of specific crank angles where
spatially resolved output will occur. Alternatively, you could select User Defined Output Control,
and use the Profile Editor to create some other file specifying an output crank-angle profile (the
provided profile is illustrated in Figure 7.8: Profile of spatially resolved output control data (p. 91)).
Keep the default species and solution variables selected for output. Reducing the variables selected
will help reduce file sizes.

Figure 7.8: Profile of spatially resolved output control data

Spatially Averaged: Allows you to control the output of values that are averaged across the domain.
On the Spatially Averaged panel, set the Crank Angle Output Control to reporting every 1 degree.
Keep the default species and solution variables selected for output.

Restart Data: If you anticipate that the case will be stopped and you want the ability to restart it
from the last time step solved, select Output Controls ¬ Restart Data. You can specify certain Restart
Points using a separate file. Turn on (check) User Defined Restart Points and use the Profile Editor
to create a Restart profile. You can view, edit, or import new Restart Points in this 1-D Profile Editor.
Sometimes it is helpful in spark ignition cases to save a restart file after IVC but before the spark
occurs (CA=687 in this case) so you can use the compression portion of the cycle as a start point
in additional runs. Create a new profile for this purpose called restart_output and add two lines
with CA value set to 415 and 700 which correspond to points just before injection and spark timing.

7.2.1.9. Preview Simulation


You can view the profiles for the Piston, Intake Valves, Exhaust Valves, and Mesh Refinement during
the simulation by selecting Preview Simulation > Boundary Motion > Simulation Preview. This is
an excellent way to check whether you have valve overlap and that the settings are correct.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 91
Gasoline Direct Injection Engine Simulation

As a method for checking the automatically generated mesh, you can generate a Preview Mesh.
Select Preview Simulation ¬ Mesh Generation. Select Crank Angle as the Time Option and set it
to 720.0 CA. Name the Data Set. Check the Include Volume Mesh option and then click the

Generate Mesh icon. Next click the Data Set name for viewing in EnSight. If you want to see
the cut plane where the mesh will be generated, create a clip plane in EnSight. It is a good practice
to look at meshes at key points in the cycle such as Firing Top Dead Center (FTDC), Exhaust Valve
Opening (EVO), Intake Valve Closed (IVC), Intake Valve Open (IVO) and Exhaust Valve Closed (EVC).

7.2.1.10. Run Simulation


To complete the lesson, select Run Simulation on the Workflow tree and, once Ansys Forte displays
the green START button on the Run Simulation panel and reports a "Ready" status, click Start. You

can monitor the results by clicking on the Monitor Runs icon. In the Monitor window that
opens, you can select the run you want to monitor. Open the Ansys Forte Monitor dialog, then select
Pressure under the thermo.csv grouping. The pressure trace should look like the one in Fig-
ure 7.9: Pressure trace result from Forte (p. 92).

Figure 7.9: Pressure trace result from Forte

7.2.1.11. Run Settings


The settings here depend on the system and environment for your simulations. The default for the
Run Settings panel is to have nothing selected.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
92 of ANSYS, Inc. and its subsidiaries and affiliates.
Direct Injection Spark Ignition Engine

Run Options: Under Job Script Options, change Default Run Type to Parallel and change the
default MPI Arguments to 8. (If you do not have MPI installed and configured, keep the default of
a serial run.)

Windows Settings: Under Job Script Options, change Default Run Type to Parallel.and change
the default MPI Arguments to 8. (If you do not have MPI installed and configured, keep the default
of a serial run.).

Linux Settings: This tutorial does not require changes to this panel’s defaults; adjust them as ne-
cessary for your environment.

7.2.2. Results
To view the results of the simulation, open the results in Ansys EnSight. In EnSight, open the solution
file for the case (Nominal.ftind). Figure 7.10: Screen view of the solution file in CFD-Post (p. 93) shows
the screen view once the solution file has been loaded.

Figure 7.10: Screen view of the solution file in CFD-Post

To visualize the spray injection into the chamber, check (turn ON) the Spray in the part list as in
Figure 7.11: Turning on the spray particles (p. 94).

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 93
Gasoline Direct Injection Engine Simulation

Figure 7.11: Turning on the spray particles

When the spray is activated, all the particles will be a single color. Select and right-click Spray, then
Color by > Select variable and then choose Spray Particle Radius as the variable. Right-click the
Spray item and click Edit. Check (turn ON) the advanced option at the top right, then click Node,
element and line. For Node representation, select Sphere as Type, Scalar as Size by and
Spray_Particle_Radius. You can adjust the scale of the spray particles by using the Scale option. In
this case, a crank angle of 430.055 is specified. To do this, drag the variable Crank_Angle from the
Variable list > Constants > Crank Angle. With these changes, the spray should resemble Fig-
ure 7.12: Spray particles in the combustion chamber (p. 95).

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
94 of ANSYS, Inc. and its subsidiaries and affiliates.
Direct Injection Spark Ignition Engine

Figure 7.12: Spray particles in the combustion chamber

Finally, you may also want to visualize the location of the flame front for spark ignited engines. To
visualize the position of the flame, you must create an isosurface. To create an isosurface, select
VolumeCells and click Create > Isosurface. Use G as the Variable and set the value to 0.0. Click
Create with selected parts. Color the isosurface for a clear view. To see the flame location, the spe-
cified crank angle must be after the spark timing, such as at 728CA, as in Figure 7.13: Iso-surface of
the flame showing the flame location at 728CA (p. 96).

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 95
Gasoline Direct Injection Engine Simulation

Figure 7.13: Iso-surface of the flame showing the flame location at 728CA

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
96 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 8: Two-Stroke Engine Simulation
This tutorial describes how to use Ansys Forte CFD to simulate combustion for a two-stroke marine
engine with intake and exhaust ports. Details on how to use Ansys Forte's automatic mesh generation
with sliding interfaces, a requirement for 2-stroke engines, is discussed. The tutorial also demonstrates
profile creation and the import and loading of an .stl file to start the simulation from the geometry.

8.1. Data Provided


The following sections describe the provided files, time required, prerequisites, and a utility for comparing
your generated project file (.ftsim) with the one provided in the tutorial download.

8.1.1. Files Used in This Tutorial


The files for this tutorial are obtained by downloading the two_stroke.zip file here.

Unzip two_stroke.zip to your working folder.

• FORTE-2stroke .ftsim:A project file of the completed tutorial, for verification or comparison of your
progress in the tutorial set-up. The project file includes all the relevant geometry, chemistry set,
and spray profile details.

• intake_pressure_profile.csv and exhaust_pressure_profile.csv: Two files of data describing the


profile of the time-varying pressure for the intake and exhaust.

• time_step_size.csv: Adaptive time-step profile.

• output_crank_angles.csv: Profile of crank-angle points for spatially resolved output.

• FORTE_2stoke.stl: Geometry file for the 2-stroke engine in this project without the chemistry set,
spray profile, and other project details. (Optional)

• restart_crank_angles.csv: Profile defining restart points. (Optional)

• Nom-VelMag_Vector-Centerline.avi: An animation showing the velocity magnitude and piston


motion of the meshed system. (Optional)

The tutorial sample file is provided as a download. You have the opportunity to select the location
for the file when you download and uncompress the sample files.

Note:

This tutorial is based on a fully configured sample project that contains the tutorial project
settings. The description provided here covers the key points of the project set-up but is
not intended to explain every parameter setting in the project. The .ftsim file has all custom

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 97
Two-Stroke Engine Simulation

and default parameters already configured; the text highlights only the significant points
of the tutorial.

8.1.2. Project Comparison Utility


The Ansys Forte installation includes the cgns_util export command, which you can use to
compare the parameter settings in the project file generated at any point during your tutorial set-up
against the provided .ftsim , which has the parameter settings for the final, completed tutorial. This
command is described in the Ansys Forte User Guide.

Briefly, you can double-check project settings by saving your project and then running the cgns_util
to export your tutorial project, and then to export the provided final version of the tutorial. Save both
versions and compare them with your favorite diff tool, such as DIFFzilla. If all the parameters are in
agreement, you have set up the project successfully. If there are differences, you can go back into
the tutorial set-up, re-read the tutorial instructions, and change the setting of interest.

8.1.3. Time Estimate


As a guideline for your own simulations, this tutorial is estimated to take approximately 3.9 hours
using the Intel® Xenon® processor E5-2690 at 2.6 GHz (56 total cores).

8.1.4. Prerequisites for This Tutorial


We recommend starting with the Ansys Forte Quick Start Guide , which explains the workflow of the
Ansys Forte user interface, before doing this tutorial.

8.2. Two-Stroke Marine Engine Project Setup


The next sections describe the problem, including how to set up the simulation that is represented in
the provided .ftsim file, and some results relating to surfaces, spray, and flame, that you can generate.

8.2.1. Problem Description


In this case, a full 3-D geometry is used to simulate a 2-stroke marine engine, including combustion.
The fuel in this engine is gasoline and is direct-injected into the combustion chamber.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
98 of ANSYS, Inc. and its subsidiaries and affiliates.
Two-Stroke Marine Engine Project Setup

Figure 8.1: Components of direct-injection two-stroke engine simulation project

The FORTE_2stroke.ftsim project file has been preconfigured with all the information that will be
discussed in this section. You do not need to input any values but can just follow along, reading the
instructions and viewing the settings in the loaded .ftsim . This chapter nevertheless explains step-
by-step the process of setting up the project, as an illustration of the features in the user interface.

Open the project file, FORTE_2stroke.ftsim, from the location where you stored the downloaded
tutorial files.

In this tutorial, we will import an existing geometry into Ansys Forte and set up the automatic mesh
generation using a global mesh size and adapting the mesh near the valves. To import the geometry,
go to the Workflow tree and click Geometry. This opens the Geometry icon bar. Click the Import

Geometry icon. In the resulting dialog, pull down and select Surfaces from STL file. In the dialog
that opens with STL file import options, accept the defaults.

The mesh will be automatically generated during the simulations. When the file browser launches,
navigate to the folder Tutorial_2stroke, then select FORTE-2stroke.stl. Note that once
you have imported the geometry, there are a number of actions that you can perform on the items
in the Geometry node, such as scale, rename, transform, invert normals, or delete geometry elements.

The Geometry imports in an opaque mode and possibly preset zoom level. It is often helpful to Refit

the view or use the mouse wheel to re-zoom. To change opacity, right-click the Geometry node
in the Workflow tree and select Medium for the Opacity level of all geometry elements, as shown in
Figure 8.2: Two-stroke geometry after import (p. 100).

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 99
Two-Stroke Engine Simulation

Figure 8.2: Two-stroke geometry after import

8.2.1.1. Two-Stroke Engine Details


A simple engine configuration is used in this tutorial for demonstration purposes. The details of
the configuration and simulation settings are presented here.

Table 8.1: Details of the diesel engine geometry used in this tutorial

Item Value Units


Cycle type 2-stoke
Fuel injection system Direct injection, hollow core
Compression ratio 12.65
Bore 8.58 cm
Stroke 6.73 cm
Squish 13.97 cm
Fuel Gasoline

The mesh is created using the Automated Mesh Generator in Ansys Forte. The values described in
Table 8.1: Details of the diesel engine geometry used in this tutorial (p. 100) can be accessed from
the FORTE_2stroke.ftsim project file. If you did not already have a pre-configured geometry, you
could import a Fluent Mesh file, STL, KIVA-3V, or CGNS geometry file. Fluent Mesh files are the
preferred format for importing geometry because they are guaranteed to be water-tight. The Fluent
Mesh file can be created as a surface mesh for the geometry in Ansys Meshing.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
100 of ANSYS, Inc. and its subsidiaries and affiliates.
Two-Stroke Marine Engine Project Setup

8.2.1.2. Automatic Mesh Generation Setup


Material Point: On this panel, we must set the point that defines where Ansys Forte will mesh.
This point, the Material Point, must always lie inside the geometry during the entire cycle and
should be located at least one unit cell length away from any boundaries. On the Material Point
Editor panel, define the point’s location as X = 0.0, Y = 0.0, Z = 6.9 cm.

Global Mesh Size: Set the Global Mesh Size to 2.0 mm. Other Mesh Controls should be set to
these values:

Table 8.2: Settings for Mesh Control refinements

Item Refinement Refinement Refinement Refinement Crank angle


type location level layers active range
AllSurfaces Surface All walls 1/2
Refinement except inlets
and outlet
OpenBound- Surface Inlets and 1/2 2 layers
aries Refinement Outlet
TDC Surface Head and 1/4 2 layers 350° - 370°
Refinement Piston Top
PortWalls2 Surface Intake and 1/2 2
Refinement Exhaust Port
Combustion Point (0.0, 0.0, 1/2 274° - 400°
6.0) cm

Radius of
4.4 cm
Coarse Fea- Feature Feature 1/2
ture angle
=60°

Feature
Radius of
application
=7.0 mm

Intake/Exhaust
Port,
Liner,
Piston
Skirt,
Piston
Top
Fine Feature Feature Feature 1/4
angle
=60°

Feature
radius of

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 101
Two-Stroke Engine Simulation

Item Refinement Refinement Refinement Refinement Crank angle


type location level layers active range
application
=2.0 mm

Liner,
Piston
Skirt,
Piston
Top
SAM-G-kernel SAM using Entire domain 1/8 319° - 330°
solution field
G

Bounds =
Absolute
Range
with
bounds
of -0.3,
0.3
SAM-G SAM using Entire domain 1/4 315° - 400°
solution field
G

Bounds =
Absolute
Range
with
bounds
of -0.3,
0.3

8.2.2. Chemistry Set Details


Chemistry: Now that the mesh has been set up, assigning models is next. Assign the chemistry using

Models ¬ Chemistry and use the Import Chemistry icon and select the file Gasol-
ine_1comp_49sp.cks from the Ansys Forte data directory. If you are curious, you can view the
chemistry details, such as chemistry source, pre-processing log, gas phase input, gas phase output,
thermodynamic input, transport input, and transport output.

Flame Speed Model: On the Workflow tree, use Models ¬ Chemistry ¬ Flame Speed Model and select
the Table Library Option. Select Create New, then add ic8h18 as the fuel species and specify
iso_octane as the name. Click Save. Close the Library Editor panel. For the Turbulent Flame Speed
settings, keep the defaults. Click Apply.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
102 of ANSYS, Inc. and its subsidiaries and affiliates.
Two-Stroke Marine Engine Project Setup

8.2.3. Transport Property Settings


The default values are used in the Transport property panel. In the Transport ¬ Turbulence panel, the
RNG k-epsilon model is used, with default values.

8.2.4. Spray Model Settings


Models ¬ Spray Model: Since this is a direct-injection case, turn ON (check) Spray Model in the
Workflow tree to display its icon bar (action bar) in the Editor panel. In the panel, keep the defaults.
Leave the Use Vaporization Model (default) check ON.

Add an Injector: The icon bar provides two spray-injector options: Hollow Cone or Solid Cone. For

this injector, click the Hollow Cone icon. In the dialog that opens, name the new hollow-cone
injector as Hollow Cone Injector. This opens another icon bar and Editor panel for the new hollow-
cone injector. In the Workflow tree under the Hollow Cone Injector node, add a Nozzle and an Injection.
You can either right-click the Hollow Cone Injector node and select Add or select that Workflow tree
item or use the icons in the panel’s action bar.

On the Hollow Cone Injector panel, create a new Composition, select ic8h18 (iso-octane) in the
Species list, specify the physical properties as iso-octane, and specify the Mass Fraction as 1.0. Use
iso-octane for the Vaporization properties and name the Composition gasoline. Click Save.

For the injection, specify the following parameters:

Table 8.3: Injection settings used in this tutorial

Input Value Units


Injected Parcel Count 3000 -
Inflow Droplet Temperature 363 K
Injection Pressure 51.7 bar
Inwardly Opening Nozzle Checked (ON) -
Mean Cone Angle 54.0 degrees
Liquid Jet Thickness 15.0 degrees
Droplet Size Distribution Rosin-Rammler Distribution -
Shape Parameter 3.5 -
Breakup Length Model Constant 12.0 -

With the Hollow Cone Injector selected, add a Nozzle to the injector by clicking the New Nozzle
icon. On the Nozzle Editor panel, set the parameters as described in Table 8.4: Nozzle settings used
in this tutorial (p. 103). Click Apply. You can see the nozzle appear at the top of the geometry. (You
may want to make the Geometry non-opaque or change the color of the nozzle itself by right-clicking
in the Workflow tree and selecting Color or Opacity to make the nozzle easier to see in the interior.)

Table 8.4: Nozzle settings used in this tutorial

Location
Reference Frame Global origin

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 103
Two-Stroke Engine Simulation

Coordinate system Cartesian


X 0.0 cm
Y 0.0 cm
Z 9.221 cm
Spray Direction
Reference Frame Global origin
Coordinate System Spherical
Θ 180 degrees
Φ 0.0 degrees
Nozzle Size
Nozzle Area 0.001647 cm2

Injection: On the Injection panel, specify the Start of Injection as 275 degrees, the Duration of
Injection as 12.42 degrees, specify the Velocity Profile as a Square Profile, and the Injected Mass
as 0.007292 g.

Spark Ignition: Turn on the spark ignition model by checking the box at Models ¬ Spark Ignition.
Keep the defaults for the Spark Ignition settings.

Use the New Spark icon to create a new spark event and name it Spark.

Use Models ¬ Spark Ignition ¬ Spark to set up the details of the spark event. In the Location, for
Reference Frame, use Global Origin and Cartesian coordinates for the Location, and set X= 1.233
cm, Y=0.0 cm, and Z=7.76 cm. Select Crank Angle for Timing and Starting Angle = 319.0 degrees,
Duration = 9.0 degrees. Under Spark Energy, set Energy Release Rate = 25.0 J/sec. Accept the
default 0.5 for Energy Transfer Efficiency and 0.5 mm (note that the unit is mm) for Initial Kernel
Radius. Click Apply.

8.2.5. Boundary Conditions


Boundary conditions specify inlets, outlets, and walls. Once you create one boundary condition, you

can copy and paste it (using the Copy and Paste icons on the icon bar in the Editor panel),
then modify it to create a second boundary condition. Select a boundary surface, either from the list

in the workflow tree or using the Select from Screen tool to pick a surface in the 3-D View to
associate with a boundary condition.

Inlet: From the Boundary Conditions node, in the Editor panel, click the New Inlet icon and create
an Inlet named Inlet1. At the top of the Editor panel, select Create New... for the Composition. Click
the Add Species button and then select o2 (oxygen) and n2 (nitrogen) as the species. Specify Mass
Fraction of 0.23 for o2 and 0.77 for n2, as shown in Figure 8.3: Composition editor specifying inlet
Air mixture (p. 105). Name the composition Air and click Save then Close.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
104 of ANSYS, Inc. and its subsidiaries and affiliates.
Two-Stroke Marine Engine Project Setup

Figure 8.3: Composition editor specifying inlet Air mixture

In the Editor panel, select inlet1 from the Location list. Select Total Pressure, Time Varying as the
Inlet Option. For the pressure profile, select Create New and import the pressure profile using the
Load CSV option. The name of the pressure profile is intake_pressure_profile.csv. On the Load CSV
dialog, clear (deselect) the Read Column Titles option (because the file does not contain any column
titles), as shown in Figure 8.4: Import CSV data for pressure profile (p. 105). The unit for Column 1
should be Angle and degrees and for Column 2 the units should be Pressure and bar.

Figure 8.4: Import CSV data for pressure profile

The pressure profile should look like the profile shown in Figure 8.5: Importing the intake pressure
profile (p. 106).

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 105
Two-Stroke Engine Simulation

Figure 8.5: Importing the intake pressure profile

Define Turbulence using values for Turbulent Kinetic Energy and Length Scale of 3,600 cm2/sec2
and 1.0 cm, respectively. On the Editor panel, accept Assume Isentropic for the Temperature Value
Type. Click Apply.

Now that the first inlet has been created, copy and paste inlet1 and name it inlet2 using the Copy

and Paste. icons. Repeat this step to create inlet3. Update the Location to inlet2 and inlet3,
respectively, for each new boundary condition, inlet2 and inlet3.

Outlet: From the Boundary Conditions node, go to the Editor panel and click the New Outlet
icon and create Outlet. Select Total Pressure, Time Varying as the Outlet Option. For the pressure
profile, select Create New and import the pressure profile using the Load CSV option. The name of
the pressure profile is exhaust_pressure_profile.csv. On the Load CSV dialog, deselect the Read
Column Titles option, because the file does not contain any column titles. The unit for Column 1
should be Angle and degrees, and for Column 2 the units should be Pressure and bar. Set the
Turbulence Boundary Conditions to Turbulent Kinetic Energy and Length Scale of 3600 cm2/sec2
and 1 cm, respectively.

Piston: From the Boundary Conditions node, go to the Editor panel and click the New Wall icon
and name it Piston_Moving. Select the piston_top item in the Location list. Set the Temperature
Option to Constant and 450 K. Turn ON the Wall Motion option and set the piston Motion Type
to use a Slider-Crank with a Stroke of 6.73 cm and a Connecting Rod Length of 13.97 cm with

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
106 of ANSYS, Inc. and its subsidiaries and affiliates.
Two-Stroke Marine Engine Project Setup

0.0 Piston Offset. To set the axis for translation, under Direction, the Reference Frame is Global
Origin and the Coordinate System is Cartesian. Set X=0.0 cm, Y=0.0 cm, Z=1.0 cm. Change the
Movement Type to Sliding Interface and select the liner and piston_skirt from the list of surfaces.
For this setting, the moving piston should be selected along with the surface it is sliding/moving
past.

Note:

The RPM is specified on the Simulation Controls Editor panel.

Intake: Click the New Wall icon and name it IntakePort. Select the intake_port item in the
Location list and turn ON the Heat Transfer option and set the Temperature to 300 K.

Now reproduce the Intake Port with Copy and Paste four times to create four new
boundaries as detailed in the following table.

Table 8.5: Details of boundaries created from Copy and Paste operations

Item Boundary Name Location Boundary Condition


1 ExhaustPort exhaust_port Wall Model=Law of
the Wall

Twall=490 K

Heat Transfer=ON
2 Liner cylinder_bottom Wall Model=Law of
the Wall
liner
Twall=400 K

Heat Transfer=ON
3 Head dome Wall Model=Law of
the Wall
head
Twall=400 K

Heat Transfer=ON
4 Piston_Anchored piston_bottom Wall Model=Law of
the Wall
piston_skirt
Twall=450 K

Heat Transfer=ON

8.2.6. Initial Conditions


The domain is initialized with the operating conditions, species concentrations and temperatures.
The Default Initialization species composition is at the expected exhaust composition, assuming

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 107
Two-Stroke Engine Simulation

complete combustion. The intake and exhaust must also be initialized to the boundary condition
values. Set the initialization parameters as described in the following sections.

Initialization Order: When looking at the piston in the TDC position, each isolated region should
have an initialization region with a material point specified, which is typically the combustion chamber,
the exhaust port, and the intake port. In many cases, there will be multiple intake regions that will
require their own initialization, as in this case.

For 2-stroke engine cases, the combustion chamber should have an initialization order of 1. The intake
ports should then have initialization orders of 2, 3, and 4, respectively. Lastly, the exhaust port would
have an initialization order of 5.

Default Initialization:

• Select Default Initialization in the Workflow tree. In the Editor panel, set the Initialization Order
to 1. (For 2-stroke engines, the combustion chamber should have an Initialization Order of 1.)
Select Create New in the Composition drop-down list and click the Pencil icon. This opens the
Gas Mixture panel, where you select Add Species. Set a Mass Fraction of o2=0.1123911,
n2=0.7421674, co2=0.0996009, and h2o=0.0458404, and Save this composition as Exhaust_Est.
On the Editor panel, set a Constant Temperature of 1,220 K and a Constant Pressure of 2.7 bar.

• The Turbulence initialization uses the Constant option and the Turbulent Kinetic Energy and
Length Scale option with values 3,600 cm2/sec2 and 1.0 cm, respectively.

• The Velocity is initialized by usingConstant Velocity and selecting Velocity Components and
accepting defaults.

• Click Apply.

Intake Initialization: The intake Initial Condition is set to match the Boundary Condition at the Inlet.
Since this is a separate port that can be closed off from the main cylinder region, we also need to
set the equivalent of a material point to identify the region, as well as an initialization order that helps
determine what region takes precedence in initializing new cells that appear when gaps are opened.

• From the Initial Conditions Editor panel, select the New Secondary Region From Material Point
icon and name it Intake1.

• To identify the region, select a point for the Location under the Reference Frame = Global Origin
selection, which is a point that will always be within the Intake1 port. Set the Cartesian and the
coordinates to X=0.0, Y=6.0, Z=1.2 cm, which is a point just inside the inlet.

• Set the Initialization Order to 2. Initialization order follows flow order.

• Set the Composition by selecting in the previously saved profile, Air. Set the Temperature to
Constant and 300 K and Pressure to Constant and 1.013 bar. The Turbulence initialization is
Constant and uses the Turbulent Kinetic Energy and Length Scale option set to 3,600 cm2/sec2
and 1.0 cm, respectively. The Velocity is initialized by using Constant Velocity and Velocity
Components and accepting defaults. Click Apply.

• Copy and Paste Intake1 twice, naming the new initializations Intake2 and Intake3. All
the settings are the same, except for the Initialization Order and Location:

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
108 of ANSYS, Inc. and its subsidiaries and affiliates.
Two-Stroke Marine Engine Project Setup

Intake Coordinates Initialization Order


#
Intake2 X= -4.8, Y=0.0, Z= -1.0 cm 3
Intake3 X=0.0, Y= -5.0, Z=1.2 cm 4

Exhaust Initialization: The Initial Conditions of the Exhaust are set to match the Boundary Condition
of the Outlet.

• From the Initial Conditions panel, select the New Secondary Region from Material Point icon
and name it ExhaustPort.

• To identify the region, select a point for the Location under the Reference Frame selection, which
is a point that will always be within the ExhaustPort region. Set the coordinates for this case to
X=6.0, Y=0.0, Z=1.4 cm.

• Set the Initialization Order to 5. Flow is expected to go from the cylinder to the exhaust port; for
this reason, we give it the last order in initialization precedence for the 5 regions defined.

• Set the Composition to Constant and the existing profile, Exhaust_Est. Set the Temperature to
490 K and Pressure to a Constant 0.981 bar.

• The Turbulence initialization uses a Constant Turbulent Kinetic Energy and Length Scale option;
these are set to 3,600 cm2/sec2 and 1.0 cm, respectively. Click Apply.

• The Velocity is initialized using Constant Velocity and selecting Velocity Components and ac-
cepting defaults. Click Apply.

8.2.7. Simulation Controls


Simulation controls allow you to define the simulation limits, RPM, time step, chemistry solver, and
transport terms.

Simulation Limits: Ansys Forte uses adaptive time stepping, with user-specified initial time step and
maximum time step. Use Crank Angle-based limits, the simulation Start Crank Angle (that is, Initial
Crank Angle, under Simulation Controls in the Workflow tree) is set to 97.0 degrees ATDC, and the
simulation Final Simulation Crank Angle is set to +455 degrees ATDC. Set RPM to 2,000.0 rpm
and Cycle Type to 2-Stroke.

Time Step: Ansys Forte uses adaptive time stepping, with user-specified initial time step and maximum
time step. Use Simulation Controls ¬ Time Step and accept the defaults except:

• Set the Max. Time Step Option to Time Varying, and set up a profile to control the variation in
time steps. This allows the maximum time step to be reduced at times of high interest, such as the
spark and injection, and decreased during other intervals. In the drop-down list for Max Time Step
Profile, select Create New and click the Pencil icon. Because this is a 2-stroke engine, the sim-
ulation should run from 0 to 360 CA degrees. After setting the following parameters, click Save.

Column 1 Column 2
Units = Angle and de- Units = Time and sec
grees

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 109
Two-Stroke Engine Simulation

Column 1 Column 2
0.0 1.00E-5
215.0 1.00E-5
216.0 5.00E-6
360.0 5.00E-6
Name of profile: TimeSteps

The Editor panel for creating the profile will resemble Figure 8.6: TimeSteps profile for Max Time Step
Profile (p. 110).

Figure 8.6: TimeSteps profile for Max Time Step Profile

Chemistry Solver: Simulation Controls ¬ Chemistry Solver is also kept at the defaults for the following
solver tolerances:

Do not activateDynamic Adaptive Chemistry. DAC should not be used for this case since there are
fewer than 500 species. For cases with 500+ species, DAC may provide additional speedup in the
simulation.

• Use Dynamic Cell Clustering to take advantage of groups of cells with similar conditions. Select
2 features to introduce Dynamic Cell Clustering: 1) Max. Temperature Dispersion of 10 K and 2)
a Max. Equilibrium Ratio Dispersion of 0.05.

• To increase the time-to-solution speed, you have the ability to choose when chemistry is activated.
In this tutorial, select Activate Chemistry Conditionally, turn ON (check) After Fuel Injection
Starts, and select When Temperature is Reached with Threshold Temperature = 600 K. This
ensures that chemistry is active during the time that combustion is expected. Click Apply.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
110 of ANSYS, Inc. and its subsidiaries and affiliates.
Two-Stroke Marine Engine Project Setup

8.2.8. Output Controls


Output controls determine what data are stored for viewing during the simulation and for creating
plots, graphs, and animations in Ansys Forte Visualize, CFD-Post, or EnSight.

The following species are named in both the Spatially Resolved and Spatially Averaged and Spray
Output Control Editor panels, to be written to the results file. Fuel, oxidizer, and common emissions
species are automatically added. Move these species into the Selection list.

• n2

• o2

• co2

• h2o

• co

• no

• no2

• ic8h18

The spatially resolved values are output at intervals of 20 crank angles, and the spatially averaged
values every 1.0 crank angle. On each of the panels, click Apply.

Output Controls ¬ Spatially Resolved: On this Editor panel, you can also optionally increase the
frequency of output during the cycle by selecting User Defined Output Control and importing the
output_crank_angles.csv file, which has a list of specific crank angles where spatially resolved output
will occur. Specify the name of the profile as output _crank_angles. Alternatively, you could select
User Defined Output Control, and use the Profile Editor to create the same profile, or some other
file specifying an output crank-angle profile (the provided profile is illustrated in Figure 8.7: Output
CAs profile for Spatially Resolved output (p. 112) ). Click Save once the profile is imported and the
name is specified.

Output Controls ¬ Spatially Averaged: This Editor panel allows you to control the output of values
that are averaged across the domain. Keep the default species and solution variables selected for
output. Reducing the variables selected will help reduce file sizes.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 111
Two-Stroke Engine Simulation

Figure 8.7: Output CAs profile for Spatially Resolved output

Restart Data: If you anticipate that the case will be stopped and you want the ability to restart it
from the last time step solved, select Output Controls ¬ Restart Data. You can specify certain Restart
Points using a separate file. Turn ON (checkmark) User Defined Restart Points and use the Profile
Editor to create a Restart profile. You can view, edit, or import new Restart Points in this 1-D Profile
Editor. Sometimes it is helpful in spark ignition cases to save a restart file after IVC but before the
spark occurs (CA=319 in this case) so you can use the compression portion of the cycle as a start
point in additional runs. Create a new profile for this purpose called Restart_crank_angles and add
the lines with CA value set to 274.0, 318.0, 400.0 CA degrees. Click Save.

8.2.9. Preview Simulation


You can view the profiles for accurate boundary motion and appropriate mesh quality with the Preview
Simulation options.

Boundary Motion: Preview boundary motion with the player buttons on the Boundary Motion Editor
panel or by right-clicking the Boundary Motion item in the Workflow tree and selecting a command.
During the preview, a dotted line tracker provides a representation of the piston translation and the
location of the injection and spark events (in the Editor panel), and the piston’s motion (in the 3-D
View if visibility settings are appropriate).

Preview Mesh: As a method for checking the automatically generated mesh, you can generate a
Preview Mesh. Navigate to Preview Simulation ¬ Mesh Generation on the Workflow tree. The preview
data will be transferred to a new EnSight instance where it can be viewed with the full suite of EnSight
tools.

Select Crank Angle as the Time Option and enter 98.0 degrees, representing the start of the simu-
lation. Enter Start as the data set name.

Select Save Output to Disk to have the preview data persist on disk for loading later into EnSight.
If Save output to Disk is not selected, the preview will run in runtime memory only and will be dis-
carded once the EnSight session is closed.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
112 of ANSYS, Inc. and its subsidiaries and affiliates.
Two-Stroke Marine Engine Project Setup

Select Include Volume Mesh to indicate that the interior volume mesh should be generated. If Include
Volume Mesh is not selected, the preview data will only include surface mesh data.

For MPI Arguments, enter the number of MPI processes to be used to generate the preview data.

Once the changes have been applied, click the Generate Mesh button on the Editor panel's
toolbar. If Save Output to Disk is selected, the mesh generation will run in the background, and
when complete, pressing the EnSight button will initiate a session. If Save Output to Disk is not se-
lected, an EnSight instance is launched immediately.

A common workflow for evaluating the preview mesh within the EnSight application is:

1. Create a clip plane from the VolumeCells part. In this case, select a Y-Clip at Mid-range, as indicated
in Figure 8.8: Preview mesh in EnSight at 98 CA degrees, the start of the simulation (p. 113).

2. Toggle the VolumeCells part and all of the surface parts’ visibility to OFF.

3. Turn on mesh lines as shown in Figure 8.8: Preview mesh in EnSight at 98 CA degrees, the start
of the simulation (p. 113) by enabling a Hidden Line Overlay Color.

You can create and save additional data sets to disk by supplying a different data set name and altering
the time or crank angle value. Additionally, multiple meshes can be generated at the same time using
the Time Range or Angle Range options.

Figure 8.8: Preview mesh in EnSight at 98 CA degrees, the start of the simulation

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 113
Two-Stroke Engine Simulation

8.2.10. Run Settings


The settings here depend on the system and environment for your simulations. The default for the
Run Settings panel is to have nothing selected.

Run Options: This tutorial does not require changes to this panel’s defaults; adjust them as necessary
for your environment.

Windows Settings: This tutorial does not require changes to this panel’s defaults; adjust them as
necessary for your environment.

Linux Settings: This tutorial does not require changes to this panel’s defaults; adjust them as necessary
for your environment.

8.2.11. Run Simulation


The last step is to submit the simulation to the solver or prepare for submission on a cluster.

To complete the lesson, select Run Simulation on the Workflow tree and, once Ansys Forte displays
the green Start button on the Run Simulation panel and reports a "Ready" status, click Start. You

can monitor the results by clicking on the Monitor Runs icon. In the Monitor window that
opens, you can select the run you want to monitor. The pressure trace should look like the one in
Figure 8.9: Monitoring the pressure from Run Simulation (p. 114). This simulation takes about 11 hours
to complete on 20 cores (Intel® Xeon® E5-2690 @2.9GHz).

Figure 8.9: Monitoring the pressure from Run Simulation

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
114 of ANSYS, Inc. and its subsidiaries and affiliates.
Project Results

8.3. Project Results


To view the results of the simulation, open the results in CFD-Post. In CFD-Post, open the solution file
for the case (Nominal.ftind). Figure 8.10: Screen view of the solution file in CFD-Post (p. 115) shows the
screen view once the solution file has been loaded.

Figure 8.10: Screen view of the solution file in CFD-Post

Once you have read in the model, you can create surface groups to group the surfaces. In this case, we
will create a surface group for the spark plug, walls, symmetry boundaries, and the valves. To create a
surface group, right-click User Locations and Plots Insert > Locations > Surface Group and specify
the name surfaces. On the Color and Render tab, you can change the color of the surfaces and the
transparency. In Figure 8.10: Screen view of the solution file in CFD-Post (p. 115), the surfaces are colored
gray and the transparency is set to a value of 0.5.

To visualize the solution in the combustion chamber, create a cut plane by right-clicking User Locations
and Plots > Insert > Location > Plane. Specify the Method as a ZX plane. On the Color tab, set the
Mode to Variable and specify the Variable as Temperature, click Apply. The temperature is now dis-
played on the cut plane, as shown in Figure 8.11: Temperature contour plot on a plane through the
centerline of the combustion chamber (p. 116).

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 115
Two-Stroke Engine Simulation

Figure 8.11: Temperature contour plot on a plane through the centerline of the combustion
chamber

To visualize the spray injection into the chamber, activate the Spray option. Double-click Spray to edit
the settings. On the Color tab, set Mode to Variable and select Spray Particle Radius. Set the Range
to Local. To visualize the spray at a specific crank angle, go to Tools > Timestep Selector. In this case,
crank angle 291.02 is specified.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
116 of ANSYS, Inc. and its subsidiaries and affiliates.
Project Results

Figure 8.12: Spray particles in the chamber at 291 CA degrees

Finally, to visualize the position of the flame, we need to create an iso-surface. To create the iso-surface,
right-click User Locations and Plots and select Insert > Location > Isosurface. Specify flame as the
name of the surface. Specify G as the variable and specify red as the color for the surface on the Color
tab. To see the flame location, we must specify a crank angle after spark timing. Spark timing in this
case is 319 CA degrees, so you can use the menu command Tools > Timestep Selector to select a
crank angle after spark timing.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 117
Two-Stroke Engine Simulation

Figure 8.13: Isosurface at 334 CA degrees showing the location of the flame front

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
118 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 9: Multi-Cylinder Four-Stroke Engine
Simulation
This tutorial describes how to use Ansys Forte CFD to simulate engine processes in an inline four-cylinder
four-stroke spark-ignition engine. The purpose of this tutorial is to demonstrate several key points of
project setup that are specific to multi-cylinder use cases:

• Use (spatial) Reference Frames to facilitate the setup of location and orientation parameters in each
cylinder.

• Use Time Frames to facilitate the setup of timing parameters in each cylinder.

• Approximate initial conditions in each cylinder region for a given starting crank angle.

• Monitor output parameters that are averaged for each cylinder region.

Although the example used is an inline four-cylinder four-stroke spark-ignition engine, the concept and
methodology described in this tutorial are also applicable to other multi-cylinder configurations, such
as V-shaped arrangement, opposed piston engines, as well as other types of engine operations, such
as spray combustion in diesel engines, HCCI, etc.

This tutorial is based on a fully configured Ansys Forte project (.ftsim) file. The steps described only
highlight the key points specific to multi-cylinder engines and are not intended to explain all the entire
detailed setup. The tutorial assumes that learner is already familiar with the fundamental steps for setting
up a single-cylinder engine in Ansys Forte. Such prerequisite knowledge can be obtained by studying
tutorials in previous chapters, such as the Ansys Forte GDI tutorial,Gasoline Direct Injection Engine
Simulation (p. 77).

9.1. Data Provided

9.1.1. Accessing Tutorial Files


The files for this tutorial are obtained by downloading the multicylinder_engine.zip file here.

Unzip multicylinder_engine.zip to your working folder.

9.1.2. Files Used in This Tutorial


The files for this tutorial include:

• multicylinder_4stroke_engine_tutorial.ftsim: A completely configured Ansys Forte project file.

• intake_valve_lift_profile.csv: Lift profiles of the intake valves, tabulated for the crank angle range
of [0, 720] °CA ATDC.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 119
Multi-Cylinder Four-Stroke Engine Simulation

• exhaust_valve_lift_profile.csv: Lift profiles of the exhaust valves, tabulated for the crank angle
range of [0, 720] °CA ATDC.

• multicylinder_4stroke_engine_tutorial.stl: An STL file that contains the multi-cylinder geometry.


This is an optional file, which could be used as part of an exercise setting up this Ansys Forte project
without using preconfigured files.

9.2. Engine Configuration and Problem Description


The configuration of the inline four-cylinder engine is shown in Figure 9.1: Configuration of the inline
four-stroke multi-cylinder engine (p. 120). The figure shows the numbering of the four cylinders, the intake
manifolds merging at a plenum, the inlet located on the side of the plenum, as well as two groups of
exhaust manifolds. One group of exhaust manifolds is connected to Cylinder-1 and Cylinder-4, the
other is connected to Cylinder-2 and Cylinder-3. In this geometry, the crank shaft axis of the engine
(not shown) is parallel to the Z-axis and the cylinder axes are parallel to the Y-axis. If you prefer, you
can rotate the geometry so the cylinder axes are parallel to the z-axis. To do the rotation, select all the
geometry surfaces under Geometry, right-click, select Transform Mesh, and then select Rotate X by
90 degrees. The setup steps described below are based on the original orientation, not a transformed
geometry. The engine geometry will serve as the surface mesh for the automatic mesh generation.
Automatic Mesh Generation requires that all the pistons are positioned at their top-dead-center (TDC)
location and all valves are at their closed location in the initial surface mesh.

There is one spark per cylinder central-mounted near the top of each cylinder head. The firing order of
this engine is 1-3-4-2, which means that there is a 180 °CA phase delay between any two consecutive
spark events.

In this tutorial, the fuel/air mixture preparation process inside the intake manifolds is simplified and no
port fuel injection is simulated. Instead, the fuel and air are treated as premixed stoichiometric mixture,
which enters the computational domain through the inlet connected to the plenum.

Figure 9.1: Configuration of the inline four-stroke multi-cylinder engine

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
120 of ANSYS, Inc. and its subsidiaries and affiliates.
Multi-Cylinder Spark-Ignition Engine Project Setup

9.3. Multi-Cylinder Spark-Ignition Engine Project Setup


This section will go over the simulation setup steps, with emphasis on several aspects that are specific
to multi-cylinder simulation.

Note:

Time frames can be added under Geometry > Time Frames. However, the default state for
the Time Frames node in the Workflow tree is hidden. To see it, use the Preferences com-
mand under Edit on the ribbon or menu and check Enable Reference Time Frame Controls.
Then Exit and restart Ansys Forte.

9.3.1. Geometry Import


(Optional) If you wish to set up the case without using the preconfigured files, you can start with
importing the supplied STL geometry file. On the Geometry Editor panel, click the Import Geo-

metry icon, and choose the Surface from one or more STL files option, and then browse for
the STL file. This step is needed only if you want the exercise of setting up the case from scratch.
These steps are not detailed here.

9.3.2. Defining Reference Frames and Time Frames


Reference frames and time frames in Ansys Forte allow you to define transforms to apply in space
and time.

9.3.2.1. Reference Frames


Reference frames used in Ansys Forte are spatially transformed coordinate systems. They can be
defined in the Workflow tree under Geometry > Reference Frames. A new reference frame can
be defined by referring to its parent coordinate system and through transformation of either or
both the origin and orientation. In a multi-cylinder geometry, by defining equivalent local reference
frames for all cylinders, you can use the same set of location and orientation parameters for all
cylinders.

To make it convenient to set up equivalent local coordinate systems for all the cylinders, the geo-
metry must meet some basic requirements relating to alignment with the coordinate axes in the
global coordinate system. Generally, the minimum requirement is to let the crank shaft axis be
parallel to one of the coordinate axes in the global coordinate. This tutorial case satisfies this re-
quirement because its crank shaft axis is parallel to the Z-axis.

Now let us define a local reference frame for each cylinder. There are no fixed rules for setting the
origin of each cylinder’s own reference frame, but a convenient way is to use the center of the
piston as the local origin. Using Cylinder-1 as an example, under Geometry, click surface piston_1.
The piston_1 Editor panel shows the Min and Max coordinate values along X-, Y-, Z-directions in
the global reference frame. The center of piston_1 on the X-Z plane can be calculated as

X_center = 0.5*(X_min + X_max) = 0.5*(-3.949 + 3.948) = 0 cm

Z_center = 0.5*(Z_min + Z_max) = 0.5* (31.15 + 39.05) = 35.1 cm

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 121
Multi-Cylinder Four-Stroke Engine Simulation

Since Y_min and Y_max are the same, you can pick Y_min as Y_center. In this specific example, it
is beneficial to let all four cylinders have the same Y_center value.

In the fully configured .ftsim file, you can see four Reference Frames for the four cylinders:
Frame-C1, Frame-C2, Frame-C3, and Frame-C4, listed in the Workflow tree. Their origins are cal-
culated based on the method described above and the values are listed in Table 9.1: Origins of
local reference frames for four cylinders (p. 122). We can see that the distance along the Z-direction
between the axes of two consecutive cylinders is 9.5 cm. These four reference frames do not involve
orientation transformation. Orientation transformation is needed in a V-type multi-cylinder engine.

Table 9.1: Origins of local reference frames for four cylinders

(cm) Frame-C1 Frame-C2 Frame-C3 Frame-C4


Origin X 0 0 0 0
Origin Y 19.7 19.7 19.7 19.7
Origin Z 35.1 25.6 16.1 6.6

In this tutorial engine, all the intake valves are tilted on the X-Y plane by -11° relative to the Y-axis,
and all the exhaust valves are tilted in a similar manner, but by 12°.The tilt angles are illustrated in
Figure 9.2: Tilt angles of intake and exhaust valve stems (p. 122). Two reference frames are created
for intake valves and exhaust valves, respectively, such that the Y-axes of these two reference frames
are aligned with the moving directions of the valves. The names are Frame_Intake_Valves_Dir
and Flame_Exhaust_Valves_Dir. The transformation only involves rotation about the Z-axis.
These two reference frames can be used to define the moving directions of the valves. They can
also be used to adjust the valve gaps at seated position if needed.

Figure 9.2: Tilt angles of intake and exhaust valve stems

9.3.2.2. Time Frames

Note:

If you cannot see Time Frames listed under Geometry in the Workflow tree, edit your
Preferences as described in the note in Note (p. 121) early in this tutorial.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
122 of ANSYS, Inc. and its subsidiaries and affiliates.
Multi-Cylinder Spark-Ignition Engine Project Setup

Time frames are convenient tools for managing all the timing parameters in a multi-cylinder context.
A time frame requires input of a crank angle offset. An event associated with the time frame will
be delayed by the offset value relative to the global crank angle. By defining an appropriate time
frame for each cylinder, you can use the same set of timing parameters for all the cylinders in the
configuration. Such timing parameters include, for example, piston motion specification and valve
lift profiles, spark timing, and injection timing.

The Global Time is a prepopulated item, which corresponds to the global crank angle and serves
as a reference. It cannot be edited. You can add four new time frames, one for each cylinder. Since
the firing order of this engine is 1-3-4-2, the crank angle offset values can be set as 0 °CA, 180 °CA,
360 °CA, 540 °CA for Cylinder 1, 3, 4, 2, respectively. Note that Cylinder-1 is essentially associated
with the global crank angle, and therefore it is used as a reference cylinder.

9.3.3. Automatic Mesh Generation Setup


A multi-cylinder case requires that one of the cylinders be defined as the reference cylinder and asso-
ciated with the Default Initialization region under Initial Conditions. The Material Point under
Mesh Controls is expected to be a location inside the Default Initialization region. Since Cylinder-
1 is assigned as the reference cylinder in this tutorial, the material point should be inside Cylinder-
1. As mentioned earlier, since the origin of the reference frame for Cylinder-1 is defined as the center
of the piston surface at the piston’s TDC position, you can set the material point a distance above
the local origin. The location selected should be able to remain inside the combustion chamber at
all times while the piston travels from its BDC to TDC and the valves move from a fully closed position
to a fully lifted position. In this sample, the Material Point is set to (X, Y, Z) = (0.0, 1.0, 0.0) cm in
the Frame-C1 reference frame. The Global Mesh Size is set to 4.0 mm.

Several refinement controls for surface or volume are used to obtain higher mesh resolution at system
boundaries and at various locations that are expected to see high gradients for velocity or temperature.

You can go through the refinement control items under Mesh Controls in the fully configured project
file to check their detailed specifications.

Under Mesh Controls on the Workflow tree, AllWalls, OpenBoundaries, ValveStems, Chamber_BL,
and ValveSeats are surface refinement controls that are applied at all times. ValveSeats specifies a
1/8 refinement for all valve seat surfaces in all the cylinders. In a typical engine geometry, cells near
the valve gaps must be sufficiently refined (approximately 0.5 mm) to ensure that the computational
domain of the intake/exhaust manifolds and the cylinders are cleanly separated when the correspond-
ing valves are closed.

IVO_n and EVO_n, in which n is a numeral, are interval-based surface refinements applied to the
combustion chamber walls during intake-valve opening or exhaust-valve opening processes. The
cylinder-specific time frames are convenient when setting up these crank-angle-interval–based controls.
By associating such a control with a cylinder’s local time frame, you can specify the start angle and
end angle values with respect to the cylinder’s local TDC, and the same crank angle values can be
used for all the cylinders. For example, the crank angle interval for refinement controls IVO_1 to
IVO_4 has the same value, [323, 563] °CA ATDC. The only difference for this timing control is the
time-frame selection. Note that the Location should point to the corresponding surfaces in each
cylinder.

SparkPlug_1 to SparkPlug_4 are spherical volume refinement controls that specify 1/8 refinement
in a small region surrounding each spark plug. The center of the refinement volume will be set at
the spark location and the Radius of Application is 0.4 cm. By specifying the coordinates of the re-

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 123
Multi-Cylinder Four-Stroke Engine Simulation

finement center relative to the origin of each cylinder’s local reference frame, the same center coordin-
ates can be used for these four controls.

Note:

As an option, you can limit this refinement to 10 °CA before spark and 60 °CA degree
after spark in each cylinder.

9.3.4. Model Setup


Chemistry: The single-component 59-species gasoline chemical kinetics mechanism that is included
in Ansys Forte’s chemistry mechanism database is used to simulate the combustion of gasoline/air
mixture, in which gasoline is approximated by iso-octane. The chemistry set can be found in the data
folder within the Ansys Forte installation. The name of the chemistry set is Gasol-
ine_1comp_49sp.cks.

Flame Speed: The Gülder formulation of the power law will be used to compute laminar flame speeds
in the flame propagation model. For all the other model inputs on the Flame Speed Model panel,
the default values are used.

Spark Ignition: Turn on the spark ignition model by checking the check box in front of Spark Ignition
in the Workflow tree. On the Spark Ignition > Settings panel, the check box in front of Flame
Propagation Model is checked by default. This means the flame propagation will be modeled using
the discrete particle ignition kernel (DPIK) model and the G-equation model. Keep the default values
for all the model constants.

Sparks: In this engine, each cylinder contains one spark plug. The spark plug structure is included in
the cylinder head surfaces. On the SparkIgnition Editor panel, you can create four spark plug items
to specify their location, spark duration, energy discharge rate, etc. Start with adding the spark plug
for the first cylinder by clicking the Spark icon on the SparkIgnition Editor panel. By specifying
the spatial reference frame as Frame-C1, the coordinates of the spark plug’s location can be specified
with respect to this cylinder’s local reference frame. The coordinates of the spark gap are (-0.4, 1.35,
0.0) cm. Similarly, by linking this spark’s timing parameter to Time Frame Cylinder 1, the spark timing
value can be specified with respect to this cylinder’s local TDC. The spark timing is 20°CA before the
firing TDC, so the starting angle of spark is set to 700°CA ATDC. The default values are kept for spark
energy and initial kernel radius. After the first spark, Spark 1, has been configured, you can then

duplicate it (Copy and Paste ) to create the spark plugs in the other three cylinders. After
each copy and paste, you can simply adjust the Time Frame and (spatial) Reference Frame to their
respective local frames.

Spray: (Optional) This tutorial does not involve spray simulation, but fuel sprays within each cylinder
or within the intake ports of each cylinder could be set up in a similar manner as the spark setup.
You can start with configuring the injector for the reference cylinder, and then duplicate that injector
for the other cylinders. For each duplicated injector, you must adjust the time frame as well as the
reference frames for each nozzle to use the cylinder’s local frames. Note that the time frame is applied
on the Injector level, that is, the injection timings of all the Injection pulses added under an injector
are assumed to use the same time frame specified on the Injector Editor panel.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
124 of ANSYS, Inc. and its subsidiaries and affiliates.
Multi-Cylinder Spark-Ignition Engine Project Setup

9.3.5. Boundary Conditions


In the context of multi-cylinder engines, the boundary conditions can be divided into two groups,
one is shared by all cylinders and the other is cylinder-specific. The cylinder-specific boundary condi-
tions include head, liner, and moving surfaces (pistons and valves). For the cylinder-specific boundary
conditions, you can first do the configuration for the reference cylinder, and then duplicate that for
the rest of the cylinders. For each duplicated boundary condition item, the only parameters that must
be adjusted are the Ref. Frames (for locations or directions) and Time Frames (for timings). Of course,
the Location selection should be adjusted accordingly as well.

In this tutorial, boundary conditions shared by all the cylinders include Inlet, Outlet_1, Outlet_2,
IntakeManifold, ExhaustManifold1, and ExhaustManifold2. The first three are open boundaries,
which involve time profiles for boundary pressure and temperature. The time frame associated with
these time profiles should be set to Global Time. In this tutorial, port fuel injection will not be simu-
lated. Instead, the mixture coming into the domain through the inlet is assumed to be a premixed
stoichiometric air/fuel mixture.

The boundary conditions head and liner are static wall boundaries. They are cylinder-specific, but
do not require a time frame input, therefore the head surfaces of all cylinders are grouped as one
boundary condition and the same is done for the liner surfaces. If preferred, you can split each group
into four individual boundary condition items. Such a split may be needed if you want to define dif-
ferent wall boundary temperatures for different cylinders.

Each moving surface requires the specification of a Wall Motion. The wall motion for pistons and
valves in different cylinders can easily be synchronized with the help of the cylinder-specific time
frames. In the fully configured Ansys Forte project file, Piston_1, IntakeValve1-1, IntakeValve2-1,
ExhaustValve1-1, ExhaustValve2-1 are the moving boundary conditions for Cylinder_1 (the last
numeral in the BC name indicates the cylinder index). If setting up the project on your own, you could
first create these five boundary conditions, specify the Time Frame as Cylinder 1, and specify the
Ref. Frame used by the wall motion direction as Frame-C1. Then, duplicate these Boundary Conditions
for the other cylinders.

For a duplicated piston, adjust three items to reflect the local cylinder:

• Location selection;

• TimeFrame; and

• Ref. Frame (for motion direction).

For a duplicated valve, adjust four items:

• Location selection;

• Time Frame (for lift profiles);

• Ref. Frame (for motion direction); and

• the selection of Valve Seat and the Surface it Contacts.

All the other parameters can be kept the same for different cylinders, including the valve lift profiles.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 125
Multi-Cylinder Four-Stroke Engine Simulation

Note that Frame-C1 to Frame-C4 are used to specify the valve motion direction in the current project
file. An alternative (probably easier) way is to use the Ref. Frames mentioned earlier, Frame_In-
take_Valves_Dir and Flame_Exhaust_Valves_Dir. For example, when using Frame_Intake_Valves_Dir
to specify the moving direction of the intake valves, you can simply specify the Cartesian direction
vector as (X, Y, Z) = (0, -1, 0). The same motion direction setting can be applied to all intake valves
because they all move along the same direction. The same approach can be applied to the exhaust
valves.

9.3.6. Initial Conditions


A multi-cylinder simulation should intrinsically also be a multi-cycle simulation. This is because the
cylinders will be in different stages (strokes) of an engine cycle no matter where the simulation starts,
and it will take multiple engine cycles to let the simulation reach a "converged" state starting from
approximated initial conditions. Nonetheless, it is beneficial to provide a good estimate for initial
conditions as this can help the simulation approach the "convergence" faster.

According to the lift profiles of the intake and exhaust valves and the minimum valve lift distance,
the intake valves are open in crank angle interval [380, 580] °CA ATDC and the exhaust valves are
open in [172, 380] °CA ATDC in each cylinder’s local time frame. Thus, the firing TDC of this engine
is 0°CA ATDC (or 720°CA ATDC). In this tutorial, we will set the starting crank angle to 0°CA ATDC.
The starting angle is the global crank angle, which is also in sync with the local crank angle in Cylinder-
1. At this starting angle, the piston positions and strokes each cylinder is about to start are listed in
Table 9.2: Piston positions and strokes to begin in each cylinder (p. 126):

Table 9.2: Piston positions and strokes to begin in each cylinder

Piston Position Stroke about to start


Cylinder 1 Firing TDC Expansion/Work
Cylinder 2 BDC (180° after Firing TDC) Exhaust
Cylinder 3 BDC (180° before Firing TDC) Compression
Cylinder 4 Non-Firing TDC Intake

Ansys Forte requires that the reference cylinder (Cylinder-1 in this case) be defined as the Default
Initialization region. This default region will use the global material point for mesh creation and thus
does not require a separate material point input. In addition, the Region Type of the Default Initial-
ization region is assumed to be Cylinder/Primary, and thus it does not require a Region Type input.

Chamber-2, Chamber-3, and Chamber-4 are three new regions for the other three cylinders, and
they are based on material points. By linking these regions to their respective spatial Ref. Frames,
the material point coordinates can have the same value as the coordinates of the global material
point. Note that the global Material Point under Mesh Controls in the Workflow tree is linked to
Ref. Frame Frame-C1. For these three non-default cylinder regions, the Region Type should be
specified as Cylinder/Primary. Note that the cylinder numbering will follow the order as they appear
on the Workflow tree under Initial Conditions.

At the starting crank angle, Cylinder-1 is beginning the expansion stroke, the mixture is approximated
as complete combustion products, the temperature and pressure are also approximated as peak values
during combustion, 2000 K and 20 bar, respectively. Cylinder-2 is starting the exhaust stroke, so the
composition is also set to complete combustion products, but the temperature and pressures are
lower than those in Cylinder-1. They are set to 1200 K and 1.5 bar, respectively. Cylinder-3 is starting
the compression stroke. Physically, the mixture inside this cylinder should be a fuel/air mixture mixed

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
126 of ANSYS, Inc. and its subsidiaries and affiliates.
Result Visualization

with a small fraction of residual gas. For simplicity, the initial composition is approximated as a stoi-
chiometric fuel/air mixture. The temperature and pressure in Cylinder-3 should be similar to the values
in the intake manifold. They are set to 340 K and 1 bar, respectively. Cylinder-4 is at the non-firing
TDC and starting the intake stroke, the composition is mainly combustion products. The temperature
and pressure are approximated as 600 K and 1 bar. The default settings are used in the fields for initial
turbulence parameters and initial velocity.

Intake Port, ExhaustManifold_1, and ExhaustManifold_2 are three regions with Region Type
defined as Other. For Intake Port, the initial composition is approximated as stoichiometric air/fuel
mixture. Temperature and Pressure are set to 313.147 K and 1.1 bar, respectively. For the two exhaust
ports, composition is set to combustion products, and Temperature and Pressure are set to 500 K
and 1 bar, respectively. The material points can be placed anywhere inside the respective manifold
geometry.

The Initialization Order values of all the initialization regions should be set following the "go-with-
the-flow" rule. The order of the intake port should be 1, followed by the four cylinders, and finally
the two exhaust manifolds.

The Composition Calculation Utility contained in the Ansys Forte Setup Interface can be used to
prepare different mixtures required by the initial conditions.

9.3.7. Simulation Controls


A multi-cylinder engine simulation must use the Crank Angle Based option on the Simulation
Controls Editor panel. The initial and final crank angles exposed on the Simulation Controls panel
are both global values. In the fully configured project, the case is set up to run two complete engine
cycles.

On the Time Step Editor panel, the Max Simulation Time Step, dtmax, uses a constant value (1.E-
5 s) in the current project. If a time varying dtmax profile is used instead, the profile is required to
cover the crank angle range of [0, 720] °CA ATDC. This profile will be applied to all cylinders within
each cylinder’s local time frame. Specifically, a max time step value is first determined in each cylinder
separately based on the profile and the cylinder’s local crank angle value. Then, the minimum value
among all the cylinders will be used as the global Max Simulation Time Step.

For the chemistry activation control on the Chemistry Solver panel, it is recommended not to check
the After First Spark Event and After Fuel Injection Starts boxes because these controls are not
well-defined in the multi-cycle, multi-cylinder context. Instead, you can use the During Crank Angle
Interval option to activate chemistry for a certain duration within an engine cycle. Similar to the Max
Simulation Time Step control, the interval-based chemistry activation control is also assumed to be
applied in all the cylinders based on each cylinder’s local time frame. For example, in this tutorial,
the interval is set to [-40, 100] °CA ATDC. This means chemistry will be activated 40°CA before the
Firing TDC and deactivated 100°CA after the Firing TDC in all four cylinders.

9.4. Result Visualization


In a multi-cylinder calculation, cylinder-specific spatially-averaged solutions are reported on a per-cylinder
basis. The cylinder-specific CSV output files include:

• thermos.csv

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 127
Multi-Cylinder Four-Stroke Engine Simulation

• dynamic.csv

• flame.csv

• massfraction.csv

• molefraction.csv

• speciesmass.csv

The cylinder index will be appended to the file names to indicate which cylinder they are for. For example,
you will see thermo1.csv, thermo2.csv, etc. These files include both the global crank angle and
the cylinder’s local crank angle. The local crank angles are always converted to values within the range
of [0, 720) °CA ATDC. For two-stroke engines, the local crank angles will be in the range of [0, 360) °CA
ATDC.

The rest of the CSV files are reported either based on the average over the whole computational domain
or reported on a per-boundary-condition basis, and they have the same format as single-cylinder calcu-
lations.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
128 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 10: Rotary Lobe Compressor Simulation
This tutorial describes how to use Ansys Forte CFD to simulate the gas flow in a rotary lobe compressor.
A blower case is used in this tutorial as an example, but the simulation methodology, conventions, and
best practices also apply to all other types of rotary lobe compressors that involve two engaging rotors,
such as screw compressors and gear compressors. The geometry used in this tutorial represents a non-
proprietary, generic rotary lobe compressor. It is used only for demonstrating the simulation setup using
Forte and should not be used as a guidance for actual machine design.

This tutorial first explains the methodology and conventions used in compressor simulation, and then
goes through all the simulation setup steps, with emphasis on the following aspects that are unique
or important to compressors:

• Requirements for surface geometry preparation

• Small gap handling using gap refinement controls and gap model

• Rotational motion setup

• Simulation preview for checking boundary motion and potential surface intersection

• Visualization of simulation results

10.1. Data for Tutorial


The following sections describe the provided files, time required, prerequisites, and a utility for comparing
your generated project file (.ftsim) with the one provided in the tutorial download.

10.1.1. Files Used in This Tutorial


The files for this tutorial are obtained by downloading the lobe_compressor.zip file here.

Unzip lobe_compressor.zip to your working folder.

Files provided in this tutorial include a Forte project file that has been fully configured as well as a
set of facilitating input files that can be used to set up the Forte project from scratch. Specifically,
the files include:

• Rotary_Lobe_Compressor_Tutorial.ftsim: The fully configured Forte project file.

• Rotary_Lobe_Compressor_Surface_Geometry.tgf: Surface geometry input file in Fluent Meshing


faceted geometry (.tgf) format, which was exported from SpaceClaim.

• Air_NoReactions_chem.inp: Chemistry input file in Ansys Chemkin format, which is used to set
up the working fluid properties in Forte simulation.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 129
Rotary Lobe Compressor Simulation

The tutorial sample compressed archive is provided as a download. You have the opportunity to select
the location for the file when you download and uncompress the sample files.

Note:

This tutorial is based on a fully configured sample project that contains the tutorial project
settings. The description provided here covers the key points of the project set-up but is
not intended to explain every parameter setting in the project. The project files have all
custom and default parameters already configured; the text highlights only the significant
points of the tutorial.

10.1.2. Time Estimate


This Forte project is set up to run for five complete revolutions. As a guideline for your own simulations,
this tutorial is estimated to take approximately 19 hours on a Linux cluster using an Intel 2.6 GHz
processor (168 cores). Another test run on a Windows PC using 20 cores took approximately 75 hours.

10.1.3. Prerequisites for This Tutorial


This tutorial will cover all the set-up steps, but we recommend that you work through the Forte Quick
Start Guide first and become familiar with the workflow of the Ansys Forte user interface.

10.1.4. Project Comparison Utility


The installation includes the cgns_util export command, which you can use to compare the
parameter settings in the project file generated at any point during your tutorial set-up against the
provided .ftsim , which has the parameter settings for the final, completed tutorial. This command
is described in the Forte User's Guide.

Briefly, you can double-check project settings by saving your project and then running the cgns_util
to export your tutorial project, and then to export the provided final version of the tutorial. Save both
versions and compare them with your favorite diff tool, such as DIFFzilla. If all the parameters are in
agreement, you have set up the project successfully. If there are differences, you can go back into
the tutorial set-up, re-read the tutorial instructions, and change the setting of interest.

10.2. Problem Description


The geometry and working principle of the sample blower are illustrated in Figure 10.1: Configuration
of the sample blower case (p. 131). Two engaging three-lobed rotors rotate within a casing. These two
rotors rotate at the same rotational speed, but around opposite directions. The rotation directions are
shown by the curved arrows. The rotors’ rotation motion causes the working fluid (air in this case) to
be sucked into the casing through the suction inlet. As the working fluid travels through the compart-
ments formed between the rotor surfaces and the casing surfaces, it is compressed and eventually dis-
charged through the discharge outlet with raised temperature and pressure. One of the rotors is driven
by an electric motor, and the shafts of these two rotors engage through helical gears outside of the
casing. The two rotors do not have direct surface contact. The dimension and operating condition
specifications are listed in Table 10.1: Dimensions and operating conditions of the sample blower (p. 131).

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
130 of ANSYS, Inc. and its subsidiaries and affiliates.
Problem Description

Figure 10.1: Configuration of the sample blower case

Table 10.1: Dimensions and operating conditions of the sample blower

Item Value Units


Rotor diameter 8 cm
Rotor length 20 cm
Helical pitch of the rotors 300 cm
Distance between rotors’ axes 12 cm
Working fluid air (ideal gas)
Suction pressure (Total) 1 bar
Suction temperature (Total) 300 K
Discharge pressure (Total) 3 bar
Discharge temperature (Total) 375 K
Rotation Speed 6000 rev/min

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 131
Rotary Lobe Compressor Simulation

10.3. Rotary Lobe Compressor Project Setup


The project setup workflow follows the top-down order of the workflow tree in the Ansys Forte Simulate
interface. The components irrelevant to the present project will not be mentioned in this document,
and you can simply skip them and use the default model options.

10.3.1. Prepare and Import Surface Geometry


This simulation uses Forte’s on-the-fly automatic mesh generation (AMG) feature, which only requires
the bounding surface geometry as an input and does not involve volume mesh generation ahead of
the calculation. The surface geometry to be imported into Forte is in Fluent Meshing faceted geometry
(.tgf) format, which was exported from the solid geometry created in SpaceClaim. Although the
TGF format is used in this tutorial, several other formats are also allowed. See the Geometry Import
section in the Forte User's Guide for details.

Since the rotors in compressors involve curved surfaces in 3-D and there are tiny gaps between the
rotors and the casing and also between the two rotors, the curved surfaces are required to be suffi-
ciently smooth in order to avoid surface intersection during the rotation. When exporting the TGF
file from SpaceClaim, we recommend that you choose the Fine option for the Facet Resolution of
the TGF file. The Angle resolution should not be much larger than 4°.

The fluid domain in this case is formed by three watertight surface groups. The first group consists
of the inlet, outlet, suction and discharge port walls, and the casing wall (Part a, Figure 10.2: Surface
normal vectors of the casing and rotors (p. 133)), the other two groups are for the two rotors, each
consisting of two end surfaces and one side surface (Part b, Figure 10.2: Surface normal vectors of
the casing and rotors (p. 133)). Fluid volume is formed between the exterior of the rotor solids and
the interior of the "casing + ports" solid (shown in Figure 10.3: Fluid volume formation between casing
and rotors (p. 134)). Forte requires that the end surfaces of the rotors be put inside the casing and
away from the casing’s end surfaces by a tiny tolerance. In the provided geometry file, this tiny toler-
ance is 1 µm. By default, the gap between the rotor end surface and the casing end surface will not
be meshed in the volume mesh. However, if the end gap sizes are physically large enough and it is
desirable to model the flow leakage through them, we can force these gaps to be meshed by using
the gap refinement controls that will be discussed later in the Automatic Mesh Generation Setup
section.

In Forte, the normal vectors of the triangulated surface mesh are required to point towards the exter-
ior of the fluid domain. The surface normals of the casing and rotors are illustrated by the red arrows
in Figure 10.2: Surface normal vectors of the casing and rotors (p. 133). When the solids of the casing
and rotors are created in SpaceClaim, the normals are assumed to point to the interior of the solids.
Therefore, after a TGF or STL file exported from SpaceClaim is imported into Forte, the normals of
the Casing surfaces (as well as the inlet/outlet and suction/discharge port walls) should be inverted.

Tip:

• An incorrect (flipped) surface normal is one of the most common reasons for
meshing errors. The surface normals should be carefully checked after the geometry
import.

• When preparing the geometry in SpaceClaim, use Named Groups to group the
boundary surfaces and give each group a name. When a geometry with Named
Groups is imported in Forte, Forte will use the same naming convention. Therefore,

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
132 of ANSYS, Inc. and its subsidiaries and affiliates.
Rotary Lobe Compressor Project Setup

you can avoid the requirement to split the surface geometry inside the Forte user
interface. Doing so also makes it convenient to replace the geometry if needed.
When an updated geometry using the same Named Groups is imported, the old
surfaces will be automatically replaced at all the places where these surfaces are
used, such as in refinement controls and boundary conditions. Notice that you may
still need to invert the normals for some of the newly imported surfaces based on
the requirements described above.

Figure 10.2: Surface normal vectors of the casing and rotors

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 133
Rotary Lobe Compressor Simulation

Figure 10.3: Fluid volume formation between casing and rotors

Now let us import the surface geometry into the Forte Simulate user interface. Open the Geometry

panel, click the Import Geometry icon, select Surfaces from TGF file as the import option, and
select the provided TGF file, Rotary_Lobe_Compressor_Surface_Geometry.tgf. Accept all
the default options on the Import Options wizard window. Note that the Invert Normals box is
checked by default, which means that the normals of the imported surfaces will point to the exterior
of the solids, and consequently you should invert the normals back for the rotor surfaces after the
import. In the Workflow tree under the Geometry node, multi-select (hold Ctrl while clicking) surfaces
left_rotor_discharge_end, left_rotor_side, left_rotor_suction_end, right_rotor_discharge_end,
right_rotor_side, right_rotor_suction_end , and on the right-click menu, choose Invert Normals.
You can double-check the normals of a surface by turning on Normals on this right-click menu.

To facilitate the subsequent setup steps, we now define two Reference Frames, one for each rotor.

Go to Geometry > Reference Frames, click the Create new icon to create these two reference
frames. Refer to the fully configured ftsim file for details. Reference frame RF_Right_Rotor is the
same as the global origin, and RF_Left_Rotor has its origin moved to X = 12.0 cm relative to the
global origin. In this way, the origin of each reference frame anchors the center of the suction end
face of the rotor, and the Z-axis aligns with the rotor’s rotating axis.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
134 of ANSYS, Inc. and its subsidiaries and affiliates.
Rotary Lobe Compressor Project Setup

When the geometry used in this tutorial was created in SpaceClaim, there are zero rotor-casing or
rotor-rotor gaps. We will create a 70 µm (0.007 cm) gap between the rotors and the casing by
shrinking the rotors slightly along their radial direction. Since the maximum radius of the rotor is 8.0
cm, the shrinking factor is 1-0.007/8.0 = 0.999125. An example using the right rotor is shown in Fig-
ure 10.4: Use Transform Mesh to shrink the rotors along the radial direction (p. 135). Select the three
surfaces corresponding to the right rotor, select Transform Mesh on the right-click menu, choose
the Reference Frame named RF_Right_Rotor created earlier and scale X and Y by 0.999125. Repeat
the same procedure for the left rotor using Reference Frame named RF_Left_Rotor. Using the
method of shrinking the rotors to create gaps, the gaps between the rotors and the casing are well
controlled and the smallest distance is 70 µm. However, the gap sizes between the two rotors vary
both temporally and spatially, and the inter-rotor gap sizes at the engaging locations could be much
smaller than 70 µm.

Figure 10.4: Use Transform Mesh to shrink the rotors along the radial direction

10.3.2. Automatic Mesh Generation Setup


Automatic mesh generation in Forte requires you to specify a material point, a global mesh size that
serves as the reference size for mesh refinement, and various refinement controls.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 135
Rotary Lobe Compressor Simulation

Material Point: The material point should always lie inside the fluid domain throughout the simulation
and should be located at least one unit cell length away from any boundaries. In this tutorial case,
we choose to put the material point inside the suction port: X = 6.0 cm, Y = 5.0 cm, Z = -5.0 cm.

Global Mesh Size: Set the Global Mesh Size to 0.4 cm.

Three types of refinement controls are used in this tutorial: Surface Refinement Depth, SAM (Solution
Adaptive Mesh) , and Gap Feature Control . Detailed mesh control parameters are listed in
Table 10.2: Settings for Mesh Control refinements (p. 136). The Active property is set to Always for all
the mesh controls. For the three Gap Feature Controls, the Surface Proximity is set to 0.15 cm,
and Enable Gap Model is turned ON.

Tip:

Material Point being outside of the fluid domain is another commonly encountered
setup error, which causes meshing failure. Make sure the Material Point will not go
out of the domain due to boundary motion.

Table 10.2: Settings for Mesh Control refinements

Item Refinement type Refinement location Refinement Refinement


level layers
Side_Walls Surface casing_side, 1/2 1
discharge_port_wall,
intake_port_wall,
left_rotor_side,
right_rotor_side
End_Walls Surface casing_discharge_end, 1/4 1
casing_suction_end,
left_rotor_discharge_end,
left_rotor_suction_end,
right_rotor_discharge_end,
right_rotor_suction_end
Open_Boundar- Surface inlet, outlet 1/2 1
ies
SAM_Velo- SAM Entire Domain 1/2
city_Grad
Quantity =
Velocity
magnitude
gradient;

Bounds =
Statistical;
Sigma Thresh =
0.5
Left_Rotor_Cas- Gap feature (casing_side, 1/4
ing left_rotor_side)
Right_Rotor_Cas- Gap feature (casing_side, 1/4
ing right_rotor_side)

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
136 of ANSYS, Inc. and its subsidiaries and affiliates.
Rotary Lobe Compressor Project Setup

Item Refinement type Refinement location Refinement Refinement


level layers
Inter_Rotor Gap feature (left_rotor_side, 1/4
right_rotor_side)

The Gap Feature Control is a mesh refinement control that is especially useful for handling the small
gaps in compressors. This control automatically detects small gaps between the specified surface pair
based on the user-specified Surface Proximity criterion and applies refinement in the detected gap
region based on the user-specified refinement level. When Gap Feature Control is used, the spatially
resolved solution will contain a variable called GapCellFlag, which uses non-zero integer values to
mark the zones identified as gap zones.

Forte does not require the gap zones to be finely resolved using tiny CFD cells. In this tutorial, the
Cartesian cell size in the gap zone is 0.1 cm, which means that some of the gaps only contain a fraction
of a Cartesian cell cut by the physical boundary. To compensate for the under-resolution in the gap
zones, the Gap Model is used to apply a momentum sink term, which accounts for the underpredicted
wall shear stress and over-predicted mass flow rate on the coarse grid. The Gap Model takes both
the gap size and the local fluid cell size as inputs, and therefore the flow solution is not expected to
be very sensitive to the gap refinement level.

As mentioned earlier, there is a 1 µm distance tolerance between the end surface of the rotor and
the end surface of the casing on both ends. Forte will ignore this tiny gap by default. However, if the
end gaps are large enough and it is of interest to model the flow leakage through them, you can use
the Gap Feature Control to mesh these gaps.

10.3.3. Chemistry Set


In Forte, a chemistry set in Chemkin format is used to define the properties of the working fluid. The
chemistry input file used in this tutorial contains air (O2 and N2) and no reactions. In the provided
chemistry input file, Air_NoReactions_chem.inp, species o2 is duplicated as o2_in, o2_out, and n2
is duplicated as n2_in and n2_out, respectively. By doing this, we can use the _in version to define
the inflow mixture and use the _out version to define the reverse flow mixture. The original o2 and
n2 are used to define the initial mixture inside the domain. Such a setup allows us to track how the
initial mixture is flushed out of the domain during the initial transient process and how the inflow
and reverse flow mixtures are distributed inside the domain under steady state operation.

Now let us create a chemistry set using Air_NoReactions_chem.inp and import it into Forte. Under
Utility on the ribbon or menu bar, click the PreProcess icon, and follow the wizard to create a New
Chemistry Set: Select Air_NoReactions_chem.inp as the Gas-Phase Kinetics File. Then go

back to the setup Workflow tree: Models > Chemistry, click the Import Chemistry icon to open
the new chemistry set (.cks) file we just created.

Forte has both ideal gas and real gas model options. To turn on the ideal gas model option, choose
Real Gas as the Equation of State option on the Models > Chemistry panel. In this tutorial, we will
keep the default Ideal Gas option.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 137
Rotary Lobe Compressor Simulation

10.3.4. Transport Property Settings


This tutorial uses the RANS RNG k-epsilon turbulence model, which is the default turbulence model
option. Other turbulence modeling options are available under Models > Transport > Turbulence,
such as LES models.

10.3.5. Boundary Conditions


Use the icons on the Boundary Conditions panel to add new boundary conditions. The boundary
conditions used in this project are explained below:

Suction_Inlet: Defined as an inlet boundary . For Composition on the inlet setup panel, select
Create New to create a mixture called gas_mixture_inlet using species o2_in and n2_in (Figure 10.5: Ex-
ample for setting up a new gas mixture (p. 138)). Select surface inlet as the Location. Choose the
Total Pressure option for Inlet type and set the pressure to 1.0 bar. Keep the default turbulence
parameters for the inflow. Choose Total Temperature as the Temperature Option and set the
temperature to 300 K.

Figure 10.5: Example for setting up a new gas mixture

Discharge_Outlet: The discharge outlet should be defined as an inlet boundary as well because
we need the reverse flow condition to be explicitly defined. For Composition, create a new mixture
called gas_mixture_outlet using species o2_out and n2_out (similar to the one shown in Figure 10.5: Ex-
ample for setting up a new gas mixture (p. 138)). Select the surface named outlet as the Location.
Choose the Total Pressure option for Inlet type and set the pressure to 3.0 bar. Keep the default
turbulence parameters for the inflow. Choose Total Temperature as the Temperature Option and
set the temperature to 375 K.

Suction_Port: Defined as a wall boundary . Select surface intake_port_wall as the Location.


Turn ON Heat Transfer and set Wall Temperature to 300.0 K, which is the same as the inflow tem-
perature at Suction_Inlet.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
138 of ANSYS, Inc. and its subsidiaries and affiliates.
Rotary Lobe Compressor Project Setup

Discharge_Port: Defined as a wall boundary . Select surface discharge_port_wall as the Location.


Turn on Heat Transfer and set Wall Temperature to 375.0 K, which is the same as the reverse flow
temperature at Discharge_Outlet.

Casing: Defined as a wall boundary . Select surfaces casing_discharge_end, casing_side, and


casing_suction_end as the Location. Turn on Heat Transfer and set Wall Temperature to 320.0
K. You can also use the spatially varying wall temperature option to set up a boundary condition
look-up table to vary the temperature along the axial direction of the casing.

Right_Rotor: Defined as a wall boundary with wall motion. Select surfaces right_rotor_dis-
charge_end, right_rotor_side, and right_rotor_suction_end as the Location. Turn off HeatTransfer
to model the rotor wall as adiabatic. Turn on Wall Motion and set Motion Type as Rotation. The
rotation axis requires an Origin and a Direction vector as the inputs. Although they can be specified
in an arbitrary way, with respect to any Reference Frame, it is more convenient to take advantage of
the Reference Frames we created earlier for each rotor. For the right rotor, if the Reference Frame
named RF_Right_Rotor is used, the Origin and Direction of the rotation axis are simply the origin
(X = 0.0 cm, Y = 0.0 cm, Z = 0.0 cm) and Z-axis (X = 0.0, Y = 0.0, Z = 1.0) of this reference frame.
Set Angular Velocity to 6000 RPM. Note that the rotation direction follows the right-hand rule.

Left_Rotor: Defined as a wall boundary with wall motion. Select surfaces left_rotor_discharge_end,
left_rotor_side, left_rotor_suction_end as the Location. Use the same Heat Transfer and Wall
Motion settings as the Right_Rotor, except that it should use the Reference Frame named
RF_Left_Rotor instead. Set Angular Velocity to -6000 RPM to let it rotate in the opposite direction
as the Right_Rotor wall.

Note:

In this blower example, since the two rotors have the same number of lobes (gear ratio =
1), they have the same angular velocity magnitude and rotate along opposite directions.
In a screw compressor, the ratio of the angular velocities of the male and female rotors is
proportional to the reciprocal of their gear ratio.

10.3.6. Initial Conditions


For Composition, create a new gas mixture called gas_mixture_initial using species o2 and n2,
similar to the one shown in Figure 10.5: Example for setting up a new gas mixture (p. 138). Set Tem-
perature to 300 K and Pressure to 1.0 bar. It is not critical to have well guessed initial conditions
because the initial mixture can be quickly flushed out and overridden by steady operation conditions
after 2 to 3 revolutions.

10.3.7. Simulation Controls


Simulation Limits: Choose Time Based option to specify the Simulation End Point and set Max.
Simulation Time to 0.05 s. This duration covers five complete revolutions for each rotor at 6000 RPM
(Time for each resolution can be calculated as 60/RPM s).

Time Step: Forte uses adaptive time step controls to adjust the actual time step size for each transient
flow integration step. The user-specified max time step will be used if the time step is not subject to
other constraints listed under Advanced Time Step Control Options. For rotating machinery simu-

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 139
Rotary Lobe Compressor Simulation

lation, the rule of thumb for choosing the Maximum Simulation Time Step is to have at least 10
time steps per degree of rotation of the fastest rotating motion in the system. Using this guideline,
the Max Time Step can be estimated as 60/(RPM*360*10) = 1/(RPM*60) s, which gives 2.78E-6 s
for RPM = 6000. In this tutorial, the Max Time Step is set to 2.5E-6 s. For the Advanced Time Step
Control Options, typically it is acceptable to relax the Fluid Acceleration Factor and Rate of Strain
Factor to achieve larger time steps without affecting the accuracy and stability very much. In this
calculation, these two factors are set to 1.0 and 1.2, respectively. Both are two times their default
values. It is risky to change the other control factors because relaxing them may cause the solution
to become unstable.

Chemistry Solver: Set the Activate Chemistry option to Always Off because this simulation does
not involve chemical kinetics.

10.3.8. Output Controls


Spatially Resolved: Use the Temporal Output Control option. Set Interval Based Output Control
to output every 0.01 s, which corresponds to one revolution. Turn on User Defined Output Controls
and create a time list to save spatially-resolved solutions at locations of interest. In the fully configured
ftsim file, the solutions are saved for every 0.001 s for the first revolution and the fifth revolution. For
the Spatially Resolved Species list, select all the species. For the Solution Variables list, select
variables of interest. The minimum variable set should include Pressure, Temperature, VelocityX,
VelocityY, VelocityZ, and Velocity Magnitude.

Spatially Averaged: Choose the Temporal option and set the output interval to 1.0E-5 s. Select all
the species for output.

Restart Data: Make sure Write Restart File at Last Simulation Step is checked ON. This option allows
a restart file to be saved at the end of the current simulation. Such a restart file is useful if you decide
to extend the simulation duration to do parameter studies because it provides a much better guess
for initial condition than a uniform one. This practice may help save CPU time spent in simulating
the initial transient process. Turn ON Interval Based Restart and set the Time Steps between Restart
Writing to 500. This type of restart file can help provide a recovery point if a long-running job was
unexpectedly interrupted.

Monitor Probes: On the Monitor Probes setup panel, for the Inquiry Frequency, choose Time as

the Frequency Option and set the interval to 1.E-5 s. Click the New Probe icon to add new
monitor probes. In this tutorial, we will add three Geometric-based probes at different locations and
one Boundary-Condition-based probe using the Discharge_Outlet boundary.

• The Geometric-based probes are called P_high, P_mid, P_low. For each of them, set Monitor Type
to Geometric, choose Spherical as Geometry Shape, set the Location to (X = 0.0 cm, Y = -7.8
cm, Z = 10.0 cm), (X = -7.8 cm, Y = 0.0 cm, Z = 10.0 cm), and (X = 0.0 cm, Y = 7.8 cm, Z = 10.0
cm), respectively, and set the Radius of the sphere to 0.2 cm. These three probes are scattered
near the edge of the casing on the right rotor side. Select Pressure and Temperature from the
Solution Variables list to monitor their local variation at the probed locations.

• The Boundary-Condition-based probe is called P_outlet. For this one, set Monitor Type to
Boundary Condition, select the Discharge_Outlet boundary from the list, and also select Pressure
and Temperature from the Solution Variables list to monitor the pressure and temperature aver-
aged over all the fluid cells adjacent to the Discharge_Outlet boundary.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
140 of ANSYS, Inc. and its subsidiaries and affiliates.
Simulation Results

10.4. Preview Simulation


The Preview Simulation utility is a useful tool for checking boundary motion, detecting potential surface
intersection and verifying volume mesh generation ahead of the calculation. Open the Mesh Generation
panel under Preview Simulation, select Time Range as the Time Option, set the Start, End, and Step
to 0.0 s, 0.01 s, 0.001 s, respectively. Since one complete revolution takes 0.01 s at 6000 RPM, this

preview schedule will produce 10 snapshots within a revolution. Click the Run Preview icon on
the panel, and select PreviewData.dvs and click OK on the message window that appears. Ansys
EnSight will be launched automatically and the preview solutions will be gradually loaded in EnSight
as soon as they are created.

• By default, the Check for Surface Intersections and Include Volume Mesh boxes are not selected,
and the preview is only for checking surface mesh motion. This type of preview is very fast to process.
You can run this preview in serial mode and create dozens of snapshots. The preview solution should
come out almost instantly in EnSight.

• If Check for Surface Intersections is turned ON, the preview requires slightly longer CPU time. A
new Part called "intersections" will be added to the part list in EnSight. If any surface intersection
occurs, the surface triangles involved in the intersections will show up in this new Part.

• If Include Volume Mesh is turned ON, the volume mesh preview results will take considerably longer
CPU time to produce. We recommend running the volume mesh preview in MPI mode and limiting
the preview locations to a few snapshots. Doing snapshot check for volume mesh is valuable for de-
tecting setup errors in material point, surface normal and also for verifying mesh refinement settings.

10.5. Run Settings and Run Simulation


The run settings depend on the system and environment for your simulations. All the default options
are appropriate for running this tutorial. The only thing to customize is the number of MPI processes
used to run the job. The default value is 16, but it can be modified under Run Settings > Run Options
> Job Script Options > Default MPI Arguments. The actual value used in the run can be further
modified on the Run Simulation panel, shown as MPI Args. The CPU time needed to run this case is
described in Time Estimate (p. 130). If possible, use more MPI cores to shorten the turnaround time.
Refer to the Forte User's Guide if you need to set up multiple runs in a parameter study.

10.6. Simulation Results


This section discusses using the output to visualize and post-process results:
10.6.1. Spatially Averaged Solutions
10.6.2. Spatially Resolved Solutions

10.6.1. Spatially Averaged Solutions


The spatially averaged solutions are reported in CSV format in the Run folder (Nominal). Ansys Forte

Monitor is a convenient tool for displaying these averaged solutions. Launch Forte Monitor and
open the .analysis directory of the Forte project to load the CSV files. Several line plot examples are
shown in Figure 10.6: Line plots created in Forte Monitor (p. 142). The parameters plotted include mass

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 141
Rotary Lobe Compressor Simulation

flow rate at the Suction_Inlet (open_boundary_flow.csv), torque on Left_Rotor (rota-


tion_boundary_parameters.csv), pressure monitored by monitor probe P_high (P_high.csv),
and temperature monitored by monitor probe P_outlet (P_outlet.csv).

Figure 10.6: Line plots created in Forte Monitor

10.6.2. Spatially Resolved Solutions


Ansys EnSight is the preferred tool for visualizing the spatially resolved solutions. Launch EnSight and
open the .ftind file to load the solutions. The .ftind file is a solution index file, which contains
the records pointing to a group of .ftres files. The actual solution data are contained in the .ftres
files. If you need to control which .ftres solution(s) to load in EnSight, you can truncate or concat-
enate the records contained in the .ftind files in a text editor. Refer to the Forte User's Guide for
details.

It is worth noting that the end gaps between the rotor end surfaces and the casing end surfaces are
not meshed using fluid cells in the current setup. Although these end surfaces are part of the surface
solutions, solution variables are not properly defined or extrapolated on them, therefore, they should
not be used in visualizing the solutions in EnSight. These surfaces are highlighted in Figure 10.7: Post-
processing the compressor simulation results using EnSight (p. 143).

On the EnSight Part tree shown in Figure 10.7: Post-processing the compressor simulation results
using EnSight (p. 143), the last Part, VolumeCells, is the one that contains the 3D volume solutions.
It can be used for creating clip-planes, iso-surfaces, particle traces, etc. Figure 10.8: Sample Forte
simulation results visualized in EnSight (p. 144) shows several sample solution visualization images. In
this example, the surfaces shown include all the bounding surfaces (excluding those highlighted in

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
142 of ANSYS, Inc. and its subsidiaries and affiliates.
Simulation Results

Figure 10.7: Post-processing the compressor simulation results using EnSight (p. 143)) and an XY-clip-
plane (using VolumeCells as the parent) at Z = 0.05 cm.

Figure 10.7: Post-processing the compressor simulation results using EnSight

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 143
Rotary Lobe Compressor Simulation

Figure 10.8: Sample Forte simulation results visualized in EnSight

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
144 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 11: Scroll Compressor Simulation
This tutorial describes how to use Ansys Forte CFD to simulate the gas flow in a scroll compressor. Scroll
compressors are positive displacement compressors usually employed in air conditioning, refrigeration,
and heat pump applications.

This document will go through all the simulation setup steps, with emphasis on the following aspects
that are unique or important to scroll compressors:

• Requirements for surface geometry preparation

• Small gap handling using gap refinement controls and gap model

• Setup of orbiting motion, which is a special case of planetary motion

• Simulation preview for checking boundary motion and potential surface intersection

• Visualization of simulation results

11.1. Data Provided


The following sections describe the provided files, time required, and prerequisites.

11.1.1. Files Used in This Tutorial


The files for this tutorial are obtained by downloading the scroll_compressor.zip file here.

Unzip scroll_compressor.zip to your working folder.

Files provided in this tutorial include a Forte project file that has been fully configured as well as the
surface geometry input files that can be used to set up the Forte project from scratch. Specifically,
the files include:

• Scroll_Compressor_Tutorial.ftsim: The fully configured Forte project file.

• Scroll_Compressor_Surface_Geometry.tgf: Surface geometry input file in Ansys Fluent Meshing


faceted geometry (.tgf) format, which was exported from Ansys SpaceClaim.

The tutorial sample compressed archive is provided as a download. You have the opportunity to select
the location for the file when you download and uncompress the sample files.

Note:

This tutorial is based on a fully configured sample project that contains the tutorial project
settings. The description provided here covers the key points of the project setup but is

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 145
Scroll Compressor Simulation

not intended to explain every parameter setting in the project. The project files have all
custom and default parameters already configured; the text highlights only the significant
points of the tutorial.

11.1.2. Time Estimate


This Forte project is set up to run for five complete revolutions. As a guideline for your own simulations,
this tutorial is estimated to take approximately 9 hours on a Linux cluster using an Intel 2.6 GHz
processor and 168 cores.

11.1.3. Prerequisites for This Tutorial


This tutorial will cover all the setup steps, but we recommend that you work through the Forte Quick
Start Guide first and become familiar with the workflow of the Ansys Forte user interface.

11.1.4. Project Comparison Utility


The installation includes the cgns_util export command, which you can use to compare the
parameter settings in the project file generated at any point during your tutorial set-up against the
provided .ftsim, which has the parameter settings for the final, completed tutorial. This command
is described in the Forte User's Guide.

Briefly, you can double-check project settings by saving your project and then running the cgns_util
to export your tutorial project, and then to export the provided final version of the tutorial. Save both
versions and compare them with your favorite diff tool, such as DIFFzilla. If all the parameters are in
agreement, you have set up the project successfully. If there are differences, you can go back into
the tutorial set-up, re-read the tutorial instructions, and change the setting of interest.

11.2. Problem Description


The geometry and working principle of the sample scroll compressor are illustrated in Figure 11.1: Con-
figuration of the example scroll compressor (p. 147). In a scroll compressor, gaseous refrigerant is admitted
in the periphery and discharged in the central region of a mechanical compressing assembly. This as-
sembly is formed by two identical spiral-shaped scrolls (one fixed scroll and one orbiting scroll) and a
casing that encloses these two scrolls. The orbiting motion of the orbiting scroll initiates gas pockets
formed between the two scrolls at the periphery of the assembly and migrates the pockets to the
central region of the assembly. During this migration, the volume of the gas pockets is continuously
reduced, resulting in an increase in both the pressure and temperature of the gas. The compressed gas
is eventually discharged when the pockets are exposed to the discharge port. The dimension and oper-
ating condition specifications are listed in Table 11.1: Dimensions and operating conditions of the example
scroll compressor (p. 147).

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
146 of ANSYS, Inc. and its subsidiaries and affiliates.
Scroll Compressor Project Setup

Figure 11.1: Configuration of the example scroll compressor

Table 11.1: Dimensions and operating conditions of the example scroll compressor

Item Value Units


Casing diameter ~14 cm
Scroll height ~5 cm
Eccentric radius 0.785 cm
Working fluid R-410A (50% R32 + 50% R125 by
vol.)
Suction pressure (Total) 9.978 bar
Suction temperature (Total) 293 K
Discharge pressure (Total) 33.853 bar
Discharge temperature (Total) 373 K
Rotation Speed 3000 rev/min

11.3. Scroll Compressor Project Setup


The project setup workflow follows the top-down order of the Workflow tree in the Ansys Forte Simulate
interface. For the configuration components not mentioned in this tutorial, you can simply skip them
and use the default model options

11.3.1. Prepare and Import Surface Geometry


This simulation uses Forte's on-the-fly automatic mesh generation (AMG) feature, which only requires
the bounding surface geometry as an input and does not involve volume mesh generation ahead of
the calculation. The surface geometry to be imported into Forte is in Fluent Meshing faceted geometry

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 147
Scroll Compressor Simulation

(.tgf) format, which was exported from the solid geometry created in SpaceClaim. Although the
TGF format is used in this tutorial, several other formats are also allowed. See the Geometry Import
section in the Forte User's Guide for details.

Since the scroll and casing geometries involve curved surfaces in 3-D and there are tiny gaps between
the side surfaces of scroll and casing, the curved surfaces are required to be sufficiently smooth in
order to avoid surface intersection during the rotation. When exporting the TGF file from SpaceClaim,
we recommend that you choose the Fine option for the Facet Resolution of the TGF file. The Angle
resolution should not be much larger than 4°.

Now let us import the surface geometry into the Forte Simulate user interface. Open the Geometry

panel, click the Import Geometry icon, select Surfaces from TGF file as the import option, and
select the provided TGF file, Scroll_Compressor_Surface_Geometry.tgf. Accept all the
default options on the Import Options wizard window. Note that the Invert Normals box is checked
by default.

The fluid domain in this case is formed by two watertight surface groups, which are the bounding
surfaces of the two solids in SpaceClaim. The first group consists of “inlet”, “outlet”, “intake-port”,
“discharge-port”, “static-scroll-end”, and “static-scroll-side”; the second group includes the two surfaces
that form the orbiting scroll: “orbiting-scroll-end” and “orbiting-scroll-side”. Forte requires that the
end surfaces of the orbiting scrolls be put inside the casing and away from the casing’s end surfaces
by a tiny tolerance. In the provided geometry file, this tiny tolerance is 1 µm. By default, the gap
between the orbiting scroll end surface and the casing end surface will not be meshed in the volume
mesh. However, if the end gap sizes are physically large enough and it is desirable to model the flow
leakage through them, we can force these gaps to be meshed by using the gap refinement controls
that will be discussed later in Automatic Mesh Generation Setup (p. 148).

In Forte, the normal vectors of the triangulated surface mesh are required to point towards the exter-
ior of the fluid domain. In the .tgf file, the normal vectors point to the interior of the two watertight
surface groups. When the .tgf geometry is imported, all the normal vectors are inverted. As a result,
the surface normals of the orbiting scroll surfaces should be inverted again such that they point to
the exterior of the fluid domain. To do so, multi-select (hold Ctrl and click) surfaces “orbiting-scroll-
end” and “orbiting-scroll-side” on the Geometry node of the Workflow tree, and on the right-click
menu, choose Invert Normals. You can double-check the normals of a surface by turning on Normals
using the right-click menu.

11.3.2. Automatic Mesh Generation Setup


Forte's automatic mesh generation requires you to specify a material point, a global mesh size that
serves as the reference size for mesh refinement, and various refinement controls.

Material Point: The Material Point should always lie inside the fluid domain throughout the
simulation and should be located at least one unit cell length away from any boundaries. In this tu-
torial case, we choose to put the material point inside the discharge port: X = 0.0 cm, Y = 13.5 cm,
Z = 30.0 cm.

Global Mesh Size: Set the Global Mesh Size to 0.2 cm.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
148 of ANSYS, Inc. and its subsidiaries and affiliates.
Scroll Compressor Project Setup

Three types of refinement controls are used in this tutorial: Surface Refinement Depth , SAM

(Solution Adaptive Mesh) , and Gap Feature Control . Detailed mesh control parameters
are listed in Table 11.2: Settings for Mesh Control refinements (p. 149). The Active property is set to
Always for all the mesh controls. For the Gap Feature Control, the Surface Proximity is set to 0.15
cm, and Enable Gap Model is turned ON.

Table 11.2: Settings for Mesh Control refinements

Item Refinement type Refinement location Refinement Refinement


level layers
Open_Boundar- Surface inlet, outlet 1/2 1
ies
Static_Walls Surface discharge-port, intake-port, 1/2 1
static-scroll-end,
static-scroll-side
Orbiting Surface orbiting-scroll-side 1/2 1
Scroll_Side
Orbiting Surface orbiting-scroll-end 1/4 1
Scroll_Ends
SAM_Velo- SAM Entire Domain 1/2
city_Grad
Quantity =
Velocity
magnitude
gradient;

Bounds =
Statistical;
Sigma Thresh =
0.5
Gaps Gap feature (orbiting_scroll_side, 1/4
static_scroll_side)

The Gap Feature Control is a mesh refinement control that is especially useful for handling the
small gaps in compressors. This control automatically detects small gaps between the specified surface
pair based on the user-specified Surface Proximity criterion and applies refinement in the detected
gap region based on the user-specified refinement level. When Gap Feature Control is used, the
spatially resolved solution will contain a variable called GapCellFlag, which uses non-zero integer
values to mark the zones identified as gap zones.

Forte does not require the gap zones to be finely resolved using tiny CFD cells. In this tutorial, the
Cartesian cell size in the gap zone is 0.05 cm, which means that some of the gaps only contain a
fraction of a Cartesian cell cut by the physical boundary. To compensate for the under-resolution in
the gap zones, the Gap Model is used to apply a momentum sink term, which accounts for the un-
derpredicted wall shear stress and over-predicted mass flow rate on the coarse grid. The Gap Model
takes both the gap size and the local fluid cell size as inputs, and therefore the flow solution is not
expected to be very sensitive to the gap refinement level.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 149
Scroll Compressor Simulation

The Gap Size Scale Factor can be used to enlarge or shrink the gap sizes measured on the geometry.
The scaled gap size is then used as the input for the gap model in each local CFD cell in the gap
zone. If the gap size in the geometry accurately reflects the size in the actual compressor, the best
practice is to use the default value of 1.0. In this sample scroll compressor case, the smallest gap size
is about two times of that in the actual compressor, therefore the gap size scale factor is set to 0.5
to reduce flow leakage through gaps in the simulation. When using simulation to guide compressor
design, this gap size scale factor also allows you to study the impact of gap size on simulation results
without the need of modifying the geometry itself.

As mentioned earlier, there is a 1 µm distance tolerance between the end surface of the orbiting
scroll and the end surface of the casing (the surface is called “static-scroll-end”) on both ends. Forte
will ignore this tiny gap by default. However, if the end gaps are large enough and it is of interest to

model the flow leakage through them, you can use the Gap Feature Control to mesh these
gaps.

11.3.3. Chemistry Set


In Forte, a chemistry set in Chemkin format is used to define the properties of the working fluid. This
scroll compressor is for refrigeration applications. The working fluid is R-410A, which is a mixture of
R32 and R125. It will be modeled using the real gas model. Ansys Forte supplies a chemistry set for
various refrigerants, called Refrigerants.cks, which is stored in the data folder of your Forte
installation. To import this chemistry set, go to the Workflow tree and under Models > Chemistry,

click Import Chemistry , select Refrigerants.cks in the data folder of the Forte installation.
This chemistry set contains R32 and R125 as species. To create the R-410A mixture, click the Mixture

icon on the menu bar, select the Create New option. In the pop-up Mixture Editor window, click
Add Species to add R32 and R125 and set both of their Mole Fractions to 0.5. To turn on the real
gas model option, choose Real Gas as the Equation of State option on the Models > Chemistry
panel.

11.3.4. Transport Property Settings


This tutorial uses the RANS RNG k-ε turbulence model, which is the default turbulence model option.
Other turbulence modeling options are available under Models > Transport > Turbulence, such as
LES models.

11.3.5. Boundary Conditions


Use the icons on the Boundary Conditions panel to add new boundary conditions. The boundary
conditions used in this project are explained below:

Inlet: Defined as an inlet boundary . For Composition on the inlet setup panel, select the R-410A
mixture created earlier. Select surface inlet as the Location. Choose the Total Pressure option for
Inlet type and set the pressure to 9.978 bar. Keep the default turbulence parameters for the inflow.
Choose Total Temperature as the Temperature Option and set the temperature to 293 K.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
150 of ANSYS, Inc. and its subsidiaries and affiliates.
Scroll Compressor Project Setup

Discharge: The discharge outlet should be defined as an inlet boundary as well because we need
the reverse flow condition to be explicitly defined. For Composition, select the same R-410A mixture.
Select surface Outlet as the Location. Choose the Total Pressure option for Inlet type and set the
pressure to 33.853 bar. Keep the default turbulence parameters for the inflow. Choose Total Tem-
perature as the Temperature Option and set the temperature to 373 K.

Static-walls: Defined as a wall boundary . This boundary condition includes all static walls in this
sample, but you can choose to split it into multiple wall boundaries if needed. Select surface in-
take_port, discharge_port, static_scroll_end, and static_scroll_side as the Location. Turn ON Heat
Transfer and set Wall Temperature to 333.0 K.

Orbiting-scroll-wall: Defined as a wall boundary . Select surfaces orbiting-scroll-end and orbiting-


scroll-side as the Location. Turn off Heat Transfer to model this wall as adiabatic. Turn on Wall
Motion and set Motion Type as Planetary Motion. Both the primary axis and secondary axis require
an Origin and a Direction vector as the inputs. To facilitate the setup, let us create two reference

frames for these two axes. Go to Geometry > Reference Frames, click the Create new icon to
create two new reference frames: primary-shaft and secondary-shaft. For reference frame primary-
shaft, set the New Origin to (X = 0.0 cm, Y = 13.65 cm, Z = 25.0 cm); for reference frame secondary-
shaft, set the New Origin to (X = 0.785 cm, Y = 13.65 cm, Z = 25.0 cm). Now go back to this
boundary condition panel. By using the two reference frames, the Origin and Direction of these two
axes are simply the origin (X = 0.0 cm, Y = 0.0 cm, Z = 0.0 cm) and Z-axis (X = 0.0, Y = 0.0, Z = 1.0)
of the corresponding reference frames. See the fully configured Forte project for details. To create
an orbiting motion, the angular velocities of the primary rotation and secondary rotation should have
the same magnitude but opposite direction. Therefore, set Primary Angular Velocity to 3000 RPM
and set Secondary Angular Velocity to -3000 RPM. Note that the rotation direction follows the
right-hand rule.

11.3.6. Initial Conditions


For Composition, select the mixture R-410A created earlier . Set Temperature to 350 K and Pressure
to 9.975 bar. It is not critical to have well guessed initial conditions because the initial mixture can
be quickly flushed out and overridden by steady operation conditions after 2 to 3 revolutions.

11.3.7. Simulation Controls


Simulation Limits: Choose the Time Based option to specify the Simulation End Point and set Max.
Simulation Time to 0.1 s. This duration covers five complete revolutions for the primary shaft. (Time
for each resolution can be calculated as 60/RPM s).

Time Step: Forte uses adaptive time step controls to adjust the actual time step size for each transient
flow integration step. The user-specified max time step will be used if the time step is not subject to
other constraints listed under Advanced Time Step Control Options. For rotating machinery simu-
lation, the rule of thumb for choosing the Maximum Simulation Time Step is to have at least 10
time steps per degree of rotation of the fastest rotating motion in the system. Using this guideline,
the Max Time Step can be estimated as 60/(RPM*360*10) = 1/(RPM*60) s, which gives 5.56E-6 s
for RPM = 3000. In this tutorial, the Max Time Step is set to 5.0E-6 s. For the Advanced Time Step
Control Options, typically it is acceptable to relax the Fluid Acceleration Factor and Rate of Strain
Factor to achieve larger time steps without affecting the accuracy and stability very much. In this

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 151
Scroll Compressor Simulation

calculation, these two factors are set to 1.0 and 1.2, respectively. Both are two times their default
values. It is risky to change the other control factors because relaxing them may cause the solution
to become unstable.

Chemistry Solver: Set the Activate Chemistry option to Always Off because this simulation does
not involve chemical reaction.

11.3.8. Output Controls


Spatially Resolved: Use the Temporal Output Control option. Set Interval Based Output Control
to output every 0.01 s, which corresponds to a half revolution. Turn on User Defined Output Controls
and create a time list to save spatially resolved solutions at locations of interest. In the fully configured
.ftsim file, the solutions are saved for every 5.56E-4 s (corresponding to 10 degrees of rotation) for
the third revolution. For the Spatially Resolved Species list, select R32 and R125. For the Solution
Variables list, select variables of interest. The minimum variable set should include Pressure, Tem-
perature, VelocityX, VelocityY, VelocityZ, and Velocity Magnitude.

Spatially Averaged: Choose the Temporal option and set the output interval to 1.0E-5 s. Select
species R32 and R125 for output.

Restart Data: Make sure Write Restart File at Last Simulation Step is checked ON. This option allows
a restart file to be saved at the end of the current simulation. Such a restart file is useful if you decide
to extend the simulation duration to do parameter studies because it provides a much better guess
for initial condition than a uniform one. This practice may help save CPU time spent in simulating
the initial transient process. Turn ON Interval Based Restart and set the Time Steps between Restart
Writing to 500. This type of restart file can help provide a recovery point if a long-running job was
unexpectedly interrupted.

Monitor Probes: On the Monitor Probes setup panel, for the Inquiry Frequency, choose Time as

the Frequency Option and set the interval to 1.E-5 s. Click the New Probe icon to add new
monitor probes. In this tutorial, we will add three Geometric-based probes at different locations and
one Boundary-Condition-based probe using the Discharge boundary.

• The Geometric-based probes are called Probe_High_Pres, Probe_Medium_Pres, Probe_Low_Pres.


For each of them, set Monitor Type to Geometric, choose Spherical as Geometry Shape, use the
primary-shaft reference frame for the Location and set the Location to (X = 1.5 cm, Y = 0.0 cm,
Z = 0.0 cm), (X = 4.0 cm, Y = 0.0 cm, Z = 0.0 cm), and (X = 6.5 cm, Y = 0.0 cm, Z = 0.0 cm), re-
spectively, and set the Radius of the sphere to 0.2 cm. These three probes are only examples. You
can customize the locations in your specific application. Select Pressure and Temperature from
the Solution Variables list to monitor their local variation at the probed locations.

• The Boundary-Condition-based probe is called Probe_Outlet. For this one, set Monitor Type to
Boundary Condition, select the Discharge boundary from the list, and also select Pressure and
Temperature from the Solution Variables list to monitor the pressure and temperature averaged
over all the fluid cells adjacent to the Discharge boundary.

11.4. Preview Simulation


The Preview Simulation utility is a useful tool for checking boundary motion, detecting potential surface
intersection and verifying volume mesh generation ahead of the calculation. Open the Mesh Generation

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
152 of ANSYS, Inc. and its subsidiaries and affiliates.
Simulation Results

panel under Preview Simulation, select Time Range as the Time Option, set the Start, End, and Step
to 0.0 s, 0.02 s, 0.001 s, respectively. Since one complete revolution takes 0.02 s at 3000 RPM, this

preview schedule will produce 20 snapshots within a revolution. Click the Run Preview icon on
the panel, then select PreviewData.dvs and click OK on the pop-up window that appears. Ansys
EnSight will be launched automatically and the preview solutions will be gradually loaded in EnSight
as soon as they are created.

• By default, the Check for Surface Intersections and Include Volume Mesh boxes are not selected,
and the preview is only for checking surface mesh motion. This type of preview is very fast to process.
You can run this preview in serial mode and create dozens of snapshots. The preview solution should
come out almost instantly in EnSight.

• If Check for Surface Intersections is turned ON, the preview requires slightly longer CPU time. A
new Part called intersections will be added to the part list in EnSight. If any surface intersection
occurs, the surface triangles involved in the intersections will show up in this new Part.

• If Include Volume Mesh is turned ON, the volume mesh preview results will take considerably longer
CPU time to produce. We recommend running the volume mesh preview in MPI mode and limiting
the preview locations to a few snapshots. Doing snapshot check for volume mesh is valuable for de-
tecting setup errors in material point, surface normal and also for verifying mesh refinement settings.

11.5. Run Settings and Run Simulation


The run settings depend on the system and environment for your simulations. All the default options
are appropriate for running this tutorial. The only thing to customize is the number of MPI processes
used to run the job. The default value is 16, but it can be modified under Run Settings > Run Options
> Job Script Options > Default MPI Arguments. The actual value used in the run can be further
modified on the Run Simulation panel, shown as MPI Args. The CPU time needed to run this case is
described in Time Estimate (p. 146). If possible, use more MPI cores to shorten the turnaround time.
Refer to the Forte User's Guide if you need to set up multiple runs in a parameter study.

11.6. Simulation Results


This section discusses using the output to visualize and post-process results:
11.6.1. Spatially Averaged Solutions
11.6.2. Spatially Resolved Solutions

11.6.1. Spatially Averaged Solutions


The spatially averaged solutions are reported in CSV format in the Run folder (Nominal). Ansys Forte

Monitor is a convenient tool for displaying these averaged solutions. Launch Forte Monitor and
open the .analysis directory of the Forte project to load the CSV files. Several line plot examples are
shown in Figure 11.2: Line plots created in Forte Monitor (p. 154). The parameters plotted include mass
flow rate at the Inlet (open_boundary_flow.csv) and power of the orbiting scroll applied on the
fluid (planetary_boundary_parameters.csv). In this example, the curves show that the sim-
ulation has largely reached a steady operation starting from the third revolution. The cyclic pattern
started to repeat for each revolution thereafter.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 153
Scroll Compressor Simulation

Figure 11.2: Line plots created in Forte Monitor

11.6.2. Spatially Resolved Solutions


Ansys EnSight is the preferred tool for visualizing the spatially resolved solutions. Launch EnSight and
open the .ftind file to load the solutions. The .ftind file is a solution index file, which contains
the records pointing to a group of .ftres files. The actual solution data are contained in the .ftres
files. If you need to control which .ftres solution(s) to load in EnSight, you can truncate or concat-

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
154 of ANSYS, Inc. and its subsidiaries and affiliates.
Simulation Results

enate the records contained in the .ftind files in a text editor. Refer to the Forte User's Guide for
details.

It is worth noting that the end gaps between the orbiting end surfaces (surface “orbiting-scroll-end”)
and the casing end surfaces (surface “static-scroll-end”) are not meshed using fluid cells in the current
setup. Although these end surfaces are part of the surface solutions, solution variables are not properly
defined or extrapolated on them, therefore, they should not be used in visualizing the solutions in
EnSight. These surfaces are highlighted in Figure 11.3: Post-processing simulation results using En-
Sight (p. 155). To show the solutions at these boundaries, you can create two clip planes (whose parent
part is VolumeCells) instead. Figure 11.3: Post-processing simulation results using EnSight (p. 155)
shows two clip planes created at Z = 27.7 cm and Z = 22.81 cm, respectively.

On the EnSight Part tree shown in Figure 11.3: Post-processing simulation results using EnSight (p. 155),
the Part VolumeCells is the one that contains the 3-D volume solutions. It can be used for creating
clip-planes, iso-surfaces, particle traces, etc. Figure 11.4: Sample Forte simulation results on clip planes
in EnSight (p. 156) shows pressure and velocity plotted on clip planes. In this example, the top two
are XY clip planes (using VolumeCells as the parent) at Z = 26.5 cm, in which the mesh lines are
shown as well; the bottom two are YZ clip planes at X = 0.0 cm.

Figure 11.3: Post-processing simulation results using EnSight

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 155
Scroll Compressor Simulation

Figure 11.4: Sample Forte simulation results on clip planes in EnSight

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
156 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 12: Piston Compression Pump With Built-in
FSI
This tutorial describes a piston compression pump using the Built-in Fluid Structure Interaction (FSI) in
Ansys Forte CFD. This feature allows pressure loads from the fluid simulation to interact with boundaries
causing them to translate or deform. Refer to the Forte User's Guide for a more detailed explanation of
this feature.

This tutorial shows the application case of a piston compression pump filled with air and capped with
valves that translate as rigid bodies according to Hooke's Law.

12.1. Data Provided


The following sections describe the provided files, time required, prerequisites, and a utility for comparing
your generated project file (.ftsim) with the one provided in the tutorial download.

12.1.1. Files Used in This Tutorial


The files for this tutorial are obtained by downloading the fsi_piston_pump.zip file here.

Unzip fsi_piston_pump.zip to your working folder.

Files provided in this tutorial include a Forte project file that has been fully configured as well as a
set of facilitating input files that can be used to set up the Forte project starting from a blank project.
Specifically, the files include:

• piston_compression_pump.ftsim: The fully configured Forte project file.

• piston_compression_pump.stl: The geometry file..

• Air_NoReactions_duplicates_chem.inp: The chemistry input file in a Chemkin format, used to set


up the working fluid properties in a Forte simulation.

The tutorial sample compressed archive is provided as a download. You have the opportunity to select
the location for the file when you download and uncompress the sample files.

Note:

This tutorial is based on a fully configured sample project that contains the tutorial project
settings. The description provided here covers the key points of the project set-up but is
not intended to explain every parameter setting in the project. The project files have all
custom and default parameters already configured; the text highlights only the significant
points of the tutorial.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 157
Piston Compression Pump With Built-in FSI

12.1.2. Project Comparison Utility


The Ansys Forte installation includes the cgns_util export command, which you can use to
compare the parameter settings in the project file generated at any point during your tutorial set-up
against the provided .ftsim, which has the parameter settings for the final, completed tutorial. This
command is described in the Forte User's Guide.

Briefly, you can double-check project settings by saving your project and then running the cgns_util
to export your tutorial project, and then to export the provided final version of the tutorial. Save both
versions and compare them with your favorite diff tool, such as DIFFzilla. If all the parameters are in
agreement, you have set up the project successfully. If there are differences, you can go back into
the tutorial set-up, re-read the tutorial instructions, and change the setting of interest.

12.1.3. Prerequisites for This Tutorial


This tutorial will cover all the set-up steps, but we recommend that you work through the Forte Quick
Start Guide first and become familiar with the workflow of the Ansys Forte user interface.

12.1.4. Time Estimate


This Forte project is set up to run for three complete revolutions. As a guideline for your own simula-
tions, this tutorial is estimated to take approximately 25 hours on a Linux cluster using an Intel 2.6
GHz processor (112 cores).

12.2. Problem Description


The piston compression pump geometry is illustrated in Figure 12.1: Piston compression pump geo-
metry (p. 159). The flat piston moves with a slider crank motion, travelling up and down the perpendic-
ular shaft to compress and expand the inert gas. The two valves, intake and discharge valve, translate
as rigid bodies along their horizontal axis responding to the flow conditions. When the piston expands
going towards its bottom-dead-center, the intake valve is pulled to its right and opens up while the
discharge valve remains in its closed position. In contrast, when the piston compresses the in-cylinder
gas as it travels towards its top-dead-center position, the discharge valve is pushed to its right and
opens up while the intake valve is sealed to its closed position.

The specific dimensions and operating conditions of this piston compression pump are listed in
Table 12.1: Dimensions and operating conditions (p. 159).

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
158 of ANSYS, Inc. and its subsidiaries and affiliates.
Piston Compression Pump Setup

Figure 12.1: Piston compression pump geometry

Table 12.1: Dimensions and operating conditions

Item Value Units


Head diameter 5.426 cm
Stroke 10 cm
Connecting rod 15 cm
Working fluid air (ideal gas)
Inlet pressure 1 bar
Outlet pressure 5 bar
RPM 3000 rev/min

12.3. Piston Compression Pump Setup


The project setup workflow follows the top-down order of the workflow tree in the Ansys Forte Simulate
interface. The components irrelevant to the present project will not be mentioned in this document,
and you can simply skip them and use the default model options.

12.3.1. Import the Geometry

Note:

Changed values on any Editor panel do not take effect until you press the Apply
button. Always press the Apply button after modifying a value, before moving to a
new panel or the Workflow tree.

In this tutorial, we import an existing geometry into Ansys Forte and set up the automatic mesh
generation using a global mesh size and adapting the mesh where extra resolution is needed. To

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 159
Piston Compression Pump With Built-in FSI

import the geometry, go to the Workflow tree and click Geometry. This opens the Geometry icon bar.

Click the Import Geometry icon. In the resulting dialog, pull down and select Surfaces from
one or more STL files, then select the provided STL file, piston_compression_pump.stl. In
the dialog that opens with STL file import options, accept the defaults. The mesh will be automatically
generated during the simulation. Note that once you have imported the geometry, there are a number
of actions that you can perform to modify the provided project on the items in the Geometry node,
such as scale, rename, transform, invert normals, or delete geometry elements. Use the Refit button
to fit the entire geometry in the graphic window.

To allow later easy identification of the direction of the valves and piston motion, create one local
reference frame per valve plus one for the main chamber. From the Geometry node, turn ON the
Reference Frames and create the new reference frames as indicated in Table 12.2: New Reference
Frame Origins in global coordinates (p. 160).

Table 12.2: New Reference Frame Origins in global coordinates

Reference Frame x y z
(RF)
Intake_Valve_RF 3.7875 0 cm 0 cm
cm
Discharge_Valve_RF 10.103 0 cm 0 cm
cm
Main_Chamber_RF 7.1 cm 0 cm 0 cm

In the already set-up project that you have previously downloaded, you can also see that a clip plane
is created to allow a better view of the various components and reference frames, as shown in Fig-
ure 12.2: Clip view of the Geometry and Reference Frames (p. 160).

Figure 12.2: Clip view of the Geometry and Reference Frames

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
160 of ANSYS, Inc. and its subsidiaries and affiliates.
Piston Compression Pump Setup

12.3.2. Automatic Mesh Generation Setup


The mesh creation occurs on-the-fly during the simulation, however there are several parameters that
must be set in the Mesh Controls node:

Material Point: It is needed to identify the simulation domain where the mesh will be generated. It
should be located at least one unit cell length away from any boundaries and must be inside of the
domain throughout the entire simulation. Place it at the origin of the Main_Chamber_RF.

Global Mesh Size: Specify as 2 mm.

Refinements: These are needed to refine the mesh around key geometry features. They are of different

types, those used in this tutorial are: Surface Refinement Depth , SAM (Solution Adaptive Mesh)
, and Gap Feature Control . The Gap Feature Control automatically detects small gaps between
the specified surface pair based on the user-specified Surface Proximity criterion and applies refinement
in the detected gap region based on the user-specified refinement level. When Gap Feature Control
is used, the spatially resolved solution will contain a variable called GapCellFlag, which uses non-zero
integer values to mark the zones identified as gap zones. Detailed mesh control parameters are listed
in Table 12.3: Settings for Mesh Control refinements (p. 161). The Active property is set to Always for
all the mesh controls.

Table 12.3: Settings for Mesh Control refinements

Item Refinement type Refinement location Refinement Refinement


level layers
Open_Surfaces Surface inlet, 1/4 1

outlet
Walls_ValveEnds Surface connector_wall, 1/4 1

discharge_pipe,

intake_pipe,

discharge_valve_narrow_end,
discharge_valve_wide_end,

intake_valve_narrow_end,
intake_valve_wide_end
Contact_Surfaces Surface discharge_seat, 1/16 4

discharge_valve_side,

intake_seat,

intake_valve_side
Cylinder_Walls Surface head, 1/2 1

liner,

piston

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 161
Piston Compression Pump With Built-in FSI

Item Refinement type Refinement location Refinement Refinement


level layers
SAM-VelGrad SAM Entire Domain 1/2 -

Quantity=
vel. mag.
grad.

Bounds=
statistical

Sigma
Threshold=
0.1
Intake_Gap Gap Feature intake_seat, 1/16 -

Surface Prox intake_valve_side


= 0.05 cm

Gap Model=
ON

Gap Factor
=1
Discharge_Gap Gap Feature discharge_seat, 1/16 -

Surface Prox discharge_valve_side


= 0.05 cm

Gap Model=
ON

Gap Factor
=1

As mentioned earlier, there is a 1 µm distance tolerance between the end surface of the rotor and
the end surface of the casing on both ends. Forte will ignore this tiny gap by default. However, if the
end gaps are large enough and it is of interest to model the flow leakage through them, you can use
the Gap Feature Control to mesh these gaps.

12.3.3. Models Setup


All the settings in this node can be left at the default settings (as described in the Note in Files Used
in This Tutorial (p. 157)), but do not forget to import the provided chemistry set into the project.

12.3.3.1. Chemistry Set


Chemistry set: To use this chemistry set, first go to Utility on the ribbon and select Preprocess,
then create a New Chemistry Set. Select the Air_NoReactions_duplicates_chem.inp in
the Gas-Phase Kinetics file, then Run-Preprocess. Now navigate to Chemistry under the Models

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
162 of ANSYS, Inc. and its subsidiaries and affiliates.
Piston Compression Pump Setup

node and click Chemistry. On the Editor panel that opens, click the Import Chemistry icon and
select the Air_NoReactions_duplicates_chem.cks chemistry set just created.

12.3.4. Boundary Conditions


Boundary conditions must be specified for each of the geometry elements. In the already set-up
project, you can find the following boundary conditions:

Inlet: Type inlet. Set the mass fraction composition to be 0.21 o2_in and 0.79 n2_in, and the se-
lected location is inlet. The Static Pressure is set to 1 bar and the Total Temperature to 300 K.
Turbulence parameters are the default ones.

Outlet: Type inlet, to force the reverse flow condition to be explicitly defined. Set the mass fraction
composition to be 0.21 o2_out and 0.79 n2_out, and the selected location is outlet. The Static
Pressure is set to 5 bar and the Total Temperature to 350 K. Turbulence parameters are the default
ones.

Walls: Type wall. The location selection lists connector_wall, discharge_pipe, discharge_seat, head,
intake_pipe, intake_seat, liner. The Heat Transfer check box is selected and the Wall Temperature
is constant at 300 K.

Piston: Type wall. The location selection lists only the piston. The Heat Transfer check box is selected
and the Wall Temperature is constant at 300 K. The Wall Motion is activated with type Slider Crank,
Stroke 10 cm, Connecting Rod Length 15cm and direction of motion set to y =1 cm.

Intake_Valve: Type wall. The location selection lists intake_valve_narrow_end, intake_valve_side,


intake_valve_wide_end. The Heat Transfer check box is NOT selected.

Discharge_Valve: Type wall. The location selection lists discharge_valve_narrow_end, dis-


charge_valve_side, discharge_valve_wide_end. The Heat Transfer check box is NOT selected.

12.3.5. Initial Conditions


The entire domain is initialized with air, 0.21 o2 and 0.79 n2 concentration (note that this is the
“original” air, not one of the duplicates), with a constant Temperature and Pressure of 350 K and 5
bar, respectively, since the initial piston location is at its top dead center and therefore the main
chamber conditions are closer to the outlet pipe.

12.3.6. Simulation Controls


For the Simulation Controls node, first select the Crank Angle Based simulation option. Then set the
initial Crank Angle to be 0 and the final to be 1080, since the cycle type is only 2-stroke and we
want to have 3 full cycles. The piston RPM are 3000.

Time Step: Only two parameters differ from the defaults to accommodate a larger time step without
affecting much the accuracy and the stability of the solution, these are: the Fluid Acceleration Factor
to be 5 and the Rate of Strain Factor to be 6

Built-in FSI: Activate the Built-in FSI feature by checking the box, click the icon to create a new
spring mass-system and name it Intake_Spring. Now, select the Intake_Valve in the location list

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 163
Piston Compression Pump With Built-in FSI

and choose Linear in the Spring Type option. Then set the other parameters as shown in Fig-
ure 12.3: Built-in FSI Spring-Mass-System Editor panel (p. 164), and don’t forget to select the In-
take_Valve_RF as reference frame in the Direction panel with the only non zero component being
in the x direction. Repeat the above steps to create the Discharge_Spring as new Spring-Mass-System.
This time use a Mass of Body of 15 g, a Preload Displacement of 2 mm, and use the Dis-
charge_Valve_RF and a single x=1 component in the Direction panel. In both the Spring-Mass-System
the Restrict to Positive Displacement box is checked to constrain the valve motion. The Max. Travel
Per Step is set to 1; in case you want to modify the tutorial tune this parameter to fix the maximum
valve motion per each time step. For example, a value of 0.05 will force the valve to move by only
5% of the computed displacement for that step.

Figure 12.3: Built-in FSI Spring-Mass-System Editor panel

Note:

Each Spring-Mass-System will generate, during the simulation, a *_fsi.csv file. Each of
these files contains information about the Applied Deflection and the Pressure Force
applied to the valve. Use Ansys Forte MONITOR to track them.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
164 of ANSYS, Inc. and its subsidiaries and affiliates.
Run Settings and Run Simulation

12.3.7. Output Controls


Output controls determine what data are stored for viewing during the simulation and for creating
plots, graphs, and animations in Ansys EnSight.

Spatially Resolved: Allows you to control when spatially resolved data such as velocity, temperature,
species concentrations, etc., will be output. In the Spatially Resolved Editor panel, set the Crank
Angle Output Control to report every 20 degrees (to manage the size of the output file).You can
optionally increase the frequency of output during the cycles to create smoother animations. Select
then the Solution Count in the File Size Control and set the Solutions per Results File to 1 to have
a single *.ftres per each output Crank Angle. For the Spatially Resolved Species and Solution
Variables, select variables of your interest like Pressure, Temperature, VelocityX, VelocityY, VelocityZ,
and Velocity Magnitude.

Spatially Averaged And Spray: Select Crank Angle and set the interval to 0.5 degrees, then choose
the species of interest.

Restart Data: This option allows a restart file to be saved at the end of the current simulation if the
Write Restart File at Last Simulation Step option is checked. Such a restart file is useful if you decide
to extend the simulation duration to do parameter studies because it provides a much better guess
for initial condition than a uniform one.

Monitor Probes: Choose an Inquiry Frequency of 0.5 degrees and then create three monitor probes
of type Geometric and shape Spherical with a 5 mm radius. Place them at 2.5 cm, 12 cm, and 7.1
cm in the x direction with respect to the global origin reference frame and name them Intake_Probe,
Discharge_Probe, and Chamber_Probe, respectively. Select probe outputs of Pressure and Temper-
ature.

12.4. Preview Simulation


To detect potential problems due to surface intersection or mesh generation before the simulation is
started, navigate to the Preview Simulation node. On the Mesh Generation panel, set the Time Option
to Crank Angle for investigating a specific Crank Angle or to Crank Angle Range for a more extensive
investigation, then select Check for Surface Intersections and/or Include Volume Mesh depending

on your interests, and finally, launch the preview by clicking the Generate Mesh icon. Due to the
nature of this tutorial, valve motion cannot be predicted with this preview since their motion depends
on the flow simulation. Nevertheless, the Preview feature can be used to make sure all the other parts
behave as expected and the volume mesh generation is appropriate.

12.5. Run Settings and Run Simulation


The run settings depend on the system and environment for your simulations. Change the number of
cores to use for this simulation according to the resources available to you by navigating to Run Settings
> Run Options > Job Script Options > Default MPI Arguments and set the number of cores there.
No other changes are needed, and you can proceed launching the simulation using the options under

Run Simulation .

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 165
Piston Compression Pump With Built-in FSI

12.6. Simulation Results


In this section we post-process and analyze the results of the simulation.

Figure 12.4: Spatially averaged Intake_Valve applied deflection and piston position (p. 166) shows the
opening and closing of the intake valve versus the crank angle. It can be noticed that when the piston
travels on its way to the bottom dead center, the intake valve opens and vice versa: it closes when the
piston returns to its top-dead-center position.

Figure 12.4: Spatially averaged Intake_Valve applied deflection and piston position

Figure 12.5: Spatially averaged Discharge_Valve applied deflection and piston position (p. 167) shows
the opening and closing trend of the discharge valve versus the crank angle. This time the opening of
the valve is triggered by the piston moving from the bottom to the top, while the closing is triggered
by the downward motion of the piston.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
166 of ANSYS, Inc. and its subsidiaries and affiliates.
Simulation Results

Figure 12.5: Spatially averaged Discharge_Valve applied deflection and piston position

The force applied to each valve is reported in Figure 12.6: Spatially averaged pressure force applied to
each valve and piston position (p. 168). Initially the two valves are closed, and their motion is limited to
positive displacements as specified in the setup. When the pressure applied to one of the valves becomes
positive the valve opens and a negative pressure corresponds to a closing of the valve. The trends
shown in Figure 12.4: Spatially averaged Intake_Valve applied deflection and piston position (p. 166),
Figure 12.5: Spatially averaged Discharge_Valve applied deflection and piston position (p. 167) and Fig-
ure 12.6: Spatially averaged pressure force applied to each valve and piston position (p. 168) can be re-
produced via Forte MONITOR by enabling the Applied Deflection and Pressure Force curves under
the Intake_Valve_fsi.csv and Discharge_Valve_fsi.csv files.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 167
Piston Compression Pump With Built-in FSI

Figure 12.6: Spatially averaged pressure force applied to each valve and piston position

For a deeper analysis let us look at the spatially resolved results. To reproduce the following figures,
you must launch EnSight, load the Nominal.ftind file generated at the end of the simulation, and
create a z-clip plane. Color it with the variable of your choice and move the time frame back and forth
to see the advancing of time (crank angle in this case). Figure 12.7: Pressure distribution on a z-plane
at BDC and TDC, respectively (p. 169) reports the pressure distribution on a z-clip plane at bottom dead
center and at top dead center. In the first case on the left we see that the opening of the valve allows
the extended cylinder and the intake pipe have the same pressure. Meanwhile the low in-cylinder
pressure is sucking the discharge valve, maintaining it in a sealed position. In contrast, the discharge
valve opens when the piston is at its top, the compressed air in the cylinder is now at the same pressure
as the discharge pipe and it is pushing the intake valve to the left, blocking the inlet flow from reaching
the cylinder. See Figure 12.8: Spatially averaged in-cylinder pressure and piston position (p. 169) to analyze
the spatially averaged in-cylinder pressure along the whole simulation.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
168 of ANSYS, Inc. and its subsidiaries and affiliates.
Simulation Results

Figure 12.7: Pressure distribution on a z-plane at BDC and TDC, respectively

Figure 12.8: Spatially averaged in-cylinder pressure and piston position

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 169
Piston Compression Pump With Built-in FSI

To better understand the direction of the flow we now make use of the “duplicate” species mentioned
in the setup. Figure 12.9: Spatial distribution of Air_IN and Air_OUT at various crank angles (p. 170) tracks
the air flow coming in from the inlet (left side of the figure at a crank angle close to BDC), and the flow
coming from the outlet (right side of the figure at a crank angle close to TDC).

Finally, Figure 12.9: Spatial distribution of Air_IN and Air_OUT at various crank angles (p. 170) depicts
the velocity magnitude distribution on the same z-clip plane at BDC and TDC. The velocity arrows have
fixed length to help capture the flow motion.

Figure 12.9: Spatial distribution of Air_IN and Air_OUT at various crank angles

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
170 of ANSYS, Inc. and its subsidiaries and affiliates.
Simulation Results

Figure 12.10: Spatial distribution of velocity magnitude at BDC and TDC, respectively

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 171
Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
172 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 13: Valved Pulse-Jet With Built-in FSI
This tutorial describes a valved pulse-jet case using the Built-in Fluid Structure Interaction (FSI) in Ansys
Forte CFD. This feature allows pressure loads from the fluid simulation to interact with boundaries
causing them to translate or deform. Refer to the Forte User's Guide for a more detailed explanation of
this feature.

This tutorial shows the application case of a pulsed jet with 8 reed valves, in which the flexing of the
valves, modeled as cantilever beams, controls the flow passage between two communicating chambers.

13.1. Data for Tutorial


The following sections describe:
13.1.1. Files Used in This Tutorial
13.1.2.Time Estimate
13.1.3. Prerequisites for This Tutorial
13.1.4. Project Comparison Utility

13.1.1. Files Used in This Tutorial


The files for this tutorial are obtained by downloading the fsi_pulse_jet.zip file here.

Unzip the fsi_pulse_jet.zip to your working folder.

Files provided in this tutorial include a Forte project file that has been fully configured as well as a
set of facilitating input files that can be used to set up the Forte project starting from a blank project.
Specifically, the files include:

• valved_pulse_jet.ftsim: The fully configured Forte project file.

• valved_pulse_jet.stl: The geometry file.

• PulsedPressureProfile.csv: The inlet pulsed pressure profile.

Note:

This tutorial is based on a fully configured sample project that contains the tutorial project
settings. The description provided here covers the key points of the project set-up but is
not intended to explain every parameter setting in the project. The project files have all
custom and default parameters already configured; the text highlights only the significant
points of the tutorial.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 173
Valved Pulse-Jet With Built-in FSI

13.1.2. Time Estimate


This Forte project is set up with a final simulation time of 2 ms. As a guideline for your own simulations,
this tutorial is estimated to take less than approximately 3 hours on a Linux cluster using an Intel 2.6
GHz processor (84 cores).

13.1.3. Prerequisites for This Tutorial


This tutorial will cover all the set-up steps, but we recommend that you work through the Forte Quick
Start Guide first and become familiar with the workflow of the Ansys Forte user interface.

13.1.4. Project Comparison Utility


The Ansys Forte installation includes the cgns_util export command, which you can use to
compare the parameter settings in the project file generated at any point during your tutorial set-up
against the provided .ftsim , which has the parameter settings for the final, completed tutorial.
This command is described in the Forte User's Guide.

Briefly, you can double-check project settings by saving your project and then running the cgns_util
to export your tutorial project, and then to export the provided final version of the tutorial. Save both
versions and compare them with your favorite diff tool, such as DIFFzilla. If all the parameters are in
agreement, you have set up the project successfully. If there are differences, you can go back into
the tutorial set-up, re-read the tutorial instructions, and change the setting of interest.

13.2. Problem Description


The working principle of a valved pulse jet consists of a sequence of pulse deflagrations in the main
chamber that produces an increase of pressure and temperature and a consequent immediate gas ex-
pansion converted into thrust to propel a body. It is made of an intake section, the combustion chamber,
and the exhaust pipe. Between the intake and the combustion chamber there is a thin sheet of metal
to force the accelerated flow motion in a single direction. The thin sheet is generally cut into the shape
of a stylized daisy with petals that widen towards their end. Each petal acts as a reed valve.

The valved pulse jet geometry used in this tutorial is illustrated in Figure 13.1: Valved pulse jet geo-
metry (p. 175). In order to focus on the Built-in Fluid Structure Interaction (FSI) feature, we decided not
to model the exhaust pipe and to replace the sequence of pulse deflagrations with a pulsed pressure
profile at the inlet. The profile is of a sinusoidal shape with a peak pressure of 6 bar. Looking at Fig-
ure 13.2: Exploded geometry (p. 175), we see that the flow entering the diffuser is then split and acceler-
ated by the conical cavity within the diffuser itself (in teal). It enters the connecting rings (in yellow)
and hits the reed valves close to their tips. When the pressure from the diffuser is higher than the
pressure in the main chamber the reed valves bend, and the flow enters the chamber. In contrast, when
the flow from the diffuser has a lower pressure than the one in the chamber, the reed valves close to
prevent back flow and force the flow toward the outlet. The flow is initialized everywhere with a pressure
of 2 bar and a premixed composition. Specific dimensions and operating conditions are listed in
Table 13.1: Dimensions and operating conditions (p. 175).

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
174 of ANSYS, Inc. and its subsidiaries and affiliates.
Problem Description

Figure 13.1: Valved pulse jet geometry

Figure 13.2: Exploded geometry

Table 13.1: Dimensions and operating conditions

Item Value Units


Overall length 35.2 cm
Diffuser length 9.76 cm
Main chamber length 24.7 cm
Max diameter 12 cm
Number of reed valves 8 -
Premixed composition ch4 = 1 Moles

n2 = 7.52

o2 = 2
Inlet pressure pulsed profile -
Outlet pressure 2 bar

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 175
Valved Pulse-Jet With Built-in FSI

13.3. Valved Pulse Jet Setup


The project setup workflow follows the top-down order of the workflow tree in the Ansys Forte Simulate
interface. The components irrelevant to the present project will not be mentioned in this document,
and you can simply skip them and use the default model options.

13.3.1. Import the Geometry

Note:

Changed values on any Editor panel do not take effect until you press the Apply button.
Always press the Apply button after modifying a value, before moving to a new panel or
the Workflow tree.

In this tutorial, we will import an existing geometry into Ansys Forte and set up the automatic mesh
generation using a global mesh size and adapting the mesh where extra resolution is needed. To
import the geometry, go to the Workflow tree and click Geometry. This opens the Geometry icon

bar. Click the Import Geometry icon. In the resulting dialog, pull down and select Surfaces
from one or more STL files, then select the provided STL file, valved_pulse_jet.stl. In the
dialog that opens with STL file import options, accept the defaults. The mesh will be automatically
generated during the simulation. Note that once you have imported the geometry, there are a number
of actions that you can perform to modify the provided project on the items in the Geometry node,

such as scale, rename, transform, invert normals, or delete geometry elements. Use the button
to fit the entire geometry in the graphic window.

To later allow easy identification of the bending direction of the reed, let us create one local reference
frame for each valve. From the Geometry node, select Reference Frames and create the new reference
frames. Their origins are indicated in Table 13.2: New reference frame origins in global coordin-
ates (p. 176).

Table 13.2: New reference frame origins in global coordinates

Reference Frame x y z rotation about


(RF) X-axis
Reed 1 -8.36 cm 0.205 cm 0.414 cm 334.09 deg
Reed 2 -8.36 cm -0.147 cm 0.438 cm 379.09 deg
Reed 3 -8.36 cm -0.414 cm 0.205 cm 424.09 deg
Reed 4 -8.36 cm -0.438 cm -0.147 cm 469.09 deg
Reed 5 -8.36 cm -0.205 cm -0.414 cm 514.09 deg
Reed 6 -8.36 cm 0.147 cm -0.438 cm 559.09 deg
Reed 7 -8.36 cm 0.414 cm -0.205 cm 604.09 deg
Reed 8 -8.36 cm 0.438 cm 0.147 cm 649.09 deg

In the configured project that you previously downloaded, you can also see that a clip plane is created
to allow a better view of the various components and reference frames, and a Sub-Volume region
named Chamber.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
176 of ANSYS, Inc. and its subsidiaries and affiliates.
Valved Pulse Jet Setup

13.3.2. Automatic Mesh Generation Setup


The mesh creation occurs on-the-fly during the simulation, however, there are a few parameters that
need to be set in the Mesh Controls node:

Material Point: This is needed to identify the simulation domain where the mesh will be generated.
It should be located at least one unit cell length away from any boundaries and must be inside of
the domain throughout the entire simulation. Set it at the Global Origin.

Global Mesh Size: Set the Global Mesh Size to 4 mm.

Refinements: These are needed to refine the mesh around key geometry features. They are of different
types, those used in this tutorial are: Surface Refinement Depth, SAM (Solution Adaptive Mesh) ,
and Gap Feature Control. The Gap Feature Control automatically detects small gaps between the
specified surface pair based on the user-specified Surface Proximity criterion and applies refinement
in the detected gap region based on the user-specified refinement level. When Gap Feature Control
is used, the spatially resolved solution will contain a variable called GapCellFlag, which uses non-zero
integer values to mark the zones identified as gap zones. Detailed mesh control parameters are listed
in Table 13.3: Settings for Mesh Control refinements (p. 177).

Table 13.3: Settings for Mesh Control refinements

Item Refinement type Refinement Refinement Refinement


location level layers
Walls Surface chamber, 1/4 1

diffuser
Reeds Surface chamber_flat, 1/4 4

reed1_bottom,

reed2_bottom,

reed3_bottom,

reed4_bottom,

reed5_bottom,

reed6_bottom,

reed7_bottom,

reed8_bottom
OpenBoundaries Surface inlet, 1/4 1

outlet
Rings_and_spark Surface rings, 1/4 1

spark_plug

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 177
Valved Pulse-Jet With Built-in FSI

Item Refinement type Refinement Refinement Refinement


location level layers
SAMgradVel SAM sub-volume: 1/4 -
Chamber
Quantity= vel. mag.
grad.

Bounds= statistical

Sigma Threshold=
0.1
SAMgradT SAM sub-volume: 1/4 -
Chamber
Quantity=
temperature grad.

Bounds= statistical

Sigma Threshold=
0.1
Gapdepth X Gap Feature chamber_flat, 1/16 -

Surface Prox = 0.05 reedX_bottom


cm

Gap Model= ON

Gap Factor = 1

Note:

Although only 1 Gapdepth refinement is listed (for brevity), the Forte project file contains
8 of them. If your project is being set up starting from a blank project, do not forget to
add the other 7, replacing X with the proper reed valve number ID.

13.3.3. Models Setup


All the settings in this node can be kept as the default, but don’t forget to import the provided
chemistry set. Specifically:

Chemistry set: The chemistry input file used in this tutorial is the default Natural-
Gas_1comp_29sp.cks and it can be found in your Forte installation path inside the subfolder,
Program Files\ANSYS Inc\V212\reaction\forte.win64\data\. To use it, navigate to

the Chemistry module, click the Import Chemistry icon and select the chemistry set, Natural-
Gas_1comp_29sp.cks.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
178 of ANSYS, Inc. and its subsidiaries and affiliates.
Valved Pulse Jet Setup

13.3.4. Boundary Conditions


Boundary conditions must be specified for each of the geometry elements. To match the provided
project, follow these instructions for each boundary condition:

Inlet: Type inlet. Set the mole fraction composition to be 1 ch4, 7.52 n2, and, 2 o2 and the location
is inlet. Then select Total Pressure, Time Varying, set Time as a Time Option. Next to Pressure

Profile select Create New and then click the Edit button . Once the Editor panel opens click
Load CSV to upload the provided pressure profile (PulsedPressureProfile.csv). The Total Temper-
ature is 300 K and the Turbulence parameters are the default ones.

Outlet: Type inlet, to force the reverse flow condition to be explicitly defined. Set the mass fraction
composition as air 0.24 o2 and 0.76 n2, and the location to be outlet. The Total Pressure is set to
2 bar and the Total Temperature to 350 K. Turbulence parameters are the default ones.

Chamber: Type wall. The location selection lists center_ring, chamber, chamber_flat. The Heat
Transfer check box is selected and the Wall Temperature is constant at 350 K.

Diffuser: Type wall. The location selection lists the diffuser and the rings. The Heat Transfer check
box is selected, and the Wall Temperature is constant at 600 K.

Spark: Type wall. The location selection lists only the spark_plug. The Heat Transfer check box is
selected, and the Wall Temperature is constant at 450 K.

Then add the following boundary condition to each reed valve, replacing X with the number of each
valve.

Reed X: Type wall. The location selections are reedX and reedX_bottom. The Heat Transfer check
box is NOT selected.

13.3.5. Initial Conditions


The entire domain is initialized with the premixed composition listed in Table 13.1: Dimensions and
operating conditions (p. 175), and a constant Temperature and Pressure of 350 K and 2 bar, respect-
ively.

13.3.6. Simulation Controls


The first setting in the Simulation Controls node is Time Based as the simulation option. Then set
the Max. Simulation Time to be 2 ms.

Time Step: Only two parameters differ from the defaults to accommodate a larger time step without
affecting much the accuracy and the stability of the solution, these are: the Fluid Acceleration Factor
to be 2 and the Rate of Strain Factor to be 2.4

Built-in FSI : Activate the Built-in FSI feature by checking the box, click the icon to create a
new "Bending Beam" and name it Reed 1. Now, select the Reed 1 in the location list and choose
Point Load in the Load Type option. Assuming that the reed valves are made of steel, set the Young's
Modulus to 1.8e5 MPa. Then set the other parameters as shown in Figure 13.3: Built-in FSI Bending
Beam panel (p. 180). The figure also shows the Reed 1 reference frame previously specified in

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 179
Valved Pulse-Jet With Built-in FSI

Table 13.2: New reference frame origins in global coordinates (p. 176); use it in the Fixed End Position,
the Neutral and Beam Axis panels. The Fixed End Position specifies the origin of the beam and it
corresponds to the origin of the Reed 1 reference frame, so all the coordinates are set to 0 cm. Then
the Neutral Axis is the direction along the main dimension of the beam, set it to z=1 cm. Finally the
Beam Axis is the axis by which the beam will rotate, with positive deflection given by the right-hand
rule, set it to y=1 cm. Now repeat the above steps to model for all the other valves as bending beams,
making sure to replace each time their selected location and the reference frames for the Fixed End
Position, the Neutral and the Beam Axes. In all the Bending Beams the Restrict to Positive Displace-
ment box is checked to constrain the valve motion. The Max. Travel Per Step is set to 0.05. This
represents the maximum deflection of the beam as a fraction (5%) of the maximum displacement (1
cm) between mesh updates.

Note:

During the simulation, each Bending Beam will generate two files with the extension
*_fsi.csv and *_displacements.csv. The first tracks the Tip Deflection, the
Load, the Pressure Force and the Torque applied to the valve versus time; while the
other shows the instantaneous deflection of the valve versus its neutral axis. Use Ansys
Forte MONITOR to see their evolution.

Figure 13.3: Built-in FSI Bending Beam panel

13.3.7. Output Controls


Output controls determine what data are stored for viewing during the simulation and for creating
plots, graphs and animations in Ansys EnSight.

Spatially Resolved: Allows you to control when spatially resolved data such as velocity, temperature,
pressure, etc., will be output. In the Spatially Resolved panel, set the Time Output Control to report
every 0.02 ms. You can optionally increase the frequency of output to create smoother animations.
Select then the Solution Count in the File Size Control and set the Solutions per Results File to 1
to have a single *.ftres per each output Time. Amongst the Spatially Resolved Species and
Solution Variables, select variables of your interest like Pressure, Temperature, VelocityX, VelocityY,
VelocityZ and Velocity Magnitude.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
180 of ANSYS, Inc. and its subsidiaries and affiliates.
Simulation Results

Spatially Averaged and Spray: Opt for Time and set the interval to 0.5 µs, then choose the species
of interest if any.

Restart Data: This option allows a restart file to be saved at the end of the current simulation if the
Write Restart File at Last Simulation Step option is checked. Such a restart file is useful if you decide
to extend the simulation duration to do parameter studies because it provides a much better guess
for initial condition than a uniform one.

Monitor Probes: Choose an Inquiry Frequency of 1 µs then create two monitor probes of type
Geometric and shape Spherical with a 1.3 cm radius. Place them at x=-4.742 cm, x=-17.3 cm in
the x direction with respect to the global origin reference frame and name them Chamber_sphere,
Diffuser_sphere and respectively. Let the probe output Pressure and Temperature.

13.4. Preview Simulation


To detect potential problems due to surface intersection and/or mesh generation before the simulation
is started, navigate to the Preview Simulation node. On the Mesh Generation panel set the Time
Option to Time for investigating a specific Time or to Time Range for a more extensive investigation,
then select Check for Surface Intersections and/or Include Volume Mesh depending on what you

are interested in, and finally launch the preview by clicking the Generate Mesh icon. Due to the
nature of this tutorial valves motion cannot be detected with this preview since their motion is unknown
ahead but depends on the flow simulation. Nevertheless, the feature can be used to make sure all the
other parts are behave as expected and the volume mesh generation is appropriate.

13.5. Run Settings and Run Simulation


The run settings depend on the system and environment for your simulations. Change the number of
cores to use for this simulation according to the resources available to you by navigating to Run Settings
> Run Options > Job Script Options > Default MPI Arguments and set the number of cores there.
No other changes are needed, and you can proceed launching the simulation.

13.6. Simulation Results


During the 2 ms simulation time the reed valves open synchronously 6 times. Figure 13.4: Tip deflection
of Reed 1, spatially averaged chamber pressure and inlet pressure profile (p. 182) is an example of the
tip deflection of the reed valve number 1 versus time. The valve is in its closed position when the sim-
ulation starts, and the pressure is 2 bar everywhere. The pulsed pressure profile applied at the inlet and
shown in Figure 13.4: Tip deflection of Reed 1, spatially averaged chamber pressure and inlet pressure
profile (p. 182) in gold, determines the opening and closing of the daisy petal valves.

When the injected pressure becomes higher than the pressure in the main chamber (black curve) at
around 0.2 ms, the reed valve tips bend toward the main chamber and allow the flow to pass through.
In contrast, at around 0.4 ms the chamber pressure is higher than the injected one and forces the valves
to return to their initial closed position. The opening and closing cycle of the valves repeats until the
end of the simulation, with tip deflections on the order of 8 mm.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 181
Valved Pulse-Jet With Built-in FSI

Figure 13.4: Tip deflection of Reed 1, spatially averaged chamber pressure and inlet pressure
profile

Figure 13.5: Instantaneous pressure on reed valves during an opening/closing cycle (p. 182) reports the
pressure change on the reed valves during their opening/closing cycle. At 0.18 ms the higher pressure
in the diffuser starts hitting the valves tips, where light blue circles appear. The pressure difference
between the diffuser and the main chamber keeps increasing and at 0.22 ms the flow exiting the con-
necting rings pushes the valves to full opening (see the red circles). As soon as that pressure difference
decreases, at around 0.4 ms, the valves close with an almost uniform pressure distribution along the
valves, and start re-opening past the 0.46 ms.

Figure 13.5: Instantaneous pressure on reed valves during an opening/closing cycle

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
182 of ANSYS, Inc. and its subsidiaries and affiliates.
Simulation Results

Figure 13.6: Pressure distribution on a z-plane, 3D and 2D view

Figure 13.6: Pressure distribution on a z-plane, 3D and 2D view (p. 183) shows the pressure distribution
on a cut plane in the middle of the geometry. To better see the full range of the opened valves, the
same cut plane is shown in a 3D and 2D view. At 0.642 ms the valves are in the middle of their second
opening cycle, reaching their maximum deflection. Similarly, in Figure 13.7: Velocity magnitude contours
on a z-plane (p. 184), the same z-plane is depicted, colored by the velocity magnitude contours with
streamlines. The reed valves are now at the end of their third opening cycle. In fact we see that before
1 ms, they are still open and they close immediately after 1 ms. Note how the presence of the spark
plug affects the flow and creates a stronger recirculation zone in the upper of the domain. Finally, Fig-
ure 13.8: Temperature distribution on a z-plane (p. 184), shows the temperature distribution during the
fourth opening cycle of the valves. At around 1.2 ms the valves are opened and the hot flow is passing
from the diffuser to the chamber. The back flow is then blocked as soon as the valves close.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 183
Valved Pulse-Jet With Built-in FSI

Figure 13.7: Velocity magnitude contours on a z-plane

Figure 13.8: Temperature distribution on a z-plane

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
184 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 14: Oscillating Plate FSI Using System
Coupling
This tutorial describes the Fluid Structure Interaction (FSI) simulation of an oscillating plate within a
fluid-filled cavity. A thin plate is anchored to the bottom of a closed cavity filled with fluid (air) and
there is no friction between the plate and the side of the cavity. An initial pressure of 100 Pa is applied
to one side of the thin plate for 0.5 s to distort it. Once this pressure is released, the plate oscillates
back and forth to regain its equilibrium, and the surrounding air damps this oscillation. You will simulate
the plate and surrounding air for a few oscillations to be able to observe the motion of the plate as it
is damped. In details, the CFD analysis receives displacement data from the transient structural simulation
and predicts the forces applied to the plate. Those are then sent back to the transient structural simu-
lation to update the displacement. This coupled simulation continues, until the data transferred between
the CFD and the transient structural analysis converge. The exchange of data is a seamless workflow
managed by System Coupling (see the System Coupling User's Guide), which is a general-purpose tool
to couple solutions from different Ansys solvers. In this tutorial the CFD analysis is solved by Ansys
Forte, while the transient structural analysis is performed by Ansys Mechanical. The FSI simulation is
carried out by an iterative coupling loop with an alternate execution of the two solvers, and the exchange
of FSI-related data at common interfaces. A similar tutorial case with Fluent and Mechanical as participants
can be found in the System Coupling Tutorials, release 2020 R2.

14.1. Data Provided

14.1.1. Files Used in This Tutorial


The files for this tutorial are obtained by downloading the syc_fsi_oscillatingPlate.zip
file here.

Note:

Forte tutorial files are also available as a bundled downloadable package. To access the
files on the Ansys Help site, go to the Forte page at: ansyshelp.ansys.com.

You have the opportunity to select the location for the files when you download and uncompress
the sample files. Once downloaded and unpacked, they include:

• run.py - System Coupling python script that defines the coupling between Ansys Mechanical and
Ansys Forte, the coupling interfaces, the data being transferred, and the stopping criteria of the
iteration. This file is used to start the coupled simulation.

• mapdl.scp - Ansys Mechanical XML System Coupling file that defines the mechanical input and
output variables.

• In the forte directory:

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 185
Oscillating Plate FSI Using System Coupling

– Plate_SCFSI.ftsim - the Forte project file, which simulates the full-cycle, in-cylinder com-
bustion process.

• Mech_OscPlate.wbpz – the archive Workbench project for the transient structural analysis. Note
that this file is not needed for the simulation, but only if you want to modify the mechanical setup.

• mapdl.dat -- Mechanical solver input file.

Note:

When running this example, ensure the file structure is consistent with run.py and
mapdl.scp in the local folder where you are going to run the tutorial, and that there are
two sub-folders, forte and mapdl, with the corresponding project files in each sub-dir-
ectory.

14.1.2. Time Estimate


This case uses 28 MPI processes and it typically completes (1 second of simulation time) in around
40 minutes on a dual Intel Xeon E5-2697v3 running at 2.59 GHz.

14.2. Setting Up the FSI Simulation


To establish an FSI simulation, the System Coupling participants must be set up first. A participant is
an individual simulation that acts as a component of the coupled simulation. In this tutorial, they are
Ansys Forte and Ansys Mechanical. Each participant has its own physical domain, as shown in Fig-
ure 14.1: Forte simulation domain (p. 187) and Figure 14.2: Mechanical simulation domain (p. 187), and
also its own set of boundary conditions. The two participants exchange data at the plate interface; the
CFD simulation in Forte would provide force data to be used as boundary conditions in the transient
structural analysis in Mechanical, which in turn would predict the plate displacement to update Forte
boundary conditions. The iterative loop continues, and the simulation stops when the data transferred
at the coupling interface converge.

The FSI simulation is already set up in the downloaded files of this tutorial. You can directly run the
simulation (see instructions in Launching the FSI Simulation (p. 191)) using these files. In this section we
provide an overview of the project settings.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
186 of ANSYS, Inc. and its subsidiaries and affiliates.
Setting Up the FSI Simulation

Figure 14.1: Forte simulation domain

Figure 14.2: Mechanical simulation domain

14.2.1. Creating the Working Directory to Run the Coupled Simulation


Before setting and launching the simulation, it is important to have the right folder structure in your
own working directory. To accomplish this, follow these guidelines:

1. Create a working directory.

2. Copy the downloaded System Coupling script file (run.py) and the mechanical XML System
Coupling file (mapdl.scp) into the working directory.

3. Copy the downloaded sub-folders (forte, mapdl) into the working directory as well.

As mentioned, from the System Coupling viewpoint, there are two participants:

• First is Mechanical, with:

– Input variable Force

– Output variable Displacement

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 187
Oscillating Plate FSI Using System Coupling

• Second is Forte, with:

– Input variable Displacement

– Output variable Force

14.2.2. Setting Up the Forte Simulation


This tutorial simulates the oscillating plate within a fluid-filled cavity. Most of the project settings are
similar to those of a stand-alone Forte simulation. The chemistry set used is the Air_NoReac-
tions_2sp.cks, the turbulence model is the RNG-ke model, and the mesh refinements follow the
Forte Best Practices, available from the Forte page of the Ansys Help website.

The global mesh size is set to 20 cm, and fixed refinements of 1/8th of the global mesh size are applied
to the plate. Gap refinements of the same fraction are applied to the front and back surfaces of the
plate, to allow them to slide and block the flow passage with the front and back of the cavity. The
cavity is fully filled by air at standard conditions, and it is closed so no inlet or outlet conditions need
to be set. The plate position will be updated by Mechanical via System Coupling during the following
iterations. To allow this and to send back updated force data to Mechanical, the System Coupling
check box in the Simulation Control node must be activated as shown in Figure 14.3: Enable the
System Coupling node (p. 189), and the plate surfaces must be selected. Navigating through the System
Coupling node, the Transient-Transient State Coupling option is selected. Finally, the Force needs
to be selected in the Output Variables panel.

Note:

It is good practice to ensure that the surface mesh has sufficient spatial resolution, so that
the force output at the interface has the same spatial resolution, too. To check the surface
mesh resolution, go to Geometry in the Workflow tree and select the surface patch that
corresponds to the plate boundary condition. Right-click the surface patch and check the
Mesh option to visualize the surface mesh in the 3-D View.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
188 of ANSYS, Inc. and its subsidiaries and affiliates.
Setting Up the FSI Simulation

Figure 14.3: Enable the System Coupling node

14.2.3. Setting Up the Mechanical Simulation


The transient structural analysis is performed in Mechanical. The geometry consists only of a vertical
plate with a density of 2550 kg/m3, a Young’s modulus of 2.5e6 Pa, and a Poisson’s ratio of 0.3. When
launching Ansys Workbench and unarchive the Mech_OscPlate.wbpz project file, take a moment
to explore the full setup (See Figure 14.4: Mechanical setup (p. 190)), and the mesh resolution. As you
can see in the Model > Transient > Pressure node, there is an initial pressure of 100 Pa
applied to the left surface of the plate for 0.5 seconds that will initiate the displacement of the plate.
Verify that all the later surfaces and the plate top are registered as system coupling region, and that
the bottom of the plate is the fixed support of the plate. If you happen to modify the Mechanical
project, don’t forget to write out the updated *.scp and *.dat files. To do so, right-click to
Transient and select Write System Coupling Files. If you simply want to run the case
as-is, the *.scp and *.dat files have already been generated and included in the downloaded files.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 189
Oscillating Plate FSI Using System Coupling

Figure 14.4: Mechanical setup

For more information about how to prepare a Mechanical project for System Coupling, refer to the
Mechanical APDL as a Server User's Guide on the Ansys Help website.

14.2.4. Setting Up System Coupling


The System Coupling setup is defined in the python script file named run.py. It invokes several
functions, including loading the participants’ project information, setting up the coupling interface,
specifying both the control for coupled iterations and the options to promote convergence, and
launching the simulation. The python script used in this tutorial is shown below as an example. You
may use it as a template when setting up a new coupled simulation.
import os

# MAPDL is a Participant
mapdl = AddParticipant(InputFile = 'mapdl.scp')

# Forte is a Participant
forte = AddParticipant(InputFile = os.path.join('forte', 'Plate_SCFSI.ftsim'))

# Define coupling interface and data transfers


iName = AddInterface(SideOneParticipant = forte,
SideOneRegions = ['plate'],
SideTwoParticipant = mapdl,
SideTwoRegions = ['FSIN_1'])

iforce = AddDataTransfer(Interface = iName,


TargetSide = 'Two',
SideOneVariable = 'FORCE',
SideTwoVariable = 'FORC')

idisplacement = AddDataTransfer(Interface = iName,


TargetSide = 'One',
SideOneVariable = 'DISP',
SideTwoVariable = 'INCD')

# Set Time Steps


dm = DatamodelRoot()
dm.SolutionControl.EndTime = '1 [s]'
dm.SolutionControl.TimeStepSize = '0.1 [s]'

# Set maximum and minimum iterations and use ramping to stabilize convergence
dm.SolutionControl.MaximumIterations= 10
dm.SolutionControl.MinimumIterations= 1

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
190 of ANSYS, Inc. and its subsidiaries and affiliates.
Analyzing Simulation Results

dm.CouplingInterface[iName].DataTransfer[iforce].Stabilization.Option = 'Quasi-Newton'
dm.CouplingInterface[iName].DataTransfer[iforce].Stabilization.InitialRelaxationFactor = 1
dm.CouplingInterface[iName].DataTransfer[iforce].ConvergenceTarget = 0.05

dm.ActivateHidden.BetaFeatures = True
dm.OutputControl.GenerateCSVChartOutput = True
dm.OutputControl.Option = 'EveryStep'

# Solve the coupled analysis


Solve()

The order in which the participants are started is given by the order in which they are listed in run.py,
whereas the order of the interfaces is not important. The first interface identifies the Forte plate patch
coupled with the Mechanical boundary FSIN_1 (note that these names are case sensitive). We are
transferring Forte’s Force (FORCE) to Mechanical’s FORC and Mechanical’s displacement (INCD) to
Forte’s boundary conditions (DISP). Before starting the simulation it is important to choose the ap-
propriate coupling controls. In this tutorial the best practice sets to 10 the maximum iteration number
per each time step to converge, and it makes use of the Quasi-Newton solution stabilization and ac-
celeration method to transfer displacement data from Mechanical to Forte with no initial relaxation
factor (see "System Coupling Data Transfers" in the System Coupling User's Guide). The convergence
target for the displacement data transfer is kept as the default, 0.01, while it is set to 0.05 for the
force. For post-processing purposes, an Ansys EnSight output is generated at each run (EveryStep),
and the feature Generate CSV Chart Output has been activated. The simulation runs for 1 second
with a 0.1 time step.

14.3. Launching the FSI Simulation


To run System Coupling, you need to run the System Coupling python environment and pass the
run.py script.

On Windows, open a CMD prompt and type:


call "c:\Program Files\ANSYS Inc\v212\SystemCoupling\bin\systemcoupling" -t28 -R run.py

On Linux at the command prompt, type:


sh $home/ansys_inc/v212/SystemCoupling/bin/systemcoupling -t28 -R run.py

Note:

Here, 28 is just an example of how to select the number of cores to use. Additionally, if you
changed the location of your Ansys install, don’t forget to change the path to v212 appropri-
ately.

The System Coupling iterations will run until the end time defined in the python script is reached.

14.4. Analyzing Simulation Results


Once the coupled simulation is finished, you can examine the Forte and Mechanical simulation results
in their directories. In the forte folder, you will see a list of spatially resolved files (*.ftres format)
to be loaded in Ansys EnSight via the Nominal.ftind file, and a list of spatially averaged files (*.csv

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 191
Oscillating Plate FSI Using System Coupling

format) to be loaded in the Forte Monitor. You can also directly investigate the system coupling results
at the coupling interface by launching Ansys EnSight:

• Navigate to your <Working_Directory>/SyC/Results.

• Be sure to choose the Multiple file interface option.

• Select the two files named Results_0.case and Results_1.case, then click Add to list and
Load all parts at the bottom of the panel.

This loads the oscillating plate surfaces, one belonging to the Forte domain and another to the Mech-
anical domain. Figure 14.5:Oscillating plate and x displacement evolution at node 320 (p. 192) shows
an animation of the oscillating plate simulation extended to 20 seconds, and the Forte and Mapdl pre-
dicted x-coordinate displacement of node 320. Note that the location of node 320 is depicted with a
gray sphere on the oscillating plate.

The following Show-Me animations are presented as animated GIFs in Forte's online documentation at the
Ansys Help website. If you are reading the PDF version of this manual and want to see the animated GIF,
access this section in that online documentation. The interface shown may differ slightly from that in your
installed product.

Figure 14.5: Oscillating plate and x displacement evolution at node 320

To investigate the results of the flow field surrounding the oscillating plate, launch EnSight, navigate
to the forte folder and load the previously mentioned Nominal.ftind file. Once all the parts are
loaded, select the VolumeCells part and place a cut-plane at the middle range of the z-coordinate.
Now hide all the parts but the cut-plane and color it by velocity magnitude as in Figure 14.6:Velocity
magnitude evolution on a Z cut-plane (p. 193).

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
192 of ANSYS, Inc. and its subsidiaries and affiliates.
Analyzing Simulation Results

Figure 14.6: Velocity magnitude evolution on a Z cut-plane

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 193
Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
194 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 15: System Coupling CHT for T-junction Pipe
Flow
Ansys Forte 2021 R2 supports Forte as a participant in a command-line System Coupling Simulation.

Conjugate Heat Transfer (CHT) is a useful procedure in CFD because it provides realistic thermal
boundary conditions. In a typical stand-alone CFD simulation, one has to specify wall temperature when
heat transfer is modeled on a solid wall boundary. When reliable measurement data are unavailable,
assumptions have to be made on the wall temperature, which leads to inaccuracy in the setup. This
challenge can be addressed by the CHT, that is, coupling thermal analysis in the solid walls with the
CFD simulation. It starts with the CFD simulation with presumed wall temperature, followed by the
thermal analysis performed in the solid parts. The thermal analysis receives heat transfer data from the
CFD simulation and predicts wall temperature, which is then provided to the CFD simulation to correct
its boundary condition. This coupled simulation continues, until the thermal data transferred between
the CFD and thermal analysis converge. At this stage, the wall temperature specified in the CFD simu-
lation is considered realistic.

This tutorial describes a Conjugate Heat Transfer (CHT) simulation of a T-junction pipe flow and a thermal
analysis in the metal pipe. The pipe flow is solved by Ansys Forte, while the thermal analysis is solved
by Ansys Fluent. The CHT simulation is carried out by an iterative coupling loop with an alternate exe-
cution of the two solvers, and the exchange of heat-transfer-related data at common interfaces. Coupling
of the two solvers is automated and handled by System Coupling (see System Coupling User's Guide),
which is a general-purpose tool to couple solutions from different Ansys solvers.

15.1. Data Provided

15.1.1. Files Used in This Tutorial


The files for this tutorial are obtained by downloading the system_coupling_tee_junction.zip
file here.

Note:

Forte tutorial files are also available as a bundled downloadable package. To access the
files on the Ansys Help site, go to: ansyshelp.ansys.com.

You have the opportunity to select the location for the files when you download and uncompress
the sample files. Once downloaded and unpacked, they include:

• run.py - System Coupling python script that defines the coupling of Fluent to Forte and is used
to start the System Coupling simulation.

• fluent.scp - Fluent XML System Coupling file that defines the fluent input and output variables.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 195
System Coupling CHT for T-junction Pipe Flow

• In the forte directory:

– tee_junction.ftsim - the Forte project file for the T-junction pipe flow simulation.

• In the fluent directory:

– t_junction_solid_fluent.cas.gz - the Fluent case file for the thermal analysis.

Note:

When running this example, ensure the file structure is consistent with run.py and
fluent.scp in the local folder where you are going to run the tutorial, and that there
are two sub-folders forte and fluent with the corresponding project files in each sub-
directory.

15.1.2. Time Estimate


This case uses 8 MPI processes for the Forte run and typically takes 7 System Coupling iterations to
converge. This takes around 50 minutes on a dual Intel Xeon E5-2697v3 running at 2.59 GHz.

15.2. Setting Up the Conjugate Heat Transfer Simulation


To set up a CHT simulation using System Coupling, one needs to set up the "participants" of System
Coupling. The participants are individual simulations that act as components of the coupled simulation.
In this tutorial, there are two participants: the Forte simulation of a T-junction pipe flow problem, and
the Fluent simulation of the pipe wall’s thermal conduction. Their simulation domains are shown in
Figure 15.1: Simulation domain in Forte for the T-junction pipe flow problem (p. 197) and Figure 15.2: Sim-
ulation domain in Fluent for the pipe wall’s thermal analysis (p. 197), respectively. In the Forte simulation,
gas flows through the pipe from the two inlets to the outlet, and is bound by the pipe’s inner wall
boundary, shown as "Wall" in Figure 15.1: Simulation domain in Forte for the T-junction pipe flow
problem (p. 197). In the Fluent simulation, heat conduction within the pipe wall is considered. The sim-
ulation domain is the solid part between the wall_internal and Outer_Wall boundaries.

The goal of this CHT simulation is to find a realistic temperature distribution on the pipe's inner wall
boundary and use it as boundary condition in Forte's pipe flow simulation. For this purpose, coupling
of the two simulations occurs at the pipe's inner wall boundary, called interface in the System Coupling
terminology. The gas flow simulation in Forte would provide heat transfer rate data at this location,
which are used as boundary conditions for Fluent's thermal conduction analysis. The Fluent simulation
would predict temperature distribution inside the pipe wall, and provide the temperature at the inner
wall to Forte to correct its boundary condition setup. Forte will use the corrected inner wall temperature
to re-run the gas flow simulation, and provide the updated heat transfer rate data to Fluent. This iterative
procedure continues until the data transferred at the interface converge, which indicates that both the
inner wall temperature and the heat transfer rate are accurate.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
196 of ANSYS, Inc. and its subsidiaries and affiliates.
Setting Up the Conjugate Heat Transfer Simulation

Figure 15.1: Simulation domain in Forte for the T-junction pipe flow problem

Figure 15.2: Simulation domain in Fluent for the pipe wall’s thermal analysis

Both the participants and the System Coupling have already been set up for this tutorial in the files
that you have downloaded. In this section, we will review the setup of System Coupling, Forte, and
Fluent, respectively, to highlight the important settings.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 197
System Coupling CHT for T-junction Pipe Flow

15.2.1. Setting Up the Forte Simulation


The next step of setting up this tutorial is to ensure that the Forte project is set up to be used by
System Coupling. Open the tee_junction.ftsim project in the Forte Simulation interface.

The simulation domain used in Forte is illustrated in Figure 15.1: Simulation domain in Forte for the
T-junction pipe flow problem (p. 197). Flow in the T-junction pipe is set to be a transient flow simulation
that takes 0.05 seconds. The initial gas temperature in the pipe is 300 K. Hot air at 1000 K flows into
the inlet boundary inlet_hot, and cold air at 300 K flows into the inlet boundary inlet_cold, both at
atmospheric pressure. The outlet boundary condition is at a lower pressure (0.975 bar), resulting in
air flow.

Navigate to the Boundary Conditions and select the Wall. The wall boundary temperature is tentatively
set as 400 K as an initial guess, and is subject to be corrected by the output of Fluent via System
Coupling. To ensure that this boundary condition is interfaced to Fluent via System Coupling, go to
the Simulation Controls node and check (turn ON) the System Coupling option. Ensure that Wall is
selected as a Coupled Boundary Condition and Heat Rate is selected as an Output Variable and
that the Steady State Coupling Method is checked.(see Figure 15.3: Enable System Coupling at the
Wall boundary condition in Forte (p. 199))

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
198 of ANSYS, Inc. and its subsidiaries and affiliates.
Setting Up the Conjugate Heat Transfer Simulation

Figure 15.3: Enable System Coupling at the Wall boundary condition in Forte

During the simulation, Forte will automatically create a .csv file called
wall_sampling_Wall_system_coupling.csv to store time-averaged heat transfer rate data
on the Wall boundary. This file is located in Forte’s run folder and will be used by System Coupling
automatically during the coupled simulation.

Note:

The heat transfer rate data are defined on the surface mesh elements of the wall surface
requested for System Coupling. Therefore, it is good practice to ensure that the surface
mesh has sufficient spatial resolution, so that the heat transfer rate output at the interface
has the same spatial resolution, too. To check the surface mesh resolution, go to Geometry
on the Workflow tree and select the surface patch that corresponds to the Wall boundary
condition. In this case, the surface patch is named as wall-part-fluid. Right-click the surface
patch and check the Mesh option to visualize the surface mesh in the 3-D View.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 199
System Coupling CHT for T-junction Pipe Flow

15.2.2. Setting Up the Fluent Simulation


In Fluent the thermal conduction simulation for the solid pipe wall is performed. Launch the Fluent
user interface and load the project file t_junction_solid_fluent.cas.gz as-is. Note that the
setup is a steady-state simulation solving the energy equation in aluminum material. The simulation
domain in Fluent is illustrated in Figure 15.2: Simulation domain in Fluent for the pipe wall’s thermal
analysis (p. 197).

To check the boundary condition settings, go to Boundary Conditions, and select wall_internal. The
thermal conditions have been set to via System Coupling, as shown in Figure 15.4: Enable System
Coupling at the wall_internal boundary condition in Fluent (p. 200). The external_walls is assumed
to be exposed to a freestream air flow at 300 K, and a presumed heat transfer coefficient.

Figure 15.4: Enable System Coupling at the wall_internal boundary condition in Fluent

Normally, after the Fluent project is set up, you need to export the project setting for System Coupling’s
use. To do this, navigate to File, select Export → System Coupling → Write SCP File, and save the
project settings to an .scp file. In this tutorial, you do not need this step, because the project settings
have been saved to fluent.scp and placed in the run directory. For more information about how
to prepare a Fluent project for System Coupling, refer to Fluent User's Guide, "Performing System
Coupling Simulations Using Fluent."

15.2.3. Setting Up System Coupling


As mentioned, from the System Coupling point of view we have two participants:

• First is Forte with:

– input variable Temperature

– output variable Heat Rate

• Second is Fluent with:

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
200 of ANSYS, Inc. and its subsidiaries and affiliates.
Setting Up the Conjugate Heat Transfer Simulation

– input variable Heat Rate

– output variable Temperature

This is defined in the run.py file below. You may use it as a template when setting up a new coupled
simulation.:
import os

# Forte is a Participant
forte = AddParticipant(InputFile = os.path.join('forte', 'tee_junction.ftsim'))

# Fluent is a Participant
fluent = AddParticipant(InputFile = 'fluent.scp')

# Set up local parallel execution controls


# Fluent will run on 1 process, while Forte will run on 8 processes
DatamodelRoot().CouplingParticipant[fluent].ExecutionControl.ParallelFraction = 0.125

dm = DatamodelRoot()

# Define coupling interface and data transfers


iName = AddInterface(SideOneParticipant = fluent,
SideOneRegions = ['wall_internal'],
SideTwoParticipant = forte,
SideTwoRegions = ['Wall'])

iheatrate = AddDataTransfer(Interface = iName,


TargetSide = 'One',
SideOneVariable = 'heatflow',
SideTwoVariable = 'HEATR')

itemperature = AddDataTransfer(Interface = iName,


TargetSide = 'Two',
SideOneVariable = 'temperature',
SideTwoVariable = 'TEMP')

# Set maximum and minimum iterations and use ramping to stabilize convergence
dm.SolutionControl.MaximumIterations= 10
dm.SolutionControl.MinimumIterations= 1
dm.CouplingInterface[iName].DataTransfer[iheatrate].Stabilization.Option = 'Quasi-Newton'
dm.CouplingInterface[iName].DataTransfer[iheatrate].Stabilization.InitialRelaxationFactor = 0.1

dm.ActivateHidden.BetaFeatures = True
DatamodelRoot().OutputControl.GenerateCSVChartOutput = True

# Solve the coupled analysis


Solve()

Here the Fluent wall_internal region has been interfaced to the Forte boundary condition Wall. We
are transferring Forte’s Heat Rate to Fluent’s heatflow and transferring Fluent’s temperature variable
to Forte’s Temperature boundary condition. The Fluent run is using only 1/8 of the total processes
(DatamodelRoot().CouplingParticipant[fluent].ExecutionControl.Parallel-
Fraction = 0.125), while the Forte run is using all 8 MPI processes and you can change the Forte
value by editing the value of the "t" option on the command line when starting the System Coupling
run. See "How To Run System Coupling" in the Forte User's Guide. Before starting the simulation, it
is important to choose the appropriate coupling controls. In this tutorial the best practice makes use
of the Quasi-Newton solution stabilization and acceleration method to transfer Heat Rate data from
Forte to Fluent with an initial relaxation factor of 0.1 with the intent to improve convergence (see
"System Coupling Data Transfers" in the System Coupling User's Guide). For post-processing purposes,
an EnSight output is generated by default at the end of the run, and the beta feature Generate CSV
Chart Output has been activated.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 201
System Coupling CHT for T-junction Pipe Flow

15.3. Launching the CHT Simulation


To run System Coupling, you need to run the System Coupling python environment and pass the
run.py script.

On Windows, open a CMD prompt and type:


call "c:\Program Files\ANSYS Inc\v212\SystemCoupling\bin\systemcoupling" -t8 -R run.py

On Linux at the command prompt, type:


sh $home/ansys_inc/v212/SystemCoupling/bin/systemcoupling -t8 -R run.py

Note:

If you changed the location of your Ansys install, change the path to v212 appropriately.

The System Coupling iterations will now begin until convergence. Fluent and Forte will solve the T-
junction pipe flow problem and then pass between them the input and output variables. The run.py
script supplied with this tutorial uses relaxation to ensure a smooth convergence of the inputs and
outputs. During the run, the information on the System Coupling iterations will be printed so you can
monitor progress; see an example in Example 15.1: System Coupling progress output (p. 202).

Example 15.1: System Coupling progress output


===============================================================================
+=============================================================================+
| |
| Summary of Coupling Setup |
| |
+=============================================================================+
===============================================================================

+=============================================================================+
| Coupling Control |
+=============================================================================+
| |
| Analysis Type : Steady |
| Duration Control |
| Option : NumberOfSteps |
| NumberOfSteps : 1 |
| Step Control |
| MaximumIterations : 10 |
| MinimumIterations : 1 |
| |
+=============================================================================+
| Coupling Participants (2) |
+=============================================================================+
| |
| Participant: FORTE-1 |
| Type : FORTE |
| UpdateControls: |
| Option : ProgramControlled |
| Region: Wall |
| Topology : Surface |
| Input Variables : Temperature |
| Output Variables : Heat Rate |
| |
+-----------------------------------------------------------------------------+
| |
| Participant: Fluid Flow (Fluent) |

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
202 of ANSYS, Inc. and its subsidiaries and affiliates.
Launching the CHT Simulation

| Type : FLUENT |
| UpdateControls: |
| Option : ProgramControlled |
| Region: wall_internal |
| Topology : Surface |
| Input Variables : temperature, heatflow |
| Output Variables : temperature, heatflow |
| Region: solid |
| Topology : Volume |
| Input Variables : heatrate |
| Output Variables : temperature |
| Region: external_walls |
| Topology : Surface |
| Output Variables : temperature, heatflow |
| Coordinate Transformation: |
| Option : None |
| |
+=============================================================================+
| Solution Control |
+=============================================================================+
| |
| Allow Simultaneous Update : False |
| Partitioning Algorithm : SharedAllocateMachines |
| Global Stabilization : None |
| |
+=============================================================================+
| Coupling Interfaces (1) |
+=============================================================================+
| |
| Interface: Interface-1 |
| Side: One |
| Coupling Participant : Fluid Flow (Fluent) |
| Region List : wall_internal |
| Side: Two |
| Coupling Participant : FORTE-1 |
| Region List : Wall |
| DataTransfer: Temperature |
| Target Side : Two |
| Source Variable : temperature |
| Target Variable : Temperature |
| Convergence Target : 1.00E-02 |
| Ramping Option : None |
| Relaxation Factor : 1.00E+00 |
| Mapping Type : Surface Profile Preserving |
| Stabilization : ProgramControlled |
| DataTransfer: heatflow |
| Target Side : One |
| Source Variable : Heat Rate |
| Target Variable : heatflow |
| Convergence Target : 1.00E-02 |
| Ramping Option : None |
| Relaxation Factor : 1.00E+00 |
| Mapping Type : Surface Conservative |
| Stabilization : Quasi-Newton |
| Initial Relaxation Factor : 1.00E-01 |
| |
+=============================================================================+
| Output Control |
+=============================================================================+
| |
| Output Control Option : EveryIteration |
| |
+=============================================================================+
| Stabilization |
+=============================================================================+
| |
| The following transfers use Quasi-Newton stabilization: |
| Independent Stabilization: |
| Interface-1 : heatflow |
| |
+=============================================================================+

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 203
System Coupling CHT for T-junction Pipe Flow

+-----------------------------------------------------------------------------+
| Hidden features are available. |
+-----------------------------------------------------------------------------+
| Beta: 'GenerateCSVChartOutput' in OutputControl |
| Beta: 'Results' in OutputControl |
+-----------------------------------------------------------------------------+

+=============================================================================+
| Execution Information |
+=============================================================================+
| |
| System Coupling |
| Command Line Arguments: |
| -t8 -R run.py |
| Working Directory: |
| Tutorial_Tee-pipe_flow |
| |
| FORTE-1 |
| Execution Command: |
| "C:\PROGRA~1\ANSYSI~1\v202\reaction\forte.win64\bin\run_forteSC.bat" |
| -scport 40088 -schost work.ansys.com -scname "FORTE-1" -i "tee_junctio |
| n.ftsim" -nprocesses 8 |
| Working Directory: |
| Tutorial_Tee-pipe_flow/forte |
| |
| Fluid Flow (Fluent) |
| Execution Command: |
| "C:\PROGRA~1\ANSYSI~1\v202\fluent\ntbin\win64\fluent.exe" |
| -scid="10535_.ansys.com" -sclic="2325@lic" |
| -i FLUENT-2.jou -t1 |
| Working Directory: |
| Tutorial_Tee-pipe_flow/fluent |
| |
+=============================================================================+
Awaiting connections from coupling participants... done.

+=============================================================================+
| Build Information |
+-----------------------------------------------------------------------------+
| System Coupling |
| 2020 R2: Build ID: 4ac8a92 Build Date: 19 April 2020 12:34:35 |
| FORTE-1 |
| ANSYS Forte 2020 R2 Build Date: Apr 21 2020 |
| Fluid Flow (Fluent) |
| ANSYS Fluent 20.2.0, Build Time:Apr 17 2020 15:40:20 EDT, Build Id:151, |
| OS Version:win64 |
+=============================================================================+

===============================================================================
+=============================================================================+
| |
| Coupled Solution |
| |
+=============================================================================+
===============================================================================

+=============================================================================+
| | Source Target |
+-----------------------------------------------------------------------------+
| COUPLING ITERATION = 1 |
+-----------------------------------------------------------------------------+
| MAPPING SUMMARY |
+- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+
| Interface-1 | |
| heatflow | |
| Mapped Area [%] | 100 100 |
| Mapped Elements [%] | 100 100 |

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
204 of ANSYS, Inc. and its subsidiaries and affiliates.
Launching the CHT Simulation

| Mapped Nodes [%] | 100 100 |


| Temperature | |
| Mapped Area [%] | 100 100 |
| Mapped Elements [%] | 100 100 |
| Mapped Nodes [%] | 100 100 |
+-----------------------------------------------------------------------------+
| FORTE-1 | |
| Interface: Interface-1 | |
| Temperature | Not yet converged |
| RMS Change | 1.00E+00 1.00E+00 |
| Weighted Average | 3.00E+02 3.00E+02 |
+-----------------------------------------------------------------------------+
| Fluid Flow (Fluent) | |
| Interface: Interface-1 | |
| heatflow | Not yet converged |
| RMS Change | 1.00E+00 1.00E+00 |
| Sum | 6.22E+02 6.22E+01 |
+-----------------------------------------------------------------------------+
| Participant solution status | |
| FORTE-1 | Converged |
| Fluid Flow (Fluent) | Converged |
+-----------------------------------------------------------------------------+
| COUPLING ITERATION = 2 |
+-----------------------------------------------------------------------------+
| FORTE-1 | |
| Interface: Interface-1 | |
| Temperature | Not yet converged |
| RMS Change | 3.89E-01 4.03E-01 |
| Weighted Average | 3.88E+02 3.88E+02 |
+-----------------------------------------------------------------------------+
| Fluid Flow (Fluent) | |
| Interface: Interface-1 | |
| heatflow | Not yet converged |
| RMS Change | 2.20E-02 3.52E-01 |
| Sum | 6.77E+02 1.24E+02 |
+-----------------------------------------------------------------------------+
| Participant solution status | |
| FORTE-1 | Converged |
| Fluid Flow (Fluent) | Converged |
+-----------------------------------------------------------------------------+
| COUPLING ITERATION = 3 |
+-----------------------------------------------------------------------------+
| FORTE-1 | |
| Interface: Interface-1 | |
| Temperature | Not yet converged |
| RMS Change | 3.16E-01 3.25E-01 |
| Weighted Average | 4.74E+02 4.74E+02 |
+-----------------------------------------------------------------------------+
| Fluid Flow (Fluent) | |
| Interface: Interface-1 | |
| heatflow | Not yet converged |
| RMS Change | 1.93E-01 2.83E-01 |
| Sum | 2.93E+02 1.48E+02 |
+-----------------------------------------------------------------------------+
| Participant solution status | |
| FORTE-1 | Converged |
| Fluid Flow (Fluent) | Converged |
+-----------------------------------------------------------------------------+
| COUPLING ITERATION = 4 |
+-----------------------------------------------------------------------------+
| FORTE-1 | |
| Interface: Interface-1 | |
| Temperature | Not yet converged |
| RMS Change | 1.52E-01 1.54E-01 |
| Weighted Average | 5.11E+02 5.11E+02 |
+-----------------------------------------------------------------------------+
| Fluid Flow (Fluent) | |
| Interface: Interface-1 | |
| heatflow | Not yet converged |
| RMS Change | 6.54E-02 5.40E-02 |
| Sum | 1.75E+02 1.39E+02 |

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 205
System Coupling CHT for T-junction Pipe Flow

+-----------------------------------------------------------------------------+
| Participant solution status | |
| FORTE-1 | Converged |
| Fluid Flow (Fluent) | Converged |
+-----------------------------------------------------------------------------+
| COUPLING ITERATION = 5 |
+-----------------------------------------------------------------------------+
| FORTE-1 | |
| Interface: Interface-1 | |
| Temperature | Not yet converged |
| RMS Change | 4.52E-02 4.53E-02 |
| Weighted Average | 4.98E+02 4.98E+02 |
+-----------------------------------------------------------------------------+
| Fluid Flow (Fluent) | |
| Interface: Interface-1 | |
| heatflow | Not yet converged |
| RMS Change | 2.22E-02 4.54E-02 |
| Sum | 2.21E+02 1.52E+02 |
+-----------------------------------------------------------------------------+
| Participant solution status | |
| FORTE-1 | Converged |
| Fluid Flow (Fluent) | Converged |
+-----------------------------------------------------------------------------+
| COUPLING ITERATION = 6 |
+-----------------------------------------------------------------------------+
| FORTE-1 | |
| Interface: Interface-1 | |
| Temperature | Not yet converged |
| RMS Change | 5.67E-02 5.70E-02 |
| Weighted Average | 5.16E+02 5.16E+02 |
+-----------------------------------------------------------------------------+
| Fluid Flow (Fluent) | |
| Interface: Interface-1 | |
| heatflow | Converged |
| RMS Change | 3.96E-02 3.79E-03 |
| Sum | 1.46E+02 1.51E+02 |
+-----------------------------------------------------------------------------+
| Participant solution status | |
| FORTE-1 | Converged |
| Fluid Flow (Fluent) | Converged |
+-----------------------------------------------------------------------------+
| COUPLING ITERATION = 7 |
+-----------------------------------------------------------------------------+
| FORTE-1 | |
| Interface: Interface-1 | |
| Temperature | Converged |
| RMS Change | 4.64E-03 4.64E-03 |
| Weighted Average | 5.14E+02 5.14E+02 |
+-----------------------------------------------------------------------------+
| Fluid Flow (Fluent) | |
| Interface: Interface-1 | |
| heatflow | Converged |
| RMS Change | 3.20E-03 6.85E-04 |
| Sum | 1.52E+02 1.51E+02 |
+-----------------------------------------------------------------------------+
| Participant solution status | |
| FORTE-1 | Converged |
| Fluid Flow (Fluent) | Converged |
+=============================================================================+

===============================================================================
+=============================================================================+
| |
| Shut Down |
| |
+=============================================================================+
===============================================================================

+=============================================================================+
| Available Restart Points |
+=============================================================================+

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
206 of ANSYS, Inc. and its subsidiaries and affiliates.
Launching the CHT Simulation

| Restart Point | File Name |


+-----------------------------------------------------------------------------+
| Coupling Iteration 1 | Results_iter1.h5 |
| Coupling Iteration 2 | Results_iter2.h5 |
| Coupling Iteration 3 | Results_iter3.h5 |
| Coupling Iteration 4 | Results_iter4.h5 |
| Coupling Iteration 5 | Results_iter5.h5 |
| Coupling Iteration 6 | Results_iter6.h5 |
| Coupling Iteration 7 | Results_iter7.h5 |
+=============================================================================+

+=============================================================================+
+=============================================================================+
| |
| Summary of Coupling Setup |
| |
+=============================================================================+
===============================================================================

+=============================================================================+
| Coupling Control |
+=============================================================================+
| |
| Analysis Type : Steady |
| Duration Control |
| Option : NumberOfSteps |
| NumberOfSteps : 1 |
| Step Control |
| MaximumIterations : 10 |
| MinimumIterations : 1 |
| |
+=============================================================================+
| Coupling Participants (2) |
+=============================================================================+
| |
| Participant: FORTE-1 |
| Type : FORTE |
| UpdateControls: |
| Option : ProgramControlled |
| Region: Wall |
| Topology : Surface |
| Input Variables : Temperature |
| Output Variables : Heat Rate |
| |
+-----------------------------------------------------------------------------+
| |
| Participant: Fluid Flow (Fluent) |
| Type : FLUENT |
| UpdateControls: |
| Option : ProgramControlled |
| Region: wall_internal |
| Topology : Surface |
| Input Variables : temperature, heatflow |
| Output Variables : temperature, heatflow |
| Region: solid |
| Topology : Volume |
| Input Variables : heatrate |
| Output Variables : temperature |
| Region: external_walls |
| Topology : Surface |
| Output Variables : temperature, heatflow |
| Coordinate Transformation: |
| Option : None |
| |
+=============================================================================+
| Solution Control |
+=============================================================================+
| |
| Allow Simultaneous Update : False |
| Partitioning Algorithm : SharedAllocateMachines |
| Global Stabilization : None |

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 207
System Coupling CHT for T-junction Pipe Flow

| |
+=============================================================================+
| Coupling Interfaces (1) |
+=============================================================================+
| |
| Interface: Interface-1 |
| Side: One |
| Coupling Participant : Fluid Flow (Fluent) |
| Region List : wall_internal |
| Side: Two |
| Coupling Participant : FORTE-1 |
| Region List : Wall |
| DataTransfer: Temperature |
| Target Side : Two |
| Source Variable : temperature |
| Target Variable : Temperature |
| Convergence Target : 1.00E-02 |
| Ramping Option : None |
| Relaxation Factor : 1.00E+00 |
| Mapping Type : Surface Profile Preserving |
| Stabilization : ProgramControlled |
| DataTransfer: heatflow |
| Target Side : One |
| Source Variable : Heat Rate |
| Target Variable : heatflow |
| Convergence Target : 1.00E-02 |
| Ramping Option : None |
| Relaxation Factor : 1.00E+00 |
| Mapping Type : Surface Conservative |
| Stabilization : Quasi-Newton |
| Initial Relaxation Factor : 1.00E-01 |
| |
+=============================================================================+
| Output Control |
+=============================================================================+
| |
| Output Control Option : EveryIteration |
| |
+=============================================================================+
| Stabilization |
+=============================================================================+
| |
| The following transfers use Quasi-Newton stabilization: |
| Independent Stabilization: |
| Interface-1 : heatflow |
| |
+=============================================================================+

+-----------------------------------------------------------------------------+
| Hidden features are available. |
+-----------------------------------------------------------------------------+
| Beta: 'GenerateCSVChartOutput' in OutputControl |
| Beta: 'Results' in OutputControl |
+-----------------------------------------------------------------------------+

+=============================================================================+
| Execution Information |
+=============================================================================+
| |
| System Coupling |
| Command Line Arguments: |
| -t8 -R run.py |
| Working Directory: |
| Tutorial_Tee-pipe_flow |
| |
| FORTE-1 |
| Execution Command: |
| "C:\PROGRA~1\ANSYSI~1\v202\reaction\forte.win64\bin\run_forteSC.bat" |
| -scport 40088 -schost work.ansys.com -scname "FORTE-1" -i "tee_junctio |
| n.ftsim" -nprocesses 8 |

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
208 of ANSYS, Inc. and its subsidiaries and affiliates.
Launching the CHT Simulation

| Working Directory: |
| Tutorial_Tee-pipe_flow/forte |
| |
| Fluid Flow (Fluent) |
| Execution Command: |
| "C:\PROGRA~1\ANSYSI~1\v202\fluent\ntbin\win64\fluent.exe" |
| -scid="10535_.ansys.com" -sclic="2325@lic" |
| -i FLUENT-2.jou -t1 |
| Working Directory: |
| Tutorial_Tee-pipe_flow/fluent |
| |
+=============================================================================+
Awaiting connections from coupling participants... done.

+=============================================================================+
| Build Information |
+-----------------------------------------------------------------------------+
| System Coupling |
| 2020 R2: Build ID: 4ac8a92 Build Date: 19 April 2020 12:34:35 |
| FORTE-1 |
| ANSYS Forte 2020 R2 Build Date: Apr 21 2020 |
| Fluid Flow (Fluent) |
| ANSYS Fluent 20.2.0, Build Time:Apr 17 2020 15:40:20 EDT, Build Id:151, |
| OS Version:win64 |
+=============================================================================+

===============================================================================
+=============================================================================+
| |
| Coupled Solution |
| |
+=============================================================================+
===============================================================================

+=============================================================================+
| | Source Target |
+-----------------------------------------------------------------------------+
| COUPLING ITERATION = 1 |
+-----------------------------------------------------------------------------+
| MAPPING SUMMARY |
+- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+
| Interface-1 | |
| heatflow | |
| Mapped Area [%] | 100 100 |
| Mapped Elements [%] | 100 100 |
| Mapped Nodes [%] | 100 100 |
| Temperature | |
| Mapped Area [%] | 100 100 |
| Mapped Elements [%] | 100 100 |
| Mapped Nodes [%] | 100 100 |
+-----------------------------------------------------------------------------+
| FORTE-1 | |
| Interface: Interface-1 | |
| Temperature | Not yet converged |
| RMS Change | 1.00E+00 1.00E+00 |
| Weighted Average | 3.00E+02 3.00E+02 |
+-----------------------------------------------------------------------------+
| Fluid Flow (Fluent) | |
| Interface: Interface-1 | |
| heatflow | Not yet converged |
| RMS Change | 1.00E+00 1.00E+00 |
| Sum | 6.22E+02 6.22E+01 |
+-----------------------------------------------------------------------------+
| Participant solution status | |
| FORTE-1 | Converged |
| Fluid Flow (Fluent) | Converged |
+-----------------------------------------------------------------------------+
| COUPLING ITERATION = 2 |
+-----------------------------------------------------------------------------+

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 209
System Coupling CHT for T-junction Pipe Flow

| FORTE-1 | |
| Interface: Interface-1 | |
| Temperature | Not yet converged |
| RMS Change | 3.89E-01 4.03E-01 |
| Weighted Average | 3.88E+02 3.88E+02 |
+-----------------------------------------------------------------------------+
| Fluid Flow (Fluent) | |
| Interface: Interface-1 | |
| heatflow | Not yet converged |
| RMS Change | 2.20E-02 3.52E-01 |
| Sum | 6.77E+02 1.24E+02 |
+-----------------------------------------------------------------------------+
| Participant solution status | |
| FORTE-1 | Converged |
| Fluid Flow (Fluent) | Converged |
+-----------------------------------------------------------------------------+
| COUPLING ITERATION = 3 |
+-----------------------------------------------------------------------------+
| FORTE-1 | |
| Interface: Interface-1 | |
| Temperature | Not yet converged |
| RMS Change | 3.16E-01 3.25E-01 |
| Weighted Average | 4.74E+02 4.74E+02 |
+-----------------------------------------------------------------------------+
| Fluid Flow (Fluent) | |
| Interface: Interface-1 | |
| heatflow | Not yet converged |
| RMS Change | 1.93E-01 2.83E-01 |
| Sum | 2.93E+02 1.48E+02 |
+-----------------------------------------------------------------------------+
| Participant solution status | |
| FORTE-1 | Converged |
| Fluid Flow (Fluent) | Converged |
+-----------------------------------------------------------------------------+
| COUPLING ITERATION = 4 |
+-----------------------------------------------------------------------------+
| FORTE-1 | |
| Interface: Interface-1 | |
| Temperature | Not yet converged |
| RMS Change | 1.52E-01 1.54E-01 |
| Weighted Average | 5.11E+02 5.11E+02 |
+-----------------------------------------------------------------------------+
| Fluid Flow (Fluent) | |
| Interface: Interface-1 | |
| heatflow | Not yet converged |
| RMS Change | 6.54E-02 5.40E-02 |
| Sum | 1.75E+02 1.39E+02 |
+-----------------------------------------------------------------------------+
| Participant solution status | |
| FORTE-1 | Converged |
| Fluid Flow (Fluent) | Converged |
+-----------------------------------------------------------------------------+
| COUPLING ITERATION = 5 |
+-----------------------------------------------------------------------------+
| FORTE-1 | |
| Interface: Interface-1 | |
| Temperature | Not yet converged |
| RMS Change | 4.52E-02 4.53E-02 |
| Weighted Average | 4.98E+02 4.98E+02 |
+-----------------------------------------------------------------------------+
| Fluid Flow (Fluent) | |
| Interface: Interface-1 | |
| heatflow | Not yet converged |
| RMS Change | 2.22E-02 4.54E-02 |
| Sum | 2.21E+02 1.52E+02 |
+-----------------------------------------------------------------------------+
| Participant solution status | |
| FORTE-1 | Converged |
| Fluid Flow (Fluent) | Converged |
+-----------------------------------------------------------------------------+
| COUPLING ITERATION = 6 |

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
210 of ANSYS, Inc. and its subsidiaries and affiliates.
Launching the CHT Simulation

+-----------------------------------------------------------------------------+
| FORTE-1 | |
| Interface: Interface-1 | |
| Temperature | Not yet converged |
| RMS Change | 5.67E-02 5.70E-02 |
| Weighted Average | 5.16E+02 5.16E+02 |
+-----------------------------------------------------------------------------+
| Fluid Flow (Fluent) | |
| Interface: Interface-1 | |
| heatflow | Converged |
| RMS Change | 3.96E-02 3.79E-03 |
| Sum | 1.46E+02 1.51E+02 |
+-----------------------------------------------------------------------------+
| Participant solution status | |
| FORTE-1 | Converged |
| Fluid Flow (Fluent) | Converged |
+-----------------------------------------------------------------------------+
| COUPLING ITERATION = 7 |
+-----------------------------------------------------------------------------+
| FORTE-1 | |
| Interface: Interface-1 | |
| Temperature | Converged |
| RMS Change | 4.64E-03 4.64E-03 |
| Weighted Average | 5.14E+02 5.14E+02 |
+-----------------------------------------------------------------------------+
| Fluid Flow (Fluent) | |
| Interface: Interface-1 | |
| heatflow | Converged |
| RMS Change | 3.20E-03 6.85E-04 |
| Sum | 1.52E+02 1.51E+02 |
+-----------------------------------------------------------------------------+
| Participant solution status | |
| FORTE-1 | Converged |
| Fluid Flow (Fluent) | Converged |
+=============================================================================+

===============================================================================
+=============================================================================+
| |
| Shut Down |
| |
+=============================================================================+
===============================================================================

+=============================================================================+
| Available Restart Points |
+=============================================================================+
| Restart Point | File Name |
+-----------------------------------------------------------------------------+
| Coupling Iteration 1 | Results_iter1.h5 |
| Coupling Iteration 2 | Results_iter2.h5 |
| Coupling Iteration 3 | Results_iter3.h5 |
| Coupling Iteration 4 | Results_iter4.h5 |
| Coupling Iteration 5 | Results_iter5.h5 |
| Coupling Iteration 6 | Results_iter6.h5 |
| Coupling Iteration 7 | Results_iter7.h5 |
+=============================================================================+

+=============================================================================+
| Timing Summary [s] |
+=============================================================================+
| Coupling Engine Time : 1.0038E+01 |
| Coupling Participant Time |
| FORTE-1 : 3.2065E+03 |
| Fluid Flow (Fluent) : 2.3990E+02 |
| Total Time : 3.4564E+03 |
+=============================================================================+

+=============================================================================+
| System coupling run completed successfully. |
+=============================================================================+

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 211
System Coupling CHT for T-junction Pipe Flow

Transcript output stopped: 2020-04-21 17:27:00


===============================================================================

15.4. Analyzing Simulation Results


Once the coupled simulation has converged, you can examine the Forte and Fluent simulation results
in their directories. In the forte directory, you will see a list of folders named as SCRun_<number>,
where <number> is the step number of the coupled simulation. Forte’s simulation results in each
coupling step are stored in these folders.

Figure 15.5: Forte’s simulation results in seven coupling iteration steps, showing wall heat transfer rate
as a function of time (p. 212) shows Forte’s simulation results in seven coupling iteration steps, plotting
wall heat transfer rate as a function of time. The time-averaged wall heat transfer rates vary in earlier
coupling iteration steps, because the wall temperature boundary condition keeps being updated. The
change in wall heat transfer rate is reduced after three coupled simulations, indicating that the updated
wall boundary condition is getting closer to the proper values. Simultaneously, the spatially averaged
wall temperature results are also converging, as seen in the screen printout when running the simulation.

Figure 15.5: Forte’s simulation results in seven coupling iteration steps, showing wall heat transfer
rate as a function of time

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
212 of ANSYS, Inc. and its subsidiaries and affiliates.
Analyzing Simulation Results

To monitor and analyze the convergence status of the simulation, it is possible to activate in the run.py
script the beta feature

DatamodelRoot().OutputControl.GenerateCSVChartOutput = True

and plot the normalized RMS change of data transferred at the coupling interface for both heat flow
and temperature as in Figure 15.6: Forte’s normalized RMS change in Target value: Heatflow and Tem-
perature (p. 213) (further details about this beta feature can be found in the System Coupling Beta Features
documentation). Note that the y-axis is in a logarithmic scale. The simulation stops when the convergence
target, set to 1% in this tutorial for both variables, is met.

Figure 15.6: Forte’s normalized RMS change in Target value: Heatflow and Temperature

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 213
Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
214 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 16: Conjugate Heat Transfer Simulation of a
Single-Cylinder Internal Combustion Engine
Conjugate Heat Transfer (CHT) is a useful procedure in CFD because it provides realistic thermal
boundary conditions. Most CFD simulations of heat transfer problems apply assumed wall temperatures
as boundary conditions, without any available measured data. Such assumption can affect the validity
and usefulness of the CFD simulation results. CHT has addressed this challenge by coupling the simula-
tions of the fluid and solid on the each side of the wall boundary, and obtaining the wall temperature
in a predictive manner.

In this tutorial, we consider a CHT simulation in an internal combustion engine application. The in-cyl-
inder flow and combustion processes are simulated by a transient CFD analysis using Ansys Forte and
is coupled with a steady-state thermal analysis of the engine block using Ansys Fluent. The coupled
simulation starts with an assumed wall temperature for the in-cylinder CFD simulation, with which the
heat transfer rate through the cylinder wall is computed. Subsequently, the thermal analysis of the engine
block is performed by using the heat transfer rate as a boundary condition. It computes the wall tem-
perature and uses it to update the boundary condition for the in-cylinder combustion CFD for the
second iteration of a coupled simulation. In each of these iterations, transfer of the data for heat
transfer rate and wall temperature between the two simulations is handled automatically by Ansys
System Coupling (see System Coupling User's Guide), without the need of user intervention. The coupled
simulation continues iteration by iteration, until the differences between consecutive data transfers
meet the set criteria for convergence, or the maximum number of iterations is reached. After the CHT
simulation converges, a more realistic wall temperature distribution on the coupled wall surface is ob-
tained.

16.1. Data Provided

16.1.1. Files Used in This Tutorial


The files for this tutorial are obtained by downloading the system_coupling_engine.zip file
here.

Note:

Forte tutorial files are also available as a bundled downloadable package. To access the
files on the Ansys Help site, go to the Forte page at: ansyshelp.ansys.com.

You have the opportunity to select the location for the files when you download and uncompress
the sample files. Once downloaded and unpacked, they include:

• run.py - System Coupling python script that defines the coupling of Fluent to Forte, the coupling
interfaces, the data being transferred, the stopping criteria of the iteration, and is used to start the
coupled simulation.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 215
Conjugate Heat Transfer Simulation of a Single-Cylinder Internal Combustion Engine

• fluent.scp - Fluent XML System Coupling file that defines the fluent input and output variables.

• In the forte directory:

– Engine.ftsim - the Forte project file, which simulates the in-cylinder combustion process.

• In the fluent directory:

– Metal_block.cas - the Fluent case file, which simulates the thermal analysis of the cylinder
wall.

Note:

When running this example, ensure the file structure is consistent with run.py and
fluent.scp in the local folder where you are going to run the tutorial, and that there
are two sub-folders, forte and fluent, with the corresponding project files in each sub-
directory.

16.1.2. Time Estimate


This case uses 8 MPI processes for the Forte run and typically takes 3 System Coupling iterations to
converge. This takes around 5.5 hours on a dual Intel Xeon E5-2697v3 running at 2.59 GHz.

16.2. Setting Up the Conjugate Heat Transfer Simulation


The CHT simulation setup is provided in the downloaded files provided with this tutorial. You can directly
run the simulation (see instructions in Launching the CHT Simulation (p. 223)) using these files. In this
section, we provide an overview of the project settings that are specific to this tutorial but also helpful
for setting up a coupled simulation in general. To establish a CHT simulation, the System Coupling
participants are set up first with proper boundary conditions. They are the individual simulations that
act as components of the coupled simulation. The interfaces that allow data transfer between the parti-
cipants are defined as System Coupling boundary conditions.

In this tutorial, there are two participants:

1. In-cylinder flow and combustion processes of the IC engine analyzed with Ansys Forte;

2. Thermal analysis of the engine block analyzed with Ansys Fluent.

The simulation domains of the two participants are shown in Figure 16.1: Simulation domain in Forte
of flow and combustion analysis (p. 217) and Figure 16.2: Simulation domain in Fluent for the cylinder
wall's thermal analysis (p. 218), respectively.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
216 of ANSYS, Inc. and its subsidiaries and affiliates.
Setting Up the Conjugate Heat Transfer Simulation

Figure 16.1: Simulation domain in Forte of flow and combustion analysis

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 217
Conjugate Heat Transfer Simulation of a Single-Cylinder Internal Combustion Engine

Figure 16.2: Simulation domain in Fluent for the cylinder wall's thermal analysis

In this tutorial, the aim of the CHT simulation is to determine a realistic temperature distribution on the
engine cylinder head and liner, which serve as the coupling interfaces. Therefore, the Forte simulation
transfers the computed wall heat transfer through the cylinder head and liner to the Fluent simulation,
while the Fluent simulation transfers the computed wall temperature data on the same surfaces back
to the Forte simulation.

Both the participants and the System Coupling have been set up for this tutorial in the downloaded
files. For the remaining parts of this section, we will review the setup procedure for the coupling parti-
cipants (Forte and Fluent) and the Ansys System Coupling settings.

16.2.1. Creating the Working Directory to Run the Coupled Simulation


1. Create a working directory. For example: C:\users\Download\CHT.

2. Copy the downloaded System Coupling script file (run.py) and the Fluent XML System Coupling
file (fluent.scp) into the working directory.

3. Copy the downloaded sub-folders (forte, fluent) into the working directory.

As mentioned, from the System Coupling point of view we have two participants:

• First is Forte with:

– input variable Temperature

– output variable Heat Rate

• Second is Fluent with:

– input variable Heat Rate

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
218 of ANSYS, Inc. and its subsidiaries and affiliates.
Setting Up the Conjugate Heat Transfer Simulation

– output variable Temperature

16.2.2. Setting Up the Forte Simulation


A generic 4-stroke diesel engine is considered in this tutorial, and its specifications are listed in
Table 16.1: Engine specification in Forte Setup (p. 219).

Table 16.1: Engine specification in Forte Setup

Compression ratio 17.3


Engine bore size 9.0 cm
Start of fuel 710 crank angle
injection degrees
Injected fuel 0.25 g
amount
Intake-Valve-Closure 580 crank angle
degrees
IVC temperature 350 K

You can load the Forte project file (Engine.ftsim) into the Forte Simulate user interface to review
its settings. The simulation domain used in Forte is shown in Figure 16.1: Simulation domain in Forte
of flow and combustion analysis (p. 217). It includes the combustion chamber of a single cylinder as
well as the intake and exhaust ports connected to it. For simplicity, the intake and exhaust valves are
assumed to be closed during the simulation, which runs from the Intake-Valve-Closure timing to the
Exhaust-Valve-Opening timing. Diesel fuel injection occurs at 10 degrees before the piston reaches
its Top-Dead-Center.

Most of the project settings are similar to those of a stand-alone Forte simulation for IC engines. To
perform a System Coupling simulation, go to the Simulation Controls node, check (turn ON) the
System Coupling box and be sure to select boundary conditions associated with the coupled interfaces
head and liner. Select Heat Rate as the Output variable, and select the Steady State Coupling
method, as shown as in Figure 16.3: Enable System Coupling for the cylinder head and liner boundary
conditions in Forte (p. 220). Note that a uniform and fixed wall temperature of 400 K is specified for
head and 600 K has been set for liner as an initial guess to start the coupled simulation. The wall
temperature will be updated by the data transferred from Fluent in the subsequent iterations.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 219
Conjugate Heat Transfer Simulation of a Single-Cylinder Internal Combustion Engine

Figure 16.3: Enable System Coupling for the cylinder head and liner boundary conditions in
Forte

During the coupled simulation, Forte will automatically create two extra .csv files called
wall_sampling_head_system_coupling.csv and wall_sampling_liner_system_coup-
ling.csv to store time-averaged heat transfer rate data on the head and liner boundaries. These
files are in the Forte run folder and will be used by System Coupling automatically during the coupled
simulation.

Note:

The heat transfer rate data are defined on the surface mesh elements of the wall surface
requested for System Coupling. Therefore, it is good practice to ensure that the surface
mesh has sufficient spatial resolution, so that the heat transfer rate output at the interface
has the same spatial resolution, too. To check the surface mesh resolution, go to Geometry
and select the surface patch that corresponds to the head boundary condition. In this
case, the surface patch is named as cyl-head. Right-click the surface patch and check the
Mesh option to visualize the surface mesh in the 3-D View. Do the same with the surface
patch named cyl-liner.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
220 of ANSYS, Inc. and its subsidiaries and affiliates.
Setting Up the Conjugate Heat Transfer Simulation

16.2.3. Setting Up the Fluent Simulation


Fluent performs the thermal conduction simulation within the solid engine wall. Open the Met-
al_block.cas project in the Fluent user interface. Note that the setup is a steady-state simulation
solving the energy equation in aluminum material. The simulation domain in Fluent is shown in Fig-
ure 16.2: Simulation domain in Fluent for the cylinder wall's thermal analysis (p. 218).

To couple the Fluent thermal analysis with Forte, the coupled boundaries cylinderhead and cylinder-
liner must be set as System Coupling boundaries, as shown in Figure 16.4: Enable System Coupling
at the cylinderhead boundary condition in Fluent (p. 221).

Figure 16.4: Enable System Coupling at the cylinderhead boundary condition in Fluent

Normally, after the Fluent project is set up, you need to export the project setting for System Coupling’s
use. To do this, navigate to File, select Export → System Coupling → Write SCP File, and save the
project settings to an .scp file. In this tutorial, you do not need this step, because the project settings
have been saved to fluent.scp and placed in the run directory. For more information about how
to prepare a Fluent project for System Coupling, refer to the Fluent User's Guide, "Performing Command
Line System Coupling."

16.2.4. Setting Up System Coupling


As mentioned, we have two participants for System Coupling, one is Forte with input variable Tem-
perature and output variable Heat Rate, and the other is Fluent with input variable Heat Rate and
output variable Temperature. The System Coupling setup is defined in the python script file named
run.py. It invokes several functions, including loading the participants’ project information, setting
up the coupling interface, specifying both the control for coupled iterations and the options to promote
convergence, and launching the simulation. The python script used in this tutorial is shown below
as an example. You may use it as a template when setting up a new coupled simulation.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 221
Conjugate Heat Transfer Simulation of a Single-Cylinder Internal Combustion Engine

Example 16.1: run.py python script


import os

# Add Forte as coupling participant


forte = AddParticipant(InputFile = os.path.join('forte', 'Engine.ftsim'))

# Add Fluent as coupling participant


fluent = AddParticipant(InputFile = 'fluent.scp')

# Define coupling interfaces and data transfers


iName_1 = AddInterface(SideOneParticipant = fluent,
SideOneRegions = ['cylinderhead'],
SideTwoParticipant = forte,
SideTwoRegions = ['head'])

iheatrate_1 = AddDataTransfer(Interface = iName_1,


TargetSide = 'One',
SideOneVariable = 'heatflow',
SideTwoVariable = 'HEATR')

itemperature_1 = AddDataTransfer(Interface = iName_1,


TargetSide = 'Two',
SideOneVariable = 'temperature',
SideTwoVariable = 'TEMP')

iName_2 = AddInterface(SideOneParticipant = fluent,


SideOneRegions = ['cylinderliner'],
SideTwoParticipant = forte,
SideTwoRegions = ['liner'])

iheatrate_2 = AddDataTransfer(Interface = iName_2,


TargetSide = 'One',
SideOneVariable = 'heatflow',
SideTwoVariable = 'HEATR')

itemperature_2 = AddDataTransfer(Interface = iName_2,


TargetSide = 'Two',
SideOneVariable = 'temperature',
SideTwoVariable = 'TEMP')

dm = DatamodelRoot()
# Set maximum and minimum iterations and use ramping and relaxation to stabilize convergence
dm.SolutionControl.MaximumIterations= 10
dm.SolutionControl.MinimumIterations= 1

dm.CouplingInterface[iName_1].DataTransfer[iheatrate_1].Stabilization.Option = 'Quasi-Newton'
dm.CouplingInterface[iName_1].DataTransfer[iheatrate_1].Stabilization.InitialRelaxationFactor =1
dm.CouplingInterface[iName_1].DataTransfer[iheatrate_1].ConvergenceTarget = 0.5

dm.CouplingInterface[iName_2].DataTransfer[iheatrate_2].Stabilization.Option = 'Quasi-Newton'
dm.CouplingInterface[iName_2].DataTransfer[iheatrate_2].Stabilization.InitialRelaxationFactor =1
dm.CouplingInterface[iName_2].DataTransfer[iheatrate_2].ConvergenceTarget = 0.5

dm.ActivateHidden.BetaFeatures = True
dm.OutputControl.GenerateCSVChartOutput = True

# Launch the coupled simulation


Solve()

Here the first interface identifies the Fluentcylinderhead patch coupled with the Forte boundary
condition head, while the second interface refers to Fluent patch cylinderliner coupled with the
Forte boundary condition liner. We are transferring Forte’s Heat Rate to Fluent’s heatflow and Fluent’s
temperatures to Forte’s boundary condition. Before starting the simulation is important to choose
the appropriate coupling controls. In this tutorial the best practice makes use of the Quasi-Newton
solution stabilization and acceleration method to transfer Heat Rate data from Forte to Fluent with
an initial relaxation factor of 1 for both the interfaces with the intent to improve convergence (see

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
222 of ANSYS, Inc. and its subsidiaries and affiliates.
Analyzing Simulation Results

"System Coupling Data Transfers" in the System Coupling User's Guide). The convergence targets for
temperature data transfer are kept as the default, 0.01, while the ones for heat rate are loosened up
to 0.5 for both coupled surfaces. A relaxation factor of 0.5 on temperature data transfer is set at the
cylinder head interface to help with the stabilization. For post-processing purposes an Ansys EnSight
output is generated by default at the end of the run, and the beta feature Generate CSV Chart
Output has been activated.

16.3. Launching the CHT Simulation


To run System Coupling, you need to run the System Coupling python environment and pass the
run.py script.

On Windows, open a CMD prompt and type:


call "c:\Program Files\ANSYS Inc\v212\SystemCoupling\bin\systemcoupling" -t8 -R run.py

On Linux at the command prompt, type:


sh $home/ansys_inc/v212/SystemCoupling/bin/systemcoupling -t8 -R run.py

Note:

If you changed the location of your Ansys install, change the path to v212 appropriately.

The System Coupling iterations will run until convergence is accomplished as defined in the python
script. The coupled simulation converges in around 6 iterations under the current settings.

16.4. Analyzing Simulation Results


Once the coupled simulation has converged, you can examine the Forte and Fluent simulation results
in their directories. In the forte directory, you will see a list of folders named as SCRun_<number>,
where <number> is the iteration number of the coupled simulation. Forte’s simulation results in each
coupling step are stored in these folders.

Figure 16.5: Averaged heat transfer flux on the engine cylinder liner as a function of crank angle in
Forte (p. 224) shows, as an example, the spatially averaged wall heat transfer flux on the engine cylinder
liner as a function of crank angle degree obtained from Forte at each iteration. As the coupled simulation
proceeds, the heat transfer flux converges, due to a converging wall temperature boundary condition
returned from System Coupling and applied on the cylinder liner.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 223
Conjugate Heat Transfer Simulation of a Single-Cylinder Internal Combustion Engine

Figure 16.5: Averaged heat transfer flux on the engine cylinder liner as a function of crank angle
in Forte

To monitor and analyze the convergence status of the simulation, it is possible to activate in the run.py
script the beta feature

DatamodelRoot().OutputControl.GenerateCSVChartOutput = True

and plot the normalized RMS change of data transferred at the coupling interface for both heat flow
and temperature as in Figure 16.6: Forte’s normalized RMS change in Target value: Heat flow and Tem-
perature (p. 225) (further details about this beta feature can be found in the System Coupling Beta Features
documentation). Note that the convergence target for heat flow data transfer for the cylinder head was
set to 0.5 instead of the default value of 0.01, therefore the simulation can be considered converged.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
224 of ANSYS, Inc. and its subsidiaries and affiliates.
Analyzing Simulation Results

Figure 16.6: Forte’s normalized RMS change in Target value: Heat flow and Temperature

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 225
Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
226 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 17: Generic Full-cycle Diesel Engine CHT
Using System Coupling
This tutorial describes the Conjugate Heat Transfer (CHT) simulation of a generic diesel engine case.
When measurement data are not available, it is hard to set the wall temperatures in a typical stand-
alone CFD simulation. For this reason, coupling thermal analysis in the solid walls with the CFD simulation
can help the accuracy in the setup. The thermal analysis receives heat transfer data from the CFD sim-
ulation and predicts wall temperatures, those are then sent back to the CFD simulation to correct the
boundary conditions. This coupled simulation continues, until the thermal data transferred between
the CFD and the thermal analysis converges. The exchange of data is a seamless workflow managed
by System Coupling (see System Coupling User's Guide), which is a general-purpose tool to couple
solutions from different Ansys solvers. The in-cylinder flow and combustion are solved by Ansys Forte,
while the thermal analysis and the coolant flow are performed by Ansys Fluent. The CHT simulation is
carried out by an iterative coupling loop with an alternate execution of the two solvers, and the exchange
of heat-transfer-related data at common interfaces.

17.1. Data Provided

17.1.1. Files Used in This Tutorial


The files for this tutorial are obtained by downloading the syc_generic_engine.zip file here.

Note:

Forte tutorial files are also available as a bundled downloadable package. To access the
files on the Ansys Help site, go to the Forte page at: ansyshelp.ansys.com.

You have the opportunity to select the location for the files when you download and uncompress
the sample files. Once downloaded and unpacked, they include:

• run.py - System Coupling python script that defines the coupling of Fluent to Forte, the coupling
interfaces, the data being transferred, the stopping criteria of the iteration, and is used to start the
coupled simulation.

• fluent.scp - Fluent XML System Coupling file that defines the fluent input and output variables.

• In the forte directory:

– DieselEngine.ftsim - the Forte project file, which simulates the full-cycle, in-cylinder com-
bustion process.

• In the fluent directory:

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 227
Generic Full-cycle Diesel Engine CHT Using System Coupling

– EngineBlock.cas.h5 - the Fluent project file, which simulates the coolant flow and the
thermal analysis of the surrounding engine block.

Note:

When running this example, ensure the file structure is consistent with run.py and
fluent.scp in the local folder where you are going to run the tutorial, and that there
are two sub-folders, forte and fluent, with the corresponding project files in each sub-
directory.

17.1.2. Time Estimate


This case uses 126 MPI processes for the Forte run and typically takes 4 System Coupling iterations
to converge. This takes around 21 hours on a dual Intel Xeon E5-2697v3 running at 2.59 GHz.

17.2. Setting Up the Conjugate Heat Transfer Simulation


To establish a CHT simulation, the System Coupling participants must be set up first. A participant is
an individual simulation that acts as component of the coupled simulation and in this tutorial they are
Ansys Forte and Ansys Fluent. Each participant has its own physical domain (see Figure 17.1: Forte
simulation domain (p. 228) and Figure 17.2: Fluent simulation domain (p. 229)), and its own set of
boundary conditions. The two participants exchange data at the head and liner of the cylinder; the
combustion simulation in Forte provides heat transfer rate data to be used as boundary conditions in
the flow and thermal conduction analysis in Fluent, which in turn predicts temperature distributions to
update Forte’s boundary conditions. The iterative loop continues, and the simulation stops when the
data transferred at both the interfaces converge.

The CHT simulation is already set up in the downloaded files of this tutorial. You can directly run the
simulation (see the instructions in Launching the CHT Simulation (p. 235)) using these files. The instructions
provided in this section are an overview of the project settings.

Figure 17.1: Forte simulation domain

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
228 of ANSYS, Inc. and its subsidiaries and affiliates.
Setting Up the Conjugate Heat Transfer Simulation

Figure 17.2: Fluent simulation domain

17.2.1. Creating the Working Directory to Run the Coupled Simulation


Before setting and launching the simulation it is important to have the right folder structure in your
own working directory. With this intent, follow these guidelines:

1. Create a working directory.

2. Copy the downloaded System Coupling script file (run.py) and the Fluent XML System Coupling
file (fluent.scp) into the working directory.

3. Copy the downloaded sub-folders (forte, fluent) into the working directory as well.

As mentioned, from the System Coupling point of view, we have two participants:

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 229
Generic Full-cycle Diesel Engine CHT Using System Coupling

• First is Forte with:

– input variable Temperature

– output variable Heat Rate

• Second is Fluent with:

– input variable Heat Rate

– output variable Temperature

17.2.2. Setting Up the Forte Simulation


This tutorial simulates the full cycle of a generic 4-stroke diesel engine. Most of the project settings
are similar to those of a stand-alone Forte simulation for IC engines. The chemistry set used is the
Diesel_1comp_35sp.cks, the turbulence model is the RNG-ke model, and the mesh refinements
follow the Forte Best Practices. The engine specifications are listed in Table 17.1: Engine specifica-
tion (p. 230).

Table 17.1: Engine specification

Compression ratio 13.75


Bore 9 cm
Stroke 8 cm
RPM 1500
Start of fuel 710
injection CA
Duration of 30
injection CA
Injected fuel 65
amount mg

At a distance of 1 mm below the head, there are 6 nozzles injecting 100% n-heptane, inclined by 120
degrees with respect to the vertical axis, using all the default values for the spray modeling settings.
In the initial conditions panel, the intake region is initialized with 350 K and 2 bar while the exhaust
region with 1000 K and 3 bar. The boundary conditions of interest for the system coupling simulation
are tentatively set to 550 K and 470 K for the head and the liner respectively; they will be updated
by Fluent via system coupling during the following iterations. To allow so, and send back updated
heat rate data to Fluent, the System Coupling check box in the Simulation Controls node of the
Workflow tree must be activated as in Figure 17.3: Enable the System Coupling node (p. 231), and the
Head and Liner surfaces must be selected. Forte will then automatically create two extra .csv files
called wall_sampling_Head_system_coupling.csv and wall_sampling_Liner_sys-
tem_coupling.csv to store time-averaged heat rate data on the head and liner boundaries
automatically transferred to Fluent. Navigating through the System Coupling node, the Steady State
Coupling option is selected since the Fluent counterpart of this simulation is set to be pseudo-tran-
sient. It can be noticed that the Generate System Coupling Reuse Point option is also selected, as-
sociated to a crank angle of 595 degrees. This means that during the first iteration, Forte generates
a restart point at 595 CA, and all the following iterations will reuse the previously solved gas exchange

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
230 of ANSYS, Inc. and its subsidiaries and affiliates.
Setting Up the Conjugate Heat Transfer Simulation

portion (132 to 595 CA), reducing the turn-around time. Finally, the Heat Rate needs to be selected
in the Output Variables panel.

Note:

The heat transfer rate data are defined on the surface mesh elements of the wall surface
requested for System Coupling. Therefore, it is good practice to ensure that the surface
mesh has sufficient spatial resolution so that the heat transfer rate output at the interface
also has the same spatial resolution. To check the surface mesh resolution, go to Geometry
in the Workflow tree and select the surface patch that corresponds to the Head boundary
condition. In this case, the surface patch is named cyl-head. Right-click the surface patch
and check the Mesh option to visualize the surface mesh in the 3-D View. Do the same
with the surface patch named liner.

Figure 17.3: Enable the System Coupling node

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 231
Generic Full-cycle Diesel Engine CHT Using System Coupling

17.2.3. Setting Up the Fluent Simulation


The coolant flow and thermal analysis of the generic diesel engine is performed in Fluent. The geometry
is representative of a realistic engine with a single cylinder. When opening the EngineBlock.cas.h5
project file with the Fluent user interface, take a moment to explore the full domain and identify the
different components. In Figure 17.4: Inside of the Fluent domain (p. 233), one can see 6 bolts colored
in black, valves and valve guides in gray, the gasket in dark blue, the light blue fluid region, which is
the coolant jacket surrounding the cylinder engine, and finally the red and green components are
both fluid regions, respectively the exhaust and the intake port of the engine. Each body has its own
material property set.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
232 of ANSYS, Inc. and its subsidiaries and affiliates.
Setting Up the Conjugate Heat Transfer Simulation

Figure 17.4: Inside of the Fluent domain

As previously mentioned, the setup is a pseudo-transient simulation solving the flow and the energy
equation. The turbulence model in use is the SST-k-omega. In a similar fashion to the Forte setup,
the coupled boundaries enginehead and liner must be set as via System Coupling, as shown in
Figure 17.5: Setting up Fluent coupled boundaries (p. 234).

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 233
Generic Full-cycle Diesel Engine CHT Using System Coupling

Figure 17.5: Setting up Fluent coupled boundaries

Normally, after the Fluent project is set up, you must export the project settings for System Coupling’s
use. To do this, navigate to File > Export > System Coupling > Write SCP File, and save the project
settings to an .scp file. In this tutorial, you do not need this step, because the project settings have
been saved to fluent.scp and placed in the run directory. For more information about how to
prepare a Fluent project for System Coupling, refer to the Fluent User's Guide, "Performing Command
Line System Coupling."

17.2.4. Setting Up System Coupling


The System Coupling setup is defined in the python script file named run.py. It invokes several
functions, including loading the participants’ project information, setting up the coupling interface,
specifying both the control for coupled iterations and the options to promote convergence, and
launching the simulation. The python script used in this tutorial is shown below as an example. You
may use it as a template when setting up a new coupled simulation.

Example 17.1: run.py python script


import os

# Add Forte as coupling participant


forte = AddParticipant(InputFile = os.path.join('forte', 'DieselEngine.ftsim'))

# Add Fluent as coupling participant


fluent = AddParticipant(InputFile = 'fluent.scp')

# Define coupling interfaces and data transfers


iName_1 = AddInterface(SideOneParticipant = fluent,
SideOneRegions = ['enginehead'],
SideTwoParticipant = forte,
SideTwoRegions = ['Head'])

iheatrate_1 = AddDataTransfer(Interface = iName_1,


TargetSide = 'One',
SideOneVariable = 'heatflow',
SideTwoVariable = 'HEATR')

itemperature_1 = AddDataTransfer(Interface = iName_1,


TargetSide = 'Two',

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
234 of ANSYS, Inc. and its subsidiaries and affiliates.
Launching the CHT Simulation

SideOneVariable = 'temperature',
SideTwoVariable = 'TEMP')

iName_2 = AddInterface(SideOneParticipant = fluent,


SideOneRegions = ['liner'],
SideTwoParticipant = forte,
SideTwoRegions = ['Liner'])

iheatrate_2 = AddDataTransfer(Interface = iName_2,


TargetSide = 'One',
SideOneVariable = 'heatflow',
SideTwoVariable = 'HEATR')

itemperature_2 = AddDataTransfer(Interface = iName_2,


TargetSide = 'Two',
SideOneVariable = 'temperature',
SideTwoVariable = 'TEMP')

dm = DatamodelRoot()
# Set maximum and minimum iterations and use ramping and relaxation to stabilize convergence
dm.SolutionControl.MaximumIterations= 40
dm.SolutionControl.MinimumIterations= 1

dm.CouplingInterface[iName_1].DataTransfer[iheatrate_1].Stabilization.Option = 'Quasi-Newton'
dm.CouplingInterface[iName_1].DataTransfer[iheatrate_1].Stabilization.InitialRelaxationFactor = 1
dm.CouplingInterface[iName_1].DataTransfer[iheatrate_1].ConvergenceTarget = 0.5

dm.CouplingInterface[iName_2].DataTransfer[iheatrate_2].Stabilization.Option = 'Quasi-Newton'
dm.CouplingInterface[iName_2].DataTransfer[iheatrate_2].Stabilization.InitialRelaxationFactor = 1
dm.CouplingInterface[iName_2].DataTransfer[iheatrate_2].ConvergenceTarget = 0.5

dm.ActivateHidden.BetaFeatures = True
dm.OutputControl.GenerateCSVChartOutput = True
dm.OutputControl.Option = 'EveryIteration'

# Launch the coupled simulation


Solve()

The order in which the participants are started is given by the order in which they are listed in the
run.py script, whereas it is completely unimportant the order in which the interfaces are listed. The
first interface identifies the Fluent enginehead patch coupled with the Forte boundary Head (note
that these names are case-sensitive) while the second interface refers to the Fluent patch liner coupled
with the Forte boundary Liner. We are transferring Forte Heat Rate (HEATR) to Fluent’s heatflow
and Fluent’s temperatures to Forte’s boundary conditions (TEMP). Before starting the simulation it
is important to choose the appropriate coupling controls. In this tutorial the best practice makes use
of the Quasi-Newton solution stabilization and acceleration method to transfer Heat Rate data from
Forte to Fluent with no initial relaxation factor (see "System Coupling Data Transfers" in the System
Coupling User's Guide). The convergence targets for temperature data transfer are kept as the default,
0.01, while the ones for heat rate are loosened up to 0.5 for both coupled surfaces. For post-processing
purposes an Ansys EnSight output is generated at each run (EveryIteration), and the option for
Generate CSV Chart Output has been activated.

17.3. Launching the CHT Simulation


To run System Coupling, you must run the System Coupling python environment and pass the run.py
script.

On Windows, open a CMD prompt and type:


call "c:\Program Files\ANSYS Inc\v212\SystemCoupling\bin\systemcoupling" -t8 -R run.py

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 235
Generic Full-cycle Diesel Engine CHT Using System Coupling

On Linux at the command prompt, type:


sh $home/ansys_inc/v212/SystemCoupling/bin/systemcoupling -t8 -R run.py

Note:

Here 8 is just an example of how to select the number of cores to use. For this tutorial we
have used 126 cores. Additionally, if you changed the location of your Ansys install, do not
forget to change the path to v212 appropriately.

The System Coupling iterations will run until convergence is accomplished as defined in the python
script. The coupled simulation converges in 4 iterations under the current settings.

17.4. Analyzing Simulation Results


Once the coupled simulation has converged, you can examine the Forte and Fluent simulation results
in their directories. In the forte directory, you will see a list of folders named as SCRun_<number>,
where <number> is the iteration number of the coupled simulation. Figure 17.6: Averaged heat transfer
flux on the engine cylinder liner as a function of crank angle in Forte (p. 237) shows a zoom-in of the
spatially averaged wall heat transfer fluxes as a function of crank angle for both the head and the liner.
Especially noticeable at the head is the effect of the wall temperature boundary conditions being updated,
while in Figure 17.9: Temperature contour on a zx-plane at y= -0.018 m OUTSIDE the engine cylin-
der (p. 240) and Figure 17.10: Temperature contour on a zx-plane at y= -0.018 m INSIDE the engine cyl-
inder (p. 241) the overall solution expressed in terms of spatially averaged Pressure, Apparent Heat Release
Rate, and Temperature is insensitive to Temperature stratification.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
236 of ANSYS, Inc. and its subsidiaries and affiliates.
Analyzing Simulation Results

Figure 17.6: Averaged heat transfer flux on the engine cylinder liner as a function of crank angle
in Forte

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 237
Generic Full-cycle Diesel Engine CHT Using System Coupling

Figure 17.7: Averaged Pressure and Apparent Heat Release Rate as a function of crank angle

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
238 of ANSYS, Inc. and its subsidiaries and affiliates.
Analyzing Simulation Results

Figure 17.8: Averaged Temperature as a function of crank angle

Figure 17.9: Temperature contour on a zx-plane at y= -0.018 m OUTSIDE the engine cylinder (p. 240)
shows the spatially resolved temperature outside the cylinder engine (Fluent domain) on a cut plane
at y =-0.018 m. In dark gray you can identify the two coupled interfaces, head and liner, while in light
gray the exhaust valve 1, the intake valve 1 and the coolant jacket are displayed to facilitate the under-
standing of the geometry orientation. The figure has been realized by loading the *.dat results stored
in the fluent folder at the end of the coupled simulation.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 239
Generic Full-cycle Diesel Engine CHT Using System Coupling

Figure 17.9: Temperature contour on a zx-plane at y= -0.018 m OUTSIDE the engine cylinder

On the same cut plane at y=-0.018 m, Figure 17.10: Temperature contour on a zx-plane at y= -0.018 m
INSIDE the engine cylinder (p. 241) shows the instantaneous temperature distribution inside the cylinder
engine (Forte domain) at 852 CA of the converged iteration.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
240 of ANSYS, Inc. and its subsidiaries and affiliates.
Analyzing Simulation Results

Figure 17.10: Temperature contour on a zx-plane at y= -0.018 m INSIDE the engine cylinder

Finally, Figure 17.11: Heat flux and temperature distribution averaged in time on the head and liner (p. 242)
shows the spatially resolved and time averaged variables on the two coupled interfaces where the data
transfer occurs. Notice the small gap between the head and the liner in both domains that represent
the gasket, the surface is not coupled and therefore not reported in this figure.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 241
Generic Full-cycle Diesel Engine CHT Using System Coupling

Figure 17.11: Heat flux and temperature distribution averaged in time on the head and liner

It is also possible to monitor and analyze the convergence status of the simulation by turning on the
CSV Chart Output feature in the run.py as follows

DatamodelRoot().OutputControl.GenerateCSVChartOutput = True

This will create an Interface-<i>.csv file per each coupled boundary in the SyC directory from
which the normalized RMS change of data transferred can be extracted, as shown in Figure 17.12: Nor-
malized RMS Change in Target Value (p. 243).Note that the y-axis is expressed in a logarithmic scale.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
242 of ANSYS, Inc. and its subsidiaries and affiliates.
Analyzing Simulation Results

Figure 17.12: Normalized RMS Change in Target Value

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 243
Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
244 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 18: Links to Third-Party Software
Ansys Forte 2021 R2 can be used to perform co-simulation with GT-SUITE. It is useful for simulation of
intake and exhaust manifolds as well as that including in-cylinder combustion. Refer to the GT-SUITE
Fluent Coupling Manual and Tutorials document installed with GT-SUITE version 2018 [1 (p. 249)] for
general information about CFD coupling, basic requirements, scope, and coupling methodology. The
GTLINK library template, provided through a partnership arrangement between Ansys, Inc. and Gamma-
Technologies, has been used to enable coupling with Forte. The code needed to use the GTLINK library
is included in Forte and invoked automatically when setting up and running Forte simulations, as de-
scribed later in this section.

• To access tutorials and their input files, go to the Ansys Help site and select the Ansys Forte tutorials
you wish to download. Download links are listed in each Forte tutorial lesson.

18.1. Installing Forte and GT-SUITE for Coupling


Ansys Forte 2021 R2 is compatible with GT-SUITE versions 2017, 2018, and 2019 Build 1. Mutually
compatible 64-bit Windows and Linux platforms are supported. The path to the GT-SUITE installation
directory can be specified during Forte setup. An environment variable, GTIHOME, which is set by the
GT-SUITE installation, is also used as an alternative method to invoke GT-SUITE during co-simulation.

18.2. Setting Up a GT-SUITE Model for CFD Coupling


We use the same example as shown in GT-SUITE's Fluent Coupling Manual and Tutorials document to
demonstrate coupling with Ansys Forte. In that document, refer to the section on "Tutorial 1: Setting
up a GT-SUITE model for CFD Coupling," for detailed instructions on setting up a GT-SUITE Engine
model example in GT-SUITE. The example uses a 4-cylinder spark-ignition engine model with a resolved
EGR pipeline. CFD is used at the intake manifold to capture pulsation and mixing effects and the resulting
cylinder-to-cylinder composition variation. Section 1.2 of that tutorial describes the steps to prepare a
GT-SUITE model for CFD coupling.

• For coupling GT-SUITE with Ansys Forte, only Velocity or Pressure boundary types may be used.

18.3. Setting Up a Forte Model for Coupling with GT-SUITE


The files for this tutorial are obtained by downloading the gtpower_intake_manifold.zip file
here.

Unzip gtpower_intake_manifold.zip to your working folder.

The first step in setting up an Ansys Forte model in the example is to import a surface mesh for the
geometry. For this example, import the geometry STL file Intake_Manifold.stl located at %GTI-
HOME%\v2017\tutorials\Co-Simulation_And_UserCode\CFDcoupling\IntakeManifold,

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 245
Links to Third-Party Software

or import the Fluent mesh file in the sub-folder FLUENT\IntakeManifold.msh. More information
on setting up mesh controls for automatic meshing and boundary conditions is in the Forte Quick Start
Guide and Forte User's Guide.

A pre-set Forte setup file (.ftsim) is available with this sample.

Cell size can be set according to the accuracy desired. Typically a cell size of 2 mm or smaller is recom-
mended. Ansys Forte also requires a reaction mechanism for fluid mixture. Since there is no chemistry
in this intake manifold example, the chemistry set provided contains only species information without
reactions. An estimate of initial conditions in the fluid domain of the manifold and of initial boundary
conditions are set in the Forte project. These values can be obtained by running GT-SUITE without CFD
coupling. They will impact the initial transient conditions but not the steady state at longer residence
times.

For setting up boundary conditions in Forte, the following types should be used:

• Velocity Inlet Type: Use the Velocity option with the direction set normal to the boundary, a zero
pressure-gradient assumption, and use the total-temperature option.

• Pressure Inlet Type: Use the Total Pressure option with the total temperature specification.

• Pressure Outlet Type: Use the Total Pressure option.

• Velocity Outlet Type: Use the Continuative Outlet option.

Simulation Controls in Ansys Forte should be time-based. Simulation time should slightly exceed the
total time for all cycles in the GT-SUITE setup. All the controls for coupling with GT-SUITE are located
under the GTI Model panel as shown in Figure 18.1: GTI Model co-simulation panel under Simulation
Controls (p. 247).

Note:

The GT-SUITE license feature, version, and bin directories are specified as Preferences. If the
bin directory is not available, the software will look for an alternate location using the
%GTIHOME% environment variable.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
246 of ANSYS, Inc. and its subsidiaries and affiliates.
Setting Up a Forte Model for Coupling with GT-SUITE

Figure 18.1: GTI Model co-simulation panel under Simulation Controls

Next, the GT-SUITE project file (.gtm) should be specified and loaded by clicking the button next to
that entry box. This action will extract the species and boundary information using the GTLINK library
in the background. Any unresolved issues from Step 1 or absence of a GT-SUITE installation may prevent
this action. Note that the GT-SUITE bin path and version number are specified in Forte > Preferences
> Preferred Applications. The default version for GT-SUITE is v2017. If the GTIHOME environment
variable is defined, it will be used to load the appropriate GTLINK library. Once the GT-SUITE project
file is read successfully, all the species and boundaries will be populated on the same setup panel as
shown in Figure 18.2: Species and boundaries extracted from the sample GT-SUITE project in Forte
setup (p. 248).

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 247
Links to Third-Party Software

Figure 18.2: Species and boundaries extracted from the sample GT-SUITE project in Forte setup

The GT-SUITE model defines a number of coupling species and coupling interfaces, all of which are
populated in Figure 18.2: Species and boundaries extracted from the sample GT-SUITE project in Forte
setup (p. 248) and need to be mapped to the Ansys Forte model. GT-SUITE species can be mapped to
either a pure species or to a user-defined gas mixture. A species to lump the mass fraction of the un-
mapping species in Forte must also be selected. The typical chemistry in Forte can involve many more
species than those tracked by GT-SUITE. Therefore, it is important to choose a species that can be used
to lump the mass fractions of all these lumped species in the Forte chemistry. For non-reactive cases,
such as this example, the fraction of unlumped species is usually zero or negligible. In this example,
since many species are lumped to lump_N2 in Step 1 (co, h2, no, ar), this is a good choice for lumped
species in Forte as well. However, when using Forte under reactive conditions, many hydrocarbon inter-
mediates can be produced as a specified detailed reaction mechanism. Mass fractions of these interme-
diate species in Forte need to be lumped and mapped to an appropriate species in GT-SUITE. Selecting
fresh or burned fuel or other lumped species representing CO in GT-SUITE is recommended for lumping
of mass fractions balance from Forte.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
248 of ANSYS, Inc. and its subsidiaries and affiliates.
References

For simulation, a Forte run must be prepared first and should not be started directly from the user in-
terface. The GT-SUITE project (.gtm) and its supporting files, if any, need to be copied to Forte's run
directory prior to starting the simulation.

18.4. Restarting or Continuing a Co-simulation


Prior to preparing a restart run, make a copy of the GT-SUITE file with extension .cfdreload created
during the previous simulation in a temporary location. Prepare a restart Forte run, which will remove
the GT-SUITE related files. Before starting the simulation and after preparing a run, copy the GT-SUITE
project-related files, including the .cfdreload file, in the run folder.

18.5. References
1. Gamma Technologies, GT-SUITE 2018. 2017.

Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 249
Release 2021 R2 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
250 of ANSYS, Inc. and its subsidiaries and affiliates.

You might also like