Supported Input Keywords

The following is a list of the currently supported keywords in the input file. Keywords that include “CanSen specific keyword” should be placed after the ‘END’ keyword to maintain SENKIN compatibility, although CanSen has no preference for the order.


ADD: Mole fractions of species that should be included in the initial composition but excluded from the calculation of the equivalence ratio. Only valid when the equivalence ratio option is used to specify the composition. See CPROD, EQUI, FUEL, OXID, REAC.

Example:

ADD Ar 0.1

ATLS: Absolute tolerance of the accuracy of the sensitivity coefficients. Optional keyword, default: 1E-06

Example:

ATLS 1E-06

ATOL: Absolute tolerance of the accuracy of the solution. Should be set smaller than the smallest meaningful species mass fraction. Optional keyword, default: 1E-20

Example:

ATOL 1E-20

BORE: CanSen specific keyword. Bore diameter of the engine cylinder. Units: cm.

Example:

BORE 1.0

CMPR: Specify the compression ratio for the internal combustion engine model. Defined as the maximum total volume in the cylinder divided by the clearance volume. See the documentation. See also: VOLC, VOLD.

Example:

CMPR 10.0

CONP: Solve a constant pressure reactor with the energy equation on. One of CONP, CONT, CONV, COTV, ICEN, TPRO, TTIM, VPRO, or VTIM must be specified.


CONT: Solve a constant pressure reactor with the energy equation off. One of CONP, CONT, CONV, COTV, ICEN, TPRO, TTIM, VPRO, or VTIM must be specified.


CONV: Solve a constant volume reactor with the energy equation on. One of CONP, CONT, CONV, COTV, ICEN, TPRO, TTIM, VPRO, or VTIM must be specified.


COTV: Solve a constant volume reactor with the energy equation off. One of CONP, CONT, CONV, COTV, ICEN, TPRO, TTIM, VPRO, or VTIM must be specified.


CPROD: Complete products of stoichiometric combustion for the given fuel and oxidizer compositions. Only valid when the equivalence ratio option is used to specify the composition. All of the elements specified in the FUEL and OXID must be included in the set of species specified in CPROD. See ADD, EQUI, FUEL, OXID, REAC.

Example:

CPROD H2O
CPROD CO2

CRAD: CanSen specific keyword. Specify the crank radius. Units: cm.

Example:

CRAD 3.5

DEG0: Specify the initial crank angle of the simulation. Units: degrees. Default: 180 deg.

Example:

DEG0 180

DELT: Time interval for printing to the screen and the text output file. Optional keyword, default: TIME/100.Units: seconds.

Example:

DELT 1E-03

DTIGN: Temperature threshold used to determine the ignition delay. Ignition temperature is the initial temperature TEMP plus this value. Will be ignored for cases with the energy equation turned off. If both DTIGN and TLIM are specified, TLIM will override DTIGN. See TLIM. Optional keyword, default: 400. Units: K.

Example:

DTIGN 400

DTSV: Time interval for saving to the binary save file. Values are stored at the nearest time step to the save time interval. Optional keyword, by default, all time points are saved to the binary save file. Units: seconds.

Example:

DTSV 1E-05

END: Signifies the end of the input file in SENKIN. It is included in CanSen for compatibility with SENKIN input files, but does not do anything. Any CanSen specific keywords can be placed after END and the same input file can be used with SENKIN with no changes.


EQUI: Equivalence ratio desired for the initial mixture. If EQUI is specified, all of CPROD, FUEL, and OXID also must be specified, and ADD can be optionally specified. If EQUI is not specified, the reactants must be specified with REAC. See ADD, CPROD, FUEL, OXID, REAC.

Example:

EQUI 1.0

FUEL: Relative mole fractions of components in the fuel mixture for equivalence ratio calculations. The sum of the fuel mole fractions should be 1.0; if they are not, they will be normalized and a warning message will be printed. If EQUI is specified, FUEL must be specified. See ADD, CPROD, EQUI, OXID, REAC.

Example:

FUEL CH4 1.0

ICEN: Specify the internal combustion engine model be used. See the documentation for the model for information on the derivation. See also BORE, CMPR, CRAD, DEG0, LOLR, RODL, RPM, STROKE, VOLD, and VOLC. One of CONP, CONT, CONV, COTV, ICEN, TPRO, TTIM, VPRO, or VTIM must be specified.


IGNBREAK: CanSen specific keyword. Indicates that the simulation should exit when ignition is encountered, instead of continuing until the end time TIME is reached. The criterion for ignition is specified by DTIGN or TLIM. Optional keyword.


LOLR: Specify the ratio of the connecting rod length, \(\ell\), to the crank radius, \(a\). See RODL, CRAD.

Example:

LOLR 3.5

OXID: Relative mole fractions of components in the oxidizer mixture for equivalence ratio calculations. The sum of the oxidizer mole fractions should be 1.0; if they are not, they will be normalized and a warning message will be printed. If EQUI is specified, OXID must be specified. See ADD, CPROD, EQUI, FUEL, REAC.

Example:

OXID O2 1.0
OXID N2 3.76

PRES: Initial reactor pressure. Required keyword. Units: atmospheres.

Example:

PRES 1.0

REAC: Initial mole fraction of a reactant gas in the reactor. Required keyword if EQUI is not specified; however, only one of REAC or EQUI may be specified. If the mole fractions of the components given on REAC lines do not sum to 1.0, they will be normalized and a warning message will be printed.

Example:

REAC CH4 1.0
REAC O2 1.0
REAC N2 3.76

RODL: CanSen specific keyword. Specify the connecting rod length, \(\ell\). Units: cm.

Example:

RODL 5.0

RPM: Specify the rotation rate of the engine in revolutions per minute.

Example:

RPM 1500

RTLS: Relative tolerance of the accuracy of the sensitivity coefficients. Optional keyword, default: 1E-04

Example:

RTLS 1E-04

RTOL: Relative tolerance of the accuracy of the solution. Can be interpreted roughly as the number of significant digits expected in the solution. Optional keyword, default: 1E-08

Example:

RTOL 1E-08

SENS: Calculate sensitivity coefficients for the solution variables. The sensitivity coefficients are stored in a 2-D array, with dimensions of (number of solution variables, number of reactions). For CONV, COTV, VPRO and VTIM cases, the order of the sensitivity coefficients (i.e. the rows) is:

- 0  - mass
- 1  - volume
- 2  - temperature
- 3+ mass fractions of the species

For CONP, CONT, TPRO, and TTIM cases, the order of the sensitivity coefficients (i.e. the rows) is

- 0  - mass
- 1  - temperature
- 2+ - mass fractions of the species

STPT: Maximum internal time step for the solver. Optional keyword. If any of DELT, DTSV, or STPT are specified, the minimum of these is used as the maximum internal time step. Otherwise, the default maximum time step is the end time TIME/100.

Example:

STPT 1E-5

STROKE: CanSen specific keyword. Specify the stroke length of the engine, \(L\). Units: cm.

Example:

STROKE 7.0

TEMP: Initial reactor temperature. Required keyword. Units: K.

Example:

TEMP 800

TIME: End time for the integration. Unless, IGNBREAK is specified and its condition satisfied, the solver will integrate until TIME is reached. Required keyword. Units: seconds.

Example:

TIME 1E-03

TLIM: Ignition temperature. Ignition is considered to have occurred when this temperature is exceeded. If both DTIGN and TLIM are specified, TLIM overrides DTIGN. Optional keyword, default: TEMP + 400. Units: K.

Example:

TLIM 1200

TPRO: Warning: TPRO is broken in CanSen v1.1 due to incompatibilites with Cantera 2.1. Specify the reactor temperature as a function of time. Multiple invocations of this keyword build a profile of the temperature over the given times. This profile is linearly interpolated to set the reactor temperature at any solver time step. When the end time of the profile is exceeded, the temperature remains constant at the last specified value. One of CONP, CONT, CONV, COTV, ICEN, TPRO, TTIM, VPRO, or VTIM must be specified. Units: seconds, K.

Example:

TPRO 0.0 800
TPRO 0.1 900

TTIM: Warning: TTIM is broken in CanSen v1.1 due to incompatibilites with Cantera 2.1. Specify the reactor temperature as a user-provided function of time. To use this keyword, the user must edit the TemperatureFunctionTime class in the user_routines file. Any parameters to be read from external files should be loaded in the __init__ method so that they are not read on every time step. The parameters should be stored in the self instance of the class so that they can be accessed in the __call__ method. The __call__ method should contain the actual calculation and return of the temperature given the input time. One of CONP, CONT, CONV, COTV, ICEN, TPRO, TTIM, VPRO, or VTIM must be specified. Units: K.


VOL: Initial volume of the reactor. Optional keyword, default: 1E6 cm**3. Units: cm**3.

Example:

VOL 1.0

VOLC: Specify the clearance volume, \(V_c\). Units: cm**3. See CMPR, VOLD.

Example:

VOLC 1.0

VOLD: Specify the swept or displaced volume, \(V_d\). Units: cm**3. See CMPR, VOLC.

Example:

VOLD 10.0

VPRO: Specify the reactor volume as a function of time. Multiple invocations of this keyword build a profile of the volume over the given times. This profile is linearly interpolated to set the reactor volume at any solver time step. When the end time of the profile is exceeded, the volume remains constant at the last specified value. One of CONP, CONT, CONV, COTV, ICEN, TPRO, TTIM, VPRO, or VTIM must be specified. Units: seconds, m**3.

Example:

VPRO 0.0 1E-5
VPRO 0.1 1E-6

VTIM: Specify the reactor volume as a user-provided function of time. To use this keyword, the user must edit the VolumeFunctionTime class in the user_routines file. Any parameters to be read from external files should be loaded in the __init__ method so that they are not read on every time step. The parameters should be stored in the self instance of the class so that they can be accessed in the __call__ method. The __call__ method should contain the actual calculation and must return the velocity of the wall given the input time. One of CONP, CONT, CONV, COTV, ICEN, TPRO, TTIM, VPRO, or VTIM must be specified. Units: m/s.