kinetics & SRM Engine Suite

An application for simulating engines, chemical reactors and developing kinetic mechanisms

User Manual v9.4.1, Build 01

December 1, 2017

CMCL < > Innovations Support

If you encounter any difficulties using the kinetics & SRM Engine Suite, or have any questions regarding current or future features, please contact the CMCL support team using the details below.

Telephone Support Hours 9:00 to 17:00 Monday - Friday (GMT)

Postal address CMCL Innovations Sheraton House Castle Park Cambridge CB3 0AX United Kingdom.

Tel: + 44 (0)1223 37 00 30 Fax: + 44 (0)1223 37 00 40 Email: [email protected] Website: http://www.cmclinnovations.com Contents

I Getting started1

1 Set up2 1.1 Minimum requirements and prerequisites...... 3 1.1.1 Java installation...... 3 Check whether Java is installed...... 3 Install and configure Java...... 4 1.1.2 Multiprocessor support (MPI)...... 8 Installing MPI...... 8 Testing MPI...... 8 1.2 Installation...... 10 1.2.1 OS firewall settings...... 10 1.2.2 Memory requirements...... 10 1.2.3 Un-installation...... 11 1.3 Software license set-up...... 12 1.3.1 Installing a USB licence dongle...... 13 1.3.2 Using a local USB licence dongle...... 13 1.3.3 Using a network USB licence dongle...... 13 Configuring the client machine...... 13 Configuring the server machine...... 14 1.3.4 Swapping a USB licence dongle...... 15

User Manual v9.4.1, Build 01 iii c 2017 CMCL Innovations CMCL < > CONTENTS Innovations

1.3.5 Generating a diagnostic file for a USB licence dongle. 15 1.3.6 Updating a USB licence dongle...... 16 1.4 Importing older projects...... 19 1.5 Contacting CMCL...... 19

2 Using kinetics & SRM Engine Suite 20 2.1 First time set-up...... 21 2.2 Creating a project...... 22 2.3 Project structure...... 23 2.3.1 Parent Cases...... 23 2.3.2 Child Cases and Analysis Tools...... 24 2.4 Using the Project Window...... 25 2.4.1 Import External Data...... 26 2.4.2 Import, Export & View Mechanisms...... 26 Importing Mechanisms...... 26 Exporting Mechanisms...... 28 Using a Mechanism for Simulations...... 28 Viewing Mechanisms...... 28 Thermodynamics & Reaction Energetics...... 33 Activity Logs...... 34 2.4.3 Injection map interpolation...... 34 Injection rate shape map input requirements..... 37 Interpolation details...... 40 2.4.4 Adding a Simulation...... 40 2.4.5 Simulation Controls...... 42 2.4.6 Live Results...... 44 2.4.7 Parent Case Settings...... 46 2.5 Simulation Inputs...... 47 2.5.1 General Settings...... 48 2.5.2 Output Settings...... 49

c 2017 CMCL Innovations iv User Manual v9.4.1, Build 01 CMCL < > Innovations CONTENTS

2.5.3 Geometry...... 51 2.5.4 Initial Mixture...... 53 Compositions...... 53 EGR...... 54 Particle Ensemble...... 56 2.5.5 Direct Injection...... 56 2.5.6 Heat Transfer...... 59 2.5.7 Turbulent Mixing...... 59 2.5.8 Boundary Layer Zones...... 60 2.5.9 Breathing...... 64 2.5.10 Spark Ignition...... 64 2.5.11 Engine Performance...... 64 2.5.12 Emissions...... 65 2.5.13 Nanoparticles...... 66 2.5.14 Reactor Networks...... 67 2.6 Simulation Analysis Tools...... 71 2.6.1 Child Cases...... 71 2.6.2 Sensitivity Analyses...... 74 Visualising Sensitivity Data...... 75 2.6.3 Design of Experiments...... 77 Running an experiment...... 78 Visualising Experiment Data...... 78 2.7 Post Processing...... 81 2.7.1 Data Visualisations...... 81 Importing External Data...... 81 Two-dimensional plots...... 82 Plotting multiple cases...... 86 Three-dimensional plots...... 87 2.7.2 Particle Animations...... 89 2.7.3 Flux Analysis...... 90

User Manual v9.4.1, Build 01 v c 2017 CMCL Innovations CMCL < > CONTENTS Innovations

2.7.4 Mechanism Reduction...... 91

3 Tutorials 97 3.1 Tutorial 1 (H2-Air CV Closed Homog)...... 98 3.1.1 Opening the tutorial...... 98 3.1.2 Mechanism...... 98 3.1.3 Simulation set-up...... 101 3.1.4 Running the tutorial...... 102 3.1.5 Visualising the results...... 103 3.1.6 Sensitivity analysis...... 104 3.2 Tutorial 2 (Propane-Air CP Closed Homog)...... 107 3.2.1 Opening the tutorial...... 107 3.2.2 Mechanism...... 107 3.2.3 Simulation set-up...... 108 3.2.4 Running the tutorial...... 109 3.2.5 Visualising the results...... 109 3.2.6 Post-processing...... 111 3.3 Tutorial 3 (Methane-Air CV PSR Homog)...... 113 3.3.1 Opening the tutorial...... 113 3.3.2 Mechanism...... 113 3.3.3 Simulation set-up...... 114 3.3.4 Running the tutorial...... 116 3.4 Tutorial 4 (Methane-Air CV PSR Inhomog)...... 117 3.4.1 Mechanism...... 117 3.4.2 Simulation set-up...... 117 3.4.3 Running the tutorial...... 119 3.4.4 Post-processing...... 119 3.4.5 Resolving the simulation: Number of particles..... 119 3.5 Tutorial 5 (H2-Air PFR Homog)...... 122 3.5.1 Mechanism...... 122

c 2017 CMCL Innovations vi User Manual v9.4.1, Build 01 CMCL < > Innovations CONTENTS

3.5.2 Simulation set-up...... 122 3.5.3 Post-processing: General...... 123 3.6 Tutorial 6 (Engine HCCI)...... 125 3.6.1 Mechanism...... 125 3.6.2 Using internal mechanisms...... 125 3.6.3 Simulation set-up...... 126 3.6.4 Running the tutorial...... 126 3.6.5 Post-processing...... 127 3.6.6 Post-processing: Mean value data...... 127 3.6.7 Influence of number of particles...... 127 3.7 Tutorial 7 (Engine - DI HCCI)...... 131 3.7.1 Mechanism...... 131 3.7.2 Simulation set-up...... 131 3.7.3 Running the simulation...... 131 3.7.4 Post-processing...... 132 3.8 Tutorial 8 (Engine - SI)...... 135 3.8.1 Mechanism...... 135 3.8.2 Simulation set-up...... 135 3.8.3 Post-processing...... 136 3.9 Tutorial 9 (Engine - Turbocharged)...... 138 3.9.1 Mechanism...... 138 3.9.2 Simulation set-up...... 138 3.9.3 Post-processing...... 139

4 Example projects & applications 141 4.1 Reactor examples...... 142 4.1.1 Constant Volume Reactor, Homogeneous...... 142 4.1.2 Constant Pressure Reactor, Homogeneous...... 142 4.1.3 Constant Volume Reactor, Heterogeneous...... 142 4.1.4 Constant Pressure Reactor, Heterogeneous...... 142

User Manual v9.4.1, Build 01 vii c 2017 CMCL Innovations CMCL < > CONTENTS Innovations

4.1.5 Constant Volume PSR, Homogeneous...... 143 4.1.6 Constant Pressure PSR, Homogeneous...... 143 4.1.7 Constant Volume PaSR, Heterogeneous...... 143 4.1.8 Constant Pressure PaSR, Heterogeneous...... 143 4.1.9 Constant Pressure PFR, Homogeneous...... 144 4.1.10 Constant Pressure PFR, Heterogeneous...... 144 4.1.11 Constant Volume Adiabatic, Homogeneous...... 144 4.1.12 Constant Pressure Adiabatic, Homogeneous..... 144 4.1.13 Cetane Number Reactor...... 144 4.1.14 Turbulent Mixing Reactor...... 145 4.1.15 Equilibrium Reactor...... 145

4.1.16 Fischer-Tropsch reactions on a Co/γ-Al2O3 catalyst.. 145 4.1.17 Plasma reactor producing ZnO particles...... 146 4.1.18 Hot wall reactor producing Si particles...... 146 4.2 Engine examples...... 146 4.2.1 CFR IC engine - SI fuel testing...... 146 4.2.2 4 cylinder 2.0 litre SI engine operating on 95 RON gasoline...... 147 4.2.3 6 cylinder 3.0 litre SI high-performance IC engine... 147 4.2.4 4 cylinder 2.0 litre DISI IC engine with ethanol fuelling 147 4.2.5 4 cylinder 2.0 litre SI IC engine with hydrogen fuelling 148 4.2.6 8 cylinder 40.0 litre HD IC engine with natural gas fuelling148 4.2.7 4 cylinder 2.0 litre diesel engine with multiple direct injections...... 149 4.2.8 4 cylinder 2.0 litre diesel engine with injection profile. 149 4.2.9 6 cylinder 2.0 litre diesel IC engine load-speed map. 149 4.2.10 8 cylinder 125.0 litre dual fuel IC engine...... 150 4.2.11 4 cylinder 2.3 litre diesel IC engine with gas exchange 150 4.2.12 HCCI IC engine with Population Balance Soot Model. 151 4.2.13 DISI IC engine with Population Balance Soot Model. 151

c 2017 CMCL Innovations viii User Manual v9.4.1, Build 01 CMCL < > Innovations CONTENTS

4.2.14 Standard SRM Engine...... 151 4.2.15 4 cylinder 2.3 litre diesel CIDI IC engine...... 151 4.2.16 CIDI Engine...... 152 4.2.17 DISI Engine...... 152 4.2.18 Dual Fuel DI Pilot Ignition Engine...... 152 4.2.19 HCCI Engine...... 152 4.2.20 MON Test Engine...... 153 4.2.21 Oil Driven Pre-Ignition in SI Engine...... 153 4.2.22 RON Test Engine...... 153 4.2.23 SI Engine...... 154 4.3 Model application - compression ignition engines...... 154 4.3.1 Model parameterisation...... 154 4.3.2 Calibration procedure...... 154 4.3.3 Parameter sensitivity...... 157 4.3.4 Blind testing...... 158 4.3.5 Extrapolating/interpolating in "predictive mode".... 159 4.4 Model application - spark ignition engines...... 165 4.4.1 Calibration procedure...... 165

5 Coupling with 3rd party software tools 166 5.1 Ricardo WAVE...... 167 5.1.1 Licensing...... 167 5.1.2 Setting-up the WAVE and kinetics & SRM Engine Suite coupling...... 167 5.1.3 Exchanging data between codes...... 170 5.1.4 Running the model...... 172 5.2 GT-Power...... 177 5.2.1 Using GT-Power...... 177 5.2.2 GT-Power SRM Cylinder Inputs...... 179 5.2.3 Running the model...... 189

User Manual v9.4.1, Build 01 ix c 2017 CMCL Innovations CMCL < > CONTENTS Innovations

5.2.4 Using kinetics & SRM Engine Suite co-simulation in your existing GT-Power maps...... 192 5.2.5 GT-Power outputs...... 193 5.2.6 Coupling with aftertreatment...... 195

II Theory 201

6 Ideal reactor models 202 6.1 Chemical and thermodynamic models...... 203 6.1.1 Chemical mechanisms...... 203 Materials...... 203 Reactions...... 203 Phases...... 204 Species...... 204 Elements...... 206 6.1.2 Equation of state...... 206 6.1.3 State variables...... 207 6.1.4 Conversion formulae for system variables...... 207 Gas phase quantities...... 207 Site phase quantities...... 208 Bulk phase quantities...... 209 6.1.5 General reaction equation...... 209 6.1.6 Thermodynamic properties...... 209 Molar species properties...... 209 Specific (mass-based) species properties...... 211 Mixture-averaged properties of gas mixtures..... 211 Standard-state...... 213 Chemical equilibrium...... 214 6.1.7 Chemical reactions...... 216 Rate of progress...... 216

c 2017 CMCL Innovations x User Manual v9.4.1, Build 01 CMCL < > Innovations CONTENTS

Species concentrations...... 217 Species production rates...... 218 6.1.8 Gas-phase reaction rate constants...... 219 Modified Arrhenius reactions...... 219 Landau-Teller reactions...... 219 Three-body reactions...... 219 Pressure-dependent low pressure fall-off reactions.. 220 General pressure-dependent reactions...... 222 6.1.9 Surface reaction rate constants...... 224 Surface-coverage reactions...... 224 Sticking coefficient reactions...... 225 6.2 ODE-based Population Balance Models...... 227 6.2.1 Particle dynamics equations...... 227 Collision kernels...... 227 Particle Models...... 228 6.2.2 Sectional Method...... 229 Population Balance Equation (Discrete Form)..... 229 6.2.3 Specific Applications...... 234 Sectional Soot Model...... 234 6.3 Constant volume reactor...... 238 6.4 Constant pressure reactor...... 239 6.5 Numerical methods...... 239 6.5.1 ODE solvers...... 239 6.5.2 Co-solver...... 241

7 Inhomogeneous reactor models 242 7.1 Perfectly-/Partially stirred reactors (PSR/PaSR)...... 243 7.1.1 Model assumptions and equations...... 244 7.1.2 Algorithm...... 245 7.1.3 Requirements for usage...... 246

User Manual v9.4.1, Build 01 xi c 2017 CMCL Innovations CMCL < > CONTENTS Innovations

7.2 Plug-flow reactors (PFRs)...... 248 7.3 Internal Engine Model (SRM Engine Suite).... 249 7.3.1 Introduction...... 249 7.3.2 Main Equation...... 249 7.3.3 Stochastic Model Parameters...... 251 7.3.4 Crevice Flow...... 251 7.3.5 Piston Movement...... 252 7.3.6 Chemical Kinetics...... 253 7.3.7 Convective Heat Transfer...... 253 Convective Heat Transfer in an Generic reactor.... 254 Convective Heat Transfer in an Engine reactor.... 254 7.3.8 Pressure Equalisation...... 256 7.3.9 Turbulent Mixing...... 257 Turbulence timescale models...... 259 Mixing models...... 266 Spark ignition mixing models...... 268 Mixing model outputs...... 269 7.3.10 Numerical Solution...... 270 7.3.11 Gas exchange and breathing...... 271 7.3.12 Friction and engine performance calculations..... 272 Friction...... 273 Engine Performance...... 273 Indicated work per cycle per cylinder...... 274 Indicated power per cylinder...... 275 Mean Effective Pressure...... 275 Torque...... 275 Calculations related to the brake...... 278 Specific fuel consumption and emissions...... 278 7.3.13 Spark Ignited Flame Propagation...... 278 Three-Zone: Turbulent Flame Propagation Model... 279

c 2017 CMCL Innovations xii User Manual v9.4.1, Build 01 CMCL < > Innovations CONTENTS

Two-Zone: Turbulent Flame Propagation Model.... 285 Two-Zone: Empirical Wiebe Model...... 286 Two-Zone: Empirical Double Wiebe Model...... 287 Two-Zone: Modified Wiebe Model...... 287 Two zone: User input mass fraction burned...... 288 Laminar Flame Speed Correlation...... 289 Two/three-zone: User defined burn order...... 292 7.3.14 Direct Injection...... 292 Physical Direct Injection Model...... 292 PDF-based Injection Model...... 295 Injector Nozzle Number Model...... 296 7.3.15 Wall impingement model...... 298 Physical...... 298 PDF (Spray + Wall)...... 300 Wall film evaporation...... 301 7.3.16 Droplet model...... 301 Injection Pressure...... 302 7.3.17 Gas-phase emissions model...... 302 Nitrous oxides emissions...... 303 Unburned hydrocarbons emissions...... 304 All other regulated and unregulated gas-phase emis- sions...... 305 7.3.18 Particulate matter emissions model...... 306 Empirical Soot Model...... 306 Population Balance Soot (PBS)...... 308 Empirical PM and PN Model...... 309 7.3.19 Measures of Mixture strength...... 310 Fuel/air equivalence ratio...... 311 Mixture composition as function of equivalence ratio. 312 7.3.20 Residual...... 313

User Manual v9.4.1, Build 01 xiii c 2017 CMCL Innovations CMCL < > CONTENTS Innovations

7.3.21 Apparent heat release rate...... 314

8 One-dimensional laminar flames 315 8.1 Introduction...... 316 8.2 Governing equations...... 316 8.2.1 Conservation laws...... 317 8.2.2 Diffusion...... 318 8.3 Boundary conditions...... 320 8.3.1 Burner-stabilised laminar premixed flames...... 320 8.3.2 Counter-flow diffusion flames...... 321 8.3.3 Stagnation flames...... 321

9 Post-processing analyses 322 9.1 Ignition Delay...... 323 9.2 Sensitivity analysis...... 323 9.3 Mechanism reduction...... 324 9.3.1 Direct Relation Graph (DRG) method...... 325 Direct Interaction Coefficients (DIC)...... 326 Overall Importance Coefficients (OIC)...... 328 Overall Importance Coefficients in DRG...... 329 Overall Importance Coefficients in DRGEP...... 329 Scaling factors...... 329 Final values of the Overall Importance Coefficients.. 330

III API 332

10 API user manual 333 10.1 Compiler Compatibility...... 334 10.2 Writing User Applications...... 335 10.2.1 Basic Requirements...... 335 10.2.2 Running the pre-compiled example...... 336

c 2017 CMCL Innovations xiv User Manual v9.4.1, Build 01 CMCL < > Innovations CONTENTS

10.2.3 Linking to the kinetics & SRM Engine Suite API Library 338 10.2.4 Compiler Settings...... 339 10.3 Sample Program...... 339 10.3.1 Global variables...... 340 10.3.2 Chemistry example...... 343 10.3.3 Parallel chemistry example...... 343 10.3.4 Engine example...... 344

11 API reference guide 345 11.1 Summary...... 346 11.2 Chemistry and Engine...... 346 11.2.1 Get API Version Number...... 346 11.2.2 Get API Version ID...... 347 11.2.3 Get Licence Key Length...... 347 11.2.4 Initialise Chemistry...... 347 11.2.5 Finalise Chemistry...... 347 11.2.6 ODE Solver...... 349 11.2.7 Get Number Of Species...... 349 11.2.8 Get Species Names...... 350 11.2.9 Get Species Index...... 350 11.2.10 Get Species Molar Masses...... 351 11.2.11 Get Gas Constant...... 351 11.2.12 Get Number of ODE Unknowns...... 352 11.2.13 Get ODE Unknown Names...... 352 11.2.14 Get ODE Unknown Index...... 353 11.2.15 Get Mean Molar Mass...... 353 11.2.16 Get Species Molar Cp...... 354 11.2.17 Get Species Molar Cv...... 354 11.2.18 Get Mean Molar Cp...... 355 11.2.19 Get Mean Molar Cv...... 355

User Manual v9.4.1, Build 01 xv c 2017 CMCL Innovations CMCL < > CONTENTS Innovations

11.2.20 Get Specific Enthalpy...... 356 11.2.21 Get Molar Enthalpy...... 356 11.2.22 Get Specific Molar Internal Energy...... 357 11.2.23 Get Mean Molar Enthalpy...... 357 11.2.24 Get Mean Molar Internal Energy...... 358 11.2.25 Calculate temperature from molar enthalpy...... 358 11.2.26 Calculate temperature from molar internal energy... 359 11.2.27 Get NASA polynomial thermodynamic data...... 360 11.2.28 Get ODE source terms...... 361 11.2.29 Get Reaction Rates...... 361 11.2.30 Advance Solver Constant Volume...... 362 11.2.31 Advance Solver Constant Pressure...... 362 11.2.32 Get Number of Reactions...... 363 11.3 Engine Only...... 364 11.3.1 Read Engine Inputs...... 364 11.3.2 Set Initial Temperature and Pressure...... 364 11.3.3 Set initial equivalence ratio...... 365 11.3.4 Set start and end of simulation...... 365 11.3.5 Get end of simulation...... 366 11.3.6 Get timestep length...... 366 11.3.7 Get current volume...... 367 11.3.8 Get volume at specific time...... 367 11.3.9 Set engine rotational speed...... 368 11.3.10 Initialise engine reactor simulation...... 368 11.3.11 Finalise engine reactor simulation...... 369 11.3.12 Set Fuel Composition...... 369 11.3.13 Set Oxidiser Composition...... 370 11.3.14 Set EGR mass fraction...... 370 11.3.15 Set Main Mixing Time...... 371 11.3.16 Set injection mixing time...... 371

c 2017 CMCL Innovations xvi User Manual v9.4.1, Build 01 CMCL < > Innovations CONTENTS

11.3.17 Set injection event data...... 372 11.3.18 Set entrainment rate (SI model)...... 372 11.3.19 Set Wiebe model parameters (SI model)...... 373 11.3.20 Set wall temperatures...... 373 11.3.21 Run over one time step...... 374 11.3.22 Get crank angle...... 374 11.3.23 Get Specific Heat Capacity at Constant Pressure... 375 11.3.24 Get Molar Fractions...... 375 11.3.25 Get Molar Mass...... 376 11.3.26 Get Heat Release Rate...... 376 11.3.27 Get Burned Fraction...... 377 11.4 Engine Only Post Processing...... 378 11.4.1 Get CAD at 10% heat release rate...... 378 11.4.2 Get CAD at 50% heat release rate...... 378 11.4.3 Get CAD at 90% heat release rate...... 379 11.4.4 Get Combustion Duration of heat release...... 379 11.4.5 Get maximum pressure rise rate...... 380 11.4.6 Get peak pressure...... 380 11.4.7 Get peak temperature...... 381 11.4.8 Get oxygen (mole fraction)...... 381 11.4.9 Get carbon monoxide (mole fraction)...... 382 11.4.10 Get carbon monoxide (grammes per hour)...... 382 11.4.11 Get carbon dioxide (mole fraction)...... 383 11.4.12 Get unburned hydrocarbons (mole fraction)...... 383 11.4.13 Get unburned hydrocarbons (grammes per hour)... 384 11.4.14 Get nitric oxides (mole fraction)...... 384 11.4.15 Get nitric oxides (grammes per hour)...... 385 11.4.16 Get nitric oxide (mole fraction)...... 385 11.4.17 Get nitric dioxide (mole fraction)...... 386 11.4.18 Get acetylene (mole fraction)...... 386

User Manual v9.4.1, Build 01 xvii c 2017 CMCL Innovations CMCL < > CONTENTS Innovations

11.4.19 Get soot mass (grammes per hour)...... 387

Appendices 388

A Troubleshooting 389 A.1 Ignition delay simulations...... 390

B Glossary 392

Bibliography 396

c 2017 CMCL Innovations xviii User Manual v9.4.1, Build 01 Part I

Getting started

User Manual v9.4.1, Build 01 1 c 2017 CMCL Innovations Set up

This section outlines the steps required to get you started in installing, licensing, and configuring thek inetics & SRM Engine Suite.

c 2017 CMCL Innovations 2 User Manual v9.4.1, Build 01 CMCL < > Innovations 1.1 Minimum requirements and prerequisites

1.1 Minimum requirements and prerequisites

Before installation of the kinetics & SRM Engine Suite users should ensure that their computer(s) meets the following hardware and software require- ments.

• Minimum of 1.0 GB of free memory (recommended 2.0 GB).

• Windows 7 Operating System (or later).

• Java SE Runtime Environment (Version 8.0 or later).

• Administration rights during the installation process.

• Microsoft MPI

1.1.1 Java installation

A properly configured Java SE installation must be present in order to install and use the kinetics & SRM Engine Suite. If users have a 64-bit operating system, it is strongly recommended that a 64-bit version of Java SE is installed, running 32-bit Java on a 64-bit system will disable the use of three dimensional visualisations within the kinetics & SRM Engine Suite.

The remainder of this section can be skipped if Java SE is already correctly installed.

Check whether Java is installed

If users are unsure as to the status of their Java installation, the following steps can be followed:

1. Open a command window (Windows Key + R, type ‘cmd’ and click ‘OK’). See Figure 1.1.

User Manual v9.4.1, Build 01 3 c 2017 CMCL Innovations CMCL < > 1 SET UP Innovations

Figure 1.1: Screenshot displaying the Run dialog

2. Type “java -version” at the command prompt and press ‘Enter’ on the keyboard. See Figure 1.2.

Figure 1.2: Checking the Java SE installation

If Java SE is installed, you should see a message similar to the one in Figure 1.2. i.e.“java version number” and “Java(TM) SE Runtime Environment”. In order for kinetics & SRM Engine Suite to run successfully, the Java SE installation must be build 1.8 or greater.

Install and configure Java

If required, please follow the steps below to install and configure Java Standard Edition (SE).

c 2017 CMCL Innovations 4 User Manual v9.4.1, Build 01 CMCL < > Innovations 1.1 Minimum requirements and prerequisites

1. Navigate to the Oracle JRE (Java Runtime Environment) down- loads page (located at http://www.oracle.com/technetwork/java/javase/ downloads/index.html).

2. Download and install the correct version of Java SE for your machine. Note that on the JRE Downloads page, 0x860 refers to 32-bit and 0x640 to 64-bit versions of Java SE.

If you have a 64-bit operating system, it is strongly recommended that a 64-bit version of Java SE is installed. Please consult the following article http://support.microsoft.com/kb/827218 if you are in doubt as to whether your operating system is 32-bit or 64-bit.

3. Configure your computer so that you can use the ’java’ command from any folder. You can do this using the PATH variable.

• Navigate to the Control Panel and select to view the items as icons. Load the System tool. Click Advanced System Properties (on the left hand side of the System tool). Navigate to the Advanced tab of the System Properties window and click the Environment Variables button. See Figure 1.3.

• Select the Path variable listed under System variables and click Edit. Modify the Variable value to append a semi- colon followed by the path of the Java installation, typically C:\Program Files (x86)\Java\jre7\bin. Click OK on the Edit System Variable, Environment Variables and System Proper- ties windows. See Figure 1.4.

• Restart the computer or log off and log on to push these changes to the path.

4. You should now be able to run “java -version” from the command prompt (see page3) to confirm that Java SE is correctly installed.

User Manual v9.4.1, Build 01 5 c 2017 CMCL Innovations CMCL < > 1 SET UP Innovations

Figure 1.3: Navigating to the Environment Variables button

c 2017 CMCL Innovations 6 User Manual v9.4.1, Build 01 CMCL < > Innovations 1.1 Minimum requirements and prerequisites

Figure 1.4: Appending to the path variable

User Manual v9.4.1, Build 01 7 c 2017 CMCL Innovations CMCL < > 1 SET UP Innovations

1.1.2 Multiprocessor support (MPI)

A valid installation of Microsoft MPI (MS MPI) must be installed and correctly configured if you wish to use the simulation running functionality of the kinetics & SRM Engine Suite. Please note that even if simulations are to be run without multi-processor support, MS MPI must still be installed on the local machine.

If MPI is already installed (and the local machine has been restarted) - you can skip the next section on MPI’s installation.

Installing MPI

The MPI installation package for Windows can be automatically installed via the kinetics & SRM Engine Suite installer. However, this installation can be performed manually via the steps outlined below.

1. Go to the central MS MPI site and download the latest version of the MS MPI Setup executable. (Note that the full MPI SDK is required if using the kinetics & SRM Engine Suite API, but is not needed otherwise).

2. Follow the steps outlined the MPI installer (If manually installing, admin- istrator privileges will be required).

3. Restart the local machine to ensure MPI is accessible to the kinetics& SRM Engine Suite.

Testing MPI

The MS MPI installation can be tested within the kinetics & SRM Engine Suite, or alternatively, this can tested manually:

1. Open a command line interface at any location on the local machine.

2. Run the ‘set MSMPI’ command

c 2017 CMCL Innovations 8 User Manual v9.4.1, Build 01 CMCL < > Innovations 1.1 Minimum requirements and prerequisites

3. Ensure that the command returns a line prefixed with ‘MSMPI_BIN’ that points to a valid location on disk (as seen in Figure 1.5). If this is not the case, please re-install MS MPI and restart the machine before testing again.

Figure 1.5: Testing the MPI installation

User Manual v9.4.1, Build 01 9 c 2017 CMCL Innovations CMCL < > 1 SET UP Innovations

1.2 Installation

To install the kinetics & SRM Engine Suite on your local machine:

1. Copy the kinetics & SRM Engine Suite installer to a temporary installa- tion folder on your local machine.

2. Run the installation executable with administrator rights. This will present the End User Licence Agreement and will guide you through the instal- lation processes. Please take care to read the licence agreement before continuing.

3. After successful installation, the installer provides the options to Open User Manual or Launch the kinetics & SRM Engine Suite.

4. You can now delete the original installation executable.

1.2.1 OS firewall settings

Your firewall may issue a warning about an executable named SRMDriver.exe with an "unknown" publisher when running simulations run via the kinetics & SRM Engine Suite. This is a key tool used by the kinetics & SRM Engine Suite and users should allow access to continue the simulation. Once permission has been granted, this error should not appear again.

1.2.2 Memory requirements

The kinetics & SRM Engine Suite attempts to reserve 1GB of initial memory as well as a maximum memory size of 3GB when it is launched, and will throw a Java Virtual Machine initialisation error if sufficient memory is not available. In this event, please try closing memory-intensive and/or non-essential programs before attempting to launch kinetics & SRM Engine Suite again.

c 2017 CMCL Innovations 10 User Manual v9.4.1, Build 01 CMCL < > Innovations 1.2 Installation

Alternatively, it is possible to specify a smaller initial/maximum memory heap by launching kinetics & SRM Engine Suite from the command line. java -Xms1024m -Xmx2048m -jar kinetics.exe

The above command must be run from the kinetics installation folder and in this example specifies a heap size of 1024 megabytes and a maximum heap size of 2048 megabytes. Please note that specifying a heap size less than 2048Mb is not recommended and may result in longer loading times and un- responsiveness. Additionally, failure to specify a reasonable maximum heap size may result in intensive memory usage during simulation runs.

1.2.3 Un-installation

The kinetics & SRM Engine Suite can be uninstalled from the machine us- ing either the standard uninstallation method for Windows Control Panel -> Programs and Features, or by executing the kinetics & SRM Engine Suite uninstaller found within the root of the Start Menu.

User Manual v9.4.1, Build 01 11 c 2017 CMCL Innovations CMCL < > 1 SET UP Innovations

1.3 Software license set-up

The use of kinetics & SRM Engine Suite is protected using a software licensing model which includes on-going communication between the installed software and with data stored on a USB (Universal Serial Bus) license dongle. Without the appropriate license dongle, it is not possible to use the software. Hence before attempting to run any simulations please ensure that the correct USB dongle has been provided by CMCL Innovations and correctly issued to your organisation.

Licensed USB dongles for kinetics & SRM Engine Suite are currently available in two formats:

• A local USB licence dongle Users can install the kinetics & SRM Engine Suite on as many machines as they wish. However, in order to run the software, the USB dongle must be plugged into the local machine.

• A network USB licence dongle Users can install the kinetics & SRM Engine Suite on as many machines as they wish. However, each machine must have access to the licence via the network and the total number of simultaneous users is limited to the number specified in the user license agreement.

Each license USB dongle is supplied attached to a keyring carrying a name tag. These names are unique to the USB license dongle and can be used to identify the dongles for software updates and support purposes. Please keep the name tag attached to the dongle at all times.

Please note: the licensing module of the kinetics & SRM Engine Suite will first check for a local USB licence dongle before looking for a network USB licence dongle.

c 2017 CMCL Innovations 12 User Manual v9.4.1, Build 01 CMCL < > Innovations 1.3 Software license set-up

1.3.1 Installing a USB licence dongle

Connect the USB license dongle to a functioning USB port. The USB license dongle will be auto-detected and will install itself.

1.3.2 Using a local USB licence dongle

Install a local USB licence dongle on the your machine using the description in section 1.3.1. The dongle must remain connected to the machine whilst the kinetics & SRM Engine Suite is running at all times. No other licence installation or setup is required.

1.3.3 Using a network USB licence dongle

The network USB licence dongle must be installed on a server machine, the client machine must be configured to communicate with the server. In the case that the client and server are the same machine, then the machine must be configured as both client and server.

Configuring the client machine

In most cases, kinetics & SRM Engine Suite will auto-detect the licence server on the network and no other licence installation is required.

If the kinetics & SRM Engine Suite cannot find the licence server, a configura- tion file must be provided on the client machine. The file should be created by the user with the following format.

[ddpro] server=: autodetect=FALSE or via the machine name as such

User Manual v9.4.1, Build 01 13 c 2017 CMCL Innovations CMCL < > 1 SET UP Innovations

[ddpro] server=: autodetect=FALSE

• Windows The file should be saved as CMCL.ini in the root of the kinetics & SRM Engine Suite installation folder (next to the kinetics.exe executable and the dpwin32 and/or dpwin64 DLLs).

Configuring the server machine

Install a network USB licence dongle on the server machine as per section 1.3.1. The dongle must remain connected to the machine whilst the kinetics& SRM Engine Suite is running.

Start the DinkeyServer software (provided with the kinetics & SRM Engine Suite installation) on the server machine. DinkeyServer will auto-detect any network (but not local) USB licence dongles attached to the machine. To check this, each licence found on the dongle is shown in the “Products” list.

DinkeyServer offers a number of configuration options. Users have the op- tion to configure the server as required, for example listening on a particular network device or specifying a custom port (see Figure 1.6).

DinkeyServer viewer The server also provides a viewer utility that can be used to monitor the num- ber of network users in real-time when DinkeyServer is running as a service (see Figure 1.7).

DinkeyServer command line usage

• Windows DinkeyServer and the viewer can be run via the command line, but still

c 2017 CMCL Innovations 14 User Manual v9.4.1, Build 01 CMCL < > Innovations 1.3 Software license set-up

launch various GUI windows. Run DinkeyServer.exe /? to display the command line syntax.

DinkeyServer firewall configuration Any active firewalls must be configured to allow both TCP and UDP traffic through to DinkeyServer, and to allow incoming connections on the IP ad- dress and port used by the server machine.

1.3.4 Swapping a USB licence dongle

The USB licence dongles are hot-swapable. They can be disconnected and reconnected to a machine without the need to eject them and without the need to restart the machine, subject to the following points.

• Any simulations that are using a dongle will terminate if a dongle is dis- connected whilst the simulation is running.

• It is recommended that the DinkeyServer application is restarted after swapping a network USB licence dongle.

1.3.5 Generating a diagnostic file for a USB licence dongle

The DinkeyChange software can be used to generate a diagnostic (*.dlpf) file for a USB licence dongle. Please follow the instructions below in the event that you need to send a diagnostic file to the CMCL Innovations support team.

1. Start the DinkeyChange software (provided with the kinetics & SRM Engine Suite installation).

2. Select the corresponding USB licence dongle.

3. Select the “Generate Diagnostics...” option from the Tools menu (see Figure 1.9). Save the *.dlpf file somewhere convenient then email it to the CMCL Innovations support team at [email protected]

User Manual v9.4.1, Build 01 15 c 2017 CMCL Innovations CMCL < > 1 SET UP Innovations

1.3.6 Updating a USB licence dongle

The licences on a USB licence dongle can be extended using DinkeyChange. In order to extend the license term, please contact a member of the CMCL Innovations support team.

It is likely that the support team will ask you to confirm the details of your current licence and to supply a Dinkey Update Code File (*.ducf file). The member of the support team will issue you with an Update File.

Please note that you will need to generate and send a diagnostic file of the active licence dongle when you request any licence update. This process is detailed in section 1.3.5.

Once you’ve received this file, the license can be updated by following these instructions below.

1. Start the DinkeyChange software (provided with the kinetics & SRM Engine Suite installation).

2. Select the corresponding USB licence dongle.

3. Select the "Open Update Code file" option from the File menu, navigate to and load the *.ducf file sent to you via email. See Figure 1.8(a).

4. Click the "Make changes to dongle" button. Once complete, a message should display a confirmation code. See Figure 1.8(b).

5. If the confirmation code does not match the code sent to you via email, please contact the CMCL Innovations support team.

c 2017 CMCL Innovations 16 User Manual v9.4.1, Build 01 CMCL < > Innovations 1.3 Software license set-up

Figure 1.6: Screenshots showing the DinkeyServer configuration process.

Figure 1.7: Screenshots showing the DinkeyServer viewer utility.

User Manual v9.4.1, Build 01 17 c 2017 CMCL Innovations CMCL < > 1 SET UP Innovations

(a) Opening an update code file. (b) A confirmation code.

Figure 1.8: Screenshots showing how to update a USB licence dongle using DinkeyChange.

Figure 1.9: Screenshot showing how to generate a diagnostic file for a USB licence dongle using DinkeyChange.

c 2017 CMCL Innovations 18 User Manual v9.4.1, Build 01 CMCL < > Innovations 1.4 Importing older projects

1.4 Importing older projects

As of v8.2.0 of the kinetics & SRM Engine Suite, the file structure of projects has been vastly updated to provide a hierarchical structure closer to the in- tended work-flow within the program and reduce memory usage. Future ver- sions of the kinetics & SRM Engine Suite will endeavour to provide support for opening (and where needed, automatically upgrading) projects created in v8.2.0 and later. However, due to the vast changes, projects created using v8.1.1 and earlier, cannot be converted automatically so please contact sup- [email protected] for assistance in updating these projects.

To ensure projects are kept up-to-date with the latest model parameters and di- rectory structure, it is highly recommended that customers switch to the newer versions of the kinetics & SRM Engine Suite as they are made available.

1.5 Contacting CMCL

In the event of encountering any difficulties in using the kinetics & SRM Engine Suite itself, or its underlying chemical models, please do not hesitate to contact the CMCL Support Team at [email protected].

To help the team understand your issue, it’s greatly appreciated if you can attach a copy of the soft-fail.log (found in your chosen workspace), and a com- pressed copy of your project folder, when contacting the support team. A compressed version of you project can be generated from within the kinetics & SRM Engine Suite by opening the project in question, then selecting the “Send Project to CMCL” option in the Help menu.

User Manual v9.4.1, Build 01 19 c 2017 CMCL Innovations Using kinetics & SRM Engine Suite

This chapter describes the features and work-flows of the kinetics & SRM Engine Suite, and provides tips on how to use the tool to its full potential.

c 2017 CMCL Innovations 20 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.1 First time set-up

2.1 First time set-up

The kinetics & SRM Engine Suite will display a Set-up Menu (see Figure 2.1) when it is first run by a new user. The menu allows users to set up the tool to their specific needs. It will ask the user to chose a location for the Workspace Folder (which will be used to store projects), and it allows users to test their MS-MPI installation.

Figure 2.1: First time set-up menu

The Workspace Folder may be a new folder, or an existing folder that already contains some kinetics & SRM Engine Suite projects. It is recommended that each workspace is either user specific or only accessed by one user at any given time. It is also important to ensure that each user has full read/write access to the Workspace Folder. In the event that the kinetics & SRM Engine Suite cannot find the Workspace Folder, it will present the First Time setup menu again.

User Manual v9.4.1, Build 01 21 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

2.2 Creating a project

Once the setup is complete, the kinetics & SRM Engine Suite will display the Welcome Menu (see Figure 2.2).

Within the Welcome Menu, new projects can be created from scratch via the ‘New Project’ button and external projects can be copy into the workspace for editing via the ‘Import Project’ button.

Figure 2.2: Welcome menu

Any existing user-created projects will appear in the ‘Workspace Projects’ list. The ‘User Projects’, ‘Tutorials’, ’Reactor Examples’ and ’Engine Examples’ tabs at the bottom of the window may be used to switch between displaying user projects and the tutorial and example projects supplied with the kinetics & SRM Engine Suite. Reactor/Engine examples are recommended as a good starting point for most projects. Double click on any item in the list to open it in the Project Window.

c 2017 CMCL Innovations 22 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.3 Project structure

When a project is opened, it will be displayed in the main Project Window. The structure of the project and how to use the Project Window is explained in Section 2.3 and Section 2.4.

2.3 Project structure

The simulations within each project are grouped in a hierarchical structure con- sisting of Parent Cases and Child Cases (an example can be seen in Figure 2.3 below). This structure is mirrored by the file structure of the project within Workspace Folder and is explained in more detail below.

Figure 2.3: Simulation hierarchy

2.3.1 Parent Cases

Each project may contain one or more Parent Case simulations, where each Parent Case may use any one of the available reactor or engine models. Each

User Manual v9.4.1, Build 01 23 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

Parent Case defines the chemical mechanism to be used and values of all inputs required to run a simulation.

A Parent Case can be created and executed as a single simulation in itself, or can be used as a base for various sub-cases. Detailed information about how to specify parameters for a Parent Case is given in Section 2.5.

2.3.2 Child Cases and Analysis Tools

Each Parent Case may contain any number of Child Cases. These inherit the simulation inputs from their Parent Case, except for individual differences specified by the user. Child cases provide an easy method to manually explore the response of a model to variations in individual parameters.

For example, a Parent Case could be created to represent a single engine cylinder that simulates as intended; the effect of Initial Temperature on the output pressure profile could then be determined by creating 10 new Child Cases, each slightly adjusting the Initial Temperature parameter.

Likewise, various Analysis Tools may be applied to the Parent Case to perform parametric Sensitivity Analyses, execute Design of Experiments, view Path- way Visualisations, or generate Particle Animations.

Detailed information about how to set up Child Cases and the Analysis Tools is given in Section 2.6.

c 2017 CMCL Innovations 24 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.4 Using the Project Window

2.4 Using the Project Window

Projects may be managed using the Project Window. This contains all the controls needed to navigate to each module of the tool as well as options to save, open, export, or create new projects. See Figure 2.4 for a breakdown of the Project Window.

Figure 2.4: The Project Window

• Welcome Screen: Discard project changes and return to the Welcome Screen.

• User Manual: Open the User Manual document.

• Open Project: Browse to, and open an existing project.

• New Project: Create and open a new project.

• Save Project: Save the current project.

User Manual v9.4.1, Build 01 25 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

• Export Project: Save the current project, export a copy, and open the exported copy.

• Run Simulations: Run currently selected simulations.

• Stop Simulations: Terminate currently executing simulations.

• Licence Details: Shows current licence details.

• Project Tree: Navigate through the various features, menus, and tools within the kinetics & SRM Engine Suite. Each of the options in this tree are further detailed in the sections below.

• Output Terminals: View informational messages from the kinetics & SRM En- gine Suite, and real-time output from simulations.

2.4.1 Import External Data

This panel allows users to import experimental data into the tool for later use in post-processing and/or live visualisations. For more information on adding experimental data, please see section 2.7.1.

2.4.2 Import, Export & View Mechanisms

The integrated mechanism viewer is designed to store, handle and view reac- tion mechanisms in a structured, organised and user friendly manner. It is the central repository for all mechanisms available within the kinetics & SRM En- gine Suite and is user accessible via the "Import & View Mechanisms" menu item. Figure 2.5 shows the initially appearing mechanism explorer with a set of registered reaction mechanisms.

Importing Mechanisms

Currently, the kinetics XML and CHEMKIN (IV) syntax are the only supported input formats. Both formats define the element, species and reaction data

c 2017 CMCL Innovations 26 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.4 Using the Project Window

Figure 2.5: Mechanism viewer. Registered reaction mechanisms are pre- sented in the table (top panel) and additional information for a selected mechanism is provided in the bottom panel. required by kinetics. The recommended file encoding for mechanism input files is UTF-8. CHEMKIN-format mechanisms can be provided using either single files or multiple files (i.e. separate files for thermodynamic and transport data, surface and gas-phase reactions).

All mechanisms are validated when they are imported. A detailed log file is produced during the importation. This provides full details of the data that has been read from the mechanism, in addition to diagnostic information and warnings about any problems with the mechanism. In order to ensure reverse compatibility, the mechanism viewer stores the original source files alongside the processed mechanism. Outdated files are automatically identified and up- dated when starting the mechanism viewer for the first time, including after updating to later versions of kinetics. Note that this process may take some time if you have a large number of mechanisms.

User Manual v9.4.1, Build 01 27 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

After importing a mechanism, the user receives a notification to confirm whether the process has been successful. In the event that a mechanism could not be imported, the import log will be displayed in the mechanism viewer. The log can be used to identify and correct any problems in the input files. Note that it is recommended to remove the unsuccessfully im- ported mechanism before re-importing it. Figure 2.6a shows the mechanism explorer, including the file viewer, after a failed importation attempt of mech- anism c3oh_49_invalid. A brief explanation of the source of the error is illustrated in Figure 2.6b.

Exporting Mechanisms

Any registered mechanism, i.e. successfully imported or not, can be exported to a user defined location. All data stored in the repository associated with the selected mechanism and a self-contained mechanism register are exported to the defined location. Note that exporting a mechanism to a location where a register is already present, results in the registration of the mechanism in the available register rather than generating a new one.

Using a Mechanism for Simulations

Once a mechanism has been successfully imported, users can choose to make use of this mechanism in Parent Case simulations. For information on how to specify a mechanism for use in simulations, please see section 2.4.7.

Viewing Mechanisms

The presentation of mechanism data is organised into views related to ele- ments, species, reactions and meta-data. The following paragraphs of this section provide a brief description of the different views.

c 2017 CMCL Innovations 28 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.4 Using the Project Window

(a) Mechanism viewer explorer after a failed importation attempt.

CHEMKIN Source file IC3H5O2HCHO CH2CCH2OH TC4H8CHO O2C4H8CHO O2HC4H8CO C3H5OH TIC4H7Q2-I IIC4H7Q2-T IIC4H7Q2-I CH2O2H NC3H7OH C2H3OH C3H6OH-3 C3H6OH-2 C3H6OH-1 !IC3H7OH IC3H6OH Commented required species END REACTIONS H+O2<=>O+OH 3.547E+15 -0.406 1.660E+04 REV/ 1.027E+13 -0.015 -1.330E+02 /

Import log file Reading data for reaction 1414 from line 2999 of "source_chemistry.inp": ERROR: Cannot interpret "IC3H6OH". Generated error message ERROR: Cannot read line "IC3H6OH<=>C2H3OH+CH3 2.689E+09 1.319 2.948E+04" for reaction 1414 on line 2999 of "source_chemistry.inp". Equation <=> CH3 + C2H3OH Forward rate coefficients A 2.68900000E+09 mol/cm3/K1.319/s n 1.31900000E+00 - E 1.23344320E+12 erg/mol Reverse rate coefficients A 1.89000000E+03 cm3/mol/K2.67/s n 2.67000000E+00 - E 2.86604000E+11 erg/mol ERROR: Error occurred whilst reading reaction 1414 (data read from lines 2999-3000 of "source_chemistry.inp"). See above for details. (b) Snippets from the integrated file viewer.

Figure 2.6: Failed importation of a mechanism. The red line in the CHEMKIN source file indicates the manually introduced error and the red line in the generated import log file alerts the user to the source of the issue.

User Manual v9.4.1, Build 01 29 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

Summary Figure 2.7 presents an example summary, consisting of the mech- anism name, the number of elements, species and reactions, and a de- scription of the mechanism, for the selected gas-phase detailed gasoline mechanism. Additional meta-data are presented for mechanisms considering surface chemistry. This includes a separation of the number of species and reactions into gas-phase and surface species and reactions and the number of phases and materials.

Figure 2.7: Summary of the selected reaction mechanism.

Elements Figure 2.8 shows the elements explorer listing all considered ele- ments in the reaction mechanism, including their atomic weight in g mol−1 and any comment associated with a defined element.

Species The species explorer is shown in Figure 2.9 and lists all species registered within the selected reaction mechanism. The explorer consists of a column for the species name, the molecular mass in g mol−1, the associated material and phase, an overall comment and one related to its thermodynamic properties.

Furthermore, individual species can be viewed in detail by either clicking on

c 2017 CMCL Innovations 30 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.4 Using the Project Window

Figure 2.8: Mechanism viewer elements explorer.

Figure 2.9: Mechanism viewer species explorer. the eye symbol in the explorer or by double-clicking an entry. Figure 2.10 shows the detailed view of O2 from the ethanol mechanism. This view in- cludes species relevant properties such as its name, the associated material and phase, the elemental composition and the thermodynamic data in the form of NASA7 polynomial coefficients. A list of reactions containing the selected

User Manual v9.4.1, Build 01 31 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations species is additionally provided. Although not shown in Figure 2.10, transport and surface chemistry related properties are also visualised if present.

Figure 2.10: Mechanism viewer detailed species information panel.

Reactions The reactions explorer, as shown in Figure 2.11, presents all re- actions defined within the selected reaction mechanism. The columns define a unique reaction identifier, as defined in the XML file of the mechanism, the reaction equation, the associated material (i.e. the gas-phase is treated as a material to indicate the association of the reaction to the gas-phase), icons indicating whether the reaction is reversible, is a Landau-Teller, a third body, a fall-off or a surface reaction or has coverage dependence parameters, and a comment.

Similar to the detailed species view, a reaction view of associated parameters is available via the eye symbol or by double-clicking on the reaction entry. An example of a detailed reaction view is shown in Figure 2.12. Reaction specific parameters include Arrhenius parameters and their units, the stoichiometry and the reaction type itself.

c 2017 CMCL Innovations 32 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.4 Using the Project Window

Figure 2.11: Mechanism viewer reactions explorer.

Figure 2.12: Mechanism viewer detailed reaction information panel.

Thermodynamics & Reaction Energetics

Thermodynamic properties and reaction energetics of selected instances (i.e. species and reactions) can be listed in tabular form for specified temperatures

User Manual v9.4.1, Build 01 33 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations or plotted. The selection is performed via the species and reactions explorer by clicking on the plotting symbol. Temperature points may be added or removed via the temperature settings explorer. Figure 2.13 shows tabulated thermody- namic properties for O2, CH4,C2H4 and HOC2H4O2 while Figure 2.14 shows the same data in plotted form.

Figure 2.13: Tabulated thermodynamic properties of selected species.

Activity Logs

Activity logs are essential for customer support to track warnings and errors experienced by the user. Figure 2.15 shows the explorer used to manage these activity logs. Note that the tab containing the activity log explorer is disabled by default and one has to enable it by clicking the checkbox at the bottom left corner of the mechanism explorer (Figure 2.5).

2.4.3 Injection map interpolation

The Injection Map Interpolator panel (as shown in Figure 2.16 enables users to interpolate an injection profile from a single injection rate shape map or

c 2017 CMCL Innovations 34 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.4 Using the Project Window

Figure 2.14: Plotted thermodynamic properties of selected species.

Figure 2.15: Mechanism viewer activity logs. from two different injection rate maps (inputs marked with an asterisk below). The inputs required to calculate an injection profile from said map(s) are the following:

• Flag to switch between single injection rate map interpolation or dual

User Manual v9.4.1, Build 01 35 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

injection rate map interpolation. If this flag is enabled* then the user will need to provide two injection rate maps, their injection rate values and the desired injection rate for the interpolated profile.

• Location of the injection rate shape map(s*). Please read the next sub- section Injection rate shape map input requirements carefully to ensure compatibility of the input map with the Interpolator. This can be provided via either:

– A Microsoft Excel spreadsheet following Siemens AMESim format.

– A folder which contains a set of CSV files equivalent to the afore- mentioned spreadsheet (in RFC4180 format).

• Injection rate for map 1*. Injection flow rate for the data contained in map 1, measured in cubic centimetres per minute.

• Injection rate for map 2*. As above for map 2.

• Required injection rate*. Desired injection rate for the interpolated output profile.

• Location and name of the output CSV file which will contain the interpo- lated profile.

• Convention for the start of injection (named "Immediate SOI"). If this flag is enabled, fuel will be injected immediately after SOI; if it is disabled, there will be a delay between SOI and the moment when fuel starts flowing through the injector, as reflected in the rate shape map.

• Start of Injection value (in CAD aTDC).

• Rail Pressure (in MPa). The chosen value must be within the limits of the data provided in the input map. Extrapolation is not supported and the value will be capped at either the maximum or minimum pressure, as required, included in the input map.

c 2017 CMCL Innovations 36 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.4 Using the Project Window

• Fuel Quantity (in mm3). Amount of injected fuel required by the ECU. The Interpolator will optimise the interpolated injection profile so that the amount of fuel delivered by the profile matches exactly the required fuel quantity. Please ensure that the required fuel quantity is within the limits of the fuel delivery for a given rail pressure contained in the input map data. Extrapolation is not supported.

• Density (in mg/mm3). Fuel density at the temperature of the fuel in the injection line.

• Engine RPM.

Figure 2.16: Using the injection rate shape map interpolator

Injection rate shape map input requirements

The injection rate shape map contains the experimental data collected for a given injector tested under different rail pressures and injection durations by the manufacturer. It can be extracted directly from the experiments or it can be the output of a third party model of said injector. Fundamentally, it consists of four dimensions: rail pressure, injection duration, time and flow rate. The last two dimensions constitute individual profiles for a given rail pressure and

User Manual v9.4.1, Build 01 37 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations injection duration. The Interpolator allows the user to input these maps either as a Microsoft Excel spreadsheet or as a set of CSV files. The requirements for both inputs will be described next:

MS Excel Spreadsheet This is the most compact and convenient way of in- putting an injection rate shape map to be used by the Interpolator. It has the following requirements:

• Each sheet should contain data for a single rail pressure and it should be labelled with the value of that rail pressure in MPa as per Figure 2.17. For each sheet, the first five rows are header rows and all the rest are data rows. These can be seen in the example input file shown in Figure 2.18. The content of each row is described next: Row 1 contains the rail pressure. This is a duplicate of the sheet name specified in Figure 2.17 but serves as a safeguard against undesired copy-paste events or wrong order in the in- put data. Row 2 includes the injection duration values for each column of flow rate data. Row 3 represents the total fuel delivered by each column of flow rate data (i.e. injection profile). It is obtained by integrating the area under the curve formed by: the flow rate data column in question versus the first column of the sheet, the time values column. The Interpolator performs this integration itself so this row can be populated with zeros if the user does not have the integrated fuel delivery values. Row 4 is a header row which explains that the first column is the independent variable time, common to all data in the sheet. All remaining columns are the dependent variable flow rate for a given duration within the rail pressure of the sheet. Row 5 is a header row which contains units. Time must be in mi- croseconds and flow rate must be in mm3/ms. The Interpolator

c 2017 CMCL Innovations 38 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.4 Using the Project Window

does not read this row and does not convert units so the user must use the aforementioned units. Row 6 to end These are the data rows. Only numeric values can be present in the cells. Formulas are not supported. The deci- mal delimiter is a point («.»). Scientific notation is allowed with the use of E .

• There must be an equal number of data points for all injection du- rations within a given rail pressure. That is, all sheets must have a square matrix in them.

• Different sheets need not have the same number of rows.

• Charts can be present in any or all of the sheets and do not need to be deleted.

CSV files Each sheet from the Excel input mode described above can be seen as an individual CSV file. If the user prefers to input the injection rate shape map as a set of individual CSV files, these must:

• All be located in a single folder with nothing else in that folder

• Be comma separated value files and not use any other type of de- limiter other than commas.

• Be named following the same convention as the sheets in the Excel spreadsheet. That is, the rail pressure, followed by a space and ‘MPa.csv’.

• The exact same rules about the content of the files which were detailed for each of the sheets in the Excel workbook are applicable to each of the individual CSV files.

Figure 2.17: MS Excel: sheet labels denoting rail pressure in MPa

User Manual v9.4.1, Build 01 39 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

Figure 2.18: MS Excel: first seven rows of an example injection rate shape map

Interpolation details

The interpolation methodology chosen for this application has been imple- mented ensuring that it preserves the injection profile shape of the adjacent profile datasets. Figure 2.19 shows a simplified example of why event-based interpolation is important. Standard linear interpolation of the injection profiles as they are presented against time can create incorrect gradients, typically on the back slope of the rate shape. This is because in certain regions, such interpolation would be trying to interpolate between the zero flow rate of one rate shape and the non-zero flow rate of the other rate shapes. This is shown over the second half of profile 2 in Figure 2.19, where standard interpolation would simply average the value of profile 2 with zero. However, the intelligent event-based interpolation included in the kinetics & SRM Engine Suite will normalise the profiles before interpolating them and then re-map the results to the exact duration that guarantees adequate fuel delivery, as input in the Fuel Quantity field. A minimisation routine has been included in the Interpolator code to achieve the desired fuel quantity.

2.4.4 Adding a Simulation

New Parent Cases can be created and added to the current project at any time through the use of the ‘Add Parent Case’ menu within the project tree. Newly created Parent Cases will be pre-populated with default input parameters de- signed for that Parent Case’s chosen model.

This menu (as seen in Figure 2.20), allows you to select a name and descrip-

c 2017 CMCL Innovations 40 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.4 Using the Project Window

Figure 2.19: Example of the event-based interpolation implemented for the injection profiles tion of the new Parent Case along with which model type the case should represent.

Figure 2.20: Creating a new Parent Case

User Manual v9.4.1, Build 01 41 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

Once created, this new Parent Case will be added to the project structure as a stand-alone simulation (i.e. it will not contain any sub-cases/analysis tools by default), and it can then be executed via the “Simulation Controls” menu.

2.4.5 Simulation Controls

The “Simulation Controls” panel provides an interface to specify which cases should be executed within the next simulation batch along with what conditions they should be simulated under (e.g. in serial, parallel, under MPI).

As seen in Figure 2.21, the Simulations Controls menu presents two panels allowing the user to specify the settings under which their simulations will ex- ecuted, and what Parent Case, Child Case, or Analysis Case simulations will be executed.

Figure 2.21: Running simulations

The controls contained within the “Simulations Settings” panel allow users to specify the conditions that the selected simulations will be executed under. Each of these is explained in turn below:

c 2017 CMCL Innovations 42 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.4 Using the Project Window

• Parallelisation Method: This control allows users to choose when sim- ulations should be executed and contains the following options:

None (Serial): Sequentially run simulations one after another on a single CPU core.

Parallel Batches: Simulations are run in parallel, each on a separate core (up to a maximum batch number).

Multi-Process: Sequentially run single simulations that are split into multi- thread processes via MPI (requires Microsoft MPI to be installed and correctly registered).

• Live Visualisations: Enables/disables real-time visualisations (see sec- tion 2.4.6 for more information).

Once the overall simulation conditions have been selected, the simulation tree on the right hand-side of the “Simulation Controls” menu allows users to choose which simulation cases should be included in the next batch of execu- tions. Cases are grouped within this tree to reflect their hierarchical structure (see section 2.3 for more information), and each case is coloured to represent their current state. Cases can be selected individually, via their containing Parent Case, or via their state (using the controls seen in Figure 2.22) each of which is detailed below:

• Out of Sync: Since their last execution, the input parameters for these simulation cases have been changed, causing their previous outputs to become “Out of Sync” with their current inputs.

• Not Run: These simulation cases have not yet been executed.

• Failed: These simulation cases have been run, but failed (or been ter- minated) at some point during their execution.

• Complete: These simulation cases have been run to successful com- pletion.

User Manual v9.4.1, Build 01 43 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

Figure 2.22: Selecting simulations via state

During simulation executions, real-time progress monitoring is provided by two progress bars in the bottom right of the Project Window. Additionally, users can choose to switch to a “Mini-View” to track simulation progress whilst using other applications (as seen in Figure 2.23).

Figure 2.23: Simulation mini-view

2.4.6 Live Results

The Live Results menu allows users to see basic output data from their sim- ulations progress on a two-dimensional plot in real-time. If applicable for the Parent Cases currently selected, Live Results can be enabled in the Simulation Controls panel.

Once live results have been enabled, and simulations started, switching to the “Live Results” menu in the project tree will allow users a real-time view of their simulation outputs along with the option to switch between commonly viewed output variables. Note that additional external data can be added to the visualisation using the “Add External Data” button providing data has been imported prior to starting the current simulation batch. External data can be

c 2017 CMCL Innovations 44 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.4 Using the Project Window deleted from the “Live Results” panel by selecting the entry to be deleted and hitting “Delete”.

Figure 2.24: Viewing live results

Please note that for Live Results to be able for selection, certain simulation criteria must be met. This criteria are listed below.

• Simulations within the current batch must fall into one of the following model types/categories:

Any Engine

Any Non-Adiabatic Closed Reactor

Any Open Reactors

Plug Flow Reactors

Cetane Number Reactor

Non-Reactive Turbulent Mixer

• All simulations in the current batch must fall under the Engine or Reactor model type. Simulations batches that contains a mix of Engines and Reactors will produce differing format output files and thus cannot be plotted together within the Live Results panel.

• There must be no more than 10 parallel simulations within the current batch.

User Manual v9.4.1, Build 01 45 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

2.4.7 Parent Case Settings

Once a valid mechanism has been imported from an external source (or an internal mechanism chosen), you can specify that a mechanism should be used within a particular Parent Case via that Parent Case’s Settings panel (accessed by selecting that Parent Case in the project tree). Simply select- ing a mechanism then hitting the ‘Use Selected Mechanism’ button will ensure that the mechanism will then be used in simulations for that Parent Case as well all sub-cases contained within that Parent Case (Child Cases, cases gen- erated by Design of Experiments and Sensitivity Analyses, etc.). An example of selecting a mechanism for use can be seen in Figure 2.25.

However, please note that changing the mechanism for a Parent Case may remove any species in that case’s compositions that no longer exist in the new mechanism. Please remember that all compositions should be manually checked after changing a mechanism to ensure their mass fractions still sum to unity.

c 2017 CMCL Innovations 46 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.5 Simulation Inputs

Figure 2.25: Choosing a mechanism

2.5 Simulation Inputs

Once a valid Parent Case has been created and linked with a mechanism, the kinetics & SRM Engine Suite provides a variety of menus in the main tree to specify the simulation’s input parameters grouped by topic and model. Each Parent Case model type presents a different group of input parameter menus depending on whether they are valid for the current Engine, Tank Reactor, Plug Flow, etc; each of these menus is detailed in the sections below.

User Manual v9.4.1, Build 01 47 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

2.5.1 General Settings

The General Settings panel contains controls to specify input parameters per- taining to the simulation as a whole. Options such as the chemical solver, number of particles, simulation length, and number of cycles, can all be found within this panel.

Note that different solvers are more efficient when used with differing toler- ances, to this end CMCL Innovations has provided a set of recommended tolerances for each chemical solver. To select these tolerances, just hit the “Reset Tolerances” button within the General Settings panel (as seen in Fig- ure 2.26).

Figure 2.26: General Settings panel

c 2017 CMCL Innovations 48 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.5 Simulation Inputs

2.5.2 Output Settings

The reduce the amount of disk output handled by the underlying simulations, the Output Settings panel allows you to specify which output files are gener- ated throughout the course of the current Parent Case’s (and its sub-cases) simulations. Each optional output file can be turned on/off using the drop-down controls seen in Figure 2.27.

Additionally, the Output Settings panel also allows you to specify which species in the current mechanism should output particle files (see Figure 2.28). Op- tions for particle outputs include no species, default species (CO, OH, O2, H20), user chosen species, or all species within the mechanism

Please note: Choosing to output a large amount of species may significantly reduce the speed of simulations.

Figure 2.27: Output Settings panel

User Manual v9.4.1, Build 01 49 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

Figure 2.28: Specify Particle Outputs

c 2017 CMCL Innovations 50 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.5 Simulation Inputs

2.5.3 Geometry

The Geometry panel allows you to specify the physical details of your reactor or engine cylinder. Reactors only require a single input: the reactor volume. For engines, there are five parameters and two conventions that uniquely de- fine the basic engine cylinder geometry required by the kinetics & SRM Engine Suite. These are:

Bore Cylinder bore.

Stroke Cylinder stroke. In cases where the wrist pin offset is non-zero, please read the last three items of this list and observe the diagram in Figure 2.29.

Connecting Rod Length Connecting rod length between the centres of the rod and piston-pin bearings

Compression Ratio Ratio of the maximum cylinder volume divided by the minimum cylinder volume. Please note that in non-zero wrist pin off- set cases, this value is not necessarily equal to the ratio of volume at 180CAD to cylinder volume at 0CAD because maximum and minimum volume are not 180 degrees apart.

Wrist Pin Offset Wrist pin offset relative to the crankshaft axis when the wrist- pin bearing position on the piston end is projected towards the crankshaft on a line parallel to the cylinder axis (positive to the major thrust side). Please observe Figure 2.29. If This value is equal to 0.0, the follow- ing two conventions are not pertinent. In all other cases, please read carefully the following two points.

TDC Convention Flag Convention used to specify the definition of "TDC" or "Top Dead Centre" when Wrist Pin Offset is not equal to 0.0. This is needed because the piston is not at its true top position when the crank throw is vertical. The main implication of this setting is that timings (valve timings, injection timings, spark timings, simulation start and end timings,

User Manual v9.4.1, Build 01 51 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

etc.) all depend on the 0.0 angle of the cylinder, usually associated with TDC.

Minimum Volume Piston Travel +Wrist Pin Offset

Con Rod Length

CAD

Crank Radius

Figure 2.29: Geometry Parameters

• Crank Position: indicates that the angle 0.0 occurs when the crank throw is parallel to the cylinder bore axis and at its top position. In Figure 2.29 this happens when CAD=0. For a positive Wrist Pin Offset, minimum value will occur before 0.0.

• Piston Position: defines the 0.0 angle when the piston is at its max- imum position of travel, in other words, when the cylinder volume is minimal.

c 2017 CMCL Innovations 52 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.5 Simulation Inputs

Stroke Convention Flag Convention used to clarify the input of the stroke value. This is important because when a non-zero Wrist Pin Offset is present, the true distance travelled by the piston (true stroke) is greater than twice the crank throw.

• 2xRadius: Indicates that the stroke length input value is equal to twice the crank radius.

• True Stroke: Denotes that the stroke length input value is the dis- tance travelled by the piston between the points of maximum and minimum volume.

2.5.4 Initial Mixture

The Initial Mixture panel contains controls to specify the fuel and oxidiser com- positions that will constitute your engine/reactors initial mixture. This panel is separated into differing sub-panels (via the use of tabs), each of which is detailed below.

Compositions

The Initial Mixture panel contains controls to specify both the initial Fuel and Oxidiser compositions for your simulation (see Figure 2.30). Custom compo- sition setup can be carried out by switching to either the ‘Fuel Composition’ or ‘Oxidiser Composition’ panels, these panels contain controls to add new species, specify Mass or Mole fractions, and automatically normalise the com- position. A visualisation of the current composition’s mass fractions (providing it sums to unity) can also be seen if desired.

Complete compositions can also be imported from CSV files using the ‘Import Composition from CSV’ button. In this case, the source CSV must be un- headered and contain two equal length columns; the first listing species names and the second listing mass fractions.

As an additional feature, cases using any CMCL provided Internal Mechanism

User Manual v9.4.1, Build 01 53 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations can make use of recommended compositions. Simply hit the ‘Reset to Default Composition’ button to apply the recommended mixture.

Note that a separate Fuel composition does not need to be defined if the “Fuel Equivalence Ratio (Engines)” is set to 0.0.

Figure 2.30: Creating an initial mixture

EGR

Exhaust gas recirculation (EGR) influences the combustion characteristics, engine performance and emissions in three distinct ways:

• Dilution effect

• Thermal effect

• Chemical composition

The dilution and the thermal impact of EGR is accounted via the "General Settings" tab in the "Initial Mixture" menu, through "Fuel Air Equivalence Ra-

c 2017 CMCL Innovations 54 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.5 Simulation Inputs tio (Engines)" and "Initial Temperature" variables respectively. The chemical composition of the EGR stream on a cycle-to-cycle basis is now discussed.

To set up the EGR stream, set "Use EGR" to "Yes".

By default, the "Auto-generate" option is chosen for the Initial Cycle. Set the external EGR mass fraction, for example, set as 0.2 (20% EGR), as shown in Figure 2.31 below. In addition, the residual burned mass fraction can either be calculated or set manually. In Figure 2.31 below it is set manually to 0.01 (1% EGR). Note however when using the breathing model only external EGR is required as the internal EGR is already accounted for in the simulation. The auto-generated EGR employs the equilibrium solver to equilibrate the compo- sition of the EGR stream based on the initial temperature, initial pressure and the fuel and oxidiser species specified within "Initial Mixture" menu.

Figure 2.31: Setting up the EGR composition

The user can impose the EGR composition in the initial cycle by selecting the "User-defined" option (see Figure 2.32). For this specific option, the EGR species mass fractions need to be set either directly in the GUI or supplied using the "Import from EGR" button that reads the InputComposition.egr file from the individual "ParentCase" sub-folder within the users’ workspace. A snapshot of the two-columned, un-headered, TAB separated InputComposi- tion.EGR file is given in Figure 2.33.

If running multiple cycles, then by default the Subsequent Cycles can be set to "Use composition from initial cycle" and for Pre-processing, the "Use as is"

User Manual v9.4.1, Build 01 55 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations option.

[Note: If more than one cycle is simulated, then set "number of cycles" ("Gen- eral Settings") to a value greater than 1].

Figure 2.32: EGR composition for the initial cycle

For the Subsequent cycles, the user can also choose to "Update EGR from cycle to cycle as shown in Figure 2.34. In this case, the species composition at EVO from a cycle will be utilised to specify the composition of the subsequent cycle. Furthermore, pre-processing can be applied to the Subsequent cycles on a "As is" basis or can be "equilibrated" based on initial temperature and initial pressure, or just "Major species only" can be used.

Particle Ensemble

The Initial Mixture panel also allows users to specify an Input Particle Ensem- ble file, defining the particle ensemble at the start of simulations. Once the ‘Impose Particle Ensemble’ option is enabled, users can switch to the ‘Particle Ensemble’ panel to import a particle ensemble file from an external CSV or generated a blank ensemble file ready for user input (Figure 2.35).

2.5.5 Direct Injection

The Direct Injection panel allows users to enable, and specify parameters for, the kinetics & SRM Engine Suite’s direct injection model. Once the model is

c 2017 CMCL Innovations 56 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.5 Simulation Inputs

Figure 2.33: An example of the InputComposition.egr file format enabled, users can choose their desired injection model (Physical, PDF Spray, or PDF Spray & Wall)).

An injection profile can also be defined in this panel (in the form of Pulse Injections or Injection Rate) and visualised as seen in Figure 2.36. Users can also choose to inject the initial fuel mixture during direct injection (see 2.5.4) or define a new fuel mixture used specifically during the direct injection phase.

This feature is particularly useful for simulating engines with multiple fuels. For example, for the simulation of a dual-fuelled engine run with port injected natural gas and direct injection of Diesel; a user would use the initial fuel and the equivalence ratio to specify the conditions for the port fuel injection and

User Manual v9.4.1, Build 01 57 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

Figure 2.34: EGR composition for the subsequent cycles

Figure 2.35: Generating an input particle ensemble then use the "Direct Injection" and "Injection Fuel" tabs to set the conditions for the direct injection of Diesel.

c 2017 CMCL Innovations 58 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.5 Simulation Inputs

Figure 2.36: Specifying an injection rate profile

2.5.6 Heat Transfer

The Heat Transfer menu allows users to enable, and specify parameters for, the stochastic Heat Transfer sub model. The default values for the stochastic heat transfer constant and the mass factor for the heat transfer are displayed. The average piston, liner and the cylinder head surface temperatures are set and held constant throughout the simulation. Two empirical expressions based on the Woschni (see Section 7.3.7) and the Hohenberg heat transfer coeffi- cient are available for selection.

2.5.7 Turbulent Mixing

The Turbulent Mixing panel allows users to enable, and specify parameters for, the available Turbulent Mixing models (Figure 2.37).

It is recommended that the users review the technical terms such as mixing rate, mixing time, turbulence time scale, mechanical-to-scalar time scale, etc., used within the various mixing models, as explained in detail in Section 7.3.9.

Three model options as displayed in Figure 2.38 are available to specify the

User Manual v9.4.1, Build 01 59 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

Figure 2.37: Turbulent mixing models turbulence timescales as explained in Section 7.3.9.

When the user-defined timescale option is selected, the mixing profile (timescale vs. CAD) needs to be specified, either through the graphical user interface provided (see Figure 2.39) or via an external file in CSV format. The profile can be modified based on the individual entries in the table under the tab, Mixing Values. The resulting profile is also displayed within the "Visuali- sation" tab.

2.5.8 Boundary Layer Zones

The Boundary Layer Zones panel allows users to enable, and specify param- eters for, the multizonal boundary layer model (Figure 2.40).

This model utilises a multi-zonal approach to describe the cylinder charge. It splits the domain into the Bulk Zone (Zone #1) and the Boundary Layer Zone (Zone #2). It is intended to improve the quality of the emissions predicted by the kinetics & SRM Engine Suite by having a much colder region where particles with a significant equivalence ratio are not able to burn due to the low

c 2017 CMCL Innovations 60 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.5 Simulation Inputs

Figure 2.38: Turbulent mixing timescales temperatures. When using the Boundary Layer Zones option, it is important to note that the GUI automatically changes the Heat Transfer model and the Crevice model to their respective zones-aware options.

There are three main settings that users may adjust to change the behaviour of and the results produced by a zonal boundary-layer simulation:

The relative number of particles. Assigning more particles to either the Bulk (#1) or the Boundary Layer (#2) zones increases the refinement with which the chemistry and temperature inhomogeneities are de-

User Manual v9.4.1, Build 01 61 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

Figure 2.39: Specifying a mixing profile

Figure 2.40: Boundary Layer Zones options

scribed in said zone. It is strongly recommended that the majority of the stochastic parcels are assigned to Zone #1, i.e. the Bulk Zone.

The size of the Boundary Layer (#2) Zone. Changing the size of the Boundary Layer Zone influences its ability to transfer heat to the walls, mass to the crevice, and also to hold a proportion of the unburned fuel at the end of the simulation. Please note that the physical size of the Boundary Layer Zone is not affected by the number of stochastic particles assigned to it.

c 2017 CMCL Innovations 62 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.5 Simulation Inputs

The mixing between zones. The main parameter that determines the tem- perature evolution of the Boundary Layer Zone, and hence determines which chemical reactions will take place and at which rate, is the mixing between zones. For a constant heat transfer configuration, the higher the mixing, the higher the resulting temperature in the Boundary Layer Zone, and the higher the peak temperature (and pressure) in the Bulk Zone, thanks to the additional supply of oxygen from the Boundary Layer Zone. The rate of pair-wise mixing is the main parameter to adjust, while the smoothness of the mixing is purely a numerical value which is a com- promise between a smooth solution and a computationally inexpensive one.

Additional remarks which users should consider when they enable the Bound- ary Layer Zone:

• There are additional output files created for each zone that follow the same structure and naming conventions as the whole ensemble ones.

• Injection(s), flame propagation and intra-zonal mixing take place only in the Bulk Zone

• Heat transfer to the walls, and mass transfer to the crevice take place only in the Boundary Layer Zone.

• If the temperature of the Boundary Layer Zone gets close to the weighted average temperature of the walls, heat transfer will decrease (and may even stop) to prevent unphysical results. The total heat flux to the walls is calculated based on the whole ensemble but taken away only from the Boundary Layer Zone.

• If the size of the Boundary Layer Zone is too small, and the crevice % is significant, it is possible that the mass of the Bound- ary Layer Zone gets depleted, causing the simulation to fail. Please review the evolution of the Boundary Layer Zone mass in OutputCase00001Cyc0001Zone02Data.csv.

User Manual v9.4.1, Build 01 63 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

2.5.9 Breathing

The Breathing panel allows users to enable the Breathing model for the intake and exhaust valves of their cylinder. The intake and exhaust valve lifts as well as the discharge coefficients for different lifts, need to be specified by the user. The valve lift and discharge coefficient profiles (e.g. an exhaust valve lift profile shown in Figure 2.41) can be imported as CSV files and then can be modified further using the graphical user interface. Note that the opening and closing valve timings and the profiles are defined with respect to the combustion/power stroke at 0 CAD aTDC.

Figure 2.41: Exhaust valve lift profile

2.5.10 Spark Ignition

The Spark Ignition (SI) menu allows users to enable, and specify parameters for, the Spark Ignition model. Figure 2.42 shows the seven options available to simulate the SI flame propagation and/or the burn rate. For the details regarding the individual SI model options, please refer to Section 7.3.13.

2.5.11 Engine Performance

The Engine Performance panel allows users to specify intake and exhaust manifold pressures as well as friction correlation parameters used to calculate

c 2017 CMCL Innovations 64 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.5 Simulation Inputs

Figure 2.42: Specifying a spark ignition (SI) model the FMEP of engine type simulations. For more information, please see the Section 7.3.12.

Figure 2.43: Modifying parameters in the Engine Performance panel

2.5.12 Emissions

The Emissions panel provides the option to specify standard emissions modi- fiers to allow tuning for different conventions and measurement methods.

This panel also allows users to choose and configure various Particle Popula- tion Balance models for use in engine type simulations. For more information on these models, please see the Section 6.2.

User Manual v9.4.1, Build 01 65 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

Figure 2.44: Configuring the ODE Population Balance model

2.5.13 Nanoparticles

In reactor type simulations, the Nanoparticles panel allows users to access Particle Population Balance model settings as well as Particle ODE Model parameters.

Figure 2.45: Adjusting the ZnO (Moment) model

c 2017 CMCL Innovations 66 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.5 Simulation Inputs

2.5.14 Reactor Networks

The kinetics & SRM Engine Suite now provides users with the option to select a network of reactors as a Parent Case model 1. This can be accomplished by selecting any of the models under the Ideal Reactors heading in the Add Parent Case menu.

Figure 2.46: Selecting an Ideal Reactor model

Once a network-enabled Parent Case has been created, the main project tree will be updated to allow access to panels controlling input parameters for each Reactor and Connection instance within the network (as seen in Figure 2.47).

Selecting the parent Reactors or Connections panel provides controls to re- spectively create new Reactor or Connection instances within the network (as shown in Figure 2.48).

1 Please note that not all Analysis Tools or Post-Processing features are compatible with network based Parent Cases

User Manual v9.4.1, Build 01 67 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

Figure 2.47: Accessing network parameter panels

Figure 2.48: Creating a new Reactor instance

c 2017 CMCL Innovations 68 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.5 Simulation Inputs

Each Reactor and Connection instance in the network can be modified by se- lecting the desired node in the main project tree. This presents a new input panel that provides full control over the chosen Reactor’s or Connection’s pa- rameter setup including:

• Reactor parameters

– User facing Reactor name – General model settings – Gas phase parameters and composition – Wall parameters (where applicable) – Surface parameters (where applicable)

• Connection parameters

– User facing Connection name – Source and destination of flow – Total flow rate – Environment settings (where applicable)

Figure 2.49: Editing a Reactor within a network

User Manual v9.4.1, Build 01 69 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

Figure 2.50: Editing a Connection within a network

c 2017 CMCL Innovations 70 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.6 Simulation Analysis Tools

2.6 Simulation Analysis Tools

In addition to specifying the input parameters for each model of a simulation, the kinetics & SRM Engine Suite also provides a range of Analysis Tools used to investigate a Parent Case simulation with concepts such as Sensitivity Anal- ysis, Design of Experiments, and Child Cases. Each of these tools is detailed in the following sections.

2.6.1 Child Cases

Once a valid Parent Case has been created, Child Cases can be added and modified at any time through the “Child Cases” menu (accessed under the “Analysis Tools” section of the main tree).

Within this menu, Child Cases can be created, removed, and modified. Addi- tionally, a summary table is shown that details the input parameters within the Child Cases that differ from the original Parent Case (Figure 2.51). Any single- value numerical input can be edited for each case directly from this table, but more complex inputs (such as profiles and compositions) can only be edited from the “Edit Case” dialog.

Once created, any parameter can be edited within a Child Case by hitting the “Edit Case” button to produce a pop-up menu containing controls to edit all input parameters (as seen in Figure 2.52). These controls will initially take their values from the containing Parent Case but once edited, will store the changes in the Child Case itself, leaving the Parent Case unchanged.

If these changes are then accepted, the Child Case summary table will then automatically update to show which parameters have been changed.

In addition to specifying initial differences in a Child Case via the “Edit Case” dialog, one can specify that a parameter needs to change across all Child Cases by use of a Child Case Variable. When editing a single-value numerical parameter in the containing Parent Case (such as Initial Temperature or Initial Pressure), a Variable can be created by entering a value in between two curly

User Manual v9.4.1, Build 01 71 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations brackets (e.g. {variableA}). This then adds that parameter to the afore- mentioned Child Case summary table so that it can be edited across the Child Cases.

Profiles can also be changed across child cases by using the "Import Multiple Profiles" button on the Child Cases panel. This button brings up a dialog to select the file to import. Once an appropriate file is selected, the profile to edit can be selected via a drop down menu in the next dialog shown in Figure 2.53). There are several profiles available such as the Direct Injection and Injection alpha profiles.

Please note that the profiles for import should be contained in UTF-8/ANSI encoded csv files with the same number of rows within each column. By de- fault the csv file is assumed to consist of alternating X, Y profile values in an order corresponding to the intended child case for the profiles. However this can be changed in the dialog shown in Figure 2.53) by specifying two columns in the CSV in the following format: [x value column number],[y value column number].

Figure 2.51: Creating/Viewing a Child Case

c 2017 CMCL Innovations 72 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.6 Simulation Analysis Tools

Figure 2.52: Editing a Child Case

Figure 2.53: Importing Multiple Profiles into Child Cases

User Manual v9.4.1, Build 01 73 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

2.6.2 Sensitivity Analyses

The kinetics & SRM Engine Suite allows users to calculate the sensitivities of input parameters on various outputs of their Parent Case simulation. To do this, a Sensitivity Analysis based on a singular Parent Case must be created. Similar to Child Cases, each Sensitivity Analysis uses a series of sub-cases (simulations based on the Parent Case but with differences in individual pa- rameters) to calculate the final sensitivity coefficients.

Users can create multiple analyses via the Sensitivity Analyses menu and add model/mechanism parameters to each analysis (as seen in Figure 2.54).

Figure 2.54: Setting up a Sensitivity Analysis

Once parameters have been added and the changes accepted, any selected analyses can be executed using the “Run Selected Analyses” button, alterna- tively individual sub-cases within an analysis can be executed directly through the “Simulation Controls” menu. Once the analysis has run all of its sub- cases to successful completion, users can analyses the calculated coefficients through the creation of a sensitivity specific data visualisation.

c 2017 CMCL Innovations 74 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.6 Simulation Analysis Tools

Visualising Sensitivity Data

To view sensitivity coefficients, users can create a Sensitivity Visualisation through the Data Visualisations menu. In this specialised visualisation, two convenient methods are available to view the sensitivity data.

• Evolution: This method plots the evolution of a single set of sensitivity coefficients versus the independent variable from the simulation. This is a convenient method to view quantities such as the sensitivity of the heat release rate versus CAD with respect to initial temperature for an engine simulation, or the sensitivity of the temperature of a reactor versus time with respect to the rate of a single reaction in the chemical mechanism (see Figure 2.56).

• Single-value: This method enables the easy comparison of a set of single-valued sensitivity coefficients. For example, the sensitivity of the peak temperature with respect to the initial temperature in an engine simulation.

By default, both methods display raw sensitivity coefficients, calculated as per equation (9.347). However, the user has the option to view the normalised sensitivity coefficients, calculated as per equation (9.348).

In the event that the analysis was run using the central difference method (see page 324), users now have the option to view sensitivity coefficients calculated using either central or forward differences.

User Manual v9.4.1, Build 01 75 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

Figure 2.55: Visualising sensitivity results

Figure 2.56: Sensitivity Evolution

c 2017 CMCL Innovations 76 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.6 Simulation Analysis Tools

2.6.3 Design of Experiments

The kinetics & SRM Engine Suite also allows users to carry out linear, full factorial, and Sobol DoEs (previously known as Parameter Sweeps in v8.1) over multiple dimensions. Similarly to Sensitivity Analyses and Child Cases, DoEs use a system of sub-cases (simulations based on the Parent Case but with differences in individual parameters) to carry out simulation runs. A typical example of its application would be to compute the ignition delay time obtained over a range of initial reactor pressures and temperatures.

Any single-value model parameter, or reaction rate can be used in a DoE analysis, users can create a new DoE through the Analysis Tools option in the project tree. Once created, users can add parameters through the dialogs provided and presented in Figure 2.57.

Figure 2.57: Adding a DoE parameter

After parameters have been added, users can choose to specify DoE values ()such as minimum value, maximum value, number of intervals etc.) depend- ing on the type of DoE that has been selected. Additionally, users can chose to set specific values for each parameter rather than letting the kinetics & SRM Engine Suite automatically calculate them (an example of this is seen in Figure 2.58).

User Manual v9.4.1, Build 01 77 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

Figure 2.58: Specifying manual DoE values

Running an experiment

Once parameters have been added and the changes accepted, any selected DoEs can be executed using the “Run Selected Experiments” button, alterna- tively individual sub-cases within a DoE can be executed directly through the “Simulation Controls” menu

At this point the experiment will begin, users can use view the output terminal (or use the Mini-Viewer, see below) to monitor the progress of experiment simulations. Since DoEs of this kind many require hundreds or even thousands of simulations, live plotting is disabled and the results can only be viewed at the conclusion of the computation.

Visualising Experiment Data

Once all simulations within the DoE have completed, a comparison of results across all sub-cases in the DoE can be seen by creating a DoE specific visu- alisation within the “Data Visualisations” menu. Alternatively, the time-based results of single simulation can be plotted by creating a regular Line/Scatter

c 2017 CMCL Innovations 78 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.6 Simulation Analysis Tools chart from the same menu.

The results of interest can be identified by using the visualisation controls as seen in Figure 2.59 where the results of p(max) [bar] for each sub-case are shown. To determine which inputs where used for each DoE simulation, simply select the “View Case Summary” button to generate an overview of all simulations within the DoE (see Figure 2.60).

Figure 2.59: Post-processing the results of a DoE

User Manual v9.4.1, Build 01 79 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

Figure 2.60: Summarising DoE sub-cases

c 2017 CMCL Innovations 80 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.7 Post Processing

2.7 Post Processing

Along with the ability to run chemical simulations and advanced analysis tools, the kinetics & SRM Engine Suite also offers a range of post-processing tools to visualise, analyse and process the results of simulations. A description of each of the post-processing tools is given below.

2.7.1 Data Visualisations

Once a successful simulation has been run within your project (or external data has been imported), the kinetics & SRM Engine Suite offers the capability to plot both two-and three-dimensional data visualisations. From within the “Data Visualisations” menu found in the project tree, users can setup, modify, and view various data and charts.

Importing External Data

In addition to plotting output data from simulations run within the kinetics& SRM Engine Suite (see below for instructions on how to view this data), users can also add external data to their visualisations for comparison against actual simulation output. However, before external data can be added to a visualisa- tion, if must first be imported into the kinetics & SRM Engine Suite.

To import external data for later use in a visualisation, first navigate to the “Import External Data” menu via the project tree. Within this menu (see in Figure 2.61) are controls to import a single external data file.

Once a file is selected, simply change the delimiter and column type fields to reflect the file before selecting the “Import File” button. If the file is valid (compared to the selected options), a summary of the number of columns and rows will be displayed in the GUI Messages terminal and the data will be available for plotting in later visualisations.

Please note that external data for import should be contained in UTF-8/ANSI

User Manual v9.4.1, Build 01 81 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

Figure 2.61: Importing external data encoded files with the same number of rows within each column.

Two-dimensional plots

To create a two-dimensional plot and start visualising data:

1. Select the desired visualisation type (i.e. Line Graph, Bar Chart etc.) and enter a name as shown in Figure 2.62.

c 2017 CMCL Innovations 82 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.7 Post Processing

2. Once created, any new visualisation can be found in the project tree. Each visualisation will contain its own controls for adding, editing, view- ing, and removing plots of data to its data table and corresponding graph.

3. A visual chart can then be setup by adding data sets (either from simula- tions or external sources). Sets are added by selecting a single x−series and one (or more) y−series as shown in Figure 2.63. For more informa- tion about handling multiple cases, please see Section 2.7.1.

4. Once (at least) one set has been added, raw data values can be viewed (grouped by common x−series), or a visualisation of your chosen type can be observed in the Visualisation tab.

5. Note that if more data sets are added, the raw data table and visualisa- tion graphs are automatically extended to include these.

The general look and feel (i.e. font size, colours, grid etc.) of the chart can also be edited, saved or imported using the visualisation control panel as shown in Figure 2.64.

User Manual v9.4.1, Build 01 83 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

Figure 2.62: Creating a visualisation

Figure 2.63: Setting up a new x − y plot

c 2017 CMCL Innovations 84 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.7 Post Processing

Figure 2.64: Visualisation control panel

User Manual v9.4.1, Build 01 85 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

Plotting multiple cases

There are a number of methods that can be used to add output data from mul- tiple simulations to a single chart, each of these methods are detailed below.

Method 1: Adding data series individually - this is the most generic and ex- tensible method.

1. Users should create the visualisation by selecting “Data Visualisations” from the main tree.

2. Select the required chart, give it a name and press “Create Visualisation”.

3. Select the visualisation from the tree and click “Add Data Set(s)”.

4. Select the data for x− and y−axis from the two corresponding vertical panels and press “Visualise”.

5. Further data can be added to the chart by returning to the data tab, click- ing “Add Data Set(s)” and repeating the process.

Method 2: Adding multiple data series in one step.

1. Users should create the visualisation by selecting “Data Visualisations” from the main tree.

2. Select the required chart, give it a name and press “Create Visualisation”.

3. Select the visualisation from the tree and click “Add Data Set(s)”.

4. Select the data for x− and y−axis from the two corresponding vertical panels.

5. The third vertical panel lists all of the cases within the project. By pressing the control button, clicking and highlighting individual cases any of the cases can be selected for visualisation.

6. Finally press “Visualise”.

7. The tool will now search through the selected cases looking for data en- tries with the same name as those selected for the x− and y−axis. The multiple cases will then be added to the chart.

c 2017 CMCL Innovations 86 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.7 Post Processing

Three-dimensional plots

Before attempting to create a three-dimensional visualisation of your simula- tion data, please take note of the limitations (listed below) imposed by the graphing libraries and graphics hardware integration used to create these graphs.

• Architecture incompatibilities: Due to limitations with compatibility be- tween 32 and 64bit processes, if the kinetics & SRM Engine Suite is run together with a 32bit version of Java on a 64bit operating system, all three-dimensional visualisations are be disabled. To determine which version of Java is installed on your machine, please use the following instructions. If running a 32bit version of Java on a 64bit Operating Sys- tem, it is recommended that you update the installation of Java to 64bit via the Oracle website.

• Static data ranges: To visualise data in three dimensions, each data range (x, y and z) must contain varying values. If any range consists of one static value, please make use of the kinetics & SRM Engine Suite two dimensional capabilities.

• Surface Triangulation: In order to create effective three dimensional surface graphs, Delaunay triangulation is utilised. Depending on the amount, and variation of input points, triangulation may not be possi- ble. In this situation, a three-dimensional scatter plot will be attempted instead.

Providing your Java Virtual Machine and Operating System architecture are correctly matched, you can create 3D visualisations following the below steps:

1. Within the “Data Visualisations” menu, select either the 3D scatter or surface visualisation types and assign a name.

2. A 3D post-processing table is then created. This table will contain con- trols for adding, editing, viewing and removing a singular plot of data to this table and corresponding graph.

User Manual v9.4.1, Build 01 87 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

3. A data plot can then be created by specifying a single three-dimensional data set for the visualisation via the “Add Data Set” button.

4. Once a data set has been selected, raw data values can be seen or a visualisation of this data can be seen in the “Visualisation” tab. Please note that visualisations of large data sets may take some time to ini- tialise.

5. The visualisation can be rotated using a click-and-drag mouse move- ment and automatic rotation can be toggled by clicking on the visualisa- tion itself.

6. The chart will rotate by default, hence by clicking on the chart this rota- tion will stop.

7. Please note that only a single series (i.e. x − y − z) can be plotted using this method.

Figure 2.65: Example 3D Scatter plot

c 2017 CMCL Innovations 88 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.7 Post Processing

2.7.2 Particle Animations

A particle animation can be used to analyse the evolution of the PDF as a function of time for local particle compositional states (i.e. NOx, uHCs, CO, temperature etc.). An example of a typical animation heat map is presented in Figure 2.66. The most added value from this post-processing tool is obtained for large numbers of stochastic particles (i.e. greater than 50).

At the conclusion of the simulations, any cases can be analysed by clicking on the Particle Animations entry on the Post-Processing Tools branch of the main project tree.

Figure 2.66: A typical particle animation

Particle Animations can be generated in either the default mode (in which axes

User Manual v9.4.1, Build 01 89 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations boundaries, chart styles, and animation size are determined dynamically), or manually configured via the “Use Advanced Options?” control in the Particle Animations menu as see in the image below.

Figure 2.67: Configuring a particle animation

2.7.3 Flux Analysis

Through the use of the flux analysis feature, users can export data on the interactions of chemical species in their selected mechanism as a function of time. However, before data can be exported, a simulation case using a non-internal mechanism must be completed to provide simulation output data. Text files containing the relevant flux data can be exported following the steps outlined below...

1. Navigate to the “Flux Analysis” tab in the “Post-Processing Tools” option in the project tree.

c 2017 CMCL Innovations 90 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.7 Post Processing

2. Specify whether the exported data should include reaction-wise fluxes, the maximum number of fluxes, and which time steps to output flux data at.

3. Select the completed simulation case upon which to base export data.

4. Finally select the Species, Reactions, and Elements of interest using the searchable text fields on the right of the main controls.

Once configured, integrated and instantaneous flux data can be exported for use in third-party tools via the “Export Pathway Data” button. If successfully exported, the “Show Flux Files on Disk” option can be used to locate the re- sulting files on the current file system.

Figure 2.68: Exporting Flux Data

2.7.4 Mechanism Reduction

The Direct Relation Graph (DRG) mechanism reduction method is available as a post-process. The method works in several stages and can be accessed

User Manual v9.4.1, Build 01 91 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations from the ‘Post-Processing Tools/Mechanism Reductions’ section of the menu tree. The theory behind the method is described in Section 9.3.

Users can use the DRG method to reduce an imported chemical mechanism by following the work-flow below. The method may applied to any number of cases that use the same chemical mechanism and that have been successfully run to completion.

1. Create Reduction: Navigate to the Mechanism Reductions panel via the main tree, and create a new reduction as per Figure 2.69. It is pos- sible to create multiple reductions, each using a different mechanism or set of simulation results.

2. Initial Analysis: An initial analysis must be performed in order to calcu- late a set of Overall Importance Coefficients.

The following inputs are required (see Figure 2.70). The affect of each input of the analysis methods is described in Section 9.3.

• Specify the Target Mechanism you wish to reduce. Note that this must be a user-imported mechanism.

• Specify a set of Target Species. These are species that are known to be important and that must be included in the reduced mecha- nism. The Overall Importance Coeffcient (OIC) for each species is calculated as the maximum OIC across all target species. The choice of target species will therefore affect the results of the re- duction.

• Select the Reduction Algorithm: DRG or DRGEP.

• Select the Coefficient Algorithm: Lu and Law [26], Pepiot- Desjardins and Pitsch [36] or Luo et al. [27].

• Select whether to use Scaling Factors.

• Select the Reduction Scope: Whether to calculate OICs for species only or species and reactions.

c 2017 CMCL Innovations 92 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.7 Post Processing

• Select the Simulation Cases that you wish to include in the anal- ysis. Note that the list of cases is filtered such that you may only select cases that use the specified Target Mechanism and that have been successfully run to completion.

Hit the Run Initial Analysis button to perform the analysis.

3. Initial Analysis Results: The results will be displayed once the calcula- tion is complete (see Figure 2.71).

4. Reduce Mechanism: Once the initial analysis is complete, the results of the calculation can be used to reduce the target mechanism.

The following inputs are required (see Figure 2.72).

• Select the Reduction Scope. The Species OICs may be used to reduce the target mechanism by removing species with OICs less than a specified value of epsilon. Any reactions that involve removed species will also be removed. The Reaction OICs may be used to reduce the target mechanism by removing reactions with OICs less than a specified value of ep- silon. Species that do not participate in any reactions are not re- moved. If necessary, these may be removed in a subsequent re- duction. This prevents the inadvertent removal of inert species.

• Specify the Reduced Mechanism Suffix. This will be appended to the file name of each reduced mechanism file in order to distinguish it from the original target mechanism.

• Define and select the values of Epsilon that will be used to reduce the target mechanism. Click ‘View’ to see which species / reactions will be included in each reduced mechanism.

• Specify any Enforced Species / Reactions. These will be included in the reduced mechanisms, regardless of the value of the OIC.

• Specify any Omitted Species / Reactions: These will be omitted from the reduced mechanisms, regardless of the value of the OIC.

User Manual v9.4.1, Build 01 93 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

Hit the Output Reduced Mechanism(s) button to create reduced mech- anisms for the selected values of epsilon.

The reduced mechanisms will be available via the "Case Settings" or "Import & View Mechanisms" options in the main navigation tree.

Figure 2.69: Creating a mechanism reduction

c 2017 CMCL Innovations 94 User Manual v9.4.1, Build 01 CMCL < > Innovations 2.7 Post Processing

Figure 2.70: Setting up an initial analysis

Figure 2.71: Viewing global reaction OIC results

User Manual v9.4.1, Build 01 95 c 2017 CMCL Innovations CMCL < > 2 USING THE SUITE Innovations

Figure 2.72: Producing reduced mechanisms

c 2017 CMCL Innovations 96 User Manual v9.4.1, Build 01 Tutorials

In this chapter we present a step-by-step guide to running the tutorials cases provided with the software.

On installation of thek inetics & SRM Engine Suite, the tutorial projects are copied to your selected workspace and are examples of setting up a simulation run to simulate various engine combustion modes. To demonstrate the full capabilities of thek inetics & SRM Engine Suite, the software is applied to simulate all reactors and the various operating modes of engine combustion.

User Manual v9.4.1, Build 01 97 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations

3.1 Tutorial 1 (H2-Air CV Closed Homog)

Hydrogen-air auto-ignition in a constant volume batch reactor.

This tutorial project presents a transient simulation of the spontaneous ignition of a stoichiometric hydrogen/air mixture at constant volume. The system is a closed (or batch process), so there is no flow of mass into or out of the reactor. Here we are interested in determining the ignition time under a specified set of initial pressure and temperature conditions, assuming adiabatic conditions (no heat loss to the environment). In addition, we would like to determine which reactions contribute most to the solution, using an example of a simple sensitivity analysis.

3.1.1 Opening the tutorial

From the kinetics & SRM Engine Suite’s Welcome Menu (as detailed in section 2.2), users should select Tut.01 (H2-Air CV Closed Homog) from the Tutorials tab. Once selected, the tutorial will be copied to the workspace with a new, user-input name, before being opened in the Project Window.

First we will look at setting up the chemical kinetic mechanism employed for the simulation. Please note that the mechanism used in this tutorial will be auto- matically loaded when the project is opened; however, the process of manually adding mechanism is also explained in section 2.4.7.

3.1.2 Mechanism

The chemical kinetic mechanism we wish to apply in this tutorial is for Hydro- gen Oxidation (M. O’Connaire, H. J. Curran, J. M. Simmie, W. J. Pitz, and C. K. Westbrook, "A Comprehensive Modelling Study of Hydrogen Oxidation," Int. J. Chem. Kinet., 36:603-622, 2004 (UCRL-JC-152569)) and can be found here.

For the purposes of demonstration, users should download this mechanism

c 2017 CMCL Innovations 98 User Manual v9.4.1, Build 01 CMCL < > Innovations 3.1 Tutorial 1 (H2-Air CV Closed Homog) and go through the following process of importing and converting the file into a format suitable for use with kinetics & SRM Engine Suite. However if users wish to skip the following step, and move on to Section 3.1.3, the mechanism has already been imported and is ready to run for this project.

As with many chemical kinetic mechanisms obtained from external sources this example is available in the commonly applied ASCII text (CHEMKIN) file format. The kinetics & SRM Engine Suite uses a more robust, machine read- able and extensible mark-up language to store and share chemical data sets. As such CHEMKIN text format files must be converted to the kinetics XML file format. The conversion also includes a robust integrity check of the original chemical data, which may highlight some inconsistencies in the file format, data and definitions.

The conversion includes the following integrity2 steps.

1. Element, species and reaction count

2. Repeat element, species and duplicate reaction definition check

3. Repeat thermodynamic data entry check

4. Species naming convention check

5. Element balance check on all reactions

6. Line-by-line feedback of any errors or warnings

7. Midpoint thermodynamic data consistency check

8. Positive heat capacity and entropy check

Using the kinetics software, this conversion is carried out automatically when a new mechanism is first imported. Firstly click on the Import mechanism branch, this brings up the window presented in Figure 3.1.

2 Users will note that the integrity check may highlight errors and issue warnings for even well regarded chemical data sets. These issues are not always reported by other soft- ware tools hence, developers may not even be aware they exist. However, it must be noted that these issues are usually not a product of the conversion itself and come di- rectly from the original chemical data set.

User Manual v9.4.1, Build 01 99 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations

Figure 3.1: Importing ASCII format chemistry files into kinetics

Here, users can select the mechanism and thermodynamic data sets they wish to apply in the simulation as well as the Import from Chemkin Format option (mechanism can also be imported from XML format). In addition to import- ing mechanisms, four internal mechanisms are included within thek inetics& SRM Engine Suite; these mechanisms are considered the sole property of CMCL Innovations and as such, only limited information on them is visible. However here we wish to import the Hydrogen mechanism described above, within the “Mechanisms” menu, users should select the “Import from Chemkin Format” option and link the relevant mechanism\thermodynamics data files. Once linked, users should click the “Import Mechanism” icon. Progress of the conversion can be monitored in the terminal window at the bottom of the main software window.

In this particular case, there should be no issues reported with the conversion process, if there is an issue (which is possible for other mechanisms) a detailed

c 2017 CMCL Innovations 100 User Manual v9.4.1, Build 01 CMCL < > Innovations 3.1 Tutorial 1 (H2-Air CV Closed Homog) analysis of the conversion process should appear on screen.

A warning statement means that the mechanisms can still run successfully with the kinetics & SRM Engine Suite, but could benefit from investigating a potential technical problem. An error means that an action must be carried out by the user to address the problem, this usually requires correcting the external chemical mechanism files in accordance with suggestions made the log file.

3.1.3 Simulation set-up

The problem is pre-defined as a Constant Volume (CV) batch closed system homogeneous reactor case. As presented in Figure 3.2, the reactor size is set using the “Geometry” tab. A volume is not important for the results of this simulation, so the default value of 0.01 m3 will be used for the initial volume.

Figure 3.2: Tutorial 1: Geometry

The initial mixture is set using the “Initial Mixture - General Settings” tab, as presented in Figure 3.3. Here the initial temperature (1050 K) is set, along with the initial pressure (1.0 atm).

In some cases, the fuel and oxidiser are set separately and then blended in proportions set using an fuel/air equivalence ratio (N.B. The definition of fuel/air equivalence ratio is expressed in section 7.3.19.). In the current case,

User Manual v9.4.1, Build 01 101 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations the fuel/air equivalence ratio is set to 0.0 thus the simulation is initiated based only on the oxidiser composition.

Figure 3.3: Tutorial 1: Initial Mixture

By selecting the “Initial Mixture - Oxidiser Composition” tab, (Figure 3.4) the composition of the mixture can be set by selecting each chemical species and their composition in mass fraction terms. The mass fraction composition should sum to unity, if the sum is not unity, the simulation will fail at execution time. Note that whilst specifying species for use in compositions, users can begin typing the name of the desired species in the field, this will then display a list of species starting with the matching text.

Finally, in this case the end time of the simulation is defined to 0.2 ms. This is set in the General Settings tab, as presented in Figure 3.5.

3.1.4 Running the tutorial

The simulation can be run by selecting the “Simulation Controls” option in the menu. This displays the simulation setup panel where selected cases can be chosen to run and additional global simulation settings can be set (see section 2.4.5 for more information on running simulations).

c 2017 CMCL Innovations 102 User Manual v9.4.1, Build 01 CMCL < > Innovations 3.1 Tutorial 1 (H2-Air CV Closed Homog)

Figure 3.4: Tutorial 1: Initial Mixture Visualisation

Figure 3.5: Tutorial 1: General Settings

3.1.5 Visualising the results

The process of visualising the results of temperature versus time is sum- marised as follows.

User Manual v9.4.1, Build 01 103 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations

1. Users should create the visualisation by selecting “Data Visualisations” from the main tree.

2. Select the Line Graph option, give the chart the name "Temp. vs. time" and press “Create Visualisation”.

3. Select the visualisation from the tree and click “Add Data Set(s)”.

4. Select the x−axis data from the first vertical panel by navigating through the tree to “Data Sources -> CV Homog -> Output Files -> Cycle 1 -> General Data” and select Time [ms].

5. Similarly now select the y−axis data from the second vertical panel by navigat- ing through the tree to “Data Sources -> CV Homog -> Output Files -> Cycle 1 -> General Data” and select Temperature [K].

6. Finally press Visualise.

The results will be presented in table format, by clicking on “Visualisation”, the chart can be viewed. Presented in Figure 3.6 is the resulting temperature vs. time results of the computation plotted via the post-processing “Data Visual- isations” menu. By using the chart settings dialog, users can make simple adjustment and layout changes in order to satisfy their own specific plotting requirements.

A detailed explanation of generating a visualisation of simulation results (such as the one above) can be found in the Data Visualisations section later in this manual.

3.1.6 Sensitivity analysis

Next we will carry out and visualise the results of a sensitivity analysis of vari- ous model input parameters for this reactor process condition. The numerical methods applied are summarised in section 9.2.

Users can create analyses through the “Sensitivity Analyses” menu. Once an analysis is created and accessed using the show button, users can add

c 2017 CMCL Innovations 104 User Manual v9.4.1, Build 01 CMCL < > Innovations 3.1 Tutorial 1 (H2-Air CV Closed Homog)

Figure 3.6: Results of Tutorial 1: Temperature vs. time any number of single-value numeric model parameters using the Add Model Parameter dialog, or any Pre-Exponential Arrhenius values from the current mechanism via the “Add Reaction(s)” dialog.

In this example, we would like to carry out a sensitivity analysis of all Pre- Exponential Arrhenius parameters from the reactions in the current mecha- nism. Delta values for each parameter can be set as a percentage or as an absolute value, for this example the default values will be applied.

Figure 3.7: Tutorial 1: Selecting Sensitivity Analysis parameters

User Manual v9.4.1, Build 01 105 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations

By selecting the analysis and hitting the “Run Selected Analyses” button, the simulation is started (overwriting all previous sub-cases). Derivatives are com- puted using a two-point finite difference method, thus two simulations are run per parameter, as such this computation can take some time. The progress of the simulation can be monitored using the horizontal progress bar.

After the analysis is complete, results can be seen by selecting the “Sensitivity Analysis” visualisation type within the Data Visualisations menu. A Bar Chart of results is then presented and the Output drop-down can be used to select sensitivities in relation to a particular output value.

c 2017 CMCL Innovations 106 User Manual v9.4.1, Build 01 CMCL < > Innovations 3.2 Tutorial 2 (Propane-Air CP Closed Homog)

3.2 Tutorial 2 (Propane-Air CP Closed Homog)

Propane-air auto-ignition in a constant pressure batch reactor.

This tutorial describes how one can use the kinetics software to run a sim- ulation of propane-air autoignition in a constant pressure batch reactor. The system is a closed or batch process, so there is no flow of mass into or out of the reactor. Here we are interested in determining the ignition time under a specified set of initial pressure and temperature conditions, assuming adia- batic conditions (no heat loss to the environment). In addition, we would like to run the simulation over a number of initial temperature conditions and analyse point data results.

3.2.1 Opening the tutorial

From the welcome menu, users should select “Tut.02 (Propane-Air CP Closed Homog)” from the projects box on the left. By double clicking the project title, the project is then copied into the workspace before being loaded into the project window.

3.2.2 Mechanism

The chemical kinetic mechanism we’re using for this tutorial is the Complete San Diego Mechanism ("Chemical-Kinetic Mechanisms for Combustion Applications", San Diego Mechanism web page, Mechanical and Aerospace Engineering (Combustion Research), University of California at San Diego (http://web.eng.ucsd.edu/mae/groups/combustion/mechanism.html). In this case, this mechanism has been converted previously to kinetics format and will be automatically loaded when the tutorial is opened.

User Manual v9.4.1, Build 01 107 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations

3.2.3 Simulation set-up

Similar to Tutorial 1, the reactor volume is not important and here is set to the default value of 0.01m3. The initial mixture is at 1.0 atm and 1200K, with an equivalence ratio defined at 0.0 (hence the initial composition is defined only by the oxidiser composition).

The composition of the mixture is set according to Figure 3.8 in the Initial Mixture - Initial Composition menu, and is set as 5.0% of C3H8 (propane), 45% O2 and 50% AR.

Compositions like these can be edited through the use of the fuel and/or oxi- diser tables within the Initial Mixture panel. These tables allow users to change species, insert/remove species, and edit mass fractions. Please note, all com- positions must sum to unity (1.0), this can be achieved through the use of the normalise button.

To select a species in a composition, the kinetics & SRM Engine Suite offers a simple searching mechanism (as seen in Figure 3.8). Simply start typing in one of the text fields within a composition table to see all species in the current mechanism that start with your text. An asterisk symbol (‘*’) can be used as a wildcard to match any characters. To see a list of all species in the mechanism, simply remove all the text in the field.

Figure 3.8: Tutorial 2: Initial Composition

Next we will look in more detail at setting-up running multiple cases. Additional sub-cases can be created via the options in the Child Cases menu. Once multiple child cases are created, their parameters can be varied through the variables function. Variables allow the user to vary a single parameter across a series of child cases. A variable can be created by locating the desired

c 2017 CMCL Innovations 108 User Manual v9.4.1, Build 01 CMCL < > Innovations 3.2 Tutorial 2 (Propane-Air CP Closed Homog) property in the input panel of the parent case and entering a variable name (i.e ’{variable}’) instead of a numerical value. A variable is then created and the value for this variable’s property can be controlled through the Child Cases & Variables menu as shown in Figure 3.9.

Figure 3.9: Tutorial 2: Setting-up multiple cases

3.2.4 Running the tutorial

The simulation can be run by selecting the “Simulation Controls” option in the menu. This displays the simulation setup panel where selected cases can be chosen to run and additional global simulation settings can be set (see section 2.4.5 for more information on running simulations). In this case, users can se- lect the cases they wish to simulate. In the present tutorial there is one parent case (identical to the first child case in this example) and six child simulations, all of the child cases should be run by selecting them then pressing the run button on the bottom right.

3.2.5 Visualising the results

Once the simulation is complete users can plot the results via the Data Visu- alisation menu. In order to plot results, the following steps must be carried out:

User Manual v9.4.1, Build 01 109 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations

1. Users should create the visualisation by selecting “Data Visualisations” from the main tree.

2. Select the Line Graph option, give the chart the name "Temp. vs. time" and press “Create Visualisation”.

3. Select the visualisation from the tree and click “Add Data Set(s)”.

4. Select the x−axis data from the first vertical panel by navigating through the tree to “Data Sources -> CP Homog -> Output Files -> Cycle 1 -> General Data” and select Time [ms].

5. Similarly now select the y−axis data from the second vertical panel by navigat- ing through the tree to “Data Sources -> CP Homog -> Output Files -> Cycle 1 -> General Data” and select Temperature [K].

6. Next highlight by holding the Control button and clicking on the six child cases in the third and final column, resulting in the following visualisation seen in Figure 3.10.

7. Finally press the visualise button.

Figure 3.10: Tutorial 2: Post-processing and plotting multiple simulations

The resulting chart is presented in Figure 3.11.

c 2017 CMCL Innovations 110 User Manual v9.4.1, Build 01 CMCL < > Innovations 3.2 Tutorial 2 (Propane-Air CP Closed Homog)

Figure 3.11: Tutorial 2: Result of the six simulations

3.2.6 Post-processing

It is common to present the results of constant volume/pressure batch reactor simulations in terms of ignition delay times. Within the kinetics & SRM Engine Suite there are a number of methods which can be used to define the ignition delay time (detailed in Section 9.1).

Once simulations have completed, users can analyse this data in graphical form and compare it with experimental data through the Data Visualisations module.

To generate more customised (and multi-series, if required) visualisation of simulation results, users should generate a visualisation and via the “Combined Information” branch add data sets of Ignition time against T[1000/K].

Once the data is loaded, clicking on the visualisation tab will display the chart presented in Figure 3.12.

User Manual v9.4.1, Build 01 111 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations

Figure 3.12: Tutorial 2: Final results ignition time vs. 1000/Initial Temperature

c 2017 CMCL Innovations 112 User Manual v9.4.1, Build 01 CMCL < > Innovations 3.3 Tutorial 3 (Methane-Air CV PSR Homog)

3.3 Tutorial 3 (Methane-Air CV PSR Homog)

Methane-Air perfectly stirred constant volume reactor.

In this example, we run a simulation of methane-air combustion in a perfectly stirred constant volume reactor. This vessel is homogeneous (i.e. perfectly stirred), initially filled with a stoichiometric methane-air mixture, this mixture ignites and the reaction continues to propagate, fed by an inlet with a stoichio- metric methane-air mixture at 300K. After ignition, the reactor then reaches a steady-state condition.

3.3.1 Opening the tutorial

As with all previous tutorials; from the welcome menu users should select “Tut.03 (Methane-Air CV PSR Homog)” from the projects box on the left. By double clicking the project title, the project is the copied into the workspace before being loaded into the project window.

3.3.2 Mechanism

The chemical kinetic mechanism we wish to apply is the so-called Gri-Mech 3.0 (Gregory P. Smith, David M. Golden, Michael Frenklach, Nigel W. Moriarty, Boris Eiteneer, Mikhail Goldenberg, C. Thomas Bow- man, Ronald K. Hanson, Soonho Song, William C. Gardiner, Jr., Vi- tali V. Lissianski, and Zhiwei Qin, University of California, Berkeley (http://www.me.berkeley.edu/gri-mech/). In this case, this mechanism has been converted to kinetics format and loaded into the tool.

User Manual v9.4.1, Build 01 113 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations

3.3.3 Simulation set-up

In a perfectly stirred reactor with in-/out-flow, the residence time for reactions to occur is dictated by the inlet flow rates and the volume of the reactor. In this tutorial the reactor volume has been set to 67.4cm3.

This tutorial firstly seeks to ignite the mixture and then allow the reactor to reach a steady thermodynamic and chemical equilibrium. Initially our reactor composition is composed of un-reacted stoichiometric methane-air and thus we set the initial mixture state at 1.0 atm with a gas temperature of 2000K, Figure 3.13.

Figure 3.13: Tutorial 3: Setting-up the initial mixture state

This ensures the mixture can ignite then propagate the reaction as fresh (and un-reacted) stoichiometric methane-air is fed into the reactor. Note in this tutorial, the Equivalence Ratio has been set, meaning that both the fuel and oxidiser must be defined.

The simulation set-up is presented in the General Setting menu, the end of

c 2017 CMCL Innovations 114 User Manual v9.4.1, Build 01 CMCL < > Innovations 3.3 Tutorial 3 (Methane-Air CV PSR Homog) simulation is set at 0.22 ms. This ensures that the computation has enough time to ignite and reach a steady state condition.

This reactor type assumes a single output thus a total output mass flow rate is the sum of the inlet mass flow rates. In Figure 3.14, we set the number of inlets and also the parameter, . Users employ the parameter , to dictate the number of mixing events (between inlet and reactor volumes) which occur during a time step. Smaller values of  result in a greater number of mixing events, lower values of  have a higher CPU cost, however if the value of  is too great, simulations may have too few mixing events (even fewer than one mixing event per time step is possible) and thus results may be "noisy". It is the user’s discretion as what value of  should be applied based on the process condition. When the simulation is run, the terminal window outputs the number of mixing events per time step.

Figure 3.14: Tutorial 3: Defining the number of reactor inlets

In this tutorial, only a single inlet is defined, here the initial pressure is assumed identical to that observed in the reactor, the temperature 27 oC and mass flow rate 0.04kg/s are set in this window. The Composition is set as stoichiometric methane-air i.e. 5.516% CH4, 22.005% O2, 72.479% by mass. This reactor inlet can be inspected edited through the Reactor Inlets menu.

User Manual v9.4.1, Build 01 115 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations

3.3.4 Running the tutorial

Once the simulation is executed, the results according to Figure 3.15 are pre- sented. In this case, the initial reactor temperature of 2000 K is diluted by fresh unburned mixture at 27 oC, thus reducing the mean reactor temperature. On- going oxidation chemistry occurs resulting a rapid heat release rate between 0.12 and 0.16 ms, the reactor then moves to a steady state solution.

Figure 3.15: Tutorial 3: Output result of temperature vs. time

c 2017 CMCL Innovations 116 User Manual v9.4.1, Build 01 CMCL < > Innovations 3.4 Tutorial 4 (Methane-Air CV PSR Inhomog)

3.4 Tutorial 4 (Methane-Air CV PSR Inhomog)

Methane-air partially stirred constant volume reactor.

This tutorial is an extension of Tutorial 3. In this case, the more ideal "perfectly- stirred" assumption is contrasted with a more practical "partially-stirred" as- sumption with the addition of heat transfer and turbulent mixing sub-models. Users will be introduced to the stochastic methods applied to achieve a con- verged solution of a non-ideal (real-world) reactor.

3.4.1 Mechanism

This tutorial uses the same mechanism as described in section 3.3.2. Again the mechanism has been converted to kinetics format.

3.4.2 Simulation set-up

The majority of this simulation is set-up identically to that presented in Tutorial 3. However the General Settings menu, presented in Figure 3.16 has the addition of a “Number of Stochastic Particles”, this parameter enables users to resolve the reactor mass as a multi-dimensional PDF (Probability Density Function) of temperature and mixture composition, with the PDF represented using a stochastic reactor model. In contrast with a homogeneous PSR (e.g. Tutorial 3, which can be considered to have one particle, here we start with a value of 80. This enables a finer resolution of any stratification (of temperature and composition within the reactor), typically for a stratified mixture the order of 100-200 particles would be expected to achieve a well resolved solution. Later in the tutorial we will look at the sensitivity of the simulation result with respect to five different sets of particle numbers.

With the addition of a stochastic particles into the model, turbulent mixing pro- cess can be simulated. The associated parameters are set using the Turbulent

User Manual v9.4.1, Build 01 117 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations

Figure 3.16: Tutorial 4: Defining the number of stochastic particles

Mixing tab, as presented in Figure 3.17. In this case, the “Localness mixing model” has been applied due to its superior performance in terms of CPU time and ability to account for reactor composition stratification. Here a tur- bulent mixing time of 5.0 x 10−4 s is applied. The frequency of interactions between two particles is set by this input (together with the parameter, Cφ, thus simulating turbulent mixing processes by enabling temperature and mix- ture composition exchange between stochastic particles.

Figure 3.17: Tutorial 4: Defining the turbulent mixing time scale

Finally, since this reactor is non-ideal we must account for the influence of wall to gas (and gas to wall) heat transfer, these parameters are set according to the Heat Transfer menu as presented in Figure 3.18. Here the wall temperature is set at 420.0K.

c 2017 CMCL Innovations 118 User Manual v9.4.1, Build 01 CMCL < > Innovations 3.4 Tutorial 4 (Methane-Air CV PSR Inhomog)

Figure 3.18: Tutorial 4: Heat transfer set-up

3.4.3 Running the tutorial

Next we run the simulation through the “Simulation Controls” panel. This sim- ulation will take much longer than the previous cases (up to 15 minutes) as tur- bulent mixing processes must be computed and the chemistry must be solved in each stochastic particle.

3.4.4 Post-processing

Once the simulation is completed, create a table and graph using the Data Vi- sualisations menu. This should roughly look like the case presented in Figure 3.19.

3.4.5 Resolving the simulation: Number of particles

As observed in Tutorial 3 there is a ignition delay time of around 0.5 ms before subsequent progression toward a steady state reactor condition. However compared to Tutorial 3, the profile is more noisy, this is expected to be due to the stochastic noise associated with turbulent mixing processes (i.e. a less

User Manual v9.4.1, Build 01 119 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations

Figure 3.19: Tutorial 4: Result of temperature vs. time using 80 stochastic particles resolved PDF, requiring more stochastic particles). Next we will investigate the influence of the number of particles on the simulation results.

First we should setup our cases to carry out the same simulation with 5, 20, 40, 80 and 120 particles. This can be achieved by first creating 5 child cases through the Child Cases panel, returning to General Setting panel and defining a new variable for the number of stochastic particles; this can carried out sim- ply by typing a variable name surrounded by curly-brackets into the parameter box (e.g. {particles}).

Next, return to the table within the Child Cases menu to set the specific number of particles for each child case (as seen in Figure 3.20). Please be aware that running all child simulations can take up to 15 minutes.

The final result should look something like those presented in Figure 3.21. As the number of stochastic particles is increased, we move toward a more converged solution, at increasing CPU cost. In particular, in this case the results appear to show a sensitivity in the ignition delay time. However once ignition is observed, in general terms, the results are similar for all cases. This demonstrates the trade-off between CPU effort and the robustness of aspects of the solution, depending on the application, it is at the user’s discretion as to how to balance this trade-off.

c 2017 CMCL Innovations 120 User Manual v9.4.1, Build 01 CMCL < > Innovations 3.4 Tutorial 4 (Methane-Air CV PSR Inhomog)

Figure 3.20: Tutorial 4: Preparing multiple cases of number of stochastic par- ticles

Figure 3.21: Tutorial 4: Result of temperature vs. time using various numbers of stochastic particles

User Manual v9.4.1, Build 01 121 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations

3.5 Tutorial 5 (H2-Air PFR Homog)

Hydrogen-air plug-flow reactor (PFR).

In this tutorial, we run a simulation of a wall heated homogeneous plug flow reactor (PFR), with an initial composition of stoichiometric hydrogen-air.

We will observe an ignition event within the PFR and then will investigate the key reactions and their influence on the result using a pathway analysis.

3.5.1 Mechanism

This tutorial uses the same mechanism as described in Section 3.1.2.

3.5.2 Simulation set-up

In a PFR, the simulation has two additional Geometry inputs, “Cross Sectional Area” of the reactor and the corresponding “Mass flow rate”. The set-up of the reactor applied in this tutorial is presented in Figure 3.22.

Figure 3.22: Tutorial 5: Geometry

In PFR simulations, the initial composition is set upstream of the reactor, with

c 2017 CMCL Innovations 122 User Manual v9.4.1, Build 01 CMCL < > Innovations 3.5 Tutorial 5 (H2-Air PFR Homog) the initial thermodynamic state input as presented in the Initial Mixture menu. The fuel and oxidiser compositions are set using the same methods outlined in the previous tutorials.

The General Settings menu as presented in Figure 3.23 is employed to define the start and end of the simulation, these are defined in time (ms) rather than distance (mm). Whilst the data of simulations of PFRs are outputted in terms of distance along the reactor (and the mass flow rate is known) the density is not known until after the simulation is completed. As such the start, end and time step are defined using time.

Figure 3.23: Tutorial 5: Simulation settings

Finally, as presented in the Heat Transfer menu, as presented in Figure 3.24 in this tutorial, the wall temperature is set to be controlled at 1500K.

3.5.3 Post-processing: General

The live results of the simulation presented in Figure 3.25 show that heat trans- fer from wall to gas increases the temperature of the mixture to around 900K, at this point a rapid ignition event occurs. Then, over the second half of the simulation, heat transfer from gas to wall cools the mixture.

User Manual v9.4.1, Build 01 123 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations

Figure 3.24: Tutorial 5: Heat transfer tab

Figure 3.25: Tutorial 5: Result of temperature vs. reactor length

c 2017 CMCL Innovations 124 User Manual v9.4.1, Build 01 CMCL < > Innovations 3.6 Tutorial 6 (Engine HCCI)

3.6 Tutorial 6 (Engine HCCI)

HCCI engine combustion mode.

In this tutorial, a simulation of a premixed HCCI engine will be carried out. Initially with a single particle, the influence of stratification will then be demon- strated by increasing the number of stochastic particles used to represent the PDF of the in-cylinder composition.

3.6.1 Mechanism

The mechanism applied in this tutorial is the internal kinetics & SRM Engine Suite detailed chemical kinetics mechanism. It includes chemistry for the oxi- dation of n-heptane and iso-octane blends including detailed NOx and soot for- mation pathways. It has been calibrated with engine applications in mind and has proven effective in simulating engine combustion in all operating modes for dozens of engines over hundreds of operating points.

3.6.2 Using internal mechanisms

The mechanism used in this tutorial is one of several internal mechanisms that are provided with the kinetics & SRM Engine Suite. The internal mechanisms can be used in any simulation. The internal mechanisms have been carefully optimized for specific applications and a recommended set of default compo- sitions are provided to get you started. If needed, you can use the "Reset to Default" button to reset the compositions to the recommended defaults.

Note that the internal mechanisms cannot be viewed through the Mechanism Viewer, nor are they able to be used with the Chemistry Post-Processor tool.

User Manual v9.4.1, Build 01 125 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations

3.6.3 Simulation set-up

In this tutorial, the fuel is assumed to be fully premixed at IVC (Intake Valve Closing) with an equivalence ratio of 0.25 (set in initial mixture). For com- putational speed and for demonstrative purposes, this case will be solved in HRM (Homogeneous Reactor Model - equivalent to a single zone combus- tion model) mode by adopting only a single stochastic particle (defined in the General Settings tab) to represent the in-cylinder mixture and with zero mass fraction of EGR (defined in the initial mixture tab).

3.6.4 Running the tutorial

It is possible to follow the progress of the simulation in real time using the ’Live Results’ menu (providing the ’Live Visualisations’ option was enabled when the simulation was started), here users can follow the model terminal output at the bottom of the window and corresponding results are displayed graphically, Figure 3.26.

Figure 3.26: Tutorial 6: Result using one particle and no EGR

c 2017 CMCL Innovations 126 User Manual v9.4.1, Build 01 CMCL < > Innovations 3.6 Tutorial 6 (Engine HCCI)

3.6.5 Post-processing

Users can select any model output of their choice and plot it against any other. In addition users can add multiple experimental data stored in comma sepa- rated (*.csv) x, y text file format (with no header line) of any length as set out in section 2.7.1.

This data can be imported into kinetics & SRM Engine Suite by selecting Data Visualisations from the project tree and adding the external file using the Im- port External File panel.

3.6.6 Post-processing: Mean value data

Once completed, users can use the Data Visualisations tab to view the data quickly, or can build a table and plot these data using the method outline in Section 3.2.6.

Since this computation was carried out using only a single stochastic particle to represent the in-cylinder mixture, the influence of temperature stratification is neglected. Generally, this results in an overly rapid heat release when com- pared to experimental data.

3.6.7 Influence of number of particles

Next, in order to improve the assumptions of this model and make them more realistic, some internal EGR will be included as well as increasing the num- ber of stochastic particles. First, go to the General Settings tab and set the “Number of Stochastic Particles” to 50.

Next we would like to define the EGR composition. The result of the previous simulation yields an EGR file. This file can be found in the parent case folder with the name OutputCase00001Cyc0001Composition.egr. Copy this file, rename it to InputEGRComposition.egr and save it to a safe location such as the main cmcl_workspace.

User Manual v9.4.1, Build 01 127 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations

Next, after selecting the “Initial mixture - EGR Setting” tab, setup the EGR compositions by changing “EGR mass fraction” to 0.2 and setting the “Enable EGR Model” to "Use EGR". Click the View composition Button, then the “Im- port from file” button to browse to the appropriate directory and select the file InputEGRComposition.egr. To check its contents, if you click “EGR Visuali- sation” then the composition will be displayed. An example of this is presented in Figure 3.27.

Figure 3.27: Tutorial 6: Setting the EGR composition

Now users should re-run the updated simulation.

This time the computational time is much longer as the ODE solver must carry out computations for 50 stochastic particles rather than just one. As a rule of thumb, it would be expected to take around 15-20 minutes to complete this computation on a single processor desktop PC; however, the progress can be followed from the Live Results tab in real time. If you watch this simulation progress, you will notice that the number of evaluations required to achieve a solution at each time step increases as the simulation reaches closer to TDC. This is because combustion is occurring and it takes a larger number of iterations to reach a converged solution.

Once completed, the pressure-crank angle profile should look similar to that presented in Figure 3.28.

c 2017 CMCL Innovations 128 User Manual v9.4.1, Build 01 CMCL < > Innovations 3.6 Tutorial 6 (Engine HCCI)

Figure 3.28: Tutorial 6: Result using 50 particles with EGR

The addition of 20% EGR by mass has influenced the ignition of the charge in a number of interesting ways that would not normally be considered using other approaches to engine modelling. By fixing the initial temperature of the charge for both the EGR and non-EGR simulations, the effect of additional EGR has been demonstrated to be more than just dilutive. Ignition has oc- curred much earlier, suggesting that the EGR has some active components which can influence subsequent ignition events, in this case, attributed to NO advancing the ignition chemistry. Hence, by adopting detailed chemistry in the kinetics & SRM Engine Suite, these aspects can be properly addressed in a predictive manner. The result of the earlier ignition is a higher peak pres- sure when compared to the first attempt with no EGR and a single stochastic particle.

Whilst the composition of the charge has been altered through the addi- tion of EGR, the other significant effect compared to the case with a sin- gle particle has been on the rate of pressure rise and the peak pressure. Due to heat transfer from the compressed gas to walls, temperature strat- ification across the particles has resulted in different particles reacting at different rates. By plotting the standard deviation of particle temperatures (Std.Dev.Temperature[K]) against Crank angle, the standard deviation of the in-cylinder pressures can be viewed, Figure 3.29.

Prior to ignition at about 8 CAD bTDC the deviation in temperature increases

User Manual v9.4.1, Build 01 129 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations

Figure 3.29: Tutorial 6: Result using 50 particles with EGR - plotting standard deviation of the temperatures of the particles. during the compression stroke hence rather than combustion taking place (al- most) instantaneously as with the single particle case, combustion occurs over a longer duration, resulting in a smoother heat release profile. This is consis- tent with experimentally observed HCCI combustion events. In addition to the size of the chemical fuel model and the time step, the number of particles can be used to make a compromise between the level of detail and the computa- tional cost. For this tutorial exercise, a "smooth enough" pressure-crank angle profiles is reported with 50 stochastic particles; however, in order to ensure user confidence in the resolution, computations of this type should be carried out with at least 100 stochastic particles.

c 2017 CMCL Innovations 130 User Manual v9.4.1, Build 01 CMCL < > Innovations 3.7 Tutorial 7 (Engine - DI HCCI)

3.7 Tutorial 7 (Engine - DI HCCI)

Direct Injection HCCI engine combustion mode.

In this tutorial we investigate the influence of a direct injection event in a HCCI engine cycle. Users will learn how to set-up an initial in-cylinder composition at IVC (Intake Valve Closure) and time an injection of gasoline during the com- pression stoke. They will then learn how to perform an analysis to examine the sources of typical exhaust gas emissions.

3.7.1 Mechanism

The mechanism applied here is detailed in Section 3.6.1.

3.7.2 Simulation set-up

The most important parameters relevant to this example are;

1. The number of stochastic particles have been increased to 100 as the fuel and in-cylinder temperatures are stratified.

2. The initial in-cylinder mixture equivalence ratio is set to 0.1, a homoge- neous air-fuel mixture

3. The fuel injection model has been turned on to inject between -65.0 and -45.0 CAD aTDC with a total of 11.2 mg of fuel - stratifying the mixture in both equivalence ratio and temperature.

3.7.3 Running the simulation

This simulation should be expected to take longer than previously, due to an increased number of stochastic particles. Once completed, the pressure-crank angle profile should be similar to that in Figure 3.30.

User Manual v9.4.1, Build 01 131 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations

Figure 3.30: Tutorial 7: Result pressure profile

3.7.4 Post-processing

To demonstrate the use of the kinetics & SRM Engine Suite to examine the sources of emissions from the combustion event, results of the simulation can be analysed as follows.

The output files named "OutputCase00001Tab00000Cyc0001Par_EquivRatio.csv" and "OutputCase00001Tab00000Cyc0001Par_Temp.csv" are used to store the in-cylinder equivalence ratio and temperature for each stochastic particle with respect to crank angle. These can be plotted in a similar way to Figure 3.31. In this diagram, each mark represents the state of a stochastic particle at five crank angle times separated by 15.0 CAD.

At -30.0 and -15.0 CAD aTDC, the particle temperature is increased by on- going compression but also reduced on account of fuel evaporation. At 0.0 CAD aTDC, combustion has occurred for some of the richest stochastic parti- cles (T>1400K); as time continues the number of burned particles increases.

The histories of three specific stochastic particles are presented in Figure 3.32. For simplicity these were chosen as the richest, leanest and a typical stochas- tic particle in terms of equivalence ratio. Each mark represents a 1.0 CAD time-step and the compression process begins at the far left of the diagram. Based on the plot, it is possible to view the full history and therefore examine the process which leads to significant sources of emissions. The richest par- ticle absorbed a significant proportion of the fuel during injection and as time

c 2017 CMCL Innovations 132 User Manual v9.4.1, Build 01 CMCL < > Innovations 3.7 Tutorial 7 (Engine - DI HCCI)

Figure 3.31: The equivalence ratio and temperature of the 100 stochastic par- ticles at five crank angle timings passed the fuel then mixed with other particles, reducing the local equivalence ratio; however, once ignition occurred the highest combustion temperatures were reported in this particle. Due to ongoing mixing with other stochastic par- ticles and volume expansion, this temperature dropped during the expansion part of the cycle. However, this type of particle would typically be considered a major source of NOx . Conversely, the leanest stochastic particle did not reach such high temperatures during combustion but appears to have reached its maximum temperature due to mixing with burned particles. This leads to a major source of unburned hydrocarbons.

User Manual v9.4.1, Build 01 133 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations

Figure 3.32: The equivalence ratio and temperature of the three representa- tive stochastic particles over time

c 2017 CMCL Innovations 134 User Manual v9.4.1, Build 01 CMCL < > Innovations 3.8 Tutorial 8 (Engine - SI)

3.8 Tutorial 8 (Engine - SI)

Spark ignition engine combustion mode.

In this tutorial we run a simulation of an internal combustion engine run in spark ignition (SI) combustion mode. In this case we use pure iso-octane fuel as a surrogate for conventional gasoline.

3.8.1 Mechanism

The mechanism applied here is detailed in Section 3.6.1.

3.8.2 Simulation set-up

The major input parameters relevant to this example are outlined below;

1. Engine geometry - the location of the spark and shape of the pent cham- ber and piston bowl are defined

2. Spark Ignition timing - the time in CAD aTDC that a small pocket of gas is supplied the ignition energy. If fewer than 100 particles are adopted the ignition energy should be increased in order to facilitate the ignition.

3. Entrained rate constant - this dictates the entrainment rate of the un- burned mixture by the propagating flame brush and is the primary "tune- able" parameter in the SI model

4. Entrained zone mixing time - this is approximately the mixing time of the Taylor integral length scale and is the secondary "tuneable" parameter of the SI model.

The progress of this mode is similar to that in HCCI mode, until the timing of the ignition spark. At this point the stochastic particles are re-classified into three separate states: burned, entrained (burning) and unburned. The

User Manual v9.4.1, Build 01 135 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations mixing routines only mix within these zones to ensure that outwardly propa- gating flame structures are maintained and that the flame propagates from the burned to unburned mixtures. The entrained zone is split into two sub-zones: entrained-unburned and entrained-burning. Once entrained, particles move from entrained-unburned sub-zone to the entrained-burned sub-zone when the heat release rate from that particle increases. Particles move from the entrained-burning zone to the burned zone once their heat release rate has dropped below a secondary heat release rate. In addition, the maximum time for a particle to remain in the entrained state is limited to 2.5 ms.

Given the sensitivity of SI combustion to the turbulence flow field, in the ab- sence of other turbulence/flame speed data, it is suggested that values for "Entrainment rate constant" are optimised relative to reported in-cylinder pres- sure profiles.

3.8.3 Post-processing

The pressure-crank angle profile presented in Figure 3.33 demonstrates that combustion has occurred with a peak pressure of around 33 bar. Further analysis can be carried out as was done with the HCCI engine data.

c 2017 CMCL Innovations 136 User Manual v9.4.1, Build 01 CMCL < > Innovations 3.8 Tutorial 8 (Engine - SI)

Figure 3.33: Tutorial 8: Resulting pressure-crank angle

User Manual v9.4.1, Build 01 137 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations

3.9 Tutorial 9 (Engine - Turbocharged)

Turbocharged compression ignition diesel engine combustion.

In this tutorial we simulate a state-of-the-art highly boosted diesel fuelled in- ternal combustion engine.

3.9.1 Mechanism

The mechanism applied here is detailed in Section 3.6.1.

3.9.2 Simulation set-up

This tutorial example presents a stand-alone kinetics & SRM Engine Suite simulation of a turbocharged medium duty diesel engine running in compres- sion ignition direct injection (CIDI) mode. For the initial case set up of this high compression ratio engine, Figure 3.34 shows the geometry conditions for the engine.

Figure 3.34: Geometry conditions for a turbocharged Diesel engine

The pressure at IVC is set to 1.2 bar (Figure 3.35) and the temperature at IVC is 340 K. This example is run with 5.046% external EGR. The amount of the EGR stream is set in the initial mixture tab, and the EGR composition is specified by linking the EGR input file from a pre-run non-EGR case. The chemical model for n-heptane is used as a surrogate for diesel fuel kinetics.

c 2017 CMCL Innovations 138 User Manual v9.4.1, Build 01 CMCL < > Innovations 3.9 Tutorial 9 (Engine - Turbocharged)

The stochastic heat transfer parameter has been calibrated for this engine at 2000, and the mean wall temperature is set at 450 K.

Figure 3.35: Initial mixture: Intake conditions and EGR species specification

Late direct injection strategy is used in this example, where the start of injec- tion (SOI) is 6.0 CAD aTDC and the end of injection (EOI) is 23.5 CAD aTDC.

3.9.3 Post-processing

The simulation when run with 100 stochastic particles, yields the in-cylinder pressure profile as depicted in Figure 3.36.

The late injection timing results in the occurrence of heat release late in the expansion stroke as shown in Figure 3.37.

User Manual v9.4.1, Build 01 139 c 2017 CMCL Innovations CMCL < > 3 TUTORIALS Innovations

Figure 3.36: In-cylinder pressure profile

Figure 3.37: Heat release rate as a function of crank angle degrees.

c 2017 CMCL Innovations 140 User Manual v9.4.1, Build 01 Example projects & applications

In this chapter we present a summary of the example projects distributed with thek inetics & SRM Engine Suite software as well as a guide to successful calibration of the models.

These examples are designed to cover the diverse portfolio of applications which can be simulated using thek inetics & SRM Engine Suite software. They should offer a useful "starting point" for the most common of user defined projects, these should not be considered recommendations for which reaction mechanism should be applied to simulate a particular fuel. However if you feel your application is not covered, please contact our support team to discuss an appropriate starting point.

User Manual v9.4.1, Build 01 141 c 2017 CMCL Innovations CMCL < > 4 EXAMPLE PROJECTS & APPLICATIONS Innovations

4.1 Reactor examples

4.1.1 Constant Volume Reactor, Homogeneous

This is an example project named "Ex.01 (Constant Volume Reactor, Ho- mog)" which has been set up to demonstrate the pressure increase in a closed rigid vessel during combustion. This example uses the HRM (Homogeneous Reactor Model) by adopting only a single stochastic particle to represent the reactor mixture.

4.1.2 Constant Pressure Reactor, Homogeneous

This is an example project named "Ex,02(Constant Pressure Reactor, Ho- mog)" which has been set up to demonstrate the expansion of a gas, at con- stant pressure, during combustion. This example uses the HRM (Homoge- neous Reactor Model) by adopting only a single stochastic particle to repre- sent the reactor mixture.

4.1.3 Constant Volume Reactor, Heterogeneous

This is an example project named "Ex,03 (Constant Volume Reactor, Het- ero)" which has been set up to demonstrate the pressure increase in a closed rigid vessel during combustion. In contrast with the HRM (Homogeneous Re- actor Model) in Exercise 1, this example uses 10 stochastic particles in the simulation.

4.1.4 Constant Pressure Reactor, Heterogeneous

This is an example project named "Ex,04 (Constant Pressure Reactor, Het- ero)" which has been set up to demonstrate the expansion of a gas, at con- stant pressure, during combustion. In contrast with the HRM (Homogeneous

c 2017 CMCL Innovations 142 User Manual v9.4.1, Build 01 CMCL < > Innovations 4.1 Reactor examples

Reactor Model) in Exercise 2, this example uses 10 stochastic particles in the simulation.

4.1.5 Constant Volume PSR, Homogeneous

This is an example project named "Ex,05 (Constant Volume PSR, Homog)" which has been set up to demonstrate the PSR (Perfectly Stirred Reactor) model, which consists of a constant pressure vessel with inlet and outlet ducts.

4.1.6 Constant Pressure PSR, Homogeneous

This is an example project named "Ex,06 (Constant Pressure PSR, Ho- mog)" which has been set up to demonstrate a Perfectly Stirred Reactor at constant pressure.

4.1.7 Constant Volume PaSR, Heterogeneous

This is an example project named "Ex,07 (Constant Volume PaSR, Hetero)" which has been set up to demonstrate a Partially Stirred Reactor at constant volume. The turbulent mixing is modelled by the Localness sub-model, and the model uses 10 stochastic particles for the simulation.

4.1.8 Constant Pressure PaSR, Heterogeneous

This is an example project named "Ex,08 (Constant Pressure PaSR, Het- ero)" which has been set up to demonstrate a Partially Stirred Reactor at con- stant pressure. The turbulent mixing is modelled by the Localness sub-model, and the model uses 10 stochastic particles for the simulation.

User Manual v9.4.1, Build 01 143 c 2017 CMCL Innovations CMCL < > 4 EXAMPLE PROJECTS & APPLICATIONS Innovations

4.1.9 Constant Pressure PFR, Homogeneous

This is an example project named "Ex,09 (Constant Pressure PFR, Ho- mog)" which has been set up to demonstrate a Plug-flow Reactor at constant pressure. The assumption made for this reactor is perfect radial mixing, and no axial mixing.

4.1.10 Constant Pressure PFR, Heterogeneous

This is an example project named "Ex,10 (Constant Pressure PFR, Hetero)" which has been set up to demonstrate a Plug-flow Reactor at constant pres- sure. The assumption made for this reactor is perfect radial mixing, and no axial mixing. In contrast with the HRM (Homogeneous Reactor Model) in Ex- ercise 9, this example uses 10 stochastic particles in the simulation.

4.1.11 Constant Volume Adiabatic, Homogeneous

This is an example project named "Ex,11 (Constant Volume Adiabatic, Ho- mog)" which has been set up to demonstrate a pressure vessel that experi- ences no heat transfer, while at constant volume.

4.1.12 Constant Pressure Adiabatic, Homogeneous

This is an example project named "Ex,12 (Constant Pressure Adiabatic, Homog)" which has been set up to demonstrate a pressure vessel that expe- riences no heat transfer, while at constant pressure.

4.1.13 Cetane Number Reactor

This is an example project named "Ex,13 (Cetane Number Reactor)" which has been set up to demonstrate the Cetane rating test, which provides an

c 2017 CMCL Innovations 144 User Manual v9.4.1, Build 01 CMCL < > Innovations 4.1 Reactor examples indication of the combustion speed of a fuel. The direct injection is modelled by the PDF (Spray) sub-model, and the turbulent mixing is modelled by the Localness mixing sub-model.

4.1.14 Turbulent Mixing Reactor

This is an example project named "Ex,14 (Turbulent Mixing Reactor)" which has been set up to demonstrate the 4 different mixing models available: IEM, Curl, LMM, HMM. The ODE solver has been set to No-Chemistry, and the model uses 100 stochastic particles for the simulation.

4.1.15 Equilibrium Reactor

This is an example project named "Ex,15 (Equilibrium Reactor)" which has been set up to demonstrate an equilibrium reactor model, where the equi- librium composition is solely defined by the thermodynamic properties of the species.

4.1.16 Fischer-Tropsch reactions on a Co/γ-Al2O3 catalyst

This is an example project named "Ex.16 (Fischer-Tropsch reactions with a Co catalyst on a gamma-Al2O3 support)" which has been set-up to demon- strate the simulation of microkinetic reactions on a catalytic surface. The project simulates the Fischer-Tropsch conversion of CO and H2 to form hy- drocarbons in a closed reactor. The chemical mechanism was developed by Azadi et al. [3] and is able to describe the distribution of saturated and unsat- urated hydrocarbon products.

User Manual v9.4.1, Build 01 145 c 2017 CMCL Innovations CMCL < > 4 EXAMPLE PROJECTS & APPLICATIONS Innovations

4.1.17 Plasma reactor producing ZnO particles

This is an example project named "Ex.17 (Plasma Reactor producing ZnO particles)" which has been set-up to demonstrate the simulation of zinc oxide nanoparticle formation in a plasma reactor. The plasma reactor is modelled as a reactor network containing two reactors. The first reactor has an inlet supplying zinc plasma and simulates the reaction zone. The second reactor simulates the quench zone.

4.1.18 Hot wall reactor producing Si particles

This is an example project named "Ex.18 (Hot Wall Reactor producing Si particles)" which has been set-up to demonstrate the simulation of silicon nanoparticle formation in a hot wall reactor. The model simulates the thermal decomposition of the chemical precursors and the formation and growth of silicon nanoparticles in the reactor.

4.2 Engine examples

4.2.1 CFR IC engine - SI fuel testing

This is an example project named "Ex.01 (1 Cylinder CFR Engine SI Fuel)" which has been set-up to demonstrate knocking combustion by simulating the standard Research Octane Number test.

Combustion is simulated using a two zone empirical mass fraction burned pro- file tuned to experimentally observed pressure profiles. In this project, there are ten sequential simulations with an increasing compression ratio. As the compression ratio is increased, auto-ignition is observed and the knock onset time becomes more advanced and thus more severe. The fuel model 3 is a

3 Hatim Machrafi, Simeon Cavadias, Philippe Guibert, An experimental and numeri- cal investigation on the influence of external gas recirculation on the HCCI autoigni-

c 2017 CMCL Innovations 146 User Manual v9.4.1, Build 01 CMCL < > Innovations 4.2 Engine examples simple toluene/n-heptane/iso-octane oxidation mechanism which can be used as a surrogate for commercially available fuels.

4.2.2 4 cylinder 2.0 litre SI engine operating on 95 RON gasoline

This is an example project "Ex.02 (4 Cylinder 2L SI Engine 95RON Gaso- line)" which has been set-up to demonstrate a spark-ignition combustion event in an IC engine using the 3-zone predictive turbulent entrainment sub-model. In this case, the fuel is mixed with air in the intake system thus the composi- tion is assumed homogeneous at IVC. The fuel model is the internal detailed chemistry model for i-octane/n-heptane blend oxidation and emissions forma- tion, set-up as a simple surrogate for gasoline as 95% i-octane, 5%n-heptane by mass.

4.2.3 6 cylinder 3.0 litre SI high-performance IC engine

This is an example project named "Ex.03 (6 Cylinder 3L SI Engine)" which has been set-up to demonstrate a spark-ignition combustion event in a high performance SI IC engine. In this project, combustion occurs in a very short timescale and is simulated using a two-zone Wiebe. The corresponding fuel model is the internal detailed chemistry model for i-octane/n-heptane blend ox- idation and and emissions formation set here as 95% i-octane, 5%n-heptane.

4.2.4 4 cylinder 2.0 litre DISI IC engine with ethanol fuelling

This is an example project named "Ex.04 (4 Cylinder 2L DISI Ethanol)" which has been set-up to demonstrate a spark ignited ethanol fuelled injection and combustion event in an DISI engine.

tion process in an engine: Thermal, diluting, and chemical effects, Combustion and Flame, Volume 155, Issue 3, November 2008, Pages 476-489, ISSN 0010-2180, 10.1016j.combustflame.2008.05.001.

User Manual v9.4.1, Build 01 147 c 2017 CMCL Innovations CMCL < > 4 EXAMPLE PROJECTS & APPLICATIONS Innovations

A single direct injection event is carried out after IVC, distributing the ethanol liquid spray throughout the combustion chamber. As the liquid evaporates an associated cooling effect takes place leading to heavy stratification of the in- cylinder mixture. Once injection has completed, an ignition event is simulated, this results in flame propagation, this time simulated using a two-zone predic- tive turbulent entrainment model.

The fuel model 4 is a simple chemical kinetic model suitable for pure ethanol blends.

4.2.5 4 cylinder 2.0 litre SI IC engine with hydrogen fuelling

This is an example project named "Ex.05 (4 Cylinder 2L SI Engine H2)" which has been set-up to demonstrate premixed hydrogen fuelled combustion events in an SI IC engine.

Combustion is simulated using a predictive two-zone turbulent entrainment combustion model with the associated hydrogen fuel model 5 adopted for this simple example.

4.2.6 8 cylinder 40.0 litre HD IC engine with natural gas fu- elling

This is an example project named "Ex.06 (8 Cylinder 40L HD Natural Gas Fuelled SI)" which has been set-up to demonstrate a combustion in a heavy duty natural gas fuelled SI engine.

Combustion is simulated using a predictive two-zone turbulent entrainment combustion model with the fuel oxidation sub-model from Gri-Mech v3.0 6 ap-

4 Marinov, N. M, "A Detailed Chemical Kinetic Model for High Temperature Ethanol Oxida- tion," Int. J. Chem. Kinet. 31:183-220 (1999) 5 O’Connaire, M., H. J. Curran, J. M. Simmie, W. J. Pitz, and C. K. Westbrook, "A Compre- hensive Modeling Study of Hydrogen Oxidation," Int. J. Chem. Kinet., 36:603-622, 2004 (UCRL-JC-152569) 6 Gregory P.Smith, David M. Golden, Michael Frenklach, Nigel W. Moriarty, Boris Eiteneer, Mikhail Goldenberg, C. Thomas Bowman, Ronald K. Hanson, Soonho Song, William C.

c 2017 CMCL Innovations 148 User Manual v9.4.1, Build 01 CMCL < > Innovations 4.2 Engine examples plied for simulating natural gas combustion and emissions formation.

4.2.7 4 cylinder 2.0 litre diesel engine with multiple direct injections

This is an example project named "Ex.07 (4 Cylinder 2L Diesel MDI Engine EuroV)" which has been set-up to demonstrate a diesel fuelled engine with multiple direct injection events. The fuel model applied is the internal reduced diesel fuel mechanism for simulating diesel fuel oxidation and emissions for- mation.

Users can define the timings of pulsed injection events by defining SOI, EOI and injected mass (and import their own profiles via *.csv file format) as re- quired to assess alternative injection strategies.

4.2.8 4 cylinder 2.0 litre diesel engine with injection profile

This is an example project named "Ex.08 (4 Cylinder 2L Diesel Injec- tRateProf EuroV)" which has been set-up to demonstrate a diesel fuelled engine with injection rate profiles. The fuel model applied is the internal re- duced diesel fuel mechanism for simulating diesel fuel oxidation and emissions formation.

Users can define the timings of pulsed injection events by time in CAD and fuel injection mass rate (and import their own profiles via *.csv file format) as required to assess alternative injection strategies.

4.2.9 6 cylinder 2.0 litre diesel IC engine load-speed map

This is an example project named "Ex.09 (6 Cylinder 7L HD Diesel LSMap TierIV) which has been set-up to demonstrate a diesel fuelled engine fully calibrated over a full load-speed map. The fuel model applied is the internal

Gardiner, Jr., Vitali V. Lissianski, and Zhiwei Qin, University of California, Berkeley.

User Manual v9.4.1, Build 01 149 c 2017 CMCL Innovations CMCL < > 4 EXAMPLE PROJECTS & APPLICATIONS Innovations reduced diesel fuel mechanism for simulating diesel fuel oxidation and emis- sions formation.

Here the engine presented in 7 is available for analysis. In this study, a global set of model parameters were obtained and compared against experimental data.

4.2.10 8 cylinder 125.0 litre dual fuel IC engine

This is an example project named "Ex.10 (8 Cylinder 125L HD Dual NG Diesel)" which has been set-up to demonstrate a natural gas fuelled engine with diesel ignition via a direct injection.

In this project, the initial composition is set as an air/methane blend, the in- jected fuel is defined as n-heptane (a suitable surrogate for diesel). The fuel model was obtained from 8.

4.2.11 4 cylinder 2.3 litre diesel IC engine with gas ex- change

This is an example project named "Ex.11 (4 Cylinder 2.3L DI Diesel Breath- ing)" which has been set-up to demonstrate a diesel fuelled engine with gas exchange.

The initial boundary condition are set in the intake/exhaust manifolds with in- cylinder gas exchange over the valves and internal EGR compositions solved over three consecutive cycle strokes. Once the simulation reaches a steady state solution, users can output engine performance and emission data. The fuel model applied is the internal reduced diesel fuel mechanism for simulating

7 Andrew Smallbone, Amit Bhave, Michael Hillman, Allan Saville, Robert McDavid "Virtual Performance and Emissions Mapping For Optimization of Diesel Engine Design," SAE 2013-01-0308, 2013 8 Seiser, H., H. Pitsch, K. Seshadri, W. J. Pitz, and H. J. Curran, "Extinction and Autoigni- tion of n-Heptane in Counterflow Configuration," Proceedings of the Combustion Institute 28, p. 2029-2037, 2000

c 2017 CMCL Innovations 150 User Manual v9.4.1, Build 01 CMCL < > Innovations 4.2 Engine examples diesel fuel oxidation and emissions formation.

4.2.12 HCCI IC engine with Population Balance Soot Model

This is an example project named "Ex.12 (HCCI-Engine-PBS)" which has been set-up to demonstrate a HCCI combustion event in an IC engine. In this project, the Population Balance Soot Model has been enabled to support analysis of the particle sizes. The simulation carries out five successive cycles, recycling the EGR and the soot each time.

4.2.13 DISI IC engine with Population Balance Soot Model

This is an example project named "Ex.13 (DISI-Engine-PBS)" which has been set-up to demonstrate a spark-ignition combustion event in a direct in- jection SI IC engine. In this project, the Population Balance Soot Model has been enabled to support analysis of the particle sizes.

4.2.14 Standard SRM Engine

This is an example project named "Ex.14 (Standard SRM Engine)" which has been set up to demonstrate a 1.0L, 1 cylinder CIDI diesel engine. The project uses the physical model for direct injection.

4.2.15 4 cylinder 2.3 litre diesel CIDI IC engine

This is an example project named "Ex.15 (Multi-Cycle Breathing Engine)" which has been set up to demonstrate a 2.3L, 4 cylinder CIDI diesel engine with gas exchange. The direct injection is modelled using the PDF (spray) sub-model.

The initial boundary conditions are set in the intake/exhaust manifolds with in- cylinder gas exchange over the valves and internal EGR compositions solved

User Manual v9.4.1, Build 01 151 c 2017 CMCL Innovations CMCL < > 4 EXAMPLE PROJECTS & APPLICATIONS Innovations over three consecutive cycles. Once the simulation reaches a steady state solution, users can output engine performance and emissions data. The fuel model applied is the internal reduced diesel fuel mechanism for simulating diesel fuel oxidation and emission formation.

4.2.16 CIDI Engine

This is an example project named "Ex.16 (CIDI Engine)" which has been set up to demonstrate a 2.0L, 4 cylinder compression ignition direct injection diesel engine. The direct injection is modelled using the PDF (spray) sub-model.

4.2.17 DISI Engine

This is an example project named "Ex.17 (DISI Engine)" which has been set up to demonstrate a 2.0L, 4 cylinder direct injection spark ignition engine. The direct injection is modelled using the physical sub-model. The spark ignition is modelled by the Standard Wiebe (2-zone) sub-model. The fuel model is a simple toluene/n-heptane/ethanol/iso-octane oxidation mechanism which can be used as a surrogate for commercially available fuels.

4.2.18 Dual Fuel DI Pilot Ignition Engine

This is an example project named "Ex.18 (Dual Fuel DI Pilot Ignition En- gine)" which has been set up to demonstrate a 125L, 8 cylinder engine that can operate with the direct injection of a blend of diesel and methane gas. The direct injection is modelled using the PDF (spray) sub-model.

4.2.19 HCCI Engine

This is an example project named "Ex.19 (HCCI Engine)" which has been set up to demonstrate the operation of a 500cc, 1 cylinder engine using HCCI

c 2017 CMCL Innovations 152 User Manual v9.4.1, Build 01 CMCL < > Innovations 4.2 Engine examples

(Homogeneous charge compression ignition), which involves the compression of a homogeneous air-fuel mixture to the point of auto-ignition. The fuel used is 95RON Gasoline.

4.2.20 MON Test Engine

This is an example project named "Ex.20 (MON Test Engine)" which has been set up to demonstrate the Motor Octane Number test for a 600cc, 1 cylin- der engine. The spark ignition is modelled by the Standard Wiebe (2-zone) sub-model. The fuel model is a simple toluene/n-heptane/ethanol/iso-octane oxidation mechanism which can be used as a surrogate for commercially avail- able fuels.

4.2.21 Oil Driven Pre-Ignition in SI Engine

This is an example project named "Ex.21 (Oil Driven Pre-Ignition in SI En- gine)" which has been set up to demonstrate a 400cc, 1 cylinder spark ignition engine that experiences knocking due to the auto-ignition of oil droplets in the combustion chamber. The direct injection is modelled using the PDF (spray) sub-model. The fuel model is a simple toluene/n-heptane/ethanol/iso-octane oxidation mechanism which can be used as a surrogate for commercially avail- able fuels.

4.2.22 RON Test Engine

This is an example project named "Ex.22 (RON Test Engine)" which has been set up to demonstrate the Research Octane Number test for a 600cc, 1 cylinder engine. The spark ignition is modelled by the Standard Wiebe (2- zone) sub-model. The fuel model is a simple toluene/n-heptane/ethanol/iso- octane oxidation mechanism which can be used as a surrogate for commer- cially available fuels.

User Manual v9.4.1, Build 01 153 c 2017 CMCL Innovations CMCL < > 4 EXAMPLE PROJECTS & APPLICATIONS Innovations

4.2.23 SI Engine

This is an example project named "Ex.23 (SI Engine)" which has been set up to demonstrate the operation of a standard 2.0L 4 cylinder spark ignition internal combustion engine. The spark ignition is modelled by the 3-zone pre- dictive Turbulent Entrainment sub-model. The fuel model is a simple toluene/n- heptane/ethanol/iso-octane oxidation mechanism which can be used as a sur- rogate for commercially available fuels.

4.3 Model application - compression ignition en- gines

4.3.1 Model parameterisation

It is well known that the underlying physical processes which must be repre- sented in the simulation of internal combustion engines are extremely com- plex. The resources available to solve for these processes are limited from the perspective of the current state-of-the-art as well as the available CPU resources and the requirements of the solution. Models are generally simpli- fied through the adoption of parameters which are often "pseudo-known" and given sufficient experience in the application of the model, can be expected to be within specific ranges. It is important to accept that model parameters are a necessary aspect of all models and to consider that their parameterisation (calibration) of the model is a fundamental step in the application of the model.

4.3.2 Calibration procedure

For diesel engine applications, the model is parameterised using the sequence of events summarised in Figure 4.1.

• The first loop in Figure 4.1 represents the calibration of the motored

c 2017 CMCL Innovations 154 User Manual v9.4.1, Build 01 CMCL < > Innovations 4.3 Model application - compression ignition engines

pressure curve, which coincides with the firing pressure curve up until the start of combustion, close to TDC. If the simulation is running the full 720CAD cycle (i.e. the breathing model is enabled), then the manifold pressures (in the Engine Performance panel) and temperatures (in the Breathing panel) along with the valve lift profiles and discharge coeffi- cients need to be adjusted to achieve the correct cylinder trapped mass. If the simulation is set to the closed volume part only (i.e. from IVC to EVO), then the pressure and temperature at IVC define the cylinder trapped mass. The in-cylinder pressure at IVC is generally well known assuming that the engine has been instrumented with pressure trans- ducers, while the temperature is estimated. For this reason, it is recom- mended to adjust the temperature primarily in order to achieve the cor- rect trapped mass. Other important considerations to get the motored pressure curve to match with experimental measurements are:

– C.R.: although this is in theory a well-known geometric input to the model, in reality it is subject to manufacturing tolerances and engine usage effects that can result in an effective C.R. up to ±0.5 – Wrist Pin Offset: If the engine has a non-zero wrist pin offset, then it is paramount to input this feature correctly, both in terms of mag- nitude and sign and to select the appropriate TDC and Stroke con- vention flags. Please read Subsection 2.5.3 carefully for more de- tails.

• The second and third loops in Figure 4.1 refer to calibrating the ignition delay and the overall heat release rate. To this end, the fuel spread pa-

rameter αinj (assuming the “PDF (Spray)” injection model is selected) and/or the evaporation constant, λ, are adjusted to achieve the desired ignition delay that matches experimental start of combustion. While changing the ignition delay, the strength of the combustion will also be affected and this needs to be accounted for. Fortunately, these two pa- rameters have opposing effects in that, while the Alpha parameter links an advanced combustion with a weaker (in terms of peak pressure) com- bustion, the evaporation coefficient links an advanced combustion with

User Manual v9.4.1, Build 01 155 c 2017 CMCL Innovations CMCL < > 4 EXAMPLE PROJECTS & APPLICATIONS Innovations

a stronger (in terms of peak pressure) one. Therefore, they can be used accordingly if the resulting peak pressure is too high or too low compared to the experimental measurements.

• The mixing time, via the Cφ and Cφ,inj parameters, can be used to fine tune the length of combustion as well as its intensity. Please note that, given the fact that fuel injections are a major source of turbulent kinetic

energy and, hence, heavily modify the turbulent mixing time, the Cφ mul-

tipliers are divided in: normal Cφ which affects mixing time outside injec-

tion events and injection Cφ,inj which controls mixing time during injec-

tions plus the EOI lag. Cφ is generally useful to control the expansion stroke pressure by shortening/lengthening the heat release period.

• Heat transfer. Although this is usually a second order effect, the Woschni HRC2 parameter can help reduce excessive in-cylinder pressure after the main heat release events. It can be used to tweak the expansion stroke pressure profile. Please note that this parameter always “re- moves” pressure from the simulation, hence the user may require to adjust this in conjunction with one of the aforementioned ones that can “increase” pressure.

• As depicted in Figure 4.1, the final stages of calibration include adjusting the friction parameters in the Engine Performance panel and the emis- sion multipliers. This will assist the software in accurately predicting the

performance (IMEP, BMEP, SFC, etc.) and emission (NOx , uHC, PM, etc.) values respectively.

Once the model is set-up, this exercise is typically iterative, requiring numerous resolutions of the model and statistical comparison with experimental data. It is strongly recommended to perform calibration on at least 9 operating points that cover the corners (in terms of RPM and IMEP) of the engine operating map, before the model is applied in predictive mode.

The choice of the operating point used during parameterisation is important, in the method applied in this example the operating point considered to be at the center of the test matrix space was applied.

c 2017 CMCL Innovations 156 User Manual v9.4.1, Build 01 CMCL < > Innovations 4.3 Model application - compression ignition engines

4.3.3 Parameter sensitivity

A critical aspect for parameterising any model is to understand the influence of specific model inputs (such as parameters or boundary conditions) with respect to specific model outputs. This is often carried out by carrying out a sensitivity analysis.

In an effort to demonstrate the method applied to parameterise the model, the following is a demonstration of how each model parameter impacts on the model outcome. These can be used to achieve a “well” parameterised/global set of model parameters. This is carried out by considering four of the key metrics in assessing model/experiment consistency, these are presented in context with the corresponding heat release and pressure profile Figure 4.2.

A sensitivity analysis with respect to the five model parameters, liquid fuel evaporation rate, λ (influenced by the fuel properties and atomization of the injected spray into the turbulent flow), heat transfer co-efficient, turbulent mix- ing parameter, Cφ (a common term used in 3D-CFD), injector spray distribu- tion term, αinj (relating to the injected spray distribution within the cylinder) and number of stochastic particles (loosely equivalent to grid resolution, more particles yielding a more defined PDF) is completed, with results presented in Figures 4.3, 4.4, 4.5, 4.6 and 4.7 for a 40% perturbation from the control case.

As observed, the liquid fuel evaporation rate λ, has the greatest impact overall and should be considered the primary tuning parameter for the model. As would be expected, in the context of a diesel direct injection engine, the heat transfer co-efficient has a very small impact overall, in general terms this is usually 2000 for extended portfolio of engines simulated to date. The turbulent mixing parameter, Cφ is the second most sensitive, as it controls the rate of mixing and would be expected to make an impact particularly in the, mixture preparation (leading to ignition) and mixing controlled phase of combustion.

The injector spray distribution term, αinj dictates the degree of stratification generated by the injection event and thus has a significant impact on the in- cylinder composition and thus on combustion.

In the presented case, little sensitivity was observed for the number of stochas-

User Manual v9.4.1, Build 01 157 c 2017 CMCL Innovations CMCL < > 4 EXAMPLE PROJECTS & APPLICATIONS Innovations tic particles, this is because the simulation was converged. It would be consid- ered that this cases is fully converged in terms of combustion characteristics, nevertheless the NOx emissions are still showing some signs of sensitivity to number of particles. This is largely due to the face that (as presented in detail in a latter section the majority of NOx emissions are formed in only a fraction of the available particles. As such the PDF for NOx may find full convergence (fluctuations of <10.0 PPM) at a greater number of particles than the discussed combustion characteristics.

Finally, across the other four sensitivity analyses, NOx emissions proved the most sensitive model output, this is not an unexpected observation because the NOx emissions are a result of the cumulative effects of the proceeding combustion event itself.

4.3.4 Blind testing

Once the model has been parameterised locally, i.e. with respect to an engine operating point, the next step is to carry out a blind test of the model with respect to other operating points in the test matrix. The recommended method is presented in Figure 4.8.

The objective is to fix a global set of parameters and allow the model to be applied in a blind test (or cross validation exercise) mode, and thus to confirm that the model can mimic the experiments satisfactorily.

In the context of simulating internal combustion engines using the sub-models applied in this paper, the performance of the model during a blind test should be considered carefully. For example, the observed differences between model and experiment for mass flow rate through the intake/ exhaust systems would certainly be expected to be within experimental uncertainty, however the in-cylinder heat release rate is more difficult to compute precisely in a predic- tive model due to the complexity of the underlying physics, as such it would be expected to within 10% but capable of showing many of the features of the experimental trend.

c 2017 CMCL Innovations 158 User Manual v9.4.1, Build 01 CMCL < > Innovations 4.3 Model application - compression ignition engines

4.3.5 Extrapolating/interpolating in "predictive mode"

Once the performance of the model in the blind testing phase is considered satisfactory, the final step is to apply the model using the global parameter set in an interpolation/ extrapolation outside the test matrix space or in what is often called "predictive mode". The challenge is to ensure that the parame- terised model is sufficiently tested in the blind testing phase to offer sufficient confidence. Nevertheless, in general terms physics-based simulators such as 3D CFD and tools such as the proposed model would be expected to offer im- proved "predictive mode" performance over purely empirical/ statistical/ data based alternatives.

User Manual v9.4.1, Build 01 159 c 2017 CMCL Innovations CMCL < > 4 EXAMPLE PROJECTS & APPLICATIONS Innovations

Figure 4.1: Model parameterisation process (Part 1)

c 2017 CMCL Innovations 160 User Manual v9.4.1, Build 01 CMCL < > Innovations 4.3 Model application - compression ignition engines

Figure 4.2: Definitions of 10, 50% Heat Release (HR), maximum pressure rise rate, peak pressure and NOx emissions.

Figure 4.3: Parameter sensitivity of liquid fuel evaporation rate, λ with respect to 10, 50% Heat Release (HR), maximum pressure rise rate, peak pressure and NOx emissions.

User Manual v9.4.1, Build 01 161 c 2017 CMCL Innovations CMCL < > 4 EXAMPLE PROJECTS & APPLICATIONS Innovations

Figure 4.4: Parameter sensitivity of heat transfer co-efficient with respect to 10, 50% Heat Release (HR), maximum pressure rise rate, peak pressure and NOx emissions.

Figure 4.5: Parameter sensitivity of turbulent mixing parameter, Cφ with re- spect to 10, 50% Heat Release (HR), maximum pressure rise rate, peak pressure and NOx emissions.

c 2017 CMCL Innovations 162 User Manual v9.4.1, Build 01 CMCL < > Innovations 4.3 Model application - compression ignition engines

Figure 4.6: Parameter sensitivity of injector spray distribution term, αinj with respect to 10, 50% Heat Release (HR), maximum pressure rise rate, peak pressure and NOx emissions.

Figure 4.7: Parameter sensitivity of number of stochastic particles with re- spect to 10, 50% Heat Release (HR), maximum pressure rise rate, peak pressure and NOx emissions.

User Manual v9.4.1, Build 01 163 c 2017 CMCL Innovations CMCL < > 4 EXAMPLE PROJECTS & APPLICATIONS Innovations

Figure 4.8: Predictive model application

c 2017 CMCL Innovations 164 User Manual v9.4.1, Build 01 CMCL < > Innovations 4.4 Model application - spark ignition engines

4.4 Model application - spark ignition engines

4.4.1 Calibration procedure

For spark ignition engine applications, the majority of the calibration method- ology described in Subsection 4.3.2 is still largely valid. However, αinj and λ are no longer the main levers to calibrate HR. Instead, users should focus on:

Heat Release Depending upon the choice of sub-model for the Spark Ignition model, the following parameters should be adjusted:

2 or 3 zone turbulent flame propagation models Turbulent entrain- ment constant and flame thickness parameters.

Empirical Wiebe models The usual Wiebe parameters determine the shape of the burn profile. These are explained in more detail in the Wiebe subsections of 7.3.13.

Autoignition & knock The main parameters which control autoignition & knock are:

• Fuel model/chemistry sub-model

• Turbulent mixing parameter, Cφ • Heat transfer coefficient

As it was the case with compression igntion, it is always recommended to perform calibration on at least 9 operating points that cover the corners (in terms of RPM and IMEP) of the engine operating map, before the model is applied in predictive mode.

User Manual v9.4.1, Build 01 165 c 2017 CMCL Innovations Coupling with 3rd party software tools

This section presents the methodology applied in coupling the kinetics & SRM Engine Suite to 3rd-party 1D engine cycle simulation tools.

Example cases are presented that include pre-built projects configured ready for coupling with 3rd-party tools.

c 2017 CMCL Innovations 166 User Manual v9.4.1, Build 01 CMCL < > Innovations 5.1 Ricardo WAVE

5.1 Ricardo WAVE

Ricardo WAVE is a 3rd party software tool used for IC engine simulation. It can be used to communicate the initial boundary conditions (IVC) for the kinetics & SRM Engine Suite. The kinetics & SRM Engine Suite is then initialized and run automatically via the coupling and results exported back to Ricardo WAVE.

5.1.1 Licensing

The software licensing is supported using the same methods as applied for the stand alone kinetics & SRM Engine Suite and hence most issues are ad- dressed in Section 1.3. Nevertheless the coupling may require some additional configuration.

A local USB licence dongle No additional changes required. Only the USB dongle must be plugged into the local machine.

A network USB licence dongle Each machine must have access to the li- cence via the network. To communicate the location of the license server to the coupling, it may be required that the CMCL.ini file (configured according to Section 1.3.3) be located in the same folder as the corre- sponding SRM-coupling-WAVE.exe file.

5.1.2 Setting-up the WAVE and kinetics & SRM Engine Suite coupling

WAVE must be set-up to use an external cylinder model. An example project has been included with your installation.

Load up the SRMv81_WAVE_single_cylinder.wvm project using Ricardo WAVE. A screen shot of an example project is presented in Figure 5.1. If your licence permits the use of this coupling but you do not have ac-

User Manual v9.4.1, Build 01 167 c 2017 CMCL Innovations CMCL < > 5 COUPLING WITH 3RD PARTY SOFTWARE TOOLS Innovations cess to this an example file, please contact our software support team (sup- [email protected]).

Figure 5.1: Screen shot of the single cylinder project.

The kinetics & SRM Engine Suite is coupled to Ricardo WAVE via an exter- nal cylinder module. To view the details associated with this module go to "Model/External/Cylinder..." see Figure 5.2.

Figure 5.2: Ricardo WAVE - External Cylinder Models

c 2017 CMCL Innovations 168 User Manual v9.4.1, Build 01 CMCL < > Innovations 5.1 Ricardo WAVE

Make sure that the "Directory" parameter points to the location of the SRM-coupling-WAVE.exe file. As the coupling cannot handle lengthy path- names, it is recommended that this folder is stored in the root directory of any accessible hard drive. The "Command" parameter should be the SRM- coupling-WAVE.exe executable followed by a "{$prefix}" command, then the cylinder number (in this case 1).

After closing the "External Cylinder Models" window, double click on the blue external cylinder, this opens up the "External Cylinder Panel" shown in Figure 5.3. If you click on the "External Model" tab, you will see a list of the DuctID and four connections to the external cylinder. Connection Number 1 and 2 correspond to intake and 3 and 4 to exhaust.

Figure 5.3: Ricardo WAVE - External Cylinder Panel

Next click on the "Constants" box on the toolbar, this box should look like Figure 5.4.

In this example there are six cases which vary various WAVE and kinetics& SRM Engine Suite inputs.

User Manual v9.4.1, Build 01 169 c 2017 CMCL Innovations CMCL < > 5 COUPLING WITH 3RD PARTY SOFTWARE TOOLS Innovations

Figure 5.4: Ricardo WAVE - Constants

5.1.3 Exchanging data between codes

The coupling is invoked by reading the InputParams.xml and engine.xml files, once read these files are closed and the data can then be modified by the coupling executable using the following two methods.

1. Cycle-dependent parameters: Such as pressure, temperature at IVC and EVO, these are exchanged between the two codes on a per time step basis

2. External Constants: Many parameters must be parsed using an External Constants file contacting standardized names. These standard constant names are listed in Table 5.1.The External Constants are parsed via an

c 2017 CMCL Innovations 170 User Manual v9.4.1, Build 01 CMCL < > Innovations 5.1 Ricardo WAVE

output file. Which should be named identically to the main project with an *.xml suffix. The User must then highlight the Constants they wish to be parsed to the kinetics & SRM Engine Suite. If the content of an External Constant is to remain unchanged from the values stored in the InputParams.xml and engine.xml files, there is no need to define it.

Figure 5.5: Ricardo WAVE - External Constants

The kinetics & SRM Engine Suite requires the same directory structure as in the stand alone version "WorkingDir". This should be situated in the same folder as the SRM-coupling-WAVE.exe. In addition to this executable, the following supplementary files are required dpwin32.dll, SRMAuxInfo.bin, SR- MAuxInfoR.bin, SRMAuxInfoTH.bin and SRMAuxInfoDF.bin.

When the kinetics & SRM Engine Suite-WAVE coupling runs, firstly it opens, the InputParams.xml and engine.xml files, afterwards the code reads those stored in the external constants files. As such it is recommended that the stand alone GUI is used initially to setup the kinetics & SRM Engine Suite

User Manual v9.4.1, Build 01 171 c 2017 CMCL Innovations CMCL < > 5 COUPLING WITH 3RD PARTY SOFTWARE TOOLS Innovations

Coupled version by using the InputParams.xml and engine.xml files generated by the stand alone GUI.

5.1.4 Running the model

The WAVE model should be run as normal, at the moment of IVC, the kinetics & SRM Engine Suite will take control of the simulation, results are plotted in the standard plotting tools.

c 2017 CMCL Innovations 172 User Manual v9.4.1, Build 01 CMCL < > Innovations 5.1 Ricardo WAVE continued to the next page... inetics & SRM Engine Suite inputs k EGR ified, 3 CMCL reduced FUELSPECINDEX2 - Ricardo WAVE coupling - Table 5.1: General nameGeometry Engine SpeedInitial Mixture Initial fuel air equivalence ratioInitial fuel massInternal EGR mass fraction External ConstantExternal Name EGR mass fraction FUELAIREQUIVRATIORBFFlag SPEEDChemFlag INTERNALEGR EXTERNALEGR FUELMASSFuel Composition Fuel Species Index Unit - 0 manually define internal EGR, 1 calculate internal 0 turn off chemistry, 1 CMCL detailed, 2 User spec- FUELSPECINDEX1 (mass fraction) (mass fraction) RPM g -

User Manual v9.4.1, Build 01 173 c 2017 CMCL Innovations CMCL < > 5 COUPLING WITH 3RD PARTY SOFTWARE TOOLS Innovations continued to the next page... FUELMASSFRAC2 - General nameFuel Species Mass FractionSolver Number of FUELMASSFRAC1 ParticlesTurbulent mixing External Constant NameMain Mixing TimeBurned zone mixing time (SI only)Entrained zone mixing time (SI only)Direct Injection mixing NUMPAR time TAUB TAUEHeat transfer Cylinder Wall Temperature - TAUU TAUINJ Unit Spark Ignition Turbulent flame entrainment constantSpark timing WALLTEMP ENTRATECONST - ms ms CADSPARK ms ms - K CAD aTDC ...continued from the previous page

c 2017 CMCL Innovations 174 User Manual v9.4.1, Build 01 CMCL < > Innovations 5.1 Ricardo WAVE 3 /s 2 m continued to the next page... µ WIEBEDUR CAD General nameTurbulent length ScaleWiebe Parameters: AWiebe Parameters: MWiebe Parameters: Combustion Dura- tion TURBLENGTHDirect Injection External WIEBEA ConstantStart Name of Injection 1 WIEBEMEnd of Injection 1Total mass in Injection 1Evaporation ConstantFuel liquid mass density SOI1 MFUEL1 Unit EOI1 LAMBDAEVAP m RHOLIQ - - mm mg CAD aTDC CAD kg/m aTDC Fuel liquid temperatureInitial SMD TLIQ SMD0 K Injection velocityFull Cone angleHeat of vaporisationInjection Alpha INJVELOC VAPHEAT CONEFULLANGLE INJ_ALPHA degrees m/s MJ/kg - ...continued from the previous page

User Manual v9.4.1, Build 01 175 c 2017 CMCL Innovations CMCL < > 5 COUPLING WITH 3RD PARTY SOFTWARE TOOLS Innovations General name External Constant Name Unit ...continued from the previous page

c 2017 CMCL Innovations 176 User Manual v9.4.1, Build 01 CMCL < > Innovations 5.2 GT-Power

5.2 GT-Power

The GT-Power coupling is supplied with two example maps (*.gtm files) to demonstrate the coupling methodology. As such, we recommend using either map as a starting point for all projects involving such co-simulations. The map named "Example-Vxxxx-SCTE.gtm" is a basic single cylin- der test engine map and "SRM-SCE-DF-Vxxxx-CMCL-reviewed.gtm" is also a single cylinder engine running on dual fuel. Both maps can be found in their respective folders in a zip file named "GT-Power-SRM-Engine-suite-v8.4-coupling.zip", which is avail- able for downloading from your dedicated CMCL Innovations website. In order to use any of these maps, its folder should be extracted to a local directory where you have full-write access, and the example map opened in the same way as any conventional GT-Power maps (*.gtm files). Additionally, you must ensure that you have set up the co-simulation files correctly by following the steps included in Subsection 5.2.1. If your licence permits the use of this coupling but you do not have access to the ".zip" file, please contact our software support team ([email protected]). Please note that depending upon the version of GT-Power installed on your computer, you may be required to convert the provided example.gtm file to that version using GT-Power itself.

5.2.1 Using GT-Power

This subsection details the required steps to set up GT-Power-SRM co- simulation files in your Windows machine. The coupling between GT-Power and the kinetics & SRM Engine Suite is made using a set of files provided in the aforementioned GT-Power-SRM-Engine-suite-v8.4-coupling.zip. There are three files within the Dll-files_for_bin_folder folder that need to be extracted to the bin folder within your GT-Power installation directory. Depending on the architecture of your Windows version (32/64bit) and the GT-

User Manual v9.4.1, Build 01 177 c 2017 CMCL Innovations CMCL < > 5 COUPLING WITH 3RD PARTY SOFTWARE TOOLS Innovations

Power solver being used (32/64bit)9 the files will go in:

• C:\Program Files\GTI\bin\win32 if you are using a 32bit version of .

• C:\Program Files (x86)\GTI\bin\win32 if you are using a 64bit version of Microsoft Windows but a 32bit version of the GT-Power solver.

• C:\Program Files (x86)\GTI\bin\win64 if you are using a 64bit version of both Microsoft Windows and GT-Power solver.

A description of each individual file being copied is as follows: dpwin32.dll/dpwin64.dll Dinkey Pro Windows library that controls the li- censing of the kinetics & SRM Engine Suite

CMCL.ini Supporting file for dpwin32.dll/dpwin64.dll that controls the access to network licences for the coupling library from the kinetics& SRM Engine Suite. Please refer to 1.3 for details on how to configure this file or use the one from your main kinetics & SRM Engine Suite in- stallation directory (C:\Program Files\Kinetics and SRM Engine Suite\CMCL.ini).

GTIusr7x_dp.dll This is the SRM co-simulation file. The x indicates the version of GT-Power for which this library was created. For example, GTIusr74_dp.dll is for GT Power v7.4. Please note that you will be prompted to confirm if you are sure you wish to overwrite the existing files in that folder. Click yes. If access to the original GTIusr7x_dp.dll is needed at a later time, you may choose to make a copy of it by renaming it to GTIusr74_dp-original.dll before overwriting it.

9 Please see Subsection 5.2.3 to learn how to choose different solvers

c 2017 CMCL Innovations 178 User Manual v9.4.1, Build 01 CMCL < > Innovations 5.2 GT-Power

Figure 5.6: Copying the files

Figure 5.7: Example Map.

5.2.2 GT-Power SRM Cylinder Inputs

The SRM co-simulation solver works by acquiring data from three different locations, in increasing order of priority:

User Manual v9.4.1, Build 01 179 c 2017 CMCL Innovations CMCL < > 5 COUPLING WITH 3RD PARTY SOFTWARE TOOLS Innovations

• The InputParams.xml file in the WorkingDir folder sitting next to GT- Power’s map.

• The variables defined via the UserModelSRM as explained below. The SRM User Model is introduced to the cylinder via an External Cylinder Model (ExtCylMod) as shown in Figure 5.8.

• GT-Power’s solver directly.

The implication of the above hierarchy is that any parameter which is included in the list of variables in the UserModelSRM will always take its value from there rather than from InputParams.xml. If you want to control the value of a parameter not currently in the list in UserModelSRM, then that must be done via InputParams.xml.

Figure 5.8: GT-Power External Cylinder Object pointing to the SRM User Model.

To review and/or modify the parameters set in the kinetics & SRM Engine Suite part of the coupled simulation; access the "Objects" menu on the L.H.S. of the GT-Power map and under "General/References/UserModel", click on the "UserModelSRM". The "Integer", "Real Numbers" and "Strings" tabs from this window are shown in figure below.Note that as the "Real Numbers" array is 71-entries long.

c 2017 CMCL Innovations 180 User Manual v9.4.1, Build 01 CMCL < > Innovations 5.2 GT-Power

Figure 5.9: "Integer" array within the UserModelSRM

The individual parameters and their values are explained in Table 5.2, whereas some of the most prominent parameters are discussed here. The ChemModel option in the integer array, Figure 5.10 enables the user to use the internal detailed (set at 1) or reduced (set at 3) chemical fuel models. The Example GT-Power map uses option 3, i.e. the reduced mechanism provided by CMCL Innovations. The fuel species indices 1 and 2 correspond to n-heptane and iso-octane species representing the "fuel surrogate". The oxidiser species indices 32 and 33 correspond to oxygen and nitrogen to represent "air". Thus, when a user enables the detailed chemical mechanism option, then n-heptane index needs to be set at 96 and iso-octane at 128, whereas oxygen is set at 56 and nitrogen at 57. The corresponding fuel and oxidiser mass fractions are given in the "Real Numbers" array as shown in Figure 5.10. New species for the fuel and oxidiser can be added to the "Integer" and "Real numbers" arrays, in the form of additional rows. Care must be taken to modify the number of fuel and oxidiser components in the "Integer" array accordingly.

For the heat transfer sub-model, the surface area ratios and wall temperatures for the piston, cylinder head and the liner are also declared in the "Real Num-

User Manual v9.4.1, Build 01 181 c 2017 CMCL Innovations CMCL < > 5 COUPLING WITH 3RD PARTY SOFTWARE TOOLS Innovations bers" array as shown in Figure 5.10.

Figure 5.10: "Real Numbers" array within the UserModelSRM (part 1)

The Strings array as shown in Figure 5.11 enables the user to couple an ex- ternal user-specified chemical mechanism. The user mechanism file needs to be renamed to "user-mech.srm" and the user thermodynamic data file needs to be renamed to "user-therm.srm". The two user-specified files need to be stored in the same folder as the GT-Power map (gtm) file. Note that, in this case, the ChemModel in the "Integer array" needs to be set to 2 and the fuel and oxidiser indices need to be modified to match the indices in the user- specified mechanism.

c 2017 CMCL Innovations 182 User Manual v9.4.1, Build 01 CMCL < > Innovations 5.2 GT-Power

Figure 5.10: "Real Numbers" array within the UserModelSRM (part 2)

Figure 5.10: "Real Numbers" array within the UserModelSRM (part 3)

User Manual v9.4.1, Build 01 183 c 2017 CMCL Innovations CMCL < > 5 COUPLING WITH 3RD PARTY SOFTWARE TOOLS Innovations

Figure 5.11: "Strings" array within the UserModelSRM

c 2017 CMCL Innovations 184 User Manual v9.4.1, Build 01 CMCL < > Innovations 5.2 GT-Power continued to the next page... inetics & SRM Engine Suite inputs k EGR duced GT-Power coupling - Table 5.2: General nameInitial Mixture FuelFlagInitial fuel air equivalence ratioInitial fuel massInternal EGR mass fractionExternal EGR mass fraction External FuelMass ConstantRBFFlag or Name FuelAirEquivRatioChemModel intEGR extEGR 0 for FuelAirEquivRatio, FuelMass 1 or for FuelAirEquivRatio FuelMassFuel Composition Fuel Species - IndexFuel Species Mass Fraction Unit Number of fuel species - 0 manually define internal EGR, 1 calculate internal 1 CMCL detailed, 2 g User FuelBlend%MassFrac specified, 3 CMCL re- FuelBlend%SpecIndex FuelBlen%NumCpts (mass fraction) (mass fraction) - -

User Manual v9.4.1, Build 01 185 c 2017 CMCL Innovations CMCL < > 5 COUPLING WITH 3RD PARTY SOFTWARE TOOLS Innovations continued to the next page... General nameSolver Number of ParticlesTurbulent mixing Main Mixing TimeBurned zone mixing time External (SI Constant only) NameEntrained zone mixing time (SI only)Direct Injection mixing NumPar time tauB tauEHeat transfer Cylinder Wall Temperature tauU tauInjSpark Ignition Turbulent flame entrainment constant Unit Spark timing WallTemp EntMixConstTurbulent length ScaleWiebe Parameters: A - TURBLENGTH ms ms WIEBEA CADSPARK ms ms - K m CAD aTDC - ...continued from the previous page

c 2017 CMCL Innovations 186 User Manual v9.4.1, Build 01 CMCL < > Innovations 5.2 GT-Power 3 /s 2 m continued to the next page... µ WIEBEDUR CAD General nameWiebe Parameters: MWiebe Parameters: Combustion Dura- tion Height to roofDirect Injection WIEBEMStart of Injection 1 External ConstantEnd Name of Injection 1Total mass in Injection 1Evaporation ConstantFuel liquid mass density hToRoof SOI MFuel EOI LambdaEvap Unit RhoLiq - mm mg CAD aTDC CAD aTDC kg/m Fuel liquid temperatureInitial SMD Tliq SMD0 K Injection velocityFull Cone angleHeat of vaporisationInjection Alpha InjVeloc VapHeat ConeHalfAngle INJ_ALPHA degrees m/s MJ/kg - ...continued from the previous page

User Manual v9.4.1, Build 01 187 c 2017 CMCL Innovations CMCL < > 5 COUPLING WITH 3RD PARTY SOFTWARE TOOLS Innovations General name External Constant Name Unit ...continued from the previous page

c 2017 CMCL Innovations 188 User Manual v9.4.1, Build 01 CMCL < > Innovations 5.2 GT-Power

Much of the geometry for the external cylinder is parsed directly from GT- Power itself, however the SI related inputs must be defined via the EXTERNAL CONSTANTS. Volume is also passed directly from GT-Power; this implies that, in cases where there is a non-zero wrist pin offset, TDC and Stroke conven- tions are governed by the EngCylGeom object in GT-Power. Similarly, Engine speed is also read directly from the GT-Power interface.

5.2.3 Running the model

The SCTE Example GT-Power map included in the .zip file is configured to dis- tinguish between cycles run with GT-Power’s combustion model (in this case a simple Wiebe function) and the cycle run with the SRM combustion model. There are three steps required to create this methodology in a new or existing map that is not the one included from the example:

• Create variables (in [] brackets) for the GT-Power combustion model ob- ject and the External Cylinder Model Object found in the Cylinder object that you want to modify to use the SRM in certain cycles. Figure 5.12 shows the variable [gt_combustion_model] created for the GT-Power combustion model in the “Main” tab, while Figure 5.13 shows the variable [srm_combustion_model] created for the SRM combustion model in the “Advanced” tab, both in the cylinder object in question.

• Create a variable for the “Initialization state” under the “Initialization” tab of the “Run Setup” (accessible by pressing F12). Figure 5.14 depicts the variable [ISTATE] being used for this purpose.

• Set up pairs of cases in the “Case Setup” window such that the com- bustion models are alternatively used and the cases that use the SRM Combustion Model are always initialised using the previous case as seen in the last three rows of the table in Figure 5.15. The number of cy- cles should also be adjusted such that enough cycles are run with GT- Power’s combustion model to reach steady state conditions which are

User Manual v9.4.1, Build 01 189 c 2017 CMCL Innovations CMCL < > 5 COUPLING WITH 3RD PARTY SOFTWARE TOOLS Innovations

Figure 5.12: Using a variable in the GT-Power combustion model object field.

Figure 5.13: Using a variable in the external cylinder model object field

then passed to the kinetics & SRM Engine Suite for the detailed com- bustion cycle. In Figure 5.15, 10 cycles are run with the Wiebe func- tion before 1 cycle is completed with the kinetics & SRM Engine Suite. Please note that when using this approach, the “Starting Cycle Number” field in the EngCylSRM object should be set to 1.

Before the simulation is run, it is important to note that in a 64bit Windows machine where 64bit GT-Power (standard) has been installed, the user has the

c 2017 CMCL Innovations 190 User Manual v9.4.1, Build 01 CMCL < > Innovations 5.2 GT-Power

Figure 5.14: GT-Power Case Initialisation settings.

Figure 5.15: GT-Power Case Setup window showing the alternating strategy for the combustion models.

option of selecting GT-Power solver architecture. Please refer to Figure 5.16 to learn where this operation is performed. Depending on this choice, GT-Power will require either the 32bit or 64bit version of the couplings as explained in Subsection 5.2.1.

User Manual v9.4.1, Build 01 191 c 2017 CMCL Innovations CMCL < > 5 COUPLING WITH 3RD PARTY SOFTWARE TOOLS Innovations

Figure 5.16: GT-Power Solver Settings window

5.2.4 Using kinetics & SRM Engine Suite co-simulation in your existing GT-Power maps

As stated at the beginning of this section, the example maps provided with the kinetics & SRM Engine Suite co-simulation files are intended to provide you with some baseline preconfigured map that showcases the methodology to use the kinetics & SRM Engine Suite co-simulation capabilities within GT- Power. If no specific GT-Power map exists for a given project, these example maps are a good starting point for your project. However, if you do want to transfer the kinetics & SRM Engine Suite co-simulation implementation to an existing GT-Power map, the following steps need to be followed:

1. Copy and paste the UserModelSRM and the whole SRMGTP Harness module to the new map.

2. Use the standalone kinetics & SRM Engine Suite to create and con-

c 2017 CMCL Innovations 192 User Manual v9.4.1, Build 01 CMCL < > Innovations 5.2 GT-Power

figure your engine project. Then copy the parent_case_1 folder that contains all the xml input files to the same folder level as your .gtm GT-Power map. Rename it to WorkingDir. Additionally, copy the SRMAuxInfo-xx.bin mechanism files from the example folder to, again, the same folder level as your .gtm GT-Power map.

3. Ensure that the steps described in Subsection 5.2.3 are replicated in your existing GT-Power map.

5.2.5 GT-Power outputs

In addition to the usual outputs from GT-Power, the kinetics & SRM Engine Suite also offers an additional set of nineteen unique outputs; these are listed in Table 5.3. These are provided via the "SRMGTPHarness" item and the "DummyMonitor". These two components are also represented in the map in Figure 5.7. As an example, outputs 1,2,3 have been included in the Map; these can be extended to the full set of 11 by starting a new link between the SRMGTPHarness and DummyMonitor-01. This is done via the "Start a new link" button in the toolbar menu of GT-Power.

Figure 5.17: Output signals windows when creating a new link between the harness and monitor object.

User Manual v9.4.1, Build 01 193 c 2017 CMCL Innovations CMCL < > 5 COUPLING WITH 3RD PARTY SOFTWARE TOOLS Innovations

Table 5.3: Outputs

Output Signal Number Output signal description 1 CA50 (CAD) 2 MaxPRR (bar/CAD) 3 CA90 (CAD) 4 CO (ppm) 5 CO (g/hr) 6 NOx (ppm) 7 O2 (%) 8 NOx (g/hr) 9 Unburnt Hydrocarbons (ppm) 10 Unburnt Hydrocarbons (g/hr) 11 C2H2 (g/hr) 12 NO mass fraction (-) 13 CO mass fraction (-) 14 CO2 mass fraction (-) 15 O2 mass fraction (-) 16 N2 mass fraction (-) 17 H2 mass fraction (-) 18 H2O mass fraction (-) 19 Soot mass fraction (i)

In the example provided, GT-Power runs a total of ten engine cycles in a sep- arate case before the case where the kinetics & SRM Engine Suite is called begins. When the kinetics & SRM Engine Suite cycles start, the working direc- tory is populated with multiple "*.csv" files which contain the outputs from the kinetics & SRM Engine Suite. These outputs are identical to the stand-alone kinetics & SRM Engine Suite outputs. To see the pressure and temperature in real time, you can watch the command prompt to see the outputs from the kinetics & SRM Engine Suite. This window will also show any user specific

c 2017 CMCL Innovations 194 User Manual v9.4.1, Build 01 CMCL < > Innovations 5.2 GT-Power errors if there are any.

5.2.6 Coupling with aftertreatment

In addition to the two single cylinder test engine maps, a map with the kinetics & SRM Engine Suite coupled to GT-Power’s aftertreatment model is also provided. The map named “SRM-with-aftertreatment-Vxxxx.gtm” consists of the example map "Example-Vxxx-SCTE.gtm" combined with the aftertreatment portion of the example map shipped with GT-Power lo- cated in “Examples → Aftertreatment → Engine + Aftertreatment → Detailed_Engine_Aftertreatment.gtm”. It includes a diesel oxida- tion catalyst (DOC), a diesel particulate filter (DPF), and a selective catalytic reduction process.

In the approach demonstrated in the example, it is assumed that the chemical composition produced by the kinetics & SRM Engine Suite is representative of the engine out composition at steady state. In order to utilise the detailed composition from the kinetics & SRM Engine Suite, the example is set up such that two cases are performed sequentially one after another. The first case is identical to the example “Example-Vxxxx-SCTE.gtm” where GT-power’s com- bustion model is simulated for 9 cycles to reach steady state conditions which are then passed to the kinetics & SRM Engine Suite for detailed combustion calculation in the 10th cycle. Then, the second case uses the final state of the first case as the initial condition and simulates the system for 10 cycles without the kinetics & SRM Engine Suite. The chemical composition in the first case should be ignored because the kinetics & SRM Engine Suite will not start until the final cycle. Figure 5.18 shows how the parameters [ISTATE] and [srm_start] are used to achieve this.

The map with the kinetics & SRM Engine Suite coupled to GT-Power’s af- tertreatment consists of two circuits after the exhaust pipe. The circuit at the bottom is a duplicate of the top circuit with additional monitors and reaction objects. Both circuits are simulated simultaneously but each uses its optimal time step and the appropriate solver. The top circuit is called the explicit circuit

User Manual v9.4.1, Build 01 195 c 2017 CMCL Innovations CMCL < > 5 COUPLING WITH 3RD PARTY SOFTWARE TOOLS Innovations

Figure 5.18: Case set up. and it is responsible for solving the flow properties. The bottom circuit is called the QS circuit (because it uses the quasi-steady flow solver) and its function is to simulate the chemical mechanisms in the aftertreatment system. Thus, the time step used in the QS circuit is much smaller than the explicit circuit. The discretisation lengths of the catalyst objects are also smaller in the QS circuit.

The flow settings for the circuits are set within Home → Run Setup → FlowControl. The Part Name List Object Identifying Circuits Belong- ing to Column objects require a single part name from each circuit. Detailed solver settings such as time step are set within the Time Step and Solution Control Object objects.

Figure 5.19: Flow control settings.

c 2017 CMCL Innovations 196 User Manual v9.4.1, Build 01 CMCL < > Innovations 5.2 GT-Power

Figure 5.20: A portion of the map.

The QS circuit begins with an EndFlowInletSpecies object that specifies the boundary condition at the inlet for the aftertreatment system. Cycle averaged temperature and mass flow rate are passed from the explicit circuit via the SensorConn, MovingAverage, and ActuatorConn objects. The Moving Av- erage object averages the output signal over 1 cycle before passing it to the ActuatorConn object. Figure 5.21 shows an example on how the appropriate signal can be chosen for the connection between the exhaust pipe and the SensorConn object. The MovingAverage object averages the signal from the exhaust over each cycle before passing it to the Actuator. The Actua- tor is needed to alter the corresponding property in the EndFlowInletSpecies object and the corresponding link settings are depicted by Figure 5.22.

The chemical composition produced by the kinetics & SRM Engine Suite is passed to the EndFlowInletSpecies object via the UserCodeHarness. The UserCodeHarness produces the signals after a completed simulation of the kinetics & SRM Engine Suite. The selection of the output signal from the User-

User Manual v9.4.1, Build 01 197 c 2017 CMCL Innovations CMCL < > 5 COUPLING WITH 3RD PARTY SOFTWARE TOOLS Innovations

Figure 5.21: Link settings for the connection between the exhaust pipe and the SensorConn object.

Figure 5.22: Link settings for the connection between the Actuator and the EndFlowInletSpecies object.

CodeHarness has been illustrated in Figure 5.17 and the signal number cor- responds to the list in Table 5.3. The chemical composition going into the af- tertreatment system is specified via the XYTableMulti object named Concen- trationSteady located at Main → Composition Time Series within the EndFlowInletSpecies object (Figure 5.23). Each column within the XYTable- Multi object corresponds to a chemical species (Figure 5.24). While making a connection to the EndFlowInletSpecies object, the actuated species corre- sponds to the column number in XYTableMulti (Figure 5.25).

Besides transferring information from the explicit circuit to the QS circuit, sev- eral quantities are also passed from the QS circuit to the explicit circuit. For the

c 2017 CMCL Innovations 198 User Manual v9.4.1, Build 01 CMCL < > Innovations 5.2 GT-Power

DOC and SCR, the wall temperatures of the catalyst bricks are imposed to be the temperature from the QS circuit at the corresponding locations, whereas the DPF in the explicit circuit uses the pressure drop from the DPF in the QS circuit.

Figure 5.23: EndFlowInletSpecies object.

Figure 5.24: XYTableMulti object that specifies the chemical composition.

User Manual v9.4.1, Build 01 199 c 2017 CMCL Innovations CMCL < > 5 COUPLING WITH 3RD PARTY SOFTWARE TOOLS Innovations

Figure 5.25: Connecting the signal containing the species mass fraction to EndFlowInletSpecies.

c 2017 CMCL Innovations 200 User Manual v9.4.1, Build 01 Part II

Theory

User Manual v9.4.1, Build 01 201 c 2017 CMCL Innovations Ideal reactor models

This chapter describes the models and numerical methods used by the ideal reactor models in thek inetics & SRM Engine Suite software.

c 2017 CMCL Innovations 202 User Manual v9.4.1, Build 01 CMCL < > Innovations 6.1 Chemical and thermodynamic models

6.1 Chemical and thermodynamic models

The following sections describe the chemical and thermodynamic models that are available within kinetics & SRM Engine Suite.

6.1.1 Chemical mechanisms

The chemistry that may occur in a kinetics & SRM Engine Suite model is de- fined in a chemical mechanism. The framework used to specify a mechanism is based on the taxonomy described by Kee and co-workers [21]. The frame- work may be applied to describe a variety of problems, including homoge- neous gas-phase reactions and heterogeneous reactions at the interface be- tween a surface and an adjacent gas. Examples include combustion of gases and solids, growth and/or etching of materials and heterogeneous catalysis.

The framework is based on a hierarchical structure that describes the chemical mechanism in terms of materials, reactions, phases, species and elements.

Materials

A chemical mechanism must contain a gas phase and may optionally contain any number of materials. Each material must include the specification of any site or bulk phases that can exist in the material, and must contain at least one site phase or one bulk phase.

Reactions

The gas phase may include the specification of any reactions that can occur between species belonging to the gas phase. Each material may include the specification of any reactions that can occur between species belonging to the gas phase and the material.

User Manual v9.4.1, Build 01 203 c 2017 CMCL Innovations CMCL < > 6 IDEAL REACTOR MODELS Innovations

Phases

Three types of phase are permitted: A gas phase, site phases that exist at the interface between the gas phase and a bulk phase and bulk phases that exist as a solid phase that is remote from the gas-solid interface. Each site and bulk phase must belong to a specific material.

Each phase must include the specification of the species that exist in the phase, and must contain at least one species. The names of the species must be unique within the gas phase and the set of phases in each material.

Species

Three types of species are permitted: Species that exist in the gas phase, species that exist on site phases, and species that exist in bulk phases.

Each species is associated with its own thermodynamic data and must be- long to a specific phase. For example, the properties of carbon monoxide molecules adsorbed on different catalysts may differ depending on the cata- lyst, so the carbon monoxide adsorbed on the different catalysts could reason- ably be considered to be different species existing on different phases, even though their elemental composition is the same.

Surface species are defined as species that exist on a site phase. This model does not require a surface has to be flat. A surface may be uneven and may even be defined as being many atoms thick. Each surface species occupies a defined number of sites on the surface. The sites are locations at which species can bind to the surface. The number of sites per unit area is specified as a property of the site phase, and is often assumed to remain constant.

There are different naming conventions for surface species. The atomic site convention and the open site convention are discussed below. Both are valid.

Atomic site convention The top-most layer of a surface is described in terms of the species that form the surface. Gas-phase species are able to

c 2017 CMCL Innovations 204 User Manual v9.4.1, Build 01 CMCL < > Innovations 6.1 Chemical and thermodynamic models adsorb onto the sites occupied by the surface species.

For example, imagine the formation of silica, SiO2 from silicic acid, Si(OH)4 as shown in Figure 6.1a. Gas-phase Si(OH)4 is adsorbed at an SiO2 surface site.

The Si(OH)4 now occupies the top-most layer so is designated as a surface species. The SiO2 that was at the surface is now buried so has become a bulk species. In the atomic site convention, the reaction is written as

Si(OH)4(g) + SiO2(s) )−−−−* Si(OH)4(s) + SiO2(b), (6.1) where (g), (s) and (b) denote gas-phase, surface and bulk species. The num- ber of sites is unchanged. The reaction conserves both sites and elements.

Open site convention An alternative description of the above example is shown in Figure 6.1b. Rather than the Si(OH)4 being adsorbed at an SiO2 surface site, it is absorbed at an ‘open’ site. In the open site convention, the reaction is written as

Si(OH)4(g) + O(s) )−−−−* Si(OH)4(s), (6.2)

where O(s) denotes an open site. The open site contains no chemical elements (it is empty), so this reaction conserves both sites and elements.

(a) Atomic site convention. (b) Open site convention.

Figure 6.1: Illustration of different naming conventions for surface species.

User Manual v9.4.1, Build 01 205 c 2017 CMCL Innovations CMCL < > 6 IDEAL REACTOR MODELS Innovations

Thermochemistry for different site conventions In the case of the atomic site convention, the change in a thermochemical property across a reaction, for example the heat for reaction ∆Hr , is calculated as the difference in the heats of formation of the products and the reactants. In the case of the open site convention and because the two conventions describe an identical event, it is apparent that the thermochemical properties of the open site must be related to the properties of the site and bulk species. For the example shown in Figure 6.1, the heat of formation of the open site is

∆H = ∆H − ∆H . (6.3) f O(s) f SiO2(s) f SiO2(b)

If the thermodynamic properties of SiO2(s) and SiO2(b) were taken to be equal, the heat of formation of the open site would be zero. If using the open site convention, it is important to ensure that the thermodynamic properties of the surface sites are specified consistently.

Elements

Each mechanism must define the elements that are contained in the species in the mechanism. The elements are defined globally in the mechanism.

6.1.2 Equation of state

The gas phase is assumed to obey the Ideal Gas Law

X PV = nk RTk , (6.4)

k∈Sgas where nk is the number of moles and Tk is the temperature of species k, and

Sgas is the set of gas-phase species. In the current model, the gas-phase species are constrained to have the same temperature.

The Ideal Gas Law is a good approximation for many gases. It neglects molecular size and intermolecular forces, so the best accuracy is achieved

c 2017 CMCL Innovations 206 User Manual v9.4.1, Build 01 CMCL < > Innovations 6.1 Chemical and thermodynamic models for monomolecular gases at high temperatures and low pressures.

6.1.3 State variables

The state variables used by the chemical and thermodynamic models are

[n s T ] , (6.5) where n is a vector of the number of moles of each gas-phase species, s is a vector of the molar concentrations any of site=phase and bulk-phase species and T is a vector of the temperature in each material (see Section 6.1.1).

In addition, either the system volume V or pressure P must be specified, as must the surface area An of each material.

6.1.4 Conversion formulae for system variables

The state variables and equation of state can be used to evaluate other quan- tities that are required by the chemical and thermodynamic models.

Gas phase quantities

Molar concentration n c = k . (6.6) k V

Mole fraction n X = k . (6.7) k P n k∈Sgas k

Mass fraction n W Y = k k , (6.8) k P n W k∈Sgas k k where Wk is the molecular weight of species k.

User Manual v9.4.1, Build 01 207 c 2017 CMCL Innovations CMCL < > 6 IDEAL REACTOR MODELS Innovations

Mean molecular weight

X W¯ = Xk Wk (6.9)

k∈Sgas P k∈S nk Wk = gas (6.10) P n k∈Sgas k P k∈S ck Wk = gas (6.11) P c k∈Sgas k 1 = . (6.12) P Yk k∈Sgas Wk

Mass density 1 X ρ = n . (6.13) V k k∈Sgas

Site phase quantities

Site fraction sk σk Zk (n) = , (6.14) Γn where Zk (n) is the site fraction of species k in phase n, Γn is the site den- sity (number of sites per unit area) in phase n and σk is the number of sites occupied by species k. The site fractions are normalised such that

X Zk (n) = 1, (6.15)

k∈Sn where Sn is the set of species that belong to site phase n.

c 2017 CMCL Innovations 208 User Manual v9.4.1, Build 01 CMCL < > Innovations 6.1 Chemical and thermodynamic models

Bulk phase quantities

Mole fraction of bulk species in phase n

s X (n) = k , (6.16) k P s k∈Sn k where Sn is the set of species that belong to bulk phase n.

6.1.5 General reaction equation

The reactions specified in the chemical mechanism can be written in the form

K K X 0 X 00 νki χk )−−−−* νki χk , i = 1, ..., I, (6.17) k=1 k=1

th 0 00 where χk is the k chemical species and νki and νki are the forward and re- verse stoichiometric coefficients of species k in reaction i.

6.1.6 Thermodynamic properties

The standard-state thermodynamic properties of all species (regardless of phase) are assumed to be functions of temperature only. This assumption corresponds to thermally “perfect” gas-phase species.

Molar species properties

The properties for each species are evaluated based on polynomial fits to dimensionless variables. The following equations are stated for arbitrary-order polynomials. In the current model, the properties are evaluated using two 7- coefficient NASA polynomials for each species, with each polynomial covering a separate temperature range, such that M = 5 in equations (6.18)–(6.20).

User Manual v9.4.1, Build 01 209 c 2017 CMCL Innovations CMCL < > 6 IDEAL REACTOR MODELS Innovations

Heat capacity at constant pressure The standard-state molar heat capac- ◦ ity of species k at constant pressure, Cpk is calculated as

◦ M Cpk X = a T (m−1). (6.18) R mk k m=1

◦ Enthalpy The standard-state molar enthalpy of species k, Hk is given by

Z Tk ◦ ◦ ◦ Hk = Cpk dT + Hk (298), 298 such that ◦ M (m−1) H X amk T aM+1,k k = k + , (6.19) RTk m Tk m=1 ◦ where aM+1,k R is the standard molar enthalpy of formation at 298 K, Hk (298).

◦ Entropy The standard-state molar entropy of species k, Sk is given by

Z Tk ◦ ◦ Cpk ◦ Sk = dT + Sk (298), 298 T such that ◦ M (m−1) S X amk T k = a ln T + k + a , (6.20) R 1k k m − 1 M+2,k m=2 ◦ where aM+2,k R is the standard molar entropy at 298 K, Sk (298).

Heat capacity at constant volume The standard-state molar heat capacity ◦ of species k at constant volume, Cvk is calculated as

◦ ◦ Cvk = Cpk − R. (6.21)

◦ Internal energy The standard-state molar internal energy of species k, Uk is calculated as ◦ ◦ Uk = Hk − RTk . (6.22)

c 2017 CMCL Innovations 210 User Manual v9.4.1, Build 01 CMCL < > Innovations 6.1 Chemical and thermodynamic models

Gibbs free energy The standard-state molar Gibbs free energy of species ◦ k, Gk is calculated as ◦ ◦ ◦ Gk = Hk − Tk Sk . (6.23)

Helmholtz free energy The standard-state molar Helmholtz free energy of ◦ species k, Ak is calculated as

◦ ◦ ◦ Ak = Uk − Tk Sk . (6.24)

Specific (mass-based) species properties

Specific (mass-based) thermodynamic properties are calculated by dividing the corresponding molar property by the molecular weight.

◦ ◦ Cpk cpk = . (6.25) Wk ◦ ◦ Hk hk = . (6.26) Wk ◦ ◦ Sk sk = . (6.27) Wk ◦ ◦ Cvk cvk = . (6.28) Wk ◦ ◦ Uk uk = . (6.29) Wk ◦ ◦ Gk gk = . (6.30) Wk ◦ ◦ Ak ak = . (6.31) Wk

Mixture-averaged properties of gas mixtures

Mixture-averaged properties may be calculated. The actual values of the spe- cific heats, enthalpies, and internal energies are the same as the standard-

User Manual v9.4.1, Build 01 211 c 2017 CMCL Innovations CMCL < > 6 IDEAL REACTOR MODELS Innovations state values for mixtures of perfect gases. We therefore drop the ◦ superscript for these quantities. The mixture properties are more complex for the entropy, Gibbs and Helmholtz free energies.

Heat capacity at constant pressure

X C¯p = Cpk Xk , (6.32)

k∈Sgas X c¯p = cpk Yk = C¯p/W¯ . (6.33)

k∈Sgas

Heat capacity at constant volume

X C¯v = Cvk Xk , (6.34)

k∈Sgas X c¯v = cvk Yk = C¯v/W¯ . (6.35)

k∈Sgas

Enthalpy

X H¯ = Hk Xk , (6.36)

k∈Sgas X h¯ = hk Yk = H¯ /W¯ . (6.37)

k∈Sgas

Internal energy

X U¯ = Uk Xk , (6.38)

k∈Sgas X u¯ = uk Yk = U¯ /W¯ . (6.39)

k∈Sgas

c 2017 CMCL Innovations 212 User Manual v9.4.1, Build 01 CMCL < > Innovations 6.1 Chemical and thermodynamic models

Entropy

X S¯ = Sk Xk , (6.40)

k∈Sgas

s¯ = S¯ /W¯ , (6.41) where

◦  Sk = Sk − R ln (Xk ) − R ln P/Patm . (6.42)

Gibbs free energy

X G¯ = (Hk − Tk Sk )Xk , (6.43)

k∈Sgas

g¯ = G¯ /W¯ , (6.44)

where Sk is given by equation (6.42).

Helmholtz free energy

X A¯ = (Uk − Tk Sk )Xk , (6.45)

k∈Sgas

a¯ = A¯ /W¯ , (6.46)

where Sk is given by equation (6.42).

Standard-state

The standard-state for gas-phase species is defined as an ideal gas at Patm. The standard-state for pure surface species is defined as the chemical poten- ◦ tial of the species on a surface with a fixed standard-state site density Γn.

User Manual v9.4.1, Build 01 213 c 2017 CMCL Innovations CMCL < > 6 IDEAL REACTOR MODELS Innovations

The chemical potential of species k at temperature T may be written as

◦ µk = µk (T ) + RT ln(ak ), (6.47)

◦ where µk (T ) is the standard-state chemical potential, ak is the activity

γk ck ak = ◦ , (6.48) ck and γk is an activity coefficient, ck is a generalised concentration (or partial ◦ pressure) and ck is the standard generalised concentration of species k. In the current model, phases containing multiple species are assumed to be perfect mixtures, so γk = 1 ∀ k. The state of surface phases is assumed to be independent of pressure. Under these assumptions, the activity is given as  c / Patm , k ∈ S  k RT gas  ◦ ak = sk σk /Γn, k ∈ Ssite (6.49)    Xk (n) , k ∈ Sbulk where Sgas, Ssite and Sbulk are the sets of gas, site and bulk species.

Chemical equilibrium

The Gibbs free energy of a system is minimised at chemical equilibrium

∂G = 0, (6.50) ∂ζ T ,P where ζ is some reaction coordinate. Noting that the partial molar Gibbs free energy is described by the chemical potential, the change in Gibbs free energy for the reactions defined in equation (6.17) can be written

  K ∂G X 00 0 = νki µk , where νki = νki − νki . (6.51) ∂ζi T ,P k

c 2017 CMCL Innovations 214 User Manual v9.4.1, Build 01 CMCL < > Innovations 6.1 Chemical and thermodynamic models

Substituting the chemical potential as per equation (6.47), applying the con- dition in equation (6.50) and assuming that all species exist at temperature T K K X ◦ X νki  νki µk (T ) = −RT ln ak , (6.52) k k such that ◦ ∆ri G = −RT ln KTi , (6.53)

◦ where ∆ri G is the change of Gibbs free energy due to reaction i

K ◦ X ◦ ∆ri G = νki µk (T ) (6.54) k and KT i is the thermodynamic equilibrium constant for reaction i

K Y ν KTi ≡ ak ki . (6.55) k

Equilibrium constant The equilibrium constant can be written in terms of concentrations by substituting the activity from equation (6.48) into equa- tion (6.55)

K Y ν Kci ≡ ck ki k K K Y ν Y ◦ ki −νki = KTi ck γk . (6.56) k k

Applying the definition of activity for the current model in equation (6.49) gives

X X νki ν P  ki atm k∈Sgas Y ◦ Y −ν K = K · Γ k∈Sn · σ ki , (6.57) ci Ti RT n k n∈Ssite phase k∈Ssite where Sgas, Ssite and Ssite phase are the sets of gas species, site species and site phases. In reactions involving only a gas phase, equation (6.57) reduces

User Manual v9.4.1, Build 01 215 c 2017 CMCL Innovations CMCL < > 6 IDEAL REACTOR MODELS Innovations to X ν   ki Patm K = K k∈Sgas . (6.58) ci Ti RT

6.1.7 Chemical reactions

The chemical equation for a general set of reactions may be written as per equation (6.17). This includes both homogeneous gas-phase reactions and heterogeneous reactions at the interface between the gas phase and a sur- face.

Rate of progress

The rate of progress qi of reaction i is calculated as

K K Y Fki Y Rki qi = kfi [χk ] − kri [χk ] , (6.59) k=1 k=1 where kfi and kri are the forward and reverse rate constants of reaction i,[χk ] is the concentration of species k and Fki and Rki are the forward and reverse 3 order of reaction of species k in reaction i. The units of qi are mol/m /s for gas-phase reactions and mol/m2/s for surface reactions.

By default, the reverse rate constant kri is calculated via chemical equilibrium

kfi kri = , (6.60) Kci where the equilibrium constant Kci is given by equation (6.57). Alternatively, explicit rate parameters may be specified for the reverse reaction. In this case, the reaction is treated as a pair of irreversible reactions.

Equation (6.59) is valid for mass-action kinetics. By default, it is assumed the mechanism specifies elementary reactions, such that the orders of reaction

c 2017 CMCL Innovations 216 User Manual v9.4.1, Build 01 CMCL < > Innovations 6.1 Chemical and thermodynamic models are equal to the stoichiometric coefficients

0 Fki = νki , 00 Rki = νki .

If necessary, alternative values may be specified in the mechanism for the order of reaction of a particular species. This often occurs in cases where several elementary reactions have been written as a global or lumped reaction.

Note that any orders of reaction do not preserve the relationship

00 0 Rki − Fki = νki − νki will introduce a dimensional inconsistency into equation (6.59) for reactions that use equation (6.60) to evaluate the reverse rate constant.

Species concentrations

The definition of the species concentration in equation (6.59) depends on the type of species. By default, it is assumed that  c , k ∈ S  k gas  [χk ] = sk , k ∈ Ssite (6.61)    ak , k ∈ Sbulk

3 where ck is the volumetric concentration (in mol/m ), sk is the surface concen- 2 tration (in mol/m ) and ak is the activity of species k, and Sgas, Ssite and Sbulk are the sets of gas, site and bulk species.

The rate parameters for a given reaction in the mechanism may be specified using alternative definitions of the concentration, including alternative units and that the rate constant is defined in terms of partial pressures

[χk ] = pk , k ∈ Sgas (6.62)

User Manual v9.4.1, Build 01 217 c 2017 CMCL Innovations CMCL < > 6 IDEAL REACTOR MODELS Innovations and/or site fractions

[χk ] = Zk (n) , k ∈ Ssite. (6.63)

In such cases, unit conversions are performed to ensure that the overall units of the reaction rate are consistent with equation (6.59).

Mean field approximation In all cases, the species concentration is calcu- lated using a mean field approximation within each material. That is to say, the gas phase species are assumed to be well mixed and the surface species are assumed to be homogeneously distributed over each surface. This model precludes the existence of local regions with different concentrations.

Species production rates

The production rateω ˙ k of species k is calculated as

I X  00 0  ω˙ k = νki − νki qi aki , (6.64) i=1

0 00 where νki and νki are stoichiometric coefficients defined as per equation (6.17), qi is the rate of progress of reaction i, and aik is defined  1, i ∈ S (which implies that k ∈ S )  g gas  aki = 1, i ∈ Sn and k ∈ Ssite ∪ Sbulk    An/V , i ∈ Sn and k ∈ Sgas where Sgas, Ssite and Sbulk are the sets of gas, site and bulk species, Sg is the set of gas-phase reactions, Sn is the set of reactions that belong to material n,

An is surface area of material n, and V is the volume of the gas phase.

c 2017 CMCL Innovations 218 User Manual v9.4.1, Build 01 CMCL < > Innovations 6.1 Chemical and thermodynamic models

6.1.8 Gas-phase reaction rate constants

Gas-phase reactions describe reactions between species in the gas phase. A number of models exist for the rate constants of gas-phase reactions.

Modified Arrhenius reactions

By default, the forward rate constant is assumed to have a modified Arrhenius temperature dependence   −Ei k = A T ni exp , (6.65) fi i RT where Ai is the pre-exponential factor, ni is the temperature exponent and Ei is the activation energy of reaction i, and T is the temperature of the gas phase.

Landau-Teller reactions

In some cases, for example vibrational energy transfer processes, it is more appropriate to use a Landau-Teller rate expression   Bi Ci kfi = Ai exp 1 + 2 , T 3 T 3 where Ai is a pre-exponential factor, and Bi and Ci are Landau-Teller coeffi- cients for reaction i. In this case, the forward rate constant is calculated as

−E B C  ni i i i kfi = Ai T exp + 1 + 2 , (6.66) RT T 3 T 3 such that it is possible to blend Arrhenius and Landau-Teller rate expressions.

Three-body reactions

A ‘third body’ is required in order to obey both conservation of momentum and energy in reactions where a single product is formed from two or more

User Manual v9.4.1, Build 01 219 c 2017 CMCL Innovations CMCL < > 6 IDEAL REACTOR MODELS Innovations reactants. For example

H + OH + M )−−−−* H2O + M, where M denotes a third body. In such reactions, the effective third body con- centration [M] appears as a reactant and product (with unit order of reaction) in equation (6.59) for the rate of progress.

The effective third body concentration is calculated as

X [M] = aki [χk ], (6.67)

k∈Sgas where aki is the third body efficiency of species k in reaction i. The values of the third body efficiencies may be specified in the chemical mechanism. Unless specified otherwise, it is assumed that   1, if k ∈ Sgas aki = (6.68)  0, otherwise.

Alternatively, a named third body can be specified for a reaction, in which case   1, if k is the named third body species for reaction i aik = (6.69)  0, otherwise.

Pressure-dependent low pressure fall-off reactions

The rates of some reactions exhibit a dependence on pressure in addition to temperature. For example, the rate of reactions involving collisions with small molecules are often observed to decrease at low pressures because the small molecules have a non-Boltzmann energy distribution, such that few of the collisions have sufficient energy for the reaction to proceed. At low enough pressures, the rate is observed to obey a third body dependence on the bath gas because the reaction is driven by collisions with the bath gas.

c 2017 CMCL Innovations 220 User Manual v9.4.1, Build 01 CMCL < > Innovations 6.1 Chemical and thermodynamic models

The pressure-dependent rate constant is modelled as   Pr k = k∞ F, (6.70) 1 + Pr where Pr is a reduced pressure

k0[M] Pr = , (6.71) k∞ where [M] is defined as per equation (6.67), k∞ and k0 are high-pressure and low-pressure rate constants

−E  k = A T n∞ exp ∞ , (6.72) ∞ ∞ RT

  −E0 k = A T n0 exp , (6.73) 0 0 RT and F is a model-dependent parameter. Several models are available for F.

Lindemann reactions The Lindemann [25] fall-off model specifies that

F = 1. (6.74)

Troe reactions The Troe [12] fall-off model specifies that

log F log F = c , (6.75)  log P + c 2 1 + r n − d (log Pr + c) where c = −0.4 − 0.67 log Fc,

n = 0.75 − 1.27 log Fc, d = 0.14, and  −T  −T  −T ∗∗  F = (1 − α) exp + α exp + exp . c T ∗∗∗ T ∗ T

User Manual v9.4.1, Build 01 221 c 2017 CMCL Innovations CMCL < > 6 IDEAL REACTOR MODELS Innovations

The parameters α, T ∗∗∗ , T ∗, and T ∗∗ must be specified in the mechanism. A 3-parameter version of the Troe model that omits T ∗∗ is also permitted.

SRI reactions The model developed at SRI International [45] specifies that

 −b  −T X F = a exp + exp d T e. (6.76) T c where 1 X = 2 1 + (log Pr ) The parameters a, b, c, d and e must be specified in the mechanism. Param- eters d and e were not included in the original model, but are included here for completeness. They can be interpreted as defining a weak-collision efficiency factor that can be used to correct rate parameters calculated using the model.

General pressure-dependent reactions

Several general pressure-dependent reaction models are also possible.

Pressure-dependent logarithmic interpolation (PLOG) reactions The rate constant at pressure P is estimated by logarithmic interpolation between the values of rate constants specified using modified Arrhenius rate parame- ters at discrete pressures Pj where j = 1, ..., J.   ln k1, if P < P1,    ln k , if P > P ,  J J ln k =  ln kj , if arg min |P − Pj | ≤ 0.01P,  j  −   ln P ln Pj  ln kj + ln kj+1 − ln kj , else if Pj < P < Pj+1. ln Pj+1 − ln Pj (6.77)

c 2017 CMCL Innovations 222 User Manual v9.4.1, Build 01 CMCL < > Innovations 6.1 Chemical and thermodynamic models

The rate constants at pressure Pj are calculated   −Ej k T , P  = A T nj exp , (6.78) j j RT where the parameters Aj , nj and Ej and the corresponding pressure Pj must be specified in the chemical mechanism for each pressure Pj where j = 1, ..., J. There must be at least two sets of parameters, such that J ≥ 2.

Chebyshev polynomial (CHEB) reactions The rate constant at pressure P and temperature T is estimated using Chebyshev polynomials.

N M  X X   log k T˜ , P˜ = anm φn T˜ φm P˜ , (6.79) n=1 m=1 where the Chebyshev polynomials of the first kind of degree j − 1 are given

−1  φj (x) = cos ( j − 1) cos (x) , |x| ≤ 1, j = 1, 2, ... (6.80) where T˜ and P˜ are mapped to the interval [-1, +1]

2T −1 − T −1 − T −1 ˜ min max T = −1 −1 , Tmin ≤ T ≤ Tmax (6.81) Tmax − Tmin

2 log P − log Pmin − log Pmax P˜ = , Pmin ≤ P ≤ Pmax. (6.82) log Pmax − log Pmin

The limits Tmin and Tmax, Pmin and Pmax, the number of basis functions N and

M, and the coefficients anm must be specified in the mechanism. The Chebyshev model is based on the method used by Venkatesh et al. [48] to approximate the pressure and temperature dependence of multi-well reac- tions. It is able to provide accurate approximations of the rate constant over any given temperature and pressure range for single- and multi-well reactions (as opposed to the models in Section 6.1.8, which are only appropriate for single-well reactions). The accuracy of the approximation increases with the number of basis functions N and M. However, the model should not be used to

User Manual v9.4.1, Build 01 223 c 2017 CMCL Innovations CMCL < > 6 IDEAL REACTOR MODELS Innovations

extrapolate the rate outside the range defined by Tmin and Tmax, Pmin and Pmax.

The coefficients anm must be determined by fitting against a set of known rate coefficients k T˜ , P˜ . These can be measured experimentally or evaluated computationally. For example, using the Master Equation in conjunction with the Rice-Ramsperger-Kassel-Marcus (RRKM) theory. In order to ensure that the approximation is uniform, the temperature and pressure points of the rate coefficients used in the fitting T˜i and P˜ j must be the roots of a high-order Chebyshev polynomial of the first kind

2i − 1  T˜i = cos π , 1 ≤ i ≤ dT (6.83) 2dT 2j − 1  P˜ j = cos π , 1 ≤ j ≤ dP (6.84) 2dP such that T˜i and P˜ j are points on a Gauss-Chebyshev grid. As a consequence, the number of basis functions must be bounded, N ≤ dT and M ≤ dP.

6.1.9 Surface reaction rate constants

Surface reactions describe heterogeneous reactions occurring at the interface between the gas phase and a surface, and reactions occurring in the bulk material below the surface.

By default, the rate constants of surface reactions are assumed to have a mod- ified Arrhenius temperature dependence as per Section 6.1.8. The following models for the rate constants are also possible.

Surface-coverage reactions

In some cases, it is observed that the rate constant is a function of the surface- coverage of certain species. This can be modelled using a surface-coverage rate expression   −Ei k = A T ni exp Π Π , (6.85) fi i RT 1 2

c 2017 CMCL Innovations 224 User Manual v9.4.1, Build 01 CMCL < > Innovations 6.1 Chemical and thermodynamic models where   Y ηki Zk (n) µki −εki Zk (n) Π = 10 Z (n) exp , 1 k RT k∈Ssite ∩ Si   Y ηki ak (n) µki −εki ak (n) Π = 10 a (n) exp , 2 k RT k∈Sbulk ∩ Si where ηki , µki , and εki are surface coverage parameters for species k and reaction i and must be specified in the chemical mechanism, Ssite and Sbulk are the sets of site and bulk species, and Si is the set of species that are specified as contributing to the coverage modification for reaction i.

The term in µki makes it possible to specify that the reaction rate is proportional to any arbitrary power of a site or bulk species concentration.

Sticking coefficient reactions

In some cases, it is convenient to describe the rate of a reaction in terms of a sticking coefficient that models the probability of a collision leading to a reac- tion between a gas-phase species and a surface. Necessarily, sticking coeffi- cient reactions are only permitted where there is a single gas-phase reactant with unit reaction order. There are no restrictions on the number of site-phase or bulk-phase reactants, nor on the number or type of products.

The sticking coefficient is dimensionless and is defined    −ci γ = min 1, a T bi exp , (6.86) i i RT where ai , bi , and ci are sticking coefficient parameters for reaction i and must be specified in the chemical mechanism. The reaction rate is calculated as

F s Q σ ki RT k = γ k∈Ssite k Π Π , (6.87) fi i mi 1 2 ΓT 2πWj where Fki is the forward order of reaction of species k in reaction i, Wj is the

User Manual v9.4.1, Build 01 225 c 2017 CMCL Innovations CMCL < > 6 IDEAL REACTOR MODELS Innovations

molecular weight of the gas-phase sticking-coefficient reactant j, mi is the total order of reaction of the site-phase reactants, ΓT is the total site density

X mi = Fki ,

k∈Ssite X ΓT = σk sk ,

k∈Ssite and sk is the surface concentration and σk is the number of sites occupied by species k. The term in the square root accounts for the frequency of collisions between the gas-phase species j and the surface. The terms involving ΓT and

σk are required to convert the units of the rate constant to be consistent with equation (6.59). The terms Π1 and Π2 are defined as per equation (6.85) and are included to allow surface-coverage modification of the sticking coefficient.

Motz-Wise correction factor The sticking coefficient model assumes that the sticking coefficient is small γi  1. In such cases, the molecular motion close to the surface is random and the collision frequency is independent of the sticking coefficient. However, when the sticking coefficient is large, the high probability of sticking causes a non-Maxwellian velocity distribution which affects the net species flux near the surface.

Motz and Wise [30] analysed this situation and suggested a correction factor

1 , (6.88) 1 − γi/2 such that the expression in equation (6.87) for the reaction rate becomes

s Q σFki γi k∈Ssite k RT kfi = Π1 Π2. (6.89) γ mi 1 − i/2 ΓT 2πWj

c 2017 CMCL Innovations 226 User Manual v9.4.1, Build 01 CMCL < > Innovations 6.2 ODE-based Population Balance Models

6.2 ODE-based Population Balance Models

6.2.1 Particle dynamics equations

The time evolution of the particle system subject to coagulation is governed by the master equation introduced by Smoluchowski [43]

i−1 ∞ dNi 1 X X = β N N − β N N , (6.90) dt 2 j,i−j j i−j i,j i j j=1 j=1 where Ni is the number density of particles of size i and βi,j is a kernel describ- ing the rate of successful collisions between particles of size i and j. The first term on the right-hand side describes the creation of particles due to collisions between all combinations of particles with sizes that sum to i. It contains a fac- tor of 1/2 to avoid double counting. The second term describes the destruction of particles due to collisions between particles of size i and any other size j. This master equation can be modified to include contributions from other pro- cesses as well, such as nucleation, surface processes (growth and oxidation), fragmentation, and particle depletion.

Collision kernels

The form of the kernel βi,j in equation (6.90) depends on the system that is to be modelled.

In the case of gas-solid systems, βi,j depends on the Knudsen number, defined in terms of the mean free path of the gas λ and a representative length scale L

2λ Kn = . L

User Manual v9.4.1, Build 01 227 c 2017 CMCL Innovations CMCL < > 6 IDEAL REACTOR MODELS Innovations

The continuum regime is characterised by Kn  1, where βi,j is given    c Ci Cj βi,j = Kc + ri + rj , (6.91) ri rj and C is the Cunningham slip correction factor

C = 1 + 1.257 Kn.

The free-molecular regime is characterised by Kn  1, where βi,j is given

s  2 f 8πkBT βi,j = i,j ri + rj , (6.92) µi,j

and i,j is a size-dependent coagulation enhancement factor due to attractive or repulsive inter-particle forces, kB is the Boltzmann constant, T is the temper- ature, µi,j is the reduced mass of the particles and ri is the radius of particles of size i.

Particle Models

The are two main types of particle models. Those that consider all particles are spherical (spherical particle models) and those that assume particles of aggregates of smaller spherical primary particles (aggregate particle models).

In the case of spherical particles, equations (6.91) and (6.92) can be rewritten

 1 1  1 1   βc = K + + K 0 + i1/3 + j1/3 , (6.93) i,j c i1/3 j1/3 c i2/3 j2/3

1 11/2  2 βf = K + i1/3 + j1/3 , (6.94) i,j f i j with

 1/3  1/6 1/2 2kBT 0 πρs 3m1 6kBT Kc = , Kc = 2.514λ , Kf = i,j , 3µ 6m1 4πρs ρs

c 2017 CMCL Innovations 228 User Manual v9.4.1, Build 01 CMCL < > Innovations 6.2 ODE-based Population Balance Models

where µ is the absolute viscosity of the gas, ρs is the density of the material from which the particle are formed, m1 is the mass of a particle of size 1 and the length scale required by the Knudsen number is specified as the particle diameter di .

In the case of aggregate particles, the kernel βi,j is calculated in the transition regime, and can be determined as

βj,k = 4πRabs(Dj + Dk )fD (6.95)

where Rabs is the absorbing sphere cluster radius, Dj and Dk are the diffusion coefficients for the colliding particles, and fD is the transition regime correction factor.

6.2.2 Sectional Method

The sectional method works by breaking the continuous particle size distribu- tion function into multiple bins (sections). Each section is assigned a represen- tative particle mass. The dependent variable is then the number concentration of particles of each representative mass (or section). In this way, the particle size distribution is represented as discrete points.

Population Balance Equation (Discrete Form)

The master equation is modified to include source terms from other processes to produce the equation below:

a/p a/p a/p a/p a/p a/p ∂Ni ∂Ni ∂Ni ∂Ni ∂Ni ∂Ni = + + + + (6.96) ∂t ∂t nu ∂t co ∂t sg ∂t ox ∂t fr (i = 1, 2, ..., SN)

User Manual v9.4.1, Build 01 229 c 2017 CMCL Innovations CMCL < > 6 IDEAL REACTOR MODELS Innovations

Coagulation is modelled as the collision between two aggregates in the tran- sition regime resulting in a larger aggregate. During the process, total particle mass and number and primary particle number and mass are conserved. The coagulation terms are calculated based on the collision kernel of aggregates in the entire Knudsen number regime [34, 51–53]. The source terms for ag- gregates and primary particles in the ith section are calculated as:

a k≤j≤i   35 ∂Ni X δj,k a a a X a = 1 − ηβj,k ξj,k Nj Nk − Ni βi,k ξi,k N(6.97)k ∂t co 2 mi−1≤mj +mk ≤mi+1 k=1 p k≤j≤i   35 ∂Ni X δj,k a a a X a = 1 − ηηpβj,k ξj,k Nj Nk − ηp,i Ni βi,k ξi,k N(6.98)k ∂t co 2 mi−1≤mj +mk ≤mi+1 k=1

th where mi is the representative mass of the i section aggregate, δ is the Kro- th necker delta function, βj,k is the collision kernel of two aggregates in the j and th th k sections, ηp,i is the number of primary particles per aggregate in the i sec- th th tion, and ξj,k is the coagulation efficiency of two aggregates in the j and k sections. The parameter η weights the newly formed mass into two adjacent sections such that the number and the mass of aggregates are conserved and is calculated as:

 mi+1−(mj +mk )  if mi ≤ mj + mk ≤ mi+1 η = mi+1−mi (6.99) mi−1−(mj +mk )  if mi−1 ≤ mj + mk ≤ mi mi−1−mi

The factor ηp assigns primary particles to two adjacent sections so that primary particle size and number are conserved and is calculated as:

mi ηp = (np,j + np,i ) (6.100) mj + mk

The collision kernel, βj,k , is given by [41].

βj,k = 4πRabs(Dj + Dk )fD (6.101)

c 2017 CMCL Innovations 230 User Manual v9.4.1, Build 01 CMCL < > Innovations 6.2 ODE-based Population Balance Models

where Rabs is the absorbing sphere cluster radius, Dj and Dk are the diffusion th th coefficients for soot particles in the j and k sections, and fD is the transition regime correction factor. The expression for the absorbing cluster radius is the same as that suggested by [56].

The diffusion coefficient, D, is calculated for both the free molecular and con- tinuum regimes. The total diffusion coefficient utilized in equation 6.101 is the summation of these two values. The diffusion coefficient, D, is given by

k TC (Kn) D = B c (6.102) 3πµdm where kB is the Boltzmann constant, T is the gas temperature, µ is the gas viscosity, dm is the mobility diameter, Cc(Kn) is the Cunningham slip correction factor as a function of the Knudsen number Kn and is calculated as [44]

Cc(Kn) = 1 + 1.612Kn (6.103)

The Knudsen number is defined as

2λ Kn = mfp (6.104) dm where λmfp is the mean free path of the gas, which is taken as the mean free path of air.

The transition regime correction factor fD is obtained from a simple approxima- tion of flux-matching theory and is calculated as

1 + KnD fD = (6.105) 1 + 2KnD(1 + KnD) where KnD is the diffusion Knudsen number which characterizes the transition between continuum and free molecular diffusion and is defined as

λmfp,12 KnD = (6.106) Rabs

User Manual v9.4.1, Build 01 231 c 2017 CMCL Innovations CMCL < > 6 IDEAL REACTOR MODELS Innovations

where λmfp,12 is the diffusion mean free path which is calculated as

Dj + Dk λmfp,12 = q (6.107) 2kB T ( 1 + 1 ) π mj mk

th th where mj and mk is the mass of soot aggregates in the j and k sections. The mobility diameter of the soot aggregate is calculated by  0.43 2rpnp free molecular regime dm = (6.108) Df −1 0.7 2Rf ( 2 ) continuum regime where rp is the primary particle radius, np is the number of primary particles in the aggregate, Df is the fractal dimension, and the outer radius of an aggregate

Rf is defined by

1/Df Rf = rp(fnp) (6.109) where f is the volume filling factor.

Surface Growth and Oxidation are modeled as the increase or decrease in primary particle and aggregate size due to surface growth via surface con- densation or chemical reaction with gas-phase species. The source terms due to growth for aggregates and primary particles in the ith section are calculated using the 2-point method [33] as:

 Ig,i − − if i = 1 a  mi+1 mi ∂Ni  I I = g,i−1 − g,i if i = 2,...,SN-1 (6.110) mi −mi−1 mi+1−mi ∂t sg  I  g,i−1 if i = SN mi −mi−1  Ig,i − m −m np,i if i = 1 ∂Np  i+1 i i Ig,i−1 Ig,i = np,i−1 − np,i if i = 2,...,SN-1 (6.111) mi −mi−1 mi+1−mi ∂t sg   Ig,i−1  np,i−1 if i = SN mi −mi−1

th where Ig,i is the total growth rates (condensation and chemical) for the i sec-

c 2017 CMCL Innovations 232 User Manual v9.4.1, Build 01 CMCL < > Innovations 6.2 ODE-based Population Balance Models tion in units of g/cc/sec and is always positive.

The source terms due to oxidation for aggregates and primary particles in the ith section are calculated using the 2-point method [33] as:

 Iox,i+1 Iox,i − − + if i = 1 a  mi+1 mi mi ∂Ni  = Iox,i − Iox,i+1 if i = 2,...,SN-1 (6.112) ∂t mi −mi−1 mi+1−mi ox   Iox,i if i = SN mi −mi−1  Iox,i Iox,i − m −m np,i+1 + m np,i if i = 1 ∂Np  i+1 i i i Iox,i Iox,i+1 = np,i − np,i+1 if i = 2,...,SN-1 (6.113) mi −mi−1 mi+1−mi ∂t ox   Iox,i  np,i if i = SN mi −mi−1

th where Iox,i is the oxidation rate for the i section in units of g/cc/sec and is always negative.

Particle Depletion is naturally modelled by the sectional method without the need for any additional models. This is contrary to the method of moments, which requires additional models to account for particle depletion.

Fragmentation is modeled as being oxidation-driven and assumes a 1:1 fragmentation pattern [54, 55]. The source terms due to fragmentation for aggregates and primary particles in the ith section are calculated as:

 a Γi,i+1Si+1Ni+1 if i = 1 ∂Na  i a a = (Γi,i − 1)Si Ni + Γi,i+1Si+1Ni+1 if i = 2,...,SN-1 (6.114) ∂t fr   a (Γi,i − 1)Si Ni if i = SN

User Manual v9.4.1, Build 01 233 c 2017 CMCL Innovations CMCL < > 6 IDEAL REACTOR MODELS Innovations

 Γ S Na n  i,i+1 i+1 i+1 pah,i+1 if i = 1 p  fs ∂Ni  Γ S Na n = a i,i+1 i+1 i+1 p,i+1 (6.115) (Γi,i − 1)Si Ni npah,i + fs if i = 2,...,SN-1 ∂t fr   a (Γi,i − 1)Si Ni npah,i if i = SN

where Γi,i and Γi,i+1 are breakage distribution functions and are calculated as:

fs − 2 fs Γi,i = Γi,i+1 = (6.116) fs − 1 fs − 1

The distribution functions weight the newly formed mass into two adjacent sections such that the number and mass of aggregates are conserved, and that the number and size of primary particles are also conserved.

The fragmentation rate for aggregates in the ith section is taken from [15]:

1/Df Si = A(np,i ) (6.117) where A is a coefficient that governs the overall fragmentation rate. As a first approximation, A is taken to be a first order function of the specific oxidation rate (the rate of removal of particle mass per unit particle surface area) rox,s,

A = Crox,s (6.118) where C is a constant.

6.2.3 Specific Applications

Sectional Soot Model

When utilizing the sectional method to model soot formation, the utilized chem- ical mechanism should include PAH formation, ideally of PAHs of 4-rings (pyrene) or larger. If PAH species are not available in the chemical mecha-

c 2017 CMCL Innovations 234 User Manual v9.4.1, Build 01 CMCL < > Innovations 6.2 ODE-based Population Balance Models nism, acetylene may be used as a substitute.

Nucleation is modeled by assuming soot nucleates through the collision and sticking of PAH species. The rate of nucleation is calculated according to kinetic theory as:

s a p ∂N1 ∂N1 8πkBT 2 2 = = β (rA + rB) Av [A][B] (6.119) ∂t nu ∂t nu µAB a p ∂Ni ∂Ni = = 0, i = 2, 3, ..., 35 ∂t nu ∂t nu

where β is the nucleation efficiency, kB is the Boltzmann constant, Av is Avo- gadro’s number, µAB is the collisional reduced mass for the two colliding PAHs, rA and rB are the radii of the two colliding PAHs, and [A] and [B] are the concen- trations of the two colliding PAHs. In general, the largest PAH(s) available in the utilized chemical mechanism should be included in the nucleation process.

Surface growth and Oxidation are modeled as occurring via the reactions in Table 6.1. Reactions S1–S6 are those proposed by Appel et al. [1]. Reac- tion S7 is PAH condensation. The PAH condensation model utilized is based on transition and continuum regime collision theory between soot aggregates and PAHs, with a prescribed collision efficiency, γ, in a similar manner to cal- culation of the coagulation rates. The mobility diameter of the PAH is taken to be the Lennard-Jones diameter. In general, the largest PAH(s) available in the utilized chemical mechanism should be included in the nucleation process.

Except for the reaction of soot with OH radicals (S6) which is modeled based on free molecular regime collision theory between OH and soot with a OH collision efficiency, γOH , the kinetics of the other surface reactions are de- scribed using the concept of soot surface sites, which can either be saturated

(Csoot − H) or dehydrogenated (Csoot ·). In order to calculate the reaction rates, the concentrations of these two sites are required for each soot section. The

User Manual v9.4.1, Build 01 235 c 2017 CMCL Innovations CMCL < > 6 IDEAL REACTOR MODELS Innovations

Table 6.1: Soot surface reactions.

k = AT n exp (−E/RT ) A n E No. Reaction (cm3/mol/s) (-) (kcal/mol) Comments

13 i i 4.2 × 10 13.0 kS1,f S1 Csoot–H + H )−−−−* Csoot–* + H2 12 3.9 × 10 11.0 kS1,r

10 i i 1.0 × 10 0.734 1.43 kS2,f S2 Csoot–H + OH )−−−−* Csoot–* + H2O 8 3.7 × 10 1.139 17.1 kS2,r

i i 13 S3 Csoot–* + H −−→ Csoot 2.0 × 10 kS3

i i + 2 7 S4 Csoot–* + C2H2 −−→ Csoot–H + H 8.0 × 10 1.56 3.8 kS4

i i − 2 12 S5 Csoot–* + O2 −−→ 2 CO + Csoot–H 2.2 × 10 7.5 kS5

i i − 1 S6 Csoot + OH −−→ CO + Csoot reaction probability = 0.13 kS6

i i + nPAH S7 Csoot + PAH −−→ Csoot reaction probability = 1.0 kS7

concentration of total surface sites for soot section i,[Csoot − T]i , is calculated by χcsoot−HAs,i Ni [Csoot − T]i = α (6.120) Av where α is the surface growth and oxidation factor, χcsoot−H is the number of sites per unit soot surface area and is set to a constant value of 2.3x1015 2 sites/cm [10], As,i is the surface area of soot particles in section i, and Ni is the number of soot particles in section i. The concentration of dehydrogenated sites for soot section i,[Csoot ·]i , is calculated from a steady state approximation by

(k1χH + k2χOH) [Csoot ·]i = [Csoot − H]i k−1χH2 + k−2χH2O + k4χC2H2 + k5χO2 + k1χH + k2χOH (6.121) where χH, χOH, χH2 , χH2O, χC2H2 , and χO2 are mole fractions. The fractional term represents the portion of saturated sites that have been dehydrogenated and arises from a steady state approximation for [Csoot ·]i . The equation for

c 2017 CMCL Innovations 236 User Manual v9.4.1, Build 01 CMCL < > Innovations 6.2 ODE-based Population Balance Models

[Csoot ·]i is modified from the original form presented in [1, 10] to ensure that the fractional term cannot exceed unity. The concentration of saturated sites is then simply the number of total sites minus the number of dehydrogenated sites.

Once the reaction rates for each section are determined, (6.111) and (6.113) are utilized to determine the source terms for aggregates and primaries in each section. The corresponding contributions to the species source terms are accounted for based on the reaction stoichiometry.

Physical Properties The following physical properties and model parame- ters are assumed for soot particles:

3 ρs = 1800 kg/m , (6.122)

ξj,k = 0.20 [54] (coagulation efficiency), (6.123) f = 1.43 [31] (volume filling factor), (6.124) C = 1.0x105 [54, 55] (fragmentation constant), (6.125) α = 1.0 (surface growth factor), (6.126)

γOH = 0.13 [32] (OH oxidation efficiency), (6.127) γ = 1.0 [54] (condensation efficiency), (6.128) β = 0.0001 [42] (nucleation efficiency), (6.129) Nucleating/Condensing PAHs = Pyrene (A4) (6.130) and the mean free path and viscosity of the gas-phase are approximated as those of air

T λ = 2.370 × 10−5 m, (6.131) P √ T T µ = 1.458 × 10−6 kg/ms, (6.132) T + 100.4 where the temperature T and pressure P are in K and Pa respectively.

User Manual v9.4.1, Build 01 237 c 2017 CMCL Innovations CMCL < > 6 IDEAL REACTOR MODELS Innovations

6.3 Constant volume reactor

A common type of reactor is the Constant Volume reactor. It consists of a closed rigid vessel in which, during combustion, the volume is kept constant and the pressure is allowed to increase. Although this device is used in re- search much less than the Perfectly Stirred reactor (PSR) or the Plug Flow reactor (PFR), it is often employed for calorimetric studies to determine the heat of formations for various fuels.

The Constant Volume reactor is a closed system which simplifies the balance equations and makes them conservation equations instead. Since no mass flows in or out of the system and since mass cannot be created, and the mass conservation equation reads

∂m = 0 (6.133) ∂t

Since Yi,l = Yi , the conservation species mass fraction becomes

∂Y ω W i = i i (6.134) ∂t ρ

The energy conservation equation is expressed in terms of specific internal energy. since the volume is constant. With the proper simplifications, such as ui,l = ui one obtains

N dT A Xs ρc = σ (T 4 − T 4) − ω U (6.135) v dt V w i i i

Since the system is assumed to be stationary and homogeneous, the momen- tum is zero so no balance equation for momentum is solved.

c 2017 CMCL Innovations 238 User Manual v9.4.1, Build 01 CMCL < > Innovations 6.4 Constant pressure reactor

6.4 Constant pressure reactor

Another type of reactor is the Constant Pressure reactor, representing a gas that is allowed to expand freely in the reactor volume. Such a reactor can consists of for instance a tube, closed at one end and with a movable piston at the other, assuring a constant pressure during combustion.

As for the Constant Volume reactor, the Constant Pressure reactor is assumed to be a closed system. The energy conservation equation is expressed in terms of specific enthalpy, Since hi,l = hi , it becomes

N dT A Xs ρc = σ (T 4 − T 4) − ω H (6.136) p dt V w i i i

Just as for the Constant Volume reactor the system is assumed to be sta- tionary and homogeneous, the momentum is zero so no balance equation for momentum is solved.

6.5 Numerical methods

6.5.1 ODE solvers kinetics & SRM Engine Suite offers the choice of several ODE solvers. These are used to integrate the ordinary differential equations (ODEs) that must be solved during a simulation.

The ODE solvers are designed for stiff systems of equations and use adaptive time stepping to control the accuracy of the solution via user-specified solver tolerances. The time required for a simulation is a strong function of the toler- ances. Unfortunately the optimal choice of solver and tolerance is often case specific.

• Solver 1 is often fastest for small systems (less than 200 species) and is

User Manual v9.4.1, Build 01 239 c 2017 CMCL Innovations CMCL < > 6 IDEAL REACTOR MODELS Innovations

extremely robust.

– Use the absolute tolerance to control the accuracy of the solver. – Default tolerances, atol: 10−11; rtol: 10−3.

• Solver 1s is a sparse version of Solver 1.

• Solver 2 is a backward differentiation formula (BDF) solver that may be faster for large systems (greater than 750 species).

– Use the relative tolerance to control the accuracy of the solver. – Relax the absolute tolerance to see if you can increase the speed of a simulation without compromising accuracy. – Default tolerances, atol: 10−6; rtol: 10−8.

• Solver 3 is an alternative BDF solver that may be faster for some large systems (greater than 750 species).

– Use the relative tolerance to control the accuracy of the solver. – Relax the absolute tolerance to see if you can increase the speed of a simulation without compromising accuracy. – Default tolerances, atol: 10−6; rtol: 10−8.

• Solver 3s is a sparse version of Solver 3.

The default tolerances are suitable for a wide range of applications. In some cases, faster simulations may be achieved using looser tolerances. However, in other cases, significantly tighter tolerances may be required. For example, reciprocating engine simulations with exhaust gas recirculation that simulate only the closed portion of the cycle typically require tighter tolerances in order to achieve a stable solution (for example, Solver 1, atol: 10−17; rtol: 10−3).

It is good practice to assess the suitability the solver tolerances for a given simulation by running cases with several different tolerances. The optimal choice of tolerances should give a solution that does not change when you tighten the tolerances, whilst minimising the required computational time.

c 2017 CMCL Innovations 240 User Manual v9.4.1, Build 01 CMCL < > Innovations 6.5 Numerical methods

6.5.2 Co-solver

A co-solver has been developed and optimised for use with the ODE-based Population Balance Models (see Section 6.2). The co-solver uses a robust solution method [29] that can give acceptable results with relatively loose tol- erances. It may offer substantial improvements in performance and robustness for numerically challenging problems.

• Use the relative tolerance to control the accuracy of the solver when the model state quantities are large. Relax the relative tolerance to see if you can increase the speed of a simulation without compromising accuracy.

• Use the absolute tolerance to control the accuracy of the solver when the model state quantities are small.

• Default tolerances, atol: 10−5; rtol: 10−3.

The co-solver is particularly recommended when using the Internal Combus- tion Engine Model with the Soot (Moment) particle ODE model.

User Manual v9.4.1, Build 01 241 c 2017 CMCL Innovations Inhomogeneous reactor models

This chapter describes the models and numerical methods used by the inhomogeneous reactor models in thek inetics& SRM Engine Suite software.

c 2017 CMCL Innovations 242 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.1 Perfectly-/Partially stirred reactors (PSR/PaSR)

7.1 Perfectly-/Partially stirred reactors (PSR/PaSR)

The Perfectly Stirred reactor model (PSR) consists of a constant pressure ves- sel with inlet and outlet ducts, and may or may not be thermally insulated (adi- abatic). A steady flow of gas with a user defined composition and temperature is introduced through the inlets. The reactor composition is solved for on-going chemistry and depending on the residence time, exits via an outlet. The re- actor composition in a PSR is considered homogeneous (i.e. high turbulent mixing). N N ∂m Xin Xout = m˙ − m˙ (7.137) ∂t l k l k

Since fresh gas flows at a constant rate, the PSR contains a mixture of prod- ucts and reactants. The assumption of homogeneity implies that the reactor gas composition is identical to that at the exit, i.e. Yi,l = Yi . Based on this assumption, the balance equation for species mass fraction becomes

Ni n ∂Yi ωi Wi X 1 = + (Yi,l − Yi ) (7.138) ∂t ρ τi l where τi = m/m˙ l is the residence time, practically interpreted as the rela- tionship between volume flow and the vessel volume, which determines the influence of the mixing. The rate of change of the mass fraction, Yi , depends on the production rate by chemical reactions (the first term on the right-hand side), and the influx to the PSR (the second term).

Since the pressure is assumed to be constant, the energy conservation equa- tion is given by

User Manual v9.4.1, Build 01 243 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

Nin Ns Ns dT X m˙ l 1 X X hcA A 4 4 ρcp = Yi,l (hi,l − hi ) − ωi Hi + (T − Tw ) + σ (T − Tw ) dt V τi V V l i i (7.139)

The change of energy corresponds to the change of enthalpy due to the con- tribution of mass influx, chemical reactions and to heat losses. We adopt the following naming convention: The term “inflow/outflow” applies to the tank re- actor only, whereas “breathing” (Section 7.3.11) applies to the engine only. Note that in a plug-flow reactor, neither of the two are defined, as inlet and outlet are simply the initial and the final condition respectively.

7.1.1 Model assumptions and equations

It is assumed that there are Nst = 1, 2, ... inlet streams, each with constant mass flow rate, composition, and temperature. The mass flow rate of the jth in in th stream is denoted by m˙ j , the temperature by Tj , and the i species mass fraction by Y in . Furthermore, we assume there is no build-up or depletion j i of total mass inside the reactor, so the total inlet mass flow rate is equal to the outlet mass flow rate.

The PDF transport equation describing pure inflow/outflow for multiple inlet streams is given by

Nst m˙ in ∂ X j  in  f (ψ; t) = fj (ψ) − f (ψ; t) , (7.140) ∂t mtot j=1 where mtot is the (constant) total mass within the reactor. The inlet distribution of the jth stream is given by

in in in in in fj (ψ) = δ(ψ − ψj ) with ψj = (Yj , hj ), (7.141)

in th where hj is the specific enthalpy of the j stream.

c 2017 CMCL Innovations 244 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.1 Perfectly-/Partially stirred reactors (PSR/PaSR)

7.1.2 Algorithm

Inflow/outflow is implemented as a separate operator splitting step alongside all the existing ones (chemistry, mixing, etc.). Inflow and outflow are dealt with simultaneously, as inlet and outlet mass flow rates are equal, by simply replacing certain amounts of mass with inlet in an event.

1. Initialise t ← 0.

2. Wait a time exponentially distributed with parameter

PNst in m˙ N π = j=1 j par , (7.142) mtot 

10 where mtot is the current total mass inside the reactor, and  is a pa- rameter which is discussed in the notes below.

3. Calculate the total weight to be replaced in this event according to

Npar  X W in = W (j). (7.143) Npar j=1

4. Initialise particle weights remaining for selection:

(j) (j) Wrem ← W ∀j ∈ {1, ... , Npar} (7.144)

5. For each inlet stream, i.e. for each i ∈ {1, ... , Nst}:

(a) Initialise total weight remaining to be replaced for this stream ac- cording to m˙ in W in ← W in i . (7.145) st PNst in j=1 m˙ j

10 Even though inflow/outflow does not affect the total mass inside the reactor, other pro- cesses, such as injection, can.

User Manual v9.4.1, Build 01 245 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

(b) Initialise replaced particle weights for this stream:

(j) Wrepl,i ← 0 ∀j ∈ {1, ... , Npar} (7.146)

in (c) Repeat until Wst ≤ 0: i. Pick a particle k not already picked, i.e. with probability (k) P (j) Wrem/ j Wrem. (k) in ii. If Wrem ≥ Wst then

(k) (k) in Wrepl,i ← Wrepl,i + Wst (k) (k) in Wrem ← Wrem − Wst (7.147) in Wst ← 0

otherwise

(k) (k) (k) Wrepl,i ← Wrepl,i + Wrem (k) Wrem ← 0 (7.148) in in (k) Wst ← Wst − Wrem.

6. Perform the replacement, i.e. for each stochastic particle, update its (i) composition, i.e. mass fractions Yj (j indexes the species), according to

N N 1 h Xst  Xst  i Y (i) ← W (i) Y in + W (i) − W (i) Y (i) . (7.149) W (i) repl,j j repl,j j=1 j=1

The specific enthalpy h(i) of the ith particle is updated according to an analogous formula, obtained by substituting h for Y in (7.149).

7. If t > tstop then stop, otherwise go to step2.

7.1.3 Requirements for usage

The input quantities which need to be defined by the user are:

c 2017 CMCL Innovations 246 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.1 Perfectly-/Partially stirred reactors (PSR/PaSR)

1. Number of inlet streams

2. Mass flow rate for each inlet stream

3. Composition and temperature of each inlet stream

4. The parameter, . Where  is a factor affecting the overall rate of the pro- cess, and, correspondingly, the amount of mass in the reactor which can be replaced in any one inflow/outflow event. It is introduced to ensure good performance for small particle numbers. For example, for one par- ticle, without  (i.e for  = 1), the entire reactor content would be replaced at once in rather infrequently occurring events. For one particle,  can be interpreted as the maximum mass fraction of reactor content which can be replaced in any one inflow/outflow event.

User Manual v9.4.1, Build 01 247 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

7.2 Plug-flow reactors (PFRs)

An ideal PFR invokes an assumption of radial perfect mixing, but no axial mix- ing. At steady state, a parcel of fluid entering the reactor at time t = 0 behaves like a batch reactor, whose axial location in the reactor evolves monotonically as a function of time.

x x + dx Fα dV IN Cα Xα Xα + dXα Cα

Figure 7.1: Plug flow reactor. kinetics models the PFR as a batch reactor. The axial location is calculated using the following expression.

dx m˙ = (7.150) dt ρtA

c 2017 CMCL Innovations 248 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

7.3 Internal Combustion Engine Model (SRM En- gine Suite)

7.3.1 Introduction

The kinetics & SRM Engine Suite is an advanced engine in-cylinder combus- tion software package used to simulate engine applications such as motorcy- cle, passenger car, motor sport, truck, locomotive, marine and power genera- tion.

The kinetics & SRM Engine Suite can be considered derived from Stochastic Reactor Models (SRM) which have been widely applied as test beds for eval- uating chemical mechanisms and mixing schemes in the field of combustion science. These models are based on the assumption of statistical homogene- ity of the mixture within the control volume, whilst accounting for the on-going process of turbulent mixing. These methods are considered highly computa- tionally efficient for large coupled chemical reaction mechanisms. The follow- ing sections describe the application of a SRM for direct application to modern IC engine applications.

7.3.2 Main Equation

This section outlines details of a Stochastic Reactor Model (SRM) for internal combustion engine applications. This section describes its application to the closed volume of the engine cycle (IVC to EVO) and its solution for in-cylinder mixing, heat transfer, crevice flow, fuel injection and chemistry.

The SRM is derived from a Probability Density Function (PDF) transport method [38]. The model assumes statistical homogeneity, meaning the PDF is assumed to be the same throughout the engine cylinder. The model calcu- lates the evolution of the NS chemical species’ mass fractions, Y1, ... , YNS , and the temperature, T , as a function of time.

User Manual v9.4.1, Build 01 249 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

The NS + 1 random scalar variables are combined into the vector ψ =

(ψ1, ... , ψNS , ψNS +1) = (Y1, ... , YNS , T ) whose distribution is given by the PDF, f . Mean quantities may be calculated using the PDF by: Z hψj (t)i = ψj f (ψ; t)dψ. (7.151)

In engine context, the in-cylinder density varies during an engine cycle, hence it is more convenient to use the Mass Density Function (MDF) rather than the PDF. The MDF, F, is related to the PDF by:

F(ψ; t) ≡ ρ(ψ)f (ψ; t), (7.152) where ρ is the mass density. The time evolution of the MDF in the SRM is described by the following PDF transport equation:

NS +1 NS +1 ∂ X ∂   X ∂   F(ψ; t) = − Gj (ψ)F(ψ; t) + A(ψ)F(ψ; t) ∂t ∂ψj ∂ψj j=1 j=1 | {z } | {z } chemical reaction turbulent mixing 1 dV ∂   − F(ψ; t) − U(ψNS +1)F(ψ; t) (7.153) V dt ∂ψNS +1 | {z } | {z } piston movement convective heat transfer F (ψ; t) F(ψ; t) F (ψ; t) + C − + f , τcrev τcyl τf | {z } | {z } crevice flow fuel injection with the initial conditions:

F(ψ; 0) = F0(ψ). (7.154)

The R.H.S. of Equation (7.153) describes the physical in-cylinder processes of chemistry (Section 7.3.6), turbulent mixing (Section 7.3.9), heat transfer (Section 7.3.7), piston movement (Section 7.3.5), crevice flow (Section 7.3.4) and fuel injection (Section 7.3.14).

c 2017 CMCL Innovations 250 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

7.3.3 Stochastic Model Parameters

A statistical weighting method is used to assign the distribution of the stochas- tic particles within the cylinder.

• Equi-weighted particles: all the particles are homogeneous (i.e. mi =

mi+1 for i = 1, ..., N, where mi is the mass of particle number i, N is the total number of stochastic particle).

• Linear weighted particles: the particles are linearly distributed (i.e. mi =

mi+1 +α, where α = constant, and α is scaled from the non-equiweighting factor as user input.)

• Quadratic weighted particles: the particles are quadratically distributed

(i.e. mi = mi+1 + α, where α = f (2i) is a quadratic function of the particle index i.)

• Exponential weighted particles: the particles are exponentially dis- i tributed (i.e. mi = mi+1 + α, where α = f (e ) is an exponential function of the particle index i.)

7.3.4 Crevice Flow

The MDF of the gases in the crevice and the fuel are represented by FC and Ff respectively. The characteristic residence times of the in-cylinder gas, crevice gas and fuel are denoted by τcyl , τcrev and τf respectively. It is assumed that the pressure in the crevice equalises with that in the cylin- der. The pressures are equalised during each time step by exchanging mass between crevice and cylinder. Assuming an ideal gas, and negligible changes in temperature and molecular weight in the crevice and cylinder:

 Pc(i) − Pc(i−1) ∆m = Mc nc(i) − nc(i−1) = , (7.155) RTc Vc Mc

User Manual v9.4.1, Build 01 251 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations where ∆m is the exchange mass, added to the crevice from the cylinder charge at time step i. The symbols M, n, P, R, T and V denote the molec- ular weight, number of moles, pressure, ideal gas constant, temperature and volume respectively. The subscript, c denotes the crevice. Rearranging and equating the final pressure in the crevice with that in the cylinder leads to:     RTc RTb Pc(i) = ∆m + Pc(i−1) = −∆m + Pb(i−1), (7.156) VcMc VbMb where the subscript, b denotes the bulk cylinder parameters. This leads to:

P − P ∆m = b(i−1) c(i−1) , (7.157) RTb + RTc VbMb Vc Mc

The crevice gas is assumed to be homogeneous, and its temperature is as- sumed to be the same as the wall temperature, which is kept constant through- out the simulation. After the exchange mass is calculated, the particle and crevice compositions, pressure, temperature and mass are updated. Mass is only transferred between the crevice and some of the existing stochastic particles, labelled as exchange particles. The number of exchange particles, and the time they remain exchange particles for, are determined by a crevice time factor and mass factor. The mass factor is the fraction of the total cylin- der mass that may exchange mass with the crevice at any one time. Exchange particles are selected randomly with a uniform distribution, until their total mass equals or exceeds the mass required. New exchange particles are chosen af- ter a time that is determined by the crevice time factor and the mixing time.

7.3.5 Piston Movement

The second term on the left hand side (LHS) of Equation (7.153) denotes the effect of the piston movement on the MDF. The volume, V (t), in terms of crank angle degree (CAD), θ, is calculated as:

π p V (t) = V + b2(l + a − a cos θ − l2 − a2 cos2 θ) (7.158) c 4

c 2017 CMCL Innovations 252 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

where, Vc is the clearance volume, b the engine bore, l the connecting rod length and, a the ratio of l to the crank radius, r.

7.3.6 Chemical Kinetics

The changes in composition and temperature due to ongoing chemical reac- tions are represented by the first term on the R.H.S. of Equation (7.153). The function G(ψ) is given by the following equations:

M ω˙ G (ψ) = i i , i = 1, ... , N , (7.159) i ρ S

N 1 XS p dV GNS +1(ψ) = − ej Mj ω˙j − (7.160) cV ρ cV m dt j=1 where Mi is the molecular mass,ω ˙i is the production rate and ei is the specific internal energy of species i. The specific heat capacity at constant volume, the total mass and the cylinder volume are denoted by cv , m and V respectively.

7.3.7 Convective Heat Transfer

Heat transfer in the engine, between the cylinder charge and the walls, af- fects the combustion process. This results in a lower temperature boundary layer surrounding the hotter core. This temperature stratification alters the combustion phasing and duration. The convective heat transfer term in Equa- tion (7.153) is modelled by the finite difference scheme:

1 U(ψ + h)F(ψ , ... , ψ , ψ + h; t) − U(ψ )F(ψ; t), (7.161) h NS +1 1 NS NS +1 NS +1 where h determines the amplitude of the temperature fluctuation. Instead of a deterministic process, in which every particle transfers heat with the walls, a stochastic jump process is used [5]. This produces inhomogeneities in the the temperature distribution, improving emissions and combustion duration predictions.

User Manual v9.4.1, Build 01 253 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

(i) (i) T − Tw h = , (7.162) Ch

(i) The parameter h induces fluctuation and Ch is an input parameter in the model which changes the magnitude of the fluctuation over an an exponentially distributed time step,τ ˆ.

The function U(T ) determines the amount of heat that is transferred between the cylinder charge and the cylinder walls during each time step and is mod- elled by: CHT hgA U(T ) = − (T − TW ), (7.163) cV m where hg is the heat transfer coefficient, A is the available heat transfer area.

CHT is a user defined heat transfer multiplier.

Convective Heat Transfer in an Generic reactor

This option is default unless the Engine reactor is invoked.

When applied to a generic reactor the heat transfer coefficient, hg and the available heat transfer area, A are user inputs.

Convective Heat Transfer in an Engine reactor

This option is only available when the Engine reactor is invoked.

The available heat transfer area, A is computed using the following method.

A = Aliner + Ahead + Apiston, (7.164) where

B 2 A = C π , (7.165) piston piston 2

c 2017 CMCL Innovations 254 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

B 2 A = C π , (7.166) head head 2

Aliner = πBl, (7.167) where B is the piston bore, and l the distance from the piston to the piston head and Cpiston and Chead are user defined multipliers to account for an increase to the surface are due to piston bowls, pent roofs etc.

In Equation 7.163, TW is the averaged wall temperature [16]. in practice the model carries no geometric information and thus particles can only interact with a single wall temperature. Hence to be consistent with 0D and 1D so- lutions an averaged value is for all the cylinder walls, the piston surface and the cylinder head is applied. These three wall temperatures are assumed to remain constant throughout the cycle, however the cylinder liner area varies throughout the cycle, thus the averaged value, TW will vary accordingly.

T A + T A + T A T = − liner liner head head piston piston , (7.168) W A

Woschni heat transfer correlation The Woschni correlation outlined in

Equation 7.169 can be applied to compute the heat transfer coefficient, hg in Equation (7.163). Here

−0.2 0.8 −0.53 0.8 hg = 3.26B p T w (7.169) where p, V (t), T , and w are cylinder pressure, instantaneous volume, in- cylinder temperature and local gas velocity respectively. The form of w con- tains two terms [16]. One of which is dependant on the mean piston speed and the other accounts for the contribution of combustion on the cylinder pressure. The contribution of each of these terms can be adjusted using the constants

C1 and HRC2.

User Manual v9.4.1, Build 01 255 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

Hohenberg heat transfer correlation An alternative method using the Ho- henberg correlation [17] can also be used to compute the heat transfer coef-

ficient, hg in Equation (7.163). In this case

0 −0.06 0.8 −0.4 ¯ 0 0.8 hg = C1V p T (Sp + C2) (7.170) where p, V (t)& T represent the same quantities as those defined for the ¯ 0 0 Woschni correlation and Sp represents the mean piston speed. C1 and C2 are the correlation coefficients for Hohenberg.

7.3.8 Pressure Equalisation

A change in pressure occurs in each stochastic particle, due to chemical reac- tions and heat transfer. Expansion and compression of fluid parcels will occur in the cylinder, due to the equilibration of the pressure fluctuations. This is especially important in SI combustion, as the hotter burned gases expand and compress the cooler unburned gases [13]. In kinetics & SRM Engine Suite it is assumed a quasi-instantaneous pressure equilibration occurs through isen- tropic compression and expansion of the particles.

The specific heat capacity ratio, γ, is used to relate the pressure and volume of an ideal gas that undergoes an isentropic compression or expansion by:

(i) (i) (i) (i)γ (i)γ p1 V1 = p2V2 , (7.171) where p(i) and V (i) denote the pressure and volume of the ith particle respec- tively. The composition and temperature of each particle is used to calculate each particle’s γ. The subscripts 1 and 2 denote the values before and after the equilibration. There is no particle index on p2 as all particles have the same pressure after equilibration. As the sum of the particle volumes must equal the total cylinder volume, V , Equation (7.171) may be manipulated to:

1/γ(i) Npar (i) ! X (i) p1 V = V1 , (7.172) p2 i=1

c 2017 CMCL Innovations 256 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

where p2 is the only unknown. The equilibrated pressure is calculated from Equation (7.172) using Newton’s method [39]. The particle temperatures, T (i), are then updated by:

1/γ(i)−1 (i) ! (i) (i) p1 T2 = T1 . (7.173) p2

7.3.9 Turbulent Mixing

The effect of turbulent mixing is simulated by applying a "mixing model". Tur- bulent mixing reduces stratification, resulting in more homogeneous mixtures. As such, the mixing model exerts a key influence on the evolution of the com- position PDF over a simulation.

The mixing models (see page 266) are parameterised by a scalar mixing rate, defined in terms of a mixing time τm

1 C = φ , (7.174) τm 2τ where τ is a turbulence timescale and Cφ is a mechanical-to-scalar timescale ratio. The value of Cφ must be specified as user-defined input. Depending on the user choice of enabling interpolation for Cφ based on the injection mass rate, there are two possible definitions of Cφ:

Interpolation disabled. In this case, Cφ is defined as ( Cφinj during injection events Cφ = (7.175) Cφstd otherwise.

Fuel injection induces turbulent mixing and this effect is observed for a finite time, even after the end of injection event. In order to capture this behaviour, a parameter named ‘Mixing EOI Lag’, which quantifies this duration in terms of CADs, has been introduced. Each pulse injection is considered an independent injection and the ‘Mixing EOI Lag’ is applied

User Manual v9.4.1, Build 01 257 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

to it individually. However, an injection defined via a profile is considered a single injection, with its SOI and EOI being the first and last CAD value, respectively, specified in the profile. The ‘Mixing EOI Lag’ is applied only once to the end CAD value of the profile, even if the profile internally contains multiple injections or it has significant trailing zeros.

Interpolation enabled. When a user enables interpolation of Cφ based on the

injection mass rate, Cφ is scaled between Cφstd and Cφinj proportionally to the maximum fuel flow rate registered in the interval that covers the current CAD plus the duration, in CADs, defined with the ‘Mixing EOI

Lag’ parameter. Cφ is then

m˙ lagged,max Cφ = Cφstd + (Cφinj − Cφstd) (7.176) m˙ max

where m˙ max is the absolute maximum fuel mass flow rate in the whole

cycle and m˙ lagged,max is the locally-calculated maximum fuel flow rate in the interval comprising the current simulation CAD plus any lag effects

introduced via the ‘Mixing EOI Lag’ parameter. This Cφ interpolation al- gorithm is independent of the number of injections or the way these are defined (via pulse(s) or profile). It takes the actual fuel mass flow rate at any given simulation CAD, it accounts for any delay in dissipating the

intensified turbulent mixing levels and it scales Cφ according to Equation

(7.176). Clearly, Cφ will be equal to Cφstd when no injection has taken place yet, or the increased-mixing effects of a given injection have dissi- pated, as dictated by the lag parameter. This can happen not only after the last injection but also in between injections, assuming multiple injec-

tions are defined and they are sparse enough. Cφ will be equal to Cφinj when the fuel injection mass flow rate is at its absolute maximum and will remain so for the duration of the interval specified by the ‘Mixing EOI Lag’

in CAD. Figure 7.2 presents an example of Cφ interpolation that would correspond to a typical pilot+main+post injection strategy. Observe the

sustained levels of high Cφ after an individual injection has reached its local maximum, dictated by a ‘Mixing EOI Lag’=3.0 CAD in this case, and

c 2017 CMCL Innovations 258 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

the different scaling that is applied to Cφ depending on the local peak of fuel mass flow rate for each injection.

Values in the range 0.1–15 are typical for stochastic and CFD-based engine simulations [6].

Interpolation of Cϕ based on a triple injection profile

3.00 6

]

- ) [ )

2.50 5 ϕ

2.00 4

1.50 3

1.00 2

0.50 1

Turbulent mixing coefficient (C coefficient mixing Turbulent Rate of fuel injection mass [mg/CAD]mass injectionfuel of Rate 0.00 0 -40.00 -30.00 -20.00 -10.00 0.00 10.00 20.00 30.00 40.00 CAD

Rate of injected mass [mg/CAD] Turbulent mixing coefficient (C ϕ )[-]

Figure 7.2: Cφ interpolation between 2 and 5 for a triple injection profile con- taining pilot, main and post injections. ‘Mixing EOI Lag’=3.0 CAD

Models for the turbulence timescale are described below.

Turbulence timescale models

The turbulence timescale τ can be specified using the following models.

1. User-defined turbulence timescale (fixed value or profile).

2. Empirical k-ε turbulence timescale model (IC engine applications only).

3. Detailed k-ε turbulence timescale model (IC engine applications only).

The details of each model are defined below.

User Manual v9.4.1, Build 01 259 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

User-defined turbulence timescale (fixed value) The turbulence timescale is specified as ( τ during injection events τ = inj (7.177) τstd otherwise, where the values of τstd and τinj must be specified as user-defined input. This model enables users to input their own values of the turbulence timescale, where for example these values have been estimated using experimental or −3 −4 numerical techniques. The value of τstd is typically of the order 10 to 10 s.

User-defined turbulence timescale (profile) The turbulence timescale is specified as a user-defined profile expressed as a function of time (seconds or CAD). These can be input directly via the user interface or using a *.csv file.

Empirical k-ε turbulence timescale model (IC engine applications only) This model estimates the turbulence timescale using correlations from Hey- wood [16]. The turbulence timescale τ is calculated as

k τ = . (7.178) ε

The turbulent kinetic energy k and dissipation rate ε are approximated using the turbulence intensity u0 and an integral length scale Λ

03 0 u k ∝ u 2, ε ≈ . (7.179) Λ

Equation 7.179 is closed using

Λ ≈ 0.1L, (7.180) and the following correlation 0 u ∝ S¯p, (7.181)

c 2017 CMCL Innovations 260 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

where S¯p is the mean piston speed

2LN S¯ = , (7.182) p 60

L is the length of the engine stroke and N is the engine speed in RPM.

It should be noted that Cφ is used in lieu of additional constants of proportion- ality that would otherwise appear in Equations 7.179 and 7.181. Users may

find it necessary to adjust the value of Cφ when using this model.

Detailed k-ε turbulence timescale model (IC engine applications only) This model simulates the evolution of the turbulent kinetic energy, including key turbulence generation effects such as swirl and tumble. Please note that this model cannot be used in engines where breathing is enabled.

The processes in the model that are responsible for generating turbulent ki- netic energy, k are depicted in Figure 7.3. The turbulence production term describes the combined effect of these processes. The turbulence dissipation term, ε describes the rate of viscous dissipation of turbulent kinetic energy.

Figure 7.3: Summary of the quasi dimensional k-ε model

The turbulence timescale τ is calculated as

k τ = . (7.183) ε

User Manual v9.4.1, Build 01 261 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

The time-dependent values of the turbulent kinetic energy k and dissipation rate ε are approximated by solving the following quasi-dimensional ODE

dk dk dk dk dk = inj + den + squ + prod − ε. (7.184) dt dt dt dt dt

The terms appearing on the right-hand side of Equation 7.184 describe:

• Effect of injection Turbulence is generated during direct injection events due to the shear flows that are created as the injected mixture enters the cylinder. 2 dkinj vinj dminj = Cinj , (7.185) dt mcyl dt

where mass is injected at a rate dminj/dt with velocity vinj into a cylinder

containing a total mass mcyl. The term Cinj is a user-defined scaling parameter.

• Effect of density change The turbulent kinetic energy is coupled to the density changes caused by the distortion of the cylinder charge during the compression and expansion processes.

dk 2 k dρ den = C , (7.186) dt den 3 ρ dt

where ρ is the density of the cylinder charge. The term Cden is a user- defined scaling parameter.

• Effect of squish The squish region above the piston crown decreases abruptly close to TDC because of the small clearance between the piston and the cylinder head. The resulting shear flows generate additional turbulence in the cylinder.

2 dksqu vsqu dVsqu = Csqu , (7.187) dt Vcyl dt

where fluid is driven out of the squish region at a rate dVsqu/dt with

radial velocity vsqu, and Vcyl is the instantaneous cylinder volume. The

term Csqu is a user-defined scaling parameter.

c 2017 CMCL Innovations 262 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

• Effect of swirl and tumble Turbulence is generated by the swirling and tumbling motion of the charge. In Cartesian coordinates

dk 1 dE dE  prod = − xy + z , (7.188) dt mcyl dt dt

where Exy (tumble) and Ez (swirl) describe the rotational energy of the cylinder charge, based on an assumed geometry as per Figure 7.4.

EV IV EV IV

z x Lz -L

pist x s y Ly

Dbore

Figure 7.4: Simplified cylinder geometry. (Intake valves labelled as IV, exhaust valves as EV).

The rotational energy of the cylinder charge can be written as

2 2 1 Lxy 1 Lz Exy = and Ez = , (7.189) 2 mcyl jxy 2 mcyl jz

such that the change in the rotational energy due to swirl and tumble at a given cylinder position (so neglecting the effect of the piston movement)

dE E dL dE E dL xy = 2 xy xy and z = 2 z z , (7.190) dt Lxy dt dt Lz dt

where L is the angular momentum of the charge

Lxy = mcyl jxy ωxy and Lz = mcyl jz ωz , (7.191)

User Manual v9.4.1, Build 01 263 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

ω is the angular velocity of the charge and j is the moment of inertia of

the charge per unit mass of fluid in the cylinder, mcyl.

The moment of inertia of the tumbling gas is given

1 D 2 s2  j = bore + pist , (7.192) xy 4 2 3

where Dbore is the cylinder bore, spist is the piston position

4Vcyl spist = 2 , (7.193) πDbore

and Vcyl is the instantaneous cylinder volume. The moment of inertia of the swirling gas is independent of the cylinder position because no vortex deformation of the swirling motion occurs

1 D 2 j = bore . (7.194) z 2 2

The evolution equations for the angular momentum required to close Equation 7.190 are modelled as

dL √ xy = C L Ψ (s ) k, dt prod xy xy pist (7.195) dL √ z = C L Ψ (s ) k, dt prod z z pist

where Cprod is a user-defined scaling parameter and Ψxy and Ψz are decay functions parameterised by the piston position.

• Effect of viscous dissipation The viscous dissipation of turbulent ki- netic energy at the molecular length scales is modelled as

3 k 2 ε = , (7.196) Λ

c 2017 CMCL Innovations 264 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

where Λ is an integral length scale

1 3 Λ = Vcyl, (7.197)

and Vcyl is the instantaneous cylinder volume.

The detailed k-ε model solves for the time-dependent values of k, ε, Lxy and

Lz . Time-dependent swirl and tumble ratios are also calculated ω ω tumble ratio = xy , and swirl ratio = z , (7.198) 2πN/60 2πN/60 where N is the engine speed in RPM, and where the angular velocities, ωxy and ωz are calculated using Equations 7.191– 7.194. The boundary conditions for the detailed k-ε model are:

• Swirl and tumble ratios at Inlet Valve Closure (IVC) User-defined val- ues for the initial swirl and tumble ratios are required in order to calculate

Lxy and Lz at IVC.

• Turbulent kinetic energy (TKE) at Inlet Valve Closure (IVC) The initial

turbulent kinetic energy, k0 is estimated at IVC as a function of the total mass in the cylinder and the timing of the inlet valve closure. The value

of k0 can be modified using the scaling parameter Ck0.

The following model parameters are also required:

• Squish volume fraction A user-defined value is required for the volume fraction of the squish region in the cylinder.

• Scaling factors User-defined values are required for the Ck0 turbu-

lent kinetic energy at IVC scaling factor, and the Cinj, Cden, Csqu and

Cprod scaling factors appearing in equations (7.185), (7.186), (7.187) and (7.195).

In order to achieve optimal performance, it is recommended that simulations using the detailed k-ε model are started at IVC.

User Manual v9.4.1, Build 01 265 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

There is an option available to the user to impose a limit on how high (slow) the mixing time computed by the detailed k-ε model can be. This is controlled via the variable named ’Slowest allowable mixing time’. If the cap is applied, it results in accelerated mixing during the expansion part of the cycle. As a consequence, heat release is more likely to complete before EVO and the level of the uHCs emission predicted by the model is lower than in an uncapped but otherwise equivalent simulation.

Mixing models

The effect of turbulent mixing can be simulated using the following models.

1. Interaction by exchange with the mean (IEM) mixing model. 11

2. Coalescence-dispersion (Curl) mixing model.

3. Localness mixing model (LMM).

4. Hybrid mixing model (HMM).

In each case the rate of mixing is parameterised by the mixing time τm. The details of each model are defined below.

All mixing models additionally allow the specification of an optional user- defined Active Mixing Period, outside which no mixing model is applied. This can be used to save computational effort in the event that parts of a simulation are expected to be insensitive to turbulent mixing.

Interaction by exchange with the mean (IEM) mixing model The IEM (also known as the linear mean square estimation or LMSE) mixing model is a deterministic model in which all scalars relax to a mean value via an expo- nential decay process. The main features of the model are simplicity and low computational effort.

11 The IEM model is only offered as an option for the mixing of the entrained zone in spark ignition engine simulations. See page 268.

c 2017 CMCL Innovations 266 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

Coalescence-dispersion (Curl) mixing model The coalescence- dispersion mxing model was first proposed by Curl [8] and provides a phenomenological model of turbulent mixing. The model randomly selects pairs of particles (using a uniform distribution) and fully mixes them, such that each particle assumes the mean composition of the particle pair.

Localness mixing model (LMM) The Localness Mixing Model (LMM) is unique to the kinetics & SRM Engine Suite and is able to account for the physi- cal proximity of the material that is being mixed. This provides a big advantage over the IEM and Curl models, which are unable to account for such effects. For example, in a non-premixed flame simulation, cold oxidiser and cold re- actants should not mix directly, as they must first pass through the hot flame sheet. The LMM is able to account for such phenomena and is recommended for all IC engine applications.

The LMM works by identifying neighbouring particles, based on their proximity in composition space. The model is constrained such that mixing can only oc- cur between neighbours. A problem arises in that particles remain neighbours throughout the mixing process. An intermittency is introduced to overcome this. The particles are designated as being in either a mixing or a non-mixing state, and are moved between states depending on a non-dimensional age property. Only particles in the mixing state are considered when identifying neighbouring particles. This causes the identities of the neighbouring parti- cles to change discontinuously in time.

In a system containing Npar particles, there will be Npar − 1 neighbours, termed edges, in the model. The evolution equation for the composition vector ψ of particle i is given

Npar−1 dψ(i) X   w (i) = −α 2w (ψ(i) − ψ(nv ))δ + (ψ(i) − ψ(mv ))δ , (7.199) dt v i mv i nv v=1

th where the v edge connects the particle pair (mv , nv ) and δ is the Kronecker delta. The Kronecker delta is used because the particle pairs are unordered,

User Manual v9.4.1, Build 01 267 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations and the model must account for the change in composition of both particles in the pair. The parameter α is determined by requiring that the scalar variances decay at a prescribed rate.

The term w (i) is the importance weight of particle i. The weight of the v th edge wv is calculated as the minimum of the sum of the particle weights on either side of the edge. This means that the smallest edge weights occur between particles with compositions at the periphery of the composition space occupied by the Npar particles. The largest possible edge weight is 1/2, given that the sum of all the particle importance weights is unity.

Hybrid mixing model (HMM) The Hybrid Mixing Model (MMM) applies the coalescence-dispersion (Curl) mixing model prior to the first injection event, and the localness mixing model (LMM) thereafter. This combines the compu- tational efficiency of the Curl model with the benefits of the LMM model where the simulation is expected to be sensitive to the turbulent mixing.

Spark ignition mixing models

The flame propagation in spark ignition (SI) engine simulations (See Section 7.3.13) is modelled by dividing the particle ensemble into various zones. If enabled, the Active Mixing Period (see page 266) applies all zones.

Unburned zone The turbulent mixing in the unburned zone is modelled as per the models and options described above (in Section 7.3.9).

Burned zone The turbulent mixing in the burned zone is modelled using the same mixing model as the unburned zone, with a scalar mixing rate

1 C = φ , (7.200) τm 2τB where Cφ is defined as per equation 7.175 and τB is a fixed value user-defined turbulence timescale for the burned zone.

c 2017 CMCL Innovations 268 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

Entrained zone The turbulent mixing in the entrained zone is modelled using its own mixing model. The available options are a modified Curl model, IEM or LMM (see page 266 for details). The scalar mixing rate is calculated by the model, subject to 1 C ≥ φ , (7.201) τm 2τE max where Cφ is defined as per equation 7.175 and τE max is a fixed value user- defined upper limit for the turbulence timescale in the entrained zone.

Mixing model outputs

The values of the mixing time parameters used by the software for any given simulation can be found in the *Mixing.csv file.

User Manual v9.4.1, Build 01 269 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

7.3.10 Numerical Solution

Equation (7.153) is solved using a Monte Carlo stochastic particle method. An ensemble of Npar stochastic particles make up a statistical representation of the PDF, which is approximated by:

Npar 1 X f (ψ; t) ≈ δ(ψ − ψ(i)(t)), (7.202) Npar i=1 where superscripts refer to individual particles. Equations (7.151) and (7.202) combine to give an approximation of the mean quantities:

Npar 1 X (i) hψj (t)i ≈ ψj (t). (7.203) Npar i=1

To solve Equation (7.153), an operator splitting technique is employed so that each term can be treated separately [38, 46]. The operator splitting loop is described below:

1. Initialise t = 0, ∆t, CAD = IVC. Determine temperature, composition, mass, volume and pressure of particle ensemble.

2. Progress in time t 7→ t + ∆t. If CAD ≥ EVO or t ≥ tstop then save the detailed exhaust composition as input EGR and stop.

3. Perform volume change due to piston movement.

4. Perform gas exchange between bulk and crevice volumes.

5. Perform the first half of the turbulent mixing splitting step.

6. Perform stochastic heat transfer splitting step.

7. Perform the pressure equilibration step.

8. Perform the chemistry step.

9. Perform the pressure equilibration step.

c 2017 CMCL Innovations 270 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

10. Perform the second half of the turbulent mixing splitting step.

11. Perform the direct injection splitting step

12. Go to step (2).

7.3.11 Gas exchange and breathing

The main aim of the breathing sub-model is to enable the user to model not just in-cylinder processes during the closed-volume part of the engine cycle, but also gas-exchange processes through the intake and exhaust valves. Ad- ditional aims are to extend this to true full-cycle simulation, i.e. simulation of multiple, consecutive cycles with a seamless continuation between them, in- cluding Exhaust Gas Recirculation (EGR). The latter allows (and necessitates) in particular to distinguish between external and internal EGR, i.e. between externally recirculated exhaust gases and residual gases trapped inside the cylinder after the end of the exhaust stroke.

Flow through the inlet and exhaust valves is modelled as a simplified flow through an orifice plate. In this approach, the mass flow rate through a valve is given by

m˙ = CDAref%isvis. (7.204)

π 2 This expression contains the reference flow area Aref = 4 dref, with a reference valve diameter dref. CD denotes the discharge coefficient, which is a function of valve lift satisfying the boundary condition CD(0) = 0. The density %is at the throat is given by  2 1/(γ−1) 2 1/(γ−1) %0 γ+1 for choked flow, i.e. if r ≤ γ+1 %is = (7.205) 1/γ %0r otherwise,

where %0 is the upstream stagnation density, γ the specific heat ratio, and r the ratio of static outlet to total inlet pressure. The isentropic velocity vis at the

User Manual v9.4.1, Build 01 271 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations throat is given by

q 2γ  RT0 γ+1 for choked flow vis = q γ−1 (7.206) 2γ γ   RT0 γ−1 1 − r otherwise, where T0 denotes the upstream stagnation temperature. In addition, the following assumptions are made:

1. The intake and exhaust systems are adiabatic, i.e. no heat transfer is taken into account.

2. Pressure, temperature, and composition in both the intake and exhaust systems are assumed to be spatially uniform.

3. Pressure, temperature, and composition of the intake mixture are con- stant in time (but the composition is allowed to vary from cycle to cycle by means of external EGR).

4. For %0, T0, and r, static instead of stagnation values are used, i.e. any kinetic contributions are neglected. As gas velocities in the inlet mani- fold and inside the cylinder are small compared to the speed of sound, the errors incurred through this approximation are small. The density is determined from the ideal gas law.

5. It is assumed there are either one or two intake valves, and, separately, either one or two exhaust valves (per cylinder). If two, in either case, the two valves are assumed identical in all aspects including valve lifts as function of crank angle.

7.3.12 Friction and engine performance calculations

The following calculations are only applied if a) it is an engine model and, b) breathing is switched on.

c 2017 CMCL Innovations 272 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

Friction

In order to calculate key performance data from the brake. A standard Chen- Flynn friction correlation model is applied.

C Q 2 FMEP[bar] = A + B P + CF S¯ + CF S¯ (7.207) CF CF max 1x105 p 1x105 p

2 2 with ACF [bar], BCF [-], CCF [Pa.min/m] and QCF [Pa.min /m ] as tuning param- eters determined experimentally. Pmax is the in-cylinder peak pressure [in bar], the S¯p mean piston speed [in m/min]. The correlation and its parameters have been retained in the original form as applied in other software tools to allow users to input their present correlations.

These coefficients are used in the Chen-Flynn friction correlation model. This model is used to calculate the FMEP (Friction Mean Effective Pressure) for the engine. When data is collected in the test cell, it can be plotted and cor- related using the Chen-Flynn model so that FMEP may be calculated at non- tested engine speed/load conditions. If the simulation is only to simulate tested speed/load points, the FMEP can be entered directly using only the ACF value (directly entering FMEP in the appropriate pressure units) and setting the other coefficients to 0 (zero).

Engine Performance

The calculations for this section are the standard definitions for engine tech- nologies [16].

In the event that the simulation represents a closed system only (i.e. intake valve closed to exhaust valve opening), the open portions of the cycle are assumed to be identical to the intake (Pmanint ) and exhaust manifold pressures

(Pmanexh ) respectively. Hence these must be defined in the engine performance tab.

User Manual v9.4.1, Build 01 273 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

Indicated work per cycle per cylinder

The indicated work per cycle per cylinder, Wc,ind, is calculated using its defi- nition [16], by integration of the cylinder pressure p with respect to the total cylinder volume V : I Wc,ind = pdV , (7.208) where the integration is over two or four strokes, depending on the engine. In case of four-stroke engine with the breathing model switched on, the utilization of Eq. (7.208) is direct, with the integral approximated to the following sum:

360 Z Ns X pi + pi+1 W = pdV ≈ (V − V ), (7.209) c,ind 2 i+1 i i=1 CAD=−360 where Ns is the number of time steps in the simulation and the index i runs over the Ns + 1 output data points. In the case where breathing is switched off and only part of the cycle is simu- lated (from certain initial CADin to a final CADex), then instead of Eq. (7.209), the code approximates the indicated work of a four stroke engine as:

CAD Z in CADZ ex TDCZ 2 Wc,ind = pmandV + pdV + pexdV , (7.210)

TDC2 CADin CADex where TDC2 is the second top dead center in the cycle (between exhaust and intake strokes), at which it is assumed that the exhaust valve closes and the inlet valve opens; pman is the inlet manifold pressure and pex is the exhaust manifold pressure, both of which are user-defined constants. Eq. (7.210) as- sumes that inlet valve closes at CADin and the exhaust valve opens at CADex. The integral of p in Eq. (7.210) is calculated as a sum over the simulated pressure values:

c 2017 CMCL Innovations 274 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

Ns X pi + pi+1 W = p (V − V ) + (V − V ) − p (V − V ) ; (7.211) c,ind man in min 2 i+1 i ex ex min i=1

here, Vin is the volume at the start of the simulation, Vex is at the end of it, Vmin is the volume at the top dead centre (the clearance volume).

Indicated power per cylinder

The indicated power per cylinder, Pi is related to the indicated work via the following,

Wc,inN Pi = (7.212) nR where N is the number of crank revolution per second and nR is the number of crank revolutions for each power stroke per cylinder (two stroke nR=1, four stroke nR=2 etc.).

Mean Effective Pressure

The Mean Effective Pressure (MEP) is obtained by the following expression.

Pn MEP = R (7.213) Vd N where Vd is the displace volume and N the engine speed. Indicated Power,

Pi or Brake Power, Pb can be applied to obtain the Indicated or Brake Mean Effective Pressures (IMEP and BMEP) respectively.

Torque

The MEP can be used to compute the torque, T .

User Manual v9.4.1, Build 01 275 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

MEPV T = d (7.214) nR

The instantaneous torque can also be calculated. This accounts for the varia- tion of torque as a function of crank angle. The instantaneous torque can be used in noise, vibration and harshness (NVH) analyses.

ɣ

Con Rod Length

 

 Crank Radius

Wrist Pin Offset

Figure 7.5: Diagram to define the angles used in the instantaneous torque calculations

The single cylinder instantaneous torque is evaluated over a full cycle, for ex- ample for a four stroke engine this will be between -360 and 360 CAD aTDC. The contribution from the in-cylinder pressure acting on the piston and the contribution from friction are accounted for in the calculation.

The in-cylinder pressure contribution is calculated by multiplying the force along the con rod by the perpendicular distance between the con rod and the crank axis. The resulting equation is as follows, where angles β and γ are defined in Figure 7.5:

c 2017 CMCL Innovations 276 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

Pressure × π(Bore/2)2 T = × Crank Radius · sin(β) (7.215) pressure cos(γ)

By using trigonometry, γ and β can be written as functions of crank position:

Wrist Pin Offset + Crank Radius · sin(θ) γ = sin−1 (7.216) Con Rod Length

β = π − θ − γ (7.217)

If the simulation is not run for the full cycle and instead run for just the closed portion, a spline extrapolation method is used to estimate the in-cylinder pres- sure in the closed portion of the cycle. The spline is defined by the pressure profile at IVC and EVO in addition to the manifold pressures.

The contribution of friction is accounted for by using the calculated indicated and brake torque for the engine:

Tindicated − Tbrake Tfriction = − (7.218) ncyl where Tfriction is a per cylinder quantity, both Tindicated and Tbrake represent quan- tities for the engine and ncyl is the number of cylinders. The net instantaneous torque is calculated by summing the two contributions:

Tnet = Tpressure + Tfriction (7.219)

Finally using Equation 7.219, the overall torque from all the cylinders in the engine can be calculated. It is assumed that there is no cylinder to cylinder variations in pressure. This torque is calculated by summing the net torque for a single cylinder across all the cylinders in the engine accounting for the different firing timings of each cylinder.

User Manual v9.4.1, Build 01 277 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

ncyl X Tmulti [CAD] = Tsingle[CAD − ∆CAD(i)] (7.220) i=1 where ∆CAD contains a list of values that describe where in the full engine cycle each cylinder will fire.

Calculations related to the brake

The IMEP and BMEP are related through frictional losses estimated by com- puting the FMEP.

BMEP = IMEP − FMEP (7.221)

A mechanical efficiency (in percentages), ηm can also be obtained by relating indicated, Pi and brake Pb power.

Pb ηm = 100 ∗ (7.222) Pi

Specific fuel consumption and emissions

Specific outputs are calculated by computing the mass flow rate, m˙ and divid- ing by the brake Pb Power.

m˙ specific emission or fuel consumption = (7.223) Pb

7.3.13 Spark Ignited Flame Propagation

For SI simulation the particle ensemble is divided into three zones: unburned, entrained and burned, which contain NU , NE and NB particles respectively. Figure 7.6 shows a schematic of an engine cylinder with the three zones. The burned and unburned zones are made up of particles that have and have not

c 2017 CMCL Innovations 278 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

BURNED

ENTRAINED

UNBURNED

Figure 7.6: Engine cylinder schematic showing the three zones in the model.

yet passed through the turbulent flame front, respectively. The entrained zone encompasses the flame front and cylinder charge that is about to be consumed by the flame as well as cylinder charge that has just passed through the flame and is releasing heat. Mixing occurs within each zone, but not between zones and all particles are initially in the unburned zone.

In the two zone model, these are the unburned and burned zones. In the three zone model these are unburned, entrained and burned.

Three-Zone: Turbulent Flame Propagation Model

The main SRM operator splitting loop, with the addition of spark initiation, flame propagation and flame termination is implemented as follows:

1. Initialize t = 0, ∆t, CAD = IVC, CADspark , spark energy, Rf = 0, NU = NTot ,

NE = NB = 0 all particles are in the unburned zone. Determine tempera-

User Manual v9.4.1, Build 01 279 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

ture, composition, mass, volume and pressure of particle ensemble.

2. Progress in time t 7→ t + ∆t. If CAD ≥ EVO or t ≥ tstop then save the detailed exhaust composition as input EGR and stop.

3. Perform volume change due to piston movement.

4. Perform the mixing step.

5. Perform stochastic heat transfer.

6. Perform the pressure equilibration step.

7. If CAD ≥ CADspark and NU = NTot perform spark initiation (as described

below) else if CAD ≥ CADspark and NU > 0 perform flame propagation (as described below) else go to (8).

8. Perform the chemistry step. If NE > 0 perform flame termination (as described below).

9. Perform the pressure equilibration step.

10. Perform the mixing step.

11. Go to step (2).

Spark and early flame kernel growth The diameter of the entrained zone at the time of spark is set by the user, Rf a value of 0.5 mm is recommended. The ignition of a particle and controlling the ignition process is carried out by defining an additional particle. Mass is moved from the first particle to be burned to the additional particle. If the energy in the spark were to be distributed uniformly throughout a volume represented by a particle, then the temperature would not be sufficient to initiate combustion. Once the entrained volume has increased above the additional particle’s volume, it is reunited with the first particle into a single particle. The spark is simulated by setting the temperature of the mass added to the entrained zone at each step to 2000 K, until all of the spark energy has been added. The spark initiation was

c 2017 CMCL Innovations 280 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite) modelled as follows:

1. If NE > 0 go to (7) else go to (2).

2. Set the flame radius to Rf = 0.5 mm.

3. Select a particle at random with a uniform distribution.

4. Remove the spherical volume with 0.5 mm radius from the particle and E add to a newly created particle in the entrained zone. NE = 1, V = 3 4/3πRf .

5. Increase the temperature of the entrained particle to 2000 K by adding energy at constant pressure. Remove the energy added from the input spark energy.

6. Go to the chemistry step.

7. Calculate the new flame volume, Vf , as described in the flame propaga- tion section.

U E 8. If Vf > VNext + V go to (13) else go to (9).

E 9. Remove Vf -V from the unburned particle being entrained.

10. If there is spark energy remaining, increase the temperature of the freshly entrained mass to a maximum of 2000 K by adding energy at constant pressure.

11. Reunite the freshly entrained mass with the entrained particle.

12. Go to the chemistry step.

13. Remove the unburned particle being entrained from the unburned zone,

NU = NTot - 1.

14. If there is spark energy remaining, increase the temperature of the freshly entrained mass to a maximum of 2000 K by adding energy at constant pressure.

User Manual v9.4.1, Build 01 281 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

15. Reunite the freshly entrained mass with the entrained particle.

16. Select the next particle to entrain, at random with a uniform distribution. Go to step (2) in flame propagation section described below.

Turbulent Flame Propagation When the calculated flame volume exceeds the burned and entrained zone volumes by more than half the volume of the next particle to be entrained, a randomly chosen particle is moved from the unburned zone to the entrained zone. The volume of the flame, Vf is calculated from the user defined geometry of the piston and cylinder, and the flame radius assuming it is spherical and centred at the spark location.

th The flame radius at the n time step, Rf ;n, is obtained from

Rf ;n = Rf ;n−1 + f (CAD − CADspark, ∆CAD1, ∆CAD2) × (uT + SL) ∆t. (7.224)

The increase in flame radius is calculated as the time step multiplied by the entrainment velocity. The radius initially increases at the laminar flame speed,

SL, until a wrinkled turbulent flame front develops according to the character- istic flame speed, uT .

The correlation used to obtain the characteristic flame speed, uT , was taken from [18]:

 1/2 ρu uT = 0.08C1u¯ i , (7.225) ρi whereu ¯ i is the mean inlet gas speed, ρu is the unburned gas density and ρi is the inlet air density. The constant C1 is considered the main tuning parameter for the SI model.

The mean inlet gas speed,u ¯ i , is obtained from:

u¯ i = ηv (Ap/Aiv )S¯ p, (7.226)

where Ap is the piston area, Aiv is the maximum open area of the inlet valve and S¯ p is the mean piston speed [16]. The volumetric efficiency, ηv , is given

c 2017 CMCL Innovations 282 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite) by ma ηv = , (7.227) ρi Vd where ma is the air mass inducted and Vd is the displaced volume [16]. The characteristic flame speed is multiplied by the function f (CAD −

CADspark, ∆CAD1, ∆CAD2) defined in Algorithm1. The value of the multiplier varies according to a sine function. It increases from 0 to 1 for the dura- tion ∆CAD1 and decreases from 1 to 0 for the duration ∆CAD2. In the GUI,

∆CAD1 is named ‘Turbulent Increase Duration’ and ∆CAD2 is named ‘Turbu- lent Decrease Duration’ under the ‘Predictive’ settings.

Algorithm 1: Calculation of the multiplier f .

Input: CAD − CADspark, ∆CAD1, ∆CAD2 Output: f begin x = CAD − CADspark π/2 m1 = ; ∆CAD1 π/2 m2 = ; ∆CAD2 c1 = 0; π c2 = 2 − m2∆CAD1; if ((CAD − CADspark) ≤ (∆CAD1 + ∆CAD2)) then if ((CAD − CADspark) ≤ ∆CAD1) then f = sin(m1x + c1); else

f = sin(m2x + c2); end if else f = 0 end if end

The mixing time in the entrained zone, τE , is increased at the same expo- nential rate as the transition from a laminar to a turbulent flame. The mixing max time increases to the value τE once the turbulent flame has fully developed. Before this the entrained zone mixing time is smaller causing faster mixing and heat release. This was included as the rate of burning is initially the rate of entrainment before a turbulent flame front has developed containing

User Manual v9.4.1, Build 01 283 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations unburned pockets [9].    max −(t − tspark ) τE = τE 1 − exp (7.228) τb

τb is the characteristic burn time [16, 47] and is defined as

lT τb = , (7.229) SL where lT is the characteristic length scale [16].

The rate of burning is controlled by the mass entrained and the rate it mixes with the hot, reacting entrained material and is calculated with the detailed chemical mechanism. The maximum entrained zone mixing time was set around ten times smaller than the other zones to prevent the volume of the entrained zone growing unrealistically large and to propagate heat through the entrained zone at the correct rate. Flame propagation was implemented in the model as follows:

1. Increase the flame radius using Equation (7.224) and calculate the new

flame volume, Vf .

2. Update the entrained zone mixing time according to Equation (7.228).

PNE E PNB B U 3. If Vf > i=1 Vi + i=1 Vi + 1/2VNext go to (4) else go to (6).

4. Add the particle to the entrained zone and select the next particle to be

added randomly with a uniform distribution. NU = NU - 1, NE = NE + 1. Flag the newly entrained particle as unburned and entrained.

5. Go to step (3).

6. Perform the chemistry step.

Flame Termination In this section we describe how particles are moved from the entrained zone to the burned zone. During the chemistry step the

c 2017 CMCL Innovations 284 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite) rate of heat release in each entrained particle is calculated. When the heat release rate of an entrained particle has risen above the heat release rate limit, HRRlim, the particle is classified as entrained and burning. The entrained and burning particles are removed from the entrained zone and added to the burned zone once their heat release rate drops below HRRlim. Particles are also transferred from the entrained zone to the burned zone if they remain in max the entrained zone for the maximum length of time, tE . This was included in the model to prevent particles that do not reach the heat release rate limit from remaining in the entrained zone throughout the simulation. When no particles remain in the unburned zone, the entrained zone mixing time is set max to τE as Equation (7.229) can no longer be evaluated. Flame termination was modelled as follows:

1. If any unburned entrained particle’s heat release has risen above HRRlim flag the particle as entrained and burning.

2. If any entrained and burning particle’s heat release has dropped below

HRRlim move the particle to the burned zone. NE = NE - 1, NB =NB + 1.

max 3. If any entrained particle has spent longer than tE in the entrained zone

then move it to the burned zone. NE = NE - 1, NB = NB + 1.

max 4. If NU = 0 then τE = τE .

Two-Zone: Turbulent Flame Propagation Model

The two-zone model was developed as a means to facilitate the parameter- isations of SI mode combustion. A particle splitting algorithm enables users to reduce the number of particles whilst still achieving adequate convergence with fewer than 20 active stochastic particles in terms of pressure and heat release rate. This reduces CPU times significantly thus enabling a more rapid parameterisation of the model with respect to experimental observation.

User Manual v9.4.1, Build 01 285 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

Similarly in the three-zone model, the flame volume increases according to Equation 7.224.

The following algorithm is applied.

1. Progress as a single (unburned) zone until a spark is initiated.

2. At spark, select the smallest particle and distribute its mass uniformly to the other particles. This position is used to initialise the flame and this is also the first particle in the burned zone.

3. Compute the flame volume according to Equation 7.224.

4. Determine the amount of mass, dmass, to transfer from the unburned zone to burned zone based on the flame volume.

5. The flame temperature is reset to 2500K at each time step as long as there is spark energy remaining. The amount of energy used to set the flame to 2500K is subtracted from the current spark energy.

6. Once all the particles have burned, the simulation reverts to a single zone simulation containing the burned particles.

The simulation algorithm applied in the other two-zone models (i.e. Empirical Wiebe, Double Wiebe, Modified Wiebe and User input mass fraction burned) is similar to the above algorithm except for Steps 4 and 5. In the Wiebe models, dmass is computed according to Equations 7.230, 7.231, or 7.235 depending on which model is selected. For the User input mass fraction model, dmass will be extrapolated based on the profile provided by the user.

Two-Zone: Empirical Wiebe Model

On many occasions, typical combustion and heat release rates are well known, in these circumstances a functional form can be applied to represent the mass fraction burned versus crank angle, the so called Wiebe function:

c 2017 CMCL Innovations 286 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

! θ − θ m+1 x = 1 − exp −a 0 , (7.230) b ∆θ where θ is the crank angle, θ0 is the start of combustion set as "Standard

Wiebe Start of Combustion", ∆θ is the total combustion duration (xb=0 to xb=1), and a and m are user adjustable parameters with typical values of a=5.0 and m=3.0.

Two-Zone: Empirical Double Wiebe Model

In some cases, a Standard Wiebe model is too simple to represent the heat release profile observed at some operating conditions. Hence, a double Wiebe model can be used as an alternative.

In this case two Wiebe functions (Equation 7.230) are applied, here defined as xb,1 and xb,2. Users must input each function individually i.e. two values for a, m, ∆θ and θ0 are required.

The final profile, xb is defined using the following simple weighting method.

xb = (1 − αw )xb,1 + αw xb,2, (7.231)

where αw is a weighting factor between 0 and 1.

Two-Zone: Modified Wiebe Model

An easier way to parameterise the Wiebe model is to use a modified approach, based on anchor angles.

This model has the following inputs.

• Anchor Angle, θm

• Combustion Duration, θe−s

• Wiebe Exponent, m

User Manual v9.4.1, Build 01 287 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

• Burned mass fuel fraction at Anchor Angle (0.5 recommended), xb,m

• Burned mass fuel fraction at start of combustion duration (0.1 recom-

mended), xb,s

• Burned mass fuel fraction at end of combustion duration (0.9 recom-

mended), xb,e

The Wiebe parameters, C are obtained as follows;

1 Cb,a = (− log (1 − xb,a)) m+1 (7.232)

1 Cb,s = (− log (1 − xb,s)) m+1 (7.233)

1 Cb,e = (− log (1 − xb,e)) m+1 (7.234)

(m+1) xb = 1 − exp − (B)(θ − θ0) , (7.235) where the Wiebe parameter, B can be obtained by,

 θ −(m+1) B = e−s , (7.236) Cb,e − Cb,s and the Start of Combustion, θ0.

  θe−sCb,a θ0 = θm − . (7.237) Cb,e − Cb,s

Two zone: User input mass fraction burned

In the same way that a Wiebe-derived model is applied to impose a pre-defined heat release in spark-ignition engine applications, users can define a mass fraction burned profile as a function of crank angle degrees.

In order to apply this methodology, the mass fraction burned profile must be defined by the user. This profile must fulfil the following requirements:

c 2017 CMCL Innovations 288 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

1. The profile must be imported from a one row headered comma sepa- rated value (CSV) file.

2. The first column must be the crank angle in the units of degrees [aTDC].

3. The second column must be the mass fraction burned where 1.0 repre- sents complete combustion.

4. The profile should never be less than 0 or exceed 1.0.

5. The profile must increase monotonically.

6. If the profile is not smooth (i.e. with large step increases) users may observe issues with maintaining the flame, hence it is recommended that the profile is as smooth as possible (like a Wiebe function).

Laminar Flame Speed Correlation

The laminar flame speed, SL is calculated using standard correlations based around the following common expression applied to laminar flames.

 α  β Tu p SL = SL0 . (7.238) T0 p0

Three common formats for defining SL0, α, and β are available. For all formats the effect of burned gas on the laminar flame speed is also accounted for using the following expression/correlation [16].

EGRB SL(x ˜b) = SL(x ˜b = 0)(1.00 − EGRAx˜b ). (7.239)

The following section describes each format. Each format has a mathematical form and a corresponding set of associated parameters, these parameters will typically change depending on the fuel or fuel composition, if these parameters are known they can be input directly by the user.

To support users without access to such data a default laminar flame speed correlation format and corresponding set of parameters are available directly

User Manual v9.4.1, Build 01 289 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations for common engine fuels such as methanol, propane, gasoline, iso-octane and natural gas.

Laminar flame speed correlation: Format A In this format [16] the lam- inar flame speed, SL is determined by calculating the terms, α, β and SL0 in Equation (7.238).

α = α1 + α2(φ − 1), (7.240)

β = β1 + β2(φ − 1), (7.241)

2 SL0 = Bm + Bφ(φ − φmax ) . (7.242)

Laminar flame speed correlation: Format B In this format [16] the lam- inar flame speed, SL is determined by calculating the terms, α, β and SL0 in Equation (7.238).

α3 α = α1 + α2(φ ), (7.243)

β3 β = β1 + β2(φ ). (7.244)

2 SL0 = Bm + Bφ(φ − φmax ) . (7.245)

Laminar flame speed correlation: Format C In this format [24] the lam- inar flame speed, SL is determined by calculating the terms, α, β and SL0 in Equation (7.238).

2 α = α1φ + α2φ + α3, (7.246)

2 β = β1φ + β2φ + β3, (7.247)

3 2 SL0 = SL0,1φ + SL0,2φ + SL0,3φ + SL0,4. (7.248)

c 2017 CMCL Innovations 290 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

This format has the most parameters and thus offers the greatest scope for fitting a laminar flame speed model to experimental data. Hence if users have their own laminar flame speed measurements which represent their fuel, it is this format which is recommended. In addition, it is recommended that once users are satisfied with their parameters that further test the impact of extrap- olating their correlation out to the temperatures, pressures and equivalence ratios observed in their cylinder.

Default correlations for common transportation fuels As described above, there are multiple transportation fuels which can be represented in the software. The laminar flame speed correlation format and associated param- eters for these fuels are listed in Table 7.1.

Table 7.1: Laminar flame speed correlation format and corresponding param- eters for common transportation fuels.

Parameter Natural Propane Methanol iso-Octane Gasoline gas H/C=1.96 Format C A A A B

EGRA 2.06 2.06 2.06 2.06 2.06 EGRB 0.77 0.77 0.77 0.77 0.77 φm - 1.08 1.11 1.13 1.21 Bmax [m/s] - 0.342 0.369 0.263 0.305 Bφ [m/s] - -1.387 -1.405 -0.847 -0.549 α1 5.75 2.18 2.18 2.18 2.40 α2 -12.15 -0.8 -0.8 -0.8 -0.271 α3 7.98 - - - 3.51 β1 -0.925 -0.16 -0.16 -0.16 -0.357 β2 2.0 0.22 0.22 0.22 0.140 β3 -1.473 -1.00 -1.00 -1.00 2.77 SL0,1 -1.7743 - - - - SL0,2 3.4077 - - - - SL0,3 -1.2366 - - - - SL0,4 -0.002297 - - - -

User Manual v9.4.1, Build 01 291 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

Two/three-zone: User defined burn order

As presented in Figure 7.6, in both the two-and three-zone sub-models, each stochastic particle is allocated to either the unburned, entrained (three-zone only) or burned zone. As the flame propagates, the rate of reallocation (trans- fer) between zones is dictated by either the turbulent flame propagation or em- pirical (Wiebe-derived) sub-models. At some points, due to the finite nature of representing a PDF using a stochastic particle representation, the model must identify the next most appropriate stochastic particle to burn. By default, the next stochastic particle to burn must come from the unburned zone, this particle is selected at random from the unburned stochastic particles or on the basis of its composition (closest to stoichiometric) in the three-zone DISI sub-model.

In order to support this more directly, the stochastic particle burn order can be defined by the user, the burn order can be defined via a comma separated variable (CSV) file. This file should:

1. Have no header and be a single column of integers.

2. The list should begin with the first stochastic particle to be burned.

3. There should be no-duplication of stochastic particle numbers.

4. The list should have an entry for all stochastic particles. i.e. the file should have the same number of rows as there are stochastic particles.

7.3.14 Direct Injection

Physical Direct Injection Model

The pre-defined parameters in the Physical DI model are the droplet diameter, injection velocity, the cone angle, the effective evaporation rate, the liquid tem- perature and the latent heat of evaporation. The diameter of the spray droplets produced by injection vary with their location and the time they are injected.

c 2017 CMCL Innovations 292 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

Injector Nozzle Injector Nozzle

1 θcone 2 3

s h

VC

j-1 a VSC j r (a) Penetration geometry. (b) Penetration stages.

Figure 7.7: Fuel penetration model geometry and stages.

The Sauter Mean Diameter (SMD) is used to calculate the liquid droplets sur- face area, which determines the rate of evaporation. The SMD is defined as the diameter of a spherical droplet that has the same surface/volume ratio as that of the total spray [16].

The injection model contains penetration, injection and evaporation sub- models. The volume fraction of the cylinder that has been penetrated by the liquid fuel is calculated by dividing the spray volume by the cylinder volume. Figure 7.7(a) displays the spray geometry and the symbols for the lengths used in the equations below. The shape of the spray will affect the volume penetrated, which in turn will affect the distribution of fuel throughout the en- semble of particles. The spray volume, VS, is calculated by summing the cone volume, VC, and the spherical cap volume, VSC, which are given by: π π V = r 2h = s2h − h3 , (7.249) C 3 3 and: πa π V = 3r 2 + a2 = 4s3 − 6s2h + 2h3 . (7.250) SC 6 6

User Manual v9.4.1, Build 01 293 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

The spray volume can be expressed as a function of the cone angle, θcone, the injection velocity, vinj , and the time since the start of injection, ∆tSOI.

2π 2π  θ  V = s3 − s2h = (v ∆t )3 1 − cos cone . (7.251) S 3 3 inj SOI 2

The actual volume that has been penetrated is the sum of the penetrated par- ticles’ volumes. If this is less than the required value then new particles are chosen, in a random process weighted by their volumes, until the calculated penetrated volume has been reached or exceeded. The particles penetrated during the same time step belong to the same penetration stage, j. Fuel flows from the oldest stage, j = 1, through each stage to the youngest, as shown in Figure 7.7(b). The amount of liquid fuel that transfers from each stage to the next, ∆mliq, is given by:

∆t ∆mliq = mliqTot , (7.252) tEOI − tSOI where mliqTot is the total mass of fuel injected and tEOI and tSOI are the end and start of injection timings respectively. If this is greater than the total mass of liquid in a stage, then the total mass of liquid in the stage is transferred instead.

th The number of liquid droplets, Nj−1, passed from the (j − 1) stage to each particle in the jth stage is given by:

6∆mliq Nj−1 = 3 , (7.253) πρliqDj−1Nparj

th where Dj−1 is the average droplet SMD in the (j − 1) stage and Nparj denotes the number of particles in the jth stage. The number of liquid droplets in a particle, N(i), is calculated by:

6m(i) N(i) = liq . (7.254) (i)3 πρliqD

c 2017 CMCL Innovations 294 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

The SMD in each particle of the jth stage is updated by:

3 (i) (i)3 Nj−1D + N D D(i) = j−1 j j , (7.255) jNew 2 (i) (i)2 Nj−1Dj−1 + Nj Dj

(i) (i) th where Nj is the number of droplets and Dj is the SMD in the i particle of the jth penetration stage.

Evaporation then occurs, in which liquid fuel is converted to gas and the par- ticle compositions, temperatures, liquid masses and SMDs are updated. The (i) new liquid mass, mliqNew , after evaporation is given by:

 3λ ∆t  m(i) = m(i) exp − eff , (7.256) liqNew liq 2D(i)2 where λeff is the effective evaporation rate.

(i) The new SMD, DNew , is given by:

(i) p (i)2 DNew = D − λeff ∆t. (7.257)

The injection subroutine ends at End Of Injection (EOI), however the penetra- tion and evaporation subroutines continue to be called until all of the liquid fuel has evaporated. The mixing time during injection, and for a few CAD after- wards, should be reduced to account for the increased turbulence caused by injection.

PDF-based Injection Model

This approach should be applied in highly stratified diesel combustion-like ap- plications. In this case, the SMD is applied on a global level and evaporation is distributed according to a user-defined PDF profile, F based on a Gaussian distribution.

1. Compute the mass of liquid fuel to be injected in the timestep.

2. Update the global SMD using Equations 7.256 and 7.257.

User Manual v9.4.1, Build 01 295 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

3. Compute total evaporated mass.

4. Distribute evaporated mass, mf throughout the combustion chamber based on; a) computing the distribution profile F with respect to the ith particle,

 !2 Pi m(i) F (i) = exp −α i=1  (7.258) PNpar (i) i=1 m

PNpar (i) b) normalising the distribution such that i=1 F = 1

c) distributing the total evaporated mass, mf for that timestep amongst the particles. (i) (i) (i) ∆mf = F m (7.259)

Examples of how the main controlling parameter, α, distributes the evaporated fuel are presented in Figure 7.8.

PDF (Spray + Wall) without wall zone enabled A second Gaussian dis- tribution can be applied to simulate evaporation from a wall or surface in the cylinder. Again the user must define the value for the width of the distribution, α. In addition the location of the mean (i.e. the peak, µ of the second gaus- sian should also be defined (usually between 0 and 1.0). The user should also define an evaporation rate in g/s for the impinged fuel and the fraction of the fuel that is impinged relative to the total fuel injected.

Injector Nozzle Number Model

Common rail injection system From literature it can be seen that the spray penetration is affected by the number of injector holes [37]. This has been accounted for by noting that the affect on penetration length corresponds to the level of turbulence generation from the spray and fuel distribution in the combustion chamber. It is recommended that the user enable the Advanced Nozzle Number model if correct capture of this behaviour is desired.

c 2017 CMCL Innovations 296 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

Figure 7.8: Various distribution functions, F (i) as a function of α for 100 parti- cles

Alpha and spray cone angle Suggested values of alpha are available for multiple hole injectors when using the PDF injection model. The values are calculated based on the number of nozzle holes on the injector and the value of alpha for a single hole injector. The calculation returns the effective alpha for an injector with multiple holes.

For the physical injection model an effective spray cone angle calculation is also available. The calculation can be enabled by selecting the Detailed Full Cone Angle Mode. The effective spray cone angle calculation uses the single hole spray cone angle value and the number of nozzle holes on the injec- tor. The calculation is based on the effective spray volume compared with the spray volume of the corresponding single nozzle hole injector.

√ −1 θsingle θeff = 2 · sin ( n · sin( /2)) (7.260)

where θeff and θsingle are the effective and single nozzle hole full spray cone

User Manual v9.4.1, Build 01 297 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations angles respectively and n is the number of nozzle holes on the injector.

7.3.15 Wall impingement model

The wall impingement model should be used when it is required to predict soot formation in early injection GDI cases. When the wall impingement model is activated, the SRM stochastic particles are separated into two zones, i.e. the bulk and the wall zone. Note that the wall impingement model is not supported for the three-zone SI model.

The bulk zone should contain most of the cylinder contents (e.g. 99%) and can have a low number of stochastic particles (at least 2 for the two-zone SI models) if the user wish to assume the bulk zone is homogeneous which is a reasonable assumption for an early injection case. On the other hand, the wall zone should have a much higher number of stochastic particles (e.g. at least 50 − 100). Since the total mass of the wall zone is small (e.g. 1%) and the mass is distributed over many particles, high equivalence ratios can be achieved in these particles easily.

Two injection options are available when the wall impingement model is en- abled:

1. Physical, and

2. PDF (Spray + Wall).

Physical

First, fuel is injected to the bulk zone as described in the ‘Physical Direct In- jection Model’ section. Then, it is assumed that impingement occurs when

θ  Bore θ  4V (t) S(t) sin cone > or S(t) cos cone > , (7.261) 2 2 2 πBore2

c 2017 CMCL Innovations 298 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

where θcone is the penetration cone angle illustrated in Figure 7.7, V (t) is the current total volume, and S(t) is defined as

S(t) = vinj∆tSOI. (7.262)

When one of the conditions in (7.261) is satisfied, the stochastic particles in the oldest penetration stage are selected to undergo the impingement process. The regime of the post-impingement droplets for each stochastic particle in the oldest penetration stage is calculated according to the Weber number:

2  θcone  ρlD vinj cos We = 2 , (7.263) σ where ρl is the liquid density, D is the droplet SMD of the corresponding stochastic particle, vinj is the injection velocity, and σ is the droplet surface tension.

The regime depends on the value of We:

• Stick: We ≤ 2

• Rebound: 2 < We ≤ 20

• Spread: 20 < We ≤ Wec

• Splash: Wec < We

The critical Weber number, Wec, is defined as:

ρ σD We = 1320La−0.18, with La = l . (7.264) c µ2

In the current model, the stick regime and spread regimes are treated similarly - liquid in these stochastic particles are transferred to the wall film entirely. In the rebound regime, liquid in the corresponding stochastic particle is dis- tributed uniformly to the particles in the wall zone (no liquid is transferred to the wall film). Lastly in the splash regime, the impinging droplets are distributed

User Manual v9.4.1, Build 01 299 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations between the wall film and the wall particles. The ratio of the split is computed as:

∆m γ = w = 0.2 + 0.9a, (7.265) ∆mw + ∆mfilm where ∆mw and ∆mfilm are the mass fraction of the impinging droplets trans- ferred to the wall particles and wall film respectively, and a is a number gener- ated uniformly between 0 and 1. In cases where γ exceeds unity, part of the existing wall film is entrained by the rebounding droplets.

PDF (Spray + Wall)

The following steps are executed when this model is selected:

1. Compute the mass of liquid fuel to be injected in the timestep.

2. Distribute injected liquid between the bulk and the wall zone according to ‘Injection Wall Fraction’.

3. Update the global SMD in the bulk zone using Equations 7.256 and 7.257.

4. Distribute evaporated mass in the bulk zone, mf throughout the combus- tion chamber by; a) computing the distribution profile F with respect to the ith particle in the bulk zone,

 !2 Pi m(i) F (i) = exp −α i=1  PNpar (i) i=1 m

PNpar (i) b) normalising the distribution such that i=1 F = 1

c) distributing the total evaporated mass, mf for that timestep amongst the particles in the bulk zone.

(i) (i) (i) ∆mf = F m

c 2017 CMCL Innovations 300 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

Wall film evaporation

The transfer of liquid to the wall film is described in the previous sections de- pending on which injection model is chosen. This section describes the evap- oration of the wall film and how the fuel is distributed amongst the particles in the wall zone.

The wall film evaporation rate, λfilm, is a user input which can be found within the ‘Direct Injection’ model settings. Note that the distribution profile for the wall zone Fwall is different from the bulk zone and it has an extra user input parameter αwall (Injection Wall Alpha). At each timestep, the following steps are executed if the wall film mass is non-zero:

1. Compute the mass of evaporated wall film mf according to λfilm.

2. Distribute evaporated mass from the wall film to the particles in the wall zone by:

a) computing the distribution profile F with respect to the ith particle in the wall zone,

 2 Pi (i) ! (i) i=1 m F = exp −αwall  wall PNpar (i) i=1 m

PNpar (i) b) normalising the distribution such that i=1 Fwall = 1, and

c) distributing the total evaporated wall film mass mf for that timestep amongst the particles in the wall zone.

(i) (i) (i) ∆mf = Fwallm

7.3.16 Droplet model

Users can impose an SMD, D or can apply a correlation to estimate the droplet size, SMD at the exit of the nozzle [50]. This can be invoked via switching on

User Manual v9.4.1, Build 01 301 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations the Droplet Correlation in Injection - Injection and fuel characteristics tab.

B C D E F D = Aν σ ρf ρa ∆P . (7.266) where ν and σ are viscosity and surface tension, and ∆P is the difference between injection and ambient pressures.

Parameters A through F can be derived from any experimental observations and if required be directly input by users.

Injection Pressure

If the SMD correlation is selected, the injection pressure is a required input. For a common rail injection system the rail pressure is used. When a me- chanical injection system is selected the user can either specify an injection pressure profile or use a calculated injection pressure [23] using:

6NQ  Pinj = G 2 (7.267) θnd0 where N is the engine speed in rpm, n is the number of injector holes, d0 is the injector nozzle diameter in m, θ is the injection duration in CAD, Q is the quantity of fuel injected in mg and G is a user adjustable parameter.

7.3.17 Gas-phase emissions model

The chemical species and their corresponding thermochemistry data and re- action rates used in the simulation are defined by the adopted chemical kinetic mechanism or fuel model. The evolution of each chemical species are re- ported at each time step for a global mass fraction, molar and mole fraction composition. In addition, for a limited number of key chemical species if avail- able (NOx, CO, unburned hydrocarbons i.e. uHCs, CO, OH, O2, HO2 and soot), the mass fraction are output on a per-particle basis.

Advanced fuel oxidation and emissions formation models are "physics-based",

c 2017 CMCL Innovations 302 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite) thus performance would be expected to follow the trends observed experimen- tally. It is recommended that if inadequate model performance is observed that the chemical model is modified to reproduce experimental observations. How- ever this may prove challenging, hence to support a simple solution, the final regulated exhaust gas emission can be scaled using a linear parameter to obtain a direct match with experimental data.

Nitrous oxides emissions

In order to simulate nitrous oxides, NOx emissions, it is important that the adopted chemical kinetic mechanism includes chemical species named NO and NOx and a sufficiently accurate description of nitrous oxides emission for- mation chemistry.

The NOx emissions are obtained according to mass flow rate M˙ of NOx in the exhaust as:

˙ ˙ ˙  MNOx,exhaust = αNOx,exhaust MNO,exhaust + MNO2,exhaust + βNOx,exhaust (7.268)

˙ where MNO,exhaust and βNOx,exhaust are standard emissions modifies to allow tun- ing for different conventions and measurement methods.

The value of NOx emission output in the exhaust gas is in the form of the cycle in parts per million (ppm) as:

6 value of NOx in ppm = 10 XNOx (7.269)

where the mole fraction of NOx emissions is calculated as:

n˙ NOx,exhaust XNOx = (7.270) n˙ t,exhaust

and n˙ NOx,exhaust (n˙ t,exhaust) is the (total) molar outflow of NOx in the exhaust.

User Manual v9.4.1, Build 01 303 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

Unburned hydrocarbons emissions

In order to simulate unburned hydrocarbons, uHCs emissions, it is important that the adopted chemical kinetic mechanism includes chemical species con- taining hydrogen and carbon atoms and a sufficiently accurate description of unburned hydrocarbon emission formation chemistry.

The uHCs emissions are obtained by summing the mole fractions of all the chemical species, i which contain hydrogen and carbon atoms.

X XuHCs = XHC,i (7.271) i

The value of uHCs in the exhaust can be converted to parts-per-million (ppm) as:

6 value of uHCs in ppm = 10 XuHCs (7.272)

The above method represents an idealised method for reporting a correspond- ing uHCs emissions from a simulation, however it is important to consider that the experimental measurements are limited by their corresponding methodol- ogy and apparatus. For example the usual measuring device for the measure- ment of uHC emissions is the Flame Ionization Detector (FID), which counts the number of carbon atoms in the composition [16]. The assumption being that the carbon atoms detected by the device are bonded to hydrogen atoms and are thus hydrocarbons, however this assumption means that the corre- sponding number of hydrogen atoms must be estimated. A typical assumption is that these hydrocarbons are pure propane (C3H8) which suffers from two major shortcomings:

1. Detection: Not all carbon atoms passed through the FID are detected, for example carbon atoms attached to oxygen atoms are not easily detected especially when the oxygen and carbon form a carbonyl group (C=O).

2. Interpretation: Even if these oxygenated carbon atoms were detected by

c 2017 CMCL Innovations 304 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

the FID, they would be considered to have a molar mass of 41 kg/kmol (if

assumed to be C3H8), whereas the actual molar mass of an oxygenated carbon group would be 12+16=28 kg/kmol i.e. the error involved in measurement depends on the actual composition of the uHCs.

Nevertheless, in order to account for some of the above and to support the comparison between simulated and measured uHCs a reference value for un- burned hydrocarbons, uHC3 based on propane is defined as follows:

Σi XHC,i Zi XuHC3 = (7.273) ZC3H8

6 value of uHC3 in PPM = 10 XuHC3 (7.274) where Z represents the number of carbon atoms for the chemical species i.

The uHCs emissions can be modified by tuning factors αuHCs,exhaust and

βuHCs,exhaust due to different convetions and measurement methods as dis- cussed above as:

M˙ uHCs,exhaust = αuHCs,exhaustM˙ uHCs,exhaust + βuHCs,exhaust (7.275)

All other regulated and unregulated gas-phase emissions

Some of the species mole fraction, Xi including CO for the cycle are also output in parts per million (ppm) according to the following equation.

6 value of CO in ppm = 10 Xi (7.276)

The tuning factors αCO,exhaust and βCO,exhaust are applied to the CO mass flow value in the exhaust gas as:

M˙ CO,exhaust = αCO,exhaustM˙ CO,exhaust + βCO,exhaust (7.277)

User Manual v9.4.1, Build 01 305 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations

7.3.18 Particulate matter emissions model

The mass flow rate of soot in the exhaust can be modified by the tuning factors

αSoot,exhaust and βSoot,exhaust as:

M˙ Soot,exhaust = αSoot,exhaustM˙ Soot,exhaust + βSoot,exhaust (7.278)

The mass of soot can be calculated by the following models.

Empirical Soot Model

All empirical models can be tuned using four standard multipliers for soot for- mation preexponential Csfpe, soot oxidation preexponential, Csope, soot forma- tion exponential, Csfe and soot oxidation exponential, Csoe.

Hiroyasu Soot Model The Hiroyasu model is employed here as an empiri- cal soot model. The concentration of soot in the exhaust is governed by the formation and oxidation of soot during the engine cycle.

dm dm dm s = sf − so (7.279) dt dt dt where m is mass, subscript s, sf and so denote soot emitted, soot formed and soot oxidized, respectively.

The formation rate is computed by assuming a first order reaction of vaporised fuel, mfg, this can also be switched by users to acetylene.

dm −E C sf = A C m P0.5 exp sf sfe . (7.280) dt f sfpe fg RT

The soot oxidation is computed by assuming a second order reaction between soot, ms and oxygen.

dm P −E C so = A C m ox P1.8 exp so soe , (7.281) dt o sope s P RT

c 2017 CMCL Innovations 306 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

where Esf, Eso, Af and Ao are user defined activation and pre-exponential fac- tors, given the values of 1.25 × 104 kcal kmol−1, 1.4 × 104 kcal kmol−1, 150 atm−0.5 s−1 and 2250 atm−1.8 s−1. These are usually determined by calibrating computed results with experimental observations.

Hiroyasu/ Hiroyasu/Nagle and Strickland-Constable Again following on from Equation 7.279. The formation rate is computed by assuming a first order reaction of vaporised fuel, mfg, this can also be switched by users to acetylene.

dm −E C sf = A C m P0.5 exp sf sfe . (7.282) dt f sfpe fg RT where Esf and Af are user defined activation and pre-exponential factors, given the values of 1.25 × 104 kcal kmol−1 and 150 atm−0.5 s−1 respectively. These are usually determined by calibrating computed results with experimental ob- servations.

Oxidation is computed using a Nagle and Strickland-Constable method

dmso MC = Csope msw (7.283) dt ρsds

−3 where MC is the carbon molecular weight, ρs is the soot density (2.0 g cm ), −7 and ds is the soot diameter (4.5 × 10 cm). The term w is the net reaction rate of the following set of reactions.

kaPox w = x + kbPox(1 − x) (7.284) 1 + kzPox

The proportion x, of A sites is given by

P x = ox (7.285) Pox + (kt/kb)

User Manual v9.4.1, Build 01 307 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations where

−2 −1 −1 ka = 20 exp (−15100Csoe/T ) mol cm s atm (7.286a) −3 −2 −1 −1 kb = 4.46 × 10 exp (−7640Csoe/T ) mol cm s atm (7.286b) 5 −2 −1 kt = 1.51 × 10 exp (−48800Csoe/T ) mol cm s (7.286c) −1 kz = 20 exp (−15100Csoe/T ) atm (7.286d)

Population Balance Soot (PBS)

A detailed set of population balance equations is used to model soot formation. The solver is based on a Monte Carlo method [4, 14] and is implemented in an internal particle modelling library.

The surface area, Sa, the number of primary particles, NPP and primary par- PP ticle j diameters, dj (assuming sphericity) are tracked for each aggregate. The number of of carbon atoms, C, the number of hydrogen atoms, H, and the number of PAH molecules ,NPAH, are also stored and make up the indi- vidual aggregate’s chemical composition. The number of functional sites are tracked using the Aromatic Site Counting Model [7]. The site types considered here are free edge, armchair, zigzag, and bay sites, and five-membered rings

(Figure 7.9), with numbers Ned, Nac, Nzz, Nbay, and NR5 respectively. The statistical representation of PAHs and their functional sites provides a de- tailed soot aggregate description but remains computationally efficient com- pared with tracking every single molecule. The number of internal co-ordinates is large which is why Monte Carlo methods are employed.

The pathways included in the model that enable mass transfer from the gas phase to the particulate phase are inception, condensation and surface growth. Coagulation and surface growth are modelled in the particulate phase. The surface chemistry includes growth and oxidation reactions [40]. The rates of the surface reactions depend on the attacked functional site and also the neighboring ones. This information can be provided through statistical corre-

c 2017 CMCL Innovations 308 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

Figure 7.9: Types of functional sites on the edge of a PAH molecule. lations obtained from Kinetic Monte Carlo (KMC) simulations [40]. For the computational speed-up of surface reactions the Linear Process Deferment Algorithm (LPDA) [35] is employed.

The physical population of soot aggregates is represented numerically by an ensemble of stochastic soot particles, and, just as with the SRM, any physical prediction must be asymptotically independent of the number of stochastic particles.

Empirical PM and PN Model

Particulate matter (PM) and particulate number (PN) are calculated based on empirical models. Specific PM is evaluated from the specific soot mass calcu- lated by the soot models [22].

PM = Cmsoot + (1 − C)mother (7.287)

where PM is the specific PM emission, msoot is the specific soot mass and mother represents the other components of PM such as soluble organic com- −1 pounds (SOF) and SOx. These three quantites have units of mg kWh . In addition, C represents the mean PM to soot mass ratio and is available to the user along with mother. Empirical specific PN emissions can either be calculated from specific soot mass or specific PM emissions. If specific soot mass msoot is used, there are

User Manual v9.4.1, Build 01 309 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations two correlations available: Arndt [2] and Gallus [11].

PN = 10(log10(msoot)Asoot+Bsoot) (7.288)

Equation 7.288 shows Arndt’s correlation which gives specific PN emissions (# kWh−1) as a function of specific soot mass (mg kWh−1). The parameters

Asoot and Bsoot are user adjustable parameters with default values of 0.965 and 12.232 respectively.

PN = rmsoot + CGallus (7.289)

Equation 7.289 shows Gallus’ correlation which gives specific PN emissions −1 −1 (# kWh ) as a function of specific soot mass msoot (mg kWh ). Where r is −1 the mean PN to soot ratio and CGallus (# kWh ) is a correlation constant. If specific PM emissions is used to obtain PN the Arndt PM to PN correlation is used.

PN = 10(log10(PM)APM+BPM) (7.290) which gives specific PN emissions (# kWh−1) are a function of specific PM −1 emissions (mg kWh ). APM and BPM are user adjustable parameters with default values of 0.985 and 12.572 respectively.

7.3.19 Measures of Mixture strength

There are numerous ways of quantifying the ‘strength’ of a combustible mix- ture. One of the most common approaches is the (fuel/oxidiser) equivalence ratio, which is defined as

X /X Φ = fuel oxidiser . (7.291) (Xfuel/Xoxidiser)stoich.

c 2017 CMCL Innovations 310 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite)

A second common measure applied throughout the engine development com- munity is λ. This is simply the inverse of the above equation.

λ = Φ−1 (7.292)

It must be noted that throughout the combustion science and engine develop- ment communities many variants have been proposed, which can occasionally cause confusion.

Fuel/air equivalence ratio

The following section presents an example of how the equivalence ratio is computed in kinetics & SRM Engine Suite.

Complete oxidation of a hydrocarbon fuel can be written as

aCx Hy + bO2 −→ cCO2 + dH2O, (7.293) where the stoichiometric coefficients a, b, c, and d need to be determined such that conservation of atom numbers is satisfied. This implies

ax = c (7.294) ay = 2d (7.295) 2b = 2c + d, (7.296) which reduces to a 4 = . (7.297) b 4x + y

If a˜ and b˜ denote the actual total numbers of moles of fuel and O2 in a particular mixture, then the equivalence ratio of that mixture can be obtained as

a˜ .a 4ax˜ + ay˜ Φ = = . (7.298) b˜ b 4b˜

Noting that ax˜ is the number of moles of carbon atoms in the system, and

User Manual v9.4.1, Build 01 311 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations similarly ay˜ the number of moles of hydrogen atoms, and 2b˜ the number of moles of oxygen atoms, this can be rewritten as

4[C] + [H] Φ = , (7.299) 2[O] where [C], [H], and [O] denote the total molar concentrations of carbon, hy- drogen, and oxygen respectively. Note that this is equivalent to using total numbers of moles, as Equation (7.299) is a ratio of such numbers.

Comments:

1. The equivalence ratio as defined by Equation (7.299) is a passive scalar, i.e. it is not affected by chemical reaction. This makes it suitable for studying exclusively the effects of mixing in a reacting flow for example.

2. In order to evaluate Equation (7.299), it is not necessary to know what fuel has been used. In particular, this allows non-premixed applications with multiple fuels and EGR.

Mixture composition as function of equivalence ratio

Consider the following problem: Given compositions of oxidiser, fuel, and

EGR, denoted by the vectors of mass fractions Yox, Yfuel, and YEGR respec- tively, and a fixed EGR mass fraction , how much fuel is required in order for the mixture to have a given equivalence ratio, Φ? More precisely, assuming that the components of each of the three composition vectors sum to unity, the composition of the mixture is given by

  Y = YEGR + (1 − ) αYfuel + (1 − α)Yox , (7.300) and α needs to be determined. Even though the equivalence ratio is a non- linear function of composition, α can be determined explicitly as follows. We begin by rearranging the mixture composition to

Y = YEGR + (1 − )Yox + α(1 − )(Yfuel − Yox) =: B + αA, (7.301)

c 2017 CMCL Innovations 312 User Manual v9.4.1, Build 01 CMCL < > Innovations 7.3 Internal Combustion Engine Model (SRM Engine Suite) and convert this to mole fractions

Yi M Bi + αAi Xi = = M. (7.302) Mi Mi

At this point, we note that the mean molar mass M of the mixture is a function of the composition Y and hence of α, but since Φ can be written as a ratio of mole fractions, any overall factors will cancel out. Denoting the number of car- bon, hydrogen, and oxygen atoms in species i by Ci , Hi , and Oi , respectively, we can write Equation (7.299) as P P P 4 Xi Ci + Xi Hi Xi (4Ci + Hi ) Φ = P = P , (7.303) 2 Xi Oi 2 Xi Oi and further rearrange it to

X Xi (4Ci + Hi − 2ΦOi ) = 0. (7.304)

Combining with Equation (7.302) and cancelling M yields

X Bi + αAi (4Ci + Hi − 2ΦOi ) = 0. (7.305) Mi

This can be solved for α with the result P Bi (4Ci + Hi − 2ΦOi )/Mi α = −P . (7.306) Ai (4Ci + Hi − 2ΦOi )/Mi

7.3.20 Exhaust Gas Residual

The total EGR value is defined in mass terms, the fraction of the total EGR to the total mixture. The total EGR is composed of external EGR and the residual burned fraction. m EGR, tot = EGR,tot (7.307) mEGR,tot + mfuel + moxidiser

The residual burned fraction can be specified manually or calculated automat- ically from engine speed and the difference between the intake and exhaust

User Manual v9.4.1, Build 01 313 c 2017 CMCL Innovations CMCL < > 7 INHOMOGENEOUS REACTOR MODELS Innovations manifold pressures.

7.3.21 Apparent heat release rate

The apparent heat release rate is the difference between the apparent gross heat release rate and the heat transfer rate to the walls. Apparent heat release rate is calculated by the following equation [16]:

dQ γ dV 1 dp = p + V (7.308) dt γ − 1 dt γ − 1 dt where γ is the ratio of specific heats. The user can select an automatically calculated γ or define a constant value. Exponential smoothing is also ap- plied to the output where the smoothing damping factor can be automatically determined or user defined.

c 2017 CMCL Innovations 314 User Manual v9.4.1, Build 01 One-dimensional laminar flames

This chapter describes the models and numerical methods used by the one-dimensional laminar flame models in the kinetics & SRM Engine Suite software.

User Manual v9.4.1, Build 01 315 c 2017 CMCL Innovations CMCL < > 8 ONE-DIMENSIONAL LAMINAR FLAMES Innovations

8.1 Introduction kinetics & SRM Engine Suite allows the simulation of three types of steady- state laminar flames:

1. Burner-stabilised laminar premixed flames

2. Counter-flow diffusion flames

3. Stagnation flames

Simulated quantities include thermo- and fluid-dynamic properties as well as gas-phase chemical kinetics. Particle models of any kind are not currently considered.

In order to describe such flames mathematically, it is natural to start from the full transport equations for three-dimensional reacting flow. One of the main assumptions is rotational symmetry about a given axis, which reduces the number of degrees of freedom to two – an axial one (parallel to the axis), and a radial one (orthogonal to the axis). A (type-dependent) special radial behaviour of the solution is then assumed, which, after a transformation of variables, allows the number of degrees of freedom to be further reduced to one – the axial location. Imposing appropriate conditions at the boundary of the spatial domain, we thus arrive for each flame type at a one-dimensional boundary value problem (BVP). The two parts of the resulting BVPs (governing equations and boundary conditions) are discussed in subsections 8.2 and 8.3, respectively, below.

8.2 Governing equations

c 2017 CMCL Innovations 316 User Manual v9.4.1, Build 01 CMCL < > Innovations 8.2 Governing equations

8.2.1 Conservation laws

At steady-state, conservation of mass in cylindrical coordinates (x, r, θ) is given by the continuity equation [28]

∂ 1 ∂ (ρu) + (ρvr) = 0, (8.309) ∂x r ∂r where u and v are the axial and radial velocity components and ρ is the mass v density. A key step is now to recognise that r and other variables should be functions of x only [49]. One can then define

ρu F(x) := (8.310) 2 ρv G(x) := − , (8.311) r such that mass conservation reduces to

dF(x) G(x) = . (8.312) dx

Since F and G are functions of x only, so are ρ, u, the temperature T , and the species mass fractions Yk . The eigenvalue Λ of the radial momentum equation is

1 ∂p Λ = (8.313) r ∂r and is constant [20], with p denoting the pressure.

The governing equations for the flame types we are considering can be stated

User Manual v9.4.1, Build 01 317 c 2017 CMCL Innovations CMCL < > 8 ONE-DIMENSIONAL LAMINAR FLAMES Innovations as:

dF(x) G(x) − = 0 (8.314) dx d Λ(x) = 0 (8.315) dx d FG 3G2 d h d Gi Λ − 2 + + µ = 0 (8.316) dx ρ ρ dx dx ρ K K dT 1 d  dT  ρ X dT 1 X 2F − λ + Yk Vk cp,k + ω˙ k hk Wk = 0 (8.317) dx cp dx dx cp dx cp k=1 k=1 dY d 2F k + ρY V  − ω˙ W = 0 (k = 1, ... , K ) (8.318) dx dx k k k k

Here, µ, λ, and cp denote the dynamic viscosity, thermal conductivity, and mean specific heat capacity at constant pressure, respectively, of the mixture.

Vk denotes the diffusion velocity (see subsection on diffusion below), cp,k the specific heat capacity at constant pressure,ω ˙ k the molar production rate, hk th the specific enthalpy, and Wk the molar mass of the k species.

The dependent variables are F, G, Λ, T , and Yk (k = 1, ... , K ). The indepen- dent variable is the spatial coordinate x. The axial velocity u follows from the definition of F (Eqn. 8.310).

The mass density ρ is not a dependent variable in the sense that it is not directly solved for, but follows from the dependent variables (mass fractions and temperature) by means of the ideal gas law

pW ρ = , (8.319) RT where R is the universal gas constant, and W is the mean molar mass of the mixture.

8.2.2 Diffusion

One of the concepts common to problems with a spatial dimension is the dif- th fusion of chemical species. The diffusion velocity Vk of the k species can be

c 2017 CMCL Innovations 318 User Manual v9.4.1, Build 01 CMCL < > Innovations 8.2 Governing equations decomposed as [19]

ord therm corr Vk = Vk + Vk + V . (8.320)

ord The ordinary diffusion velocities Vk are given either by the multi-component formulation [20], [28]

K ord 1 X dXj V = Wj Dk,j , (8.321) k X W dx k j=6 k or by the mixture-averaged formulation

ord 1 dXk Vk = −Dk , (8.322) Xk dx

th where Xk is the mole fraction of the k species. Here, Dk,j denote the multi- component diffusion coefficients, and the mixture-averaged diffusion coeffi- cients Dk are given by

1 − Yk Dk = P , (8.323) Xj /Dk,j j=6 k with Dk,j denoting the binary diffusion coefficients.

therm The thermal diffusion velocities Vk are given by

T therm Dk 1 dT Vk = − , (8.324) ρYk T dx

T where Dk denote the thermal diffusion coefficients. The correction velocity V corr ensures that

K X Yk Vk = 0. (8.325) k=1

This is not required for the multicomponent formulation.

User Manual v9.4.1, Build 01 319 c 2017 CMCL Innovations CMCL < > 8 ONE-DIMENSIONAL LAMINAR FLAMES Innovations

8.3 Boundary conditions

In order to complete the definition of the boundary value problem, additional conditions need to be specified for the dependent variables both at x = 0 and at x = L, where L denotes the length of the spatial domain.

Several different subtypes of flames can be modelled by equations (8.314)- (8.318). The difference manifests itself solely in the boundary conditions.

8.3.1 Burner-stabilised laminar premixed flames

For burner-stabilised laminar premixed flames [19], G and hence Λ are equal to zero. Further, F is constant, and is known due to

F(0) − jburner/2 = 0, (8.326)

2 where jburner denotes the mass flux at the burner, SI unit kg/m /s.

Given a specified temperature T0 and mass flux fractions 0,k , the remaining boundary conditions are formulated as follows.

T (0) − T0 = 0 (8.327) ρ(0)Y (0)V (0) Y (0) + k k −  = 0 (k = 1, ... , K ) (8.328) k 2F(0) 0,k dT = 0 (8.329) dx x=L dY k = 0 (k = 1, ... , K ) (8.330) dx x=L

Note that specifying mass flux fractions k = Yk + ρYk Vk /(2F) rather than mass fractions allows diffusion into the nozzle in the presence of gradients at the boundary.

c 2017 CMCL Innovations 320 User Manual v9.4.1, Build 01 CMCL < > Innovations 8.3 Boundary conditions

8.3.2 Counter-flow diffusion flames

Given mass density, temperature, velocity, and mass fractions at both the fuel and the oxidiser side, the boundary conditions for counter-flow diffusion flames are:

ρ u F(0) − fuel fuel = 0 (8.331) 2 G(0) = 0 (8.332)

T (0) − Tfuel = 0 (8.333)

ρ(0)u(0)Yk (0) + ρ(0)Yk (0)Vk (0) − (ρuYk )fuel = 0 (k = 1, ... , K ) (8.334) ρ u F(L) − oxid oxid = 0 (8.335) 2 G(L) = 0 (8.336)

T (L) − Toxid = 0 (8.337)

ρ(L)u(L)Yk (L) + ρ(L)Yk (L)Vk (L) − (ρuYk )oxid = 0 (k = 1, ... , K ) (8.338)

8.3.3 Stagnation flames

The boundary conditions for stagnation flames are very similar to those of counterflow-diffusion flames. The main difference is that the ’oxidiser’ side is replaced with a stagnation plate, i.e. the velocity at the plate is equal to zero.

ρ u F(0) − fuel fuel = 0 (8.339) 2 G(0) = 0 (8.340)

T (0) − Tfuel = 0 (8.341)

ρ(0)Yk (0)Vk (0) − ρufuel(Yk,fuel − Yk (0)) = 0 (k = 1, ... , K ) (8.342) F(L) = 0 (8.343) G(L) = 0 (8.344)

T (L) − Tplate = 0 (8.345)

ρ(L)Yk (L)Vk (L) = 0 (k = 1, ... , K ) (8.346)

User Manual v9.4.1, Build 01 321 c 2017 CMCL Innovations Post-processing analyses

This chapter describes the post-processing analyses available in thek inetics & SRM Engine Suite software.

c 2017 CMCL Innovations 322 User Manual v9.4.1, Build 01 CMCL < > Innovations 9.1 Ignition Delay

9.1 Ignition Delay

The kinetics & SRM Engine Suite calculates the ignition delay time as an op- tional post-process at the end of each simulation. A number of methods are available to define the ignition delay time:

1. Max. dT/dt - Time at which maximum rate of temperature rise is ob- served.

2. Max. dp/dt - Time at which maximum rate of pressure rise is observe.d

3. User defined DeltaT - Time at which the temperature has increased a user defined amount.

4. Max. concentration of user defined species - Time at which the maximum concentration of a user defined species is observed (such as OH or other radical tracers).

5. Max. formation rate of user defined species - Time at which the maximum formation rate of a user defined species is observed.

These can be set by clicking on the “Derived Quantities” tab within the input panels group of the parent case, at the conclusion of the simulation the igni- tion delay time is calculated by using any one of these five methods. Users should select the ignition delay time of their choice and re-run the simulation, the default here is the time at which a set temperature increase occurs (User defined ∆ T).

9.2 Sensitivity analysis

The sensitivity of a model may be assessed by calculating the sensitivity coef- ficients of the model with respect to its parameters. In general, the sensitivity will be different at different locations in the parameter space of the model. For this reason, it is usual to consider the sensitivity around some base case.

User Manual v9.4.1, Build 01 323 c 2017 CMCL Innovations CMCL < > 9 POST-PROCESSING ANALYSES Innovations

A sensitivity coefficient is the derivative of a model response with respect to a model parameter. For example, the derivative of a model response Q with respect to a parameter P, evaluated at a base case value of the parameter, P0. The sensitivity coefficients offered by kinetics & SRM Engine Suite are calcu- lated by finite difference. Two types of sensitivity coefficient are available:

• Raw Sensitivity Coefficients

 Q(P0 + ∆P) − Q(P0)  forward difference  ∆P SPQ = (9.347)  Q(P0 + ∆P) − Q(P0 − ∆P)  central difference, 2∆P

where SPQ is raw sensitivity coefficient of the model response Q with respect to the parameter P, which is perturbed by ∆P from its base

case value P0. The user is able to select whether to use forward or central differences.

• Normalised Sensitivity Coefficients (also known as elasticity indices)

P0 NSPQ = SPQ × , (9.348) Q(P0)

where NSPQ is normalised sensitivity coefficient of the model response Q with respect to the parameter P. The normalised sensitivity coeffi- cients provide a dimensionless measure of the relative change in model response Q with respect to a relative change in the parameter P.

9.3 Mechanism reduction

Many chemical mechanisms contain detailed descriptions of the chemistry, sometimes running to thousands of species and tens of thousands of reac- tions. However, the time taken to integrate the chemical rate equations is often the single most CPU intensive operation in a reactive simulation and typically scales quadratically with the number of species in the mechanism.

c 2017 CMCL Innovations 324 User Manual v9.4.1, Build 01 CMCL < > Innovations 9.3 Mechanism reduction

The purpose of mechanism reduction techniques is to enable the development of smaller mechanisms that may be used to reduce the CPU time for simula- tions of practical devices. The reduced mechanisms must retain sufficient detail to be predictive for the cases of interest, but should no longer contain superfluous detail that unnecessarily slows down the simulations.

9.3.1 Direct Relation Graph (DRG) method

The Direct Relation Graph (DRG) mechanism reduction method is available as a post-process. Two versions of the method are implemented, DRG [26] and DRGEP [36].

The analysis procedure can be described in a few steps.

• A set of target species is defined. The target species will be preserved in the reduced mechanism, no matter how strong the reduction.

• For each sample point:

– A norm is defined to calculate the strength of the coupling between all species-species and species-reaction pairs in the mechanism. These quantities are known as Direct Interaction Coefficients (DIC) and Direct Interaction Coefficients for Reactions (DIC_R). – The DICs for species are used to build a directed graph. Each node in the graph corresponds to chemical species. An edge between any pair of species exists if and only if their DIC is non-zero. – The directed graph is searched. At each sample point, a quantity indicating the strength of the coupling between each species and each target species is calculated. These quantities are known as Overall Importance Coefficients (OIC). – The OICs are scaled according to the scaling factor (SF) algorithm in order to weight relative importance of the current sample point. – If requested, a quantity indicating the strength of the coupling be- tween each reaction and each target species is calculated. These

User Manual v9.4.1, Build 01 325 c 2017 CMCL Innovations CMCL < > 9 POST-PROCESSING ANALYSES Innovations

quantities are known as Overall Importance Coefficients for Re- actions (OIC_R).

• The final OIC and OIC_R are taken as the maximum of the OIC and OIC_R across all target species and all sample points.

Once the analysis is complete, the mechanism may be reduced using a user- defined threshold ε and either OIC or OIC_R.

• OIC: All species with OICi < ε will be removed. Reactions that involve removed species will also be removed.

• OIC_R: All reactions with OIC_Ri < ε will be removed. However, species that no longer participate in any reactions are not removed. If necessary, these species may be removed after a subsequent reduction analysis. This prevents the inadvertent removal of important inert species.

The analysis may be performed concurrently on any number of cases that use the same chemical mechanism. The OIC are calculated as the maximum OIC across all cases. This means that the more cases you specify, the larger the OICs, so the less you might expect to be able to reduce the mechanism without some loss of accuracy. This approach is recommended if you want to produce a reduced mechanism that is suitable for a range of conditions.

Direct Interaction Coefficients (DIC)

Several alternative options are offered for the calculation of the DIC.

• The original definition proposed by Lu and Law [26]:

DICLu is defined as the ratio of the total rate of reactions involving

species Sn and Sm, and the total rate of all reactions involving Sn

PI |ν ω δ | DICLu = i=1 Sn,Ri Ri Sm,Ri , (9.349) Sn,Sm PI i=1 |νSn,Ri ωRi |

c 2017 CMCL Innovations 326 User Manual v9.4.1, Build 01 CMCL < > Innovations 9.3 Mechanism reduction

where the summations run over the reactions, νSn,Ri is the net stoichio-

metric coefficient of species Sn in reaction i, ωRi is the rate of reaction i

and δSm,Ri checks whether species Sm participates in reaction i.

00 0 ν = ν − ν , Sn,Ri Sn,Ri Sn,Ri

K K 0 00 Y ν Y ν j,Ri j,Ri ωRi = kfRi [Xj ] − krRi [Xj ] , j=1 j=1  1 if reaction i involves species Sm δSm,Ri = 0 otherwise.

Lu DIC_R is defined as the ratio of the rate of reaction Ri involving species

Sn, and the total rate of all reactions involving n

|ν ω | DIC_RLu = Sn,Ri Ri . (9.350) Ri ,Sn PI i=1 |νSn,Ri ωRi |

• Pepiot-Desjardins and Pitsch [36]:

The definition of DICPep. is similar to Equation (9.349), except that it distinguishes between the production and consumption terms for each species. Treating them separately negates the effect of reactions that have zero net effect on a chosen target species.

| PI ν ω δ | DICPep. = i=1 Sn,Ri Ri Sm,Ri , (9.351) Sn,Sm max(PSn , CSn )

where PSn and CSn are production and consumption terms

I X PSn = max(0, νSn,Ri ωRi ), i=1 (9.352) I X CSn = max(0, −νSn,Ri ωRi ). i=1

User Manual v9.4.1, Build 01 327 c 2017 CMCL Innovations CMCL < > 9 POST-PROCESSING ANALYSES Innovations

Likewise, |ν ω | DIC_RPep. = Sn,Ri Ri . (9.353) Ri ,Sn max(PSn , CSn )

• Luo et al. [27]:

DICLuo was developed for mechanisms containing many isomers.

Luo maxi (|νSn,Ri ωRi δSm,Ri |) DICSn,Sm = . (9.354) maxi (|νSn,Ri ωRi |)

The corresponding DIC_RLuo is defined

|ν ω | DIC_RLuo = Sn,Ri Ri . (9.355) Ri ,Sn maxi (|νSn,Ri ωRi |)

Overall Importance Coefficients (OIC)

The Overall Importance Coefficients (OIC) are required because the pair-wise connection strengths described by the DICs are not sufficient to capture the importance of species that are not directly connected.

The OICs are calculated by analysing the paths, Tk → Sn, that connect a target species Tk to each species Sn on a directed graph. Each node on the graph corresponds to a species, and an edge exists between nodes if and only if the DIC is non-zero for the corresponding pair of species.

The details of the OIC calculation differ slightly between DRG and DRGEP.

c 2017 CMCL Innovations 328 User Manual v9.4.1, Build 01 CMCL < > Innovations 9.3 Mechanism reduction

Overall Importance Coefficients in DRG

DRG calculates the OICs as the maximum value of the weakest link along all possible paths, Tk → Sn.

 1 if Sn is a target DRG  OICS ,T = n k max min DIC ; OICDRG  ; OICDRG  otherwise,  Sm,Sn Sm,Tk Sn,Tk Sm∈S(P) (9.356)

where S(P) denotes set of species and paths P that connect Tk and Sn, and

OICSm,Tk is the OIC of species Sm with respect to Tk . The method assumes that the importance of the connection is independent of the length of the path.

Overall Importance Coefficients in DRGEP

DRGEP was developed to account for the length of the path, Tk → Sn. In- tuitively, a species that is coupled via a long chain of connections should not be as important as a species which is directly connected to the target. This is quantified via successive multiplication by the OIC as the calculation proceeds deeper along the path.

 1 if Sn is a target DRGEP  OICS ,T = n k max DIC × OICDRGEP; OICDRGEP otherwise.  Sm,Sn Sm,Tk Sn,Tk Sm∈S(P) (9.357)

Scaling factors

The scaling factors weight the OICs with a measure of the importance of each sample point.

In the absence of the scaling factors, the DRG and DRGEP methods treat each sample point equally. So for example, they would treat a sample point where the production of a target species is at a maximum with the same significance

User Manual v9.4.1, Build 01 329 c 2017 CMCL Innovations CMCL < > 9 POST-PROCESSING ANALYSES Innovations as a sample point where the target species has been entirely consumed. This is generally undesirable and, for this reason, it is not recommended to use DRG or DRGEP without scaling factors.

The scaling factors are calculated based on the contribution of each target species Tk to the overall activity of the system at a given sample point.  1 if no scaling is used α = αa,T (9.358) Tk max k otherwise,  a max (αa,T ) t k

where αTk is the scaling factor for target species Tk at sample point t and αa,Tk is the scaling factor for target Tk and element a at sample point t. The scaling factor with respect to each element is calculated as

Na,Tk |PTk − CTk | αa,Tk = , (9.359) Pa and X Pa = Na,Sn max(0, PSn − CSn ), (9.360)

Sn where Na,Tk and Na,Sn are the number of atoms of element a in species Tk and

Sn, and PTk , PSn , CTk and CSn are production and consumption terms defined as per Equation (9.352).

Final values of the Overall Importance Coefficients

The OIC for species Sn is defined at each sample point as the maximum scaled value of OICSn,Tk across all target species  1 if Sn is a target OICDRG(EP) = (9.361) Sn  DRG(EP) max αTk × OICS ,T otherwise, k n k where k runs over the target species and DRG(EP) indicates DRG or DRGEP.

The final values of the Overall Importance Coefficients for species (OIC) and

c 2017 CMCL Innovations 330 User Manual v9.4.1, Build 01 CMCL < > Innovations 9.3 Mechanism reduction reactions (OIC_R) are calculated as

DRG(EP)  DRG(EP) OICS = max OICS , (9.362) n final t n

DRG(EP)   DRG(EP) OIC_RR = max max DIC_RRi ,Sn × OICS , (9.363) i final t n n where t runs over all sample points and n runs over all species.

User Manual v9.4.1, Build 01 331 c 2017 CMCL Innovations Part III

API

c 2017 CMCL Innovations 332 User Manual v9.4.1, Build 01 API user manual

Advanced users of thek inetics & SRM Engine Suite software may use the API to write their own custom program, or modify the functionality of existing application programs. This manual provides guidance on both options. Thek inetics & SRM Engine Suite API manual contains detailed programming-interface information for accessing thek inetics & SRM Engine Suite subroutine libraries for gas-phase kinetics and thermodynamic- property utilities. Explicit instructions are also given for modifying user-routine templates to customise existing reactor model programs. The subroutine libraries may be accessed from entirely user-written application programs.

An example application program is provided. The example is written in FORTRAN. Access to a supported FORTRAN compiler and basic knowledge of FORTRAN linking procedures are required. Details of these requirements are discussed.

User Manual v9.4.1, Build 01 333 c 2017 CMCL Innovations CMCL < > 10 API USER MANUAL Innovations

10.1 Compiler Compatibility

There are many FORTRAN compilers available for each computer platform. These compilers and linkers have specific compile, optimisation, and linking options. There are also differences in the runtime library functions associated with different versions of FORTRAN. In the installation, we provide sample code and make-file system. These files demonstrate the compilation and link- ing of user-written programs and routines that involve calls to the kinetics& SRM Engine Suite libraries.

Due to these language, library, and system complexities, we cannot guarantee that every module written in any version of FORTRAN will be linkable with our libraries.

Since the combination of operating system, compilers, and third-party pack- ages is often unique to your computing environment, our ability to assist you in troubleshooting these combinations will be limited.

At present, the kinetics & SRM Engine Suite API is available only under Win- dows, in 32-bit and 64-bit versions. It has been built in Microsoft Visual Studio 2013 (VS2013) using Intel(R) Visual Fortran Compiler 16.0.4.246. It is as- sumed that customers have the same software available, but slightly different versions are not expected to lead to major problems.

c 2017 CMCL Innovations 334 User Manual v9.4.1, Build 01 CMCL < > Innovations 10.2 Writing User Applications

10.2 Writing User Applications

The kinetics & SRM Engine Suite API is implemented using a Dynamic Link Library (DLL). This section explains the basic requirements of running the API and specifically the changes required to set-up an existing Intel Visual Fortran console application. A description of the the compiler and linker settings to- gether with examples of how to call functions and subroutines in the source code are provided.

10.2.1 Basic Requirements

In order to access the subroutine libraries, you must have the following:

1. A compatible FORTRAN compiler installed on the computer where kinetics & SRM Engine Suite is installed.

2. Knowledge of the FORTRAN language.

3. Experience with compiling and linking programs on the computer plat- form of interest.

When you downloaded the API, a set of example files are provided with the following components;

1. The kinetics & SRM Engine Suite API import library file, named kin- SRM_API_win32.lib or kinSRM_API_win64.lib (depending on your hard- ware architecture).

2. The kinetics & SRM Engine Suite licence DLL and INI files, named dp- win32.dll or dpwin64.dll (depending on your hardware architecture) and CMCL.ini.

3. The kinetics & SRM Engine Suite unit dictionary file, named UnitDic- tionary.xml.

User Manual v9.4.1, Build 01 335 c 2017 CMCL Innovations CMCL < > 10 API USER MANUAL Innovations

4. A Visual Fortran project and corresponding source code which presents an example coupling with the API, named API_ExampleDriver.vfproj and source/APIDriver.f90 respectively.

5. A pre-compiled example kinetics & SRM Engine Suite API DLL file, named kinSRM_API_win32.dll or kinSRM_API_win64.dll (depending on your hardware architecture) generated using the Visual Fortran project for testing purposes.

6. A pre-compiled example executable named API_ExampleDriver_win32.exe or API_ExampleDriver_win64.exe (depending on your hardware architecture) generated using the Visual Fortran project for testing purposes.

10.2.2 Running the pre-compiled example

In order to run the example, the folder should contain the following components

1. The API DLLs (kinSRM_API_win32.dll or kinSRM_API_win64.dll) are required during runtime. They need to be placed either in the same folder as the application executable, or better in the main folder of the application.

2. The licence DLLs and INI file, (dpwin32.dll or dpwin64.dll, and CMCL.ini), need to be placed either in the same folder as the application executable.

3. The executable itself, in this case API_ExampleDriver.exe and anything required by the executable. Here this is the UnitDictionary.xml file and the WorkingDir folder which contains the input files and chemical mech- anism used by the API.

Presented in Figure 10.1 are the above components presented in Windows explorer for the pre-compiled example.

c 2017 CMCL Innovations 336 User Manual v9.4.1, Build 01 CMCL < > Innovations 10.2 Writing User Applications

Figure 10.1: Windows explorer view of folder structure and required files.

The example can be run directly from the command line in the main folder by executing API_ExampleDriver_win32.exe. Figure 10.2 shows the expected result of running the example simulation.

Figure 10.2: Chemistry only example simulation using the command line.

The following sections outline the means to generate an executable using the kinetics & SRM Engine Suite API.

User Manual v9.4.1, Build 01 337 c 2017 CMCL Innovations CMCL < > 10 API USER MANUAL Innovations

10.2.3 Linking to the kinetics & SRM Engine Suite API Li- brary

An example Visual Studio solution named API_ExampleDriver.sln is supplied with the API. When opened in Visual Studio, this project must be linked to the kinetics & SRM Engine Suite import library file kinSRM_API_win32.lib or kinSRM_API_win64.lib.

The following section outlines the steps required to carry out this task.

First the compiler and linker settings can be changed in Visual Studio through the Project Property Pages, which can be accessed by right-clicking the project in the Solution Explorer and then selecting Properties in the context menu. Alternatively, instead of changing the project properties in Visual Studio, one can directly edit the corresponding .vfproj file, which stores all project settings in XML form.

1. Add the API import library (.lib file) to the project. The import library (.lib file) is needed when building your application, but not at runtime (only the DLLs are required at runtime).

Add kinSRM_API_win32.lib or kinSRM_API_win64.lib to Additional Dependencies under Linker→Input, depending on the configuration.

This corresponds to adding AdditionalDependen- cies="kinSRM_API_win32.lib" or the appropriate analogue to VFLinker- Tool in the .vfproj file.

2. The Microsoft MPI SDK must be installed (detailed in Section 1.1.2), and details of its libraries added to the project.

Add msmpifec.lib and msmpi.lib to Additional Dependencies under Linker→Input.

Add $(MSMPI_LIB32) or $(MSMPI_LIB64) to Additional Library Di- rectories under Linker→General, depending on the configuration.

This corresponds to adding the libraries to AdditionalDependencies and

c 2017 CMCL Innovations 338 User Manual v9.4.1, Build 01 CMCL < > Innovations 10.3 Sample Program

the location to AdditionalLibraryDirectories under VFLinkerTool in the .vfproj file.

3. It may be necessary to increase the stack size above the default. If a larger value is required by your application, do not reduce it.

Set Stack Reserve Size and Stack Commit Size to 33554432 under Linker→System.

This corresponds to adding StackReserveSize="33554432" and Stack- CommitSize="33554432" to VFLinkerTool in the .vfproj file.

10.2.4 Compiler Settings

The compiler must be set-up in a manner consistent with the kinetics & SRM Engine Suite API libraries, as such the following settings are required.

1. Under Fortran→Data, the Default Real KIND needs to be set to 8 (dou- ble precision). This corresponds to adding RealKIND="realKIND8" to the VFFortranCompilerTool in the .vfproj file.

2. Under Fortran→Libraries, the Runtime Library needs to be set to Multi- Threaded or MultiThreadedDebug depending on the configuration. This corresponds to adding RuntimeLibrary="rtMultiThreadedDebug" or Run- timeLibrary="rtMultiThreaded" respectively to the VFFortranCompiler- Tool in the .vfproj file.

10.3 Sample Program

Subroutines made available through the kinetics & SRM Engine Suite API can be called directly without any declaration or import statements. Functions, however need to be declared as external in whichever scope they are used (subroutine/function, module, or program). For instance, the line

User Manual v9.4.1, Build 01 339 c 2017 CMCL Innovations CMCL < > 10 API USER MANUAL Innovations integer, external :: kinSRM_API_GetNumberOfSpecies would need to be added to the variable declaration part of a subroutine or function, if the function kinSRM_API_GetNumberOfSpecies is to be called.

See the provided example application for various examples of how to call func- tions and subroutines made available through the kinetics & SRM Engine Suite API DLL.

The sample program offers three examples.

• ChemistryOnlyExample().

• ChemistryOnlyExample_parallel().

• EngineExample().

Figure 10.3 shows a screenshot of this example. Depending on the user’s application of interest, all except one of these examples should be com- mented out.

10.3.1 Global variables

Several global variables are defined in the example.

• LicenceKeyLength is the length of the LicenceKey array.

• LicenceKey is used by the chemistry API.

• NumUnknowns is the number of unknowns passed to the chemistry solver.

• NumSpecies is the number of chemical species.

• NameLength is the length of the strings used for the unknowns and species names.

• Unknowns is a real allocatable array of the unknowns.

c 2017 CMCL Innovations 340 User Manual v9.4.1, Build 01 CMCL < > Innovations 10.3 Sample Program

Figure 10.3: Visual Studio example API driver.

User Manual v9.4.1, Build 01 341 c 2017 CMCL Innovations CMCL < > 10 API USER MANUAL Innovations

The API is used to define the value of the LicenceKeyLength variable. The LicenceKey array is allocated and initialised immediately.

The NumUnknowns and NumSpecies are defined within the chemistry only example and are used to define the size of various arrays throughout the API.

c 2017 CMCL Innovations 342 User Manual v9.4.1, Build 01 CMCL < > Innovations 10.3 Sample Program

10.3.2 Chemistry example

The ChemistryOnlyExample() subroutine is run in four steps.

1. Preamble: The subroutine ChemistryOnlyExample() writes a welcome message and version information to standard out.

2. Initialise: The subroutine InitialiseChemOnly() writes a welcome mes- sage and version information to standard out. It initialises the chemistry solver by defining the working directory location, the chemistry file for- mat, the chemistry file and thermodynamic data file names and confirms if successful. The ODE solver and its tolerances are defined. The corre- sponding external functions from the kinetics & SRM Engine Suite API are used to define the values of the NumUnknowns, NumSpecies and NameLength variables, and the Unknowns array is allocated.

3. Perform chemistry step: The subroutine PerformWorkChemOnly() searches for indices of three chemical species and temperature in the ODE array, defines the molar concentration of each species and the tem- perature, computes the density and runs a constant volume simulation.

4. Finalise: The subroutine FinaliseChemOnly() deallocates the Unknowns array and finalises the kinetics & SRM Engine Suite API.

10.3.3 Parallel chemistry example

The ChemistryOnlyExample_parallel() subroutine is run in four steps.

Note that users must comment the calls to the other example subroutines and uncomment the call to the ChemistryOnlyExample_parallel() subroutine to use this example.

1. Preamble: The subroutine ChemistryOnlyExample_parallel() main task writes a welcome message and version information to standard out. The subordinate tasks are set to wait for the licence key to be broadcast.

User Manual v9.4.1, Build 01 343 c 2017 CMCL Innovations CMCL < > 10 API USER MANUAL Innovations

2. Initialise: All tasks are initialised as per the subroutine Ini- tialiseChemOnly() used by ChemistryOnlyExample()..

3. Perform chemistry step: The subroutine Perform- WorkChemOnly_parallel() main task searches for indices of three chemical species and temperature in the ODE array and defines the molar concentration of each species. The unknowns are copied to a local buffer for each task, with a unique initial temperature defined for each task. The unknowns are distributed to all tasks, and each task runs a constant pressure simulation.

4. Finalise: All tasks are finalised as per the subroutine Fi- naliseChemOnly() used by ChemistryOnlyExample().

10.3.4 Engine example

The EngineExample() subroutine is run in three steps.

Note that users must comment the calls to the other example subroutines and uncomment the call to the EngineExample() subroutine to use this example.

1. Initialise: The subroutine InitialiseEngine() reads the InputParams.xml and associated input files (i.e. chemistry file name, thermodynamic data, engine geometry files names), and initialises the kinetics & SRM Engine Suite engine model.

2. Perform simulation step: The subroutine PerformWorkEngine() ad- vances the engine simulation over the declared time duration and time step. At each step, the in-cylinder volume is recalculated and passed to the engine simulation.

3. Finalise: The subroutine FinaliseEngine() deallocates any allocated ar- rays and finalises the kinetics & SRM Engine Suite API.

c 2017 CMCL Innovations 344 User Manual v9.4.1, Build 01 API reference guide

This section details the subroutine and function calls of the kinetics & SRM Engine Suite API.

User Manual v9.4.1, Build 01 345 c 2017 CMCL Innovations CMCL < > 11 API REFERENCE GUIDE Innovations

11.1 Summary

1. Chemistry only. Main features:

(a) No file input/output will be performed.

(b) The API needs to be initialised using kin- SRM_API_InitialiseChemOnly and finalised using kin- SRM_API_FinaliseChemOnly.

2. The full engine/reactor functionality. Main features:

(a) The default input parameter files will be read as in the stand-alone version of the code, and the same output files will be generated.

(b) The API needs to be initialised using kinSRM_API_Initialise and finalised using kinSRM_API_Finalise.

(c) Prior to initialisation, kinSRM_API_ReadInputsFromFile needs to be called, and, optionally, any set function which overrides in- puts read from file. These set functions are identified in the code by the comment that they must only be called before kin- SRM_API_Initialise.

(d) Various get functions for post-processed quantities are provided. These can be identified by “PP” in their name, e.g. kin- SRM_API_PP_GetSootMassgph. Any such function must only be called after finalisation.

11.2 Chemistry and Engine

11.2.1 Get API Version Number character(len=80) function kinSRM_API_GetVersionNumber()

This functions returns the API version number.

c 2017 CMCL Innovations 346 User Manual v9.4.1, Build 01 CMCL < > Innovations 11.2 Chemistry and Engine

11.2.2 Get API Version ID character(len=80) function kinSRM_API_GetVersionID()

This functions returns the API version ID.

11.2.3 Get Licence Key Length integer function kinSRM_API_GetKeySize()

This function returns the aLicKeyLength argument required by the kin- SRM_API_InitialiseChemOnly function.

11.2.4 Initialise Chemistry integer function kinSRM_API_InitialiseChemOnly

(aLicKeyLength,aLicKey,aWorkingDir,aChemModel,

aMechFileName,aThermoFileName,unused)

result(rErr)

This subroutine initialises the kinetics API solely for integrating constant vol- ume/pressure chemistry. Needs to be called before any calculations can be carried out.

11.2.5 Finalise Chemistry subroutine kinSRM_API_FinaliseChemOnly()

This subroutine deallocates any previously allocated memory. Should only be called if API has been initialised using kinSRM_API_InitialiseChemOnly. No further calls to any API subroutines/functions should be made after this has been called.

User Manual v9.4.1, Build 01 347 c 2017 CMCL Innovations CMCL < > 11 API REFERENCE GUIDE Innovations

Variable Name In/Out Data Description Type aLicKeyLength in int Length of aLicKey array aLicKey inout int Array of size aLicKeyLength aWorkingDir in string Location of chemistry files aChemModel in int 1= Internal mechanism 2= Read in CHEMKIN format 3= Reduced internal mechanism 4= Read in kinetics format 5= Read in binary format aMechFileName in string Filename of chemical mechanism aThermoFileName in string Filename of thermodynamic data unused in int Unused integer (leave set to zero) rErr out int error output unit, 0= no error

c 2017 CMCL Innovations 348 User Manual v9.4.1, Build 01 CMCL < > Innovations 11.2 Chemistry and Engine

11.2.6 ODE Solver subroutine kinSRM_API_SetODESolver(aSolver,aRTol,aATol)

This subroutine sets the ODE solver and its relative and absolute error toler- ances.

Variable Name In/Out Data Description Type aSolver in int 0=no chemistry, 1=Solver 1, 2=Solver 2 aRTol in real Relative error tolerance. Recommended values, Solver 1: 1.0d-3; Solver 2: 1.0d-8 aATol in real Absolute error tolerance. Recommended values, Solver 1: 1.0d-11; Solver 2: 1.0d-6

11.2.7 Get Number Of Species integer function kinSRM_API_GetNumberOfSpecies() result(rNumSpec)

This function returns the number of species in the chemical mechanism.

Variable Name In/Out Data Description Type rNumSpec out int Number of Species in the Chemi- cal Mechanism

User Manual v9.4.1, Build 01 349 c 2017 CMCL Innovations CMCL < > 11 API REFERENCE GUIDE Innovations

11.2.8 Get Species Names subroutine kinSRM_API_GetSpeciesNames(aNumSpec,aSpecNames)

This subroutine returns the names of the species in the chemical mechanism.

Variable Name In/Out Data Description Type aNumSpec in int Number of species aSpecNames out string Array of size aNumSpec of species names

11.2.9 Get Species Index integer function kinSRM_API_GetSpeciesIndex

(aSpecName) result(rSpecIndex)

This function returns the index of a species given by name in the chemical mechanism. Returns zero if not found.

Variable Name In/Out Data Description Type rSpecIndex in int Index of the Species aSpecName out string Species Name

c 2017 CMCL Innovations 350 User Manual v9.4.1, Build 01 CMCL < > Innovations 11.2 Chemistry and Engine

11.2.10 Get Species Molar Masses subroutine kinSRM_API_GetSpeciesMolMasses(aNumSpec,aMolMasses)

This subroutine returns the molar masses (molecular weights) of all species in the chemical mechanism in J/mol.

Variable Name In/Out Data Description Type aNumSpec in int Number of species aMolMasses out real Array of size aNumSpec of molar masses in [J/mol]

11.2.11 Get Gas Constant real function kinSRM_API_GetGasConst() result(rR)

This function returns the universal gas constant.

Variable Name In/Out Data Description Type rR out real Universal gas constant [J/molK]

User Manual v9.4.1, Build 01 351 c 2017 CMCL Innovations CMCL < > 11 API REFERENCE GUIDE Innovations

11.2.12 Get Number of ODE Unknowns integer function kinSRM_API_GetNumberOfUnknowns()

result(rNumUnknowns)

This function returns the number of unknowns (species and temperature) as used by the ODE solver.

Variable Name In/Out Data Description Type rNumUnknowns out int Number of unknowns for ODE Solver

11.2.13 Get ODE Unknown Names subroutine kinSRM_API_GetUnknownNames

(aNumUnknowns,aUnknownNames)

This subroutine returns the names of the unknowns (species and temperature) as used by the ODE solver.

Variable Name In/Out Data Description Type rNumUnknowns in int Number of unknowns for ODE Solver aUnknownNames out string Array of size rNumUnknowns con- taining names of unknowns for ODE Solver

c 2017 CMCL Innovations 352 User Manual v9.4.1, Build 01 CMCL < > Innovations 11.2 Chemistry and Engine

11.2.14 Get ODE Unknown Index integer function kinSRM_API_GetUnknownIndex(aUnknownName)

result(rUnknownIndex)

This function returns the index of an unknown given by name (species and temperature) as used by the ODE solver. Returns zero if not found.

Variable Name In/Out Data Description Type aUnknownName in string Name of unknown for ODE Solver rUnknownIndex out int Index of unknown for ODE Solver

11.2.15 Get Mean Molar Mass real function kinSRM_API_GetMeanMolMass() result(rMolMass)

This function returns the mixture average molar mass in kg/mol.

Variable Name In/Out Data Description Type rMolMass out real mixture average molar mass [kg/mol]

User Manual v9.4.1, Build 01 353 c 2017 CMCL Innovations CMCL < > 11 API REFERENCE GUIDE Innovations

11.2.16 Get Species Molar Cp subroutine kinSRM_API_GetSpecMolarcps(aTemp,aNumSpec,aSpecMolarcps)

This subroutine returns the molar heat capacities at constant pressure in J/mol/K of all species in the chemical mechanism.

Variable Name In/Out Data Description Type aTemp in real Temperature [K] aNumSpec in int Total number of species aSpecMolarcps out real Array of size aNumSpec contain- ing molar heat capacities at con- stant pressure [J/mol/K]

11.2.17 Get Species Molar Cv subroutine kinSRM_API_GetSpecMolarcvs(aTemp,aNumSpec,aSpecMolarcvs)

This subroutine returns the molar heat capacities at constant volume in J/mol/K of all species in the chemical mechanism.

Variable Name In/Out Data Description Type aTemp in real Temperature [K] aNumSpec in int Total number of species aSpecMolarcvs out real Array of size aNumSpec contain- ing molar heat capacities at con- stant volume [J/mol/K]

c 2017 CMCL Innovations 354 User Manual v9.4.1, Build 01 CMCL < > Innovations 11.2 Chemistry and Engine

11.2.18 Get Mean Molar Cp subroutine kinSRM_API_GetMeanMolarcps(aTemp,aNumSpec,aSpecMolarcps)

This subroutine returns the molar heat capacities at constant pressure in J/mol/K of all species in the chemical mechanism.

Variable Name In/Out Data Description Type aTemp in real Temperature [K] aNumSpec in int Total number of species aSpecMolarcps out real Array of size aNumSpec contain- ing mean molar capacities at con- stant pressure [J/mol/K]

11.2.19 Get Mean Molar Cv subroutine kinSRM_API_GetMeanMolarcvs(aTemp,aNumSpec,aSpecMolarcvs)

This subroutine returns the molar heat capacities at constant volume in J/mol/K of all species in the chemical mechanism.

Variable Name In/Out Data Description Type aTemp in real Temperature [K] aNumSpec in int Total number of species aSpecMolarcvs out real Array of size aNumSpec contain- ing mean molar heat capacities at constant volume [J/mol/K]

User Manual v9.4.1, Build 01 355 c 2017 CMCL Innovations CMCL < > 11 API REFERENCE GUIDE Innovations

11.2.20 Get Specific Enthalpy subroutine kinSRM_API_GetSpecSpecifEnths(aTemp,aNumSpec,aSpecEnths)

This subroutine returns the specific enthalpy of all species in the chemical mechanism.

Variable Name In/Out Data Description Type aTemp in real Temperature [K] aNumSpec in int Number of species aSpecEnths in real Array of size aNumSpec contain- ing specific Enthalpy [J/kg]

11.2.21 Get Molar Enthalpy subroutine kinSRM_API_GetSpecMolarEnths(aTemp,aNumSpec,aSpecEnths)

This subroutine returns the molar enthalpy of all species in the chemical mech- anism.

Variable Name In/Out Data Description Type aTemp in real Temperature [K] aNumSpec in int Number of species aSpecEnths out real Array of size aNumSpec contain- ing molar enthalpy [J/mol]

c 2017 CMCL Innovations 356 User Manual v9.4.1, Build 01 CMCL < > Innovations 11.2 Chemistry and Engine

11.2.22 Get Specific Molar Internal Energy subroutine kinSRM_API_GetSpecMolarIntEngys

(aTemp,aNumSpec,aSpecIntEngys)

This subroutine returns the molar internal energy of all species in the chemical mechanism.

Variable Name In/Out Data Description Type aTemp in real Temperature [K] aNumSpec in int Number of species aSpecIntEngys out real Array of size aNumSpec con- taining specific Internal Energy [J/mol]

11.2.23 Get Mean Molar Enthalpy real function kinSRM_API_GetMeanMolarEnth(aTemp,aNumSpec,aMolFracs) result(rMeanMolarEnth)

This function returns the mixture average molar enthalpy.

Variable Name In/Out Data Description Type aTemp in real Temperature [K] aNumSpec in int Number of species aMolFracs in real Array of size aNumSpec contain- ing mole fractions of each chemi- cal species rMeanMolarEnth out real Mixture average molar enthalpy [J/mol]

User Manual v9.4.1, Build 01 357 c 2017 CMCL Innovations CMCL < > 11 API REFERENCE GUIDE Innovations

11.2.24 Get Mean Molar Internal Energy real function kinSRM_API_GetMeanMolarIntEngy

(aTemp,aNumSpec,aMolFracs) result(rMeanMolarIntEngy)

This function returns the mixture average molar internal energy.

Variable Name In/Out Data Description Type aTemp in real Temperature [K] aNumSpec in int Number of species aMolFracs in real Array of size aNumSpec contain- ing mole fractions of each chemi- cal species rMeanMolarIntEngy out real Mixture average molar internal en- ergy [J/mol]

11.2.25 Calculate temperature from molar enthalpy real function kinSRM_API_MolarEnthToTemp(aT1,aT2,aNumSpec,aMolFracs,aH) result(rTemp)

Finds the temperature, that a mixture of composition aMolFracs needs to be at in order to have a given molar enthalpy.

Variable Name In/Out Data Description Type aT1 in real Minimum Temperature [K] aT2 in real Maximum Temperature [K] aNumSpec in int Number of species aMolFracs in real Array of size aNumSpec contain- ing mole fractions of each chemi- cal species aH in real Molar enthalpy [J/mol] rTemp out real Temperature [K]

c 2017 CMCL Innovations 358 User Manual v9.4.1, Build 01 CMCL < > Innovations 11.2 Chemistry and Engine

11.2.26 Calculate temperature from molar internal energy real function kinSRM_API_MolarIntEngyToTemp

(aT1,aT2,aNumSpec,aMolFracs,aU) result(rTemp)

Finds the temperature, a mixture of composition aMolFracs needs to be at, in order to have a given molar internal energy.

Variable Name In/Out Data Description Type aT1 in real Minimum Temperature [K] aT2 in real Maximum Temperature [K] aNumSpec in int Number of species aMolFracs in real Array of size aNumSpec contain- ing mole fractions of each chemi- cal species aU in real molar internal energy [J/mol] rTemp out real Temperature [K]

User Manual v9.4.1, Build 01 359 c 2017 CMCL Innovations CMCL < > 11 API REFERENCE GUIDE Innovations

11.2.27 Get NASA polynomial thermodynamic data subroutine kinSRM_API_GetNASAPolynomials

(aSpecIdx,aNumTemps,aTemps,aNumParams,aParams)

This subroutine returns the coefficients of the NASA polynomials for the ther- modynamic data together with the temperature ranges for a chosen species of the chemical mechanism.

Variable Name In/Out Data Description Type aSpecIdx in int Species Index aNumTemps in real Number of temperature ranges aTemps in real Array of size aNumTemps con- taining temperature ranges aNumParams in real Number of thermodynamic poly- nomial parameters aParams out real Array of size aNumParams x aNumTemps-1 containing polyno- mial parameters

c 2017 CMCL Innovations 360 User Manual v9.4.1, Build 01 CMCL < > Innovations 11.2 Chemistry and Engine

11.2.28 Get ODE source terms subroutine kinSRM_API_GetODESourceTerms

(aNumUnknowns,aUnknowns,aDensity,aSources)

This subroutine returns the constant volume source terms, i.e. the right hand side of the ODEs.

Variable Name In/Out Data Description Type aNumUnknowns in int Number of unknown terms aUnknowns in real Array of unknown terms of size aNumUnknowns aDensity in real Density [kg/m3] aSources out real Array of source terms of size aNu- mUnknowns

11.2.29 Get Reaction Rates subroutine kinSRM_API_GetReactionRates

(aNumSpec,aMolFracs,aDensity,aTemp,aNumRxns,akf,akr)

This subroutine returns the forward and reverse reaction rates at the given mixture composition.

Variable Name In/Out Data Description Type aNumSpec in int Total number of Species aMolFracs in real Array of Mole fractions of size aNumSpec aDensity in real Density [kg/m3] aTemp in real Temperature [K] aNumRxns in int Total Number of Reactions akf out real Array of forward reaction rates of size aNumRxns [mol/s] akr out real Array of reverse reaction rates of size aNumRxns [mol/s]

User Manual v9.4.1, Build 01 361 c 2017 CMCL Innovations CMCL < > 11 API REFERENCE GUIDE Innovations

11.2.30 Advance Solver Constant Volume integer function kinSRM_API_AdvanceSolverConstV

(aNumUnknowns,aUnknowns,aDensity,aDeltat) result(rErr)

This function evolves species mole fractions and temperature assuming a closed homogeneous constant volume reactor. Returns zero upon success.

Variable Name In/Out Data Description Type aNumUnknowns in int Number of unknowns for ODE Solver aUnknowns in/out real Array of unknowns of size aNu- mUnknowns for ODE Solver aDensity in real density [kg/m3] aDeltat in real timestep [s] rErr out int Error flag 0= No error

11.2.31 Advance Solver Constant Pressure integer function kinSRM_API_AdvanceSolverConstP

(aNumUnknowns,aUnknowns,aPressure,aDeltat) result(rErr)

This function evolves species mole fractions and temperature assuming a closed homogeneous constant pressure reactor. Returns zero upon success.

Variable Name In/Out Data Description Type aNumUnknowns in int Number of unknowns for ODE Solver aUnknowns in/out real Array of unknowns of size aNu- mUnknowns for ODE Solver aPressure in real pressure [Pa] aDeltat in real timestep [s] rErr out int Error flag 0= no error

c 2017 CMCL Innovations 362 User Manual v9.4.1, Build 01 CMCL < > Innovations 11.2 Chemistry and Engine

11.2.32 Get Number of Reactions integer function kinSRM_API_GetNumberOfReactions() result(rNumRxns)

This function returns the number of reactions in the chemical mechanism.

Variable Name In/Out Data Description Type rNumRxns out int Total number of reactions

User Manual v9.4.1, Build 01 363 c 2017 CMCL Innovations CMCL < > 11 API REFERENCE GUIDE Innovations

11.3 Engine Only

11.3.1 Read Engine Inputs subroutine kinSRM_API_ReadInputsFromFile()

This subroutine reads the default kinetics/srm suite xml input files.

11.3.2 Set Initial Temperature and Pressure subroutine kinSRM_API_SetIniTempPres(aIniTemp,aIniPres)

This subroutine sets the initial pressure and temperature for the engine simu- lation.

Variable Name In/Out Data Description Type aIniTemp in real Initial temperature [K] aIniPres in real Initial pressure [Pa]

c 2017 CMCL Innovations 364 User Manual v9.4.1, Build 01 CMCL < > Innovations 11.3 Engine Only

11.3.3 Set initial equivalence ratio subroutine kinSRM_API_SetIniEquivRatio(aIniPhi)

This subroutine sets the initial equivalence ratio for the engine simulation.

Variable Name In/Out Data Description Type aIniPhi in real Set initial equivalence ratio [-]

11.3.4 Set start and end of simulation subroutine kinSRM_API_SetStartEndCAD(aStartCAD,aEndCAD)

This subroutine sets the start and end times in CAD of the engine simulation.

Variable Name In/Out Data Description Type aStartCAD in real Set start of simulation [CAD aTDC] aEndCAD in real Set end of simulation [CAD aTDC]

User Manual v9.4.1, Build 01 365 c 2017 CMCL Innovations CMCL < > 11 API REFERENCE GUIDE Innovations

11.3.5 Get end of simulation real function kinSRM_API_GetEndCAD() result(rEndCAD)

Get the end of the simulation in CAD aTDC.

Variable Name In/Out Data Description Type rEndCAD out real End of simulation [CAD aTDC]

11.3.6 Get timestep length real function kinSRM_API_GetDeltaCAD() result(rDeltaCAD)

Get the timestep size of the simulation in CAD.

Variable Name In/Out Data Description Type rDeltaCAD out real Timestep length [CAD]

c 2017 CMCL Innovations 366 User Manual v9.4.1, Build 01 CMCL < > Innovations 11.3 Engine Only

11.3.7 Get current volume real function kinSRM_API_GetCurrentVol() result(rVol)

Get the current in-cylinder volume of the piston/reactor.

Variable Name In/Out Data Description Type rVol out real In-cylinder volume [m3]

11.3.8 Get volume at specific time real function kinSRM_API_GetSliderCrankVol(aCAD) result(rVol)

Get the volume of the in-cylinder volume at a user defined CAD.

Variable Name In/Out Data Description Type aCAD in real In-cylinder volume [CAD] rVol out real In-cylinder volume [m3]

User Manual v9.4.1, Build 01 367 c 2017 CMCL Innovations CMCL < > 11 API REFERENCE GUIDE Innovations

11.3.9 Set engine rotational speed subroutine kinSRM_API_SetRPM(aRPM)

Set engine rotational speed in RPM.

Variable Name In/Out Data Description Type aRPM in real Engine rotational speed [RPM]

11.3.10 Initialise engine reactor simulation subroutine kinSRM_API_Initialise(aRelCycleIndex,aIniVol)

This subroutine initialises the full kinetics/SRM API. Must only be called after kinSRM_API_ReadInputsFromFile has been called.

Variable Name In/Out Data Description Type aRelCycleIndex in int Cycle number aIniVol in real Initial volume [m]

c 2017 CMCL Innovations 368 User Manual v9.4.1, Build 01 CMCL < > Innovations 11.3 Engine Only

11.3.11 Finalise engine reactor simulation subroutine kinSRM_API_Finalise()

This subroutine carries out post-processing, closes all output files, and frees previously allocated memory. Must be called prior to any call of the get func- tions for post-processed quantities.

11.3.12 Set Fuel Composition integer function kinSRM_API_SetFuelComposition

(aNumCpts,aSpecIdxs,aMassFracs) result(rErr)

This subroutine sets the fuel composition.

Variable Name In/Out Data Description Type aNumCpts in real Cycle number aSpecIdxs in int Array of size aNumCpts contain- ing the species index aMassFracs in real Array of size aNumCpts contain- ing the mass fractions rErr out int Error flag 0= no error

User Manual v9.4.1, Build 01 369 c 2017 CMCL Innovations CMCL < > 11 API REFERENCE GUIDE Innovations

11.3.13 Set Oxidiser Composition integer function kinSRM_API_SetOxComposition

(aNumCpts,aSpecIdxs,aMassFracs) result(rErr)

This subroutine sets the oxidiser composition.

Variable Name In/Out Data Description Type aNumCpts in real Cycle number aSpecIdxs in int Array of size aNumCpts contain- ing the species index aMassFracs in real Array of size aNumCpts contain- ing the mass fractions rErr out int Error flag 0= no error

11.3.14 Set EGR mass fraction subroutine kinSRM_API_SetEGRMassFrac(aIntEGR,aExtEGR)

This subroutine sets the internal and external EGR mass fractions. Must only be called before kinSRM_API_Initialise.

Variable Name In/Out Data Description Type aIntEGR in real Internal EGR Mass fraction aExtEGR in real External EGR Mass fraction

c 2017 CMCL Innovations 370 User Manual v9.4.1, Build 01 CMCL < > Innovations 11.3 Engine Only

11.3.15 Set Main Mixing Time subroutine kinSRM_API_SetDefTurbMixTime(atauU)

This subroutine sets the turbulent mixing time to be used by default (or in the unburnt zone, for SI operation).

Variable Name In/Out Data Description Type atauU in real Main turbulent mixing time [s]

11.3.16 Set injection mixing time subroutine kinSRM_API_SetInjTurbMixTime(atauInj)

This subroutine sets the turbulent mixing time to be used during direct injec- tion.

Variable Name In/Out Data Description Type atauInj in real Turbulent mixing time injection [s]

User Manual v9.4.1, Build 01 371 c 2017 CMCL Innovations CMCL < > 11 API REFERENCE GUIDE Innovations

11.3.17 Set injection event data subroutine kinSRM_API_SetInjections(aNumInj,aSOIs,aEOIs,aMFuel)

This subroutine sets the number, start, end, and fuel mass of direct injection events. Must only be called before kinSRM_API_Initialise.

Variable Name In/Out Data Description Type aNumInj in int Total number of injections aSOIs in real Array of size aNumInj of start of injection times [CAD aTDC] aEOIs in real Array of size aNumInj of end of in- jection times [CAD aTDC] aMFuel in real Array of size aNumInj of mass in- jected during event [kg]

11.3.18 Set entrainment rate (SI model) subroutine kinSRM_API_SetSIEntRateConst(aEntRateConst)

This subroutine sets the entrainment rate constant for flame propagation in SI operation. Must only be called before kinSRM_API_Initialise.

Variable Name In/Out Data Description Type aEntRateConst in real Entrainment rate constant

c 2017 CMCL Innovations 372 User Manual v9.4.1, Build 01 CMCL < > Innovations 11.3 Engine Only

11.3.19 Set Wiebe model parameters (SI model) subroutine kinSRM_API_SetSIWiebeParams

(aCADSpark,aCombDurWiebe,aaWiebe,amWiebe)

This subroutine sets the parameters of the Wiebe model for SI operation. Must only be called before kinSRM_API_Initialise.

Variable Name In/Out Data Description Type aCADSpark in real Spark timing [CAD aTDC] aCombDurWiebe in real Combustion duration [CAD] aaWiebe in real Empirical coefficient, a amWiebe in real Empirical coefficient, m

11.3.20 Set wall temperatures subroutine kinSRM_API_SetCylWallTemps(aLinerTemp,aPistonTemp,aHeadTemp)

This subroutine sets the cylinder head, liner, and piston temperatures.

Variable Name In/Out Data Description Type aLinerTemp in real Liner wall temperature [K] aPistonTemp in real Piston wall temperature [K] aHeadTemp in real Head wall temperature [K]

User Manual v9.4.1, Build 01 373 c 2017 CMCL Innovations CMCL < > 11 API REFERENCE GUIDE Innovations

11.3.21 Run over one time step subroutine kinSRM_API_PerformStep(aVOld,aVNew)

Perform simulation over one timestep.

Variable Name In/Out Data Description Type aVOld in real Old cylinder volume [m3] aVNew out real New cylinder volume [m3]

11.3.22 Get crank angle real function kinSRM_API_GetCurrentCAD() result(rCAD)

This function returns the present crank angle.

Variable Name In/Out Data Description Type rCAD out real Crank Angle [Degrees]

c 2017 CMCL Innovations 374 User Manual v9.4.1, Build 01 CMCL < > Innovations 11.3 Engine Only

11.3.23 Get Specific Heat Capacity at Constant Pressure real function kinSRM_API_GetParcp(aParIdx) result(rParcp)

This function returns cp, i.e. the specific heat capacity at constant pressure [J/kg/K], for a particle.

Variable Name In/Out Data Description Type aParIdx in int Particle index rParcp out real specific heat capacity at constant pressure [J/kg/K]

11.3.24 Get Molar Fractions subroutine kinSRM_API_GetParMolFracs(aParIdx,aNumSpec,aParMolFracs)

This function returns the mole fractions of a particle.

Variable Name In/Out Data Description Type aParIdx in int Particle index aNumSpec in int Number of Species aParMolFracs out real mole fractions

User Manual v9.4.1, Build 01 375 c 2017 CMCL Innovations CMCL < > 11 API REFERENCE GUIDE Innovations

11.3.25 Get Molar Mass real function kinSRM_API_GetParMolMass(aParIdx) result(rParMolMass)

This function returns the number-weighted mean molar mass for a particle.

Variable Name In/Out Data Description Type aParIdx in int Particle index rParMolMass out real number-weighted mean molar mass [kg/mol]

11.3.26 Get Heat Release Rate real function kinSRM_API_GetParHRR(aParIdx) result(rParHRR)

This function returns the (smoothed!) heat release rate for a particle, as cached during the last time-step

Variable Name In/Out Data Description Type aParIdx in int Particle index rParHRR in real heat release rate [J/CAD]

c 2017 CMCL Innovations 376 User Manual v9.4.1, Build 01 CMCL < > Innovations 11.3 Engine Only

11.3.27 Get Burned Fraction real function kinSRM_API_GetParBurntFrac(aParIdx) result(rParBurntFrac)

This function returns the burnt fraction for a particle.

Variable Name In/Out Data Description Type aParIdx in int Particle index rParBurntFrac out real burnt fraction

User Manual v9.4.1, Build 01 377 c 2017 CMCL Innovations CMCL < > 11 API REFERENCE GUIDE Innovations

11.4 Engine Only Post Processing

The following functions should only be called once the engine reac- tor simulations have been finalised with the command subroutine kin- SRM_API_Finalise().

11.4.1 Get CAD at 10% heat release rate real function kinSRM_API_PP_GetCA10() result(rCA10)

This function returns the crank angle at 10% heat release.

Variable Name In/Out Data Description Type rCA10 out real crank angle (aTDC) at 10% heat release [CADaTDC]

11.4.2 Get CAD at 50% heat release rate real function kinSRM_API_PP_GetCA50() result(rCA50)

This function returns the crank angle at 50% heat release.

Variable Name In/Out Data Description Type rCA50 out real crank angle (aTDC) at 50% heat release [CADaTDC]

c 2017 CMCL Innovations 378 User Manual v9.4.1, Build 01 CMCL < > Innovations 11.4 Engine Only Post Processing

11.4.3 Get CAD at 90% heat release rate real function kinSRM_API_PP_GetCA90() result(rCA90)

This function returns the crank angle at 90% heat release.

Variable Name In/Out Data Description Type rCA90 out real crank angle (aTDC) at 90% heat release [CAD aTDC]

11.4.4 Get Combustion Duration of heat release real function kinSRM_API_PP_GetCD() result(rCD)

This function returns the combustion duration defined by CA90-CA10.

Variable Name In/Out Data Description Type rCD out real Combustion duration [CAD]

User Manual v9.4.1, Build 01 379 c 2017 CMCL Innovations CMCL < > 11 API REFERENCE GUIDE Innovations

11.4.5 Get maximum pressure rise rate real function kinSRM_API_PP_GetMaxPRR() result(rMaxPRR)

This function returns the maximum pressure rise rate [Pa/s] of the cycle.

Variable Name In/Out Data Description Type rMaxPRR out real Maximum pressure rise rate [Pa/s]

11.4.6 Get peak pressure real function kinSRM_API_PP_GetPeakPres() result(rPeakPres)

This function returns the peak pressure [Pa] of the cycle.

Variable Name In/Out Data Description Type rPeakPres out real Peak pressure [Pa]

c 2017 CMCL Innovations 380 User Manual v9.4.1, Build 01 CMCL < > Innovations 11.4 Engine Only Post Processing

11.4.7 Get peak temperature real function kinSRM_API_PP_GetPeakTemp() result(rPeakTemp)

This function returns the peak temperature [K] of the cycle.

Variable Name In/Out Data Description Type rPeakTemp out real Peak temperature [K]

11.4.8 Get oxygen (mole fraction) real function kinSRM_API_PP_GetO2MoleFrac() result(rO2MoleFrac)

This function returns the final oxygen mole fraction.

Variable Name In/Out Data Description Type rO2MoleFrac out real final oxygen mole fraction

User Manual v9.4.1, Build 01 381 c 2017 CMCL Innovations CMCL < > 11 API REFERENCE GUIDE Innovations

11.4.9 Get carbon monoxide (mole fraction) real function kinSRM_API_PP_GetCOMoleFrac() result(rCOMoleFrac)

This function returns the final carbon monoxide mole fraction.

Variable Name In/Out Data Description Type rCOMoleFrac out real final carbon monoxide mole frac- tion

11.4.10 Get carbon monoxide (grammes per hour) real function kinSRM_API_PP_GetCOgph() result(rCOgph)

This function returns carbon monoxide, CO emissions in grams per hour.

Variable Name In/Out Data Description Type rCOgph out real CO emissions [g/hr]

c 2017 CMCL Innovations 382 User Manual v9.4.1, Build 01 CMCL < > Innovations 11.4 Engine Only Post Processing

11.4.11 Get carbon dioxide (mole fraction) real function kinSRM_API_PP_GetCO2MoleFrac() result(rCO2MoleFrac)

This function returns the final carbon dioxide mole fraction.

Variable Name In/Out Data Description Type rCO2MoleFrac out real final carbon dioxide mole fraction

11.4.12 Get unburned hydrocarbons (mole fraction) real function kinSRM_API_PP_GetUHCMoleFrac() result(rUHCMoleFrac)

This function returns the sum of unburned hydrocarbons, uHCs mole fraction.

Variable Name In/Out Data Description Type rUHCMoleFrac out real final uHCs mole fraction

User Manual v9.4.1, Build 01 383 c 2017 CMCL Innovations CMCL < > 11 API REFERENCE GUIDE Innovations

11.4.13 Get unburned hydrocarbons (grammes per hour) real function kinSRM_API_PP_GetUHCgph() result(rUHCgph)

This function returns unburned hydrocarbons in grams per hour.

Variable Name In/Out Data Description Type rUHCgph out real uHCs emissions [g/hr]

11.4.14 Get nitric oxides (mole fraction) real function kinSRM_API_PP_GetNOxMoleFrac() result(rNOxMoleFrac)

This function returns the sum of nitric oxides, NOx mole fraction.

Variable Name In/Out Data Description Type rNOxMoleFrac out real final NOx mole fraction

c 2017 CMCL Innovations 384 User Manual v9.4.1, Build 01 CMCL < > Innovations 11.4 Engine Only Post Processing

11.4.15 Get nitric oxides (grammes per hour) real function kinSRM_API_PP_GetNOxgph() result(rNOxgph)

This function returns nitric oxides in grams per hour.

Variable Name In/Out Data Description Type rNOxgph out real NOx emissions [g/hr]

11.4.16 Get nitric oxide (mole fraction) real function kinSRM_API_PP_GetNOMoleFrac() result(rNOMoleFrac)

This function returns the nitric oxide, NO mole fraction.

Variable Name In/Out Data Description Type rNOMoleFrac out real final NO mole fraction

User Manual v9.4.1, Build 01 385 c 2017 CMCL Innovations CMCL < > 11 API REFERENCE GUIDE Innovations

11.4.17 Get nitric dioxide (mole fraction) real function kinSRM_API_PP_GetNO2MoleFrac() result(rNO2MoleFrac)

This function returns the nitric dioxide, NO2 mole fraction.

Variable Name In/Out Data Description Type

rNO2MoleFrac out real final NO2 mole fraction

11.4.18 Get acetylene (mole fraction) real function kinSRM_API_PP_GetC2H2MoleFrac() result(rC2H2MoleFrac)

This function returns the acetylene, C2H2 mole fraction.

Variable Name In/Out Data Description Type

rC2H2MoleFrac out real final C2H2 mole fraction

c 2017 CMCL Innovations 386 User Manual v9.4.1, Build 01 CMCL < > Innovations 11.4 Engine Only Post Processing

11.4.19 Get soot mass (grammes per hour) real function kinSRM_API_PP_GetSootMassgph() result(rSootMassgph)

This function returns soot in grams per hour.

Variable Name In/Out Data Description Type rSootMassgph out real Soot mass emissions [g/hr]

User Manual v9.4.1, Build 01 387 c 2017 CMCL Innovations Appendices

c 2017 CMCL Innovations 388 User Manual v9.4.1, Build 01 Troubleshooting

This chapter provides advice for troubleshooting problems that sometimes arise when performing chemical kinetic simulations.

User Manual v9.4.1, Build 01 389 c 2017 CMCL Innovations CMCL < > A TROUBLESHOOTING Innovations

A.1 Ignition delay simulations

Occasionally the kinetics & SRM Engine Suite software may throw a warning relating to an ignition event. This can sometimes happen for one or two cases out of a whole set of otherwise successful cases. Table A.1 lists common symptoms and suggestions for how to resolve each problem.

c 2017 CMCL Innovations 390 User Manual v9.4.1, Build 01 CMCL < > Innovations A.1 Ignition delay simulations

Table A.1: Troubleshooting ignition time simulations

Symptom Action Explanation

Too few data points Try increasing the final A minimum number of to detect ignition value of the independent data points are required event warning. variable. to detect ignition events.

Detected ignition Check the temperature A flat temperature profile event at end of profile. See below if it is indicates no ignition in simulation warning. flatter than expected. the simulation. Otherwise, try increasing It is important not to stop the final value of the the simulation part-way independent variable. through ignition.

Temperature profile Check the the model A completely flat profile is completely flat. settings do not specify suggests the simulation an isothermal simulation. was constrained to be isothermal.

Temperature profile Try running the case with Looser tolerances result is approximately tighter solver tolerances. in faster simulations, but flat. tighter tolerances may be required in some cases. See Section 6.5.

User Manual v9.4.1, Build 01 391 c 2017 CMCL Innovations Glossary

This section presents a summary of the terms used in this manual and within the software to explain the work-flow, data structures, and processes present in the kinetics & SRM Engine Suite user interface.

c 2017 CMCL Innovations 392 User Manual v9.4.1, Build 01 CMCL < > Innovations

• Parent Case A Parent Case is defined as a single folder that contains all the input files (including a single mechanism) needed to run a single execution of the underlying driver. Cases are organised hierarchically and as such, Parent Cases are the top-most parent for any Child Cases, Sensitivity Analyses, Experiments, Pathway Visualisations etc..

• Child Case Child Cases are clones of Parent Cases, matching their setup exactly other than for minor adjustments (for example initial pressure, or injec- tion timings). The intention is that these are used when one wishes to find out how minor adjustments in a parameter would affect the Parent Case. Child Cases are utilised with the Variables system detailed during Tutorial 2 (Section 3.2.3).

• Model Parameter All input parameters pertinent to a reactor/engine for any case in the kinetics & SRM Engine Suite are stored in one of two XML files (chemical mechanisms are stored separately). Any of the nodes in either of these XML files that affect the simulation as an input are referred to as ’Model Parameters’.

• Sensitivity Analysis The kinetics & SRM Engine Suite allows users to calculate and visualise the sensitivities (partial derivatives) of the outputs with respect to chosen input model parameters. The partial derivatives are estimated using a simple finite difference approach. In a sensitivity analysis, a parent case is chosen by the user and a whole array of child cases are created based on that parent case. The settings of the Child Cases are identical to those of the Parent Case, except that the values of the chosen model input parameters are varied slightly so as to allow computation of the finite differences. See Sections 2.6.2 and 9.2 for more details.

• Design of Experiments

User Manual v9.4.1, Build 01 393 c 2017 CMCL Innovations CMCL < > B GLOSSARY Innovations

The kinetics & SRM Engine Suite allows users to carry out Design of Ex- periments (DoEs) (previously called Parameter Sweeps) over as many dimensions as the user desires. A typical example of its application would be to compute the ignition delay time obtained over a range of ini- tial reactor pressures and temperatures. As with a Sensitivity Analysis, DoEs are dependent on Parent Cases and exactly match them at the time of the experiment creation. The analysis is carried out by construct- ing a series of case folders (referred to as ’Experiment Cases’), running these cases, then analysing the results at the point of visualisation.

• Variable Variables are used to vary one (or more) model parameters across a series of Child Cases. A model parameter is added to a Variable by specifying its input value as the user-defined variable name between two curly brackets, e.g. “{variable_name}”.

• The Workspace The kinetics & SRM Engine Suite utilises a workspace folder for each user (specified during installation) that contains all project folders, im- ported experimental data, mechanisms, custom chart-styles, and pro- gram settings for the current user. Any project folders added to this workspace will automatically appear for loading in the Welcome Menu the next time the kinetics & SRM Engine Suite is loaded. Moving or deleting this workspace will cause the kinetics & SRM Engine Suite to presume the tool is running for the first time. Please note that project folders should be top-level folders with the workspace and should not be stored in nested folders.

• MPICH2 MPICH2 is a high-performance, portable implementation of the Message Passing Interface (MPI) standard that allows the underlying driver for the kinetics & SRM Engine Suite to distribute processes across multiple processors.

• Tutorial Project

c 2017 CMCL Innovations 394 User Manual v9.4.1, Build 01 CMCL < > Innovations

A set of tutorial projects designed to acquaint the user with all the fea- tures of the kinetics & SRM Engine Suite are included in the installa- tion. It is highly recommended that users use the Tutorials section of this manual to complete all the tutorials before attempting to create their own projects. Tutorial projects contain a "TUTORIAL FILE" marker to denote them, remove this marker file to convert the tutorial to a regular project.

• Example Project The example projects demonstrate typical configurations of the SRM, they can be used as starting points for more projects. Example projects contain an "EXAMPLE FILE" marker to denote them, remove this marker file to convert the example to a regular project.

User Manual v9.4.1, Build 01 395 c 2017 CMCL Innovations Bibliography

[1] J. Appel, H. Bockhorn, and M. Frenklach. Kinetic modeling of soot forma- tion with detailed chemistry and physics: Laminar premixed flames of c2 hydrocarbons. Combustion and Flame, 121(1-2):122–136, 2000.

[2] M. Arndt. PN to PM correlation. AVL TechDay 2013, 2013. URL https://www.avl.com/documents/10138/0/Arndt+-+PM+vs+PN.pdf/ e2fa6032-7784-496e-b47d-0842fa574e6d. Accessed: 27-04-2016.

[3] P. Azadi, G. Brownbridge, I. Kemp, S. Mosbach, J. S. Dennis, and M. Kraft. Microkinetic modeling of fischer-tropsch synthesis over cobalt catalysts. ChemCatChem (CCtC), 7(1):134–143, 2015. doi:10.1002/cctc.201402662.

[4] M. Balthasar and M. Kraft. A stochastic approach to calculate the parti- cle size distribution function of soot particles in laminar premixed flames. Combustion and Flame, 133(3):289–298, 2003. doi:10.1016/S0010- 2180(03)00003-8.

[5] A. Bhave, M. Balthasar, M. Kraft, and F. Mauss. Analysis of a natural gas fuelled Homogeneous Charge Compression Ignition engine with ex- haust gas recirculation using a stochastic reactor model. Int. J. Engine Research, 5(1):93–104, 2004.

[6] G. M. Bianchi, P. Pelloni, G. S. Zhu, and R. Reitz. On non-equilibrium tur- bulence corrections in multidimensional hsdi diesel engine computations. SAE Paper 2001-01-0997, 2001.

[7] M. S. Celnik, A. Raj, R. H. West, R. I. A. Patterson, and M. Kraft. Aromatic site description of soot particles. Combustion and Flame, 155(1-2):161– 180, 2008. doi:10.1016/j.combustflame.2008.04.011.

c 2017 CMCL Innovations 396 User Manual v9.4.1, Build 01 CMCL < > Innovations BIBLIOGRAPHY

[8] R. L. Curl. Dispersed phase mixing: I. theory and effects in simple reac- tors. A. I. Ch. E. Journal, 9(2):175–181, 1963.

[9] H. Daneshyar and P. G. Hill. The structure of small-scale turbulence and its effect on combustion in spark ignition engines. Prog. Energy Combust. Sci., 13:47–73, 1987.

[10] M. Frenklach and H. Wang. Detailed modeling of soot particle nucleation and growth. Proceedings of the Combustion Institute, 23:1559–1566, 1991.

[11] J. Gallus, K. U., R. Vogt, C. Borensen, and T. Benter. On-road particle number measurements using a portable emission measurement system. Atmospheric Environment, 124:37–45, 2016.

[12] R. G. Gilbert, K. Luther, and J. Troe. Theory of thermal unimolecular reac- tions in the fall-off range. Berichte der Bunsengesellschaft für physikalis- che Chemie, 87(2):169–177, 1983.

[13] A. Gogan, B. Sundén, A. Lehtiniemi, and F. Mauss. Stochastic Model for the Investigation of the Influence of Turbulent Mixing on Engine Knock. SAE Paper No. 2004-01-2999, 2004.

[14] M. J. Goodson and M. Kraft. An efficient stochastic algorithm for simu- lating nano-particle dynamics. Journal of Computational Physics, 183(1): 210–232, 2002. doi:10.1006/jcph.2002.7192.

[15] S. J. Harris and M. M. Maricq. The role of fragmentation in defining the signature size distribution of diesel soot. Journal of Aerosol Science, 33 (6):935–942, 2002.

[16] J. B. Heywood. Internal Combustion Engine Fundamentals. McGraw-Hill, New York, 1988.

[17] G. F. Hohenberg. Advanced approaches for heat transfer calculations. SAE paper 790825, 1979.

[18] J. Keck. Turbulent flame structure and speed in spark-ignition engines. Nineteenth Symposium (International) on Combustion/The Combustion Institute, pages 1451–1466, 1982.

User Manual v9.4.1, Build 01 397 c 2017 CMCL Innovations CMCL < > BIBLIOGRAPHY Innovations

[19] R. J. Kee, J. F. Grcar, M. D. Smooke, and J. A. Miller. A Fortran program for modeling steady laminar one-dimensional premixed flames. Technical Report SAND85-8240, Sandia National Laboratories, 1985.

[20] R. J. Kee, J. A. Miller, G. H. Evans, and G. Dixon-Lewis. A computational model of the structure and extinction of strained, opposed flow, premixed methane-air flames. Symposium (International) on Combustion, 22(1): 1479–1494, 1989. doi:10.1016/S0082-0784(89)80158-4.

[21] R. J. Kee, M. E. Coltrin, and P. Glarborg. Chemically Reacting Flow: Theory and Practice. John Wiley & Sons, 2003.

[22] D. B. Kittelson. Engines and nanoparticles: A review. Journal of Aerosol Science, 29:575–588, 1998.

[23] P. A. Lakshminarayanan and Y. V. Aghav. Modelling Diesel Combustion. Springer Science & Business Media, 2010.

[24] S. Liao, D. Jiang, Z. Huang, Q. Cheng, J. Gao, and Y. Hu. Approxima- tion of flammability region for natural gas-air-diluent mixture. Journal of Hazardous Materials, A(125):23–284, 2005.

[25] F. A. Lindemann, S. Arrhenius, I. Langmuir, N. R. Dhar, J. Perrin, and W. C. McC. Lewis. Discussion on “the radiation theory of chemical action”. Transactions of the Faraday Society, 17:598–606, 1922.

[26] T. Lu and C. Law. A directed relation graph method for mechanism reduc- tion. Proceedings of the Combustion Institute, 30(1):1333–1341, 2005.

[27] Z. Luo, T. Lu, M. Maciaszek, S. Som, and D. Longman. A reduced mech- anism for high-temperature oxidation of biodiesel surrogates. Energy and Fuels, 24(12):6283–6293, 2010.

[28] A. E. Lutz, R. J. Kee, J. F. Grcar, and F. M. Rupley. Oppdif: A Fortran program for computing opposed-flow diffusion flames. Technical Report SAND96-8243, Sandia National Laboratories, 1996.

[29] S. Mosbach and M. Kraft. An explicit numerical scheme for homogeneous gas-phase high-temperature combustion systems. Combustion Theory and Modelling, 10(1):171–182, 2006.

c 2017 CMCL Innovations 398 User Manual v9.4.1, Build 01 CMCL < > Innovations BIBLIOGRAPHY

[30] H. Motz and H. Wise. Diffusion and heterogeneous reaction. III. Atom recombination at a catalytic boundary. Journal of Chemical Physics, 32 (6):1893–1894, 1960.

[31] K. Naumann. Cosima - a computer program simulating the dynamics of fractal aerosols. Journal of Aerosol Science, 34(10):1371–1397, 2003.

[32] K. G. Neoh and J. B. Howard. Particulate Carbon-Formation during Com- bustion, pages 261–77. Plenum, New York, 1981.

[33] S. H. Park and S. N. Rogak. A novel fixed-sectional model for the forma- tion and growth of aerosol agglomerates. Journal of Aerosol Science, 35 (11):1385–1404, 2004.

[34] S. H. Park, S. N. Rogak, W. K. Bushe, J. Z. Wen, and M. J. Thomson. An aerosol model to predict size and structure of soot particles. Combustion Theory and Modelling, 9(3):499–513, 2005.

[35] R. I. A. Patterson, J. Singh, M. Balthasar, M. Kraft, and J. R. Norris. The linear process deferment algorithm: A new technique for solving popu- lation balance equations. SIAM Journal on Scientific Computing, 28(1): 303–320, 2006. doi:10.1137/040618953.

[36] P. Pepiot-Desjardins and H. Pitsch. An efficient error-propagation-based reduction method for large chemical kinetic mechanisms. Combustion and Flame, 154(1-2):67–81, 2008.

[37] A. Pirooz. Effects of injector nozzle geometry on spray characteristics, an analysis. Indian J. Sci. Res, 5(1):354–361, 2014.

[38] S. B. Pope. PDF methods for turbulent reactive flows. Progress in En- ergy and Combustion Science, 11:119–192, 1985. doi:10.1016/0360- 1285(85)90002-4.

[39] W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery. Numeri- cal Recipes in C++ The Art of Scientific Computing. Cambridge University Press, Cambridge, 2nd Edition, 2002.

[40] A. Raj, M. Celnik, R. Shirley, M. Sander, R. Patterson, R. West, and M. Kraft. A statistical approach to develop a detailed soot growth model using pah characteristics. Combustion and Flame, 156:896–913, 2009.

User Manual v9.4.1, Build 01 399 c 2017 CMCL Innovations CMCL < > BIBLIOGRAPHY Innovations

[41] S. N. Rogak and R. C. Flagan. Coagulation of aerosol agglomerates in the transition regime. Journal of Colloid and Interface Science, 151(1): 203–224, 1992.

[42] M. Saffaripour, A. Veshkini, M. Kholghy, and M. J. Thomson. Experimen- tal investigation and detailed modeling of soot aggregate formation and size distribution in laminar coflow diffusion flames of jet A-1, a synthetic kerosene, and n-decane. Combustion and Flame, 161(3):848–863, 2014.

[43] M. v. Smoluchowski. Versuch einer mathematischen Theorie der Koagu- lationskinetik kolloidaler Lösungen. Zeitschrift für Physikalische Chemie, 92:129–168, 1917.

[44] C. M. Sorensen and G. M. Wang. Note on the correction for diffusion and drag in the slip regime. Aerosol Science and Technology, 33(4):353–356, 2000.

[45] P. Stewart, C. Larson, and D. Golden. Pressure and temperature de- pendence of reactions proceeding via a bound complex. 2. Application to

2 CH3 −−→ C2H5 + H. Combustion and Flame, 75(1):25–31, 1989.

[46] G. Strang. On the construction and comparison of difference schemes. SIAM J. Numer. Anal., 5(3):506–517, 1968.

[47] J. Tagalian and J. Heywood. Flame Initiation in a Spark-Ignition Engine. Combust. Flame, 64:243–246, 1986.

[48] P. K. Venkatesh, A. Y. Chang, A. M. Dean, M. H. Cohen, and R. W. Carr. Parameterization of pressure- and temperature-dependent kinet- ics in multiple well reactions. AIChE Journal, 43(5):1331–1340, 1997.

[49] T. von Karman. Über laminare und turbulente Reibung. Zeitschrift für Angewandte Mathematik und Mechanik, 1(4), 1921.

[50] X. Wang, Z. Huang, O. A. Kuti, W. Zhang, and K. Nishida. Experimental and analytical study on biodiesel and diesel spray characteristics under ultra-high injection pressure. International Journal of Heat and Fluid Flow, 31(4):659–666, 2010. doi:10.1016/j.ijheatfluidflow.2010.03.006.

c 2017 CMCL Innovations 400 User Manual v9.4.1, Build 01 CMCL < > Innovations BIBLIOGRAPHY

[51] J. Z. Wen, M. J. Thomson, S. H. Park, S. N. Rogak, and M. F. Light- stone. Study of soot growth in a plug flow reactor using a moving sec- tional model. Proceedings of the Combustion Institute, 30:1477–1484, 2005.

[52] J. Z. Wen, M. J. Thomson, M. F. Lightstone, S. H. Park, and S. N. Ro- gak. An improved moving sectional aerosol model of soot formation in a plug flow reactor. Combustion Science and Technology, 178(5):921–951, 2006.

[53] J. Z. Wen, M. J. Thomson, M. F. Lightstone, and S. N. Rogak. De- tailed kinetic modeling of carbonaceous nanoparticle inception and sur- face growth during the pyrolysis of C6H6 behind shock waves. Energy and Fuels, 20(2):547–559, 2006.

[54] Q. Zhang. Detailed Modeling of Soot Formation/Oxidation in Laminar Coflow Diffusion Flames. PhD thesis, University of Toronto, Toronto, Canada, 2009.

[55] Q. Zhang, M. J. Thomson, H. Guo, F. Liu, and G. J. Smallwood. Model- ing of oxidation-driven soot aggregate fragmentation in a laminar coflow diffusion flame. Combustion Science and Technology, 182(7):491–504, 2010.

[56] M. Zurita-Gotor and D. E. Rosner. Effective diameters for collisions of fractal-like aggregates: Recommendations for improved aerosol coagula- tion frequency predictions. Journal of Colloid and Interface Science, 255 (1):10–26, 2002.

User Manual v9.4.1, Build 01 401 c 2017 CMCL Innovations Index

Appel et al. [1], 235, 237 Neoh and Howard [32], 237 Arndt [2], 310 Park and Rogak [33], 232, 233 Azadi et al. [3], 145 Park et al. [34], 230 Balthasar and Kraft [4], 308 Patterson et al. [35], 309 Bhave et al. [5], 253 Pepiot-Desjardins and Pitsch [36], 92, Bianchi et al. [6], 259 325, 327 Celnik et al. [7], 308 Pirooz [37], 296 Curl [8], 267 Pope [38], 249, 270 Daneshyar and Hill [9], 284 Press et al. [39], 257 Frenklach and Wang [10], 236, 237 Raj et al. [40], 308, 309 Gallus et al. [11], 310 Rogak and Flagan [41], 230 Gilbert et al. [12], 221 Saffaripour et al. [42], 237 Gogan et al. [13], 256 Smoluchowski [43], 227 Goodson and Kraft [14], 308 Sorensen and Wang [44], 231 Stewart et al. [45], 222 Harris and Maricq [15], 234 Strang [46], 270 Heywood [16], 255, 260, 273, 274, Tagalian and Heywood [47], 284 282–284, 289, 290, 293, 304, Venkatesh et al. [48], 223 314 Wang et al. [50], 301 Hohenberg [17], 256 Wen et al. [51], 230 Keck [18], 282 Wen et al. [52], 230 Kee et al. [19], 319, 320 Wen et al. [53], 230 Kee et al. [20], 317, 319 Zhang et al. [55], 233, 237 Kee et al. [21], 203 Zhang [54], 233, 237 Kittelson [22], 309 Zurita-Gotor and Rosner [56], 231 Lakshminarayanan and Aghav [23], von Karman [49], 317 302 Liao et al. [24], 290 Lindemann et al. [25], 221 Lu and Law [26], 92, 325, 326 Luo et al. [27], 92, 328 Lutz et al. [28], 317, 319 Mosbach and Kraft [29], 241 Motz and Wise [30], 226 Naumann [31], 237

c 2017 CMCL Innovations 402 User Manual v9.4.1, Build 01