0% found this document useful (0 votes)
528 views210 pages

ANSYS Chemkin-Pro Application Programming Interface Manual

Uploaded by

V Caf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
528 views210 pages

ANSYS Chemkin-Pro Application Programming Interface Manual

Uploaded by

V Caf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 210

ANSYS Chemkin-Pro Application Programming

Interface Manual

ANSYS, Inc. Release 2020 R1


Southpointe January 2020
2600 ANSYS Drive
Canonsburg, PA 15317 ANSYS, Inc. and
[email protected] ANSYS Europe,
Ltd. are UL
http://www.ansys.com registered ISO
(T) 724-746-3304 9001: 2015
(F) 724-514-9494 companies.
Copyright and Trademark Information

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

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

Disclaimer Notice

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

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

U.S. Government Rights

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

Third-Party Software

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

Published in the U.S.A.


Table of Contents
1. Introduction ............................................................................................................................................ 1
1.1. Compiler Compatibility ..................................................................................................................... 2
1.1.1. Intel Composer XE 2017 Compiler Summary ............................................................................. 2
1.1.1.1. Compiler Installation ....................................................................................................... 2
1.1.1.2. Setting Up Your Compiler Environment ............................................................................ 3
1.1.1.3. Testing Your Program ....................................................................................................... 3
1.2. Prerequisite Skills .............................................................................................................................. 3
1.3. Overview of Utilities Packages ........................................................................................................... 3
1.4. Structure and Use of Gas-phase Kinetics Utilities ............................................................................... 4
1.4.1. Example: Hydrogen Oxidation .................................................................................................. 5
1.4.2. Example for a Multi-Temperature Plasma .................................................................................. 7
1.5. Structure and Use of the Surface Kinetics Utilities .............................................................................. 9
1.5.1. Example of Using the Surface Kinetics Pre-processor ............................................................... 11
1.6. Structure and Use of the Transport Utilities ...................................................................................... 13
2. User Supplemental Programming ........................................................................................................ 15
2.1. User-programmed Subroutines ....................................................................................................... 15
2.1.1. User-programmed Reaction Rate Routines .............................................................................. 16
2.1.2. User-programmed Subroutines in Reactor Models .................................................................. 16
2.1.3. Recompiling and Linking a User Subroutine ............................................................................ 18
3. Writing User Applications ..................................................................................................................... 21
3.1. Basic Requirements of a Chemkin Program ...................................................................................... 21
3.1.1. Requirements for Writing a FORTRAN Program ....................................................................... 22
3.1.1.1. Declare Variable Types ................................................................................................... 22
3.1.1.2. Allocate Arrays .............................................................................................................. 22
3.1.1.3. Open the Linking File ..................................................................................................... 23
3.1.1.4. Initialize the Linking File Data ........................................................................................ 23
3.1.1.5. Obtain or Manipulate Data ............................................................................................. 23
3.1.1.6. Compile and Link ........................................................................................................... 23
3.1.2. Requirements for Writing a C++ Program ................................................................................ 24
3.1.2.1. Declare Variable Types ................................................................................................... 24
3.1.2.2. Allocate Arrays .............................................................................................................. 25
3.1.2.3. Open the Linking File ..................................................................................................... 25
3.1.2.4. Initialize the Linking File Data ........................................................................................ 25
3.1.2.5. Obtain or Manipulate Data ............................................................................................. 25
3.1.2.6. Compile and Link ........................................................................................................... 26
3.2. Gas-phase Kinetics Sample Program (CONP) .................................................................................... 26
3.2.1. Input to Gas-phase Kinetics Pre-processor .............................................................................. 27
3.2.2. Output from Gas-phase Kinetics Pre-processor ........................................................................ 28
3.2.3. Input to Chemkin Sample Program (CONP) ............................................................................. 29
3.2.4. Output from Chemkin Sample Program (CONP) ...................................................................... 29
3.3. Surface Kinetics Sample Program (SKSAMPLE) ................................................................................. 30
3.3.1. Discussion of Sample Problem ................................................................................................ 31
3.3.2. Input to Gas-phase Kinetics Pre-processor .............................................................................. 32
3.3.3. Output from Gas-phase Kinetics Pre-processor ........................................................................ 32
3.3.4. Input to Surface Kinetics Pre-processor ................................................................................... 34
3.3.5. Output from Surface Kinetics Pre-processor ............................................................................ 35
3.3.6. Input to Chemkin Sample Program (SKSAMPLE) ...................................................................... 35
3.3.7. Output from Chemkin Sample Program (SKSAMPLE) ............................................................... 36
3.4. Transport Sample Problem (PROPS) ................................................................................................. 40
3.4.1. Discussion of Sample Problem ................................................................................................ 40

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. iii
Chemkin-Pro Application Programming Interface Manual

3.4.2. Input to Gas-phase Kinetics Pre-processor .............................................................................. 41


3.4.3. Output from Gas-phase Kinetics Pre-processor ........................................................................ 41
3.4.4. Input to Premixed Flame Model .............................................................................................. 41
3.4.5. Output from Premixed Flame Model ....................................................................................... 41
3.4.6. Input to Chemkin Sample Program (PROPS) ............................................................................ 41
3.4.7. Output from Chemkin Sample Program (PROPS) ..................................................................... 41
3.5. VODE Summary .............................................................................................................................. 42
4. Quick Reference Guide to the Gas-phase Kinetics Subroutine Library ................................................ 47
4.1. Mnemonics .................................................................................................................................... 47
4.2. Initialization .................................................................................................................................... 48
4.3. Information About Elements ........................................................................................................... 49
4.4. Information About Species .............................................................................................................. 49
4.5. Information About Reactions .......................................................................................................... 50
4.6. Gas Constants and Units ................................................................................................................. 52
4.7. Equations of State and Mole-Mass Conversions ............................................................................... 52
4.8. Thermodynamic Properties (Nondimensional) ................................................................................. 54
4.9. Thermodynamic Properties (Mass Units) .......................................................................................... 54
4.10. Thermodynamic Properties (Molar Units) ....................................................................................... 55
4.11. Mean Thermodynamic Properties (Mass Units) ............................................................................... 56
4.12. Mean Thermodynamic Properties (Molar Units) ............................................................................. 56
4.13. Chemical Production Rates ............................................................................................................ 57
4.14. Equilibrium Constants and Rate of Progress Variables .................................................................... 60
4.15. Utilities ......................................................................................................................................... 61
5. Quick Reference Guide to the Surface Kinetics Subroutine Library ..................................................... 65
5.1. Mnemonics .................................................................................................................................... 65
5.2. Initialization .................................................................................................................................... 65
5.3. Information about Elements ............................................................................................................ 66
5.4. Information about Species .............................................................................................................. 66
5.5. Information about Phases and Materials .......................................................................................... 67
5.6. Information about Surface Reactions ............................................................................................... 67
5.7. Gas Constants and Units ................................................................................................................. 70
5.8. Thermodynamic Properties (Non dimensional) ................................................................................ 70
5.9. Thermodynamic Properties (Mass Units) .......................................................................................... 70
5.10. Thermodynamic Properties (Molar Units) ....................................................................................... 71
5.11. Chemical Production Rates ............................................................................................................ 71
5.12. Equilibrium Constants and Rate-of-Progress Variables .................................................................... 72
5.13. Utilities ......................................................................................................................................... 72
6. Quick Reference Guide to the Transport Subroutine Library ............................................................... 75
6.1. Mnemonics .................................................................................................................................... 75
6.2. Initialization and Parameters ........................................................................................................... 75
6.3. Viscosity ......................................................................................................................................... 76
6.4. Conductivity ................................................................................................................................... 77
6.5. Diffusion Coefficients ...................................................................................................................... 77
6.6. Thermal Diffusion ........................................................................................................................... 78
7. Alphabetical Listing of the Gas-phase Kinetics Subroutine Library ..................................................... 79
7.1. CKABE ............................................................................................................................................ 79
7.2. CKABML ......................................................................................................................................... 79
7.3. CKABMS ......................................................................................................................................... 80
7.4. CKAML ........................................................................................................................................... 80
7.5. CKAMS ........................................................................................................................................... 81
7.6. CKATHM ......................................................................................................................................... 81
7.7. CKATOM ......................................................................................................................................... 82

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
iv of ANSYS, Inc. and its subsidiaries and affiliates.
Chemkin-Pro Application Programming Interface Manual

7.8. CKAVG ............................................................................................................................................ 82


7.9. CKAWT ........................................................................................................................................... 82
7.10. CKBSEC ......................................................................................................................................... 83
7.11. CKCDC .......................................................................................................................................... 83
7.12. CKCDXP ........................................................................................................................................ 83
7.13. CKCDXR ........................................................................................................................................ 84
7.14. CKCDYP ........................................................................................................................................ 84
7.15. CKCDYR ........................................................................................................................................ 85
7.16. CKCHRG ........................................................................................................................................ 85
7.17. CKCOMP ....................................................................................................................................... 86
7.18. CKCONT ........................................................................................................................................ 86
7.19. CKCOPY ........................................................................................................................................ 86
7.20. CKCPBL ......................................................................................................................................... 87
7.21. CKCPBS ......................................................................................................................................... 87
7.22. CKCPML ........................................................................................................................................ 87
7.23. CKCPMS ........................................................................................................................................ 88
7.24. CKCPOR ........................................................................................................................................ 88
7.25. CKCRAY ........................................................................................................................................ 88
7.26. CKCTC ........................................................................................................................................... 89
7.27. CKCTX .......................................................................................................................................... 90
7.28. CKCTXP ........................................................................................................................................ 90
7.29. CKCTXR ........................................................................................................................................ 90
7.30. CKCTY .......................................................................................................................................... 91
7.31. CKCTYP ........................................................................................................................................ 91
7.32. CKCTYR ........................................................................................................................................ 92
7.33. CKCVBL ......................................................................................................................................... 92
7.34. CKCVBS ......................................................................................................................................... 93
7.35. CKCVML ........................................................................................................................................ 93
7.36. CKCVMS ........................................................................................................................................ 93
7.37. CKDHXP ........................................................................................................................................ 94
7.38. CKDHYP ........................................................................................................................................ 94
7.39. CKDLIM ........................................................................................................................................ 95
7.40. CKDONE ....................................................................................................................................... 95
7.41. CKDOT .......................................................................................................................................... 95
7.42. CKDTAB ........................................................................................................................................ 96
7.43. CKEQC .......................................................................................................................................... 96
7.44. CKEQXP ........................................................................................................................................ 96
7.45. CKEQXR ........................................................................................................................................ 97
7.46. CKEQYP ........................................................................................................................................ 97
7.47. CKEQYR ........................................................................................................................................ 98
7.48. CKFALP ......................................................................................................................................... 98
7.49. CKFAL ........................................................................................................................................... 99
7.50. CKFRCH ...................................................................................................................................... 100
7.51. CKGBML ...................................................................................................................................... 101
7.52. CKGBMS ..................................................................................................................................... 101
7.53. CKGML ........................................................................................................................................ 101
7.54. CKGMS ....................................................................................................................................... 102
7.55. CKHBML ..................................................................................................................................... 102
7.56. CKHBMS ..................................................................................................................................... 103
7.57. CKHML ....................................................................................................................................... 103
7.58. CKHMS ....................................................................................................................................... 103
7.59. CKHORT ...................................................................................................................................... 104

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. v
Chemkin-Pro Application Programming Interface Manual

7.60. CKHRX ........................................................................................................................................ 104


7.61. CKI2CH ....................................................................................................................................... 104
7.62. CKIEXC ........................................................................................................................................ 105
7.63. CKIFT1 ........................................................................................................................................ 105
7.64. CKIJAN ........................................................................................................................................ 105
7.65. CKILT .......................................................................................................................................... 106
7.66. CKIMOM ..................................................................................................................................... 106
7.67. CKINDX ....................................................................................................................................... 107
7.68. CKINIT ......................................................................................................................................... 107
7.69. CKINU ......................................................................................................................................... 108
7.70. CKION ......................................................................................................................................... 108
7.71. CKIORD ....................................................................................................................................... 108
7.72. CKIPLG ........................................................................................................................................ 109
7.73. CKIREV ........................................................................................................................................ 110
7.74. CKIRNU ....................................................................................................................................... 110
7.75. CKISIG ......................................................................................................................................... 111
7.76. CKITDE ........................................................................................................................................ 111
7.77. CKITR .......................................................................................................................................... 112
7.78. CKIUQ ......................................................................................................................................... 112
7.79. CKIVIS ......................................................................................................................................... 112
7.80. CKIXSM ....................................................................................................................................... 113
7.81. CKKFKR ....................................................................................................................................... 113
7.82. CKKFRT ....................................................................................................................................... 114
7.83. CKKTFL ....................................................................................................................................... 114
7.84. CKKTMP ...................................................................................................................................... 114
7.85. CKKUW ....................................................................................................................................... 115
7.86. CKLEN ......................................................................................................................................... 115
7.87. CKLEN2 ....................................................................................................................................... 115
7.88. CKLKUP ...................................................................................................................................... 116
7.89. CKLSCH ...................................................................................................................................... 116
7.90. CKMMWC ................................................................................................................................... 116
7.91. CKMMWX ................................................................................................................................... 117
7.92. CKMMWY .................................................................................................................................... 117
7.93. CKMXTP ...................................................................................................................................... 117
7.94. CKNCF ........................................................................................................................................ 118
7.95. CKNCMP ..................................................................................................................................... 118
7.96. CKNORM ..................................................................................................................................... 118
7.97. CKNPAR ...................................................................................................................................... 119
7.98. CKNU .......................................................................................................................................... 119
7.99. CKNUF ........................................................................................................................................ 119
7.100. CKPC ......................................................................................................................................... 120
7.101. CKPHAZ .................................................................................................................................... 120
7.102. CKPNT ...................................................................................................................................... 121
7.103. CKPX ......................................................................................................................................... 121
7.104. CKPY ......................................................................................................................................... 121
7.105. CKQC ........................................................................................................................................ 122
7.106. CKQXP ...................................................................................................................................... 122
7.107. CKQYP ...................................................................................................................................... 123
7.108. CKQYR ...................................................................................................................................... 123
7.109. CKR2CH .................................................................................................................................... 124
7.110. CKRAEX ..................................................................................................................................... 124
7.111. CKRCXP .................................................................................................................................... 124

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
vi of ANSYS, Inc. and its subsidiaries and affiliates.
Chemkin-Pro Application Programming Interface Manual

7.112. CKRDEX .................................................................................................................................... 125


7.113. CKREADF .................................................................................................................................. 125
7.114. CKREEX ..................................................................................................................................... 126
7.115. CKREWR .................................................................................................................................... 126
7.116. CKRHEX .................................................................................................................................... 127
7.117. CKRHOC .................................................................................................................................... 127
7.118. CKRHOX .................................................................................................................................... 127
7.119. CKRHOY .................................................................................................................................... 128
7.120. CKRP ......................................................................................................................................... 128
7.121. CKSAVE ..................................................................................................................................... 129
7.122. CKSAVEF ................................................................................................................................... 129
7.123. CKSBML .................................................................................................................................... 129
7.124. CKSBMS .................................................................................................................................... 130
7.125. CKSCAL ..................................................................................................................................... 130
7.126. CKSLEN ..................................................................................................................................... 130
7.127. CKSML ...................................................................................................................................... 131
7.128. CKSMS ...................................................................................................................................... 131
7.129. CKSNUM ................................................................................................................................... 131
7.130. CKSOR ...................................................................................................................................... 132
7.131. CKSUBS ..................................................................................................................................... 132
7.132. CKSUM ...................................................................................................................................... 133
7.133. CKSYME .................................................................................................................................... 133
7.134. CKSYMR .................................................................................................................................... 133
7.135. CKSYMS .................................................................................................................................... 134
7.136. CKTHB ...................................................................................................................................... 134
7.137. CKUBML .................................................................................................................................... 134
7.138. CKUBMS .................................................................................................................................... 135
7.139. CKUML ...................................................................................................................................... 135
7.140. CKUMS ...................................................................................................................................... 135
7.141. CKWC ....................................................................................................................................... 136
7.142. CKWL ........................................................................................................................................ 136
7.143. CKWT ........................................................................................................................................ 137
7.144. CKWXP ..................................................................................................................................... 137
7.145. CKWXR ..................................................................................................................................... 137
7.146. CKWYP ...................................................................................................................................... 138
7.147. CKWYPK .................................................................................................................................... 138
7.148. CKWYR ...................................................................................................................................... 139
7.149. CKXMAX ................................................................................................................................... 139
7.150. CKXMIN .................................................................................................................................... 139
7.151. CKXNUM ................................................................................................................................... 140
7.152. CKXTCP ..................................................................................................................................... 140
7.153. CKXTCR ..................................................................................................................................... 141
7.154. CKXTND .................................................................................................................................... 141
7.155. CKXTY ....................................................................................................................................... 141
7.156. CKYTCP ..................................................................................................................................... 142
7.157. CKYTCR ..................................................................................................................................... 142
7.158. CKYTX ...................................................................................................................................... 143
7.159. PKINDX ..................................................................................................................................... 143
8. Alphabetical Listing of the Surface Kinetics Subroutine Library ........................................................ 145
8.1. SKABE ........................................................................................................................................... 145
8.2. SKAML .......................................................................................................................................... 145
8.3. SKAMS .......................................................................................................................................... 146

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. vii
Chemkin-Pro Application Programming Interface Manual

8.4. SKATCZ ......................................................................................................................................... 146


8.5. SKATHM ........................................................................................................................................ 147
8.6. SKCAML ........................................................................................................................................ 148
8.7. SKCAMS ........................................................................................................................................ 148
8.8. SKCGML ........................................................................................................................................ 149
8.9. SKCGMS ........................................................................................................................................ 149
8.10. SKCHML ...................................................................................................................................... 150
8.11. SKCHMS ...................................................................................................................................... 150
8.12. SKCHORT .................................................................................................................................... 151
8.13. SKCHRG ...................................................................................................................................... 151
8.14. SKCOMP ..................................................................................................................................... 152
8.15. SKCONT ...................................................................................................................................... 152
8.16. SKCOV ........................................................................................................................................ 153
8.17. SKCPML ...................................................................................................................................... 153
8.18. SKCPMS ...................................................................................................................................... 153
8.19. SKCPOR ...................................................................................................................................... 154
8.20. SKCUML ...................................................................................................................................... 154
8.21. SKCUMS ...................................................................................................................................... 155
8.22. SKCZTA ....................................................................................................................................... 155
8.23. SKDEN ........................................................................................................................................ 156
8.24. SKDRDA ...................................................................................................................................... 156
8.25. SKDRDC ...................................................................................................................................... 157
8.26. SKDSDC ...................................................................................................................................... 158
8.27. SKDSDX ...................................................................................................................................... 159
8.28. SKEQ ........................................................................................................................................... 160
8.29. SKFLGS ....................................................................................................................................... 160
8.30. SKGML ........................................................................................................................................ 161
8.31. SKGMS ........................................................................................................................................ 161
8.32. SKHML ........................................................................................................................................ 162
8.33. SKHMS ........................................................................................................................................ 162
8.34. SKHORT ...................................................................................................................................... 163
8.35. SKIBHM ....................................................................................................................................... 163
8.36. SKICOV ....................................................................................................................................... 163
8.37. SKIENR ........................................................................................................................................ 164
8.38. SKILANG ..................................................................................................................................... 164
8.39. SKINDX ....................................................................................................................................... 165
8.40. SKINIT ......................................................................................................................................... 165
8.41. SKINU ......................................................................................................................................... 166
8.42. SKIORD ....................................................................................................................................... 166
8.43. SKIREV ........................................................................................................................................ 167
8.44. SKIRNU ....................................................................................................................................... 167
8.45. SKISTK ........................................................................................................................................ 168
8.46. SKIUQ ......................................................................................................................................... 168
8.47. SKIYLD ........................................................................................................................................ 169
8.48. SKKFRT ....................................................................................................................................... 169
8.49. SKKION ....................................................................................................................................... 170
8.50. SKKTFL ........................................................................................................................................ 170
8.51. SKKTMP ...................................................................................................................................... 170
8.52. SKKUW ....................................................................................................................................... 171
8.53. SKLEN ......................................................................................................................................... 171
8.54. SKLEN2 ....................................................................................................................................... 171
8.55. SKMXTP ...................................................................................................................................... 172

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
viii of ANSYS, Inc. and its subsidiaries and affiliates.
Chemkin-Pro Application Programming Interface Manual

8.56. SKNCF ......................................................................................................................................... 172


8.57. SKNCON ..................................................................................................................................... 173
8.58. SKNU .......................................................................................................................................... 173
8.59. SKNUF ........................................................................................................................................ 173
8.60. SKPCMP ...................................................................................................................................... 174
8.61. SKPKK ......................................................................................................................................... 175
8.62. SKPNDX ...................................................................................................................................... 175
8.63. SKPNT ......................................................................................................................................... 175
8.64. SKRAEX ....................................................................................................................................... 176
8.65. SKRATI ........................................................................................................................................ 176
8.66. SKRATK ....................................................................................................................................... 177
8.67. SKRAT ......................................................................................................................................... 178
8.68. SKRDEX ....................................................................................................................................... 178
8.69. SKREADF ..................................................................................................................................... 179
8.70. SKREEX ....................................................................................................................................... 179
8.71. SKREWR ...................................................................................................................................... 180
8.72. SKRHEX ....................................................................................................................................... 180
8.73. SKROP ........................................................................................................................................ 181
8.74. SKRPAR ....................................................................................................................................... 181
8.75. SKRP ........................................................................................................................................... 182
8.76. SKSAVE ....................................................................................................................................... 182
8.77. SKSAVEF ..................................................................................................................................... 182
8.78. SKSDEN ...................................................................................................................................... 183
8.79. SKSML ........................................................................................................................................ 183
8.80. SKSMS ........................................................................................................................................ 183
8.81. SKSNUM ..................................................................................................................................... 184
8.82. SKSOR ......................................................................................................................................... 185
8.83. SKSYME ...................................................................................................................................... 185
8.84. SKSYMM ..................................................................................................................................... 186
8.85. SKSYMP ...................................................................................................................................... 186
8.86. SKSYMR ...................................................................................................................................... 186
8.87. SKSYMS ...................................................................................................................................... 187
8.88. SKUML ........................................................................................................................................ 187
8.89. SKUMS ........................................................................................................................................ 187
8.90. SKWT .......................................................................................................................................... 188
9. Alphabetical Listing of the Transport Subroutine Library .................................................................. 189
9.1. MCACON ...................................................................................................................................... 189
9.2. MCADIF ........................................................................................................................................ 189
9.3. MCATDR ....................................................................................................................................... 190
9.4. MCAVIS ......................................................................................................................................... 190
9.5. MCCCEX ....................................................................................................................................... 190
9.6. MCCDEX ....................................................................................................................................... 191
9.7. MCCVEX ....................................................................................................................................... 191
9.8. MCINIT ......................................................................................................................................... 192
9.9. MCLEN ......................................................................................................................................... 192
9.10. MCMCDT .................................................................................................................................... 193
9.11. MCMDIF ...................................................................................................................................... 193
9.12. MCPNT ....................................................................................................................................... 194
9.13. MCPRAM .................................................................................................................................... 194
9.14. MCREWR ..................................................................................................................................... 195
9.15. MCSAVE ...................................................................................................................................... 195
9.16. MCSCON ..................................................................................................................................... 195

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. ix
Chemkin-Pro Application Programming Interface Manual

9.17. MCSDIF ....................................................................................................................................... 195


9.18. MCSVIS ....................................................................................................................................... 196

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
x of ANSYS, Inc. and its subsidiaries and affiliates.
List of Figures
1.1. Schematic representing the relationship of Gas-phase Kinetics and the Application. ................................ 5
1.2. FORTRAN representation of an energy equation ...................................................................................... 7
1.3. Relationships between the CHEMKIN Pre-processors and an Application ................................................ 10
1.4. Illustration of Gas-Phase Silane Reaction ................................................................................................ 12

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. xi
Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
xii of ANSYS, Inc. and its subsidiaries and affiliates.
List of Tables
1.1. Compiler Requirements .......................................................................................................................... 2
2.1. Keyword and FORTRAN Code Relationships ........................................................................................... 17
4.1. Initialization Subroutines ...................................................................................................................... 48
4.2. Information about Elements Subroutines .............................................................................................. 49
4.3. Information about Species Subroutines ................................................................................................. 49
4.4. Information about Reactions Subroutines ............................................................................................. 50
4.5. Gas Constant and Units Subroutines ...................................................................................................... 52
4.6. Equations of State and Mole-Mass Conversions Subroutines .................................................................. 52
4.7.Thermodynamic Properties (Nondimensional) Subroutines .................................................................... 54
4.8.Thermodynamic Properties (Mass Units) Subroutines ............................................................................. 54
4.9. Thermodynamic Properties (Molar Units) Subroutines ........................................................................... 55
4.10. Mean Thermodynamic Properties (Mass Units) Subroutines ................................................................. 56
4.11. Mean Thermodynamic Properties (Molar Units) Subroutines ................................................................ 56
4.12. Chemical Production Rates Subroutines .............................................................................................. 57
4.13. Equilibrium Constants and Rate of Progress Variables Subroutines ....................................................... 60
4.14. Utility Subroutines .............................................................................................................................. 61
5.1. Initialization Subroutines ...................................................................................................................... 65
5.2. Information about Elements Subroutines .............................................................................................. 66
5.3. Information about Species Subroutines ................................................................................................. 66
5.4. Information about Phases and Materials Subroutines ............................................................................. 67
5.5. Information about Surface Reactions Subroutines ................................................................................. 67
5.6. Gas Constants and Units Subroutines .................................................................................................... 70
5.7. Thermodynamic Properties (Non dimensional) Subroutines ................................................................... 70
5.8.Thermodynamic Properties (Mass Units) Subroutines ............................................................................. 70
5.9. Thermodynamic Properties (Molar Units) Subroutines ........................................................................... 71
5.10. Chemical Production Rates Subroutines .............................................................................................. 71
5.11. Equilibrium Constants and Rate-of-Progress Variables Subroutines ....................................................... 72
5.12. Utility Subroutines .............................................................................................................................. 72
6.1. Initialization and Parameter Subroutines ............................................................................................... 75
6.2. Viscosity Subroutines ............................................................................................................................ 76
6.3. Conductivity Subroutines ...................................................................................................................... 77
6.4. Diffusion Coefficients Subroutines ......................................................................................................... 77
6.5. Thermal Diffusion Subroutines .............................................................................................................. 78

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. xiii
Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
xiv of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 1: Introduction
Advanced users of ANSYS Chemkin-Pro may want to write their own custom Chemkin-Pro program, or
they may want to modify or supplement the functionality of existing Chemkin-Pro application programs.
This manual provides guidance for both options. The API manual contains detailed programming-interface
information for accessing Chemkin-Pro’s subroutine libraries for gas-phase kinetics, surface-kinetics,
thermodynamic-property, and transport-property utilities. Explicit instructions are also given for modi-
fying user-routine templates to customize existing Chemkin-Pro reactor-model programs. The Chemkin-
Pro subroutine libraries may be accessed either from user-modified subroutines called by Chemkin-Pro
pre-packaged Reactor Models, or from entirely user-written application programs. User application
programs may be written in C, C++, or FORTRAN computer languages.

Note:

In each chapter where the definition and argument list of each routine is described, the
FORTRAN interface is shown with the additional subroutine or function appendix or additional
arguments required by the C++ interface enclosed in { }. For example:
SUBROUTINE CKCOMP{_C} ({N,NARRAY, } IST, IRAY, II, I)

has FORTRAN interface and C++ interface


SUBROUTINE CKCOMP (IST, IRAY, II, I) SUBROUTINE CKCOMP_C (N,NARRAY, IST, IRAY, II,
I)

All ANSYS Chemkin-Pro user subroutines are currently in FORTRAN. For all Chemkin-Pro/API programmers,
access to a supported FORTRAN compiler and basic knowledge of FORTRAN linking procedures are re-
quired. For C/C++ programmers, access to a supported C or C++ compiler is also required. Details of
these requirements are discussed in each chapter of this manual.

The remainder of Introduction (p. 1) contains an overview of the structure of a typical ANSYS Chemkin-
Pro-based program and the interactions between different utility components in a Chemkin-Pro applic-
ation program. User Supplemental Programming (p. 15) provides detailed instructions for modifying
user-routines or driver programs that alter or supplement the behavior of Chemkin-Pro Reactor Models.
Writing User Applications (p. 21) provides instructions on how to write an application program from
scratch, which uses calls to the various Chemkin-Pro subroutine libraries, including several complete
example programs. Quick Reference Guide to the Gas-phase Kinetics Subroutine Library (p. 47) , Quick
Reference Guide to the Surface Kinetics Subroutine Library (p. 65) , and Quick Reference Guide to the
Transport Subroutine Library (p. 75) contain quick-reference lists of the available subroutines in the
three subroutine libraries for gas-phase kinetics, surface kinetics, and transport-properties. Finally, Al-
phabetical Listing of the Gas-phase Kinetics Subroutine Library (p. 79) , Alphabetical Listing of the Surface
Kinetics Subroutine Library (p. 145) , and Alphabetical Listing of the Transport Subroutine Library (p. 189)
contain alphabetical listings and more detailed descriptions of call lists for all of the subroutines in the
three subroutine libraries.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 1
Introduction

1.1. Compiler Compatibility


There are many versions of FORTRAN and C or C++ compilers available for each computer platform,
especially for Linux. These compilers and linkers have many compile, optimization, and linking options.
There are also differences in the runtime library functions associated with different versions of FORTRAN
and C/C++ packages. Here, we document which versions of FORTRAN and C/C++ are known to work
with our libraries. In the ANSYS Chemkin-Pro installations, we provide sample code and a make-file
system. These files demonstrate the compilation and linking of user-written programs and routines that
involve calls to the Chemkin-Pro libraries. The compile and link flags and system libraries used in the
make files have been verified with the supported compilers and corresponding platforms, as indicated
at our website.

Due to these language, library, and system complexities, we cannot guarantee that every module written
in any version of FORTRAN or C/C++ will be linkable with our libraries. We especially caution that FOR-
TRAN-90/95 modules using those language extensions may require system libraries that are not com-
patible with the ANSYS Chemkin-Pro libraries. Since the combination of operating system, compilers,
and third-party packages is often unique to your computing environment, our ability to assist you in
troubleshooting these combinations will be limited.

1.1.1. Intel Composer XE 2017 Compiler Summary


This section lists the compile-specifics required by the API for ANSYS Chemkin-Pro releases built using
the Intel Composer XE 2017 tool set. For more information on ANSYS requirements for various plat-
forms, see the ANSYS Platform Support page at http://www.ansys.com/Solutions/Solutions-by-Role/
IT-Professionals/Platform-Support.

Table 1.1: Compiler Requirements

FORTRAN Compiler C/C++ Compiler


Linux Intel C++ Composer XE 2017 Update 4

Intel FORTRAN Composer XE 2017


Update 4

GCC 6.3.0
Windows 64-bit Intel C++ Composer XE 2017 Update 4

Intel FORTRAN Composer XE 2017 Visual Studio Professional 2015.


Update 4
Note:

It may be possible to use other versions of


Visual Studio such as Express, but we do not
support them. If you wish to use other
versions, please contact Intel for advice.

1.1.1.1. Compiler Installation


Follow the instructions from Intel on how to install the compiler for the Windows and Linux platforms.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
2 of ANSYS, Inc. and its subsidiaries and affiliates.
Overview of Utilities Packages

1.1.1.2. Setting Up Your Compiler Environment


For Linux systems:

See the Intel documentation for information on how to set up your environment for Linux.

For 64 bit Windows:

Use the Intel 64 Visual Studio 2015 mode shortcut on your Start > All Programs menu or use
the command:
call "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.4.210\windows\bin\ipsxe-comp-vars.bat"
intel64 vs2015

1.1.1.3. Testing Your Program


To test the success of your installation, follow these steps:

1. Open the very small test program to compile and link, named helloTest_Intel_Composer.zip.
It is located in the utilities folder of the Chemkin-Pro installation.

2. Copy this .zip file to a Windows system and extract it to create a helloTest sub-directory.

3. For the Linux platform, copy the helloTest sub-directory to your Linux system.

4. Set up your compiler environment as described in Setting Up Your Compiler Environment (p. 3).

5. Follow the directions in the readme.txt file to use the make utility to compile and link the test
programs. The test programs should compile and run as described in the readme.txt file.

1.2. Prerequisite Skills


We presume that a user is familiar with the rudiments of setting environment and path variables; the
basic ANSYS Chemkin-Pro requirements in that regard are adequately provided by the README files,
with further extensive information and tutorial sessions in Chemkin-Pro Getting Started Guide . It is
further presumed that a user-programmer is familiar with the fundamentals of using the compiler, linker,
and make processes of the platform. The Chemkin-Pro Application Programming Interface documentation
is not designed to provide detailed information on those processes, only on how to use them with
Chemkin-Pro programs and libraries.

You may want to review a GNU make guide, http://www.gnu.org/software/make/manual/make.html,


particularly the Introduction, or the GNU g77 guide, http://gcc.gnu.org/onlinedocs/gcc-3.4.6/g77/

1.3. Overview of Utilities Packages


CHEMKIN is highly structured and modular, consisting of three basic utilities packages: Gas Kinetics,
Surface Kinetics, and Transport. Gas Kinetics forms the core set of utilities, upon which the other two
depend. Use of these utilities requires the manipulation of a number of programs, subroutines, and
data files. This section describes the structure of the Gas-phase Kinetics package and the basic require-
ments for using it from within your own application programs. Structure and Use of the Surface Kinetics
Utilities (p. 9) provides similar information for the Surface Kinetics utilities, while Structure and Use of
the Transport Utilities (p. 13) provides an overview of the Transport utilities.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 3
Introduction

1.4. Structure and Use of Gas-phase Kinetics Utilities


The Gas-phase Kinetics utilities are composed of the following:

• Gas-phase Kinetics Pre-processor (a program)

• Gas-phase Kinetics Subroutine Library (a set of FORTRAN subroutines)

The Gas-phase Kinetics Pre-processor is included as part of the Pre-processor utility accessed from the
ANSYS Chemkin-Pro interface and described in Chemkin-Pro Getting Started Guide . However, the Gas-
phase Kinetics Pre-processor can also be run independently, through the command-line, as described
in Chemkin-Pro Getting Started Guide . In either case, the Pre-processor must be run in order to produce
a gas-phase Linking File, which contains all of the chemistry-specific information for the gas-
phase−kinetics portion of the particular Chemistry Set identified for the problem. This Linking File must
be available to any Chemkin-Pro application program that makes calls to the Gas-phase Kinetics Sub-
routine Library. The Pre-processor program must therefore be run prior to running a Chemkin-Pro ap-
plication program or Reactor Model.

The general structure of the Gas-phase Kinetics utilities and the relationship between the utilities and
an ANSYS Chemkin-Pro application program are shown in Figure 1.1: Schematic representing the rela-
tionship of Gas-phase Kinetics and the Application. (p. 5) . The Gas-phase Kinetics Pre-processor is a
program that reads a symbolic description of a gas-phase reaction mechanism and then extracts the
needed thermodynamic data for each species involved in that mechanism from a Thermodynamic
Database file. The primary output from the Pre-processor is the Gas-phase Kinetics Linking File. This file
contains information that contains all required information about the elements, species, and reactions
in the user's mechanism. However, users should not attempt to read this file directly, as the structure
changes from version to version of Chemkin-Pro utilities. Instead, calls to initialization routines within
the Gas-phase Kinetics Library facilitate extraction of the data stored.

Note:

If any errors occur during pre-processing, the error state will be reflected in the Linking File
and when called, the CKINIT will print a diagnostic message and execution will stop.

The Linking File is read by an initialization subroutine, CKINIT. The purpose of the initialization is to
populate three data arrays (one integer, one floating point, and one character data type) in stored
memory within your program. These arrays are then passed into other subroutines in the Gas-phase
Kinetics Subroutine Library, for internal use within the subroutines. These arrays should not be modified
within your program once they have been initialized. Before the initialization routine is called, your
application program must first allocate the memory for the three arrays. A call into the subroutine library
can be made to retrieve the needed dimensions for this purpose. The Gas-phase Kinetics subroutine to
perform derived calculations or extract chemistry-specific information during the simulation.

Note:

Although the Linking File is a formatted file (e.g., chem.asc), user programs should not attempt
to read this file directly; instead, always use the ANSYS Chemkin-Pro initialization routine
CKINIT to extract information from it. The format of the file will change from version to
version, but the subroutine library calling lists are static.

If you are writing your own application that describes a particular set of governing equations, the pro-
gramming required is highly leveraged by the ANSYS Chemkin-Pro subroutine libraries. For example,

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
4 of ANSYS, Inc. and its subsidiaries and affiliates.
Structure and Use of Gas-phase Kinetics Utilities

through a simple call to Gas-phase Kinetics subroutines the program can obtain chemistry-specific terms
in the governing equations that relate to equations of state, chemical production, and thermodynamics.
You can then focus on the form of the equations and the solver methodology, letting Chemkin-Pro
subroutines handle all of the chemistry-specific part of the problem definition.

The Gas-phase Kinetics Subroutine Library has over 150 subroutines that return information on elements,
species, reactions, equations of state, thermodynamic properties, and chemical production rates. Gen-
erally, the input to these routines will be the state of the gas—pressure or density, temperature(s), and
species composition.

Figure 1.1: Schematic representing the relationship of Gas-phase Kinetics and the Application.

1.4.1. Example: Hydrogen Oxidation


The input file to the Gas-phase Kinetics Pre-processor for a hydrogen-oxidation process is shown in
Example 1.1: Sample Reaction Mechanism as Read by the Gas-phase Kinetics Pre-processor (p. 6) .

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 5
Introduction

First, the file specifies the elements and species that appear in the mechanism, and then includes the
reaction mechanism description. The input is essentially format free. The elements and species names
need only be separated by blank spaces, but may also be separated by tabs or blank lines. In the
REACTIONS section, the character string that describes the reaction appears on the left and is followed
by the three Arrhenius coefficients (pre-exponential factor, temperature exponent, and activation
energy). Enhanced third body efficiencies for selected species are specified in the line following that
for several reactions that contain an arbitrary third body, M. Exclamation marks signify the beginning
of comments and the remainder of the line is ignored.

Example 1.1: Sample Reaction Mechanism as Read by the Gas-phase Kinetics Pre-processor
ELEMENTS H O N END
SPECIES H2 H O2 O OH HO2 H2O2 H2O N N2 NO END
REACTIONS
H2+O2=2OH 0.170E+14 0.00 47780
OH+H2=H20+H 0.117E+10 1.30 3626 !D-L&W
O+OH=O2+H 0.400E+15 -0.50 0 !JAM 1986
O+H2=OH+H 0.506E+05 2.67 6290 !KLEMM ET AL., 1986
H+O2+M=HO2+M 0.361E+18 -0.72 0 !DIXON-LEWIS
H2O/18.6/ H2/2.86/ N2/1.26/
OH+HO2=H2O+O2 0.750E+13 0.00 0 !D-L
H+HO2=2OH 0.140E+15 0.00 1073 !D-L
O+HO2=O2+OH 0.140E+14 0.00 1073 !D-L
2OH=O+H2O 0.600E+09 1.30 0 !COHEN-WEST
H+H+M=H2+M 0.100E+19 -1.00 0 !D-L
H2O/0.0/ H2/0.0/
H+H+H2=H2+H2 0.920E+17 -0.60 0
H+H+H2O=H2+H2O 0.600E+20 -1.25 0
H+OH+M=H2O+M 0.160E+23 -2.00 0 !D-L
H2O/5/
H+O+M=OH+M 0.620E+17 -0.60 0 !D-L
H2O/5/
O+O+M=O2+M 0.189E+14 0.00 -1788 !NBS
H+HO2=H2+O2 0.125E+14 0.00 0 !D-L
HO2+HO2=H2O2+O2 0.200E+13 0.00 0
H2O2+M=OH+OH+M 0.130E+18 0.00 45500
H2O2+H=HO2+H2 0.160E+13 0.00 3800
H2O2+OH=H2O+HO2 0.100E+14 0.00 1800
O+N2=NO+N 0.140E+15 0.00 75800
N+O2=NO+O 0.640E+10 1.00 6280
OH+N=NO+H 0.400E+14 0.00 0
END

Assume the governing equation we wish to study is the energy conservation equation for a constant-
pressure environment:

(1.1)

where is the temperature, the mass density, the mean specific heat, the molar species
enthalpies, and the species molar production rates. The representation of this equation begins
with Gas-phase Kinetics subroutine calls (the output variables are underlined to help distinguish them):

Example 1.2: Gas-phase Kinetics subroutine call


CALL CKINIT(LENIWK, LENRWK, LENCWK, LINKCK, LOUT, ICKWRK, RCKWRK, CCKWRK, IFLAG)
CALL CKINDX(ICKWRK, RCKWRK, MM, KK, II, NFIT)
CALL CKRHOY(P, T, Y, ICKWRK, RCKWRK, RHO)
CALL CKCPBS(T, Y, ICKWRK, RCKWRK, CPB)
CALL CKHML (T, ICKWRK, RCKWRK, HML)
CALL CKWYP (P, T, Y, ICKWRK, RCKWRK, WDOT)

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
6 of ANSYS, Inc. and its subsidiaries and affiliates.
Structure and Use of Gas-phase Kinetics Utilities

The complete details for these calls are explained in later sections of this manual; the objective here
is to illustrate the relative simplicity of writing an ANSYS Chemkin-Pro application. Briefly, the first
call is to the initialization subroutine CKINIT, which reads the Linking File created by the Pre-processor
and fills the three work arrays. LENIWK, LENRWK and LENCWK are dimensions provided by the user
for the data arrays ICKWRK, RCKWRK, and CCKWRK. IFLAG is an error flag that is returned with a
zero value if no errors occur. LINKCK is the logical file unit number of the Linking File, chem.asc, and
LOUT is the logical file number for printed diagnostic and error messages. The call to CKINDX provides
index information about the reaction mechanism: MM is the number of elements contained in the
species, KK is the number of gas-phase species, II is the number of reactions, and NFIT is the
number of coefficients in the thermodynamic fits. In the remaining calls, P, T, and Y are the pressure,
temperature, and vector of species mass fractions, respectively. The output variables correspond to
the various terms for describing the equation, i.e., , , , and .

The FORTRAN representation of the governing equation, given by combining the results of the above
subroutine calls, is simply

Figure 1.2: FORTRAN representation of an energy equation


SUM=0.0
DO 100 K=1,KK
SUM = SUM + HML(K)*WDOT(K)
100 CONTINUE
DTDT = -SUM/(RHO*CPB)

One can see from this example that relatively little programming effort is required to form a conser-
vation equation for an arbitrary reaction mechanism.

1.4.2. Example for a Multi-Temperature Plasma


The application of Gas-phase Kinetics to non-equilibrium plasma systems requires that the kinetics
coefficients can be specified independently of the problem or application. For example, some assump-
tion must be made a priori about the electron-energy distribution function (EEDF) when specifying
electron-impact kinetics. In reality the EEDF will depend on the reactor conditions, such as the local
electric field magnitude or the degree of dissociation of a molecular gas. These conditions are problem-
dependent, such that including these effects requires coupling between the kinetics-rate determination
and the EEDF determination. While we foresee a need in future Gas-phase Kinetics development for
treatment of fundamental reaction cross-section data, there are many systems where application of
problem-independent kinetics in plasma modeling is reasonable. Such applications include plasma
conditions where the EEDF is nearly Maxwellian, such as near-thermal atmospheric-pressure plasma
jets, or very low-pressure, high-electron-density systems for microelectronics processing.

The input file to the Gas-phase Kinetics Pre-processor for a chlorine-plasma excitation process is shown
in Example 1.3: Sample Plasma Reaction Mechanism as Read by the Gas-phase Kinetics Pre-pro-
cessor (p. 8) . As with the previous hydrogen-oxidation example, the file first specifies the elements
and species that appear in the mechanism and then describes the reaction mechanism. Here, electrons
must be specified both as an element and as a species. The elemental composition of a unipositive
ion is that of the corresponding neutral minus one electron. This information is given in the species
thermodynamic data and will be described further in the next section. As in the thermal system, three
Arrhenius coefficients are used by default to describe reaction rates for electron-impact kinetics. The
auxiliary keyword ‘TDEP ’ on a line following the reaction statement indicates that the reaction rate
is a function of the temperature of the species specified in the slashes following the TDEP keyword.

As shown in Example 1.3: Sample Plasma Reaction Mechanism as Read by the Gas-phase Kinetics Pre-
processor (p. 8) , most of the plasma reactions require some auxiliary information beyond the

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 7
Introduction

Arrhenius coefficients to distinguish the reaction description from the default thermal reactions. TDEP
is one example of an auxiliary keyword that specifies the temperature dependence of the reaction.
EXCI is used typically to indicate an excitation reaction. Such “reactions” are often included to allow
calculation of inelastic energy loss rates for electrons, without requiring the user to include all excited
states as new species in the reaction mechanism. The auxiliary information following the keyword
EXCI represents the energy-loss per collision in electron volts. The keyword DUP is included to allow
multiple occurrences of reaction statements that have different rate coefficients or different auxiliary
information, but otherwise appear identical. This is frequently necessary in the specification of multiple
excitation reactions from the same ground-state species. The use of auxiliary keywords is described
in greater detail in the Chemkin-Pro Input Manual Input Manual.

Another important aspect of the plasma reactions shown in Example 1.3: Sample Plasma Reaction
Mechanism as Read by the Gas-phase Kinetics Pre-processor (p. 8) is that they are all specified as ir-
reversible reactions. This is in contrast to thermal reactions, which are usually reversible and reverse
rates can be calculated directly from species thermodynamic properties. In the case of electron kinetics,
the interactions between electrons and neutral species can be intrinsically irreversible. While detailed
balancing may be appropriate for near-thermal plasmas, the use of ANSYS Chemkin-Pro thermody-
namics is not appropriate for determining reverse rates. In such cases, the user should explicitly supply
reverse kinetic parameters, or specify a reverse path as an additional irreversible reaction.

Example 1.3: Sample Plasma Reaction Mechanism as Read by the Gas-phase Kinetics Pre-processor
ELEMENTS E CL END
SPECIES E CL+ CL2+ CL- CL* CL CL2 END
REACTIONS KELVIN MOLECULES
! reaction rates from Maxwellian EEDF
E + CL2 => E + CL2 2.5141E-02 -1.4443E+00 1.6650E+04
TDEP/E/ !vibrational excitation
EXCI/ 0.07/
DUP
E + CL2 => CL- + CL 5.8901E-09 -2.5619E-01 1.5834E+04
TDEP/E/ !dissociative attachment
E + CL2 => 2CL + E 1.5356E-06 -3.4642E-01 7.0850E+04
TDEP/E/ !dissociation
E + CL2 => E + CL2 6.3477E-06 -5.3987E-01 1.3920E+05
TDEP/E/ !electronic excitation
EXCI/ 9.25/
DUP
E + CL2 => CL2+ + 2E 1.1227E-04 -6.0067E-01 1.8070E+05
TDEP/E/ !ionization
E + CL- => CL + 2E 3.1197E-06 -2.8757E-01 7.2058E+04
TDEP/E/ !detachment
E + CL => E + CL* 1.2363E-05 -6.1356E-01 1.3297E+05
TDEP/E/ !4s excitation
E + CL => E + CL 1.2363E-05 -6.1356E-01 1.3297E+05
TDEP/E/ !4s excitation energy loss
EXCI/ 9.55/
DUP
E + CL => E + CL 9.4444E-05 -7.3093E-01 1.5413E+05
TDEP/E/ !3d excitation
EXCI/11.65/
DUP
E + CL => CL+ + 2E 2.3736E-04 -7.0894E-01 1.8374E+05
TDEP/E/ !ionization
E + CL* => CL+ + 2E 2.6471E-05 -4.3906E-01 6.3670E+04
TDEP/E/ !Cl* ionization
CL- + CL2+ => CL + CL2 5.00E-08 0.0 0
CL- + CL+ => 2CL 5.00E-08 0.0 0
END

Consider a simple form of the electron conservation equation for a closed system:

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
8 of ANSYS, Inc. and its subsidiaries and affiliates.
Structure and Use of the Surface Kinetics Utilities

(1.2)

where is the electron molar concentration and the electron molar production rate. The rep-
resentation of this equation begins with Gas-phase Kinetics subroutine calls:

Example 1.4: Gas-phase Kinetics Subroutine


CALL CKINIT(LENIWK, LENRWK, LENCWK, LINKCK, LOUT, ICKWRK, RCKWRK, CCKWRK, IFLAG)
CALL CKINDX(ICKWRK, RCKWRK, MM, KK, II, NFIT)
CALL PKINDX(ICKWRK, KEL, KKION)
CALL CKKTFL(ICKWRK, KTFL)
CALL CKWC(T, C, ICKWRK, RCKWRK, WDOT)

As in the hydrogen-oxidation example, the first call is to the initialization subroutine CKINIT. CKINDX
provides general chemistry indices, while PKINDX provides plasma-specific index information. In this
case, we call PKINDX to get KEL, the location in the species array of the electron. In other words,
there is no requirement for the species ‘E ’ to be in any particular order in the mechanism species
list. KKION is the number of positive and negative ions in the chemistry mechanism. The call to CK
KTFL initializes the species temperature flag array in the Gas-phase Kinetics workspace. Without this
call, it is assumed that all species share a common temperature, which is always the first entry in the
temperature array passed to Gas-phase Kinetics in all subsequent calls. KTFL is a user-defined vector
that defines the locations in the temperature array that correspond to each species temperature. This
allows the application to define a different number of temperatures in the system than the total
number of species. For example, in a two-temperature plasma, where T(1) is the gas temperature
and T(2) is the electron temperature, the user sets KTFL(KEL) = 2, and all other entries are set
to ‘1 ’. Finally, in the call to CKWC, T is the temperature array, and C is the vector of species molar
concentrations. The output variable, WDOT, is the vector, where is the KEL th entry.

Note:

This API does not support user-written programs or subroutines. Developing user programs
should therefore be considered only by advanced users with appropriate programming
skills.

1.5. Structure and Use of the Surface Kinetics Utilities


Using the Surface Kinetics utilities is analogous to using the Gas-phase Kinetics utilities, and the Surface
Kinetics Pre-processor can only be used after the Gas-phase Kinetics Pre-processor has been executed.
The flow of information from the Gas-phase Kinetics Pre-processor to the Application program is shown
in Figure 1.3: Relationships between the CHEMKIN Pre-processors and an Application (p. 10) . A third
set of utilities, which handles gas-phase molecular transport, may or may not be needed in a particular
Application. The Transport utilities are described in Structure and Use of the Transport Utilities (p. 13)
.

The Gas-phase Kinetics Pre-processor introduces the chemical elements that are used in the entire
Chemistry Set, whether they are in the gas-phase reaction mechanism or the surface reaction mechanism.
Gas-phase species (which can appear in surface reactions) are also introduced with the Gas-phase Kinetics
Pre-processor. Thus, if a gas-phase species appears in surface reactions, they must be included in the
input to the Gas-phase Kinetics Pre-processor, even if there are no gas-phase reactions.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 9
Introduction

Figure 1.3: Relationships between the CHEMKIN Pre-processors and an Application

Like Gas-phase Kinetics, the Surface Kinetics package is composed of two software components:

• Surface Kinetics Pre-processor

• Surface Kinetics Subroutine Library

As with the Gas-phase Kinetics subroutine library, your own routines or application programs can call
Surface Kinetics subroutines that define the terms in the equations relating to equation of state, chem-
ical production rates, and thermodynamics, and then combine the results to define the problem. The
Surface Kinetics subroutines provide information specifically for surface chemistry on a particular surface
material.

The Surface Kinetics Pre-processor first reads the symbolic description of the surface reaction mechanism
and then extracts from a Thermodynamic Database the appropriate thermodynamic information for

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
10 of ANSYS, Inc. and its subsidiaries and affiliates.
Structure and Use of the Surface Kinetics Utilities

the species involved in the surface reaction mechanism. Gas-phase Kinetics and Surface Kinetics can share
a common database for this purpose. The output of the Surface Kinetics Pre-processor is the Surface
Kinetics Linking File, which contains all the pertinent information on the elements, species, and reactions
in the surface reaction mechanism. Information on gas-phase species is brought in from the Gas-phase
Kinetics Linking File, and thus is duplicated in the two linking files for efficiency in subsequent data
processing.

The Surface Kinetics Linking File is read by an initialization routine in the Surface Kinetics Subroutine
Library (SKINIT) that is called from the ANSYS Chemkin-Pro application program. The purpose of the
initialization is to populate three data arrays (one integer, one floating point, and one character data
type), which must be allocated by your program, that are then passed into and used internally by the
other subroutines in the Surface Kinetics Subroutine Library.

The Surface Kinetics Subroutine Library has approximately seventy (70) subroutines that return information
on elements, species, reactions, thermodynamic properties, and chemical production rates. Generally,
the input to these routines will be the state of the gas and the surface—pressure, temperature, and
species composition. The species composition is specified in terms of gas-phase mole fractions, surface
site fractions, and bulk-phase activities; surface site densities are also input to complete the specification
of the state of the surface.

1.5.1. Example of Using the Surface Kinetics Pre-processor


We illustrate the use of Surface Kinetics by a simple example involving deposition of silicon. The surface
reaction mechanism is shown in Example 1.5: Sample Reaction Mechanism as Read by the Surface
Kinetics Pre-processor (p. 11) as it appears for the input file to the Surface Kinetics Pre-processor. The
first two lines identify a site type called SILICON that has a site density of 1.66 × 10-9 mole/cm2.
Only one species, SI(S), exists on this site type. The bulk material is identified as SI(B), and it has a
mass bulk density of 2.33 g/cm3. This is a very simple example that has only one site type occupied
by only one species and only one pure bulk material. In general, however, an input file could specify
many different site types, each of which could be occupied by a variety of species. Furthermore, there
could be several bulk-phase mixtures that could each be composed of several species. Examples of
all these possibilities appear in the Chemkin-Pro Input Manual Input Manual.

The reaction mechanism itself is listed next. The symbol => in each reaction expression indicates that
all of the reactions are irreversible. The three numbers following each reaction expression are its
Arrhenius rate parameters ( pre-exponential factor, temperature exponent, and activation energy).

Example 1.5: Sample Reaction Mechanism as Read by the Surface Kinetics Pre-processor
SITE/SILICON/ SDEN/1.66E-09/
SI(S)
BULK SI(B) /2.33/

REACTIONS

SIH4 + SI(S) =>SI(S) + SI(B) + 2H2 1.05E17 0.5 40000


SI2H6 +2SI(S) =>2SI(S) + 2SI(B) + 3H2 4.55E26 0.5 40000
SIH2 + SI(S) =>SI(S) + SI(B) + H2 3.9933E11 0.5 0
SI2H2 +2SI(S) => 2SI(S) + 2SI(B) + H2 1.7299E20 0.5 0
2SI2H3 +4SI(S) => 4SI(S) + 4SI(B) + 3H2 6.2219E37 0.5 0
H2SISIH2 +2SI(S) => 2SI(S) + 2SI(B) + 2H2 1.7007E20 0.5 0
2SI2H5 +4SI(S)=> 4SI(S) + 4SI(B) + 5H2 6.1186E37 0.5 0
2SIH3 +2SI(S) => 2SI(S) + 2SI(B) + 3H2 2.3659E20 0.5 0
2SIH +2SI(S) => 2SI(S) + 2SI(B) + H2 2.4465E20 0.5 0
SI + SI(S) => SI(S) + SI(B) 4.1341E11 0.5 0
H3SISIH +2SI(S) => 2SI(S) + 2SI(B) + 2H2 1.7007E20 0.5 0
SI2 +2SI(S) => 2SI(S) + 2SI(B) 1.7607E20 0.5 0

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 11
Introduction

SI3 +3SI(S) => 3SI(S) + 3SI(B) 8.6586E28 0.5 0


END

All of the reactions in this mechanism have the same form: a gas-phase species reacting on a silicon
site. The reaction of silane at the surface is illustrated in Figure 1.4: Illustration of Gas-Phase Silane
Reaction (p. 12) . Each silicon-containing gas-phase species can react on an atomic surface site, SI(S),
to deposit a silicon atom as SI(B) and release hydrogen back into the gas phase. We have included
SI(S) as both a reactant and a product to indicate that a “site” must be available at which the gas-
phase species can react. In the example, however, the surface silicon SI(S) is distinguished from the
bulk deposit SI(B) by virtue of its position as the top-most atom at the surface. Therefore, each time
a SI(S) is consumed by a reaction the bulk layer becomes one atom thicker and the silicon atom that
just left the gas now forms the top-most surface layer, i.e., SI(S). For this mechanism, the SI(S) could
have been just as well left out of the mechanism entirely. However, if other gas-phase species had
been present (say phosphine carrying phosphorus as a dopant), these species could compete for the
available silicon sites on the surface. Thus, by writing the reactions as we have, we have left open
the possibility for other species to occupy surface sites and thus inhibit the deposition of silicon.

Figure 1.4: Illustration of Gas-Phase Silane Reaction

As an example of the full use of Surface Kinetics, assume that the program we are writing needs to
evaluate a boundary condition concerning the energy balance at a surface of an isothermal particle.

The energy balance would take the following form (with the surface normal pointing into the
particle):

(1.3)

The dependent variables in this expression are the temperature , gas-phase mass fractions and
convective velocity . The surface site fractions and the bulk-species activities are also dependent
variables, but do not appear explicitly in the expression. The first term in this equation describes
thermal conduction to the surface from the gas phase. The thermal conductivity would be evaluated
by a call to the Transport Subroutine Library, and the temperature gradient could be evaluated by
finite differences. The second term concerns the diffusive and convective flux of energy by gas-phase
species at the surface. The mass density and the gas-phase enthalpies would be evaluated by

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
12 of ANSYS, Inc. and its subsidiaries and affiliates.
Structure and Use of the Transport Utilities

calls to the Gas-phase Kinetics Subroutine Library. The gas-phase species diffusion velocities would
be evaluated in terms of diffusion coefficients that are obtained from the Transport Package and finite
difference approximations to the species gradients. The first term on the right-hand side concerns
the thermal radiation to or from the surface.

We now concentrate on the final term, which concerns the energy generated or consumed from
surface reaction. The summation is over all surface and bulk species, and the factors in the summation
are the production rate of surface and bulk species by surface reaction, , the species molecular
weights, , and the enthalpies of the surface and bulk species, . The FORTRAN representation of
this term begins with Surface Kinetics Subroutine Library subroutine calls (the output variables are
underlined to help distinguish them):

Example 1.6: Example calls to the Surface Kinetics Subroutine Library


CALL SKINIT(LSIWK, LSRWK, LSCWK, LINKSK, LOUT, ISKWRK, RSKWRK, CSKWRK, IFLAG)
CALL SKWT(ISKWRK, RSKWRK, WT)
CALL SKHMS(T, ISKWRK, RSKWRK, HMS)
CALL SKRAT(P, T, ACT, SDEN, ISKWRK, RSKWRK, SDOT, SITDOT)

The complete details for these calls are explained in later chapters of this manual; the objective here
is to illustrate the relative simplicity of writing an ANSYS Chemkin-Pro program. Briefly, the first call
is to the initialization subroutine SKINIT, which reads the Surface Kinetics Linking File created by
the Surface Kinetics Pre-processor and populates the three work arrays. LSIWK, LSRWK, and LSCWK
are the dimensions provided by the user for the data arrays ISKWRK, RSKWRK, and CSKWRK. LINKSK
is the logical file number of the Surface Kinetics Linking File, LOUT is the logical file number for printed
diagnostic and error messages, and IFLAG is an integer error flag. In the remaining calls, P and T
are the pressure and temperature. The array ACT contains the gas-phase mole fractions, the surface
site fractions, and the bulk species activities, in that order. The output variable arrays, HMS and SDOT,
correspond to the factors in the summation from Equation 1.3 (p. 12) , i.e., HMS = , and SDOT = .

The FORTRAN representation of the summation in the last term, given by combining the results of
the above subroutine calls, is simply

Example 1.7: Example FORTRAN code for calculating equation terms


SUM=0.0
DO 100 K=FIRST_SURFACE_SPECIES, LAST_BULK_SPECIES
SUM = SUM + SDOT(K)*WT(K)*HMS(K)
100 CONTINUE

The species indices FIRST_SURFACE_SPECIES and LAST_BULK_SPECIES are also available from
a call to the Surface Kinetics Subroutine Library.

1.6. Structure and Use of the Transport Utilities


The Transport utilities must be used in conjunction with the Gas-phase Kinetics utilities. The general flow
of information is depicted in Figure 1.3: Relationships between the CHEMKIN Pre-processors and an
Application (p. 10) . The Transport utilities can be used with or without the Surface Kinetics utilities.

As with the Surface Kinetics utilities, the Gas-phase Kinetics Pre-processor must be run prior to the
Transport Pre-processor. The Transport Pre-processor requires input from the Transport Database, and
from the Gas-phase Kinetics Linking File. The Transport Database contains molecular parameters for a
number of species; these parameters are: The Lennard-Jones well depth in Kelvins, the Lennard-

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 13
Introduction

Jones collision diameter in Angstroms, the dipole moment in Debyes, the polarizability in cubic
angstroms, rotational relaxation collision number and an indicator regarding the nature and geo-
metrical configuration of the molecule. A supplemental input file may also contain this information.
The information coming from the Gas-phase Kinetics Linking File contains the species names and mo-
lecular weights, as well as thermodynamic data. Like the Gas-phase Kinetics Pre-processor, the Transport
Pre-processor produces a Transport Linking File that is later needed in the Transport Subroutine Library.

Both the Gas-phase Kinetics and the Transport Subroutine Libraries must be initialized before use and
there is a similar initialization subroutine in each. The Transport Subroutine Library is initialized by a
call to subroutine MCINIT. Its purpose is to read the Transport Linking File and populate the storage
arrays, allocated by the calling program, which must be made available to all other subroutines in the
library. Once initialized, any subroutine in the library may be called from the application program. There
are just eighteen (18) subroutines contained in the Transport subroutine library. These return pure-
species, binary, and gas-mixture transport properties, using either a mixture-averaged or full multicom-
ponent formulation, as described in the Chemkin-Pro Theory Manual Theory Manual.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
14 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 2: User Supplemental Programming
With many of the ANSYS Chemkin-Pro pre-packaged Reactor Models, you have some flexibility in
modifying the behavior of the underlying programs through supplemental programming. First, many
of the Reactor Models contain user-subroutine options, which allow users to insert their own arbitrary
formulations or sub-models for describing heat transfer, inlet attributes, or time- or distance-dependent
problem constraints, such as pressure, volume, or temperature. Second, all of the Reactor Models are
packaged as subroutines that are called from very thin “driver” programs that serve the purpose of al-
locating memory and defining input file names. These driver layers are provided to the user in source
code and can be modified or adapted for advanced use, such as linking in to an optimization or para-
meter-estimation algorithm. This chapter describes the use of these two options, with particular attention
to the mechanics of recompiling the user-program components and rebuilding the application programs
associated with the Reactor Models.

Note:

For network-license installs, users who wish to take advantage of user programming should
be sure to have a local installation of ANSYS Chemkin-Pro, so that changes do not affect
other users on the system. Please see your system administrator for assistance in setting up
a local install.

2.1. User-programmed Subroutines


ANSYS Chemkin-Pro has the added flexibility to incorporate user programming for certain terms in
equations solved in Chemkin-Pro, or to parameterize time- or distance-dependent variables. Templates
for each of the user subroutine options are provided in the standard Chemkin-Pro installation, under
the subdirectory user_routines, that is,

For Windows/Win64:

C:\Program Files\ANSYS Inc\V201\reaction\chemkinpro.win64\user_routines

For Linux8664:

/ansys_inc/v201⁄reaction⁄chemkinpro.linuxx8664/user_routines

There are two types of User Subroutine options:

1. Subroutines that provide customer reaction-rate formulations and supplement or replace certain function-
ality in the ANSYS Chemkin-Pro subroutine libraries, and

2. Subroutines that add to or replace certain functionality in a Reactor Model application program.

For Reactor Model user routines, in addition to programming, compiling, and linking code into the ap-
plication programs, users must also specifically select the use of the user-subroutine option, either

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 15
User Supplemental Programming

through the appropriate ANSYS Chemkin-Pro interface input panel, or through manually adding keywords
to a Reactor Model input file. Similarly, for utility or reaction-rate user routines, users must explicitly
include auxiliary information in the Gas-phase Kinetics or Surface Kinetics input file that activates the
user subroutine.

2.1.1. User-programmed Reaction Rate Routines


For both gas-phase and surface kinetics reaction mechanisms, users have the option to provide custom
reaction-rate formulations or to actually over-ride the entire species rates-of-production calculations
with a user-provided subroutine. These options are described in more detail in Chemkin-Pro Input
Manual. Briefly, to turn on user-programmed rate routines, the user must include either USRPROG,
or USRPROD auxiliary keywords in the Gas-phase Kinetics or Surface Kinetics input file. The USRPROG
option is entered after a specific reaction line, and serves to override the rate-of-progress calculation
for that particular reaction. The USRPROD option, however, is entered on the REACTION line and
signals that a user routine will provide calculation of all species net production rates, regardless of
the rest of the kinetics input in the file.

For gas-phase chemistry, the applicable user routines for the USRPROG and USRPROD options
are CKUPROG and CKUPROD, respectively. Templates for these subroutines are provide in the FORTRAN
file cklib_user_routines.f.

For surface chemistry, the applicable user routines for the USRPROG and USRPROD options are
SKUPROG and SKUPROD, respectively. Templates of these subroutines are found in sk-
lib_user_routines.f.

2.1.2. User-programmed Subroutines in Reactor Models


User-programmed subroutines (or functions) are used to provide flexibility in specifying problem
constraints that may involve an arbitrary function of time, distance, or other reactor variable. Before
employing user-subroutine options, users should consider the various piece-wise linear profile options
that are readily available through the user interface and require no programming and described in
the Chemkin-Pro Input Manual Input Manual. These profile options provide similar flexibility to the
user routines, but do not require any programming, recompiling and/or linking of code.

For each user routine, there is an associated Input option in the associated Reactor Model input
panel, to activate the user routine from the user interface. To view user routine options in the ANSYS
Chemkin-Pro interface, you must first go to the Preferences panel (Edit > Preferences) and check
the box that says Display User Routine Options. Once this box is checked, when you open a new
input panel, any user-routine options will be displayed among the other input options. When manually
assembling Reactor Model Input files, this corresponds to “keyword” that must be included in the
input file, which are described in the Chemkin-Pro Input Manual Input Manual.

Table 2.1: Keyword and FORTRAN Code Relationships (p. 17) lists the corresponding keywords described
in the Chemkin-Pro Input Manual Input Manual with the name of the subroutine or function that is
turned on by this keyword, and the user routine file in which a template of the function is found.
Also listed is the corresponding application program shared object (UNIX) or dynamically linked library
(PC) that is used when running the Reactor Model program.

Note:

If a user replaces or modifies a shared-object’s function, that change will apply to all Reactor
Models that employ that shared object, when the user routine option is enabled. The table

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
16 of ANSYS, Inc. and its subsidiaries and affiliates.
User-programmed Subroutines

of reactor models (Reactor Class Name column) associated with a particular shared object
library (License column) can be found in the ReactorModels.csv file located in the data
directory of an ANSYS Chemkin-Pro install.

Table 2.1: Keyword and FORTRAN Code Relationships

Keyword(s) FORTRAN code File name Shared Object


Always used SUBROUTINE aurora_user_routines.f PC: auroradll.dll
unless other PLGEOM UNIX: libaurora.so
geometric
keywords are
given
UIGN SUBROUTINE aurora_user_routines.f PC: auroradll.dll
PSIGNT UNIX: libaurora.so
QFUNQFIX FUNCTION aurora_user_routines.f PC: auroradll.dll
PSQFUN UNIX: libaurora.so
TTIMTFIX SUBROUTINE aurora_user_routines.f PC: auroradll.dll
PSTEMPT UNIX: libaurora.so
VTIM SUBROUTINE aurora_user_routines.f PC: auroradll.dll
PSVOLT UNIX: libaurora.so
QXFU FUNCTION QTRX aurora_user_routines.f PC: auroradll.dll
UNIX: libaurora.so
USRIN SUBROUTINE aurora_user_routines.f PC: auroradll.dll
USRINLET UNIX: libaurora.so
UPROF SUBROUTINE creslaf_user_routines.f PC: creslafdll.dll
CRUPROF UNIX: libcreslaf.so
UTRN SUBROUTINE creslaf_user_routines.f PC: creslafdll.dll
CRUTRANS UNIX: libcreslaf.so
QFUN FUNCTION oppdif_user_routines.f PC: oppdifdll.dll
OPQFUN UNIX: liboppdif.so
UTRN SUBROUTINE oppdif_user_routines.f PC: oppdifdll.dll
OPUTRANS UNIX: liboppdif.so
Always used FUNCTION AREA premix_user_routines.f PC: premixdll.dll
unless keyword UNIX:
APRO is given libpremix.so
QFUN FUNCTION premix_user_routines.f PC: premixdll.dll
PRQFUN UNIX:
libpremix.so
UTRN SUBROUTINE premix_user_routines.f PC: premixdll.dll
PRUTRANS UNIX:
libpremix.so

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 17
User Supplemental Programming

2.1.3. Recompiling and Linking a User Subroutine

Note:

Before starting to recompile or link, you must set up your compile environment. For more
information on the compiler compatibility with ANSYS Chemkin-Pro libraries, see Compiler
Compatibility (p. 2).

Incorporating customized user subroutines into ANSYS Chemkin-Pro shared objects requires the fol-
lowing basic steps, each of which are described in more detail below:

1. On Windows platforms, set the environment variable FLEXLM_ARCH to:win64.

2. Modify the user routine for the option of interest.

3. Compile and update the user routine’s static object-archive library.

4. Link the user routine library into the target run-time shared-object library.

As an example, the following steps will incorporate a customized rate routine in cklib_user_routines.f,
and/or a modified FUNCTION PRQFUN in premix_user_routines.f for the Premixed Laminar Flame
Models, by recompiling the modified user routines and updating the object archive library required
by the application program:

1. On Windows systems, set the FLEXLM_ARCH environment variable.

2. Locate the user routines’ archive library file:

For Windows/PC, this library is located at \lib\user_routines.lib.

For UNIX, this library is located at /lib/user_routines.a.

3. Back up the library file; for example, rename the existing user_routines.lib file (e.g. as in-
stalled_user_routines.lib), so that it does not get overwritten.

4. Using the makefile available in the user_routines directory, the following will compile the changes made
to the user routine files and create a new user_routines.lib. The command must be typed in an Intel
FORTRAN command window (PC) or in a UNIX shell with the Intel FORTRAN environment, after using
the cd command to reach the user_routines directory:

For Windows/PC, use:

nmake -i -f user_routines_pc.mak

For UNIX, use:

make -i -f user_routines_unix.mak

Note:

If you copy instead of rename the original library, you will have to also explicitly delete
the original file from the lib directory before make will build a new version.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
18 of ANSYS, Inc. and its subsidiaries and affiliates.
User-programmed Subroutines

5. On Windows platforms, set the environment variable FLEXLM_ARCH to: win64.

6. You must rebuild the target executable's shared-object library, thus linking the updated user routines’
library. The shared-object libraries are located in the bin directory (e.g., PC: %CHEMKIN_BIN% ; UNIX:
$CHEMKIN_BIN). In this example, you create the shared-object library associated with the PRQFUN routine
in Table 2.1: Keyword and FORTRAN Code Relationships (p. 17), to incorporate the modified routines
cited in the previous step:

For Windows/PC, the shared-object library consists of three files, premixdll.dll, premixdll.exp,
and premixdll.lib.

For UNIX platforms, the corresponding file is libpremix.so (for LINUX).

7. Back up the shared-object library for the executable that you want to build. For example, rename the
existing premixdll.* files (e.g., as installed_premixdll.dll), so that they do not get overwritten.

Note:

If you copy instead of rename the original library, you will have to also explicitly delete
the original file from the bin directory before make will build a new version.

8. Change directories to the drivers_cpp directory:

For Windows/PC, use:

cd ..\drivers_cpp

For UNIX, use:

cd ../drivers_cpp

9. For the Reactor Model you are targeting, make a new shared-object library using the makefile located
in the drivers_cpp directory:

For Windows/PC, use:

nmake -i -f drivers_cpp_pc.mak ..\bin\premixdll.dll

which also creates a new premixdll.exp and premixdll.lib.

For UNIX, use:

make -i -f drivers_cpp_unix.mak ../bin/libpremix.so

Now you can launch the ANSYS Chemkin-Pro interface and process your input files as usual with the
modified run-time shared-object library for the associated Reactor Models (in this case the Premixed
Burner-stabilized Flame and the Premixed Flame-speed Calculator). Remember to restore the backed-
up shared-object library when you want to return to the as-installed functionality.

Note:

There are some features in the Reactor Models and ANSYS Chemkin-Pro utilities that will
be incompatible with the global replacement of species rates of production, such as

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 19
User Supplemental Programming

sensitivity analysis and rate-of-production analysis. Such features will return zero values
when user rate-routine programming is encountered.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
20 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 3: Writing User Applications
This chapter discusses the following topics:
3.1. Basic Requirements of a Chemkin Program
3.2. Gas-phase Kinetics Sample Program (CONP)
3.3. Surface Kinetics Sample Program (SKSAMPLE)
3.4.Transport Sample Problem (PROPS)
3.5. VODE Summary

3.1. Basic Requirements of a Chemkin Program


In addition to using pre-built ANSYS Chemkin-Pro Reactor Models, users may opt to write their own,
directly accessing the Gas-phase Kinetics, Surface Kinetics, and/or Transport subroutine libraries. In order
to do so, you must have the following:

• A compatible FORTRAN compiler installed on the computer where ANSYS Chemkin-Pro is installed.

• (optional) A C or C++ compiler, when programming in C or C++. This compiler should be compatible with
the FORTRAN compiler and with the ANSYS Chemkin-Pro build.

• Knowledge of the FORTRAN language and the C/C++ language if applicable.

• Experience with compiling and linking programs on the computer platform of interest.

For more information on the compiler compatibility with ANSYS Chemkin-Pro libraries, see Compiler
Compatibility (p. 2).

The basic requirements for any program are declaration of variables and arrays, allocation of memory,
and file manipulation. ANSYS Chemkin-Pro-based programs must also establish a link to the user's
chemistry data through initialization routines that access the Linking Files generated by Pre-processor
programs, as discussed in Introduction (p. 1) . This section provides an introduction to these processes.

More specific detail is provided by way of example, in Gas-phase Kinetics Sample Program (CONP) (p. 26)
through Transport Sample Problem (PROPS) (p. 40) , which describe sample programs that demonstrate
the use of ANSYS Chemkin-Pro subroutine calls. These sample programs are provided as source code
with a standard Chemkin-Pro installation. Also provided at installation are sample makefiles and macros
to facilitate compiling and linking of a FORTRAN or C++ program.

Note that any program linked to the ANSYS Chemkin-Pro /API requires that a Chemistry Set has been
successfully pre-processed before the program can run. This will ensure that the needed Linking Files
have been created and can be accessed by the user program. These dependencies are discussed in In-
troduction (p. 1) . The Gas-phase Kinetics Linking File (e.g., chem.asc) is required in all cases. Use of
Surface Kinetics library routines requires the Surface Kinetics Linking File (e.g., surf.asc) to be created.
Similarly, Transport subroutine library calls require that the Transport Linking File (e.g., tran.asc) be created
through a successful run of the Transport Pre-processor.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 21
Writing User Applications

When users author their own Applications, they will need to access the Linking File from the Application
program after the Pre-processor has been successfully executed, so that subroutines from the Gas-phase
Kinetics Subroutine Library can be called from the Application. The Application's first step must be to
dimension three storage arrays (one integer, one floating point, and one character data type) and then
call the initialization subroutine CKINIT to fill the storage arrays from the Linking File data. One or
more of these arrays is required input to nearly every other subroutine in the Gas-phase Kinetics package.

Note:

The minimum length for the arrays can be found in Pre-processor output. The storage-array
sizes can also be determined by a call to the subroutine CKLEN.

Once CKINIT has been successfully called in an Application program, any number of Gas-phase Kinetics
subroutines can be used to return various types of information. The subroutine needed for a particular
function can be determined by referencing descriptions of equations in the Chemkin-Pro Theory
Manual , or through the subject-based quick-reference list in Quick Reference Guide to the Gas-phase
Kinetics Subroutine Library (p. 47) of this manual. Detailed information about the subroutine call lists
are provided in an alphabetical listing in Alphabetical Listing of the Gas-phase Kinetics Subroutine Lib-
rary (p. 79) . Normally only a few of the subroutines in the package would be called for any one problem.

For the Surface Kinetics and Transport subroutine libraries, there is a similar requirement of array alloc-
ation and calling of an initialization routine. In this case, the necessary array sizes can be found by calls
to SKLEN and MCLEN, respectively, and the initialization occurs through calls to SKINIT and MCINIT,
respectively.

The following sections outline specific components that form the basic requirements for an ANSYS
Chemkin-Pro application program.

3.1.1. Requirements for Writing a FORTRAN Program

3.1.1.1. Declare Variable Types


Inclusion of the statement DOUBLE PRECISION (A-H, O-Z), INTEGER (I-N) will auto-
matically assign a variable type depending on its initial character, else each variable must be explicitly
typed, i.e.,
INTEGER KK
DOUBLE PRECISION RHO
CHARACTER*16 KNAME

Note:

A CHARACTER type must also establish a character-string length.

3.1.1.2. Allocate Arrays


Arrays specific to a mechanism Linking File may be allocated by an estimate of its requirements,
shown as:
PARAMETER (LENIWK=1000, LENRWK=1000, LENCWK=500, LENSYM=16)
DIMENSION ICKWRK(LENIWK)

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
22 of ANSYS, Inc. and its subsidiaries and affiliates.
Basic Requirements of a Chemkin Program

DIMENSION RCKWRK(LENRWK)
CHARACTER*(LENSYM) CCKWRK(LENCWK)

If the Linking File has been opened (see Open the Linking File (p. 23) ), the exact requirements
may be obtained by the ANSYS Chemkin-Pro subroutine call CALL CKLEN (LINK
CK,LENI,LENR,LENC,IFLAG) in order to check that sufficient memory has been allocated.

3.1.1.3. Open the Linking File


An integer FORTRAN unit number is assigned to the existing Linking File; IFLAG will be non-zero
on return if there was an error, as shown:
LINKCK = 25
IFLAG = 0
OPEN(UNIT=LINKCK,FORM='FORMATTED',STATUS='OLD',FILE='chem.asc',IOS=IFLAG)

3.1.1.4. Initialize the Linking File Data


Messages from the subroutine will be sent to a screen or window by assigning output to FORTRAN
unit 6, as shown:
LOUT=6
IFLAG=0
CALL CKINIT (LENICK,LENRCK,LENCCK,LINKCK,LOUT,ICKWRK,RCKWRK,CCKWRK,IFLAG)

3.1.1.5. Obtain or Manipulate Data


After the Linking File data has been stored into the ANSYS Chemkin-Pro work arrays, they are the
means by which further information about the mechanism is obtained, or data manipulation facil-
itated.
CALL CKINDX (ICKWRK,RCKWRK,MM,KK,II,NFIT)

where MM is the ELEMENTS count of the mechanism, KK is the SPECIES count, II is the REAC
TIONS count and NFIT is the number of C p polynomial coefficients for the species.
CALL CKWT (ICKWRK,RCKWRK,WT)

where DOUBLE PRECISION WT(KK) is initialized with the KK species' molecular weights.
CKXTY (X,ICKWRK,RCKWRK,Y)

Converts DOUBLE PRECISION X(1..KK) mole fractions to DOUBLE PRECISION Y(1..KK)


mass fractions for the KK species.

3.1.1.6. Compile and Link


The ANSYS Chemkin-Pro installation file include/chemkin_make_unix.inc (include\chemkin_make_pc.inc
for PC), defines make (nmake) macros for required compile and link flags, as well as library names
and locations. You MUST use this installation file when compiling your own code to ensure that
the compiler directives are consistent with those used in Chemkin-Pro, and to avoid errors during
linking. A user makefile can set a few additional macros to compile and link a program; the user
macro, CKROOT for example, must be defined as the root location of your Chemkin-Pro installation.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 23
Writing User Applications

Since CKROOT must not contain any spaces, you may need to use directory short names for Windows
Installations. For example, rather than:

CKROOT = Program Files\ANSYS Inc\V201\reaction

you will need to use something like

CKROOT = c:\progra~1\ANSY~1\v201\reaction

You can determine the short name for directories by using the Windows DOS command:
dir /x~

!include $(CKROOT)\include\chemkin_make_pc.inc
ALL : MY_EXE
MY_OBJ = my_program$(OBJECT)
MY_EXE: $(MY_OBJ)
$(LINK) $? $(F77_LIBFLAGS) \
$(CHEMKIN_LIBRARY) $(CHEMKIN_USER_LIBRARY) \
$(CHEMKIN_PUB_LIBRARY) $(F77_SYSTEM_LIBS)

If CKROOT is not defined as an environment variable already, the ANSYS Chemkin-Pro make file
will use its own CKROOT definition. All the other directories (include, bin, etc.) are referenced using
a relative path based on CKROOT.

There are two general scenarios about how CKROOT has to be set:

1. The first is that the entire ANSYS Chemkin-Pro file structure is intact when you try to rebuild some DLL
or executable. Even if you are not working in the original Chemkin-Pro installation, as long as all the
other Chemkin-Pro directories (bin, include, etc.) are under the same parent directory as the build
directory, you do not need to set CKROOT. The make file will use the default setting of '..' and you can
use commit a make with the command
> nmake -f drivers_cpp_pc.mak ..\bin\premixdll.dll

Please note that the definition of CKROOT as '..' enables the use of "..\bin\premixdll.dll" as the
target. If you have defined CKROOT as "c:\progra~1\ANSY~1\v201\reaction", you
have to use "c:\progra~1\ANSY~1\v201\reaction\chemkinpro.win64\bin\pre
mixdll.dll" as the target instead.

2. If you have installed the sample directories in a separate location, when you try to rebuild the samples,
you will need to re-define CKROOT in the make files of the sample to point it to the ANSYS Chemkin-
Pro installation.

3.1.2. Requirements for Writing a C++ Program


C prototypes are required for calling the ANSYS Chemkin-Pro FORTRAN subroutines from C or C++.
To call Chemkin-Pro FORTRAN subroutines from C or C++ requires an interface consisting of the file
include\chemkin.h (PC) or include/chemkin.h (UNIX), containing the C++/FORTRAN prototype for some
commonly required utilities, and the C++ files f77char.cpp, chemkinbase.cpp, and chemkinfiles.cpp,
which are found in the drivers_cpp subdirectory.

3.1.2.1. Declare Variable Types


A variable must be explicitly typed; in general, the sample programs use a variable name initial
character indicative of its type, that is,

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
24 of ANSYS, Inc. and its subsidiaries and affiliates.
Basic Requirements of a Chemkin Program

int iSpeciesCount;
double dRho;
int iLensym = 16;
char *sSpeciesName = new char [ iLensym + 1 ];

The character-string length of a chemical species name is usually 16, plus one additional character
for a character-string terminator.

3.1.2.2. Allocate Arrays


Arrays specific to a mechanism Linking File may be allocated by an estimate of its requirements,
but with C++ it is possible to determine the requirements first, that is, if the Linking File has been
opened (see Open the Linking File (p. 25) ).
CKLEN (iLinkCK,iLeniCK,iLenrCK,iLencCK,iFlag);
int *iICKwrk = new int [ iLeniCK ];
double *dRCKwrk = new double [ iLenrCK ];
int iLensym = 16;
char *sCCKwrk = new char [ iLencCK*iLensym + 1 ];

3.1.2.3. Open the Linking File


An interface to the FORTRAN OPEN is used to allow FORTRAN READ of the Linking File: iFlag will
be non-zero on return if there was an error.
int iLinkCK=25;
int iFlag=0;
CCOPEN ((char *)"chem.asc", (char *)"FORMATTED", (char *)"OLD", iLinkCK,
iFlag);

3.1.2.4. Initialize the Linking File Data


Messages from the subroutine will be sent to a screen or window by assigning output to stdout.
int iLout=stdout;
int iFlag=0;
CKINIT(iLeniCK,iLenrCK,iLencCK,iLinkCK,iLout,iICKwrk,dRCKwrk,sCCKWRK,iFlag);

3.1.2.5. Obtain or Manipulate Data


After the Linking File data has been stored into the ANSYS Chemkin-Pro work arrays, they are the
means by which further information about the mechanism is obtained, or data manipulation facil-
itated.
CKINDX (iICKwrk,dRCKwrk,iElementCount,iSpeciesCount,iReactionCount,iCpfitCount);

where iElementCount is the ELEMENTS count of the mechanism, iSpeciesCount is the


SPECIES count, iReactionCount is the REACTIONS count, and iCpFitCount is the number
of C p polynomial coefficients for the species.
CKWT (iICKwrk,dRCKwrk,dMolecularWeights);

where double *dMolecularWeights = new double [iSpeciesCount];


CKXTY (X,ICKWRK,RCKWRK,Y)

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 25
Writing User Applications

converts double X[0..iSpeciesCount-1] mole fractions to double Y[0..iSpeci


esCount-1] mass fractions for the iSpeciesCount species.

3.1.2.6. Compile and Link


The ANSYS Chemkin-Pro installation file /include/chemkin_make_unix.inc (\in-
clude\chemkin_make_pc.inc for PC), defines make (nmake) macros for required compile and link
flags, and library names and locations. A user makefile can set a few additional macros to compile
and link a program; the user macro, CKROOT for example, must be defined as the root location of
Chemkin-Pro.

If CKROOT is not defined as an environment variable already, the ANSYS Chemkin-Pro make file
will use its own CKROOT definition. All the other directories (include, bin, etc.) are referenced using
a relative path based on CKROOT.

There are two general scenarios about how CKROOT has to be set:

1. The first is that the entire ANSYS Chemkin-Pro file structure is intact when you try to rebuild some DLL
or executable. Even if you are not working in the original Chemkin-Pro installation, as long as all the
other Chemkin-Pro directories (bin, include, etc.) are under the same parent directory as the build
directory, you do not need to set CKROOT. The make file will use the default setting of '..' and you can
use commit a make with the command
> nmake -f drivers_cpp_pc.mak ..\bin\premixdll.dll

Please note that the definition of CKROOT as '..' enables the use of "..\bin\premixdll.dll" as the
target. If you have defined CKROOT as "c:\progra~1\ANSY~1\v201\reaction\chemkinpro.win64",
you have to use "c:\progra~1\ANSY~1\v201\reaction\chemkinpro.win64\bin\premixdll.dll" as
target instead.

2. If you have installed the sample directories in a separate location, when you try to rebuild the samples,
you must set up your ANSYS Chemkin-Pro environment. See ANSYS Chemkin-Pro Windows Environment
Section 4.1 or Chemkin-Pro Linux Environment Section 4.2 of the Chemkin-Pro Getting Started Guide
(depending on whether you are using a Windows or Linux platform).

3.2. Gas-phase Kinetics Sample Program (CONP)


CONP is an example of a FORTRAN or C++ program directly accessing the Gas-phase Kinetics Subroutine
Library. Before coding such an executable for Gas-phase Kinetics, the user must (1) define a system of
governing equations, (2) define a reaction mechanism, and (3) choose a solution method. In this sample
problem we will solve the equations describing constant pressure combustion for a hydrogen-air reaction
mechanism.

The governing energy and mass conservation equations are:

(3.1)

(3.2)

where T is temperature and Y k are the mass fractions of the K species involved. The independent variable
t is time. Other variables are , mass density; , mean specific heat at constant pressure; , the specific

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
26 of ANSYS, Inc. and its subsidiaries and affiliates.
Gas-phase Kinetics Sample Program (CONP)

enthalpies of the species; , the molar production rates of the species; and , the molecular weights
of the species.

The governing system of ordinary differential equations and accompanying initial conditions form an
initial value problem. The equations will be solved using VODE.1 We find this solver to be reliable for
the solution of a wide range of stiff initial-value problems. The source code for the solver is provided
in the Chemkin-Pro subdirectory source_public\vode.f (PC), source_public/vode.f (UNIX), which is extensively
commented as to its implementation.

The FORTRAN implementation for the solution of the sample problem is provided in the ANSYS Chemkin-
Pro subdirectory samples2010\sample_apps_f77\conp (PC), samples2010/sample_apps_f77/conp (UNIX),
and a C++ implementation in samples2010\sample_apps_cpp\conp (PC),
samples2010/sample_apps_cpp/conp (UNIX). After initializing Gas-phase Kinetics, the program reads the
initial nonzero moles from input. It then repeatedly calls subroutine VODE to obtain the solution at
uniform print intervals. The governing equation formulation is found in SUBROUTINE FUN, which is
called by VODE.

Note:

When using this example, you must (i) ensure FLEXLM_ARCH is set (see Recompiling and
Linking a User Subroutine (p. 18) ) and (ii) edit the .inc makefile so that the CKROOT variable
is set to the location of your ANSYS Chemkin-Pro installation (see Compile and Link (p. 23)
).

The sections below present Gas-phase Kinetics Pre-processor input and output for the sample problem,
and the input and output for the CONP execution.

3.2.1. Input to Gas-phase Kinetics Pre-processor


ELEMENTS H O N END
SPECIES H2 H O2 O OH HO2 H2O2 H2O N N2 NO END
REACTIONS
H2+O2=2OH 0.170E+14 0.00 47780
OH+H2=H2O+H 0.117E+10 1.30 3626 ! D-L&W
O+OH=O2+H 0.400E+15 -0.50 0 ! JAM 1986
O+H2=OH+H 0.506E+05 2.67 6290 ! KLEMM,ET AL
H+O2+M=HO2+M 0.361E+18 -0.72 0 ! DIXON-LEWIS
H2O/18.6/ H2/2.86/ N2/1.26/
OH+HO2=H2O+O2 0.750E+13 0.00 0 ! D-L
H+HO2=2OH 0.140E+15 0.00 1073 ! D-L
O+HO2=O2+OH 0.140E+14 0.00 1073 ! D-L
2OH=O+H2O 0.600E+09 1.30 0 ! COHEN-WEST.
H+H+M=H2+M 0.100E+19 -1.00 0 ! D-L
H2O/0.0/ H2/0.0/
H+H+H2=H2+H2 0.920E+17 -0.60 0
H+H+H2O=H2+H2O 0.600E+20 -1.25 0
H+OH+M=H2O+M 0.160E+23 -2.00 0 ! D-L
H2O/5/
H+O+M=OH+M 0.620E+17 -0.60 0 ! D-L
H2O/5/

O+O+M=O2+M 0.189E+14 0.00 -1788 ! NBS


H+HO2=H2+O2 0.125E+14 0.00 0 ! D-L
HO2+HO2=H2O2+O2 0.200E+13 0.00 0
H2O2+M=OH+OH+M 0.130E+18 0.00 45500
H2O2+H=HO2+H2 0.160E+13 0.00 3800
H2O2+OH=H2O+HO2 0.100E+14 0.00 1800

1
P. N. Brown, G. D. Byrne, and A. C. Hindmarsh, SIAM J. Sci. Stat. Comput. 10 :1038 (1989).

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 27
Writing User Applications

O+N2=NO+N 0.140E+15 0.00 75800


N+O2=NO+O 0.640E+10 1.00 6280
OH+N=NO+H 0.400E+14 0.00 0
END

3.2.2. Output from Gas-phase Kinetics Pre-processor


--------------------
ELEMENTS ATOMIC
CONSIDERED WEIGHT
--------------------
1. H 1.00797
2. O 15.9994
3. N 14.0067
--------------------
-------------------------------------------------------------------------------
C
P H
H A
A R
SPECIES S G MOLECULAR TEMPERATURE ELEMENT COUNT
CONSIDERED E E WEIGHT LOW HIGH H O N

-------------------------------------------------------------------------------
1. H2 G 0 2.0159E+00 300 5000 2 0 0
2. H G 0 1.0080E+00 300 5000 1 0 0
3. O2 G 0 3.1999E+01 300 5000 0 2 0
4. O G 0 1.5999E+01 300 5000 0 1 0
5. OH G 0 1.7007E+01 300 5000 1 1 0
6. HO2 G 0 3.3007E+01 300 5000 1 2 0
7. H2O2 G 0 3.4015E+01 300 5000 2 2 0
8. H2O G 0 1.8015E+01 300 5000 2 1 0
9. N G 0 1.4007E+01 300 5000 0 0 1
10. N2 G 0 2.8013E+01 300 5000 0 0 2
11. NO G 0 3.0006E+01 300 5000 0 1 1
-------------------------------------------------------------------------------

(k = A T**b exp(-E/RT))

REACTIONS CONSIDERED A b E

1. H2+O2=2OH 1.70E+13 0.0 47780.0


2. OH+H2=H2O+H 1.17E+09 1.3 3626.0
3. O+OH=O2+H 4.00E+14 -0.5 0.0
4. O+H2=OH+H 5.06E+04 2.7 6290.0
5. H+O2+M=HO2+M 3.61E+17 -0.7 0.0
H2O Enhanced by 1.860E+01
H2 Enhanced by 2.860E+00
N2 Enhanced by 1.260E+00
6. OH+HO2=H2O+O2 7.50E+12 0.0 0.0
7. H+HO2=2OH 1.40E+14 0.0 1073.0
8. O+HO2=O2+OH 1.40E+13 0.0 1073.0
9. 2OH=O+H2O 6.00E+08 1.3 0.0
10. H+H+M=H2+M 1.00E+18 -1.0 0.0
H2O Enhanced by 0.000E+00
H2 Enhanced by 0.000E+00
11. H+H+H2=H2+H2 9.20E+16 -0.6 0.0
12. H+H+H2O=H2+H2O 6.00E+19 -1.2 0.0
13. H+OH+M=H2O+M 1.60E+22 -2.0 0.0
H2O Enhanced by 5.000E+00
14. H+O+M=OH+M 6.20E+16 -0.6 0.0
H2O Enhanced by 5.000E+00
15. O+O+M=O2+M 1.89E+13 0.0 -1788.0
16. H+HO2=H2+O2 1.25E+13 0.0 0.0
17. HO2+HO2=H2O2+O2 2.00E+12 0.0 0.0
18. H2O2+M=OH+OH+M 1.30E+17 0.0 45500.0
19. H2O2+H=HO2+H2 1.60E+12 0.0 3800.0
20. H2O2+OH=H2O+HO2 1.00E+13 0.0 1800.0

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
28 of ANSYS, Inc. and its subsidiaries and affiliates.
Gas-phase Kinetics Sample Program (CONP)

21. O+N2=NO+N 1.40E+14 0.0 75800.0


22. N+O2=NO+O 6.40E+09 1.0 6280.0
23. OH+N=NO+H 4.00E+13 0.0 0.0

NOTE: A units mole-cm-sec-K, E units cal/mole

NO ERRORS FOUND ON INPUT:

3.2.3. Input to Chemkin Sample Program (CONP)


1 1000
H2 1
O2 3
N2 .1
END
3.0E-4 3.0E-5

3.2.4. Output from Chemkin Sample Program (CONP)


ADIABATIC FIXED PRESSURE PROBLEM,

INPUT PRESSURE(ATM) AND TEMPERATURE(K):


0.100E+01 0.100E+04

INPUT MOLES OF NEXT SPECIES


H2 1

INPUT MOLES OF NEXT SPECIES


O2 3

INPUT MOLES OF NEXT SPECIES


N2 .1

INPUT MOLES OF NEXT SPECIES


END

INPUT FINAL TIME AND DT


0.300E-03 0.300E-04

T(SEC) TMP(K) H2 H O2 O OH
HO2 H2O2 H2O N N2
NO
0.000E+00 0.100E+04 0.244E+00 0.000E+00 0.732E+00 0.000E+00 0.000E+00
0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.244E-01
0.000E+00
0.300E-04 0.100E+04 0.244E+00 0.817E-05 0.732E+00 0.425E-05 0.144E-05
0.129E-04 0.103E-07 0.259E-04 0.181E-20 0.244E-01
0.375E-19
0.600E-04 0.196E+04 0.890E-02 0.169E-01 0.625E+00 0.570E-01 0.411E-01
0.174E-03 0.355E-04 0.224E+00 0.229E-09 0.262E-01
0.167E-07
0.900E-04 0.235E+04 0.367E-02 0.331E-02 0.658E+00 0.235E-01 0.392E-01
0.845E-04 0.445E-05 0.246E+00 0.193E-08 0.271E-01
0.163E-05
0.120E-03 0.243E+04 0.258E-02 0.185E-02 0.665E+00 0.165E-01 0.352E-01
0.693E-04 0.254E-05 0.251E+00 0.229E-08 0.272E-01
0.438E-05
0.150E-03 0.246E+04 0.216E-02 0.139E-02 0.669E+00 0.138E-01 0.330E-01
0.641E-04 0.197E-05 0.254E+00 0.236E-08 0.273E-01
0.730E-05
0.180E-03 0.248E+04 0.197E-02 0.120E-02 0.670E+00 0.125E-01 0.319E-01
0.619E-04 0.173E-05 0.255E+00 0.237E-08 0.273E-01
0.102E-04
0.210E-03 0.248E+04 0.188E-02 0.111E-02 0.671E+00 0.119E-01 0.313E-01
0.609E-04 0.162E-05 0.255E+00 0.238E-08 0.273E-01
0.131E-04
0.240E-03 0.249E+04 0.183E-02 0.106E-02 0.671E+00 0.116E-01 0.310E-01

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 29
Writing User Applications

0.604E-04 0.157E-05 0.256E+00 0.239E-08 0.273E-01


0.160E-04
0.270E-03 0.249E+04 0.181E-02 0.104E-02 0.672E+00 0.115E-01 0.308E-01
0.602E-04 0.154E-05 0.256E+00 0.240E-08 0.273E-01
0.188E-04
0.300E-03 0.249E+04 0.179E-02 0.103E-02 0.672E+00 0.114E-01 0.307E-01
0.600E-04 0.152E-05 0.256E+00 0.241E-08 0.273E-01
0.217E-04 0.217E-04

3.3. Surface Kinetics Sample Program (SKSAMPLE)


SKSAMPLE is an example FORTRAN program for directly accessing the Surface Kinetics Subroutine Library.
The problem that we have chosen for the example involves the time-dependent deposition of a solid
film on the surfaces of a fixed-volume, fixed-temperature container that was initially filled with a gas
mixture.

One of the first tasks is to derive a system of equations that describes the process to be simulated. Here,
the first equation involves the conservation of mass in the container:
(3.3)

where is time, is the mass of gas-phase species in the container, is the container volume,
is the molar production (destruction) rate of gas-phase species by gas-phase chemical reactions,
are the species molecular weights, is the container-wall surface area, and is the molar production
rate of gas-phase species by surface reactions. After introducing the gas-phase mass density
(where is the total gas-phase mass) and the gas-phase species mass fractions , some ma-
nipulation leads to the following equation:
(3.4)

The total mass in the gas phase depends on the production (destruction) of gas-phase species by surface
reaction, as stated by

(3.5)

We rewrite this equation slightly to make a dependent variable and use the area-to-volume as
a parameter:

(3.6)

On the surface, the number of moles of species is given by


(3.7)

where is the site fraction of species on surface site (fraction of sites occupied by species
2
in phase ), is the density of sites in phase (in mole/cm ), and is the number of sites that
species occupies. The molar production (destruction) rate of surface species by surface reaction is
stated as
(3.8)

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
30 of ANSYS, Inc. and its subsidiaries and affiliates.
Surface Kinetics Sample Program (SKSAMPLE)

In terms of site fractions , the equation governing the surface species is given as

(3.9)

where the last term can be dropped if the number of surface sites if fixed. When surface reactions create
or destroy sites, then a conservation equation is included for the site densities of each phase :
(3.10)

However, our sample mechanism conserves sites, so the time derivative in Equation 3.10 (p. 31) is
trivially zero.

The governing system of ordinary differential equations and accompanying initial conditions form an
initial value problem. The equations will be solved using the software VODE.Equation 3.1 (p. 26) We
find this software to be reliable for the solution of a wide range of stiff initial-value problems.

The FORTRAN program sksample.f for the solution of the sample problem is provided in the ANSYS
Chemkin-Pro user area subdirectory samples2010\sample_apps_f77\sksample (PC),
samples2010/sample_apps_f77/sksample (UNIX). After initializing the Gas-phase Kinetics Subroutine Library
and the Surface Kinetics Subroutine Library, the program reads the initial nonzero moles from input. It
then repeatedly calls subroutine VODE to obtain the solution at uniform print intervals. The governing
equation formulation is found in SUBROUTINE FUN, which is called by VODE.

Note:

When using this example, you must (i) ensure FLEXLM_ARCH is set (see Recompiling and
Linking a User Subroutine (p. 18) ) and (ii) edit the .inc makefile so that the CKROOT variable
is set to the location of your ANSYS Chemkin-Pro installation (see Compile and Link (p. 23)
).

The sections below presents the Gas-phase Kinetics Pre-processor input and output, Surface Kinetics Pre-
processor input and output, and the sample program input and output.

3.3.1. Discussion of Sample Problem


We illustrate the input and output of the various Pre-processors and the example problem with an
analysis of the deposition of Si3 N4. The gas-phase reaction mechanism contains a detailed description
of NH3 decomposition (about which there is much published information), two reactions describing
decomposition, and three cross-reactions. At the low pressures we consider, the gas-phase decompos-
ition of reactants is slow. The surface reaction mechanism contains six steps describing the overall
conversion of 3 SiF4 and 4 NH3 molecules to 3 Si(d) and 4 N(d) and 12 HF.

Note:

The surface reaction mechanism is from a preliminary analysis at one temperature, and
thus we have not supplied any activation energies. Also, the thermodynamic data in the
mechanism is contrived and should not be used in other contexts. As such, this mechanism
should only be considered as illustrative and not as a source of kinetic data on the Si3 N4
system.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 31
Writing User Applications

The input to the sample problem gives the initial pressure as 2.63 × 10-3 atm (2 Torr) and temperature
1713 K. In this problem the temperature is fixed, but the pressure will increase as 12 moles of HF are
produced for every 7 moles of reactant destroyed. The input gas-phase mole fractions represent a
6:1 ratio of NH3 to SiF4. Initial site fractions of the surface species came from a steady-state analysis
of the system (not discussed here). The initial activities of the two bulk species are set to 1. The area
to volume ratio is 6 (a cubic box).

The print-out from the sample problem shows the initial conditions followed by print-outs of the
concentrations at subsequent states of the deposition. The reactants SiF4 and NH3 are seen to be
depleted and the product HF forms. In this fixed-volume system the pressure rises (discussed above).
There is a net decrease in the gas density as the heavy Si and N atoms are lost from the gas into the
bulk.

3.3.2. Input to Gas-phase Kinetics Pre-processor


ELEMENTS H N SI F
END
SPECIES
H2 H N2 N NH NH2 NNH N2H2 N2H3 N2H4
HF F SIF4 SIF3 SIHF3 SIF3NH2 NH3
END

REACTIONS
H+H+M=H2+M 0.100E+19 -1.000 0.000 ! D-L
H2/0.0/
H+H+H2=H2+H2 0.920E+17 -0.600 0.000
NH+N=N2+H 0.300E+14 0.000 0.000 ! JAM
NH+H=N+H2 0.100E+15 0.000 0.000 ! NH3 CST
NH2+H=NH+H2 0.692E+14 0.000 3650.000
NH3+H=NH2+H2 0.636E+06 2.390 10171.000 ! MICHAEL
NNH=N2+H 0.100E+05 0.000 0.000 ! JAM
NNH+H=N2+H2 0.100E+15 0.000 0.000 ! JAM
NNH+NH2=N2+NH3 0.500E+14 0.000 0.000 ! JAM
NNH+NH=N2+NH2 0.500E+14 0.000 0.000 ! JAM
NH2+NH=N2H2+H 0.500E+14 0.000 0.000 ! NH3CST
NH+NH=N2+H+H 0.254E+14 0.000 0.000 ! NH3 CST
NH2+N=N2+H+H 0.720E+14 0.000 0.000 ! PG
N2H2+M=NNH+H+M 0.500E+17 0.000 50000.000 ! NH3 CST
N2/2/ H2/2/
N2H2+H=NNH+H2 0.500E+14 0.000 1000.000 ! NH3 CST
N2H2+NH=NNH+NH2 0.100E+14 0.000 1000.000 ! NH3 CST
N2H2+NH2=NH3+NNH 0.100E+14 0.000 1000.000 ! NH3 CST
NH2+NH2=N2H2+H2 0.500E+12 0.000 0.000 ! NH3 CST
NH3+M=NH2+H+M 0.140E+17 0.000 90600.000 ! MSGK
N2H3+H=NH2+NH2 1.60E+12 0.0 0.0 ! MSGK
N2H3+M=N2H2+H+M 3.50E+16 0.0 46000.0 ! MSGK
N2H3+NH=NH2+N2H2 2.00E+13 0.0 0.0 ! MSGK
NH2+NH2+M=N2H4+M 3.00E+20 -1.0 0.0 ! MSGK
H+N2H4=H2+N2H3 1.30E+13 0.0 2500.0 ! MSGK
NH2+N2H4=NH3+N2H3 3.90E+12 0.0 1500.0 ! MSGK
NH+H+M=NH2+M 2.00E+16 -0.5 0.0 ! MSGK
NH2+NH2=NH3+NH 5.00E+12 0.0 10000.0 ! MSGK
F+NH3=NH2+HF 4.27E+11 0.5 800.0 ! KONDRATIEV
SIF4=SIF3+F 3.00E+12 0.0 147170.0 ! PHO&MEC
H+SIF4=HF+SIF3 1.00E+13 0.0 50000.0 ! PHO&MEC
NH2+SIF4=SIF3NH2+F 1.00E+11 0.0 40950.0 ! GUESS
NH3+SIF3=SIF3NH2+H 1.00E+11 0.0 5000.0 ! GUESS
NH3+SIF3=SIHF3+NH2 1.00E+11 0.0 10000.0 ! PHO&MEC
END

3.3.3. Output from Gas-phase Kinetics Pre-processor


--------------------
ELEMENTS ATOMIC

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
32 of ANSYS, Inc. and its subsidiaries and affiliates.
Surface Kinetics Sample Program (SKSAMPLE)

CONSIDERED WEIGHT
--------------------
1. H 1.00797
2. N 14.0067
3. SI 28.0860
4. F 18.9984
--------------------
-------------------------------------------------------------------------------
C
P H
H A
A R
SPECIES S G MOLECULAR TEMPERATURE ELEMENT COUNT
CONSIDERED E E WEIGHT LOW HIGH H N SI F
-------------------------------------------------------------------------------
1. H2 G 0 2.0159E+00 300 5000 2 0 0 0
2. H G 0 1.0080E+00 300 5000 1 0 0 0
3. N2 G 0 2.8013E+01 300 5000 0 2 0 0
4. N G 0 1.4007E+01 300 5000 0 1 0 0
5. NH G 0 1.5015E+01 300 5000 1 1 0 0
6. NH2 G 0 1.6023E+01 300 5000 2 1 0 0
7. NNH G 0 2.9021E+01 250 4000 1 2 0 0
8. N2H2 G 0 3.0029E+01 300 5000 2 2 0 0
9. N2H3 G 0 3.1037E+01 300 5000 3 2 0 0
10. N2H4 G 0 3.2045E+01 300 5000 4 2 0 0
11. HF G 0 2.0006E+01 300 5000 1 0 0 1
12. F G 0 1.8998E+01 300 4000 0 0 0 1
13. SIF4 G 0 1.0408E+02 300 2000 0 0 1 4
14. SIF3 G 0 8.5081E+01 300 3000 0 0 1 3
15. SIHF3 G 0 8.6089E+01 300 3000 1 0 1 3
16. SIF3NH2 G 0 1.0110E+02 300 3000 2 1 1 3
17. NH3 G 0 1.7031E+01 300 5000 3 1 0 0
-------------------------------------------------------------------------------

(k = A T**b exp(-E/RT))
REACTIONS CONSIDERED A b E

1. H+H+M=H2+M 1.00E+18 -1.0 0.0


H2 Enhanced by 0.000E+00
2. H+H+H2=H2+H2 9.20E+16 -0.6 0.0
3. NH+N=N2+H 3.00E+13 0.0 0.0
4. NH+H=N+H2 1.00E+14 0.0 0.0
5. NH2+H=NH+H2 6.92E+13 0.0 3650.0
6. NH3+H=NH2+H2 6.36E+05 2.4 10171.0
7. NNH=N2+H 1.00E+04 0.0 0.0
8. NNH+H=N2+H2 1.00E+14 0.0 0.0
9. NNH+NH2=N2+NH3 5.00E+13 0.0 0.0
10. NNH+NH=N2+NH2 5.00E+13 0.0 0.0
11. NH2+NH=N2H2+H 5.00E+13 0.0 0.0
12. NH+NH=N2+H+H 2.54E+13 0.0 0.0
13. NH2+N=N2+H+H 7.20E+13 0.0 0.0
14. N2H2+M=NNH+H+M 5.00E+16 0.0 50000.0
N2 Enhanced by 2.000E+00
H2 Enhanced by 2.000E+00
15. N2H2+H=NNH+H2 5.00E+13 0.0 1000.0
16. N2H2+NH=NNH+NH2 1.00E+13 0.0 1000.0
17. N2H2+NH2=NH3+NNH 1.00E+13 0.0 1000.0
18. NH2+NH2=N2H2+H2 5.00E+11 0.0 0.0
19. NH3+M=NH2+H+M 1.40E+16 0.0 90600.0
20. N2H3+H=NH2+NH2 1.60E+12 0.0 0.0
21. N2H3+M=N2H2+H+M 3.50E+16 0.0 46000.0
22. N2H3+NH=NH2+N2H2 2.00E+13 0.0 0.0
23. NH2+NH2+M=N2H4+M 3.00E+20 -1.0 0.0
24. H+N2H4=H2+N2H3 1.30E+13 0.0 2500.0
25. NH2+N2H4=NH3+N2H3 3.90E+12 0.0 1500.0
26. NH+H+M=NH2+M 2.00E+16 -0.5 0.0
27. NH2+NH2=NH3+NH 5.00E+12 0.0 10000.0
28. F+NH3=NH2+HF 4.27E+11 0.5 800.0
29. SIF4=SIF3+F 3.00E+12 0.0 147170.0
30. H+SIF4=HF+SIF3 1.00E+13 0.0 50000.0

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 33
Writing User Applications

31. NH2+SIF4=SIF3NH2+F 1.00E+11 0.0 40950.0


32. NH3+SIF3=SIF3NH2+H 1.00E+11 0.0 5000.0
33. NH3+SIF3=SIHF3+NH2 1.00E+11 0.0 10000.0

NOTE: A units mole-cm-sec-K, E units cal/mole

NO ERRORS FOUND ON INPUT:

3.3.4. Input to Surface Kinetics Pre-processor


SITE/SI3N4/ SDEN/4.1683e-9/
NHSIF(S)/2/
SIF3NH2(S)/2/
SIF2NH(S)/2/
NH2SIFNH(S)/2/
NHSIFNHSIFNH(S)/4/
NHNH2(S)/2/
END
BULK SI(D)/2.066/
BULK N(D) /1.374/
END
THERMO ALL
300. 600. 1685.
NHSIF(S) J 3/67N 1H 1SI 1F 1S 300.000 1685.000 1
0.24753989E 01 0.88112187E-03-0.20939481E-06 0.42757187E-11 0.16006564E-13 2
-0.81255620E 03-0.12188747E 02 0.84197538E 00 0.83710416E-02-0.13077030E-04 3
0.97593603E-08-0.27279380E-11-0.52486288E 03-0.45272678E 01 4
NHNH2(S) J 3/67N 2H 3SI 0F 0S 300.000 1685.000 1
0.24753989E 01 0.88112187E-03-0.20939481E-06 0.42757187E-11 0.16006564E-13 2
-0.81255620E 03-0.12188747E 02 0.84197538E 00 0.83710416E-02-0.13077030E-04 3
0.97593603E-08-0.27279380E-11-0.52486288E 03-0.45272678E 01 4
SIF3NH2(S) J 3/67N 1H 2SI 1F 3S 300.000 1685.000 1
0.24753989E 01 0.88112187E-03-0.20939481E-06 0.42757187E-11 0.16006564E-13 2
-0.81255620E 03-0.12188747E 02 0.84197538E 00 0.83710416E-02-0.13077030E-04 3
0.97593603E-08-0.27279380E-11-0.52486288E 03-0.45272678E 01 4
SIF2NH(S) J 3/67N 1H 1SI 1F 2S 300.000 1685.000 1
0.24753989E 01 0.88112187E-03-0.20939481E-06 0.42757187E-11 0.16006564E-13 2
-0.81255620E 03-0.12188747E 02 0.84197538E 00 0.83710416E-02-0.13077030E-04 3
0.97593603E-08-0.27279380E-11-0.52486288E 03-0.45272678E 01 4
NH2SIFNH(S) J 3/67N 2H 3SI 1F 1S 300.000 1685.000 1
0.24753989E 01 0.88112187E-03-0.20939481E-06 0.42757187E-11 0.16006564E-13 2
-0.81255620E 03-0.12188747E 02 0.84197538E 00 0.83710416E-02-0.13077030E-04 3
0.97593603E-08-0.27279380E-11-0.52486288E 03-0.45272678E 01 4
NHSIFNHSIFNH(S) J 3/67N 3H 3SI 2F 2S 300.000 1685.000 1
0.24753989E 01 0.88112187E-03-0.20939481E-06 0.42757187E-11 0.16006564E-13 2
-0.81255620E 03-0.12188747E 02 0.84197538E 00 0.83710416E-02-0.13077030E-04 3
0.97593603E-08-0.27279380E-11-0.52486288E 03-0.45272678E 01 4
SI(D) J 3/67SI 100 000 000 0S 300.000 1685.000 1
0.24753989E 01 0.88112187E-03-0.20939481E-06 0.42757187E-11 0.16006564E-13 2
-0.81255620E 03-0.12188747E 02 0.84197538E 00 0.83710416E-02-0.13077030E-04 3
0.97593603E-08-0.27279380E-11-0.52486288E 03-0.45272678E 01 4
N(D) J 3/67N 100 000 000 0S 300.000 1685.000 1
0.24753989E 01 0.88112187E-03-0.20939481E-06 0.42757187E-11 0.16006564E-13 2
-0.81255620E 03-0.12188747E 02 0.84197538E 00 0.83710416E-02-0.13077030E-04 3
0.97593603E-08-0.27279380E-11-0.52486288E 03-0.45272678E 01 4
END

REACTIONS
NH3 + NHSIF(S) => NHNH2(S) + SI(D) + HF 7.5620E08 0.5 0.0
SIF4 + NHNH2(S) => SIF3NH2(S) + N(D) + HF 3.0967E08 0.5 0.0
SIF3NH2(S) => SIF2NH(S) + HF 1.0000E05 0.0 0.0
NH3 + SIF2NH(S) => NH2SIFNH(S) + HF 7.5620E08 0.5 0.0
NH2SIFNH(S) + SIF2NH(S) => NHSIFNHSIFNH(S) + HF 1.0000E15 0.0 0.0
NHSIFNHSIFNH(S) + SIF2NH(S) => 3NHSIF(S) + N(D) + HF 1.0000E15 0.0 0.0
END

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
34 of ANSYS, Inc. and its subsidiaries and affiliates.
Surface Kinetics Sample Program (SKSAMPLE)

3.3.5. Output from Surface Kinetics Pre-processor

-------------------------------------------------------------------------------
SPECIES MOLECULAR ELEMENT COUNT
CONSIDERED WEIGHT Density Nsites H N SI F
-------------------------------------------------------------------------------

Gas phase species:


1. H2 2.0159E+00 2 0 0 0
2. H 1.0080E+00 1 0 0 0
3. N2 2.8013E+01 0 2 0 0
4. N 1.4007E+01 0 1 0 0
5. NH 1.5015E+01 1 1 0 0
6. NH2 1.6023E+01 2 1 0 0
7. NNH 2.9021E+01 1 2 0 0
8. N2H2 3.0029E+01 2 2 0 0
9. N2H3 3.1037E+01 3 2 0 0
10. N2H4 3.2045E+01 4 2 0 0
11. HF 2.0006E+01 1 0 0 1
12. F 1.8998E+01 0 0 0 1
13. SIF4 1.0408E+02 0 0 1 4
14. SIF3 8.5081E+01 0 0 1 3
15. SIHF3 8.6089E+01 1 0 1 3
16. SIF3NH2 1.0110E+02 2 1 1 3
17. NH3 1.7031E+01 3 1 0 0

SITE: SI3N4 0.417E-08 moles/cm**2


18. NHSIF(S) 6.2099E+01 2 1 1 1 1
19. SIF3NH2(S) 1.0110E+02 2 2 1 1 3
20. SIF2NH(S) 8.1097E+01 2 1 1 1 2
21. NH2SIFNH(S) 7.8122E+01 2 3 2 1 1
22. NHSIFNHSIFNH(S) 1.3921E+02 4 3 3 2 2
23. NHNH2(S) 3.1037E+01 2 3 2 0 0

BULK: BULK1
24. SI(D) 2.8086E+01 2.066E+00 g/cm**3 0 0 1 0

BULK: BULK2
25. N(D) 1.4007E+01 1.374E+00 g/cm**3 0 1 0 0

-------------------------------------------------------------------------------
(k = A T**b exp(-E/RT))
SURFACE REACTIONS CONSIDERED A b E

1. NH3+NHSIF(S)=>NHNH2(S)+SI(D)+HF 7.56E+08 0.5 0.0


2. SIF4+NHNH2(S)=>SIF3NH2(S)+N(D)+HF 3.10E+08 0.5 0.0
3. SIF3NH2(S)=>SIF2NH(S)+HF 1.00E+05 0.0 0.0
4. NH3+SIF2NH(S)=>NH2SIFNH(S)+HF 7.56E+08 0.5 0.0
5. NH2SIFNH(S)+SIF2NH(S) 1.00E+15 0.0 0.0
=>NHSIFNHSIFNH(S)+HF
6. NHSIFNHSIFNH(S)+SIF2NH(S) 1.00E+15 0.0 0.0
=>3NHSIF(S)+N(D)+HF

NOTE: A units mole-cm-sec-K, E units cal/mole

NO ERRORS FOUND ON INPUT:

3.3.6. Input to Chemkin Sample Program (SKSAMPLE)


2.63e-3 1713
SIF4 0.14286
NH3 0.85714
NHSIF(S) 6.251E-2
NHNH2(S) 0.91587
SIF3NH2(S) 2.354E-4
SIF2NH(S) 2.0837E-2

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 35
Writing User Applications

NH2SIFNH(S) 1.806E-4
NHSIFNHSIFNH(S) 3.6127E-4
N(D) 1.0
SI(D) 1.0
END
6.0
5.0E-2 5.0E-3

3.3.7. Output from Chemkin Sample Program (SKSAMPLE)


INPUT INITIAL PRESSURE(ATM) AND TEMPERATURE(K)
0.263E-02 0.171E+04

INPUT INITIAL ACTIVITY OF NEXT SPECIES


SIF4 0.14286

INPUT INITIAL ACTIVITY OF NEXT SPECIES


NH3 0.85714

INPUT INITIAL ACTIVITY OF NEXT SPECIES


NHSIF(S) 6.251E-2

INPUT INITIAL ACTIVITY OF NEXT SPECIES


NHNH2(S) 0.91587

INPUT INITIAL ACTIVITY OF NEXT SPECIES


SIF3NH2(S) 2.354E-4

INPUT INITIAL ACTIVITY OF NEXT SPECIES


SIF2NH(S) 2.0837E-2

INPUT INITIAL ACTIVITY OF NEXT SPECIES


NH2SIFNH(S) 1.806E-4

INPUT INITIAL ACTIVITY OF NEXT SPECIES


NHSIFNHSIFNH(S) 3.6127E-4

INPUT INITIAL ACTIVITY OF NEXT SPECIES


N(D) 1.0

INPUT INITIAL ACTIVITY OF NEXT SPECIES


SI(D) 1.0

INPUT INITIAL ACTIVITY OF NEXT SPECIES


END

INPUT SURFACE AREA TO VOLUME RATIO


0.600E+01

INPUT FINAL TIME AND DT


0.500E-01 0.500E-02

TIME = 0.000000000000000E+000
GAS-PHASE STATE
P = 2.6648E+03 T = 1.7130E+03 DENSITY = 5.5132E-07
GAS-PHASE MOLE FRACTIONS
H2 = 0.000E+00 H = 0.000E+00 N2 = 0.000E+00
N = 0.000E+00 NH = 0.000E+00 NH2 = 0.000E+00
NNH = 0.000E+00 N2H2 = 0.000E+00 N2H3 = 0.000E+00
N2H4 = 0.000E+00 HF = 0.000E+00 F = 0.000E+00
SIF4 = 1.429E-01 SIF3 = 0.000E+00 SIHF3 = 0.000E+00
SIF3NH2 = 0.000E+00 NH3 = 8.571E-01
SURFACE SITE FRACTIONS ON PHASE (SITE) 2
NHSIF(S) = 6.251E-02 SIF3NH2(S) = 2.354E-04 SIF2NH(S) = 2.084E-02
NH2SIFNH(S) = 1.806E-04 NHSIFNHSIFNH= 3.613E-04 NHNH2(S) = 9.159E-01
SUM OF SURFACE SITE FRACTIONS 1.000E+00
SURFACE SITE DENSITY 4.168E-09
BULK DEPOSITION (GM/CM**2) IN PHASE 3
SI(D) = 0.000E+00

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
36 of ANSYS, Inc. and its subsidiaries and affiliates.
Surface Kinetics Sample Program (SKSAMPLE)

BULK DEPOSITION (GM/CM**2) IN PHASE 4


N(D) = 0.000E+00

TIME = 5.000000000000000E-003
GAS-PHASE STATE
P = 3.0065E+03 T = 1.7130E+03 DENSITY = 4.8817E-07
GAS-PHASE MOLE FRACTIONS
H2 = 2.704E-06 H = 2.254E-08 N2 = 1.863E-10
N = 2.284E-14 NH = 3.420E-10 NH2 = 5.428E-06
NNH = 1.422E-11 N2H2 = 3.396E-10 N2H3 = 1.230E-11
N2H4 = 5.744E-13 HF = 2.829E-01 F = 3.559E-11
SIF4 = 6.035E-02 SIF3 = 8.522E-11 SIHF3 = 2.630E-11
SIF3NH2 = 1.277E-10 NH3 = 6.568E-01
SURFACE SITE FRACTIONS ON PHASE (SITE) 2
NHSIF(S) = 4.850E-02 SIF3NH2(S) = 1.534E-04 SIF2NH(S) = 1.291E-02
NH2SIFNH(S) = 2.084E-04 NHSIFNHSIFNH= 4.171E-04 NHNH2(S) = 9.378E-01
SUM OF SURFACE SITE FRACTIONS 1.000E+00
SURFACE SITE DENSITY 4.168E-09
BULK DEPOSITION (GM/CM**2) IN PHASE 3
SI(D) = 4.700E-08
BULK DEPOSITION (GM/CM**2) IN PHASE 4
N(D) = 2.659E-08

TIME = 1.000000000000000E-002
GAS-PHASE STATE
P = 3.1752E+03 T = 1.7130E+03 DENSITY = 4.5844E-07
GAS-PHASE MOLE FRACTIONS
H2 = 5.055E-06 H = 2.264E-08 N2 = 2.256E-09
N = 2.490E-13 NH = 1.807E-09 NH2 = 1.011E-05
NNH = 7.943E-11 N2H2 = 1.742E-09 N2H3 = 5.209E-11
N2H4 = 2.231E-12 HF = 4.074E-01 F = 1.104E-10
SIF4 = 2.667E-02 SIF3 = 5.378E-11 SIHF3 = 4.881E-11
SIF3NH2 = 2.443E-10 NH3 = 5.659E-01
SURFACE SITE FRACTIONS ON PHASE (SITE) 2
NHSIF(S) = 2.927E-02 SIF3NH2(S) = 7.350E-05 SIF2NH(S) = 6.970E-03
NH2SIFNH(S) = 1.896E-04 NHSIFNHSIFNH= 3.797E-04 NHNH2(S) = 9.631E-01
SUM OF SURFACE SITE FRACTIONS 1.000E+00
SURFACE SITE DENSITY 4.168E-09
BULK DEPOSITION (GM/CM**2) IN PHASE 3
SI(D) = 7.497E-08
BULK DEPOSITION (GM/CM**2) IN PHASE 4
N(D) = 3.963E-08

TIME = 1.500000000000000E-002
GAS-PHASE STATE
P = 3.2558E+03 T = 1.7130E+03 DENSITY = 4.4466E-07
GAS-PHASE MOLE FRACTIONS
H2 = 7.295E-06 H = 2.281E-08 N2 = 8.864E-09
N = 9.816E-13 NH = 4.684E-09 NH2 = 1.453E-05
NNH = 1.978E-10 N2H2 = 4.189E-09 N2H3 = 1.147E-10
N2H4 = 4.816E-12 HF = 4.647E-01 F = 1.958E-10
SIF4 = 1.193E-02 SIF3 = 2.873E-11 SIHF3 = 6.054E-11
SIF3NH2 = 3.091E-10 NH3 = 5.233E-01
SURFACE SITE FRACTIONS ON PHASE (SITE) 2
NHSIF(S) = 1.601E-02 SIF3NH2(S) = 3.431E-05 SIF2NH(S) = 3.499E-03
NH2SIFNH(S) = 1.798E-04 NHSIFNHSIFNH= 3.600E-04 NHNH2(S) = 9.799E-01
SUM OF SURFACE SITE FRACTIONS 1.000E+00
SURFACE SITE DENSITY 4.168E-09
BULK DEPOSITION (GM/CM**2) IN PHASE 3
SI(D) = 8.990E-08
BULK DEPOSITION (GM/CM**2) IN PHASE 4
N(D) = 4.585E-08

TIME = 2.000000000000000E-002
GAS-PHASE STATE
P = 3.2934E+03 T = 1.7130E+03 DENSITY = 4.3840E-07
GAS-PHASE MOLE FRACTIONS
H2 = 9.524E-06 H = 2.306E-08 N2 = 2.265E-08
N = 2.505E-12 NH = 9.016E-09 NH2 = 1.888E-05
NNH = 3.679E-10 N2H2 = 7.662E-09 N2H3 = 1.994E-10
N2H4 = 8.295E-12 HF = 4.914E-01 F = 2.798E-10
SIF4 = 5.356E-03 SIF3 = 1.435E-11 SIHF3 = 6.631E-11

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 37
Writing User Applications

SIF3NH2 = 3.429E-10 NH3 = 5.032E-01


SURFACE SITE FRACTIONS ON PHASE (SITE) 2
NHSIF(S) = 8.165E-03 SIF3NH2(S) = 1.573E-05 SIF2NH(S) = 1.670E-03
NH2SIFNH(S) = 1.749E-04 NHSIFNHSIFNH= 3.502E-04 NHNH2(S) = 9.896E-01
SUM OF SURFACE SITE FRACTIONS 1.000E+00
SURFACE SITE DENSITY 4.168E-09
BULK DEPOSITION (GM/CM**2) IN PHASE 3
SI(D) = 9.750E-08
BULK DEPOSITION (GM/CM**2) IN PHASE 4
N(D) = 4.874E-08

TIME = 2.500000000000000E-002
GAS-PHASE STATE
P = 3.3106E+03 T = 1.7130E+03 DENSITY = 4.3558E-07
GAS-PHASE MOLE FRACTIONS
H2 = 1.178E-05 H = 2.339E-08 N2 = 4.629E-08
N = 5.001E-12 NH = 1.472E-08 NH2 = 2.322E-05
NNH = 5.909E-10 N2H2 = 1.220E-08 N2H3 = 3.066E-10
N2H4 = 1.267E-11 HF = 5.038E-01 F = 3.595E-10
SIF4 = 2.405E-03 SIF3 = 6.877E-12 SIHF3 = 6.908E-11
SIF3NH2 = 3.599E-10 NH3 = 4.937E-01
SURFACE SITE FRACTIONS ON PHASE (SITE) 2
NHSIF(S) = 3.963E-03 SIF3NH2(S) = 7.140E-06 SIF2NH(S) = 7.736E-04
NH2SIFNH(S) = 1.725E-04 NHSIFNHSIFNH= 3.455E-04 NHNH2(S) = 9.947E-01
SUM OF SURFACE SITE FRACTIONS 1.000E+00
SURFACE SITE DENSITY 4.168E-09
BULK DEPOSITION (GM/CM**2) IN PHASE 3
SI(D) = 1.012E-07
BULK DEPOSITION (GM/CM**2) IN PHASE 4
N(D) = 5.006E-08

TIME = 3.000000000000000E-002
GAS-PHASE STATE
P = 3.3184E+03 T = 1.7130E+03 DENSITY = 4.3431E-07
GAS-PHASE MOLE FRACTIONS
H2 = 1.408E-05 H = 2.380E-08 N2 = 8.252E-08
N = 8.522E-12 NH = 2.167E-08 NH2 = 2.756E-05
NNH = 8.688E-10 N2H2 = 1.786E-08 N2H3 = 4.368E-10
N2H4 = 1.794E-11 HF = 5.095E-01 F = 4.354E-10
SIF4 = 1.080E-03 SIF3 = 3.211E-12 SIHF3 = 7.037E-11
SIF3NH2 = 3.683E-10 NH3 = 4.894E-01
SURFACE SITE FRACTIONS ON PHASE (SITE) 2
NHSIF(S) = 1.861E-03 SIF3NH2(S) = 3.222E-06 SIF2NH(S) = 3.526E-04
NH2SIFNH(S) = 1.714E-04 NHSIFNHSIFNH= 3.433E-04 NHNH2(S) = 9.973E-01
SUM OF SURFACE SITE FRACTIONS 1.000E+00
SURFACE SITE DENSITY 4.168E-09
BULK DEPOSITION (GM/CM**2) IN PHASE 3
SI(D) = 1.030E-07
BULK DEPOSITION (GM/CM**2) IN PHASE 4
N(D) = 5.066E-08

TIME = 3.500000000000000E-002
GAS-PHASE STATE
P = 3.3220E+03 T = 1.7130E+03 DENSITY = 4.3374E-07
GAS-PHASE MOLE FRACTIONS
H2 = 1.643E-05 H = 2.429E-08 N2 = 1.342E-07
N = 1.300E-11 NH = 2.974E-08 NH2 = 3.191E-05
NNH = 1.203E-09 N2H2 = 2.465E-08 N2H3 = 5.901E-10
N2H4 = 2.413E-11 HF = 5.121E-01 F = 5.086E-10
SIF4 = 4.849E-04 SIF3 = 1.476E-12 SIHF3 = 7.096E-11
SIF3NH2 = 3.723E-10 NH3 = 4.874E-01
SURFACE SITE FRACTIONS ON PHASE (SITE) 2
NHSIF(S) = 8.564E-04 SIF3NH2(S) = 1.450E-06 SIF2NH(S) = 1.594E-04
NH2SIFNH(S) = 1.709E-04 NHSIFNHSIFNH= 3.422E-04 NHNH2(S) = 9.985E-01
SUM OF SURFACE SITE FRACTIONS 1.000E+00
SURFACE SITE DENSITY 4.168E-09
BULK DEPOSITION (GM/CM**2) IN PHASE 3
SI(D) = 1.038E-07
BULK DEPOSITION (GM/CM**2) IN PHASE 4
N(D) = 5.093E-08

TIME = 4.000000000000000E-002

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
38 of ANSYS, Inc. and its subsidiaries and affiliates.
Surface Kinetics Sample Program (SKSAMPLE)

GAS-PHASE STATE
P = 3.3236E+03 T = 1.7130E+03 DENSITY = 4.3349E-07
GAS-PHASE MOLE FRACTIONS
H2 = 1.884E-05 H = 2.486E-08 N2 = 2.041E-07
N = 1.831E-11 NH = 3.881E-08 NH2 = 3.625E-05
NNH = 1.596E-09 N2H2 = 3.262E-08 N2H3 = 7.664E-10
N2H4 = 3.121E-11 HF = 5.132E-01 F = 5.803E-10
SIF4 = 2.177E-04 SIF3 = 6.732E-13 SIHF3 = 7.123E-11
SIF3NH2 = 3.743E-10 NH3 = 4.865E-01
SURFACE SITE FRACTIONS ON PHASE (SITE) 2
NHSIF(S) = 3.895E-04 SIF3NH2(S) = 6.515E-07 SIF2NH(S) = 7.180E-05
NH2SIFNH(S) = 1.707E-04 NHSIFNHSIFNH= 3.418E-04 NHNH2(S) = 9.990E-01
SUM OF SURFACE SITE FRACTIONS 1.000E+00
SURFACE SITE DENSITY 4.168E-09
BULK DEPOSITION (GM/CM**2) IN PHASE 3
SI(D) = 1.041E-07
BULK DEPOSITION (GM/CM**2) IN PHASE 4
N(D) = 5.105E-08

TIME = 4.500000000000000E-002
GAS-PHASE STATE
P = 3.3243E+03 T = 1.7130E+03 DENSITY = 4.3337E-07
GAS-PHASE MOLE FRACTIONS
H2 = 2.131E-05 H = 2.553E-08 N2 = 2.953E-07
N = 2.427E-11 NH = 4.878E-08 NH2 = 4.060E-05
NNH = 2.047E-09 N2H2 = 4.177E-08 N2H3 = 9.658E-10
N2H4 = 3.920E-11 HF = 5.138E-01 F = 6.511E-10
SIF4 = 9.773E-05 SIF3 = 3.069E-13 SIHF3 = 7.135E-11
SIF3NH2 = 3.752E-10 NH3 = 4.861E-01
SURFACE SITE FRACTIONS ON PHASE (SITE) 2
NHSIF(S) = 1.760E-04 SIF3NH2(S) = 2.926E-07 SIF2NH(S) = 3.228E-05
NH2SIFNH(S) = 1.706E-04 NHSIFNHSIFNH= 3.416E-04 NHNH2(S) = 9.993E-01
SUM OF SURFACE SITE FRACTIONS 1.000E+00
SURFACE SITE DENSITY 4.168E-09
BULK DEPOSITION (GM/CM**2) IN PHASE 3
SI(D) = 1.043E-07
BULK DEPOSITION (GM/CM**2) IN PHASE 4
N(D) = 5.111E-08

TIME = 5.000000000000000E-002
GAS-PHASE STATE
P = 3.3246E+03 T = 1.7130E+03 DENSITY = 4.3332E-07
GAS-PHASE MOLE FRACTIONS
H2 = 2.386E-05 H = 2.628E-08 N2 = 4.107E-07
N = 3.071E-11 NH = 5.957E-08 NH2 = 4.494E-05
NNH = 2.558E-09 N2H2 = 5.211E-08 N2H3 = 1.188E-09
N2H4 = 4.810E-11 HF = 5.140E-01 F = 7.215E-10
SIF4 = 4.387E-05 SIF3 = 1.412E-13 SIHF3 = 7.140E-11
SIF3NH2 = 3.756E-10 NH3 = 4.859E-01
SURFACE SITE FRACTIONS ON PHASE (SITE) 2
NHSIF(S) = 7.928E-05 SIF3NH2(S) = 1.314E-07 SIF2NH(S) = 1.450E-05
NH2SIFNH(S) = 1.705E-04 NHSIFNHSIFNH= 3.415E-04 NHNH2(S) = 9.994E-01
SUM OF SURFACE SITE FRACTIONS 1.000E+00
SURFACE SITE DENSITY 4.168E-09
BULK DEPOSITION (GM/CM**2) IN PHASE 3
SI(D) = 1.044E-07
BULK DEPOSITION (GM/CM**2) IN PHASE 4
N(D) = 5.113E-08

TIME = 5.000000000000000E-002
GAS-PHASE STATE
P = 3.3246E+03 T = 1.7130E+03 DENSITY = 4.3332E-07
GAS-PHASE MOLE FRACTIONS
H2 = 2.386E-05 H = 2.628E-08 N2 = 4.107E-07
N = 3.071E-11 NH = 5.957E-08 NH2 = 4.494E-05
NNH = 2.558E-09 N2H2 = 5.211E-08 N2H3 = 1.188E-09
N2H4 = 4.810E-11 HF = 5.140E-01 F = 7.215E-10
SIF4 = 4.387E-05 SIF3 = 1.412E-13 SIHF3 = 7.140E-11
SIF3NH2 = 3.756E-10 NH3 = 4.859E-01
SURFACE SITE FRACTIONS ON PHASE (SITE) 2
NHSIF(S) = 7.928E-05 SIF3NH2(S) = 1.314E-07 SIF2NH(S) = 1.450E-05
NH2SIFNH(S) = 1.705E-04 NHSIFNHSIFNH= 3.415E-04 NHNH2(S) = 9.994E-01

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 39
Writing User Applications

SUM OF SURFACE SITE FRACTIONS 1.000E+00


SURFACE SITE DENSITY 4.168E-09

BULK DEPOSITION (GM/CM**2) IN PHASE 3


SI(D) = 1.044E-07
BULK DEPOSITION (GM/CM**2) IN PHASE 4
N(D) = 5.113E-08
STOP...TIME LIMIT REACHED...

3.4. Transport Sample Problem (PROPS)


PROPS is an example FORTRAN program for directly accessing the Transport Subroutine Library. The
interactive interface will prompt the user through a command-line interface for input to define the re-
quested calculation, or the input can be provided by an input file, a sample of which is provided. The
user can request calculation of temperature-dependent pure-species values of:

1. Binary diffusion coefficient

2. Thermal conductivities

3. Viscosities

4. Kinematic viscosities

5. Constant-pressure specific heats

6. Constant-volume specific heats

7. Specific heat ratios

8. Isentropic speed of sound

Also, if a previously generated solution is available, the user can additionally request calculation of
solution-dependent mixture values of:

9. Mixture-averaged diffusion coefficients

10. Ordinary multi-component diffusion coefficients

11. Thermal diffusion coefficients

12. Mixture thermal conductivities

13. Mixture viscosity

3.4.1. Discussion of Sample Problem


The sample problem handles each of the 13 possible types of values listed above. The problem requires
not only the chem.inp file (this file has been changed from earlier examples, to facilitate mixture
processes), but also pre-processing of the Transport Properties, which requires the solution of the
Premixed Flame problem that makes up part of this sample. The Transport pre-processing can be
specified by the -f flag on the mechanism pre-processor command line, or in the ANSYS Chemkin-

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
40 of ANSYS, Inc. and its subsidiaries and affiliates.
Transport Sample Problem (PROPS)

Pro user interface with the checkbox for fitting Transport data. Mixture processes additionally require
an application solution, such as that of the Premixed Flame problem included in this sample.

Note:

When using this example, you must (i) ensure FLEXLM_ARCH is set (see Recompiling and
Linking a User Subroutine (p. 18) ) and (ii) edit the .inc makefile so that the CKROOT variable
is set to the location of your ANSYS Chemkin-Pro installation (see Compile and Link (p. 23)
).

3.4.2. Input to Gas-phase Kinetics Pre-processor


The input file for the Gas-phase Kinetics pre-processor is in the ANSYS Chemkin-Pro installation direct-
ories at:

/samples2010/sample_apps_f77/props/chem.inp

3.4.3. Output from Gas-phase Kinetics Pre-processor


The sample run results in a file:

/samples2010/sample_apps_f77/props/chem.out

3.4.4. Input to Premixed Flame Model


The input file for the Premixed Flame model is in the ANSYS Chemkin-Pro file directories at:

/samples2010/sample_apps_f77/props/premix.inp

3.4.5. Output from Premixed Flame Model


Running the Premixed Flame model sample results in this output file:

/samples2010/sample_apps_f77/props/premix.out

3.4.6. Input to Chemkin Sample Program (PROPS)


The input file for the Transport sample problem is in the ANSYS Chemkin-Pro file directories at:

/samples2010/sample_apps_f77/props/props.inp

3.4.7. Output from Chemkin Sample Program (PROPS)


The 13 different possible requested values listed in Transport Sample Problem (PROPS) (p. 40) each
produce an output file.

Value File
Binary diffusion coefficient diff-
coef.out

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 41
Writing User Applications

Value File
Thermal conductivities therm-
cond.out
Viscosities vis-
cos.out
Kinematic viscosities kin-
visc.out
Constant-pressure specific heats con-
pcp.out
Constant-volume specific heats con-
vcp.out
Specific heat ratios cpra-
tio.out
Isentropic speed of sound asound.out
Mixture-averaged diffusion coefficients mixavg.out
Ordinary multicomponent diffusion multid-
coefficients iff.out
Thermal diffusion coefficients mixdiff.out
Mixture thermal conductivities mix-
cond.out
Mixture viscosity mixvis.out

3.5. VODE Summary


The VODE solverEquation 3.1 (p. 26) is reliable for the solution of a wide range of stiff initial-value
problems. The source code for the solver is provided in the ANSYS Chemkin-Pro subdirectory
source_public\vode.f (PC), source_public/vode.f (UNIX), which is extensively commented
as to its implementation.
SUBROUTINE DVODE (F, NEQ, Y, T, TOUT, ITOL, RTOL, ATOL, ITASK,
1 ISTATE, IOPT, RWORK, LRW, IWORK, LIW, JAC, MF,
2 RPAR, IPAR)
EXTERNAL F, JAC
DOUBLE PRECISION Y, T, TOUT, RTOL, ATOL, RWORK, RPAR
INTEGER NEQ, ITOL, ITASK, ISTATE, IOPT, LRW, IWORK, LIW,
1 MF, IPAR
DIMENSION Y(*), RTOL(*), ATOL(*), RWORK(LRW), IWORK(LIW),
1 RPAR(*), IPAR(*)
C-----------------------------------------------------------------------
C DVODE.. Variable-coefficient Ordinary Differential Equation solver,
C with fixed-leading coefficient implementation.
C This version is in double precision.
C
C DVODE solves the initial value problem for stiff or nonstiff
C systems of first order ODEs,
C dy/dt = f(t,y) , or, in component form,
C dy(i)/dt = f(i) = f(i,t,y(1),y(2),...,y(NEQ)) (i = 1,...,NEQ).
C DVODE is a package based on the EPISODE and EPISODEB packages, and
C on the ODEPACK user interface standard, with minor modifications.
C-----------------------------------------------------------------------
C Revision History (YYMMDD)
C 890615 Date Written
C 890922 Added interrupt/restart ability, minor changes throughout.
C 910228 Minor revisions in line format, prologue, etc.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
42 of ANSYS, Inc. and its subsidiaries and affiliates.
VODE Summary

C 920227 Modifications by D. Pang:


C (1) Applied subgennam to get generic intrinsic names.
C (2) Changed intrinsic names to generic in comments.
C (3) Added *DECK lines before each routine.
C 920721 Names of routines and labeled Common blocks changed, so as
C to be unique in combined single/double precision code (ACH).
C 920722 Minor revisions to prologue (ACH).
C 920831 Conversion to double precision done (ACH).
C-----------------------------------------------------------------------
C References..
C
C 1. P. N. Brown, G. D. Byrne, and A. C. Hindmarsh, "VODE: A Variable
C Coefficient ODE Solver," SIAM J. Sci. Stat. Comput., 10 (1989),
C pp. 1038-1051. Also, LLNL Report UCRL-98412, June 1988.
C 2. G. D. Byrne and A. C. Hindmarsh, "A Polyalgorithm for the
C Numerical Solution of Ordinary Differential Equations,"
C ACM Trans. Math. Software, 1 (1975), pp. 71-96.
C 3. A. C. Hindmarsh and G. D. Byrne, "EPISODE: An Effective Package
C for the Integration of Systems of Ordinary Differential
C Equations," LLNL Report UCID-30112, Rev. 1, April 1977.
C 4. G. D. Byrne and A. C. Hindmarsh, "EPISODEB: An Experimental
C Package for the Integration of Systems of Ordinary Differential
C Equations with Banded Jacobians," LLNL Report UCID-30132, April
C 1976.
C 5. A. C. Hindmarsh, "ODEPACK, a Systematized Collection of ODE
C Solvers," in Scientific Computing, R. S. Stepleman et al., eds.,
C North-Holland, Amsterdam, 1983, pp. 55-64.
C 6. K. R. Jackson and R. Sacks-Davis, "An Alternative Implementation
C of Variable Step-Size Multistep Formulas for Stiff ODEs," ACM
C Trans. Math. Software, 6 (1980), pp. 295-318.
C-----------------------------------------------------------------------
C Authors..
C
C Peter N. Brown and Alan C. Hindmarsh
C Computing and Mathematics Research Division, L-316
C Lawrence Livermore National Laboratory
C Livermore, CA 94550
C and
C George D. Byrne
C Exxon Research and Engineering Co.
C Clinton Township
C Route 22 East
C Annandale, NJ 08801
C-----------------------------------------------------------------------
C Summary of usage.
C
C Communication between the user and the DVODE package, for normal
C situations, is summarized here. This summary describes only a subset
C of the full set of options available. See the full description for
C details, including optional communication, nonstandard options,
C and instructions for special situations. See also the example
C problem (with program and output) following this summary.
C
C A. First provide a subroutine of the form..
C
C SUBROUTINE F (NEQ, T, Y, YDOT, RPAR, IPAR)
C DOUBLE PRECISION T, Y, YDOT, RPAR
C DIMENSION Y(NEQ), YDOT(NEQ)
C
C which supplies the vector function f by loading YDOT(i) with f(i).
C
C B. Next determine (or guess) whether or not the problem is stiff.
C Stiffness occurs when the Jacobian matrix df/dy has an eigenvalue
C whose real part is negative and large in magnitude, compared to the
C reciprocal of the t span of interest. If the problem is nonstiff,
C use a method flag MF = 10. If it is stiff, there are four standard
C choices for MF (21, 22, 24, 25), and DVODE requires the Jacobian
C matrix in some form. In these cases (MF .gt. 0), DVODE will use a
C saved copy of the Jacobian matrix. If this is undesirable because of
C storage limitations, set MF to the corresponding negative value
C (-21, -22, -24, -25). (See full description of MF below.)
C The Jacobian matrix is regarded either as full (MF = 21 or 22),

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 43
Writing User Applications

C or banded (MF = 24 or 25). In the banded case, DVODE requires two


C half-bandwidth parameters ML and MU. These are, respectively, the
C widths of the lower and upper parts of the band, excluding the main
C diagonal. Thus the band consists of the locations (i,j) with
C i-ML .le. j .le. i+MU, and the full bandwidth is ML+MU+1.
C
C C. If the problem is stiff, you are encouraged to supply the Jacobian
C directly (MF = 21 or 24), but if this is not feasible, DVODE will
C compute it internally by difference quotients (MF = 22 or 25).
C If you are supplying the Jacobian, provide a subroutine of the form..
C
C SUBROUTINE JAC (NEQ, T, Y, ML, MU, PD, NROWPD, RPAR, IPAR)
C DOUBLE PRECISION T, Y, PD, RPAR
C DIMENSION Y(NEQ), PD(NROWPD,NEQ)
C
C which supplies df/dy by loading PD as follows..
C For a full Jacobian (MF = 21), load PD(i,j) with df(i)/dy(j),
C the partial derivative of f(i) with respect to y(j). (Ignore the
C ML and MU arguments in this case.)
C For a banded Jacobian (MF = 24), load PD(i-j+MU+1,j) with
C df(i)/dy(j), i.e. load the diagonal lines of df/dy into the rows of
C PD from the top down.
C In either case, only nonzero elements need be loaded.
C
C D. Write a main program which calls subroutine DVODE once for
C each point at which answers are desired. This should also provide
C for possible use of logical unit 6 for output of error messages
C by DVODE. On the first call to DVODE, supply arguments as follows..
C F = Name of subroutine for right-hand side vector f.
C This name must be declared external in calling program.
C NEQ = Number of first order ODE-s.
C Y = Array of initial values, of length NEQ.
C T = The initial value of the independent variable.
C TOUT = First point where output is desired (.ne. T).
C ITOL = 1 or 2 according as ATOL (below) is a scalar or array.
C RTOL = Relative tolerance parameter (scalar).
C ATOL = Absolute tolerance parameter (scalar or array).
C The estimated local error in Y(i) will be controlled so as
C to be roughly less (in magnitude) than
C EWT(i) = RTOL*abs(Y(i)) + ATOL if ITOL = 1, or
C EWT(i) = RTOL*abs(Y(i)) + ATOL(i) if ITOL = 2.
C Thus the local error test passes if, in each component,
C either the absolute error is less than ATOL (or ATOL(i)),
C or the relative error is less than RTOL.
C Use RTOL = 0.0 for pure absolute error control, and
C use ATOL = 0.0 (or ATOL(i) = 0.0) for pure relative error
C control. Caution.. Actual (global) errors may exceed these
C local tolerances, so choose them conservatively.
C ITASK = 1 for normal computation of output values of Y at t = TOUT.
C ISTATE = Integer flag (input and output). Set ISTATE = 1.
C IOPT = 0 to indicate no optional input used.
C RWORK = Real work array of length at least..
C 20 + 16*NEQ for MF = 10,
C 22 + 9*NEQ + 2*NEQ**2 for MF = 21 or 22,
C 22 + 11*NEQ + (3*ML + 2*MU)*NEQ for MF = 24 or 25.
C LRW = Declared length of RWORK (in user's DIMENSION statement).
C IWORK = Integer work array of length at least..
C 30 for MF = 10,
C 30 + NEQ for MF = 21, 22, 24, or 25.
C If MF = 24 or 25, input in IWORK(1),IWORK(2) the lower
C and upper half-bandwidths ML,MU.
C LIW = Declared length of IWORK (in user's DIMENSION).
C JAC = Name of subroutine for Jacobian matrix (MF = 21 or 24).
C If used, this name must be declared external in calling
C program. If not used, pass a dummy name.
C MF = Method flag. Standard values are..
C 10 for nonstiff (Adams) method, no Jacobian used.
C 21 for stiff (BDF) method, user-supplied full Jacobian.
C 22 for stiff method, internally generated full Jacobian.
C 24 for stiff method, user-supplied banded Jacobian.
C 25 for stiff method, internally generated banded Jacobian.
C RPAR,IPAR = user-defined real and integer arrays passed to F and JAC.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
44 of ANSYS, Inc. and its subsidiaries and affiliates.
VODE Summary

C Note that the main program must declare arrays Y, RWORK, IWORK,
C and possibly ATOL, RPAR, and IPAR.
C
C E. The output from the first call (or any call) is..
C Y = Array of computed values of y(t) vector.
C T = Corresponding value of independent variable (normally TOUT).
C ISTATE = 2 if DVODE was successful, negative otherwise.
C -1 means excess work done on this call. (Perhaps wrong MF.)
C -2 means excess accuracy requested. (Tolerances too small.)
C -3 means illegal input detected. (See printed message.)
C -4 means repeated error test failures. (Check all input.)
C -5 means repeated convergence failures. (Perhaps bad
C Jacobian supplied or wrong choice of MF or tolerances.)
C -6 means error weight became zero during problem. (Solution
C component i vanished, and ATOL or ATOL(i) = 0.)
C F. To continue the integration after a successful return, simply
C reset TOUT and call DVODE again. No other parameters need be reset.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 45
Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
46 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 4: Quick Reference Guide to the Gas-phase Kinetics
Subroutine Library
This chapter is arranged by topical area to provide a quick reference to each of the Gas-phase Kinetics
Library Subroutines. In addition to the subroutine call list itself, the purpose of the subroutine is briefly
described. Where appropriate, the description refers to an equation number in Chemkin-Pro Theory
Manual . Detailed descriptions of the subroutines are included alphabetically in Alphabetical Listing of
the Gas-phase Kinetics Subroutine Library (p. 79) .

4.1. Mnemonics
There are some good rules of thumb that explain the subroutine naming conventions. All subroutine
names (with the exception of PKINDX) begin with the letters CK so that Gas-phase Kinetics subroutines
are easily recognized and so that they are likely different from any user subroutine names. The four
remaining letters identify the purpose of the subroutine: The first one or two usually refer to the variable
that is being computed; the last letters refer to either the input variables or the units.

State variables are denoted by P (pressure), T (temperature), Y ( mass fraction), X ( mole fraction), and
C ( molar concentration). Thermodynamic properties are referred to by CP and CV (Specific heats), H
(enthalpy), S (entropy), U (internal energy), G (Gibbs free energy), and A (Helmholtz free energy). The
thermodynamic property subroutines may be called to return properties in mass units, denoted by MS
or S as the last letter(s), or in molar units, denoted by ML or L as the last letter(s). The letter B (for the
bar as in ) in a thermodynamic property subroutine name indicates that it returns mean mixture
properties.

Subroutines that return net chemical production rates have a W (for ) following the CK, and routines
that return creation and destruction rates or creation rates and destruction times have a CD or a CT,
respectively, following the CK. Rate-of-progress variables are denoted by Q and equilibrium constants
by EQ.

The mnemonics for the input and output variable names in the subroutine calls are roughly the same
as for the subroutine names.

In most cases the subroutines are backwards compatible with previous versions of Chemkin. However,
there are a few cases where either the functionality is different or the call list has changed, but we have
kept the same subroutine name. These are annotated with an asterisk(s).

Note:

All routines for which the call list or functionality may have changed from the original version
of Chemkin are identified by an asterisk. Subroutines whose call lists have changed since
later versions, known as Chemkin II, are indicated by a double asterisk.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 47
Quick Reference Guide to the Gas-phase Kinetics Subroutine Library

4.2. Initialization
Table 4.1: Initialization Subroutines

Subroutine Description
SUBROUTINE CKINDX (ICKWRK, RCKWRK, MM, Returns a group of indices
KK, II, NFIT)* defining the size of the
particular reaction mechanism.
SUBROUTINE CKINIT (LENICK, LENRCK, Reads the linkfile and creates
LENCCK, LINC, LOUT, ICKWRK, RCKWRK, the internal work arrays
CCKWRK, IFLAG)** ICKWRK, RCKWRK and CCKWRK.
CKINIT must be called before
any other Gas-phase Kinetics
subroutine can be used, as the
work arrays must be available
as their input.
SUBROUTINE CKKTFL (ICKWRK, KTFL) Allows the user to assign a
location in the temperature
array to use for each gas-phase
species.
SUBROUTINE CKLEN (LINC, LOUT, LENI, Returns the lengths required
LENR, LENC, IFLAG) for work arrays.
SUBROUTINE CKLEN2 (LINC, LOUT, LI, LR, Returns the lengths required
LC, MM, KK, II, MAXSP, MAXTP, MAXTB, for work arrays, as well as
MAXORD, KKI, IFLAG) mechanism size information for
memory allocation.
SUBROUTINE CKPNT (LSAVE, LOUT, NPOINT, Reads from a file information
VERS, PREC, LENI, LENR, LENC, KERR) about a Gas-phase Kinetics
linkfile, and pointers for work
arrays.
SUBROUTINE CKREWR (LINC, LOUT, ICKWRK, Rewrites a new linkfile from the
RCKWRK, CCKWRK, IFLAG) data stored in ICKWRK, RCKWRK
and CCKWRK.
SUBROUTINE CKSAVE (LOUT, LSAVE, ICKWRK, Writes to a binary file
RCKWRK, CCKWRK) information about a Gas-phase
Kinetics linkfile, pointers for the
Gas-phase Kinetics Subroutine
Library, and Gas-phase Kinetics
work arrays.
SUBROUTINE PKINDX (ICKWRK, KELECT, Returns plasma indices for the
KKION) particular reaction mechanism.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
48 of ANSYS, Inc. and its subsidiaries and affiliates.
Information About Species

4.3. Information About Elements


Table 4.2: Information about Elements Subroutines

Subroutine Description
REAL FUNCTION CKATOM (ENAME) Returns atomic weight, given
character-string element name.
SUBROUTINE CKAWT (ICKWRK, RCKWRK, AWT) Returns the atomic weights of
the elements.
SUBROUTINE CKCOMP (IST, IRAY, II, I)* Returns the index of an
element of a reference
character string array which
corresponds to a character
string; leading and trailing
blanks are ignored.
SUBROUTINE CKSYME (CCKWRK, LOUT, ENAME, Returns the character strings of
KERR)* element names.

4.4. Information About Species


Table 4.3: Information about Species Subroutines

Subroutine Description
SUBROUTINE CKCHRG (ICKWRK, RCKWRK, Returns the electronic charges
KCHARG) of the species.
SUBROUTINE CKCOMP (IST, IRAY, II, I)* Returns the index of an
element of a reference
character string array which
corresponds to a character
string; leading and trailing
blanks are ignored.
SUBROUTINE CKION (ICKWRK, KION) Returns the ion species indices.
SUBROUTINE CKNCF (MDIM, ICKWRK, RCKWRK, Returns the elemental
NCF) composition of the species.
SUBROUTINE CKPHAZ (ICKWRK, RCKWRK, Returns a set of flags indicating
KPHASE) phases of the species
SUBROUTINE CKSYMS (CCKWRK, LOUT, KNAME, Returns the character strings of
KERR)* species names.
SUBROUTINE CKWT (ICKWRK, RCKWRK, WT) Returns the molecular weights
of the species.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 49
Quick Reference Guide to the Gas-phase Kinetics Subroutine Library

4.5. Information About Reactions


Table 4.4: Information about Reactions Subroutinesa

Subroutine Description
SUBROUTINE CKABE (ICKWRK, RCKWRK, RA, Returns the Arrhenius
RB, RE) coefficients of the reactions;
see Equation 3.5 .
SUBROUTINE CKFAL (NDIM, ICKWRK, RCKWRK, Returns a set of flags indicating
IFOP, IFLO, KFAL, FPAR) whether a reaction has
pressure- dependent behavior
and an array of parameters.
SUBROUTINE CKFALP (P, T, X, ICKWRK, Returns details concerning the
RCKWRK, I, RKLOW, CTB, PR, FC, PCOR) reaction rate constant for
pressure-dependent reactions.
SUBROUTINE CKHRX (I, HML, ICKWRK, RCK Returns the molar heat of
WRK, HRXI) reaction I.
SUBROUTINE CKIEXC (ICKWRK, RCKWRK, Returns a set of flags indicating
IEXC, EEXC) whether the reactions are
excitation reactions and, if so,
the energy loss per event in eV.
SUBROUTINE CKIMOM (ICKWRK, IMOM) Returns a set of flags indicating
whether the reactions are
electron momentum-transfer
collision frequencies and, if so,
the index of the species with
which the electron collides.
SUBROUTINE CKINU (I, NDIM, ICKWRK, Returns a count of species in a
RCKWRK, NSPEC, KI, NU) reaction, and their indices and
stoichiometric coefficients; see
Equation 3.3 .
SUBROUTINE CKIORD (IDIM, KDIM, ICKWRK, Returns the count and indices
RCKWRK, NIORD, IORD, FORD, RORD) of reactions with modified
species order and the order
values for the species.
SUBROUTINE CKIREV (IR, ICKWRK, RCKWRK, Returns an integer flag to
IREV, RAR, RBR, RER) indicate whether reaction IR
has an explicitly assigned
reverse rate constant. It also
returns the reverse Arrhenius
expression values for reaction
IR, if it was explicitly assigned
in the Gas-phase Kinetics
Pre-processor. If reverse
Arrhenius values were not
explicitly assigned, RAR, RBR
and RER will be zero.
SUBROUTINE CKIRNU (IDIM, NDIM, ICKWRK, Returns the count and indices
RCKWRK, NIRNU, IRNU, NSPEC, KI, RNU) of reactions with real

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
50 of ANSYS, Inc. and its subsidiaries and affiliates.
Information About Reactions

Subroutine Description
stoichiometric coefficients,
counts of species in the
reactions, and the species
indices and coefficients; see
Equation 3.3 .
SUBROUTINE CKITDE (ICKWRK, RCKWRK, Returns a set of flags indicating
ITDE) whether the reactions are
non-thermal, and if so, returns
the index of the species on
which the reaction depends.
SUBROUTINE CKITR (ICKWRK, RCKWRK, ITHB, Returns a set of flags indicating
IREV) whether the reactions are
reversible or whether they
contain arbitrary third bodies.
SUBROUTINE CKIUQ (ICKWRK, RCKWRK, Returns a set of flags indicating
IQUSR) whether the reactions are
user-modify rate-of-progress
reactions, and if so, the
user-modify type.
SUBROUTINE CKIXSM (ICKWRK, IXSM, IXSK) Returns a set of flags indicating
whether the reactions are ion
momentum-transfer cross
sections.
SUBROUTINE CKKUW (ICKWRK, KWUSR) Returns a set of flags indicating
whether the species are
user-modify rate-of-production
species, and if so, the
user-modify type.
SUBROUTINE CKNU (KDIM, ICKWRK, RCKWRK, Returns the stoichiometric
NUKI) coefficients of the reactions;
see Equation 3.3 .
SUBROUTINE CKNUF (KDIM, ICKWRK, RCKWRK, Returns the forward
NUFKI) stoichiometric coefficients for
reactions; by definition,
reactants' coefficients are
negative; see Equation 3.3 .
Contrast this subroutine with
subroutine CKNU, which
returns the net stoichiometric
coefficients for a reaction.
SUBROUTINE CKRAEX (I, RCKWRK, RA)* Get/put the Pre-exponential
coefficient of the i th reaction
SUBROUTINE CKSYMR (I, LOUT, ICKWRK, Returns a character string
RCKWRK, CCKWRK, LT, ISTR, KERR)* which describes the i th
reaction, and the effective
length of the character string.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 51
Quick Reference Guide to the Gas-phase Kinetics Subroutine Library

Subroutine Description
SUBROUTINE CKTHB (KDIM, ICKWRK, RCKWRK, Returns matrix of enhanced
AKI) third body coefficients; see
Equation 3.19 .
SUBROUTINE CKWL (ICKWRK, RCKWRK, WL) Returns a set of flags providing
information on the wave length
of photon radiation.
a
Where appropriate, the description refers to an equation number in Chemkin-Pro Theory Manual .

4.6. Gas Constants and Units


Table 4.5: Gas Constant and Units Subroutines

Subroutine Description
SUBROUTINE CKRP (ICKWRK, RCKWRK, RU, Returns universal gas constants
RUC, PA) and the pressure of one
standard atmosphere.

4.7. Equations of State and Mole-Mass Conversions


Table 4.6: Equations of State and Mole-Mass Conversions Subroutinesa

Subroutine Description
SUBROUTINE CKMMWC (C, ICKWRK, RCKWRK, Returns the mean molecular
WTM) weight of the gas mixture
given molar concentrations; see
Equation 2.9 .
SUBROUTINE CKMMWX (X, ICKWRK, RCKWRK, Returns the mean molecular
WTM) weight of the gas mixture
given mole fractions; see
Equation 2.8 .
SUBROUTINE CKMMWY (Y, ICKWRK, RCKWRK, Returns the mean molecular
WTM) weight of the gas mixture
given mass fractions; see
Equation 2.7 .
SUBROUTINE CKPC (T, C, ICKWRK, RCKWRK, Returns the pressure of the gas
P) mixture given temperature(s)
and molar concentrations; see
Equation 2.5 .
SUBROUTINE CKPX (RHO, T, X, ICKWRK, Returns the pressure of the gas
RCKWRK, P) mixture given mass density,
temperature(s) and mole
fractions; see Equation 2.5 .
SUBROUTINE CKPY (RHO, T, Y, ICKWRK, Returns the pressure of the gas
RCKWRK, P) mixture given mass density,
temperature(s) and mass
fractions; see Equation 2.5 .

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
52 of ANSYS, Inc. and its subsidiaries and affiliates.
Equations of State and Mole-Mass Conversions

Subroutine Description
SUBROUTINE CKRHOC (P, T, C, ICKWRK, Returns the mass density of the
RCKWRK, RHO) gas mixture given pressure,
temperature(s) and molar
concentrations; see
Equation 2.6 .
SUBROUTINE CKRHOX (P, T, X, ICKWRK, Returns the mass density of the
RCKWRK, RHO) gas mixture given pressure,
temperature(s) and mole
fractions; see Equation 2.6 .
SUBROUTINE CKRHOY (P, T, Y, ICKWRK, Returns the mass density of the
RCKWRK, RHO) gas mixture given pressure,
temperature(s) and mass
fractions; see Equation 2.6 .
SUBROUTINE CKCTX (C, ICKWRK, RCKWRK, Returns the mole fractions
X) given molar concentrations; see
Equation 2.17 .
SUBROUTINE CKCTY (C, ICKWRK, RCKWRK, Returns the mass fractions
Y) given molar concentrations; see
Equation 2.16 .
SUBROUTINE CKXTCP (P, T, X, ICKWRK, Returns the molar
RCKWRK, C) concentrations given pressure,
temperature(s) and mole
fractions; see Equation 2.14 .
SUBROUTINE CKXTCR (RHO, T, X, ICKWRK, Returns the molar
RCKWRK, C) concentrations given mass
density, temperature(s), and
mole fractions; see
Equation 2.15 .
SUBROUTINE CKXTY (X, ICKWRK, RCKWRK, Returns the mass fractions
Y) given mole fractions; see
Equation 2.13 .
SUBROUTINE CKYTCP (P, T, Y, ICKWRK, Returns the molar
RCKWRK, C) concentrations given pressure,
temperature(s) and mass
fractions; see Equation 2.11 .
SUBROUTINE CKYTCR (RHO,T, Y, ICKWRK, Returns the molar
RCKWRK, C) concentrations given mass
density, temperature(s) sand
mass fractions; see
Equation 2.12 .
SUBROUTINE CKYTX (Y, ICKWRK, RCKWRK, Returns the mole fractions
X) given mass fractions; see
Equation 2.10 .
a
Where appropriate, the description refers to an equation number in Chemkin-Pro Theory Manual .

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 53
Quick Reference Guide to the Gas-phase Kinetics Subroutine Library

4.8. Thermodynamic Properties (Nondimensional)


Table 4.7: Thermodynamic Properties (Nondimensional) Subroutinesa

Subroutine Description
SUBROUTINE CKATHM (NDIM1, NDIM2, ICK Returns the coefficients of the
WRK, RCKWRK, MAXTP, NT, TMP, A) fits for thermodynamic
properties of species; see
Equation 2.29 through
Equation 2.31 .
SUBROUTINE CKCPOR (T, ICKWRK, RCKWRK, Returns the nondimensional
CPOR) specific heats at constant
pressure; see Equation 2.29 .
SUBROUTINE CKHORT (T, ICKWRK, RCKWRK, Returns the nondimensional
HORT) enthalpies; see Equation 2.30 .
SUBROUTINE CKMXTP (ICKWRK, MAXTP) Returns the maximum number
of temperatures used in fitting
the thermodynamic properties
of the species.
SUBROUTINE CKRHEX (K, RCKWRK, A6) Returns an array of the sixth
thermodynamic polynomial
coefficients for a species, or
changes their value, depending
on the sign of K.
SUBROUTINE CKSMH (T, ICKWRK, RCKWRK, Returns the array of entropies
SMH)* minus enthalpies for species. It
is normally not called directly
by the user.
SUBROUTINE CKSOR (T, ICKWRK, RCKWRK, Returns the nondimensional
SOR) entropies; see Equation 2.31 .
a
Where appropriate, the description refers to an equation number in Chemkin-Pro Theory Manual .

4.9. Thermodynamic Properties (Mass Units)


Table 4.8: Thermodynamic Properties (Mass Units) Subroutinesa

Subroutine Description
SUBROUTINE CKAMS (T, ICKWRK, RCKWRK, Returns the standard state
AMS) Helmholtz free energies in mass
units; see Equation 2.42 .
SUBROUTINE CKCPMS (T, ICKWRK, RCKWRK, Returns the specific heats at
CPMS) constant pressure in mass units;
see Equation 2.36 .
SUBROUTINE CKCVMS (T, ICKWRK, RCKWRK, Returns the specific heats at
CVMS) constant volume in mass units;
see Equation 2.39 .

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
54 of ANSYS, Inc. and its subsidiaries and affiliates.
Thermodynamic Properties (Molar Units)

Subroutine Description
SUBROUTINE CKGMS (T, ICKWRK, RCKWRK, Returns the standard state
GMS) Gibbs free energies in mass
units; see Equation 2.36 .
SUBROUTINE CKHMS (T, ICKWRK, RCKWRK, Returns the enthalpies in mass
HMS) units; see Equation 2.37 .
SUBROUTINE CKSMS (T, ICKWRK, RCKWRK, Returns the standard state
SMS) entropies in mass units; see
Equation 2.38 .
SUBROUTINE CKUMS (T, ICKWRK, RCKWRK, Returns the internal energies
UMS) in mass units; see Equation 2.40
.
a
Where appropriate, the description refers to an equation number in Chemkin-Pro Theory Manual .

4.10. Thermodynamic Properties (Molar Units)


Table 4.9: Thermodynamic Properties (Molar Units) Subroutinesa

Subroutine Description
SUBROUTINE CKAML (T, ICKWRK, RCKWRK, Returns the standard state
AML) Helmholtz free energies in
molar units; see Equation 2.35
.
SUBROUTINE CKCPML (T, ICKWRK, RCKWRK, Returns the specific heats at
CPML) constant pressure in molar
units.
SUBROUTINE CKCVML (T, ICKWRK, RCKWRK, Returns the specific heats in
CVML) constant volume in molar units;
see Equation 2.32 .
SUBROUTINE CKGML (T, ICKWRK, RCKWRK, Returns the standard state
GML) Gibbs free energies in molar
units; see Equation 2.34 .
SUBROUTINE CKHML (T, ICKWRK, RCKWRK, Returns the enthalpies in molar
HML) units.
SUBROUTINE CKSML (T, ICKWRK, RCKWRK, Returns the standard state
SML) entropies in molar units.
SUBROUTINE CKUML (T, ICKWRK, RCKWRK, Returns the internal energies
UML) in molar units; see
Equation 2.33 .
a
Where appropriate, the description refers to an equation number in Chemkin-Pro Theory Manual .

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 55
Quick Reference Guide to the Gas-phase Kinetics Subroutine Library

4.11. Mean Thermodynamic Properties (Mass Units)


Table 4.10: Mean Thermodynamic Properties (Mass Units) Subroutinesa

Subroutine Description
SUBROUTINE CKABMS (P, T, Y, ICKWRK, Returns the mean Helmholtz
RCKWRK, ABMS)* free energy of the mixture in
mass units given pressure,
temperature(s) and mass
fractions; see Equation 2.57 .
SUBROUTINE CKCPBS (T, Y, ICKWRK, RCK Returns the mean specific heat
WRK, CPBMS) at constant pressure; see
Equation 2.44 .
SUBROUTINE CKCVBS (T, Y, ICKWRK, RCK Returns the mean specific heat
WRK, CVBMS) at constant volume in mass
units; see Equation 2.46 .
SUBROUTINE CKGBMS (P, T, Y, ICKWRK, Returns the mean Gibbs free
RCKWRK, GBMS)* energy of the mixture in mass
units given pressure,
temperature(s), and mass
fractions; see Equation 2.55 .
SUBROUTINE CKHBMS (T, Y, ICKWRK, RCK Returns the mean enthalpy of
WRK, HBMS) the mixture in mass units; see
Equation 2.48 .
SUBROUTINE CKSBMS (P, T, Y, ICKWRK, Returns the mean entropy of
RCKWRK, SBMS)* the mixture in mass units given
pressure, temperature(s) and
mass fractions; see
Equation 2.53 .
SUBROUTINE CKUBMS (T, Y, ICKWRK, RCK Returns the mean internal
WRK, UBMS) energy of the mixture in mass
units; see Equation 2.50 .
a
Where appropriate, the description refers to an equation number in Chemkin-Pro Theory Manual .

4.12. Mean Thermodynamic Properties (Molar Units)


Table 4.11: Mean Thermodynamic Properties (Molar Units) Subroutinesa

Subroutine Description
SUBROUTINE CKABML (P, T, X, ICKWRK, Returns the Helmholtz free
RCKWRK, ABML)* energy of the mixture in molar
units given pressure,
temperature(s), and mole
fractions; see Equation 2.56 .
SUBROUTINE CKCPBL (T, X, ICKWRK, RCK Returns the mean specific heat
WRK, CPBML) at constant pressure in molar
units; see Equation 2.43 .

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
56 of ANSYS, Inc. and its subsidiaries and affiliates.
Chemical Production Rates

Subroutine Description
SUBROUTINE CKCVBL (T, X, ICKWRK, RCK Returns the mean specific heat
WRK, CVBML) at constant volume in molar
units; see Equation 2.45 .
SUBROUTINE CKGBML (P, T, X, ICKWRK, Returns the mean Gibbs free
RCKWRK, GBML)* energy of the mixture in molar
units given pressure,
temperature(s) and mole
fractions; see Equation 2.54 .
SUBROUTINE CKHBML (T, X, ICKWRK, RCK Returns the mean enthalpy of
WRK, HBML) the mixture in molar units; see
Equation 2.47 .
SUBROUTINE CKSBML (P, T, X, ICKWRK, Returns the mean entropy of
RCKWRK, SBML)* the mixture in molar units
given pressure, temperature(s)
and mole fractions; see
Equation 2.52 .
SUBROUTINE CKUBML (T, X, ICKWRK, RCK Returns the mean internal
WRK, UBML) energy of the mixture in molar
units; see Equation 2.49 .
a
Where appropriate, the description refers to an equation number in Chemkin-Pro Theory Manual .

4.13. Chemical Production Rates


Table 4.12: Chemical Production Rates Subroutinesa

Subroutine Description
SUBROUTINE CKCDC (T, C, ICKWRK, RCKWRK, Returns the molar creation and
CDOT, DDOT) destruction rates of the species
given temperature(s) and molar
concentrations; see
Equation 3.51 .
SUBROUTINE CKDOT (RKF, RKR, ICKWRK, Returns the molar creation and
RCKWRK, CDOT, DDOT) destruction rates of the species
given reactions' rates of
progress.
SUBROUTINE CKCDXP (P, T, X, ICKWRK, Returns the molar creation and
RCKWRK, CDOT, DDOT) destruction rates of the species
given pressure, temperature(s)
and mole fractions; see
Equation 3.51 .
SUBROUTINE CKCDXR (RHO, T, X, ICKWRK, Returns the molar creation and
RCKWRK, CDOT, DDOT) destruction rates of the species
given mass density,
temperature(s) and mole
fractions; see Equation 3.51 .
SUBROUTINE CKCDYP (P, T, Y, ICKWRK, Returns the molar creation and
RCKWRK, CDOT, DDOT) destruction rates of the species

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 57
Quick Reference Guide to the Gas-phase Kinetics Subroutine Library

Subroutine Description
given pressure, temperature(s)
and mass fractions; see
Equation 3.51 .
SUBROUTINE CKCDYR (RHO, T, Y, ICKWRK, Returns the molar creation and
RCKWRK, CDOT, DDOT) destruction rates of the species
given mass density,
temperature(s) and mass
fractions; see Equation 3.51 .
SUBROUTINE CKCONT (K, Q, ICKWRK, RCK Returns the contributions of
WRK, CIK) the reactions to the molar
production rate of a species;
see Equation 3.2 and
Equation 3.4 .
SUBROUTINE CKCTC (T, C, ICKWRK, RCKWRK, Returns the molar creation
CDOT, TAU) rates and characteristic
destruction times of the species
given temperature(s) and molar
concentrations; see
Equation 3.54 and
Equation 3.56 .
SUBROUTINE CKCTXP (P, T, X, ICKWRK, Returns the molar creation
RCKWRK, CDOT, TAU) rates and characteristic
destruction times of the species
given pressure, temperature(s)
and mole fractions; see
Equation 3.54 and
Equation 3.56 .
SUBROUTINE CKCTXR (RHO, T, X, ICKWRK, Returns the molar creation
RCKWRK, CDOT, TAU) rates and characteristic
destruction times of the species
given mass density,
temperature(s) and mole
fractions; see Equation 3.54 and
Equation 3.56 .
SUBROUTINE CKCTYP (P, T, Y, ICKWRK, Returns the molar creation
RCKWRK, CDOT, TAU) rates and characteristic
destruction times of the species
given pressure, temperature(s)
and mass fractions; see
Equation 3.54 and
Equation 3.56 .
SUBROUTINE CKCTYR (RHO, T, Y, ICKWRK, Returns the molar creation
RCKWRK, CDOT, TAU) rates and characteristic
destruction times of the species
given mass density,
temperature(s) and mass
fractions; see Equation 3.54 and
Equation 3.56 .

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
58 of ANSYS, Inc. and its subsidiaries and affiliates.
Chemical Production Rates

Subroutine Description
SUBROUTINE CKDHXP (P, T, X, ICKWRK, Returns the heat release rate of
RCKWRK, HDOT) the mixture given pressure,
temperature(s) and mole
fractions.
SUBROUTINE CKDHYP (P, T, Y, ICKWRK, Returns the heat release rate of
RCKWRK, HDOT) the mixture given pressure,
temperature(s) and mass
fractions.
SUBROUTINE CKKFKR (P, T, X, ICKWRK, Returns the forward and
RCKWRK, FWDK, REVK) reverse reaction rates for
reactions given pressure,
temperature(s) and mole
fractions.
SUBROUTINE CKKFRT (P, T, ICKWRK, RCK Returns the forward and
WRK, RKFT, RKRT) reverse reaction rates for
reactions given pressure and
temperature(s). This subroutine
returns only the
temperature-dependent part of
the forward and reverse rate
constants. The pressure is
included in the interface so
that general pressure
dependence using the
logarithmic interpolation is
accounted for.
SUBROUTINE CKRCXP (P, T, X, ICKWRK, Returns the forward and
RCKWRK, RCFT, RCRT) reverse rate constants for all
reactions given pressure,
temperature and mole
fractions; see Equation 3.4 and
Equation 3.19 . Note this
subroutine will calculate a
value for the reverse rate
constant irrespective of
whether the reaction was
deemed reversible in the
Pre-processor file. Also note
that the concentration of third
bodies for third body reactions
is included in the returned rate
constant. The units for the rate
constant will depend on the
number of reactants.
SUBROUTINE CKRDEX (I, RCKWRK, RD)* Get/put the perturbation factor
of the i th reaction
SUBROUTINE CKWC (T, C, ICKWRK, RCKWRK, Returns the molar production
WDOT) rates of the species given
temperature(s) and molar

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 59
Quick Reference Guide to the Gas-phase Kinetics Subroutine Library

Subroutine Description
concentrations; see
Equation 3.2 .
SUBROUTINE CKWXP (P, T, X, ICKWRK, Returns the molar production
RCKWRK, WDOT) rates of the species given
pressure, temperature(s) and
mole fractions; see Equation 3.2
.
SUBROUTINE CKWXR (RHO, T, X, ICKWRK, Returns the molar production
RCKWRK, WDOT) rates of the species given mass
density, temperature(s) and
mole fractions; see Equation 3.2
.
SUBROUTINE CKWYP (P, T, Y, ICKWRK, Returns the molar production
RCKWRK, WDOT) rates of the species given
pressure, temperature(s) and
mass fractions; see Equation 3.2
.
SUBROUTINE CKWYPK (P, T, Y, RKFT, Returns the molar production
RKRT, ICKWRK, RCKWRK, WDOT) rates of the species given
pressure, temperature(s) and
mass fractions; see Equation 3.2
.
SUBROUTINE CKWYR (RHO, T, Y, ICKWRK, Returns the molar production
RCKWRK, WDOT) rates of the species given mass
density, temperature and mass
fractions; see Equation 3.2 .
a
Where appropriate, the description refers to an equation number in Chemkin-Pro Theory Manual .

4.14. Equilibrium Constants and Rate of Progress Variables


Table 4.13: Equilibrium Constants and Rate of Progress Variables Subroutinesa

Subroutine Description
SUBROUTINE CKEQC (T, C, ICKWRK, RCKWRK, Returns the equilibrium
EQKC) constants for reactions given
temperature(s) and molar
concentrations; see
Equation 3.7 .
SUBROUTINE CKEQXP (P, T, X, ICKWRK, Returns the equilibrium
RCKWRK, EQKC) constants for reactions given
pressure, temperature(s) and
mole fractions; see Equation 3.7
.
SUBROUTINE CKEQXR (RHO, T, X, ICKWRK, Returns the equilibrium
RCKWRK, EQKC) constants of the reactions
given mass density,

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
60 of ANSYS, Inc. and its subsidiaries and affiliates.
Utilities

Subroutine Description
temperature(s) and mole
fractions; see Equation 3.7 .
SUBROUTINE CKEQYP (P, T, Y, ICKWRK, Returns the equilibrium
RCKWRK, EQKC) constants for reactions given
pressure temperature(s) and
mass fractions; see Equation 3.7
.
SUBROUTINE CKEQYR (RHO, T, Y, ICKWRK, Returns the equilibrium
RCKWRK, EQKC) constants of the reactions
given mass density,
temperature(s) and mass
fractions; see Equation 3.7 .
SUBROUTINE CKQC (T, C, ICKWRK, RCKWRK, Returns the rates of progress
Q) for reactions given
temperature(s) and molar
concentrations; see
Equation 3.4 and Equation 3.19
.
SUBROUTINE CKQXP (P, T, X, ICKWRK, Returns the rates of progress
RCKWRK, Q) for reactions given pressure,
temperature(s) and mole
fractions; see Equation 3.4 and
Equation 3.19 .
SUBROUTINE CKQYP (P, T, Y, ICKWRK, Returns the rates of progress
RCKWRK, Q) for reactions given pressure,
temperature(s) and mass
fractions; see Equation 3.4 and
Equation 3.19 .
SUBROUTINE CKQYR (RHO, T, Y, ICKWRK, Returns the rates of progress
RCKWRK, Q) for reactions given mass
density, temperature(s) and
mass fractions; see Equation 3.4
and Equation 3.19 .
a
Where appropriate, the description refers to an equation number in Chemkin-Pro Theory Manual .

4.15. Utilities
Table 4.14: Utility Subroutines

Subroutine Description
SUBROUTINE CKAVG (NN, S1, S2, SAVG) For arrays of length nn, SAVG(n)
is the average value of S1(n)
and S2(n).
REAL FUNCTION CKBSEC (NPTS, X, XX, TT) Interpolate f(X) using bisection,
given X and other pairs of X
and f(X).

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 61
Quick Reference Guide to the Gas-phase Kinetics Subroutine Library

Subroutine Description
CHARACTER FUNCTION CKCHUP (ISTR, ILEN) Convert characters of a
character string to upper case.
CHARACTER FUNCTION CKCHLO (ISTR, ILEN) Convert ILEN characters in a
character string to lower-case.
SUBROUTINE CKCOMP (IST, IRAY, II, I) Returns the index of an
element of a reference
character string array which
corresponds to a character
string; leading and trailing
blanks are ignored.
SUBROUTINE CKCOPY (NN, X1, X2) Copy X1(*) array members into
X2(*) array.
SUBROUTINE CKCRAY (LINE, NN, KRAY, Searches a character string,
LOUT, NDIM, NRAY, NF, KERR) LINE, and compares the
space-delimited substrings in
LINE, to an array of character
strings, KRAY; if a substring in
LINE is located in KRAY, the
index of its location in KRAY is
stored in the integer array
NRAY. For example, the
subroutine might be called to
assign Gas-phase Kinetics
species indices to a given list
of species names.
SUBROUTINE CKDLIM (STRING, DELIM, I1, Returns pointers into a
I2) character string of the first and
second occurrences of a
particular character.
SUBROUTINE CKDTAB (STRING) Replaces any tab character in
a character string with one
space.
INTEGER FUNCTION CKFRCH (STR) Returns the index of the first
non-blank, non-tab character
in a string.
INTEGER FUNCTION CKLSCH (STR) Returns the index of the final
non-blank, non-tab character
in a string.
SUBROUTINE CKI2CH (NUM, STR, I, KERR) Returns a character string
representation of an integer
and the character count of the
string.
INTEGER FUNCTION CKLKUP (ITEM, LIST, Looks up an item in an integer
NLIST) list. If an item is found, it
returns the first position of the
item in the list. If an item is not

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
62 of ANSYS, Inc. and its subsidiaries and affiliates.
Utilities

Subroutine Description
found, this routine returns the
value 0.
SUBROUTINE CKNCMP (STR, IRAY, II, I, Returns the first index of the
NF) character string STR if it occurs
in the character string IRAY,
and returns the total number
of times STR occurs in IRAY.
SUBROUTINE CKNORM (ARRAY, NN) Utility to normalize the real
members of an array.
SUBROUTINE CKNPAR (LINE, NPAR, LOUT, Searches a character string LINE
IPAR, ISTART, KERR) from last to first character, to
create a substring IPAR
containing NPAR
blank-delimited numbers;
ISTART is the column of LINE
containing IPAR. This allows
format- free input of combined
alpha-numeric data.
SUBROUTINE CKR2CH (RNUM, STR, I, KERR) Returns a character string
representation of a real number
and the effective length of the
string.
SUBROUTINE CKSCAL (ARRAY, NN, SCAL) Utility to scale the real
members of an array.
INTEGER FUNCTION CKSLEN (LINE) Returns the effective length of
a character string, i.e., the index
of the last character before an
exclamation mark (!) indicating
a comment.
SUBROUTINE CKSNUM (LINE, NEXP, LOUT, Search a character string, LINE,
KRAY, NN, KNUM, NVAL, RVAL, KERR) for (1) a character substring
which may also appear in an
array of character substrings
KRAY, and (2) some number of
character substrings
representing numbers. In the
case of (1), if the character
substring appears in KRAY,
KNUM is its index position. In
the case of (2), the character
substrings are converted to
NVAL real numbers and stored
in RVAL, until NEXP are
converted. This allows
format-free input of combined
alpha-numeric data. For
example, the subroutine might
be called to find a Gas-phase

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 63
Quick Reference Guide to the Gas-phase Kinetics Subroutine Library

Subroutine Description
Kinetics species index and
convert the other substrings to
real values.
SUBROUTINE CKSUBS (LINE, LOUT, NDIM, Returns an array of substrings
SUB, NFOUND, KERR) in a character string with
blanks or tabs as deli miters.
REAL FUNCTION CKSUM (ARRAY, NN) Return the sum of entries in a
real array.
SUBROUTINE CKXMIN (X, NN, XMIN, IMIN) Returns the minimum value in
an array and its location in the
array.
SUBROUTINE CKXMAX (X, NN, XMAX, IMAX) Returns the maximum value in
an array and its location in the
array.
SUBROUTINE CKXNUM (LINE, NEXP, LOUT, Searches a character string,
NVAL, RVAL, KERR) LINE, for NEXP space-delimited
substrings representing
numbers, until NVAL real values
are converted and stored in the
array, RVAL. This allows
format-free input of numerical
data. For example:
SUBROUTINE CKXTND (NDIM, NPTS, XSTR, Ensure that XSTR X(N)
XEND, X, F, IFLAG) XEND. NPTS may be increased
to add XSTR < X(1) or XEND >
X(NPTS). NPTS may be
decreased to drop X(N) < XSTR
or X(N) > XEND. If NDIM does
not allow adding a new
endpoint, CKXTND replaces the
endpoint and sets IFLAG=1 if
new XSTR, IFLAG=2 if new
XEND.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
64 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 5: Quick Reference Guide to the Surface Kinetics Subroutine
Library
This chapter is arranged by topical area to provide a quick reference to each subroutine of the Surface
Kinetics Subroutine Library. In addition to the subroutine call list itself, the purpose of the subroutine
is briefly described.

5.1. Mnemonics
There are some rules of thumb for explaining the subroutine naming conventions. All subroutine names
begin with the letters SK so that Surface Kinetics Subroutines are easily recognized and so that they are
likely different from any user subroutine names. The four remaining letters generally identify the purpose
of the subroutine.

Thermodynamic properties are referred to by CP (specific heat), H ( enthalpy), S ( entropy), U ( internal


energy), G (Gibbs free energy), and A (Helmholtz free energy). The thermodynamic property subroutines
may be called to return properties in mass units, denoted by MS or S as the last letter(s), or in molar
units, denoted by ML or L as the last letter(s).

The mnemonics for the variable names in the subroutine call lists are roughly the same as for the sub-
routine names.

5.2. Initialization
Table 5.1: Initialization Subroutines

Subroutine Description
SUBROUTINE SKINDX (ISKWRK, NELM, KKGAS, Returns a group of indices
KKSUR, KKBULK, KKTOT, NNPHAS, NNSURF, defining the size of the surface
NFSURF, NLSURF, NNBULK, NFBULK, NLBULK, reaction mechanism.
IISUR)
SUBROUTINE SKINIT (LENISK, LENRSK, Reads the surface linkfile and
LENCSK, LINSK, LOUT, ISKWRK, RSKWRK, creates internal work arrays
CSKWRK, IFLAG) ISKWRK, RSKWRK, and CSKWRK.
SKINIT must be called before
any other Surface Kinetics
subroutine can be used, as the
work arrays must be available
as their input.
SUBROUTINE SKLEN (LINSK, LOUT, LENI, Reads the first record of the
LENR, LENC, IFLAG) linkfile to return the lengths
required for the integer, real,
and character work arrays.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 65
Quick Reference Guide to the Surface Kinetics Subroutine Library

Subroutine Description
SUBROUTINE SKLEN2 (LINSK, LOUT, LENI, Reads the first record of the
LENR, LENC, NELEM, NKKGAS, NKKSUR, linkfile to return the lengths
NKKBLK, NKKTOT, NPHASE, NNSUR, NNBLK, required for the integer, real,
NIISUR, NIICON, MORE, IFLAG) and character work arrays, as
well as other size information
needed for memory allocation.
The routine also advances to
the end of the first material.
SUBROUTINE SKREWR (LINSK, LOUT, ISKWRK, Rewrites a new linkfile from the
RSKWRK, CSKWRK, IFLAG) data stored in ISKWRK, RSKWRK
and CSKWRK.

5.3. Information about Elements


Table 5.2: Information about Elements Subroutines

Subroutine Description
SUBROUTINE SKSYME (ISKWRK, CSKWRK, Returns a character string array
LOUT, ENAM, KERR) of element names.

5.4. Information about Species


Table 5.3: Information about Species Subroutines

Subroutine Description
SUBROUTINE SKATCZ (P, T, ACT, SDEN, Returns the concentrations of
ISKWRK, RSKWRK, CZ) the species, given the pressure,
temperature and activities.
SUBROUTINE SKCHRG (ISKWRK, RSKWRK, Returns an array containing
KCHARG) electronic charges of the
species.
SUBROUTINE SKCOV (ISKWRK, KOCC) Returns an array of site
occupancy numbers for the
species.
SUBROUTINE SKCZTA (T, CZ, SDEN, ISKWRK, Returns the activities of the
RSKWRK, ACT) species, given the pressure,
temperature and
concentrations.
SUBROUTINE SKDEN (P, T, ACT, SDEN, Returns a real array of species
ISKWRK, RSKWRK, DEN) densities.
SUBROUTINE SKKTFL (ISKWRK, KTFL) Allows the user to assign a
location in the temperature
array to use for the gas-phase
species.
SUBROUTINE SKNCF (NELDIM, ISKWRK, NEL) Returns the elemental
composition of the species.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
66 of ANSYS, Inc. and its subsidiaries and affiliates.
Information about Surface Reactions

Subroutine Description
SUBROUTINE SKSYMS (ISKWRK, CSKWRK, Returns a character array of
LOUT, KNAM, KERR) species names.
SUBROUTINE SKWT (ISKWRK, RSKWRK, WT) Returns the molecular weights
of the species.

5.5. Information about Phases and Materials


Table 5.4: Information about Phases and Materials Subroutines

Subroutine Description
SUBROUTINE SKPKK (ISKWRK, KKPHAS, Returns arrays of species
KFIRST, KLAST) pointers for the phases.
SUBROUTINE SKPNDX (ISKWRK, KELECT, Returns plasma indices for the
KKION) particular reaction mechanism.
SUBROUTINE SKSDEN (ISKWRK, RSKWRK, Returns a real array of
SDEN0) standard-state phase densities
as given on input to the
Pre-processor.
SUBROUTINE SKSYMM (ISKWRK, CSKWRK, Returns the character string
LOUT, MATNAM, KERR) name of a material.
SUBROUTINE SKSYMP (ISKWRK, CSKWRK, Returns a character string array
LOUT, PNAM, KERR) of phase names.

5.6. Information about Surface Reactions


Table 5.5: Information about Surface Reactions Subroutines

Subroutine Description
SUBROUTINE SKABE (ISKWRK, RSKWRK, RA, Returns the Arrhenius
RB, RE, ISTFL) coefficients or the sticking
coefficients of the surface
reactions, and integer flags to
indicate the type of the
coefficients.
SUBROUTINE SKFLGS (IR, ISKWRK, NRPP, Returns several integer flags
IREV, ISTFL, ICOV, IMOTZ, IEDP, IBHM, describing surface reaction IR.
IORD, IYLD)
SUBROUTINE SKIBHM (IR, ISKWRK, IBMFL) Returns an integer flag to
indicate whether reaction IR
uses Bohm coefficients.
SUBROUTINE SKICOV (IR, NDIM, ISKWRK, Returns the coverage species
RSKWRK, NCOVI, KCOVI, CPARI) index numbers and their
coverage parameters for
reaction IR.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 67
Quick Reference Guide to the Surface Kinetics Subroutine Library

Subroutine Description
SUBROUTINE SKIENR (IR, ISKWRK, SKWRK, Returns an integer flag to
IENRFL, IEION, PEDEP) indicate if reaction IR is
ion-energy-dependent, and if
so, formulation-specific
parameters.
SUBROUTINE SKINU (IS, NDIM, ISKWRK, Returns the number of species
RSKWRK, NSPEC, KI, NU) in a surface reaction, and the
species indices and
stoichiometric coefficients.
SUBROUTINE SKIORD (IDIM, KDIM, ISKWRK, Returns the number and
RSKWRK, NFORD, IFORD, FORD, NRORD, indices of surface reactions
IRORD, RORD) with modified species orders,
and the order values for the
species in the surface
mechanism.
SUBROUTINE SKIREV (IR, ISKWRK, RSKWRK, Returns an integer flag to
IREV, RAR, RBR, RER) indicate whether reaction IR
has an explicitly assigned
reverse rate constant. It also
returns the reverse Arrhenius
expression values for surface
reaction IR, if it was explicitly
assigned in the Surface Kinetics
Pre-processor. If reverse
Arrhenius values were not
explicitly assigned, RAR, RBR
and RER will be zero.
SUBROUTINE SKIRNU (IDIM, NDIM, ISKWRK, Returns the number and
RSKWRK, NIRNU, IRNU, NSPEC, KI, RNU) indices of surface reactions
with real stoichiometric
coefficients, number of species
in the reactions, and the
species indices and coefficients;
SUBROUTINE SKISTK (IR, ISKWRK, ISTFL) Returns an integer flag to
indicate whether reaction IR
uses sticking coefficients.
SUBROUTINE SKIUQ (ISKWRK, IQUSR) Returns a set of flags indicating
whether the reactions are
user-modify rate-of-progress
reactions, and if so, the
user-modify type.
SUBROUTINE SKIYLD (IR, ISKWRK, RSKWRK, Returns an integer flag to
IYLD, IYION, KYLD, PYLD) indicate whether reaction IR
has yield-modified species, the
species index of its ion,
yield-modify flags for its
reactants and products, and

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
68 of ANSYS, Inc. and its subsidiaries and affiliates.
Information about Surface Reactions

Subroutine Description
parameters for the yield
expression.
SUBROUTINE SKKION (ISKWRK, KELECT, Returns the species number of
KKION, KION) the electron, the number of
positive ions in the gas-phase,
and an array of species number
for each positive ion
SUBROUTINE SKKUW (ISKWRK, KWUSR) Returns a set of flags indicating
whether the species are
user-modify rate-of-production
species, and if so, the
user-modify type.
SUBROUTINE SKNCON (ISKWRK, RSKWRK, Returns the total number of
NCON) surface reactions which do not
conserve sites of the phases.
SUBROUTINE SKNU (IDIM, ISKWRK, RSKWRK, Returns the stoichiometric
KSTOIC, NSTOIC) coefficients of the species and
the net change in phases for
all of the surface reactions in a
mechanism.
SUBROUTINE SKNUF (IDIM, ISKWRK, KSTOIF) Returns the stoichiometric
coefficients of the species for
all reactants in all surface
reactions in a mechanism. (note
- reactants only! - they will all
be negative)
SUBROUTINE SKRAEX (IR, ISKWRK, RSKWRK, Returns the Pre-exponential
RA) rate constant (or sticking
coefficient) of the IRth reaction,
or changes its value, depending
on the sign of IR.
SUBROUTINE SKRDEX (IR, ISKWRK, RSKWRK, Returns the perturbation factor
RD) of the IRth reaction, or changes
its value, depending on the
sign of IR.
SUBROUTINE SKRPAR (ISKWRK, RSKWRK, EN Allows the user to input
RGI) auxiliary reaction-rate
parameters for special types of
reactions. The first parameter
is the species (ion) directed
energy for
ion-energy-dependent
reactions.
SUBROUTINE SKSYMR (IR, LOUT, ISKWRK, Returns the character string
RSKWRK, CSKWRK, LT, RNAM, KERR) representation of reaction IR.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 69
Quick Reference Guide to the Surface Kinetics Subroutine Library

5.7. Gas Constants and Units


Table 5.6: Gas Constants and Units Subroutines

Subroutine Description
SUBROUTINE SKRP (ISKWRK, RSKWRK, RU, Returns universal gas constants
RUC, PATM) and the pressure of one
standard atmosphere.

5.8. Thermodynamic Properties (Non dimensional)


Table 5.7: Thermodynamic Properties (Non dimensional) Subroutines

Subroutine Description
SUBROUTINE SKATHM (MDIM, NDIM1, NDIM2, Returns the polynomial
ISKWRK, RSKWRK, NT, TMP, A) coefficients of the fits for
thermodynamic properties of
all of the species.
SUBROUTINE SKCHORT (T, ACT, ISKWRK, Returns an array of the non
RSKWRK, HORT) dimensional enthalpies.
SUBROUTINE SKCPOR (T, ISKWRK, RSKWRK, Returns an array of the non
CPOR) dimensional specific heats at
constant pressure.
SUBROUTINE SKMXTP (ISKWRK, MXTP) Returns the maximum number
of temperatures used in fitting
the thermodynamic properties
of the species.
SUBROUTINE SKRHEX (K, ISKWRK, RSKWRK, Returns an array of the sixth
A6) thermodynamic polynomial
coefficients for a species, or
changes their value, depending
on the sign of K.
SUBROUTINE SKSOR (T, ISKWRK, RSKWRK, Returns an array of the non
SOR) dimensional entropies.

5.9. Thermodynamic Properties (Mass Units)


Table 5.8: Thermodynamic Properties (Mass Units) Subroutines

Subroutine Description
SUBROUTINE SKAMS (T, ISKWRK, RSKWRK, Returns an array of the
AMS) standard state Helmholtz free
energies in mass units.
SUBROUTINE SKCPMS (T, ISKWRK, RSKWRK, Returns an array of the specific
CPMS) heats at constant pressure in
mass units.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
70 of ANSYS, Inc. and its subsidiaries and affiliates.
Chemical Production Rates

Subroutine Description
SUBROUTINE SKGMS (T, ISKWRK, RSKWRK, Returns an array of the
GMS) standard state Gibbs free
energies in mass units.
SUBROUTINE SKHMS (T, ISKWRK, RSKWRK, Returns an array of the
HMS) enthalpies in mass units.
SUBROUTINE SKSMS (T, ISKWRK, RSKWRK, Returns an array of the
SMS) standard-state entropies in
mass units.
SUBROUTINE SKUMS (T, ISKWRK, RSKWRK, Returns an array of the internal
UMS) energies in mass units.

5.10. Thermodynamic Properties (Molar Units)


Table 5.9: Thermodynamic Properties (Molar Units) Subroutines

Subroutine Description
SUBROUTINE SKCAML (T, ACT, ISKWRK, Returns an array of the
RSKWRK, AML) standard state Helmholtz free
energies in molar units.
SUBROUTINE SKCGML (T, ACT, ISKWRK, Returns an array of the
RSKWRK, GML) standard state Gibbs free
energies in molar units.
SUBROUTINE SKCHML (T, ACT, ISKWRK, Returns an array of the
RSKWRK, HML) enthalpies in molar units.
SUBROUTINE SKCPML (T, ISKWRK, RSKWRK, Returns an array of the specific
CPML) heats at constant pressure in
molar units.
SUBROUTINE SKCUML (T, ACT, ISKWRK, Returns an array of the internal
RSKWRK, UML) energies in molar units.
SUBROUTINE SKSML (T, ISKWRK, RSKWRK, Returns an array of the
SML) standard-state entropies in
molar units.

5.11. Chemical Production Rates


Table 5.10: Chemical Production Rates Subroutines

Subroutine Description
SUBROUTINE SKCONT (KSPEC, ROP, ISKWRK, Returns the contributions of
RSKWRK, CIK) the surface reactions to the
molar production rate of
species KSPEC.
SUBROUTINE SKDRDA (IR, P, T, ACT, Returns the partial of the rates
SDEN, ISKWRK, RSKWRK, DKDAI) of production of the species
with respect to the

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 71
Quick Reference Guide to the Surface Kinetics Subroutine Library

Subroutine Description
pre-exponential constant of
surface reaction IR.
SUBROUTINE SKDRDC (KSPEC, P, T, ACT, Returns the partial derivative
SDEN, ISKWRK, RSKWRK, DKDC) of the production rates of the
species with respect to the
concentration of species KSPEC.
SUBROUTINE SKDSDC (P, T, X, ACT, SDEN, Returns the partial derivative
ISKWRK, RSKWRK, DSDC, KKTOT, SDOT, of the production rates of the
SITDOT) species with respect to the
concentration of each species.
It also returns the matching
production rates.
SUBROUTINE SKDSDX (P, T, X, ACT, SDEN, Returns the partial derivative
ISKWRK, RSKWRK, DSDX, KKTOT, SDOT, of the production rates of the
SITDOT) species with respect to the
activity for each species. It also
returns the matching
production rates.
SUBROUTINE SKRAT (P, T, ACT, SDEN, Returns production rates for
ISKWRK, RSKWRK, SDOT, SITDOT) the species and sites.
SUBROUTINE SKRATI (IR, ROP, ISKWRK, Returns rates of production of
RSKWRK, SDOTI, SITDTI) the species by surface reaction
IR.

5.12. Equilibrium Constants and Rate-of-Progress Variables


Table 5.11: Equilibrium Constants and Rate-of-Progress Variables Subroutines

Subroutine Description
SUBROUTINE SKEQ (P, T, ACT, SDEN, Returns the equilibrium
ISKWRK, RSKWRK, EQKC) constants for the surface
reactions given pressure,
temperature, species activities,
and the site densities.
SUBROUTINE SKROP (P, T, ACT, SDEN, Returns rates of progress for
ISKWRK, RSKWRK, ROP) the surface reactions.

5.13. Utilities
Table 5.12: Utility Subroutines

Subroutine Description
SUBROUTINE SKCOMP (ISTR, IRAY, NN, IND, Search for the occurrence of
NT) character string ISTR, in the NN
character strings of array IRAY;
IND is the first location in IRAY
of ISTR if found, or 0 if not

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
72 of ANSYS, Inc. and its subsidiaries and affiliates.
Utilities

Subroutine Description
found, and NT is the total
number of times it occurs.
Consider the following
example,
SUBROUTINE SKPCMP (ISTR, IRAY, NN, This subroutine can do
SETS, NSETS, ISET, IND, NT) everything that the subroutine
SKCOMP can do, and
additionally, has the capabilities
of separating the elements of
IRAY into categories and then
search IRAY by element and
category.
SUBROUTINE SKPNT (LSAVE, LOUT, VERS, Reads from a file information
PREC, LENI, LENR, LENC, IERR) about a Surface Kinetics Linking
File, pointers for the Surface
Kinetics Subroutine Library, and
returns lengths of work arrays.
SUBROUTINE SKSNUM (LINE, NEXP, LOUT, This subroutine is used to read
KNAM, KKTOT, PNAM, NNPHAS, KKPHAS, a format-free input line of
KNUM, NT, NVAL, RVAL, KERR) combined alphanumeric data.
It can be used to parse an
input character string, LINE,
which may be composed of
several blank-delimited
substrings. This subroutine
assumes that the first substring
in LINE is the name of a species
in the Surface Kinetics
mechanism.
SUBROUTINE SKSAVE (LOUT, LSAVE, ISKWRK, Writes to a binary file
RSKWRK, CSKWRK) information about a Surface
Kinetics Linking File, pointers
for the Surface Kinetics
Subroutine Library, and Surface
Kinetics work arrays.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 73
Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
74 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 6: Quick Reference Guide to the Transport Subroutine
Library
Users creating their own ANSYS Chemkin-Pro Applications may need to access the Transport Subroutine
Library directly to calculate transport properties. This chapter is arranged by topical area to provide a
quick reference to each of the Transport subroutines. In addition to the subroutine call list itself, the
purpose of the subroutine is briefly described.

6.1. Mnemonics
There are seventeen user-callable subroutines in the package. All subroutine names begin with MC. The
following letter is either an S, an A, or an M, indicating whether pure species (S), mixture-averaged (A),
or multicomponent (M) properties are returned. The remaining letters indicate which property is returned:
CON for conductivity, VIS for viscosity, DIF for diffusion coefficients, CDT for both conductivity and
thermal diffusion coefficients, and TDR for the thermal diffusion ratios.

A call to the initialization subroutine MCINIT must precede any other call. This subroutine is normally
called only once at the beginning of a problem; it reads the Linking File and sets up the internal storage
and working space - arrays IMCWRK and RMCWRK. These arrays are required input to all other subroutines
in the library. Besides MCINIT there is only one other non-property subroutine, called MCPRAM ; it is
used to return the arrays of molecular parameters that came from the database for the species in the
problem. All other subroutines are used to compute either viscosities, thermal conductivities, or diffusion
coefficients. They may be called to return pure species properties, mixture-averaged properties, or
multicomponent properties.

In the input to all subroutines, the state of the gas is specified by the pressure in dynes per square
centimeter, temperature in Kelvin, and the species mole fractions. The properties are returned in
standard CGS units. The order of vector information, such as the vector of mole fractions or pure species
viscosities, is the same as the order declared in the Gas-phase Kinetics Pre-processor input.

Here we provide a short description of each subroutine according to its function. In Alphabetical Listing
of the Transport Subroutine Library (p. 189) we list the subroutines in alphabetical order and provide a
longer description of each subroutine including call-list details.

6.2. Initialization and Parameters


Table 6.1: Initialization and Parameter Subroutines

Subroutine Description
SUBROUTINE MCINIT (LINKMC, LOUT, LEN This subroutine serves to read
IMC, LENRMC, IMCWRK, RMCWRK) the Linking File from the fitting
code and to create the internal
storage and work arrays,
IMCWRK(*) and RMCWRK (*).
MCINIT must be called before

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 75
Quick Reference Guide to the Transport Subroutine Library

Subroutine Description
any other Transport subroutine
is called. It must be called after
the Gas-phase Kinetics package
is initialized.
SUBROUTINE MCPRAM (IMCWRK, RMCWRK EPS, This subroutine is called to
SIG, DIP, POL, ZROT, NLIN) return the arrays of molecular
parameters as read from the
Transport database.
SUBROUTINE MCPNT (LSAVE, LOUT, NPOINT, Reads from a binary file
V, P, LI, LR, IERR) information about a Transport
linkfile, pointers for the
Transport Library, and returns
lengths of work arrays.
SUBROUTINE MCSAVE (LOUT, LSAVE, IMCWRK, Writes to a binary file
RMCWRK) information about a Transport
linkfile, pointers for the
Transport library, and Transport
work arrays.
SUBROUTINE MCREWR (LINKMC, LOUT, IM This subroutine writes a new
CWRK, RMCWRK, IFLAG) the Transport linkfile from the
data stored in the integer and
real work arrays, IMCWRK(*)
and RMCWRK(*).
SUBROUTINE MCLEN (LINKMC, LOUT, LI, Returns the lengths required
LR, IFLAG) for work arrays.

6.3. Viscosity
Table 6.2: Viscosity Subroutines

Subroutine Description
SUBROUTINE MCSVIS (T, RMCWRK, VIS) This subroutine computes the
array of pure species viscosities
given the temperature.
SUBROUTINE MCAVIS (T, X, RMCWRK, VIS This subroutine computes the
MIX) mixture viscosity given the
temperature and the species
mole fractions. It uses
modifications of the Wilke
semi-empirical formulas.
SUBROUTINE MCCVEX (K, KDIM, RCKWRK, Gets or puts values of the
COFVIS) fitting coefficients for the
polynomial fits to species
viscosity.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
76 of ANSYS, Inc. and its subsidiaries and affiliates.
Diffusion Coefficients

6.4. Conductivity
Table 6.3: Conductivity Subroutines

Subroutine Description
SUBROUTINE MCSCON (T, RMCWRK, CON) This subroutine computes the
array pure species
conductivities given the
temperature.
SUBROUTINE MCACON (T, X, RMCWRK, CON This subroutine computes the
MIX) mixture thermal conductivity
given the temperature and the
species mole fractions.
SUBROUTINE MCMCDT (P, T, X, IMCWRK, This subroutine computes the
RMCWRK, ICKWRK, CKWRK, DT, COND) thermal diffusion coefficients
and mixture thermal
conductivities given the
pressure, temperature, and
mole fractions.
SUBROUTINE MCCCEX (K, KDIM, RCKWRK, Gets or puts values of the
COFCON) fitting coefficients for the
polynomial fits to species
conductivity.

6.5. Diffusion Coefficients


Table 6.4: Diffusion Coefficients Subroutines

Subroutine Description
SUBROUTINE MCSDIF (P, T, KDIM, RMCWRK, This subroutine computes the
DJK) binary diffusion coefficients
given the pressure and
temperature.
SUBROUTINE MCADIF (P, T, X, RMCWRK, D) This subroutine computes the
mixture-averaged diffusion
coefficients given the pressure,
temperature, and species mole
fractions.
SUBROUTINE MCMDIF (P, T, X, KDIM, IM This subroutine computes the
CWRK, RMCWRK, D) ordinary multicomponent
diffusion coefficients given the
pressure, temperature, and
mole fractions.
SUBROUTINE MCCDEX (K, KDIM, RCKWRK, Gets or puts values of the
COFDIF) fitting coefficients for the
polynomial fits to species
binary diffusion coefficients.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 77
Quick Reference Guide to the Transport Subroutine Library

6.6. Thermal Diffusion


Table 6.5: Thermal Diffusion Subroutines

Subroutine Description
SUBROUTINE MCATDR (T, X, IMCWRK, RM This subroutine computes the
CWRK, TDR) thermal diffusion ratios for the
light species into the mixture.
SUBROUTINE MCMCDT (P, T, X, IMCWRK, This subroutine computes the
RMCWRK, ICKWRK, CKWRK, DT, COND) thermal diffusion coefficients,
and mixture thermal
conductivities given the
pressure, temperature, and
mole fractions.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
78 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 7: Alphabetical Listing of the Gas-phase Kinetics Subroutine
Library
Each subroutine in the Gas-phase Kinetics Subroutine Library is described in this chapter, together with
a detailed description of the variables in the call lists. For all arrays, information is given on the required
dimensioning in the calling program. For all variables having units, the cgs units are stated.

In most cases the subroutines are backwards compatible with the original version of Chemkin. However,
there are some cases where either the functionality is different or the call list has changed, but we have
kept the same subroutine name.

Note:

All routines for which the call list or functionality may have changed from the original version
of Chemkin are identified by an asterisk. Subroutines whose call lists have changed since
later versions, known as Chemkin II, are indicated by a double asterisk.

7.1. CKABE
CKABE CKABE CKABE CKABE CKABE CKABE CKABE
**********************************************
**************************
******

SUBROUTINE CKABE (ICKWRK, RCKWRK, RA, RB, RE)


Returns the Arrhenius coefficients of the reactions.

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
RA(*) - Real array, pre-exponential constants for reactions;
dimension at least II, the total reaction count.
cgs units, mole-cm-sec-K
RB(*) - Real array, temperature dependence exponents for
reactions;
dimension at least II, total reaction count.
cgs units none
RE(*) - Real array, activation energies for reactions;
dimension at least II, the total reaction count.
cgs units, K

7.2. CKABML
CKABML CKABML CKABML CKABML CKABML CKABML CKABML
**********************************************
**************************
******

SUBROUTINE CKABML (P, T, X, ICKWRK, RCKWRK, ABML)


Returns the Helmholtz free energy of the mixture in molar units

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 79
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

given pressure, temperature(s), and mole fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
ABML - Real scalar, mean Helmholtz free energy.
cgs units, ergs/mole

7.3. CKABMS
CKABMS CKABMS CKABMS CKABMS CKABMS CKABMS CKABMS
**********************************************
**************************
******

SUBROUTINE CKABMS (P, T, Y, ICKWRK, RCKWRK, ABMS)


Returns the mean Helmholtz free energy of the mixture in mass units
given pressure, temperature(s) and mass fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
ABMS - Real scalar, mean Helmholtz free energy.
cgs units, ergs/gm

7.4. CKAML
CKAML CKAML CKAML CKAML CKAML CKAML CKAML
**********************************************
**************************
******

SUBROUTINE CKAML (T, ICKWRK, RCKWRK, AML)


Returns the standard state Helmholtz free energies in molar units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
AML(*) - Real array, standard state Helmholtz free energies
for species;

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
80 of ANSYS, Inc. and its subsidiaries and affiliates.
CKATHM

dimension at least KK, the total species count.


cgs units, ergs/mole

7.5. CKAMS
CKAMS CKAMS CKAMS CKAMS CKAMS CKAMS CKAMS
**********************************************
**************************
******

SUBROUTINE CKAMS (T, ICKWRK, RCKWRK, AMS)


Returns the standard state Helmholtz free energies in mass units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
AMS(*) - Real array, standard state Helmholtz free energies
for species;
dimension at least KK, the total species count.
cgs units, ergs/gm

7.6. CKATHM
CKATHM CKATHM CKATHM CKATHM CKATHM CKATHM CKATHM
**********************************************
**************************
******

SUBROUTINE CKATHM (NDIM1, NDIM2, ICKWRK, RCKWRK, MAXTP, NT, TMP, A)


Returns the coefficients of the fits for thermodynamic properties
of species.

INPUT
NDIM1 - Integer scalar, first dimension of A, the three-
dimensional array of thermodynamic fit coefficients;
NDIM1 must be at least NPCP2, the total number of
coefficients for one temperature range.
NDIM2 - Integer scalar, second dimension of A; NDIM2 must be
at least MXTP-1, the total number of temperature ranges.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.
MAXTP - Integer scalar, number of temperatures used to divide
the temperature ranges of thermodynamic fits.

OUTPUT
NT(*) - Integer array, total number of temperatures used in
fitting coefficients of thermodynamic properties for
the species;
dimension at least KK, the total species count.
TMP(*,*) - Real matrix, temperatures for dividing the
thermodynamic fits for species; dimension at least
MAXTP for the first, and at least KK for the second,
the total species count.
cgs units, K
A(*,*,*) - Real three-dimensioned array of fit coefficients to the
thermodynamic data for species;
dimension exactly NPCP2 for the first, exactly MAXTP-1
for the second, and at least KKTOT for the third, the
total species count.
The indices in A(N,L,K) mean-

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 81
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

N = 1,NN represent polynomial coefficients in CP/R


CP/R(K)=A(1,L,K) + A(2,L,K)*T + A(3,L,K)*T**2 + ...
N = NN+1 is for the formation enthalpies, i.e.,
HO/R = A(NN+1,L,K)
N = NN+2 is for the formation entropies, i.e.,
SO/R = A(NN+2,L,K)
L = 1 is for temperature <= TMP(2,K)
L = 2 is for TMP(2,K) < temperature <= TMP(3)
:
L = (NTMP-1) is for TMP(NTMP-1) <= temperature;
K is the species index

7.7. CKATOM
CKATOM CKATOM CKATOM CKATOM CKATOM CKATOM CKATOM
**********************************************
**************************
******

REAL FUNCTION CKATOM (ENAME)


Returns atomic weight, given character-string element name.

INPUT
ENAME - Character string, element name.

RETURN
Real scalar, element atomic weight.

7.8. CKAVG
CKAVG CKAVG CKAVG CKAVG CKAVG CKAVG CKAVG
**********************************************
**************************
******

SUBROUTINE CKAVG (NN, S1, S2, SAVG)


For arrays of length nn,
SAVG(n) is the average value of S1(n) and S2(n).

INPUT
NN - The length of the two input arrays.
S1 - Real array.
S2 - Real array.

OUTPUT
SAVG - Real array, sum of S1 and S2
SAVG(n) is the average value of S1(n) and S2(n).

7.9. CKAWT
CKAWT CKAWT CKAWT CKAWT CKAWT CKAWT CKAWT
**********************************************
**************************
******

SUBROUTINE CKAWT (ICKWRK, RCKWRK, AWT)


Returns the atomic weights of the elements

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
82 of ANSYS, Inc. and its subsidiaries and affiliates.
CKCDXP

AWT(*) - Real array, atomic weights of the elements;


dimension at least MM, the total element count.
cgs units, gm/mole

7.10. CKBSEC
CKBSEC CKBSEC CKBSEC CKBSEC CKBSEC CKBSEC CKBSEC
**********************************************
**************************
******

REAL FUNCTION CKBSEC (NPTS, X, XX, TT)


Interpolate f(X) using bisection, given X and other pairs
of X and f(X).

INPUT
NPTS - Integer scalar, total pairs of data.
X - Real scalar, location for which f(X) is required.
XX(*) - Real array, locations for which data is given.
TT(*) - Real array, function values for locations given.

7.11. CKCDC
CKCDC CKCDC CKCDC CKCDC CKCDC CKCDC CKCDC
**********************************************
**************************
******

SUBROUTINE CKCDC (T, C, ICKWRK, RCKWRK, CDOT, DDOT)


Returns the molar creation and destruction rates of the species
given temperature(s) and molar concentrations.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
C(*) - Real array, concentrations of the species;
dimension at least KK, the total species count.
cgs units, mole/cm**3
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
CDOT(*) - Real array, chemical creation rates of the species;
dimension at least KK, the total species count.
cgs units, mole/(cm**3*sec)
DDOT(*) - Real array, chemical destruction rates of the species;
dimension at least KK, the total species count.
cgs units, moles/(cm**3*sec)

7.12. CKCDXP
CKCDXP CKCDXP CKCDXP CKCDXP CKCDXP CKCDXP CKCDXP
**********************************************
**************************
******

SUBROUTINE CKCDXP (P, T, X, ICKWRK, RCKWRK, CDOT, DDOT)


Returns the molar creation and destruction rates of the species
given pressure, temperature(s) and mole fractions.

INPUT

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 83
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

P - Real scalar, pressure.


cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
CDOT(*) - Real array, chemical creation rates of the species;
dimension at least KK, the total species count.
cgs units, mole/(cm**3*sec)
DDOT(*) - Real array, chemical destruction rates of the species;
dimension at least KK, the total species count.
cgs units, moles/(cm**3*sec)

7.13. CKCDXR
CKCDXR CKCDXR CKCDXR CKCDXR CKCDXR CKCDXR CKCDXR
**********************************************
**************************
******

SUBROUTINE CKCDXR (RHO, T, X, ICKWRK, RCKWRK, CDOT, DDOT)


Returns the molar creation and destruction rates of the species
given mass density, temperature(s) and mole fractions.

INPUT
RHO - Real scalar, mass density.
cgs units, gm/cm**3
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
CDOT(*) - Real array, chemical creation rates of the species;
dimension at least KK, the total species count.
cgs units, mole/(cm**3*sec)
DDOT(*) - Real array, chemical destruction rates of the species;
dimension at least KK, the total species count.
cgs units, moles/(cm**3*sec)

7.14. CKCDYP
CKCDYP CKCDYP CKCDYP CKCDYP CKCDYP CKCDYP CKCDYP
**********************************************
**************************
******

SUBROUTINE CKCDYP (P, T, Y, ICKWRK, RCKWRK, CDOT, DDOT)


Returns the molar creation and destruction rates of the species
given pressure, temperature(s) and mass fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
84 of ANSYS, Inc. and its subsidiaries and affiliates.
CKCHRG

species temperatures, nominally 1.


cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
CDOT(*) - Real array, chemical creation rates of the species;
dimension at least KK, the total species count.
cgs units, mole/(cm**3*sec)
DDOT(*) - Real array, chemical destruction rates of the species;
dimension at least KK, the total species count.
cgs units, moles/(cm**3*sec)

7.15. CKCDYR
CKCDYR CKCDYR CKCDYR CKCDYR CKCDYR CKCDYR CKCDYR
**********************************************
**************************
******

SUBROUTINE CKCDYR (RHO, T, Y, ICKWRK, RCKWRK, CDOT, DDOT)


Returns the molar creation and destruction rates of the species
given mass density, temperature(s) and mass fractions.

INPUT
RHO - Real scalar, mass density.
cgs units, gm/cm**3
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
CDOT(*) - Real array, chemical creation rates of the species;
dimension at least KK, the total species count.
cgs units, mole/(cm**3*sec)
DDOT(*) - Real array, chemical destruction rates of the species;
dimension at least KK, the total species count.
cgs units, moles/(cm**3*sec)

7.16. CKCHRG
CKCHRG CKCHRG CKCHRG CKCHRG CKCHRG CKCHRG CKCHRG
**********************************************
**************************
******

SUBROUTINE CKCHRG (ICKWRK, RCKWRK, KCHARG)


Returns the electronic charges of the species.

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
KCHARG(*) - Integer array, electronic charges of the species;
dimension at least KK, the total species count.
KCHARG(K)=-2 indicates that species K has two
excess electrons.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 85
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

7.17. CKCOMP
CKCOMP CKCOMP CKCOMP CKCOMP CKCOMP CKCOMP CKCOMP
**********************************************
**************************
******

SUBROUTINE CKCOMP (IST, IRAY, II, I)


Returns the index of an element of a reference character string
array which corresponds to a character string;
leading and trailing blanks are ignored.

INPUT
IST - Character string; length determined by application
program.
IRAY(*) - Character string array; dimension at least II, the total
number of character strings for be searched.
II - Integer scalar, the length of IRAY to be searched.

OUTPUT
I - Integer scalar, the first array index in IRAY of a
character string IST, or 0 if IST is not found.

7.18. CKCONT
CKCONT CKCONT CKCONT CKCONT CKCONT CKCONT CKCONT
**********************************************
**************************
******

SUBROUTINE CKCONT (K, Q, ICKWRK, RCKWRK, CIK)


Returns the contributions of the reactions to the molar production
rate of a species.

INPUT
K - Integer scalar; species index number.
Q(*) - Real array, rates of progress for reactions;
dimension at least II, the total reaction count.
cgs units, moles/(cm**3*sec)
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
CIK(*) - Real array, contributions of the reactions to the
production rate of species K;
dimension least II, the total reaction count.
cgs units, mole/(cm**3*sec)

7.19. CKCOPY
CKCOPY CKCOPY CKCOPY CKCOPY CKCOPY CKCOPY CKCOPY
**********************************************
**************************
******

SUBROUTINE CKCOPY (NN, X1, X2)


Copy X1(*) array members into X2(*) array.

INPUT
NN - Integer scalar; number of elements to copy.
X1(*) - Real array; dimension at least NN.

OUTPUT
X2(*) - Real array; dimension at least NN.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
86 of ANSYS, Inc. and its subsidiaries and affiliates.
CKCPML

7.20. CKCPBL
CKCPBL CKCPBL CKCPBL CKCPBL CKCPBL CKCPBL CKCPBL
**********************************************
**************************
******

SUBROUTINE CKCPBL (T, X, ICKWRK, RCKWRK, CPBML)


Returns the mean specific heat at constant pressure in molar units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
CPBML - Real scalar, mean specific heat at constant pressure.
cgs units, ergs/(mole*K)

7.21. CKCPBS
CKCPBS CKCPBS CKCPBS CKCPBS CKCPBS CKCPBS CKCPBS
**********************************************
**************************
******

SUBROUTINE CKCPBS (T, Y, ICKWRK, RCKWRK, CPBMS)


Returns the mean specific heat at constant pressure.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
CPBMS - Real scalar, mean specific heat at constant pressure.
cgs units - ergs/(gm*K)

7.22. CKCPML
CKCPML CKCPML CKCPML CKCPML CKCPML CKCPML CKCPML
**********************************************
**************************
******

SUBROUTINE CKCPML (T, ICKWRK, RCKWRK, CPML)


Returns the specific heats at constant pressure in molar units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 87
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

OUTPUT
CPML(*) - Real array, specific heats at constant pressure for
the species;
dimension at least KK, the total species count.
cgs units, ergs/(mole*K)

7.23. CKCPMS
CKCPMS CKCPMS CKCPMS CKCPMS CKCPMS CKCPMS CKCPMS
**********************************************
**************************
******

SUBROUTINE CKCPMS (T, ICKWRK, RCKWRK, CPMS)


Returns the specific heats at constant pressure in mass units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
CPMS(*) - Real array, specific heats at constant pressure for
species;
dimension at least KK, the total species count.
cgs units, ergs/(gm*K)

7.24. CKCPOR
CKCPOR CKCPOR CKCPOR CKCPOR CKCPOR CKCPOR CKCPOR
**********************************************
**************************
******

SUBROUTINE CKCPOR (T, ICKWRK, RCKWRK, CPOR)


Returns the nondimensional specific heats at constant pressure.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
CPOR(*) - Real array, nondimensional specific heats at constant
pressure for species;
dimension at least KK, the total species count.

7.25. CKCRAY
CKCRAY CKCRAY CKCRAY CKCRAY CKCRAY CKCRAY CKCRAY
**********************************************
**************************
******

SUBROUTINE CKCRAY (LINE, NN, KRAY, LOUT, NDIM, NRAY, NF, KERR)
Searches a character string, LINE, and compares the space-delimited

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
88 of ANSYS, Inc. and its subsidiaries and affiliates.
CKCTC

substrings in LINE, to an array of character strings, KRAY;


if a substring in LINE is located in KRAY, the index of its location
in KRAY is stored in the integer array NRAY. For example, the
subroutine might be called to assign Chemkin species indices to a
given list of species names. This application is illustrated in the
following example:

input: LINE = "OH N2 NO"


KRAY(*) = "H2" "O2" "N2" "H" "O" "N" "OH" "H2O" "NO"
NN = 9, the number of entries in KRAY(*)
LOUT = 6, a logical unit number on which to write
diagnostic messages.
NDIM = 10, the dimension of array NRAY(*)
output: NRAY(*) = 7, 3, 9, the index numbers of the entries
in KRAY(*) corresponding to the substrings
in LINE
NF = 3, the number of correspondences found.
KERR = .FALSE.

INPUT
LINE - Character string.
KRAY(*) - Character string array; dimension at least NN.
NN - Integer scalar, total character string count of KRAY.
LOUT - Integer scalar, formatted output file unit.
NDIM - Integer scalar, dimension of the integer array NRAY.

OUTPUT
NRAY(*) - Integer array, indices of the elements of KRAY
which correspond to the substrings in LINE;
dimension at least NDIM.
NF - Integer scalar, count of correspondences found.
KERR - Logical, syntax or dimensioning Error flag.

7.26. CKCTC
CKCTC CKCTC CKCTC CKCTC CKCTC CKCTC CKCTC
**********************************************
**************************
******

SUBROUTINE CKCTC (T, C, ICKWRK, RCKWRK, CDOT, TAU)


Returns the molar creation rates and characteristic destruction
times of the species given temperature(s) and molar concentrations.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
C(*) - Real array, concentrations of species;
dimension at least KK, the total species count.
cgs units, mole/cm**3
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
CDOT(*) - Real array, chemical creation rates of the species;
dimension at least KK, the total species count.
cgs units, mole/(cm**3*sec)
TAU(*) - Real array, characteristic destruction times of species;
dimension at least KK, the total species count.
cgs units, sec

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 89
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

7.27. CKCTX
CKCTX CKCTX CKCTX CKCTX CKCTX CKCTX CKCTX
**********************************************
**************************
******

SUBROUTINE CKCTX (C, ICKWRK, RCKWRK, X)


Returns the mole fractions given molar concentrations.

INPUT
C(*) - Real array, concentrations of the species;
dimension at least KK, the total species count.
cgs units - mole/cm**3
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
X(*) - Real array, mole fraction of the mixture;
dimension at least KK, the total species count.

7.28. CKCTXP
CKCTXP CKCTXP CKCTXP CKCTXP CKCTXP CKCTXP CKCTXP
**********************************************
**************************
******

SUBROUTINE CKCTXP (P, T, X, ICKWRK, RCKWRK, CDOT, TAU)


Returns the molar creation rates and characteristic destruction
times of the species given pressure, temperature(s) and mole
fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
CDOT(*) - Real array, chemical creation rates of the species;
dimension at least KK, the total species count.
cgs units, mole/(cm**3*sec)
TAU(*) - Real array, characteristic destruction times of the
species;
dimension at least KK, the total species count.
cgs units, sec

7.29. CKCTXR
CKCTXR CKCTXR CKCTXR CKCTXR CKCTXR CKCTXR CKCTXR
**********************************************
**************************
******

SUBROUTINE CKCTXR (RHO, T, X, ICKWRK, RCKWRK, CDOT, TAU)


Returns the molar creation rates and characteristic destruction
times of the species given mass density, temperature(s) and mole
fractions.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
90 of ANSYS, Inc. and its subsidiaries and affiliates.
CKCTYP

INPUT
RHO - Real scalar, mass density.
cgs units, gm/cm**3
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
CDOT(*) - Real array, chemical creation rates of the species;
dimension at least KK, the total species count.
cgs units, mole/(cm**3*sec)
TAU(*) - Real array, characteristic destruction times of species;
dimension at least KK, the total species count.
cgs units, sec

7.30. CKCTY
CKCTY CKCTY CKCTY CKCTY CKCTY CKCTY CKCTY
**********************************************
**************************
******

SUBROUTINE CKCTY (C, ICKWRK, RCKWRK, Y)


Returns the mass fractions given molar concentrations.

INPUT
C(*) - Real array, concentrations of the species;
dimension at least KK, the total species count.
cgs units, mole/cm**3
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.

7.31. CKCTYP
CKCTYP CKCTYP CKCTYP CKCTYP CKCTYP CKCTYP CKCTYP
**********************************************
**************************
******

SUBROUTINE CKCTYP (P, T, Y, ICKWRK, RCKWRK, CDOT, TAU)


Returns the molar creation rates and characteristic destruction
times of the species given pressure, temperature(s) and mass
fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 91
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

OUTPUT
CDOT(*) - Real array, chemical creation rates of the species;
dimension at least KK, the total species count.
cgs units, mole/(cm**3*sec)
TAU(*) - Real array, characteristic destruction times of the
species;
dimension at least KK, the total species count.
cgs units, sec

7.32. CKCTYR
CKCTYR CKCTYR CKCTYR CKCTYR CKCTYR CKCTYR CKCTYR
**********************************************
**************************
******

SUBROUTINE CKCTYR (RHO, T, Y, ICKWRK, RCKWRK, CDOT, TAU)


Returns the molar creation rates and characteristic destruction
times of the species given mass density, temperature(s) and mass
fractions.

INPUT
RHO - Real scalar, mass density.
cgs units, gm/cm**3
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
CDOT(*) - Real array, chemical creation rates of the species;
dimension at least KK, the total species count.
cgs units, mole/(cm**3*sec)
TAU(*) - Real array, characteristic destruction times of the
species;
dimension at least KK, the total species count.
cgs units, sec

7.33. CKCVBL
CKCVBL CKCVBL CKCVBL CKCVBL CKCVBL CKCVBL CKCVBL
**********************************************
**************************
******

SUBROUTINE CKCVBL (T, X, ICKWRK, RCKWRK, CVBML)


Returns the mean specific heat at constant volume in molar units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
CVBML - Real scalar, mean specific heat at constant volume.
cgs units, ergs/(mole*K)

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
92 of ANSYS, Inc. and its subsidiaries and affiliates.
CKCVMS

7.34. CKCVBS
CKCVBS CKCVBS CKCVBS CKCVBS CKCVBS CKCVBS CKCVBS
**********************************************
**************************
******

SUBROUTINE CKCVBS (T, Y, ICKWRK, RCKWRK, CVBMS)


Returns the mean specific heat at constant volume in mass units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
CVBMS - Real scalar, mean specific heat at constant volume.
cgs units, ergs/(gm*K)

7.35. CKCVML
CKCVML CKCVML CKCVML CKCVML CKCVML CKCVML CKCVML
**********************************************
**************************
******

SUBROUTINE CKCVML (T, ICKWRK, RCKWRK, CVML)


Returns the specific heats in constant volume in molar units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
CVML(*) - Real array, specific heats at constant volume for
species;
dimension at least KK, the total species count.
cgs units, ergs/(mole*K)

7.36. CKCVMS

CKCVMS CKCVMS CKCVMS CKCVMS CKCVMS CKCVMS CKCVMS


**********************************************
**************************
******

SUBROUTINE CKCVMS (T, ICKWRK, RCKWRK, CVMS)


Returns the specific heats at constant volume in mass units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ICKWRK(*) - Integer workspace array; dimension at least LENICK.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 93
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
CVMS(*) - Real array, specific heats at constant volume for
species;
dimension at least KK, the total species count.
cgs units, ergs/(gm*K)

7.37. CKDHXP

CKDHXP CKDHXP CKDHXP CKDHXP CKDHXP CKDHXP CKDHXP


**********************************************
**************************
******

SUBROUTINE CKDHXP (P, T, X, ICKWRK, RCKWRK, HDOT)


Returns the heat release rate of the mixture
given pressure, temperature(s) and mole fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
HDOT - Real scalar, heat release rate of the mixture.
cgs units, ergs/s/cm**3

7.38. CKDHYP
CKDHYP CKDHYP CKDHYP CKDHYP CKDHYP CKDHYP CKDHYP
**********************************************
**************************
******

SUBROUTINE CKDHYP (P, T, Y, ICKWRK, RCKWRK, HDOT)


Returns the heat release rate of the mixture
given pressure, temperature(s) and mass fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
HDOT - Real scalar, heat release rate of the mixture.
cgs units, ergs/s/cm**3

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
94 of ANSYS, Inc. and its subsidiaries and affiliates.
CKDOT

7.39. CKDLIM
CKDLIM CKDLIM CKDLIM CKDLIM CKDLIM CKDLIM CKDLIM
**********************************************
**************************
******

SUBROUTINE CKDLIM (STRING, DELIM, I1, I2)


returns pointers into a character string of the first and
second occurrences of a particular character.

Arguments:
STRING - Character string.
DELIM - Single character.
I1 - Integer scalar, location in STRING of first DELIM.
I2 - Integer scalar, location in STRING of second DELIM.

7.40. CKDONE
CKDONE CKDONE CKDONE CKDONE CKDONE CKDONE CKDONE
**********************************************
**************************
******

SUBROUTINE CKDONE (ICKWRK, RCKWRK)


This is a general cleanup routine that should be called by an
Application when there is NO further need for the Gas-phase Kinetics
Subroutine Library (works in conjunction with CKINIT).

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

7.41. CKDOT
CKDOT CKDOT CKDOT CKDOT CKDOT CKDOT CKDOT
**********************************************
**************************
******

SUBROUTINE CKDOT (T, RKF, RKR, ICKWRK, RCKWRK, CDOT, DDOT)


Returns the molar creation and destruction rates of the species
given reactions' rates of progress.

INPUT
T(*) - Real array, temperature (K).
RKF(*) - Real array, reactions' forward rates of progress;
dimension at least II, the total reaction count.
RKR(*) - Real array, reactions' reverse rates of progress;
dimension at least II, the total reaction count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
CDOT(*) - Real array, chemical creation rates of the species;
dimension at least KK, the total species count.
cgs units, mole/(cm**3*sec)
DDOT(*) - Real array, chemical destruction rates of the species;
dimension at least KK, the total species count.
cgs units, moles/(cm**3*sec)

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 95
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

7.42. CKDTAB
CKDTAB CKDTAB CKDTAB CKDTAB CKDTAB CKDTAB CKDTAB
**********************************************
**************************
******

SUBROUTINE CKDTAB (STRING)


Replaces any tab character in a character string with one space.

INPUT/OUTPUT
STRING - Character string.

7.43. CKEQC
CKEQC CKEQC CKEQC CKEQC CKEQC CKEQC CKEQC
**********************************************
**************************
******

SUBROUTINE CKEQC (T, C, ICKWRK, RCKWRK, EQK)


Returns the equilibrium constants of the reactions given
temperature(s) and molar concentrations.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
C(*) - Real array, concentrations of the species;
dimension at least KK, the total species count.
cgs units, mole/cm**3
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
EQK(*) - Real array, equilibrium constants in concentration units
for reactions;
dimension at least II, the total reaction count.
cgs units, (mole/cm**3)**some power, depending on
the reaction

7.44. CKEQXP
CKEQXP CKEQXP CKEQXP CKEQXP CKEQXP CKEQXP CKEQXP
**********************************************
**************************
******

SUBROUTINE CKEQXP (P, T, X, ICKWRK, RCKWRK, EQK)


Returns the equilibrium constants for reactions given pressure,
temperature(s) and mole fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
96 of ANSYS, Inc. and its subsidiaries and affiliates.
CKEQYP

OUTPUT
EQK(*) - Real array, equilibrium constants for reactions;
dimension at least II, the total reaction count.
cgs units, (mole/cm**3)**some power, depending on
the reaction

7.45. CKEQXR
CKEQXR CKEQXR CKEQXR CKEQXR CKEQXR CKEQXR CKEQXR
**********************************************
**************************
******

SUBROUTINE CKEQXR (RHO, T, X, ICKWRK, RCKWRK, EQK)


Returns the equilibrium constants of the reactions given mass
density, temperature(s) and mole fractions.

INPUT
RHO - Real scalar, mass density.
cgs units, gm/cm**3
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
species.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
EQK(*) - Real array, equilibrium constants in concentration units
for reactions;
dimension at least II, the total reaction count.
cgs units, (mole/cm**3)**some power, depending on
the reaction

7.46. CKEQYP
CKEQYP CKEQYP CKEQYP CKEQYP CKEQYP CKEQYP CKEQYP
**********************************************
**************************
******

SUBROUTINE CKEQYP (P, T, Y, ICKWRK, RCKWRK, EQK)


Returns the equilibrium constants for reactions given pressure
temperature(s) and mass fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
EQK(*) - Real array, equilibrium constants in concentration units
for reactions;
dimension at least II, the total reaction count.
cgs units, (mole/cm**3)**some power, depending on
the reaction

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 97
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

7.47. CKEQYR
CKEQYR CKEQYR CKEQYR CKEQYR CKEQYR CKEQYR CKEQYR
**********************************************
**************************
******

SUBROUTINE CKEQYR (RHO, T, Y, ICKWRK, RCKWRK, EQK)


Returns the equilibrium constants of the reactions given mass
density, temperature(s) and mass fractions.

INPUT
RHO - Real scalar, mass density.
cgs units; gm/cm**3
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
EQK(*) - Real array, equilibrium constants in concentration units
for reactions;
dimension at least II, the total reaction count.
cgs units; (mole/cm**3)**some power, depending on
the reaction

7.48. CKFALP
CKFALP CKFALP CKFALP CKFALP CKFALP CKFALP CKFALP
**********************************************
**************************
******

SUBROUTINE CKFALP (P, T, X, ICKWRK, RCKWRK, I, RKLOW, CTB, PR, FC,


PCOR)
Returns details concerning the reaction rate constant for
pressure-dependent reactions.

INPUT
P - Pressure.
cgs units - dynes/cm**2
Data type - real scalar
T(*) - Temperature array.
cgs units - K
Data type - real vector
X - Mole fractions of the species.
cgs units - none
Data type - real array
Dimension X(*) at least KK, the total number of
species.
ICKWRK - Array of integer workspace.
Data type - integer array
Dimension ICKWRK(*) at least LENIWK.
RCKWRK - Array of real work space.
Data type - real array
Dimension RCKWRK(*) at least LENRWK.

OUTPUT
RKLOW - Low Pressure forward reaction rate for pressure-
dependent reactions. It is defined to be zero for
non-pressure-dependent reactions.
cgs units - 1/(sec) *
(cm**3/mole)**(sum of forward stoich. coeff)
Data type - real

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
98 of ANSYS, Inc. and its subsidiaries and affiliates.
CKFAL

CTB - Effective concentration for reaction, I_SAVE.


This takes into account the effectiveness factors
for the reaction, applicable to third body
and pressure-dependent reactions. It is defined to be
equal to the total concentration for other pressure-
dependent or third body reactions, and to be equal to
one for reactions which don't use it
Units are moles/cm**3.
cgs units - mole/(cm**3)
Data type - real
PR - Reduced Pressure for pressure-dependent reactions.
This is defined to be equal to CTB*RKLOW_SAVE/RCF_INF.
where RCF_INF is the high pressure rate constant.
This is a dimensionless quantity. For non-pressure-
dependent reactions, this quantity is defined to be 0.
cgs units - unitless
Data type - real
FC - Correction to L-H rate constant for pressure-dependent
reactions. It is defined to be 0 for non-pressure-
dependent reactions.
cgs units - unitless
Data type - real
PCOR - This is equal to the pressure correction ratio for
pressure-dependent reactions, i.e., RC(T,P) / RC(T)_inf
the ratio of the actual reaction rate to the high
pressure reaction rate constant.
cgs units - unitless
Data type - real array

7.49. CKFAL
CKFAL CKFAL CKFAL CKFAL CKFAL CKFAL CKFAL
**********************************************
**************************
******

SUBROUTINE CKFAL (NDIM, ICKWRK, RCKWRK, IFOP, IFLO, KFAL, FPAR)


Returns a set of flags indicating whether a reaction has pressure-
dependent behavior and an array of parameters.

INPUT
NDIM - Integer scalar, first dimension of the matrix FPAR;
NDIM must be greater than or equal to NFAR, the
maximum number of supplemental rate parameters, which
depends on the mechanism.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
IFOP(*) - Integer array, flags indicating pressure-dependent
behavior;
dimension at least II, the total reaction count.
IFOP(I) indicates the pressure-dependent behavior
of reaction I:
0 - No pressure dependency
1 - Lindeman form (3 parameters)
2 - SRI form (8 parameters)
3 - Troe form (6 parameters)
4 - Troe form (7 parameters)
6 - Chebychev form (depends on mechanixm)
IFLO(*) - Integer array, flags indicating pressure-dependency;
dimension at least II, the total reaction count.
IFLO(I) indicates
0 - unimolecular pressure-dependency,
1 - chemically activated bi-molecular.
KFAL(*) - Integer array, flags indicating type of bath-gas
concentration to be used in expressions
(see footnote on page 27);
dimension at least II, the total reaction count.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 99
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

KFAL(I) indicates the type of reaction I:


0 - Use total concentration of gas mixture
(with the added capability of using enhanced
third body coefficients) (default)
K - Use the concentration of species K
FPAR(*,*) - Real matrix, pressure dependency parameters;
dimension at least NFAR for the first, the maximum
number of parameters (currently 8), and
at least II for the second, the total reaction
count.
The number of parameters depends on the
particular functional form indicated by the IFOP array:

For IFOP(I) = 1 through 4,


FPAR(1,I), FPAR(2,I), FPAR(3,I) are always the
parameters entered on the LOW auxiliary keyword line
in the CHEMKIN interpreter input file.
FPAR(1,I) = Pre-exponential for low pressure
limiting rate constant
cgs units, mole-cm-sec-K
FPAR(2,I) = Temperature dependence exponents
for the low pressure limiting rate
constants.
FPAR(3,I) = Activation energy for the low
pressure limiting rate constant.
cgs units, K
Additional FPAR values depend on IFOP:
IFOP(I) = 2:
FPAR(4,I) = a
FPAR(5,I) = b (Kelvin)
FPAR(6,I) = c (Kelvin)
FPAR(7,I) = d
FPAR(8,I) = e
IFOP(I) = 3:
FPAR(4,I) = a
FPAR(5,I) = T*** (Kelvin)
FPAR(6,I) = T* (Kelvin)
IFOP(I) = 4:
FPAR(4,I) = a
FPAR(5,I) = T*** (Kelvin)
FPAR(6,I) = T* (Kelvin)
FPAR(7,I) = T** (Kelvin)

For IFOP(I) = 6:
FPAR(1,I) = n, the number of temperature coeff.
FPAR(2,I) = m, the number of pressure coeff.
FPAR(3,I) = tmin, lower temperature limit
FPAR(4,I) = tmax, upper temperature limit
FPAR(5,I) = pmin, lower pressure limit
FPAR(6,I) = pmax, upper temperature limit
FPAR(j,I), j=7,m*n+6 are the polynomial coefficients

7.50. CKFRCH
CKFRCH CKFRCH CKFRCH CKFRCH CKFRCH CKFRCH CKFRCH
**********************************************
**************************
******

INTEGER FUNCTION CKFRCH (STR)

Returns the index of the first non-blank, non-tab character in


a string.

INPUT
STR - Character string

RETURN
integer position of the first non-blank character in a string

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
100 of ANSYS, Inc. and its subsidiaries and affiliates.
CKGML

7.51. CKGBML
CKGBML CKGBML CKGBML CKGBML CKGBML CKGBML CKGBML
**********************************************
**************************
******

SUBROUTINE CKGBML (P, T, X, ICKWRK, RCKWRK, GBML)


Returns the mean Gibbs free energy of the mixture in molar units
given pressure, temperature(s) and mole fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
GBML - Real scalar, mean Gibbs free energy.
cgs units, ergs/mole

7.52. CKGBMS
CKGBMS CKGBMS CKGBMS CKGBMS CKGBMS CKGBMS CKGBMS
**********************************************
**************************
******

SUBROUTINE CKGBMS (P, T, Y, ICKWRK, RCKWRK, GBMS)


Returns the mean Gibbs free energy of the mixture in mass units
given pressure, temperature(s), and mass fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
GBMS - Real scalar, mean Gibbs free energy.
cgs units, ergs/gm

7.53. CKGML
CKGML CKGML CKGML CKGML CKGML CKGML CKGML
**********************************************
**************************
******

SUBROUTINE CKGML (T, ICKWRK, RCKWRK, GML)


Returns the standard state Gibbs free energies in molar units.

INPUT

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 101
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

T(*) - Real array, temperature(s); dimension is determined by


the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
GML(*) - Real array, standard state Gibbs free energies for
the species;
dimension at least KK, the total species count.
cgs units, ergs/mole

7.54. CKGMS
CKGMS CKGMS CKGMS CKGMS CKGMS CKGMS CKGMS
**********************************************
**************************
******

SUBROUTINE CKGMS (T, ICKWRK, RCKWRK, GMS)


Returns the standard state Gibbs free energies in mass units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
GMS(*) - Real array, standard state Gibbs free energies for
the species;
dimension at least KK, the total species count.
cgs units, ergs/gm

7.55. CKHBML
CKHBML CKHBML CKHBML CKHBML CKHBML CKHBML CKHBML
**********************************************
**************************
******

SUBROUTINE CKHBML (T, X, ICKWRK, RCKWRK, HBML)


Returns the mean enthalpy of the mixture in molar units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
HBML - Real scalar, mean enthalpy.
cgs units - ergs/mole

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
102 of ANSYS, Inc. and its subsidiaries and affiliates.
CKHMS

7.56. CKHBMS
CKHBMS CKHBMS CKHBMS CKHBMS CKHBMS CKHBMS CKHBMS
**********************************************
**************************
******

SUBROUTINE CKHBMS (T, Y, ICKWRK, RCKWRK, HBMS)


Returns the mean enthalpy of the mixture in mass units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
HBMS - Real scalar, mean enthalpy.
cgs units, ergs/gm

7.57. CKHML
CKHML CKHML CKHML CKHML CKHML CKHML CKHML
**********************************************
**************************
******

SUBROUTINE CKHML (T, ICKWRK, RCKWRK, HML)


Returns the enthalpies in molar units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
HML(*) - Real array, enthalpies for species;
dimension at least KK, the total species count.
cgs units, ergs/mole

7.58. CKHMS
CKHMS CKHMS CKHMS CKHMS CKHMS CKHMS CKHMS
**********************************************
**************************
******

SUBROUTINE CKHMS (T, ICKWRK, RCKWRK, HMS)


Returns the enthalpies in mass units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 103
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

OUTPUT
HMS(*) - Real array, enthalpies for species;
dimension at least KK, the total species count.
cgs units, ergs/gm

7.59. CKHORT
CKHORT CKHORT CKHORT CKHORT CKHORT CKHORT CKHORT
**********************************************
**************************
******

SUBROUTINE CKHORT (T, ICKWRK, RCKWRK, HORT)


Returns the nondimensional enthalpies.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
HORT(*) - Real array, nondimensional enthalpies for species;
dimension at least KK, the total species count.

7.60. CKHRX
CKHRX CKHRX CKHRX CKHRX CKHRX CKHRX CKHRX
**********************************************
**************************
******

SUBROUTINE CKHRX (I, HML, ICKWRK, RCKWRK, HRXI)


Returns the molar heat of reaction I.

INPUT
I - Integer scalar, reaction index.
HML(*) - Real array, molar enthalpies for species;
dimension at lest KK, the total species count.
cgs units, ergs/mole
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
HRXI - Real scalar, molar heat of reaction I.
cgs units, ergs/mole

7.61. CKI2CH
CKI2CH CKI2CH CKI2CH CKI2CH CKI2CH CKI2CH CKI2CH
**********************************************
**************************
******

SUBROUTINE CKI2CH (NUM, STR, I, KERR)


Returns a character string representation of an integer and the
character count of the string.

INPUT
NUM - Integer scalar, to be converted to a character string;
the maximum magnitude of NUM is machine-dependent.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
104 of ANSYS, Inc. and its subsidiaries and affiliates.
CKIJAN

OUTPUT
STR - Character string, left-justified character representation
of NUM.
I - Integer scalar, the non-blank character count of STR.
KERR - Logical, character length error flag.

7.62. CKIEXC
CKIEXC CKIEXC CKIEXC CKIEXC CKIEXC CKIEXC CKIEXC
**********************************************
**************************
******

SUBROUTINE CKIEXC (ICKWRK, RCKWRK, IEXC, EEXC)


Returns a set of flags indicating whether the reactions are
excitation reactions and, if so, the energy loss per event in eV.

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
IEXC(*) - Integer array, excitation-only reaction flag;
dimension at least II, the total reaction count.
IEXC(I)= -1 reaction I is not an excitation-only reax
IEXC(I)= 1 reaction I is an excitation reaction
EEXC(*) - Real array, excitation energy loss per event in forward
direction for reactions;
dimension at least II, the total reaction count.

7.63. CKIFT1
CKIFT1 CKIFT1 CKIFT1 CKIFT1 CKIFT1 CKIFT1 CKIFT1
**********************************************
**************************
******

SUBROUTINE CKIFT1 (IR, ICKWRK, RCKWRK, IFT1, FPAR)


Returns an integer flag to indicate whether reaction IR uses
the FIT1 rate expression, and if so, returns the array of
FIT1 supplemental parameters.

INPUT
IR - Integer scalar, reaction index.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
FPAR - Integer scalar,
1, reaction IR uses the FIT1 rate expression.
0, no.
FPAR(*) - Real array, supplemental FIT1 parameters
for reaction IR.
Dimension FPAR(*) at least NF1R, the
number of supplemental parameters required
to calculate a FIT1 reaction rate;
in the current implementation, NF1R=4.

7.64. CKIJAN
CKIJAN CKIJAN CKIJAN CKIJAN CKIJAN CKIJAN CKIJAN
**********************************************

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 105
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

**************************
******

SUBROUTINE CKIJAN (IR, ICKWRK, RCKWRK, IJAN, RJAN)


Returns an integer flag to indicate whether reaction IR uses
the Janev rate expression, and if so, returns the array of
Janev supplemental parameters.

INPUT
IR - Integer scalar, reaction index.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
IJAN - Integer scalar,
1, reaction IR uses the Janev et al. rate expression.
0, no.
RJAN(*) - Real array, supplemental Janev parameters
for reaction IR.
Dimension RJAN(*) at least NJAR, the
number of supplemental parameters required
to calculate a Janev reaction rate;
in the current implementation, NJAR=9.

7.65. CKILT
CKILT CKILT CKILT CKILT CKILT CKILT CKILT
**********************************************
**************************
******

SUBROUTINE CKILT (IR, ICKWRK, RCKWRK, ILT, RLT)


Returns an integer flag to indicate whether reaction IR uses
the Landau-Teller rate expression, and if so, returns the array of
Landau-Teller supplemental parameters.

INPUT
IR - Integer scalar, reaction index.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
ILT - Integer scalar,
1, reaction IR uses the Landau-Teller rate expression.
0, no.
RLT(*) - Real array, supplemental Landau-Teller parameters
for reaction IR.
Dimension RLT(*) at least NLAR, the
number of supplemental parameters required
to calculate a Landau-Teller reaction rate;
in the current implementation, NLAR=2.

7.66. CKIMOM
CKIMOM CKIMOM CKIMOM CKIMOM CKIMOM CKIMOM CKIMOM
**********************************************
**************************
******

SUBROUTINE CKIMOM (ICKWRK, IMOM)


Returns a set of flags indicating whether the reactions are
electron momentum-transfer collision frequencies and, if so,
the index of the species with which the electron collides.

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
106 of ANSYS, Inc. and its subsidiaries and affiliates.
CKINIT

OUTPUT
IMOM(*) - Integer array, electron momentum-transfer collision
frequency flags for reactions;
dimension at least II, the total reaction count.
IMOM(I)= -1 reaction I is not a mom-transfer coll freq
IMOM(I)= K reaction I is a mom-transfer coll frequency
and K is species index of the electron's
collision partner

7.67. CKINDX
CKINDX CKINDX CKINDX CKINDX CKINDX CKINDX CKINDX
**********************************************
**************************
******

SUBROUTINE CKINDX (ICKWRK, RCKWRK, MM, KK, II, NFIT)


Returns a group of indices defining the size of the particular
reaction mechanism

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
MM - Integer scalar, mechanism total element count.
KK - Integer scalar, mechanism total species count.
II - Integer scalar, mechanism total reaction count.
NFIT - Integer scalar, number of coefficients in fits to
thermodynamic data for a temperature range;
NFIT=number of coefficients in polynomial fits to CP/R
plus 2.

7.68. CKINIT
CKINIT CKINIT CKINIT CKINIT CKINIT CKINIT CKINIT
**********************************************
**************************
******

SUBROUTINE CKINIT (LENICK, LENRCK, LENCCK, LINC, LOUT, ICKWRK,


RCKWRK, CCKWRK, IFLAG)**
Reads the linkfile and creates the internal work arrays ICKWRK,
RCKWRK and CCKWRK. CKINIT must be called before any other CHEMKIN
subroutine can be used, as the work arrays must be available as
their input. Applications should call CKDONE when finished to cleanup
resources allocated by CKINIT.

INPUT
LENICK - Integer scalar, length of the integer work array, ICKWRK.
LENRCK - Integer scalar, length of the real work array, RCKWRK.
LENCCK - Integer scalar, length of the character work array, CCKWRK.
LINC - Integer scalar, linkfile input file unit number.
LOUT - Integer scalar, formatted output file unit number.

OUTPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.
CCKWRK(*) - Character string workspace array;
dimension at least LENCCK.
IFLAG - Integer scalar to indicate successful reading of
linkfile; IFLAG>0 is an error type.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 107
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

7.69. CKINU
CKINU CKINU CKINU CKINU CKINU CKINU CKINU
**********************************************
**************************
******

SUBROUTINE CKINU (I, NDIM, ICKWRK, RCKWRK, NSPEC, KI, NU)


Returns a count of species in a reaction, and their indices
and stoichiometric coefficients.

INPUT
I - Integer scalar, index of a reaction;
I must be positive, and less than or equal to NII,
the total reaction count.
NDIM - Integer scalar, dimension of the arrays KI and NU;
NDIM must be at least MAXSP, the maximum number of
species allowed in a reaction.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
NSPEC - Integer scalar, the total species count for reaction I.
KI(*) - Integer array, species indices for those in
reaction I; dimension at least MAXSP, the maximum
number of species allowed in a reaction.
KI(N) is the index of the Nth species in reaction I.
NU(*) - Integer array, stoichiometric coefficients for those
in reaction I;
dimension at least MAXSP, the maximum number of
species allowed in a reaction.
NU(N) is the stoichiometric coefficient of the Nth
Nth species in reaction I, and
NU < 0 if the Nth species is a reactant;
NU > 0 if the Nth species is a product.

7.70. CKION
CKION CKION CKION CKION CKION CKION CKION
**********************************************
**************************
******

SUBROUTINE CKION (ICKWRK, KION)


Returns the ion species indices

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
KION(*) - Integer array, ion species indices;
dimension at least NKKI, the total ion count.

7.71. CKIORD
CKIORD CKIORD CKIORD CKIORD CKIORD CKIORD CKIORD
**********************************************
**************************
******

SUBROUTINE CKIORD (IDIM, KDIM, ICKWRK, RCKWRK, NIORD, IORD, FORD,


RORD)
Returns the count and indices of reactions with modified species
order and the order values for the species.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
108 of ANSYS, Inc. and its subsidiaries and affiliates.
CKIPLG

INPUT
IDIM - Integer scalar, dimension of arrays IFORD and IRORD;
IDIM must be at least NIORD, the total number of
reactions with modified species orders.
KDIM - Integer scalar, first dimension of the arrays FORD and
RORD;
KDIM must be at least NKK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
NIORD - Integer scalar, total number of reactions with modified
species orders.
IORD(*) - Integer array, indices of reactions with modified
species orders; dimension at least NIORD.
FORD(*,*) - Real matrix, the modified forward species orders for the
NIORD reactions;
dimension at least NKK for the first, the total species
count, and at least NIORD for the second.
FORD(K,N) is the forward order of species K for the Nth
change-order reaction.
RORD(*,*) - Real matrix, the modified reverse species orders for the
NIORD reactions;
dimension at least NKK for the first, the total species
count, and at least NRORD for the second.
RORD(K,N) is the reverse order of species K for the Nth
change-order reaction.

7.72. CKIPLG
CKIPLG CKIPLG CKIPLG CKIPLG CKIPLG CKIPLG CKIPLG
**********************************************
**************************
******

SUBROUTINE CKIPLG (I, LOUT, ICKWRK, RCKWRK, NDIM1, NPRES, PRES,


PPAR, KERR)

Returns parameters for a pressure-fit option reaction.

INPUT
I - Integer scalar, index of a reaction.
LOUT - Integer scalar, formatted output file unit number.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.
NDIM1 - Integer scalar, first dimension for a matrix of
pressure-fit Arrhenius parameters; if reaction I is
a pressure-fit reaction, NDIM1 must be at least the
number of pressures given for the reaction

OUTPUT
NPRES - Integer scalar, count of pressures given for a
pressure-fit reaction; if NPLG=0, reaction I is not
a pressure-fit reaction.
PRES(*) - Real array; if reaction I is a pressure-fit reaction,
PRES contains the NPRES pressures (atm) used in the fits.
PPAR(*,*) - Real matrix; if reaction I is a pressure-fit reaction,
PPAR contains 3 Arrhenius parameters for each of the
NPRES pressures used in the fits. NDIM1 is the first
dimension, and must be at least NPLG, the count of
pressures given for reaction I; the second dimension
must be at least 3, the number of parameters for the
Arrhenius rate expression.
KERR Logical error flag

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 109
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

7.73. CKIREV
CKIREV CKIREV CKIREV CKIREV CKIREV CKIREV CKIREV
**********************************************
**************************
******

SUBROUTINE CKIREV (IR, ICKWRK, RCKWRK, IREV, RAR, RBR, RER)


Returns an integer flag to indicate whether reaction IR has an
explicitly assigned reverse rate constant. It also returns the
reverse Arrhenius expression values for reaction IR,
if it was explicitly assigned in the Chemkin interpreter.
If reverse Arrhenius values were not explicitly assigned,
RAR, RBR and RER will be zero.

INPUT
IR - Integer scalar, reaction index.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
IREV - Integer scalar,
1, reaction IR has explicit reverse rate parameters
0, no.
RAR - Real scalar, explicit pre-exponential constants
for reaction IR.
cgs units, mole-cm-sec-K
RBR - Real scalar, explicit temperature dependence exponents
for reaction IR.
RER - Real scalar, explicit activation energy for reaction IR.
cgs units, Kelvins

7.74. CKIRNU
CKIRNU CKIRNU CKIRNU CKIRNU CKIRNU CKIRNU CKIRNU
**********************************************
**************************
******

SUBROUTINE CKIRNU (IDIM, NDIM, ICKWRK, RCKWRK, NIRNU, IRNU, NSPEC,


KI, RNU)
Returns the count and indices of reactions with real stoichiometric
coefficients, counts of species in the reactions, and the species
indices and coefficients.

INPUT
IDIM - Integer scalar, dimension of the arrays IRNU and NSPEC,
and the second dimension of matrices KI and RNU;
IDIM must be at least NIRNU, the number of reactions
with real stoichiometric coefficients.
NDIM - Integer scalar, first dimension of matrices KI and RNU;
NDIM must be at least MAXSP, the maximum number of
species allowed in a reaction.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
NIRNU - Integer scalar, total number of reactions with real
stoichiometric coefficients.
IRNU(*) - Integer array, indices of reactions with real
stoichiometric coefficients; dimension at least NIRNU.
NSPEC(*) - Integer array, total number of species in a reaction;
dimension at least NIRNU.
KI(*,*) - Integer matrix, species indices for species in the
NIRNU reactions; dimension at least MAXSP for the first,
and at least NIRNU for the second.
KI(M,N) is the species index of the Mth species in the
Nth real coefficient reaction.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
110 of ANSYS, Inc. and its subsidiaries and affiliates.
CKITDE

RNU(*,*) - Real matrix, stoichiometric coefficients for species


in the NIRNU reactions; dimension at least MAXSP for
the first, and at least NIRNU for the second.
RNU(M,N) is the stoichiometric coefficient of the Mth
species in the Nth real coefficient reaction, and
RNU(M,*) < 0 if the Mth species is a reactant;
RNU(M,*) > 0 if the Mth species is a product.

7.75. CKISIG
CKISIG CKISIG CKISIG CKISIG CKISIG CKISIG CKISIG
**********************************************
**************************
******

SUBROUTINE CKISIG (P, T, X, XNUIK, KK, ICKWRK, RCKWRK, SIGI)


Returns the ion species electrical conductivities given
collision frequencies.

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
XNUIK(*,*)- Real matrix, momentum-transfer collision frequencies
for the ions with the species;
dimension at least KK for the first, the total species
count, and at least NKKI for the second, the ion count.
KK - Integer scalar, first dimension of XNUIK.

OUTPUT
SIGI(*) - Real array, ion electrical conductivities (DC);
dimension at least NKKI, the total ion count.
cgs units, GM/CM*S

7.76. CKITDE
CKITDE CKITDE CKITDE CKITDE CKITDE CKITDE CKITDE
**********************************************
**************************
******

SUBROUTINE CKITDE (ICKWRK, RCKWRK, ITDE)


Returns a set of flags indicating whether the reactions are
non-thermal, and if so, returns the index of the species on
which the reaction depends.

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
ITDE(*) - Integer array, non-termal flags for reactions;
dimension at least II, the total reaction count.
ITDE(I)= -1 reaction I is not a non-thermal reaction
ITDE(I)= K reaction I is a non-thermal reaction with
temperature dependence on species # K

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 111
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

7.77. CKITR
CKITR CKITR CKITR CKITR CKITR CKITR CKITR
**********************************************
**************************
******

SUBROUTINE CKITR (ICKWRK, RCKWRK, ITHB, IREV)


Returns a set of flags indicating whether the reactions are
reversible or whether they contain arbitrary third bodies

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
ITHB(*) - Integer array, third-body indices for reactions;
dimension at least II, the total reaction count.
ITHB(I)= -1 reaction I is not a third-body reactions
ITHB(I)= 0 reaction I is a third-body reaction with
no enhanced third body efficiencies
ITHB(I)= N reaction I is a third-body reaction with
N species enhanced third-body efficiencies.

IREV(*) - Integer array, reversibility indices and species


count (reactants plus products) for reactions;
dimension at least II, the total reaction count.
IREV(I)=+N, reversible reaction I has N species
IREV(I)=-N, irreversible reaction I has N species

7.78. CKIUQ
CKIUQ CKIUQ CKIUQ CKIUQ CKIUQ CKIUQ CKIUQ
**********************************************
**************************
******

SUBROUTINE CKIUQ (ICKWRK, RCKWRK, IQUSR)


Returns a set of flags indicating whether the reactions are
user-modify rate-of-progress reactions, and if so,
the user-modify type.

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
OUTPUT
IQUSR(*) - Integer array, user rate-modify flags for reactions;
dimension at least II, the total reaction count.
IQUSR(I)= 0 reaction I is not a user rate-modify reaction
IQUSR(I)= N reaction I is a user rate-modify reaction,
with rate-modify type N

7.79. CKIVIS
CKIVIS CKIVIS CKIVIS CKIVIS CKIVIS CKIVIS CKIVIS
**********************************************
**************************
******

SUBROUTINE CKIVIS (P, T, X, XNUIM, K, ICKWRK, RCKWRK, VISI)


Returns the ion species viscosities given collision frequencies.

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.
P - Real scalar, pressure.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
112 of ANSYS, Inc. and its subsidiaries and affiliates.
CKKFKR

cgs units, dynes/cm**2


T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array of mole fractions of the mixture;
dimension at least KK, the total species count.
XNUIM - Real scalar, momentum-transfer collision frequency
for an ion
K - Integer scalar, species index of the ion
OUTPUT
VISI - Real scalar, ion viscosity
cgs units, GM/CM*S

7.80. CKIXSM
CKIXSM CKIXSM CKIXSM CKIXSM CKIXSM CKIXSM CKIXSM
**********************************************
**************************
******

SUBROUTINE CKIXSM (ICKWRK, IXSM, IXSK)


Returns a set of flags indicating whether the reactions are ion
momentum-transfer cross sections.

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.

OUTPUT
IXSM(*) - Integer array, ion momentum-transfer cross-section flag;
dimension at least II, the total reaction count.
IXSM(I)= -1 reaction I is not a ion mom-transfer x-sec
IXSM(I)= KI reaction I is a ion mom-trans cross-section
and KI is the ion species index
IXSK(*) - Integer array, species indices for the collision partner
of the ion momentum-transfer cross-section reactions;
dimension at least II, the total reaction count.

7.81. CKKFKR
CKKFKR CKKFKR CKKFKR CKKFKR CKKFKR CKKFKR CKKFKR
**********************************************
**************************
******

SUBROUTINE CKKFKR (P, T, X, ICKWRK, RCKWRK, FWDK, REVK)


Returns the forward and reverse reaction rates for reactions
given pressure, temperature(s) and mole fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
FWDK(*) - Real array, forward reaction rates for reactions;
dimension at least II, the total reaction count.
cgs units, depends on the reaction
REVK(*) - Real array, reverse reaction rates for reactions;

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 113
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

dimension at least II, the total reaction count.


cgs units, depends on the reaction

7.82. CKKFRT
CKKFRT CKKFRT CKKFRT CKKFRT CKKFRT CKKFRT CKKFRT
**********************************************
**************************
******

SUBROUTINE CKKFRT (P, T, ICKWRK, RCKWRK, RKFT, RKRT)


Returns the forward and reverse reaction rates for reactions
given pressure and temperature(s)

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
RKFT(*) - Real array, forward reaction rates for reactions;
dimension at least II, the total reaction count.
cgs units, depends on the reaction
RKRT(*) - Real array, reverse reaction rates for reactions;
dimension at least II, the total reaction count.
cgs units, depends on the reaction

7.83. CKKTFL
CKKTFL CKKTFL CKKTFL CKKTFL CKKTFL CKKTFL CKKTFL
**********************************************
**************************
******

SUBROUTINE CKKTFL (ICKWRK, KTFL)


Allows the user to assign a location in the temperature array
to use for each gas-phase species.

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
KTFL(*) - Integer array, indices into the temperature(s) for
species;
dimension at least KK, the total species count.
Default value stored in ICKWRK is set to 1 in CKINIT.

7.84. CKKTMP
CKKTMP CKKTMP CKKTMP CKKTMP CKKTMP CKKTMP CKKTMP
**********************************************
**************************
******

SUBROUTINE CKKTMP (ICKWRK, KTFL)


Returns the temperature array indices for the
gas-phase species.

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
KTFL(*) - Integer array, indices into the temperature(s) for
species;

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
114 of ANSYS, Inc. and its subsidiaries and affiliates.
CKLEN2

dimension at least KK, the total species count.


Default value stored in ICKWRK is set to 1 in CKINIT.

7.85. CKKUW
CKKUW CKKUW CKKUW CKKUW CKKUW CKKUW CKKUW
**********************************************
**************************
******

SUBROUTINE CKKUW (ICKWRK, KWUSR)


Returns a set of flags indicating whether the species are
user-modify rate-of-production species, and if so,
the user-modify type.

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
OUTPUT
KWUSR(*) - Integer array, user rate-modify flags for species;
dimension at least KK, the total species count.
KWUSR(K)= 0 species K is not a user rate-modify species
KWUSR(K)= N species is a user rate-modify species,
with rate-modify type N

7.86. CKLEN
CKLEN CKLEN CKLEN CKLEN CKLEN CKLEN CKLEN
**********************************************
**************************
******

SUBROUTINE CKLEN (LINC, LOUT, LENI, LENR, LENC, IFLAG)


Returns the lengths required for work arrays.

INPUT
LINC - Integer scalar, input file unit for the linkfile.
LOUT - Integer scalar, formatted output file unit.

OUTPUT
LENI - Integer scalar, minimum length required for the
integer work array.
LENR - Integer scalar, minimum length required for the
real work array.
LENC - Integer scalar, minimum length required for the
character work array.
IFLAG - Integer scalar, indicates successful reading of
linkfile; IFLAG>0 indicates error type.

7.87. CKLEN2
CKLEN2 CKLEN2 CKLEN2 CKLEN2 CKLEN2 CKLEN2 CKLEN2
**********************************************
**************************
******

SUBROUTINE CKLEN2 (LINC, LOUT, LI, LR, LC, MM, KK, II,
MAXSP, MAXTP, MAXTB, MAXORD, KKI, IFLAG)
Returns the lengths required for work arrays, as well as
mechanism size information for memory allocation.

INPUT
LINC - Integer scalar, input file unit for the linkfile.
LOUT - Integer scalar, formatted output file unit.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 115
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

OUTPUT
LI - Integer scalar, minimum length required for the
integer work array.
LR - Integer scalar, minimum length required for the
real work array.
LC - Integer scalar, minimum length required for the
character work array.
MM - Integer scalar, number of elements
KK - Integer scalar, number of gas-phase species
II - Integer scalar, number of gas-phase reactions
MAXSP - Integer scalar, maximum number of species per reaction
MAXTP - Integer scalar, maximum number of temperature bounds
for the thermodynamic fits.
MAXTB - Integer scalar, maximum number of third bodies per reax
MAXORD - Integer scalar, maximum number of order-changes per
reactions that use arbitrary reaction orders
KKI - Integer scalar, number of gas-phase ions
IFLAG - Integer scalar, indicates successful reading of
linkfile; IFLAG>0 indicates error type.

7.88. CKLKUP
CKLKUP CKLKUP CKLKUP CKLKUP CKLKUP CKLKUP CKLKUP
**********************************************
**************************
******

INTEGER FUNCTION CKLKUP (ITEM, LIST, NLIST)


Looks up an item in an integer list. If an item is found,
it returns the first position of the item in the list. If an
item is not found, this routine returns the value 0.

INPUT
ITEM - Integer scalar; Item to look up in the list
LIST(*) - Integer array; List of entries
NLIST - Integer scalar; Number of entries in the list

RETURN
integer position of the item in the list.

7.89. CKLSCH
CKLSCH CKLSCH CKLSCH CKLSCH CKLSCH CKLSCH CKLSCH
**********************************************
**************************
******

INTEGER FUNCTION CKLSCH (STR)


Returns the index of the final non-blank, non-tab character in
a string.

INPUT
STR - Character string

7.90. CKMMWC
CKMMWC CKMMWC CKMMWC CKMMWC CKMMWC CKMMWC CKMMWC
**********************************************
**************************
******

SUBROUTINE CKMMWC (C, ICKWRK, RCKWRK, WTM)

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
116 of ANSYS, Inc. and its subsidiaries and affiliates.
CKMXTP

Returns the mean molecular weight of the gas mixture given molar
concentrations.

INPUT
C(*) - Real array, concentrations of the species;
dimension at least KK, the total species count.
cgs units, mole/cm**3
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
WTM - Real scalar, mean molecular weight of the mixture.
cgs units, gm/mole

7.91. CKMMWX
CKMMWX CKMMWX CKMMWX CKMMWX CKMMWX CKMMWX CKMMWX
**********************************************
**************************
******

SUBROUTINE CKMMWX (X, ICKWRK, RCKWRK, WTM)


Returns the mean molecular weight of the gas mixture given mole
fractions.

INPUT
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
WTM - Real scalar, mean molecular weight of the mixture.
cgs units, gm/mole

7.92. CKMMWY
CKMMWY CKMMWY CKMMWY CKMMWY CKMMWY CKMMWY CKMMWY
**********************************************
**************************
******

SUBROUTINE CKMMWY (Y, ICKWRK, RCKWRK, WTM)


Returns the mean molecular weight of the gas mixture given mass
fractions.

INPUT
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
WTM - Real scalar, mean molecular weight of the mixture.
cgs units, gm/mole

7.93. CKMXTP
CKMXTP CKMXTP CKMXTP CKMXTP CKMXTP CKMXTP CKMXTP
**********************************************
**************************
******

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 117
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

SUBROUTINE CKMXTP (ICKWRK, MAXTP)


Returns the maximum number of temperatures used in fitting the
thermodynamic properties of the species.

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.

OUTPUT
MXTP - Integer scalar, maximum number of temperatures used
to fit the thermodynamic properties of the species.

7.94. CKNCF
CKNCF CKNCF CKNCF CKNCF CKNCF CKNCF CKNCF
**********************************************
**************************
******

SUBROUTINE CKNCF (MDIM, ICKWRK, RCKWRK, NCF)


Returns the elemental composition of the species

INPUT
MDIM - Integer scalar, first dimension of the matrix NCF;
MDIM must be equal to or greater than MM, the total
element count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
NCF(*,*) - Real matrix, the elemental composition of the species;
dimension at least MM for the first, the total element
count, and at least KK for the second, the total species
count.
NCF(M,K) is the quantity of the element M in species K.

7.95. CKNCMP
CKNCMP CKNCMP CKNCMP CKNCMP CKNCMP CKNCMP CKNCMP
**********************************************
**************************
******

SUBROUTINE CKNCMP (STR, IRAY, II, I, NF)


Returns the first index of the character string STR if it occurs
in the character string IRAY, and returns the total number of
times STR occurs in IRAY.

7.96. CKNORM
CKNORM CKNORM CKNORM CKNORM CKNORM CKNORM CKNORM
**********************************************
**************************
******

SUBROUTINE CKNORM (ARRAY, NN)


Utility to normalize the real members of an array.

INPUT
ARRAY(*) - Real array.
NN - Integer scalar; the size of ARRAY.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
118 of ANSYS, Inc. and its subsidiaries and affiliates.
CKNUF

7.97. CKNPAR
CKNPAR CKNPAR CKNPAR CKNPAR CKNPAR CKNPAR CKNPAR
**********************************************
**************************
******

SUBROUTINE CKNPAR (LINE, NPAR, LOUT, IPAR, ISTART, KERR)


Searches a character string LINE from last to first character,
to create a substring IPAR containing NPAR blank-delimited numbers;
ISTART is the column of LINE containing IPAR. This allows format-
free input of combined alpha-numeric data. For example,

input: LINE*80 = "t1 t2 dt 300.0 3.0E3 50"


NPAR = 3, the number of substrings requested
LOUT = 6, a logical unit number on which to write
diagnostic messages.
output: IPAR*80 = "300.0 3.0E3 50"
ISTART = 13, the starting column in LINE of the
NPAR substrings
KERR = .FALSE.

INPUT
LINE - Character string; length determined by calling routine.
NPAR - Integer scalar, number of substrings expected.
LOUT - Integer scalar, output unit for printed diagnostics.

OUTPUT
IPAR - Character string, subset of LINE, containing only the
NPAR substrings.
ISTART - Integer scalar, starting location in LINE of the NPAR
substrings.
KERR - Logical, character length or syntax error flag.

7.98. CKNU
CKNU CKNU CKNU CKNU CKNU CKNU CKNU
**********************************************
**************************
******

SUBROUTINE CKNU (KDIM, ICKWRK, RCKWRK, NUKI)


Returns the stoichiometric coefficients of the reactions.

INPUT
KDIM - Integer scalar, first dimension of the matrix NUKI;
KDIM must be greater than or equal to KK, the total
species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
NUKI(*,*) - Integer matrix, stoichiometric coefficients of the
species in the reactions; dimension at least KK for
the first, the total species count, and at least II
for the second, the total reaction count.
NUKI(K,I) is the stoichiometric coefficient of
species K in reaction I.

7.99. CKNUF
CKNUF CKNUF CKNUF CKNUF CKNUF CKNUF CKNUF
**********************************************
**************************
******

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 119
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

SUBROUTINE CKNUF (KDIM, ICKWRK, RCKWRK, NUFKI)


Returns the forward stoichiometric coefficients for reactions;
by definition, reactants' coefficients are negative.
Contrast this subroutine with subroutine CKNU, which returns the
net stoichiometric coefficients for a reaction.

INPUT
KDIM - Integer scalar, first dimension of the matrix NUKI;
KDIM must be greater than or equal to KK, the total
species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
NUFKI(*,*)- Integer matrix, stoichiometric coefficients of the
species in the forward direction of the reactions
(reactants only); dimension at least KK in the first,
the total species count, and at least II for the
second, the total reaction count.
NUKI(K,I) is the stoichiometric coefficient of
species K in forward direction of reaction I.

7.100. CKPC
CKPC CKPC CKPC CKPC CKPC CKPC CKPC
**********************************************
**************************
******

SUBROUTINE CKPC (T, C, ICKWRK, RCKWRK, P)


Returns the pressure of the gas mixture given
temperature(s) and molar concentrations.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
C(*) - Real array, concentrations of the species;
dimension at least KK, the total species count.
cgs units, mole/cm**3
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2

7.101. CKPHAZ
CKPHAZ CKPHAZ CKPHAZ CKPHAZ CKPHAZ CKPHAZ CKPHAZ
**********************************************
**************************
******

SUBROUTINE CKPHAZ (ICKWRK, RCKWRK, KPHASE)


Returns a set of flags indicating phases of the species

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
KPHASE(*) - Integer array, phases of the species;
dimension at least KK, the total species count.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
120 of ANSYS, Inc. and its subsidiaries and affiliates.
CKPY

KPHASE(K)=-1, species K is solid


KPHASE(K)= 0, species K is gaseous
KPHASE(K)=+1, species K is liquid

7.102. CKPNT
CKPNT CKPNT CKPNT CKPNT CKPNT CKPNT CKPNT
**********************************************
**************************
******

SUBROUTINE CKPNT (LSAVE, LOUT, NPOINT, VERS, PREC, LENI, LENR,


LENC, KERR)
Reads from a file information about a Chemkin linkfile, and
pointers for work arrays.

INPUT
LSAVE - Integer scalar, input unit for binary data file.
LOUT - Integer scalar, formatted output file unit number.

OUTPUT
NPOINT - Integer scalar, total pointers count.
VERS - Real scalar, version number of the Chemkin linkfile.
PREC - Character string, machine precision of the linkfile.
LENI - Integer scalar, length required for integer work array.
LENR - Integer scalar, length required for real work array.
LENC - Integer scalar, length required for character work array.
KERR - Logical, error flag.

7.103. CKPX
CKPX CKPX CKPX CKPX CKPX CKPX CKPX
**********************************************
**************************
******

SUBROUTINE CKPX (RHO, T, X, ICKWRK, RCKWRK, P)


Returns the pressure of the gas mixture given mass density,
temperature(s) and mole fractions.

INPUT
RHO - Real scalar, mass density.
cgs units, gm/cm**3
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2

7.104. CKPY
CKPY CKPY CKPY CKPY CKPY CKPY CKPY
**********************************************
**************************
******

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 121
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

SUBROUTINE CKPY (RHO, T, Y, ICKWRK, RCKWRK, P)


Returns the pressure of the gas mixture given mass density,
temperature(s) and mass fractions.

INPUT
RHO - Real scalar, mass density.
cgs units, gm/cm**3
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2

7.105. CKQC
CKQC CKQC CKQC CKQC CKQC CKQC CKQC
**********************************************
**************************
******

SUBROUTINE CKQC (T, C, ICKWRK, RCKWRK, Q)


Returns the rates of progress for reactions given temperature(s)
and molar concentrations.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
C(*) - Real array, concentrations of the species;
dimension at least KK, the total species count.
cgs units, mole/cm**3
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
Q(*) - Real array, rates of progress for reactions;
dimension at least II, the total reaction count.
cgs units, moles/(cm**3*sec)

7.106. CKQXP
CKQXP CKQXP CKQXP CKQXP CKQXP CKQXP CKQXP
**********************************************
**************************
******

SUBROUTINE CKQXP (P, T, X, ICKWRK, RCKWRK, Q)


Returns the rates of progress for reactions given pressure,
temperature(s) and mole fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
122 of ANSYS, Inc. and its subsidiaries and affiliates.
CKQYR

dimension at least KK, the total species count.


ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
Q(*) - Real array, rates of progress for reactions;
dimension at least II, the total reaction count.
cgs units, moles/(cm**3*sec)

7.107. CKQYP
CKQYP CKQYP CKQYP CKQYP CKQYP CKQYP CKQYP
**********************************************
**************************
******

SUBROUTINE CKQYP (P, T, Y, ICKWRK, RCKWRK, Q)


Returns the rates of progress for reactions given pressure,
temperature(s) and mass fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
Y(*) - Real array, Mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
Q(*) - Real array, rates of progress for reactions;
dimension at least II, the total reaction count.
cgs units, moles/(cm**3*sec)

7.108. CKQYR
CKQYR CKQYR CKQYR CKQYR CKQYR CKQYR CKQYR
**********************************************
**************************
******

SUBROUTINE CKQYR (RHO, T, Y, ICKWRK, RCKWRK, Q)


Returns the rates of progress for reactions given mass density,
temperature(s) and mass fractions.

INPUT
RHO - Real scalar, mass density.
cgs units, gm/cm**3
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
Q(*) - Real array, rates of progress for reactions;
dimension at least II, the total reaction count.
cgs units, moles/(cm**3*sec)

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 123
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

7.109. CKR2CH
CKR2CH CKR2CH CKR2CH CKR2CH CKR2CH CKR2CH CKR2CH
**********************************************
**************************
******

SUBROUTINE CKR2CH (RNUM, STR, I, KERR)


Returns a character string representation of a real number
and the effective length of the string.

INPUT
RNUM - Real scalar, to be converted to a string;
the maximum magnitude of RNUM is machine-dependent.

OUTPUT
STR - Character string, left-justified representation of RNUM;
i.e., RNUM= 0.0 returns STR=" 0.00"
RNUM= -10.5 returns STR="-1.05E+01"
RNUM= 1.86E-100 returns in STR=" 1.86E-100"
the minimum length of STR required is 5
I - Integer scalar, total non-blank characters in RNUM.
KERR - Logical, character length error flag.

7.110. CKRAEX
CKRAEX CKRAEX CKRAEX CKRAEX CKRAEX CKRAEX CKRAEX
**********************************************
**************************
******

SUBROUTINE CKRAEX (I, RCKWRK, RA)


Get/put the Pre-exponential coefficient of the Ith reaction

INPUT
I - Integer scalar, reaction index;
I > 0 gets RA(I) from RCKWRK
I < 0 puts RA(I) into RCKWRK
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

If I < 1:
RA - Real scalar, pre-exponential coefficient for reaction I.
cgs units, mole-cm-sec-K

OUTPUT
If I > 1:
RA - Real scalar, pre-exponential coefficient for reaction I.
cgs units, mole-cm-sec-K

7.111. CKRCXP
CKRCXP CKRCXP CKRCXP CKRCXP CKRCXP CKRCXP CKRCXP
**********************************************
**************************
******

SUBROUTINE CKRCXP (P, T, X, ICKWRK, RCKWRK, RCFT, RCRT)


Returns the forward and reverse rate constants for all reactions
given pressure, temperature and mole fractions.
Note this subroutine will calculate a value for the reverse rate
constant irrespective of whether the reaction was deemed reversible
in the interpreter file. Also note that the concentration of third
bodies for third body reactions is included in the returned rate
constant. The units for the rate constant will depend
on the number of reactants.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
124 of ANSYS, Inc. and its subsidiaries and affiliates.
CKREADF

INPUT
P - Pressure.
cgs units - dynes/cm**2
Data type - real scalar
T(*) - Temperature.
cgs units - K
Data type - real array
X - Mole fractions of the species.
cgs units - none
Data type - real array
Dimension X(*) at least KK, the total number of
species.
ICKWRK - Array of integer workspace.
Data type - integer array
Dimension ICKWRK(*) at least LENIWK.
RCKWRK - Array of real work space.
Data type - real array
Dimension RCKWRK(*) at least LENRWK.

OUTPUT
RCFT - Rate constant for the forward reaction.
cgs units - mole/(cm**3*sec) *
(cm**3/mole)**(sum of forward stoich. coeff)
Data type - real array
Dimension RCFT(*) at least II, the total number
of reactions.
RCRT - Rate constant for the forward reaction.
cgs units - mole/(cm**3*sec) *
(cm**3/mole)**(sum of reverse stoich. coeff)
Data type - real array
Dimension RCRT(*) at least II, the total number
of reactions.

7.112. CKRDEX
CKRDEX CKRDEX CKRDEX CKRDEX CKRDEX CKRDEX CKRDEX
**********************************************
**************************
******

SUBROUTINE CKRDEX (I, RCKWRK, RD)


Get/put the perturbation factor of the Ith reaction

INPUT
I - Integer scalar, reaction index;
I > 0 gets RD(I) from RCKWRK
I < 0 puts RD(I) into RCKWRK
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

If I < 1:
RD - Real scalar, perturbation factor for reaction I;
cgs units, mole-cm-sec-K.

OUTPUT
If I > 1:
RD - Real scalar, perturbation factor for reaction I;
cgs units, mole-cm-sec-K.

7.113. CKREADF
CKREADF CKREADF CKREADF CKREADF CKREADF CKREADF CKREADF
**********************************************
**************************
******

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 125
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

SUBROUTINE CKREADF (LOUT, LFORM, KERR)


Reads from a formatted file the pointer integers for the
gas-phase CHEMKIN work arrays (See CKSAVEF)

INPUT
LOUT - Integer scalar, formatted output file unit number.
for diagnostic printing
LFORM - Integer scalar, formatted output file unit number
for reading the pointer integers from a file
OUTPUT
KERR - Logical flag indicating whether an error was
encountered while reading from the file

7.114. CKREEX
CKREEX CKREEX CKREEX CKREEX CKREEX CKREEX CKREEX
**********************************************
**************************
******

SUBROUTINE CKREEX (I, RCKWRK, RE)


Get/put the activation energy of the Ith reaction

INPUT
I - Integer scalar, reaction index;
I > 0 gets RE(I) from RCKWRK
I < 0 puts RE(I) into RCKWRK
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

If I < 1:
RE - Real scalar, activation energy for reaction I.
cgs units, K

OUTPUT
If I > 1:
RE - Real scalar, activation energy for reaction I.
cgs units, K

7.115. CKREWR
CKREWR CKREWR CKREWR CKREWR CKREWR CKREWR CKREWR
**********************************************
**************************
******

SUBROUTINE CKREWR (LINC, LOUT, ICKWRK, RCKWRK, CCKWRK, IFLAG)


Rewrites a new linkfile from the data stored in ICKWRK,
RCKWRK and CCKWRK.

INPUT
LINC - Integer scalar, linkfile output file unit number.
LOUT - Integer scalar, diagnostics output file unit number.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.
CCKWRK(*) - Character string workspace array;
dimension at least LENCCK.

OUTPUT
IFLAG - Integer scalar to indicate successful writing of
linkfile; IFLAG>0 is an error type.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
126 of ANSYS, Inc. and its subsidiaries and affiliates.
CKRHOX

7.116. CKRHEX
CKRHEX CKRHEX CKRHEX CKRHEX CKRHEX CKRHEX CKRHEX
**********************************************
**************************
******

SUBROUTINE CKRHEX (K, RCKWRK, A6)


Returns an array of the sixth thermodynamic polynomial
coefficients for a species, or changes their value,
depending on the sign of K.

INPUT
K - Integer scalar, species index;
K>0 gets A6(*) from RCKWRK,
K<0 puts A6(*) into RCKWRK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
A6(*) - Real array, the 6th thermodynamic polynomial
coefficients for species K, over the number
of fit temperature ranges; dimension at least (MXTP-1),
where MXTP is the maximum number of temperatures used
to divide the thermodynamic fits.

7.117. CKRHOC
CKRHOC CKRHOC CKRHOC CKRHOC CKRHOC CKRHOC CKRHOC
**********************************************
**************************
******

SUBROUTINE CKRHOC (P, T, C, ICKWRK, RCKWRK, RHO)


Returns the mass density of the gas mixture given pressure,
temperature(s) and molar concentrations.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
C(*) - Real array, concentrations of the species;
dimension at least KK, the total species count.
cgs units, mole/cm**3
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
RHO - Real scalar, mass density.
cgs units, gm/cm**3

7.118. CKRHOX
CKRHOX CKRHOX CKRHOX CKRHOX CKRHOX CKRHOX CKRHOX
**********************************************
**************************
******

SUBROUTINE CKRHOX (P, T, X, ICKWRK, RCKWRK, RHO)


Returns the mass density of the gas mixture given pressure,
temperature(s) and mole fractions.

INPUT

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 127
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

P - Real scalar, pressure.


cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
RHO - Real scalar, mass density.
cgs units, gm/cm**3

7.119. CKRHOY
CKRHOY CKRHOY CKRHOY CKRHOY CKRHOY CKRHOY CKRHOY
**********************************************
**************************
******

SUBROUTINE CKRHOY (P, T, Y, ICKWRK, RCKWRK, RHO)


Returns the mass density of the gas mixture given pressure,
temperature(s) and mass fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
RHO - Real scalar, mass density.
cgs units, gm/cm**3

7.120. CKRP
CKRP CKRP CKRP CKRP CKRP CKRP CKRP
**********************************************
**************************
******

SUBROUTINE CKRP (ICKWRK, RCKWRK, RU, RUC, PA)


Returns universal gas constants and the pressure of one standard
atmosphere

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
RU - Real scalar, universal gas constant.
cgs units, 8.314510E7 ergs/(mole*K)
RUC - Real scalar, universal gas constant used only in
conjunction with activation energy.
preferred units, RU / 4.184E7 cal/(mole*K)
PA - Real scalar, pressure of one standard atmosphere.
cgs units, 1.01325E6 dynes/cm**2

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
128 of ANSYS, Inc. and its subsidiaries and affiliates.
CKSBML

7.121. CKSAVE
CKSAVE CKSAVE CKSAVE CKSAVE CKSAVE CKSAVE CKSAVE
**********************************************
**************************
******

SUBROUTINE CKSAVE (LOUT, LSAVE, ICKWRK, RCKWRK, CCKWRK)


Writes to a binary file information about a Chemkin linkfile,
pointers for the Chemkin Library, and Chemkin work arrays.

INPUT
LOUT - Integer scalar, formatted output file unit number.
LSAVE - Integer scalar, binary output file unit number.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.
CCKWRK(*) - Character string workspace array;
dimension at least LENCCK.

7.122. CKSAVEF
CKSAVEF CKSAVEF CKSAVEF CKSAVEF CKSAVEF CKSAVEF CKSAVEF
**********************************************
**************************
******

SUBROUTINE CKSAVEF (LOUT, LFORM, KERR)


Writes to a formatted file the pointer integers for the
gas-phase CHEMKIN work arrays (See CKREADF)

INPUT
LOUT - Integer scalar, formatted output file unit number.
for diagnostic printing
LFORM - Integer scalar, formatted output file unit number
for printing the pointer integers to a file
OUTPUT
KERR - Logical flag indicating whether an error was
encountered while writing to the file

7.123. CKSBML
CKSBML CKSBML CKSBML CKSBML CKSBML CKSBML CKSBML
**********************************************
**************************
******

SUBROUTINE CKSBML (P, T, X, ICKWRK, RCKWRK, SBML)


Returns the mean entropy of the mixture in molar units given
pressure, temperature(s) and mole fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
SBML - Real scalar, mean entropy.
cgs units, ergs/(mole*K)

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 129
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

7.124. CKSBMS
CKSBMS CKSBMS CKSBMS CKSBMS CKSBMS CKSBMS CKSBMS
**********************************************
**************************
******

SUBROUTINE CKSBMS (P, T, Y, ICKWRK, RCKWRK, SBMS)


Returns the mean entropy of the mixture in mass units given pressure,
temperature(s) and mass fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
SBMS - Real scalar, mean entropy.
cgs units, ergs/(gm*K)

7.125. CKSCAL
CKSCAL CKSCAL CKSCAL CKSCAL CKSCAL CKSCAL CKSCAL
**********************************************
**************************
******

SUBROUTINE CKSCAL (ARRAY, NN, SCAL)


Utility to scale the real members of an array.

INPUT
ARRAY(*) - Real array.
NN - Integer scalar; the size of ARRAY.
SCAL - Real scalar; the multiplier for ARRAY members.

7.126. CKSLEN
CKSLEN CKSLEN CKSLEN CKSLEN CKSLEN CKSLEN CKSLEN
**********************************************
**************************
******

INTEGER FUNCTION CKSLEN (LINE)


Returns the effective length of a character string, i.e.,
the index of the last character before an exclamation mark (!)
indicating a comment.

INPUT
LINE - Character string.

OUTPUT
CKSLEN - Integer scalar, the effective length of LINE.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
130 of ANSYS, Inc. and its subsidiaries and affiliates.
CKSNUM

7.127. CKSML
CKSML CKSML CKSML CKSML CKSML CKSML CKSML
**********************************************
**************************
******

SUBROUTINE CKSML (T, ICKWRK, RCKWRK, SML)


Returns the standard state entropies in molar units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
SML(*) - Real array, standard state entropies for species;
dimension at least KK, the total species count.
cgs units, ergs/(mole*K)

7.128. CKSMS
CKSMS CKSMS CKSMS CKSMS CKSMS CKSMS CKSMS
**********************************************
**************************
******

SUBROUTINE CKSMS (T, ICKWRK, RCKWRK, SMS)


Returns the standard state entropies in mass units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
SMS(*) - Real array, standard state entropies for species;
dimension at least KK, the total species count.
cgs units, ergs/(gm*K)

7.129. CKSNUM
CKSNUM CKSNUM CKSNUM CKSNUM CKSNUM CKSNUM CKSNUM
**********************************************
**************************
******

SUBROUTINE CKSNUM (LINE, NEXP, LOUT, KRAY, NN, KNUM, NVAL,


RVAL, KERR)
Search a character string, LINE, for (1) a character substring which
may also appear in an array of character substrings KRAY, and
(2) some number of character substrings representing numbers.
In the case of (1), if the character substring appears in KRAY,
KNUM is its index position.
In the case of (2), the character substrings are converted to
NVAL real numbers and stored in RVAL, until NEXP are converted.

This allows format-free input of combined alpha-numeric data.


For example, the subroutine might be called to find a Chemkin

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 131
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

species index and convert the other substrings to real values:

input: LINE = "N2 1.2"


NEXP = 1, the number of values expected
LOUT = 6, a logical unit number on which to write
diagnostic messages.
KRAY(*) = "H2" "O2" "N2" "H" "O" "N" "OH" "H2O" "NO"
NN = 9, the number of entries in KRAY(*)
output: KNUM = 3, the index number of the substring in
KRAY(*) which corresponds to the first
substring in LINE
NVAL = 1, the number of values found in LINE
following the first substring
RVAL(*) = 1.200E+00, the substring converted to a number
KERR = .FALSE.
INPUT
LINE - Character string; length depends on calling routine.
NEXP - Integer scalar, number of values to be found in LINE.
If NEXP < 0, then IABS(NEXP) values are expected, but
it is not an error condition if less values are found.
LOUT - Integer scalar, formatted output file unit.
KRAY(*) - Character string array.
NN - Integer scalar, total number of character strings
in KRAY.

OUTPUT
KNUM - Integer scalar, index of character string in KRAY
which corresponds to the first substring in LINE.
NVAL - Integer scalar, count of real values found in LINE.
RVAL(*) - Real array, real values found in LINE; dimension at least
NEXP.
KERR - Logical, syntax or dimensioning error flag;
corresponding string not found, or total of
values found is not the number of values expected,
will result in KERR = .TRUE.

7.130. CKSOR
CKSOR CKSOR CKSOR CKSOR CKSOR CKSOR CKSOR
**********************************************
**************************
******

SUBROUTINE CKSOR (T, ICKWRK, RCKWRK, SOR)


Returns the nondimensional entropies.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
SOR(*) - Real array, nondimensional entropies for species;
dimension at least KK, the total species count.

7.131. CKSUBS
CKSUBS CKSUBS CKSUBS CKSUBS CKSUBS CKSUBS CKSUBS
**********************************************
**************************
******

SUBROUTINE CKSUBS (LINE, LOUT, NDIM, SUB, NFOUND, KERR)

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
132 of ANSYS, Inc. and its subsidiaries and affiliates.
CKSYMR

Returns an array of substrings in a character string with blanks


or tabs as delimiters

INPUT
LINE - Character string; length determined by calling routine.
LOUT - Integer scalar, formatted output file unit.
NDIM - Integer scalar, dimension of a character string array.

OUTPUT
SUB(*) - Character string array, the character substrings of
LINE; dimension SUB at least NDIM.
NFOUND - Integer scalar, count of substrings found in LINE.
KERR - Logical, error flag; dimensioning errors will result in
KERR = .TRUE.

7.132. CKSUM
CKSUM CKSUM CKSUM CKSUM CKSUM CKSUM CKSUM
**********************************************
**************************
******

REAL FUNCTION CKSUM (ARRAY, NN)


Return the sum of entries in a real array.

7.133. CKSYME
CKSYME CKSYME CKSYME CKSYME CKSYME CKSYME CKSYME
**********************************************
**************************
******

SUBROUTINE CKSYME (CCKWRK, LOUT, ENAME, KERR)


Returns the character strings of element names.

INPUT
CCKWRK(*) - Character string workspace array;
dimension at least LENCCK.
LOUT - Integer scalar, formatted output file unit.

OUTPUT
ENAME(*) - Character string array, element names; dimension at
least MM, the total element count.
KERR - Logical, character length error flag.

7.134. CKSYMR
CKSYMR CKSYMR CKSYMR CKSYMR CKSYMR CKSYMR CKSYMR
**********************************************
**************************
******

SUBROUTINE CKSYMR (I, LOUT, ICKWRK, RCKWRK, CCKWRK, LT, ISTR, KERR)
Returns a character string which describes the Ith reaction,
and the effective length of the character string.

INPUT
I - Integer scalar, reaction index.
LOUT - Integer scalar, formatted output file unit.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.
CCKWRK(*) - Character string workspace array;
dimension at least LENCCK.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 133
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

OUTPUT
ISTR - Character string, description of reaction I.
LT - Integer scalar, number of non-blank characters in ISTR.
KERR - Logical, character length error flag.

7.135. CKSYMS
CKSYMS CKSYMS CKSYMS CKSYMS CKSYMS CKSYMS CKSYMS
**********************************************
**************************
******

SUBROUTINE CKSYMS (CCKWRK, LOUT, KNAME, KERR)


Returns the character strings of species names

INPUT
CCKWRK(*) - Character string workspace array;
dimension at least LENRCK.
LOUT - Integer scalar, formatted output file unit.

OUTPUT
KNAME(*) - Character string array, species names;
dimension at least KK, the total species count.
KERR - Logical, character length error flag.

7.136. CKTHB
CKTHB CKTHB CKTHB CKTHB CKTHB CKTHB CKTHB
**********************************************
**************************
******

SUBROUTINE CKTHB (KDIM, ICKWRK, RCKWRK, AKI)


Returns matrix of enhanced third body coefficients.

INPUT
KDIM - Integer scalar, first dimension of the matrix AKI;
KDIM must be at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
AKI(*,*) - Real matrix, enhanced third body efficiencies of the
species in the reactions;
dimension at least KK for first, the total species count,
and at least II for the second, the total reaction count.
AKI(K,I) is the enhanced efficiency of species K in
reaction I.

7.137. CKUBML
CKUBML CKUBML CKUBML CKUBML CKUBML CKUBML CKUBML
**********************************************
**************************
******

SUBROUTINE CKUBML (T, X, ICKWRK, RCKWRK, UBML)


Returns the mean internal energy of the mixture in molar units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
134 of ANSYS, Inc. and its subsidiaries and affiliates.
CKUMS

species temperatures, nominally 1.


cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
UBML - Real scalar, mean internal energy.
cgs units, ergs/mole

7.138. CKUBMS
CKUBMS CKUBMS CKUBMS CKUBMS CKUBMS CKUBMS CKUBMS
**********************************************
**************************
******

SUBROUTINE CKUBMS (T, Y, ICKWRK, RCKWRK, UBMS)


Returns the mean internal energy of the mixture in mass units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
UBMS - Real scalar, mean internal energy.
cgs units, ergs/gm

7.139. CKUML
CKUML CKUML CKUML CKUML CKUML CKUML CKUML
**********************************************
**************************
******

SUBROUTINE CKUML (T, ICKWRK, RCKWRK, UML)


Returns the internal energies in molar units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
UML(*) - Real array, internal energies for species;
dimension at least KK, the total species count.
cgs units, ergs/mole

7.140. CKUMS
CKUMS CKUMS CKUMS CKUMS CKUMS CKUMS CKUMS
**********************************************
**************************

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 135
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

******

SUBROUTINE CKUMS (T, ICKWRK, RCKWRK, UMS)


Returns the internal energies in mass units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
UMS(*) - Real array, internal energies for species;
dimension at least KK, the total species count.
cgs units, ergs/gm

7.141. CKWC
CKWC CKWC CKWC CKWC CKWC CKWC CKWC
**********************************************
**************************
******

SUBROUTINE CKWC (T, C, ICKWRK, RCKWRK, WDOT)


Returns the molar production rates of the species given
temperature(s) and molar concentrations.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
C(*) - Real array, concentrations of the species;
dimension at least KK, the total species count.
cgs units, mole/cm**3
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
WDOT(*) - Real array, chemical production rates of the species;
dimension at least KK, the total species count.
cgs units, moles/(cm**3*sec)

7.142. CKWL
CKWL CKWL CKWL CKWL CKWL CKWL CKWL
**********************************************
**************************
******

SUBROUTINE CKWL (ICKWRK, RCKWRK, WL)


Returns a set of flags providing information on the wave length
of photon radiation

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
WL(*) - Real array, radiation wavelengths for reactions;
dimension at least II, total reaction count.
cgs units, angstrom.
WL(I)= 0. reaction I does not have radiation as
either a reactant or product

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
136 of ANSYS, Inc. and its subsidiaries and affiliates.
CKWXR

WL(I)=-A reaction I has radiation of wavelength A


as a reactant
WL(I)=+A reaction I has radiation of wavelength A
as a product
If A = 1.0 then no wavelength information was given;

7.143. CKWT
CKWT CKWT CKWT CKWT CKWT CKWT CKWT
**********************************************
**************************
******

SUBROUTINE CKWT (ICKWRK, RCKWRK, WT)


Returns the molecular weights of the species

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
WT(*) - Real array, molecular weights of the species;
dimension at least KK, the total species count.
cgs units, gm/mole

7.144. CKWXP
CKWXP CKWXP CKWXP CKWXP CKWXP CKWXP CKWXP
**********************************************
**************************
******

SUBROUTINE CKWXP (P, T, X, ICKWRK, RCKWRK, WDOT)


Returns the molar production rates of the species given pressure,
temperature(s) and mole fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
WDOT(*) - Real array, chemical production rates of the species;
dimension at least KK, the total species count.
cgs units, moles/(cm**3*sec)

7.145. CKWXR
CKWXR CKWXR CKWXR CKWXR CKWXR CKWXR CKWXR
**********************************************
**************************
******

SUBROUTINE CKWXR (RHO, T, X, ICKWRK, RCKWRK, WDOT)


Returns the molar production rates of the species given mass
density, temperature(s) and mole fractions.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 137
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

INPUT
RHO - Real scalar, mass density.
cgs units, gm/cm**3
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
WDOT(*) - Real array, chemical production rates of the species;
dimension at least KK, the total species count.
cgs units, moles/(cm**3*sec)

7.146. CKWYP
CKWYP CKWYP CKWYP CKWYP CKWYP CKWYP CKWYP
**********************************************
**************************
******

SUBROUTINE CKWYP (P, T, Y, ICKWRK, RCKWRK, WDOT)


Returns the molar production rates of the species given pressure,
temperature(s) and mass fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
WDOT(*) - Real array, chemical production rates of the species;
dimension at least KK, the total species count.
cgs units, moles/(cm**3*sec)

7.147. CKWYPK
CKWYPK CKWYPK CKWYPK CKWYPK CKWYPK CKWYPK CKWYPK
**********************************************
**************************
******

SUBROUTINE CKWYPK (P, T, Y, RKFT, RKRT, ICKWRK, RCKWRK, WDOT)


Returns the molar production rates of the species given pressure,
temperature(s) and mass fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
138 of ANSYS, Inc. and its subsidiaries and affiliates.
CKXMIN

RKFT(*) - Real array, forward reaction rates for reactions;


dimension at least II, the total reaction count.
cgs units, depends on the reaction
RKRT(*) - Real array, reverse reaction rates for reactions;
dimension at least II, the total reaction count.
cgs units, depends on the reaction
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
WDOT(*) - Real array, chemical production rates of the species;
dimension at least KK, the total species count.
cgs units, moles/(cm**3*sec)

7.148. CKWYR
CKWYR CKWYR CKWYR CKWYR CKWYR CKWYR CKWYR
**********************************************
**************************
******

SUBROUTINE CKWYR (RHO, T, Y, ICKWRK, RCKWRK, WDOT)


Returns the molar production rates of the species given mass
density, temperature and mass fractions.

INPUT
RHO - Real scalar, mass density.
cgs units, gm/cm**3
T(*) - Real array, temperature;
cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
WDOT(*) - Real array, chemical production rates of the species;
dimension at least KK, the total species count.
cgs units, moles/(cm**3*sec)

7.149. CKXMAX
CKXMAX CKXMAX CKXMAX CKXMAX CKXMAX CKXMAX CKXMAX
**********************************************
**************************
******

SUBROUTINE CKXMAX (X, NN, XMAX, IMAX)


Returns the maximum value in an array and its location in the array.

INPUT
X(*) - Real array.
NN - Integer scalar; size of X.
OUTPUT
XMAX - Real scalar.
IMAX - Integer scalar; location in X of XMAX.

7.150. CKXMIN
CKXMIN CKXMIN CKXMIN CKXMIN CKXMIN CKXMIN CKXMIN
**********************************************
**************************
******

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 139
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

SUBROUTINE CKXMIN (X, NN, XMIN, IMIN)


Returns the minimum value in an array and its location in the array.

INPUT
X(*) - Real array.
NN - Integer scalar; size of X.
OUTPUT
XMIN - Real scalar.
IMIN - Integer scalar; location in X of XMIN.

7.151. CKXNUM
CKXNUM CKXNUM CKXNUM CKXNUM CKXNUM CKXNUM CKXNUM
**********************************************
**************************
******

SUBROUTINE CKXNUM (LINE, NEXP, LOUT, NVAL, RVAL, KERR)


Searches a character string, LINE, for NEXP space-delimited
substrings representing numbers, until NVAL real values are
converted and stored in the array, RVAL.
This allows format-free input of numerical data. For example:

input: LINE = " 0.170E+14 0 47780.0"


NEXP = 3, the number of values requested
LOUT = 6, a logical unit number on which to write
diagnostic messages.
output: NVAL = 3, the number of values found
RVAL(*) = 1.700E+13, 0.000E+00, 4.778E+04
KERR = .FALSE.

INPUT
LINE - Character string, length established by calling program.
NEXP - Integer scalar, number of real values to be found in LINE;
If NEXP < 0 then IABS(NEXP) values are expected, but
it is not an error condition if fewer values are found.
LOUT - Integer scalar, output unit for printed diagnostics.

OUTPUT
NVAL - Integer scalar, count of real values found in LINE.
RVAL - Real array, values converted from characters in LINE;
dimension at least NEXP.
KERR - Logical, syntax or dimensioning error flag.

7.152. CKXTCP
CKXTCP CKXTCP CKXTCP CKXTCP CKXTCP CKXTCP CKXTCP
**********************************************
**************************
******

SUBROUTINE CKXTCP (P, T, X, ICKWRK, RCKWRK, C)


Returns the molar concentrations given pressure, temperature(s)
and mole fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
140 of ANSYS, Inc. and its subsidiaries and affiliates.
CKXTY

RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
C(*) - Real array, concentrations of the species;
dimension at least KK, the total species count.
cgs units, mole/cm**3

7.153. CKXTCR
CKXTCR CKXTCR CKXTCR CKXTCR CKXTCR CKXTCR CKXTCR
**********************************************
**************************
******

SUBROUTINE CKXTCR (RHO, T, X, ICKWRK, RCKWRK, C)


Returns the molar concentrations given mass density, temperature(s),
and mole fractions.

INPUT
RHO - Real scalar, mass density.
cgs units, gm/cm**3
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
C(*) - Real array, concentrations of the species;
dimension at least KK, the total species count.
cgs units, mole/cm**3

7.154. CKXTND
CKXTND CKXTND CKXTND CKXTND CKXTND CKXTND CKXTND
**********************************************
**************************
******

SUBROUTINE CKXTND (NDIM, NPTS, XSTR, XEND, X, F, IFLAG)


Ensure that XSTR <= X(N) <= XEND.
NPTS may be increased to add XSTR < X(1) or XEND > X(NPTS).
NPTS may be decreased to drop X(N) < XSTR or X(N) > XEND.
If NDIM does not allow adding a new endpoint,
CKXTND replaces the endpoint and sets IFLAG=1 if new XSTR,
IFLAG=2 if new XEND.

7.155. CKXTY
CKXTY CKXTY CKXTY CKXTY CKXTY CKXTY CKXTY
**********************************************
**************************
******

SUBROUTINE CKXTY (X, ICKWRK, RCKWRK, Y)


Returns the mass fractions given mole fractions.

INPUT
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 141
Alphabetical Listing of the Gas-phase Kinetics Subroutine Library

ICKWRK(*) - Integer workspace array; dimension at least LENICK.


RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.

7.156. CKYTCP
CKYTCP CKYTCP CKYTCP CKYTCP CKYTCP CKYTCP CKYTCP
**********************************************
**************************
******

SUBROUTINE CKYTCP (P, T, Y, ICKWRK, RCKWRK, C)


Returns the molar concentrations given pressure, temperature(s)
and mass fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
C(*) - Real array, concentrations of the species;
dimension at least KK, the total species count.
cgs units, mole/cm**3

7.157. CKYTCR
CKYTCR CKYTCR CKYTCR CKYTCR CKYTCR CKYTCR CKYTCR
**********************************************
**************************
******

SUBROUTINE CKYTCR (RHO,T, Y, ICKWRK, RCKWRK, C)


Returns the molar concentrations given mass density, temperature(s),
and mass fractions.

INPUT
RHO - Real scalar, mass density.
cgs units, gm/cm**3
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
C(*) - Real array, concentrations of the species;
dimension at least KK, the total species count.
cgs units, mole/cm**3

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
142 of ANSYS, Inc. and its subsidiaries and affiliates.
PKINDX

7.158. CKYTX
CKYTX CKYTX CKYTX CKYTX CKYTX CKYTX CKYTX
**********************************************
**************************
******

SUBROUTINE CKYTX (Y, ICKWRK, RCKWRK, X)


Returns the mole fractions given mass fractions.

INPUT
Y(*) - Real array, mass fractions of the mixture;
dimension at least KK, the total species count.
ICKWRK(*) - Integer workspace array; dimension at least LENICK.
RCKWRK(*) - Real workspace array; dimension at least LENRCK.

OUTPUT
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.

7.159. PKINDX
PKINDX PKINDX PKINDX PKINDX PKINDX PKINDX PKINDX
**********************************************
**************************
******

SUBROUTINE PKINDX (ICKWRK, KELECT, KKION)


Returns plasma indices for the particular reaction mechanism.

INPUT
ICKWRK(*) - Integer workspace array; dimension at least LENICK.

OUTPUT
KELECT - Integer scalar, species array index for the electron.
KKION - Integer scalar, total ion count.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 143
Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
144 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 8: Alphabetical Listing of the Surface Kinetics Subroutine
Library
Each subroutine in the Surface Kinetics Subroutine Library is described in this chapter, together with a
detailed description of the variables in the call lists. For all arrays, information is given on the required
dimensioning in the calling program. For all variables having units, the cgs units are stated.

8.1. SKABE
SKABE SKABE SKABE SKABE SKABE SKABE SKABE
**********************************************
**************************
******

SUBROUTINE SKABE (ISKWRK, RSKWRK, RA, RB, RE, ISTFL)


Returns the Arrhenius coefficients or the sticking coefficients
of the surface reactions, and integer flags to indicate the type
of the coefficients.

INPUT
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
RA(*) - Real array, pre-exponential constants for reactions;
dimension at least IISUR, the total surface reaction
count.
cgs units, mole-cm-sec-K
RB(*) - Real array, temperature dependence exponents for
reactions;
dimension at least IISUR, the total surface reaction
count.
RE(*) - Real array, activation energies for reactions;
dimension at least IISUR, the total surface reaction
count.
cgs units, K
ISTFL(*) - Integer array, sticking reaction information;
dimension at least IISUR, the total surface reaction
count.
=1, a reaction uses sticking coefficients.
=0, a rection does not.

8.2. SKAML
SKAML SKAML SKAML SKAML SKAML SKAML SKAML
**********************************************
**************************
******

SUBROUTINE SKAML (T, ISKWRK, RSKWRK, AML)


Returns the standard state Helmholtz free energies in molar units. Does not account for dependence on surface covera

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 145
Alphabetical Listing of the Surface Kinetics Subroutine Library

cgs units, K
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
AML(*) - Real array, standard state Helmholtz free energies
for species;
dimension at least KKTOT, the total species count.
cgs units, ergs/mole

8.3. SKAMS
SKAMS SKAMS SKAMS SKAMS SKAMS SKAMS SKAMS
**********************************************
**************************
******

SUBROUTINE SKAMS (T, ISKWRK, RSKWRK, AMS)


Returns an the standard state Helmholtz free energies in mas units. Does not account for dependence on surface cover

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
AMS(*) - Real array, standard state Helmholtz free energies
for species;
dimension at least KKTOT, the total species count.
cgs units, ergs/gm

8.4. SKATCZ
SKATCZ SKATCZ SKATCZ SKATCZ SKATCZ SKATCZ SKATCZ
**********************************************
**************************
******

SUBROUTINE SKATCZ (P, T, ACT, SDEN, ISKWRK, RSKWRK, CZ)


Returns the concentrations of the species, given the pressure,
temperature and activities.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ACT(*) - Real array, activities of the species;
dimension at least KKTOT, the total species count.
The first KKGAS activities are mole fractions,
the next KKSURF activities are site fractions
(species density normalized by the site density;
surface concentration in moles/cm**2 is
ACT(K)*SITE_DENSITY / # sites per species), and
the next KKBULK activities for bulk phase species
should be from 0 to 1, and should sum to 1 for each
phase.
SDEN(*) - Real array, site densities for the site types;
dimension at least NPHASE, the total phase count,
but the subroutine only uses site phase entries,
NFSURF <= N <= NLSURF.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
146 of ANSYS, Inc. and its subsidiaries and affiliates.
SKATHM

cgs units, moles/cm**2.


ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
CZ(*) - Real array, gas-phase and surface species concentrations,
and bulk species activities;
dimension at least KKTOT, the total species count.
The first KKGAS gas-phase concentrations are moles/cm**3,
the next KKSURF site concentrations are moles/cm**2, and
the final KKBULK entries are bulk species activities.

8.5. SKATHM
SKATHM SKATHM SKATHM SKATHM SKATHM SKATHM SKATHM
**********************************************
**************************
******

SUBROUTINE SKATHM (MDIM, NDIM1, NDIM2, ISKWRK, RSKWRK, NT, TMP,


A)
Returns the polynomial coefficients of the fits for
thermodynamic properties of all of the species.

INPUT
MDIM - Integer scalar, first dimension of an array of
temperatures used in thermodynamic fits for species;
MDIM must be at least MAXTP, the maximum number of
temperatures used to fit the thermodynamics.
NDIM1 - Integer scalar, first dimension of A, the three-
dimensional array of thermodynamic fit coefficients;
NDIM1 must be at least NPCP2, the total number of
coefficients for one temperature range.
NDIM2 - Integer scalar, second dimension of A; NDIM2 must be
at least MAXTP-1, the total number of temperature ranges.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
Where NT(K) is the number of temperatures used in fitting the
thermodynamic properties of species K, TMP(N) is the Nth
temperature, NT(K)-1 is the number of temperature ranges for
which the polynomial coefficients are valid, then
A (L, N, K) is the Lth polynomial coefficient, for the Nth
temperature range, and the Kth species; i.e.,

| < N = 1 >. <N=2> . .< N = NT - 1>


P E | . . . . .
O X | . . . . .
L P | . . . . .
Y R | . . . . .
N E | . . . . .
O S | . . . . .
M S | . . . . .
I I | . . . . .
A O | . . . . .
L N |____.________._______.____________________.________.______
TMP(1) TMP(2) TMP(3) . . . . . TMP(NT-1) TMP(NT)

NT(*) - Integer array, total number of temperatures used in


fitting coefficients of thermodynamic properties for
the species;
dimension at least KKTOT, the total species count.
TMP(*,*) - Real matrix, temperatures for dividing the
thermodynamic fits for species; dimension at least
MAXTP for the first, and at least KKTOT for the second,
the total species count.
cgs units, K
A(*,*,*) - Real three-dimensioned array of fit coefficients to the

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 147
Alphabetical Listing of the Surface Kinetics Subroutine Library

thermodynamic data for species;


dimension exactly NPCP2 for the first, exactly MAXTP-1
for the second, and at least KKTOT for the third, the
total species count.
The indicies in A(N,L,K) mean-
N = 1,NN represent polynomial coefficients in CP/R
CP/R(K)=A(1,L,K) + A(2,L,K)*T + A(3,L,K)*T**2 + ...
N = NN+1 is for the formation enthalpies, i.e.,
HO/R = A(NN+1,L,K)
N = NN+2 is for the formation entropies, i.e.,
SO/R = A(NN+2,L,K)
L = 1 is for temperature <= TMP(2,K)
L = 2 is for TMP(2,K) < temperature <= TMP(3)
:
L = (NTMP-1) is for TMP(NTMP-1) <= temperature;
K is the species index

8.6. SKCAML
SKCAML SKCAML SKCAML SKCAML SKCAML SKCAML SKCAML
**********************************************
**************************
******

SUBROUTINE SKCAML (T, ACT, ISKWRK, RSKWRK, AML)


Returns the standard state Helmholtz free energies in molar units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ACT(*) - Real array, activities of the species;
dimension at least KKTOT, the total species count.
The first KKGAS activities are mole fractions,
the next KKSURF activities are site fractions
(species density normalized by the site density;
surface concentration in moles/cm**2 is
ACT(K)*SITE_DENSITY / # sites per species), and
the next KKBULK activities for bulk phase species
should be from 0 to 1, and should sum to 1 for each
phase.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
AML(*) - Real array, standard state Helmholtz free energies
for species;
dimension at least KKTOT, the total species count.
cgs units, ergs/mole

8.7. SKCAMS
SKCAMS SKCAMS SKCAMS SKCAMS SKCAMS SKCAMS SKCAMS
**********************************************
**************************
******

SUBROUTINE SKCAMS (T, ACT, ISKWRK, RSKWRK, AMS)


Returns an the standard state Helmholtz free energies in mas units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
148 of ANSYS, Inc. and its subsidiaries and affiliates.
SKCGMS

ACT(*) - Real array, activities of the species;


dimension at least KKTOT, the total species count.
The first KKGAS activities are mole fractions,
the next KKSURF activities are site fractions
(species density normalized by the site density;
surface concentration in moles/cm**2 is
ACT(K)*SITE_DENSITY / # sites per species), and
the next KKBULK activities for bulk phase species
should be from 0 to 1, and should sum to 1 for each
phase.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
AMS(*) - Real array, standard state Helmholtz free energies
for species;
dimension at least KKTOT, the total species count.
cgs units, ergs/gm

8.8. SKCGML
SKCGML SKCGML SKCGML SKCGML SKCGML SKCGML SKCGML
**********************************************
**************************
******

SUBROUTINE SKCGML (T, ACT, ISKWRK, RSKWRK, GML)


Returns an array of the standard state Gibbs free energies
in molar units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ACT(*) - Real array, activities of the species;
dimension at least KKTOT, the total species count.
The first KKGAS activities are mole fractions,
the next KKSURF activities are site fractions
(species density normalized by the site density;
surface concentration in moles/cm**2 is
ACT(K)*SITE_DENSITY / # sites per species), and
the next KKBULK activities for bulk phase species
should be from 0 to 1, and should sum to 1 for each
phase.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
GML(*) - Real array, standard state Gibbs free energies
for the species;
dimension KKTOT, the total species count.
cgs units, ergs/mole

8.9. SKCGMS
SKCGMS SKCGMS SKCGMS SKCGMS SKCGMS SKCGMS SKCGMS
**********************************************
**************************
******

SUBROUTINE SKCGMS (T, ACT, ISKWRK, RSKWRK, GMS)


Returns an array of the standard state Gibbs free energies
in mass units.

INPUT

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 149
Alphabetical Listing of the Surface Kinetics Subroutine Library

T(*) - Real array, temperature(s); dimension is determined by


the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ACT(*) - Real array, activities of the species;
dimension at least KKTOT, the total species count.
The first KKGAS activities are mole fractions,
the next KKSURF activities are site fractions
(species density normalized by the site density;
surface concentration in moles/cm**2 is
ACT(K)*SITE_DENSITY / # sites per species), and
the next KKBULK activities for bulk phase species
should be from 0 to 1, and should sum to 1 for each
phase.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
GMS(*) - Real array, standard state Gibbs free energies
for the species;
dimension at least KKTOT, the total species count.
cgs units, ergs/gm

8.10. SKCHML
SKCHML SKCHML SKCHML SKCHML SKCHML SKCHML SKCHML
**********************************************
**************************
******

SUBROUTINE SKCHML (T, ACT, ISKWRK, RSKWRK, HML)


Returns an array of the enthalpies in molar units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ACT(*) - Real array, activities of the species;
dimension at least KKTOT, the total species count.
The first KKGAS activities are mole fractions,
the next KKSURF activities are site fractions
(species density normalized by the site density;
surface concentration in moles/cm**2 is
ACT(K)*SITE_DENSITY / # sites per species), and
the next KKBULK activities for bulk phase species
should be from 0 to 1, and should sum to 1 for each
phase.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
HML(*) - Real array, enthalpies for the species;
dimension at least KKTOT, the total species count.
cgs units, ergs/mole

8.11. SKCHMS
SKCHMS SKCHMS SKCHMS SKCHMS SKCHMS SKCHMS SKCHMS
**********************************************
**************************
******

SUBROUTINE SKCHMS (T, ACT, ISKWRK, RSKWRK, HMS)


Returns an array of the enthalpies in mass units.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
150 of ANSYS, Inc. and its subsidiaries and affiliates.
SKCHRG

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ACT(*) - Real array, activities of the species;
dimension at least KKTOT, the total species count.
The first KKGAS activities are mole fractions,
the next KKSURF activities are site fractions
(species density normalized by the site density;
surface concentration in moles/cm**2 is
ACT(K)*SITE_DENSITY / # sites per species), and
the next KKBULK activities for bulk phase species
should be from 0 to 1, and should sum to 1 for each
phase.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
HMS(*) - Real array, enthalpies for the species;
dimension at least KKTOT, the total species count.
cgs units, ergs/gm

8.12. SKCHORT
SKCHORT SKCHORT SKCHORT SKCHORT SKCHORT SKCHORT SKCHORT
**********************************************
**************************
******

SUBROUTINE SKCHORT (T, ACT, ISKWRK, RSKWRK, HORT)


Returns an array of the nondimensional enthalpies.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ACT(*) - Real array, activities of the species;
dimension at least KKTOT, the total species count.
The first KKGAS activities are mole fractions,
the next KKSURF activities are site fractions
(species density normalized by the site density;
surface concentration in moles/cm**2 is
ACT(K)*SITE_DENSITY / # sites per species), and
the next KKBULK activities for bulk phase species
should be from 0 to 1, and should sum to 1 for each
phase.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
HORT(*) - Real array, nondimensional enthalpies for the species;
dimension at least KKTOT, the total species count.

8.13. SKCHRG
SKCHRG SKCHRG SKCHRG SKCHRG SKCHRG SKCHRG SKCHRG
**********************************************
**************************
******

SUBROUTINE SKCHRG (ISKWRK, RSKWRK, KCHARG)


Returns an array containing electronic charges of the species.

INPUT

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 151
Alphabetical Listing of the Surface Kinetics Subroutine Library

ISKWRK(*) - Integer workspace array; dimension at least LENISK.


RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
KCHARG(*) - Integer array, electronic charges of the species;
dimension at least KKTOT, the total species count.
KCHARG(K)=-2 indicates that the species K has two excess
electrons.

8.14. SKCOMP

SKCOMP SKCOMP SKCOMP SKCOMP SKCOMP SKCOMP SKCOMP


**********************************************
**************************
******

SUBROUTINE SKCOMP (ISTR, IRAY, NN, IND, NT)


Search for the occurrence of character string ISTR, in the NN
character strings of array IRAY;
IND is the first location in IRAY of ISTR if found, or 0 if not
found, and NT is the total number of times it occurs.

Consider the following example,


IRAY = {"BOOK","BLUE","BEAR","BOOK"}
NN=4.

If ISTR="BLUE" then IND=2 and NT=1;


if ISTR="RED" then IND=0 and NT=0; and
if ISTR="BOOK",then IND=1 and NT=2.

INPUT
ISTR - Character string.
IRAY(*) - Character string array.
NN - Integer scalar, length of IRAY(*).

OUTPUT
IND - Integer scalar, location in IRAY of the character string
ISTR, or 0 if ISTR does not appear in IRAY.
NT - Integer scalar, total number of times ISTR occurs
in IRAY.

8.15. SKCONT
SKCONT SKCONT SKCONT SKCONT SKCONT SKCONT SKCONT
**********************************************
**************************
******

SUBROUTINE SKCONT (KSPEC, ROP, ISKWRK, RSKWRK, CIK)


Returns the contributions of the surface reactions to the molar
production rate of species KSPEC.

INPUT
KSPEC - Integer scalar, species index.
ROP(*) - Real array, rates of progress for the surface reactions;
dimension at least IISUR, the total surface reaction
count.
cgs units, moles/(cm**2*sec)
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
CIK(*) - Real array, contributions of the surface reactions to the
production rate of species KSPEC;
dimension at least IISUR, the total surface reaction

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
152 of ANSYS, Inc. and its subsidiaries and affiliates.
SKCPMS

count.
cgs units, mole/(cm**2*sec)

8.16. SKCOV
SKCOV SKCOV SKCOV SKCOV SKCOV SKCOV SKCOV
**********************************************
**************************
******

SUBROUTINE SKCOV (ISKWRK, KOCC)


Returns an array of site occupancy numbers for the species.

INPUT
ISKWRK(*) - Integer workspace array; dimension at least LENISK.

OUTPUT
KOCC(*) - Integer array, site occupancy numbers for the species;
dimension at least KKTOT, the total species count.

8.17. SKCPML
SKCPML SKCPML SKCPML SKCPML SKCPML SKCPML SKCPML
**********************************************
**************************
******

SUBROUTINE SKCPML (T, ISKWRK, RSKWRK, CPML)


Returns an array of the specific heats at constant pressure
in molar units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
CPML(*) - Real array, specific heats at constant pressure for the
species;
dimension at least KKTOT, the total species count.
cgs units, ergs/(mole*K)

8.18. SKCPMS
SKCPMS SKCPMS SKCPMS SKCPMS SKCPMS SKCPMS SKCPMS
**********************************************
**************************
******

SUBROUTINE SKCPMS (T, ISKWRK, RSKWRK, CPMS)


Returns an array of the specific heats at constant pressure
in mass units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 153
Alphabetical Listing of the Surface Kinetics Subroutine Library

OUTPUT
CPMS(*) - Real array, specific heats at constant pressure for the
species;
dimension at least KKTOT, the total species count.
cgs units, ergs/(gm*K)

8.19. SKCPOR
SKCPOR SKCPOR SKCPOR SKCPOR SKCPOR SKCPOR SKCPOR
**********************************************
**************************
******

SUBROUTINE SKCPOR (T, ISKWRK, RSKWRK, CPOR)


Returns an array of the nondimensional specific heats at constant
pressure.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
CPOR(*) - Real array, nondimensional specific heats at constant
pressure for the species;
dimension at least KKTOT, the total species count.

8.20. SKCUML
SKCUML SKCUML SKCUML SKCUML SKCUML SKCUML SKCUML
**********************************************
**************************
******

SUBROUTINE SKCUML (T, ACT, ISKWRK, RSKWRK, UML)


Returns an array of the internal energies in molar units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ACT(*) - Real array, activities of the species;
dimension at least KKTOT, the total species count.
The first KKGAS activities are mole fractions,
the next KKSURF activities are site fractions
(species density normalized by the site density;
surface concentration in moles/cm**2 is
ACT(K)*SITE_DENSITY / # sites per species), and
the next KKBULK activities for bulk phase species
should be from 0 to 1, and should sum to 1 for each
phase.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
UML(*) - Real array, internal energies of the species;
dimension at least KKTOT, the total species count.
cgs units, ergs/mole

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
154 of ANSYS, Inc. and its subsidiaries and affiliates.
SKCZTA

8.21. SKCUMS
SKCUMS SKCUMS SKCUMS SKCUMS SKCUMS SKCUMS SKCUMS
**********************************************
**************************
******

SUBROUTINE SKCUMS (T, ACT, ISKWRK, RSKWRK, UMS)


Returns an array of the internal energies in mass units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ACT(*) - Real array, activities of the species;
dimension at least KKTOT, the total species count.
The first KKGAS activities are mole fractions,
the next KKSURF activities are site fractions
(species density normalized by the site density;
surface concentration in moles/cm**2 is
ACT(K)*SITE_DENSITY / # sites per species), and
the next KKBULK activities for bulk phase species
should be from 0 to 1, and should sum to 1 for each
phase.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
UMS(*) - Real array, internal energies of the species;
dimension at least KKTOT, the total species count.
cgs units, ergs/gm

8.22. SKCZTA
SKCZTA SKCZTA SKCZTA SKCZTA SKCZTA SKCZTA SKCZTA
**********************************************
**************************
******

SUBROUTINE SKCZTA (T, CZ, SDEN, ISKWRK, RSKWRK, ACT)


Returns the activities of the species, given the pressure,
temperature and concentrations.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
CZ(*) - Real array, gas-phase and surface species concentrations,
and bulk species activities;
dimension at least KKTOT, the total species count.
The first KKGAS gas-phase concentrations are moles/cm**3,
the next KKSURF site concentrations are moles/cm**2, and
the final KKBULK entries are bulk species activities.
SDEN(*) - Real array, site densities for the site types;
dimension at least NPHASE, the total phase count,
but the subroutine only uses site phase entries,
NFSURF <= N <= NLSURF.
cgs units, moles/cm**2.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
ACT(*) - Real array, activities of the species;
dimension at least KKTOT, the total species count.
The first KKGAS activities are mole fractions,
the next KKSURF activities are site fractions

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 155
Alphabetical Listing of the Surface Kinetics Subroutine Library

(species density normalized by the site density;


surface concentration in moles/cm**2 is
ACT(K)*SITE_DENSITY / # sites per species), and
the next KKBULK activities for bulk phase species
should be from 0 to 1, and should sum to 1 for each
phase.

8.23. SKDEN
SKDEN SKDEN SKDEN SKDEN SKDEN SKDEN SKDEN
**********************************************
**************************
******

SUBROUTINE SKDEN (P, T, ACT, SDEN, ISKWRK, RSKWRK, DEN)


Returns a real array of species densities.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ACT(*) - Real array, activities of the species;
dimension at least KKTOT, the total species count.
The first KKGAS activities are mole fractions,
the next KKSURF activities are site fractions
(species density normalized by the site density;
surface concentration in moles/cm**2 is
ACT(K)*SITE_DENSITY / # sites per species), and
the next KKBULK activities for bulk phase species
should be from 0 to 1, and should sum to 1 for each
phase.
SDEN(*) - Real array, site densities for the site types;
dimension at least NPHASE, the total phase count,
but the subroutine only uses site phase entries,
NFSURF <= N <= NLSURF.
cgs units, moles/cm**2.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
DEN(*) - Real array, densities for the species;
dimension at least KKTOT, the total species count.
cgm units, gm/cm**3 for gas-phase species
bm/cm**2 for surface species
gm/cm**3 for bulk species

NOTE: mass densities are not required to be input to


the Interpreter for bulk-phase species.
If they are input, they are returned by this
subroutine. If not, DEN = -1.0 for the bulk
species

8.24. SKDRDA
SKDRDA SKDRDA SKDRDA SKDRDA SKDRDA SKDRDA SKDRDA
**********************************************
**************************
******

SUBROUTINE SKDRDA (IR, P, T, ACT, SDEN, ISKWRK, RSKWRK, DKDAI)


Returns the partial of the rates of production of the species with
respect to the pre-exponential constant of surface reaction IR.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
156 of ANSYS, Inc. and its subsidiaries and affiliates.
SKDRDC

INPUT
IR - Integer scalar, surface reaction index.
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ACT(*) - Real array, activities of the species;
dimension at least KKTOT, the total species count.
The first KKGAS activities are mole fractions,
the next KKSURF activities are site fractions
(species density normalized by the site density;
surface concentration in moles/cm**2 is
ACT(K)*SITE_DENSITY / # sites per species), and
the next KKBULK activities for bulk phase species
should be from 0 to 1, and should sum to 1 for each
phase.
SDEN(*) - Real array, site densities for the site types;
dimension at least NPHASE, the total phase count,
but the subroutine only uses site phase entries,
NFSURF <= N <= NLSURF.
cgs units, moles/cm**2.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
DKDAI(*) - Real array, partials of the partial of production rates
of the species with respect to the pre-exponential
constant for surface reaction IR;
dimension at least KKTOT, the total species count.
cgs units, moles/(cm**2*sec) / (units of A)

8.25. SKDRDC
SKDRDC SKDRDC SKDRDC SKDRDC SKDRDC SKDRDC SKDRDC
**********************************************
**************************
******

SUBROUTINE SKDRDC (KSPEC, P, T, ACT, SDEN, ISKWRK, RSKWRK, DKDC)


Returns the partial derivative of the production rates of the
species with respect to the concentration of species KSPEC.

INPUT
KSPEC - Integer scalar, species index
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ACT(*) - Real array, activities of the species;
dimension at least KKTOT, the total species count.
The first KKGAS activities are mole fractions,
the next KKSURF activities are site fractions
(species density normalized by the site density;
surface concentration in moles/cm**2 is
ACT(K)*SITE_DENSITY / # sites per species), and
the next KKBULK activities for bulk phase species
should be from 0 to 1, and should sum to 1 for each
phase.
SDEN(*) - Real array, site densities for the site types;
dimension at least NPHASE, the total phase count,
but the subroutine only uses site phase entries,
NFSURF <= N <= NLSURF.
cgs units, moles/cm**2.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 157
Alphabetical Listing of the Surface Kinetics Subroutine Library

OUTPUT
DKDC(*) - Real array, partial of the production rates of the
species with respect to the concentration of species
KSPEC;
dimension at least KKTOT, the total species count.
cgs units, moles/(cm**2*sec) / (units of KSPEC)

8.26. SKDSDC
SKDSDC SKDSDC SKDSDC SKDSDC SKDSDC SKDSDC SKDSDC
**********************************************
**************************
******

SUBROUTINE SKDSDC (P, T, X, ACT, SDEN, ISKWRK, RSKWRK, DSDC, KDIM,


SDOT, SITDOT)
Returns the partial derivative of the production rates of the
species with respect to the concentration of each species.
It also returns the matching production rates.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fraction (or its equivalent) of the
species;
dimension at least KKTOT, the total species count.
The first KKGAS X are mole fractions,
the next KKSURF X are site fractions
(species density normalized by the site density;
surface concentration in moles/cm**2 is
X(K)*SITE_DENSITY / # sites per species),
the next KKBULK X are bulk species mole fractions.
ACT(*) - Real array, activities of the species;
dimension at least KKTOT, the total species count.
The first KKGAS activities are mole fractions,
the next KKSURF activities are site fractions
(species density normalized by the site density;
surface concentration in moles/cm**2 is
ACT(K)*SITE_DENSITY / # sites per species), and
the next KKBULK activities for bulk phase species
should be from 0 to 1, and should sum to 1 for each
phase.
SDEN(*) - Real array, site densities for the site types;
dimension at least NPHASE, the total phase count,
but the subroutine only uses site phase entries,
NFSURF <= N <= NLSURF.
cgs units, moles/cm**2.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.
KDIM - Integer scalar, actual first dimension of DSDC.

OUTPUT
DSDC(*,*) - Real matrix, the partial derivatives of the production
rates of the species with respect to the concentration
of species KSPEC;
dimension at least KKTOT, the total species count, for
both the first and second dimensions.
cgs units, moles/(cm**2*sec) / (units of KSPEC)
SDOT(*) - Real array, production rates of the species;
dimension at least KKTOT, the total species count.
cgs units, moles/(cm**2*sec)
for 1,KKGAS, the production rates of gas-phase species,
for KKGAS+1,KKGAS+KKSUR, the production rates of surface
species,

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
158 of ANSYS, Inc. and its subsidiaries and affiliates.
SKDSDX

for KKGAS+KKSUR+1,KKTOT, the production rate of bulk


species.
SITDOT(*) - Real array, production rates of the surface phases;
dimension at least NPHASE, the total phase count, but
subroutine only calculates entries for site phases.
cgs units, moles/(cm**2*sec)

8.27. SKDSDX
SKDSDX SKDSDX SKDSDX SKDSDX SKDSDX SKDSDX SKDSDX
**********************************************
**************************
******

SUBROUTINE SKDSDX (P, T, X, ACT, SDEN, ISKWRK, RSKWRK, DSDX, KDIM,


SDOT, SITDOT)
Returns the partial derivative of the production rates of the
species with respect to the activity for each species.
It also returns the matching production rates.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
X(*) - Real array, mole fraction (or its equivalent) of the
species;
dimension at least KKTOT, the total species count.
The first KKGAS X are mole fractions,
the next KKSURF X are site fractions
(species density normalized by the site density;
surface concentration in moles/cm**2 is
X(K)*SITE_DENSITY / # sites per species),
the next KKBULK X are bulk species mole fractions.
ACT(*) - Real array, activities of the species;
dimension at least KKTOT, the total species count.
The first KKGAS activities are mole fractions,
the next KKSURF activities are site fractions
(species density normalized by the site density;
surface concentration in moles/cm**2 is
ACT(K)*SITE_DENSITY / # sites per species), and
the next KKBULK activities for bulk phase species
should be from 0 to 1, and should sum to 1 for each
phase.
SDEN(*) - Real array, site densities for the site types;
dimension at least NPHASE, the total phase count,
but the subroutine only uses site phase entries,
NFSURF <= N <= NLSURF.
cgs units, moles/cm**2.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.
KDIM - Integer scalar, actual first dimension of DSDX.

OUTPUT
DSDX(*,*) - Real matrix, partial derivatives of the production rates
of the species with respect to the activity of species
KSPEC;
dimension at least KKTOT, the total species count, for
both the first and second dimensions.
cgs units, moles/(cm**2*sec) / (units of KSPEC)
SDOT(*) - Real array, production rates of the species;
dimension at least KKTOT, the total species count.
cgs units, moles/(cm**2*sec)
SDOT(K) is
for 1,KKGAS, the production rate of gas-phase species,
for KKGAS+1,KKGAS+KKSUR, the production rate of surface
species,

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 159
Alphabetical Listing of the Surface Kinetics Subroutine Library

for KKGAS+KKSUR+1,KKTOT, the production rate of bulk


species.
SITDOT(*) - Real array, production rates of the surface phases;
dimension at least NPHASE, the total phase count, but
subroutine only calculates entries for site phases.
cgs units, moles/(cm**2*sec)

8.28. SKEQ
SKEQ SKEQ SKEQ SKEQ SKEQ SKEQ SKEQ
**********************************************
**************************
******

SUBROUTINE SKEQ (P, T, ACT, SDEN, ISKWRK, RSKWRK, EQK)


Returns the equilibrium constants for the surface reactions given
pressure, temperature, species activities, and the site densities.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ACT(*) - Real array, activities of the species;
dimension at least KKTOT, the total species count.
The first KKGAS activities are mole fractions,
the next KKSURF activities are site fractions
(species density normalized by the site density;
surface concentration in moles/cm**2 is
ACT(K)*SITE_DENSITY / # sites per species), and
the next KKBULK activities for bulk phase species
should be from 0 to 1, and should sum to 1 for each
phase.
SDEN(*) - Real array, site densities for the site types;
dimension at least NPHASE, the total phase count,
but the subroutine only uses site phase entries,
NFSURF <= N <= NLSURF.
cgs units, moles/cm**2.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
EQK(*) - Real array, equilibrium constants in concentration units
for the reactions;
dimension at least IISUR, the total surface reaction
count.
cgs units, depends on reaction (moles, cm)

8.29. SKFLGS
SKFLGS SKFLGS SKFLGS SKFLGS SKFLGS SKFLGS SKFLGS
**********************************************
**************************
******

SUBROUTINE SKFLGS (IR, ISKWRK, NRPP, IREV, ISTFL, ICOV, IMOTZ,


IEDP, IBHM, IORD, IYLD)
Returns several integer flags describing surface reaction IR.

INPUT
IR - Integer scalar, surface reaction index.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
160 of ANSYS, Inc. and its subsidiaries and affiliates.
SKGMS

OUTPUT
NRPP - Integer scalar, number of species (reactants+products)
for surface reaction IR, combined with reversibility
flag.
NRPP > 0, NRPP species, reversible surface reaction,
< 0, ABS(NRPP) species, irreversible reaction.
IREV - Integer scalar, flag for explicit reverse Arrhenius
parameters.
=1, reaction has explicit reverse Arrhenius parameters
=0, no (may or may not be reversible, see NRPP).
ISTFL - Integer scalar, flag for sticking coefficients;
=1, reaction does not use sticking coefficients
=0, no
IMOTZ - Integer scalar, flag for Motz-Wise correction of
sticking coefficients;
=1, sticking reaction with Motz-Wise correction
=0, no (may or may not be sticking reaction, see ISTFL)
ICOV - Integer scalar, flag to indidicate that reaction has
coverage dependence;
=1, reaction has coverage dependence
=0, no.
IEDP - Integer scalar, flag for energy-dependence;
=1, reaction is energy-dependent,
=0, no.
IBHM - Integer scalar, flag for Bohm correction;
=1, Bohm reaction,
=0, no
IORD - Integer scalar, flag for species order change;
=1, reaction has species order change,
=0, no
IYLD - Integer scalar, flag for yield-modification;
=1, yield-modification in reaction;
=0, no

8.30. SKGML
SKGML SKGML SKGML SKGML SKGML SKGML SKGML
**********************************************
**************************
******

SUBROUTINE SKGML (T, ISKWRK, RSKWRK, GML)


Returns an array of the standard state Gibbs free energies
in molar units. Does not account for dependence on surface coverage (HFCOV). To include that effect, use subroutine

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
GML(*) - Real array, standard state Gibbs free energies
for the species;
dimension KKTOT, the total species count.
cgs units, ergs/mole

8.31. SKGMS
SKGMS SKGMS SKGMS SKGMS SKGMS SKGMS SKGMS
**********************************************
**************************
******

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 161
Alphabetical Listing of the Surface Kinetics Subroutine Library

SUBROUTINE SKGMS (T, ISKWRK, RSKWRK, GMS)


Returns an array of the standard state Gibbs free energies
in mass units. Does not account for dependence on surface coverage (HFCOV). To include that effect, use subroutine S

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
GMS(*) - Real array, standard state Gibbs free energies
for the species;
dimension at least KKTOT, the total species count.
cgs units, ergs/gm

8.32. SKHML
SKHML SKHML SKHML SKHML SKHML SKHML SKHML
**********************************************
**************************
******

SUBROUTINE SKHML (T, ISKWRK, RSKWRK, HML)


Returns an array of the enthalpies in molar units. Does not account for dependence on surface coverage (HFCOV). To i

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
HML(*) - Real array, enthalpies for the species;
dimension at least KKTOT, the total species count.
cgs units, ergs/mole

8.33. SKHMS
SKHMS SKHMS SKHMS SKHMS SKHMS SKHMS SKHMS
**********************************************
**************************
******

SUBROUTINE SKHMS (T, ISKWRK, RSKWRK, HMS)


Returns an array of the enthalpies in mass units. Does not account for dependence on surface coverage (HFCOV). To in

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
HMS(*) - Real array, enthalpies for the species;
dimension at least KKTOT, the total species count.
cgs units, ergs/gm

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
162 of ANSYS, Inc. and its subsidiaries and affiliates.
SKICOV

8.34. SKHORT
SKHORT SKHORT SKHORT SKHORT SKHORT SKHORT SKHORT
**********************************************
**************************
******

SUBROUTINE SKHORT (T, ISKWRK, RSKWRK, HORT)


Returns an array of the nondimensional enthalpies. Does not account for dependence on surface coverage (HFCOV). To i

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
HORT(*) - Real array, nondimensional enthalpies for the species;
dimension at least KKTOT, the total species count.

8.35. SKIBHM
SKIBHM SKIBHM SKIBHM SKIBHM SKIBHM SKIBHM SKIBHM
**********************************************
**************************
******

SUBROUTINE SKIBHM (IR, ISKWRK, IBMFL)


Returns an integer flag to indicate whether reaction IR uses
BOHM sticking coefficients.

INPUT
IR - Integer scalar, surface reaction index.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.

OUTPUT
IBMFL - Integer scalar, flag for Bohm reactions;
0, reaction IR does not use BOHM sticking coefficients
K, reaction IR does use BOHM sticking coefficients,
and K is the index of the BOHM-correction ion.

8.36. SKICOV
SKICOV SKICOV SKICOV SKICOV SKICOV SKICOV SKICOV
**********************************************
**************************
******

SUBROUTINE SKICOV (IR, NDIM, ISKWRK, RSKWRK, NCOVI, KCOVI, CPARI)


Returns the coverage species index numbers and their coverage
parameters for reaction IR.

INPUT
IR - Integer scalar, surface reaction index.
NDIM - Integer scalar, first dimension of array CPAR, the
coverage parameters; NDIM must be at least NSCOV,
the total number of coverage parameters.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
NCOVI - Integer scalar, total number of species that modify the
rate of reaction IR through coverage dependence.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 163
Alphabetical Listing of the Surface Kinetics Subroutine Library

KCOVI(*) - Integer array, species indices for the NCOVI species that
modify the rate of a coverage dependence reaction;
dimension at least KKTOT, the total species count.
CPARI(*,*)- Real matrix, coverage parameters for the coverage species
of reaction IR;
dimension at least NSCOV for the first, the number of
coverage parameters required, and at least KKTOT for the
second, the total species count.

8.37. SKIENR
SKIENR SKIENR SKIENR SKIENR SKIENR SKIENR SKIENR
**********************************************
**************************
******

SUBROUTINE SKIENR (IR, ISKWRK, SKWRK, IENRFL, IEION, PEDEP)


Returns an integer flag to indicate if reaction IR is ion-energy-
dependent, and if so, formulation-specific parameters.

INPUT
IR - Integer scalar, reaction index;
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
IENRFL - Integer scalar,
0, reaction IR does not have an ion-energy dependence
1, reaction IR does have an ion-energy dependence
IEION - Integer scalar, species index of the ion on which
reaction is dependent;
PEDEP(*) - Real array, supplemental parameters for an
ion-energy-dependent reaction rate formulation;
dimension at least NEDPAR, the number of supplemental
rate parameters required.

8.38. SKILANG
SKILANG SKILANG SKILANG SKILANG SKILANG SKILANG SKILANG
**********************************************
**************************
******

SUBROUTINE SKILANG (IS, ISKWRK, RSKWRK, MAXK, NKLANG, KLANG,


NULANG, ELANG, MAXP, PLANG)
Returns a set of flags indicating whether the reactions are
Langmuir-Hinshelwood/Eley Rideal reactions, and if so, the
species indices and their parameters.

INPUT
IS - Integer reaction index.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.
MAXK - Integer dimension for data arrays;
MAXK needs to be at least as large as the number of
L-H/ER species in reaction IS.
OUTPUT
NKLANG - Integer scalar;
= 0, there is no L-H or ER rate-modify;
= N > 0, there are N species for an L-H rate-modify.
KLANG(*) - Integer array, L-H/ER species for reaction IS;
dimension at least NDIM.
NULANG(*) - Integer array, L-H/ER reactant and product species
flags for reaction IS;
if NULANG(n) = 1, the nth reaction species uses an L-H
rate scalar in the numberator, as well as the denominator;

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
164 of ANSYS, Inc. and its subsidiaries and affiliates.
SKINIT

dimension at least MAXSPR, the number of species allowed


in a surface reaction.
ELANG - Real scalar, L-H/ER exponent for the denominator for
reaction IS;
MAXP - Integer dimension for data arrays;
MAXP needs to be at least NLHPAR, the number of parameters
required for an L-H/ER species rate-modify.
PLANG(*,*)- Real matrix, L-H/ER species parameters for reaction IS;
the first dimension needs to be at least NLHPAR,
the second dimension needs to be at least NKLANG.

8.39. SKINDX
SKINDX SKINDX SKINDX SKINDX SKINDX SKINDX SKINDX
**********************************************
**************************
******

SUBROUTINE SKINDX (ISKWRK, NELM, KKGAS, KKSUR, KKBULK, KKTOT,


NNPHAS, NNSURF, NFSURF, NLSURF, NNBULK, NFBULK,
NLBULK, IISUR)
Returns a group of indices defining the size of the surface
reaction mechanism.

INPUT
ISKWRK(*) - Integer workspace array; dimension at least LENISK.

OUTPU
NELM - Integer scalar, total element count.
KKGAS - Integer scalar, total gas-phase species count.
KKSUR - Integer scalar, total surface species count.
KKBULK - Integer scalar, total bulk species count.
KKTOT - Integer scalar, total species count (KKGAS+KKSUR+KKBULK).
NNPHAS - Integer scalar, total phase count (gas + sites + bulks).
NNSURF - Integer scalar, total surface phase count.
NFSURF - Integer scalar, phase index of the first surface phase.
NLSURF - Integer scalar, phase index of the last surface phase.
NNBULK - Integer scalar, total bulk phase count.
NFBULK - Integer scalar, phase index of the first bulk phase.
NLBULK - Integer scalar, phase index of the last bulk phase.
IISUR - Integer scalar, total surface reaction count.

8.40. SKINIT
SKINIT SKINIT SKINIT SKINIT SKINIT SKINIT SKINIT
**********************************************
**************************
******

SUBROUTINE SKINIT (LENISK, LENRSK, LENCSK, LINSK, LOUT,


ISKWRK, RSKWRK, CSKWRK, IFLAG)
Reads the surface linkfile and creates internal work arrays ISKWRK,
RSKWRK, and CSKWRK. SKINIT must be called before any other Surface
Chemkin subroutine can be used, as the work arrays must be available
as their input.

INPUT
LENISK - Integer scalar, length of the integer array ISKWRK.
LENRSK - Integer scalar, length of the real array RSKWRK.
LENCSK - Integer scalar, length of the character string array
CSKWRK.
LINSK - Integer scalar, linkfile input file unit number.
LOUT - Integer scalar, formatted output file unit number.

OUTPUT
ISKWRK(*) - Integer workspace array; dimension at least LENISK.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 165
Alphabetical Listing of the Surface Kinetics Subroutine Library

RSKWRK(*) - Real workspace array; dimension at least LENRSK.


CSKWRK(*) - Character string workspace array; dimension at least
LENCSK.
IFLAG - Integer scalar to indicate successful reading of
linkfile; IFLAG>0 is an error type.

8.41. SKINU
SKINU SKINU SKINU SKINU SKINU SKINU SKINU
**********************************************
**************************
******

SUBROUTINE SKINU (IR, NDIM, ISKWRK, RSKWRK, NSPEC, KI, NU)


Returns the number of species in a surface reaction, and the
species indices and stoichiometric coefficients.

INPUT
IR - Integer scalar, index number of a surface reaction;
IR must be greater than 0 and less than or equal to
IISUR, the total surface reaction count.
NDIM - Integer scalar, dimension of the arrays KI and NU;
NDIM must be at least MAXSPR, the total number of
species allowed in a surface reaction.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
NSPEC - Integer scalar, the number of species (reactants +
products) in surface reaction IR.
KI(*) - Integer array, species indices for the species in surface
reaction IR;
dimension at least MAXSPR, the total number of species
allowed in a surface reaction.
NU(*) - Integer array, stoichiometric coefficients of the
species in surface reaction IR;
dimension at least MAXSPR, the total number of species
allowed in a surface reaction.
NU is negative if the Nth species is a reactant;
NU is positive if the Nth species is a product.

8.42. SKIORD
SKIORD SKIORD SKIORD SKIORD SKIORD SKIORD SKIORD
**********************************************
**************************
******

SUBROUTINE SKIORD (IDIM, KDIM, ISKWRK, RSKWRK, NFORD, IFORD, FORD,


NRORD, IRORD, RORD)
Returns the number and indices of surface reactions with modified
species orders, and the order values for the species in the
surface mechanism.

INPUT
IDIM - Integer scalar, dimension of arrays IFORD and IRORD;
IDIM must be at least NORD, the total number of
surface reactions with modified species orders.
KDIM - Integer scalar, first dimension of the arrays FORD and
RORD;
KDIM must be at least NKK, the total species count.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
NFORD - Integer scalar, total number of surface reactions with

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
166 of ANSYS, Inc. and its subsidiaries and affiliates.
SKIRNU

modified forward species orders.


IFORD(*) - Integer array, indices of surface reactions with modified
forward species orders; dimension at least NFORD.
FORD(*,*) - Real matrix, the modified forward species orders for the
NFORD surface reactions;
dimension at least KKTOT, the total species count, for
the first, and at least NFORD for the second.
FORD(K,N) is the forward order of species K for the Nth
surface change-order reaction.
NRORD - Integer scalar, total number of surface reactions with
modified reverse species orders.
IRORD(*) - Integer array, indices of surface reactions with modified
reverse species orders; dimension at least NRORD.
RORD(*,*) - Real matrix, the modified reverse species orders for the
NRORD surface reactions;
dimension at least KKTOT for the first, the total species
count, and at least NRORD for the second.
RORD(K,N) is the reverse order of species K for the Nth
surface change-order reaction.

8.43. SKIREV
SKIREV SKIREV SKIREV SKIREV SKIREV SKIREV SKIREV
**********************************************
**************************
******

SUBROUTINE SKIREV (IR, ISKWRK, RSKWRK, IREV, RAR, RBR, RER)


Returns an integer flag to indicate whether reaction IR has an
explicitly assigned reverse rate constant. It also returns the
reverse Arrhenius expression values for surface reaction IR,
if it was explicitly assigned in the Surface Chemkin interpreter.
If reverse Arrhenius values were not explicitly assigned,
RAR, RBR and RER will be zero.

INPUT
IR - Integer scalar, surface reaction index.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
IREV - Integer scalar,
1, reaction IR has explicit reverse rate parameters
0, no.
RAR - Real scalar, explicit pre-exponential constants
for reaction IR.
cgs units, mole-cm-sec-K
RBR - Real scalar, explicit temperature dependence exponents
for reaction IR.
RER - Real scalar, explicit activation energy for reaction IR.
cgs units, Kelvins

8.44. SKIRNU
SKIRNU SKIRNU SKIRNU SKIRNU SKIRNU SKIRNU SKIRNU
**********************************************
**************************
******

SUBROUTINE SKIRNU (IDIM, NDIM, ISKWRK, RSKWRK, NIIRNU, IRNU,


NSPEC, KI, RNU)
Returns the number and indices of surface reactions with real
stoichiometric coefficients, number of species in the reactions,
and the species indices and coefficients;

INPUT

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 167
Alphabetical Listing of the Surface Kinetics Subroutine Library

IDIM - Integer scalar, dimension of the arrays IRNU and NSPEC,


and the second dimension of matrices KI and RNU;
IDIM must be at least NIIRNU, the number of surface
reactions with real stoichiometric coefficients.
NDIM - Integer scalar, first dimension of matrices KI and RNU;
NDIM must be at least MAXSPR, the maximum number of
species allowed in a surface reaction.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
NIIRNU - Integer scalar, total number of surface reactions with
real stoichiometric coefficients.
IRNU(*) - Integer array, indices of surface reactions with real
stoichiometric coefficients; dimension at least NIIRNU.
NSPEC(*) - Integer array, total number of species in a surface
reaction;
dimension at least NIIRNU.
KI(*,*) - Integer matrix, species indices for species in a surface
reaction;
dimension at least MAXSPR for the first, and at least
NIIRNU for the second.
KI(M,N) is the species index of the Mth species in the
Nth real coefficient surface reaction.
RNU(*,*) - Real matrix, stoichiometric coefficients for species
in the NIIRNU reactions; dimension at least MAXSPR for
the first, and at least NIIRNU for the second.
RNU(M,N) is the stoichiometric coefficient of the Mth
species in the Nth real coefficient surface reaction, and
RNU(M,*) < 0 if the Mth species is a reactant;
RNU(M,*) > 0 if the Mth species is a product.

8.45. SKISTK
SKISTK SKISTK SKISTK SKISTK SKISTK SKISTK SKISTK
**********************************************
**************************
******

SUBROUTINE SKISTK (IR, ISKWRK, ISTFL)


Returns an integer flag to indicate whether reaction IR uses
sticking coefficients.

INPUT
IR - Integer scalar, index of a surface reaction.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.

OUTPUT
ISTFL - Integer scalar,
0, reaction IR does not use sticking coefficients
1, reaction IR does use sticking coefficients

8.46. SKIUQ
SKIUQ SKIUQ SKIUQ SKIUQ SKIUQ SKIUQ SKIUQ
**********************************************
**************************
******

SUBROUTINE SKIUQ (ISKWRK, IQUSR)


Returns a set of flags indicating whether the reactions are
user-modify rate-of-progress reactions, and if so,
the user-modify type.

INPUT
ISKWRK(*) - Integer workspace array; dimension at least LENISK.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
168 of ANSYS, Inc. and its subsidiaries and affiliates.
SKKFRT

OUTPUT
IQUSR(*) - Integer array, user rate-modify flags for reactions;
dimension at least IISUR, the total surface reaction count.
IQUSR(IS)= 0 reaction IS is not a user rate-modify reaction
IQUSR(IS)= N reaction IS is a user rate-modify reaction,
with rate-modify type N

8.47. SKIYLD
SKIYLD SKIYLD SKIYLD SKIYLD SKIYLD SKIYLD SKIYLD
**********************************************
**************************
******

SUBROUTINE SKIYLD (IR, ISKWRK, RSKWRK, IYLD, IYION, KYLD, PYLD)


Returns an integer flag to indicate whether reaction IR has yield-
modified species, the species index of its ion, yield-modify flags
for its reactants and products, and parameters for the yield
expression.

INPUT
IR - Integer scalar, surface reaction index.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
IYLD - Integer scalar, flag for yield-modify reactions;
1, reaction IR uses yield-modification
0, no
IYION - Integer scalar, species index of the ion in a yield-
modify reaction.
KYLD(*) - Integer array, yield flags for the species in a yield-
modify reaction;
dimension at least MAXSPR, the maximum number of species
allowed in a surface reaction.
1, species is yield-modified
0, no
PYLD(*) - Real array, parameters for the yield-expression in
a yield-modify reaction;
dimension at least NYPAR, the number of parameters
required.
If IYLD=1, and KYLD of the Nth species in the reaction
is 1, the stoichiometric coefficient NU of the species is
scaled by the results of the expression
PYLD(1) * [Ei**PYLD(3) - PYLD(2)**PYLD(3)] **PYLD(4)
where Ei is the ion energy of species IYION.

8.48. SKKFRT
SKKFRT SKKFRT SKKFRT SKKFRT SKKFRT SKKFRT SKKFRT
**********************************************
**************************
******

SUBROUTINE SKKFRT (P, T, ISKWRK, RSKWRK, RKFT, RKRT)


Returns the temperature-dependent forward and reverse reaction
rate coefficients for reactions given pressure and temperature.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ISKWRK(*) - Integer workspace array; dimension at least LENISK.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 169
Alphabetical Listing of the Surface Kinetics Subroutine Library

RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
RKFT(*) - Real array, forward reaction rates for reactions;
dimension at least IISUR, the total reaction count.
cgs units, depends on the reaction
RKRT(*) - Real array, reverse reaction rates for reactions;
dimension at least IISUR, the total reaction count.
cgs units, depends on the reaction

8.49. SKKION
SKKION SKKION SKKION SKKION SKKION SKKION SKKION
**********************************************
**************************
******

SUBROUTINE SKKION (ISKWRK, KEL, KKION, KION)


Returns the species number of the electron, the number of positive
ions in the gas phase, and an array of species number for each
positive ion

INPUT
ISKWRK(*) - Integer workspace array; dimension at least LENISK.

OUTPUT
KEL - Integer scalar, species index of the electron species.
KKION - Integer scalar, total gas-phase positive ion count.
KION - Integer array, species indices for the gas-phase positive
ions;
dimension at least NKKGAS, the gas-phase species count.

8.50. SKKTFL
SKKTFL SKKTFL SKKTFL SKKTFL SKKTFL SKKTFL SKKTFL
**********************************************
**************************
******

SUBROUTINE SKKTFL (ISKWRK, KTFL)

Allows the user to assign a location in the temperature array


to use for the gas-phase species.

INPUT
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
KTFL(*) - Integer array, ndices into the temperature(s) for
gas-phase species;
dimension at least KKGAS, the total gas-phase species
count.
Default value stored in ISKWRK is set to 1 in SKINIT.

8.51. SKKTMP
SKKTMP SKKTMP SKKTMP SKKTMP SKKTMP SKKTMP SKKTMP
**********************************************
**************************
******

SUBROUTINE SKKTMP (ISKWRK, KTFL)


Returns the temperature array indices for the
gas-phase species.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
170 of ANSYS, Inc. and its subsidiaries and affiliates.
SKLEN2

INPUT
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
KTFL(*) - Integer array, indices into the temperature(s) for
gas-phase species;
dimension at least KKGAS, the total gas-phase species
count.
Default value stored in ISKWRK is set to 1 in SKINIT.

8.52. SKKUW
SKKUW SKKUW SKKUW SKKUW SKKUW SKKUW SKKUW
**********************************************
**************************
******

SUBROUTINE SKKUW (ISKWRK, KWUSR)


Returns a set of flags indicating whether the species are
user-modify rate-of-production species, and if so,
the user-modify type.

INPUT
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
OUTPUT
KWUSR(*) - Integer array, user rate-modify flags for species;
dimension at least KKTOT, the total species count.
KWUSR(K)= 0 species K is not a user rate-modify species
KWUSR(K)= N species is a user rate-modify species,
with rate-modify type N

8.53. SKLEN
SKLEN SKLEN SKLEN SKLEN SKLEN SKLEN SKLEN
**********************************************
**************************
******

SUBROUTINE SKLEN (LINSK, LOUT, LENI, LENR, LENC, IFLAG)


Reads the first record of the linkfile to return the lengths
required for the integer, real, and character work arrays.

INPUT
LINSK - Integer scalar, input unit number assigned to linkfile.
LOUT - Integer scalar, formatted output unit file number.

OUTPUT
LENI - Integer scalar, dimension required for integer work
array, ISKWRK.
LENR - Integer scalar, dimension required for real work
array, RSKWRK.
LENC - Integer scalar, dimension required for character work
array, CSKWRK.

8.54. SKLEN2
SKLEN2 SKLEN2 SKLEN2 SKLEN2 SKLEN2 SKLEN2 SKLEN2
**********************************************
**************************
******

SUBROUTINE SKLEN2 (LINSK, LOUT, LENI, LENR, LENC,


NELEM, NKKGAS, NKKSUR, NKKBLK, NKKTOT, NPHASE,
NNSUR, NNBLK, NIISUR, NIICON, MORE, IFLAG)
Reads the first record of the linkfile to return the lengths

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 171
Alphabetical Listing of the Surface Kinetics Subroutine Library

required for the integer, real, and character work arrays,


as well as other size information needed for memory allocation.
The routine also advances to the end of the first material.

INPUT
LINSK - Integer scalar, input unit number assigned to linkfile.
LOUT - Integer scalar, formatted output unit file number.

OUTPUT
LENI - Integer scalar, dimension required for integer work
array, ISKWRK.
LENR - Integer scalar, dimension required for real work
array, RSKWRK.
LENC - Integer scalar, dimension required for character work
array, CSKWRK.
NELEM - Integer scalar, number of elements
NKKGAS - Integer scalar, number of gas-phase species
NKKSUR - Integer scalar, number of surface site species
NKKBLK - Integer scalar, number of bulk species
NKKTOT - Integer scalar, total number of species
NPHASE - Integer scalar, total number of phases
NNSUR - Integer scalar, number of surface phases
NNBLK - Integer scalar, number of bulk phases
NIISUR - Number of surface reactions
NIICON - Number of reactions for which sites are not conserved.
MORE - Integer scalar, flag if > 0 indicates another material
follows this one in the linking file.
IFLAG - Integer scalar, flag if > 0 indicates an error occurred
during reading of the linking file.

8.55. SKMXTP
SKMXTP SKMXTP SKMXTP SKMXTP SKMXTP SKMXTP SKMXTP
**********************************************
**************************
******

SUBROUTINE SKMXTP (ISKWRK, MXTP)


Returns the maximum number of temperatures used in
fitting the thermodynamic properties of the species.

INPUT
ISKWRK(*) - Integer workspace array; dimension at least LENISK.

OUTPUT
MXTP - Integer scalar, maximum number of temperatures used in
fitting the thermodynamic properties of the species.

8.56. SKNCF
SKNCF SKNCF SKNCF SKNCF SKNCF SKNCF SKNCF
**********************************************
**************************
******

SUBROUTINE SKNCF (NELDIM, ISKWRK, NEL)


Returns the elemental composition of the species.

INPUT
NELDIM - Integer scalar, first dimension of the matrix NEL;
must be at least NELEM, the total element count.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.

OUTPUT
NEL(*,*) - Integer matrix, elemental compositions of the species;
dimension at least NELEM for the first, the total

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
172 of ANSYS, Inc. and its subsidiaries and affiliates.
SKNUF

element count, and at least KKTOT for the second, the


total species count.
NEL(M,K) is the quantity of element M in species K.

8.57. SKNCON
SKNCON SKNCON SKNCON SKNCON SKNCON SKNCON SKNCON
**********************************************
**************************
******

SUBROUTINE SKNCON (ISKWRK, RSKWRK, NCON)


Returns the total number of surface reactions which do not conserve
sites of the phases.

INPUT
ISKWRK(*) - Integer workspace array; dimension at least LENISK.

OUTPUT
NCON(*) - Integer array, count of surface reactions which do not
conserve sites in the phases;
dimension at least NPHASE, the total phase count.

8.58. SKNU
SKNU SKNU SKNU SKNU SKNU SKNU SKNU
**********************************************
**************************
******

SUBROUTINE SKNU (IDIM, ISKWRK, RSKWRK, KSTOIC, NSTOIC)


Returns the stoichiometric coefficients of the species and the net
change in phases for all of the surface reactions in a mechanism.

INPUT
IDIM - Integer scalar, first dimension of the array NSTOIC;
must be at least IISUR, the total surface reaction count.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
KSTOIC(*,*)-Integer matrix, stoichiometric coefficients for the
species in the surface reactions;
the first dimension must be at least IISUR, the total
surface reaction count, and at least KKTOT for the
second, the total species count.
NSTOIC(*,*)-Integer matrix, net change of the phases for the surface
reactions;
the first dimension must be at least IISUR, the total
surface reaction count, and at least NPHASE for the
second the total phase count.

8.59. SKNUF
SKNUF SKNUF SKNUF SKNUF SKNUF SKNUF SKNUF
**********************************************
**************************
******

SUBROUTINE SKNUF (IDIM, ISKWRK, KSTOIF)


Returns the stoichiometric coefficients of the species
for all reactants in all surface reactions in a mechanism.
(note - reactants only! - they will all be negative)

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 173
Alphabetical Listing of the Surface Kinetics Subroutine Library

INPUT
IDIM - Integer scalar, first dimension of the array NSTOIC;
must be at least ISUR, the total surface reaction count.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.

OUTPUT
KSTOIF(*,*)-Integer matrix, stoichiometric coefficients for the
reactants in the surface reactions;
dimension at least IISUR for the first, the total surface
reaction ount, and at least KKTOT for the second, the
total species count.

8.60. SKPCMP
SKPCMP SKPCMP SKPCMP SKPCMP SKPCMP SKPCMP SKPCMP
**********************************************
**************************
******

SUBROUTINE SKPCMP (ISTR, IRAY, NN, SETS, NSETS, ISET, IND, NT)
This subroutine can do everything that the subroutine SKCOMP can do,
and additionally, has the capabilities of separating the elements of
IRAY into categories and then search IRAY by element and category.
The categories that each element of IRAY will be assigned to are
specified by the input character string vector SETS of vector length
NSETS. Elements of each category in IRAY must be grouped congrously.
The number of elements in each category within IRAY is specified by
the input integer vector ISET. To search for the existence of an
element within acategory ISTR may additionally be composed of two
substrings, ISTR="ELEMENT_NAME/CATEGORY_NAME/", where CATEGORY_NAME
is one of the categories specified in SETS. In this case, IND will
return the first position in IRAY where ELEMENT_NAME occurred within
the category CATEGORY_NAME. NT will return the total number of
times ELEMENT_NAME occurred within the category CATEGORY_NAME.
If ELEMENT_NAME is not found within the specified category, IND and
NT are returned with a value of zero. If no category is specified
within ISTR, IND and NT return with the same values as they would
from subroutine SKCOMP.

Consider the following example,


IRAY = {"RED", "BLUE", "JADE", "RUBY", "TOPAZ", "JADE"}
NN = 6
SETS = {"COLORS", "STONES"},
NSETS = 2
ISET = {4, 2}.
This assumes that the elements of IRAY were grouped into two
sets, consisting of 4 and 2 elements, respectively, and the
following names
"COLORS" = {"RED", "BLUE", "JADE", "RUBY"}, and
"STONES" = {"TOPAZ", "JADE"}.

If ISTR="BLUE" then IND=2 and NT=1;


if ISTR="PINK" then IND=0 and NT=0; and
if ISTR="JADE",then IND=3 and NT=2.

If ISTR="BLUE/COLORS/" then IND=2 and NT=1;


if ISTR="BLUE/STONES/" then IND=0 and NT=0;
if ISTR="JADE/GEMS/" then IND=0 and NT=0; and
if ISTR="JADE/STONES/",then IND=6 and NT=1.

INPUT
ISTR - Character string, which may or may not end with a
slash-delimited substring.
IRAY(*) - Character string array;
dimension at least NN.
NN - Integer scalar, number of entries in IRAY(*).
SETS(*) - Character string array, cross-reference set to relate
with elements of IRAY;

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
174 of ANSYS, Inc. and its subsidiaries and affiliates.
SKPNT

dimension at least NSETS.


NSETS - Integer scalar, number of entries in SETS(*)
ISET(*) - Integer array, total number of entries in a subset of
IRAY; dimension at least NSETS.

OUTPUT
IND - Integer scalar, index of ISTR in IRAY(*).
If ISTR is not in IRAY(*), IND = 0.
If the slash-delimited substring of ISTR is not
in SETS(*), IND = 0.
If the slash-delimited substring of ISTR is in
SETS(N), but the substring before the slash is
not a member of the subset associated with SETS(N),
IND = 0, whether or not the substring is in IRAY(*).
NT - Integer scalar, total occurrence of ISTR in IRAY(*),
or total number of times ISTR occurs in a subset
of IRAY(*).

8.61. SKPKK
SKPKK SKPKK SKPKK SKPKK SKPKK SKPKK SKPKK
**********************************************
**************************
******

SUBROUTINE SKPKK (ISKWRK, KKPHAS, KFIRST, KLAST)


Returns arrays of species pointers for the phases.

INPUT
ISKWRK(*) - Integer workspace array; dimension at least LENISK.

OUTPUT
KKPHAS(*) - Integer array, the total species counts for phases;
dimension at least NPHASE, the total phase count.
KFIRST(*) - Integer array, species indices for the first species of
the phases;
dimension at least NPHASE, the total phase count.
KLAST(*) - Integer array, species indices for the last species of
the phases;
dimension at least NPHASE, the total phase count.

8.62. SKPNDX
SKPNDX SKPNDX SKPNDX SKPNDX SKPNDX SKPNDX SKPNDX
**********************************************
**************************
******

SUBROUTINE SKPNDX (ISKWRK, KELECT, KKION)


Returns plasma indices for the particular reaction mechanism.

INPUT
ISKWRK(*) - Integer workspace array; dimension at least LENISK.

OUTPUT
KELECT - Integer scalar, species array index for the electron.
KKION - Integer scalar, total ion count.

8.63. SKPNT
SKPNT SKPNT SKPNT SKPNT SKPNT SKPNT SKPNT
**********************************************
**************************

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 175
Alphabetical Listing of the Surface Kinetics Subroutine Library

******

SUBROUTINE SKPNT (LSAVE, LOUT, VERS, PREC, LENI, LENR, LENC, IERR)
Reads from a file information about a Surface Chemkin linkfile,
pointers for the Surface Chemkin Library, and returns lengths
of work arrays.

INPUT
LSAVE - Integer scalar, input unit for binary data file.
LOUT - Integer scalar, formatted output file unit number.

OUTPUT
VERS - Real scalar, version number of the Surface Chemkin
linkfile.
PREC - Character string, machine precision of the linkfile.
LENI - Integer scalar, length required for integer work array.
LENR - Integer scalar, length required for real work array.
LENC - Integer scalar, length required for character work array.
KERR - Logical, error flag.

8.64. SKRAEX
SKRAEX SKRAEX SKRAEX SKRAEX SKRAEX SKRAEX SKRAEX
**********************************************
**************************
******

SUBROUTINE SKRAEX (IR, ISKWRK, RSKWRK, RA)

Returns the Pre-exponential rate constant


(or sticking coefficient) of the IRth reaction, or changes its
value, depending on the sign of IR.

INPUT
IR - Integer scalar, reaction index;
IR> 0 gets RA(I) from RSKWRK
IR< 0 puts RA(I) into RSKWRK
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

If IR< 0:
RA - Real scalar, pre-exponential or sticking coefficient for
reaction IR.
cgs units, mole-cm-sec-K for pre-exponential,
none for sticking coefficients

OUTPUT
If IR> 0:
RA - Real scalar, pre-exponential or sticking coefficient for
reaction IR.
cgs units, mole-cm-sec-K for pre-exponential,
none for sticking coefficients

8.65. SKRATI
SKRATI SKRATI SKRATI SKRATI SKRATI SKRATI SKRATI
**********************************************
**************************
******

SUBROUTINE SKRATI (IR, ROP, ISKWRK, RSKWRK, SDOTI, SITDTI)


Returns rates of production of the species by surface reaction IR.

INPUT
IR - Integer scalar, reaction index;
ROP(*) - Real array, rates of progress for the surface reactions;

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
176 of ANSYS, Inc. and its subsidiaries and affiliates.
SKRATK

dimension at least IISUR, the total surface reaction


count.
cgs units, moles/(cm**2*sec).
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
SDOTI(*) - Real array, production rates of the species by reaction
IR;
dimension at least KKTOT, the total species count.
cgs units, moles/(cm**2*sec)
for 1,KKGAS, the production rate of gas-phase species,
for KKGAS+1,KKGAS+KKSUR, the production rate of surface
species,
for KKGAS+KKSUR+1,KKTOT, the production rate of bulk
species.
ITDTI(*) - Real array, production rates of the surface phases due to
reaction IR;
dimension at least NPHASE, the total phase count, but
subroutine calculates entries only for site phases.
cgs units, moles/(cm**2*sec)

8.66. SKRATK
SKRATK SKRATK SKRATK SKRATK SKRATK SKRATK SKRATK
**********************************************
**************************
******

SUBROUTINE SKRATK (P, T, ACT, SDEN, RKFT, RKRT, ISKWRK, RSKWRK,


SDOT, SITDOT)
Returns production rates for the species and sites, using the
pre-calculated temperature-dependent rate coefficients RKFT, RKRT.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ACT(*) - Real array, activities of the species;
dimension at least KKTOT, the total species count.
The first KKGAS activities are mole fractions,
the next KKSURF activities are site fractions
(species density normalized by the site density;
surface concentration in moles/cm**2 is
ACT(K)*SITE_DENSITY / # sites per species), and
the next KKBULK activities for bulk phase species
should be from 0 to 1, and should sum to 1 for each
phase.
SDEN(*) - Real array, site densities for the site types;
dimension at least NPHASE, the total phase count,
but the subroutine only uses site phase entries,
NFSURF <= N <= NLSURF.
cgs units, moles/cm**2.
RKFT(*) - Real array, forward reaction rates for reactions;
dimension at least IISUR, the total reaction count.
cgs units, depends on the reaction
RKRT(*) - Real array, reverse reaction rates for reactions;
dimension at least IISUR, the total reaction count.
cgs units, depends on the reaction
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
SDOT(*) - Real array, production rates of the species;
dimension at least KKTOT, the total species count.
cgs units, moles/(cm**2*sec)

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 177
Alphabetical Listing of the Surface Kinetics Subroutine Library

for 1,KKGAS, the production rate of gas-phase species,


for KKGAS+1,KKGAS+KKSUR, the production rate of surface
species,
for KKGAS+KKSUR+1,KKTOT, the production rate of bulk
species.
SITDOT(*) - Real array, production rates of the surface phases;
dimension at least NPHASE, the total phase count, but
subroutine only calculates entries for site phases.
cgs units, moles/(cm**2*sec)

8.67. SKRAT
SKRAT SKRAT SKRAT SKRAT SKRAT SKRAT SKRAT
**********************************************
**************************
******

SUBROUTINE SKRAT (P, T, ACT, SDEN, ISKWRK, RSKWRK, SDOT, SITDOT)


Returns production rates for the species and sites.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ACT(*) - Real array, activities of the species;
dimension at least KKTOT, the total species count.
The first KKGAS activities are mole fractions,
the next KKSURF activities are site fractions
(species density normalized by the site density;
surface concentration in moles/cm**2 is
ACT(K)*SITE_DENSITY / # sites per species), and
the next KKBULK activities for bulk phase species
should be from 0 to 1, and should sum to 1 for each
phase.
SDEN(*) - Real array, site densities for the site types;
dimension at least NPHASE, the total phase count,
but the subroutine only uses site phase entries,
NFSURF <= N <= NLSURF.
cgs units, moles/cm**2.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
SDOT(*) - Real array, production rates of the species;
dimension at least KKTOT, the total species count.
cgs units, moles/(cm**2*sec)
for 1,KKGAS, the production rate of gas-phase species,
for KKGAS+1,KKGAS+KKSUR, the production rate of surface
species,
for KKGAS+KKSUR+1,KKTOT, the production rate of bulk
species.
SITDOT(*) - Real array, production rates of the surface phases;
dimension at least NPHASE, the total phase count, but
subroutine only calculates entries for site phases.
cgs units, moles/(cm**2*sec)

8.68. SKRDEX
SKRDEX SKRDEX SKRDEX SKRDEX SKRDEX SKRDEX SKRDEX
**********************************************
**************************
******

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
178 of ANSYS, Inc. and its subsidiaries and affiliates.
SKREEX

SUBROUTINE SKRDEX (IR, ISKWRK, RSKWRK, RD)

Returns the perturbation factor of the IRth reaction,


or changes its value, depending on the sign of IR.

INPUT
IR - Integer scalar, reaction index;
IR> 0 gets RD(I) from RSKWRK
IR< 0 puts RD(I) into RSKWRK
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

If IR< 0:
RD - Real scalar, perturbation factor for reaction IR.

OUTPUT
If IR> 0:
RD - Real scalar, perturbation factor for reaction IR.

8.69. SKREADF
SKREADF SKREADF SKREADF SKREADF SKREADF SKREADF SKREADF
**********************************************
**************************
******

SUBROUTINE SKREADF (LOUT, LFORM, KERR)


Reads from a formatted file the pointer integers for the
surface CHEMKIN work arrays (See SKSAVEF)

INPUT
LOUT - Integer scalar, formatted output file unit number.
for diagnostic printing
LFORM - Integer scalar, formatted output file unit number
for reading the pointer integers from a file
OUTPUT
KERR - Logical flag indicating whether an error was
encountered while writing to the file

8.70. SKREEX

SKREEX SKREEX SKREEX SKREEX SKREEX SKREEX SKREEX


**********************************************
**************************
******

SUBROUTINE SKREEX (IR, ISKWRK, RSKWRK, RE)

Returns the activation energy


of the IRth reaction, or changes its
value, depending on the sign of IR.

INPUT
IR - Integer scalar, reaction index;
IR> 0 gets RE(I) from RSKWRK
IR< 0 puts RE(I) into RSKWRK
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

If IR< 0:
RE - Real scalar, activation energy for
reaction IR.
cgs units, K

OUTPUT

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 179
Alphabetical Listing of the Surface Kinetics Subroutine Library

If IR> 0:
RE - Real scalar, activation energy for
reaction IR.
cgs units, K

8.71. SKREWR
SKREWR SKREWR SKREWR SKREWR SKREWR SKREWR SKREWR
**********************************************
**************************
******

SUBROUTINE SKREWR (LINSK, LOUT, ISKWRK, RSKWRK, CSKWRK, IFLAG)


Rewrites a new linkfile from the data stored in ISKWRK,
RSKWRK and CSKWRK.

INPUT
LINSK - Integer scalar, linkfile output file unit number.
LOUT - Integer scalar, formatted output file unit number.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.
CSKWRK(*) - Character string workspace array; dimension at least
LENCSK.
OUTPUT
IFLAG - Integer scalar to indicate successful writing of
linkfile; IFLAG>0 is an error type.

8.72. SKRHEX
SKRHEX SKRHEX SKRHEX SKRHEX SKRHEX SKRHEX SKRHEX
**********************************************
**************************
******

SUBROUTINE SKRHEX (K, ISKWRK, RSKWRK, A6)

Returns an array of the sixth thermodynamic polynomial


coefficients for a species, or changes their value,
depending on the sign of K.

INPUT
K - Integer scalar, species index;
K > 0 gets A6(*) from RSKWRK
K < 0 puts A6(*) into RSKWRK
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

If K < 0:
A6(*) - Integer array, the 6th thermodynamic polynomial
coefficients for species K, over the number of
temperature ranges used in fitting thermodynamic
properties;
dimension at least MAXTP-1, where MAXTP is the
maximum number of temperatures used in fitting the
thermodynamic properties of the species.

OUTPUT
If K > 0:
A6(*) - Integer array, the 6th thermodynamic polynomial
coefficients for species K, over the number of
temperature ranges used in fitting thermodynamic
properties;
dimension at least MAXTP-1, where MAXTP is the
maximum number of temperatures used in fitting the
thermodynamic properties of the species.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
180 of ANSYS, Inc. and its subsidiaries and affiliates.
SKRPAR

8.73. SKROP
SKROP SKROP SKROP SKROP SKROP SKROP SKROP
**********************************************
**************************
******

SUBROUTINE SKROP (P, T, ACT, SDEN, ISKWRK, RSKWRK, ROP)


Returns rates of progress for the surface reactions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ACT(*) - Real array, activities of the species;
dimension at least KKTOT, the total species count.
The first KKGAS activities are mole fractions,
the next KKSURF activities are site fractions
(species density normalized by the site density;
surface concentration in moles/cm**2 is
ACT(K)*SITE_DENSITY / # sites per species), and
the next KKBULK activities for bulk phase species
should be from 0 to 1, and should sum to 1 for each
phase.
SDEN(*) - Real array, site densities for the site types;
dimension at least NPHASE, the total phase count,
but the subroutine only uses site phase entries,
NFSURF <= N <= NLSURF.
cgs units, moles/cm**2.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
ROP(*) - Real array, rates of progress for the surface reactions;
dimension at least IISUR, the total surface reaction
count.
cgs units, moles/(cm**2*sec).

8.74. SKRPAR
SKRPAR SKRPAR SKRPAR SKRPAR SKRPAR SKRPAR SKRPAR
**********************************************
**************************
******

SUBROUTINE SKRPAR (ISKWRK, RSKWRK, ENRGI)

Allows the user to input auxiliary reaction-rate parameters for


special types of reactions. The first parameter is the species (ion)
directed energy for ion-energy-dependent reactions.

INPUT
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.
ENRGI(*) - Real array, species ion energies used in the NIIEDP
reactions;
dimension at least KKGAS, the total gas-phase species
count.
Default value stored in RSKWRK is set to 0.0 in SKINIT.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 181
Alphabetical Listing of the Surface Kinetics Subroutine Library

8.75. SKRP
SKRP SKRP SKRP SKRP SKRP SKRP SKRP
**********************************************
**************************
******

SUBROUTINE SKRP (ISKWRK, RSKWRK, RU, RUC, PATM)


Returns universal gas constants and the pressure of one standard
atmosphere.

INPUT
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
RU - Real scalar, universal gas constant.
cgs units, 8.314510E7 ergs/(mole*K)
RUC - Real scalar, universal gas constant used only in
conjuction with activation energy.
preferred units, RU / 4.184 cal/(mole*K)
PA - Real scalar, pressure of one standard atmosphere.
cgs units, 1.01325E6 dynes/cm**2

8.76. SKSAVE
SKSAVE SKSAVE SKSAVE SKSAVE SKSAVE SKSAVE SKSAVE
**********************************************
**************************
******

SUBROUTINE SKSAVE (LOUT, LSAVE, ISKWRK, RSKWRK, CSKWRK)


Writes to a binary file information about a Surface Chemkin
linkfile, pointers for the Surface Chemkin Library, and
Surface Chemkin work arrays.

INPUT
LOUT - Integer scalar, formatted output file unit number.
LSAVE - Integer scalar, unformatted output file unit number.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.
CSKWRK(*) - Character string workspace array; dimension at least
LENCSK.

8.77. SKSAVEF
SKSAVEF SKSAVEF SKSAVEF SKSAVEF SKSAVEF SKSAVEF SKSAVEF
**********************************************
**************************
******

SUBROUTINE SKSAVEF (LOUT, LFORM, KERR)


Writes to a formatted file the pointer integers for the
surface CHEMKIN work arrays (See SKREADF)

INPUT
LOUT - Integer scalar, formatted output file unit number.
for diagnostic printing
LFORM - Integer scalar, formatted output file unit number
for printing the pointer integers to a file
OUTPUT
KERR - Logical flag indicating whether an error was
encountered while writing to the file

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
182 of ANSYS, Inc. and its subsidiaries and affiliates.
SKSMS

8.78. SKSDEN
SKSDEN SKSDEN SKSDEN SKSDEN SKSDEN SKSDEN SKSDEN
**********************************************
**************************
******

SUBROUTINE SKSDEN (ISKWRK, RSKWRK, SDEN0)


Returns a real array of standard-state phase densities as given
on input to the interpreter.

INPUT
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
SDEN0(*) - Real array; standard-state densities for the
site types, AS READ BY THE INTERPRETER;
dimension at least NPHASE, the total phase count,
but the subroutine only uses site phase entries,
NFSURF <= N <= NLSURF.
cgs units, moles/cm**2.

8.79. SKSML
SKSML SKSML SKSML SKSML SKSML SKSML SKSML
**********************************************
**************************
******

SUBROUTINE SKSML (T, ISKWRK, RSKWRK, SML)


Returns an array of the standard state entropies in molar units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
SML(*) - Real array, standard state entropies for the species;
dimension at least KKTOT, the total species count.
cgs units, ergs/(mole*K)

8.80. SKSMS
SKSMS SKSMS SKSMS SKSMS SKSMS SKSMS SKSMS
**********************************************
**************************
******

SUBROUTINE SKSMS (T, ISKWRK, RSKWRK, SMS)


Returns an array of the standard state entropies in mass units.

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
SMS(*) - Real array, standard state entropies for the species;

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 183
Alphabetical Listing of the Surface Kinetics Subroutine Library

dimension at least KKTOT, the total species count.


cgs units, ergs/(gm*K)

8.81. SKSNUM
SKSNUM SKSNUM SKSNUM SKSNUM SKSNUM SKSNUM SKSNUM
**********************************************
**************************
******

SUBROUTINE SKSNUM (LINE, NEXP, LOUT, KNAM, KKTOT, PNAM, NNPHAS,


KKPHAS, KNUM, NT, NVAL, RVAL, KERR)
This subroutine is used to read a format-free input line of
combined alphanumerical data. It can be used to parse an input
character string, LINE, which may be composed of several blank-
delimited substrings. This subroutine assumes that the first
substring in LINE is the name of a species in the Surface Chemkin
mechanism. If the species name is not unique within the Surface
Chemkin mechanism, the phase of the species should be input
immediately after the species name, delimited by slashes.
Upon return from the subroutine, KNUM returns the index position
of the species within the Surface Chemkin linkfile. If the
species name is not unique, KNUM returns the first position and
NT returns the number of the times the species occurs within the
linkfile. If the species name is not found, or there is a
syntax error, on return, KNUM=0, NT=0, and KERR=.TRUE.
The substrings in LINE following the first are expected to
represent numbers. They are converted into floating point
values and stored in the output vector, RVAL(*). Upon input,
NEXP is equal to the number of values expected to be found.
If NEXP numbers are not found, KERR will be set to .TRUE. on
return from the subroutine.

Example input:
LINE = GA(S)/BULK1/ 1.2
NEXP = 1, the number of values expected
LOUT = 6, a logical unit number on which to write
diagnostic messages
KNAM(*) = Array of character species names
KKTOT = Total number of species
PNAM(*) = Array of character phase names
NNPHAS = Total number of phases
KKPHAS(*)= Index array of the number of species in the
phases
Output:
KNUM = The index number of the species which
has the name "GA(S)" and resides in phase
"BULK1"
NT = 1, if there is only one species GA(S)
in phase BULK1
NVAL = 1, the number of values found in LINE
following the species name
RVAL(1) = 1.200E+00, the substring converted to a
real number

KERR = .FALSE.

INPUT
LINE - Character string; length depends on calling routine.

NEXP - Integer scalar, number of values to be found in LINE.


If NEXP < 0, then IABS(NEXP) values are expected, but
it is not an error condition if less values are found.
LOUT - Integer scalar, formatted output file unit number.
KNAM(*) - Character string array, species names;
dimension at least KKTOT, the total species count.
KKTOT - Integer scalar, the total species count.
PNAM(*) - Character string array, phase names;
dimension at least NNPHAS, the total phase count.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
184 of ANSYS, Inc. and its subsidiaries and affiliates.
SKSYME

NNPHAS - Integer scalar, the total phase count.


KKPHAS(*) - Integer array, total species counts for the phases;
dimension at least NNPHAS, the total phase count.

OUTPUT
KNUM - Integer scalar, species index if the species name appears
in LINE.
NT - Integer scalar, number of times the species name occurs
in the linkfile.

NVAL - Integer scalar, number of value character strings found

in LINE.
RVAL(*) - Real array, real values for their character strings in
LINE;
dimension at least NEXP, the number of values expected.
KERR - Logical, syntax or dimensioning error flag;

8.82. SKSOR
SKSOR SKSOR SKSOR SKSOR SKSOR SKSOR SKSOR
**********************************************
**************************
******

SUBROUTINE SKSOR (T, ISKWRK, RSKWRK, SOR)


Returns an array of the nondimensional entropies.

INPUT

T(*) - Real array, temperature(s); dimension is determined by


the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
SOR(*) - Real array, nondimensional entropies for the species;
dimension at least KKTOT, the total species count.

8.83. SKSYME
SKSYME SKSYME SKSYME SKSYME SKSYME SKSYME SKSYME
**********************************************
**************************
******

SUBROUTINE SKSYME (ISKWRK, CSKWRK, LOUT, ENAM, KERR)


Returns a character string array of element names.

INPUT
CSKWRK(*) - Character string workspace array; dimension at least
LENCSK.
LOUT - Integer scalar, formatted output file unit number.

OUTPUT
ENAM(*) - Character string array, element names;
dimension at least NELEM, the total element count.
KERR - Logical, character length error flag.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 185
Alphabetical Listing of the Surface Kinetics Subroutine Library

8.84. SKSYMM
SKSYMM SKSYMM SKSYMM SKSYMM SKSYMM SKSYMM SKSYMM
**********************************************
**************************
******

SUBROUTINE SKSYMM (ISKWRK, CSKWRK, LOUT, MATNAM, KERR)


Returns the character string name of a material.

INPUT
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
CSKWRK(*) - Character string workspace array; dimension at least
LENCSK.
LOUT - Integer scalar, formatted output file unit number.

OUTPUT
MATNAM - Character string, material name.
KERR - Logical, character length error flag.

8.85. SKSYMP
SKSYMP SKSYMP SKSYMP SKSYMP SKSYMP SKSYMP SKSYMP
**********************************************
**************************
******

SUBROUTINE SKSYMP (ISKWRK, CSKWRK, LOUT, PNAM, KERR)


Returns a character string array of phase names.

INPUT
CSKWRK(*) - Character string workspace array; dimension at least
LENCSK.
LOUT - Integer scalar, formatted output file unit number.

OUTPUT
PNAM(*) - Character string array, phase names;
dimension at least NNPHAS, the total phase count.
KERR - Logical, character length error flag.

8.86. SKSYMR
SKSYMR SKSYMR SKSYMR SKSYMR SKSYMR SKSYMR SKSYMR
**********************************************
**************************
******

SUBROUTINE SKSYMR (IR, LOUT, ISKWRK, RSKWRK, CSKWRK, LT, RNAM,


KERR)
Returns the character string representation of reaction IR.

INPUT
IR - Integer scalar, reaction index.
LOUT - Integer scalar, formatted output file unit number.
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.
CSKWRK(*) - Character string workspace array; dimension at least
LENCSK.

OUTPUT
LT - Integer scalar, nunber of non-blank characters in the
reaction string.
RNAM - Character string, representation of reaction.
KERR - Logical, character length error flag.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
186 of ANSYS, Inc. and its subsidiaries and affiliates.
SKUMS

8.87. SKSYMS

SKSYMS SKSYMS SKSYMS SKSYMS SKSYMS SKSYMS SKSYMS


**********************************************
**************************
******

SUBROUTINE SKSYMS (ISKWRK, CSKWRK, LOUT, KNAM, KERR)


Returns a character array of species names.

INPUT
CSKWRK(*) - Character string workspace array; dimension at least
LENCSK.
LOUT - Integer scalar, formatted output file unit number.

OUTPUT
KNAM(*) - Character string array, species names;
dimension at least KKTOT, the total species count.
KERR - Logical, character length error flag.

8.88. SKUML
SKUML SKUML SKUML SKUML SKUML SKUML SKUML
**********************************************
**************************
******

SUBROUTINE SKUML (T, ISKWRK, RSKWRK, UML)


Returns an array of the internal energies in molar units. Does not account for dependence on surface coverage (HFCOV

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
UML(*) - Real array, internal energies of the species;
dimension at least KKTOT, the total species count.
cgs units, ergs/mole

8.89. SKUMS
SKUMS SKUMS SKUMS SKUMS SKUMS SKUMS SKUMS
**********************************************
**************************
******

SUBROUTINE SKUMS (T, ISKWRK, RSKWRK, UMS)


Returns an array of the internal energies in mass units. Does not account for dependence on surface coverage (HFCOV)

INPUT
T(*) - Real array, temperature(s); dimension is determined by
the application program to be the total number of
species temperatures, nominally 1.
cgs units, K
ISKWRK(*) - Integer workspace array; dimension at least LENISK.
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
UMS(*) - Real array, internal energies of the species;

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 187
Alphabetical Listing of the Surface Kinetics Subroutine Library

dimension at least KKTOT, the total species count.


cgs units, ergs/gm

8.90. SKWT
SKWT SKWT SKWT SKWT SKWT SKWT SKWT
**********************************************
**************************
******

SUBROUTINE SKWT (ISKWRK, RSKWRK, WT)


Returns the molecular weights of the species.

INPUT
RSKWRK(*) - Real workspace array; dimension at least LENRSK.

OUTPUT
WT(*) - Real array, molecular masses for the species;
dimension at least KKTOT, the total species count.
cgs units, gm/mole

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
188 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 9: Alphabetical Listing of the Transport Subroutine Library
The following pages list detailed descriptions for the user interface to each of the package’s seventeen
user-callable subroutines. They are listed in alphabetical order.

9.1. MCACON
MCACON MCACON MCACON MCACON MCACON MCACON MCACON
**********************************************
**************************
******

SUBROUTINE MCACON (T, X, RMCWRK, CONMIX)


Returns the mixture thermal conductivity given temperature and
species mole fractions.

INPUT
T - Real scalar, temperature.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
RMCWRK(*) - Real workspace array; dimension at least LENRMC.

OUTPUT
CONMIX - Real scalar, mixture thermal conductivity.
cgs units, erg/cm*K*s

9.2. MCADIF
MCADIF MCADIF MCADIF MCADIF MCADIF MCADIF MCADIF
**********************************************
**************************
******

SUBROUTINE MCADIF (P, T, X, RMCWRK, D)


Returns mixture-averaged diffusion coefficients given pressure,
temperature, and species mole fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T - Real scalar, temperature.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
RMCWRK(*) - Real workspace array; dimension at least LENRMC.

OUTPUT
D(*) - Real array, mixture diffusion coefficients;
dimension at least KK, the total species count.
cgs units, cm**2/s

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 189
Alphabetical Listing of the Transport Subroutine Library

9.3. MCATDR
MCATDR MCATDR MCATDR MCATDR MCATDR MCATDR MCATDR
**********************************************
**************************
******

SUBROUTINE MCATDR (T, X, IMCWRK, RMCWRK, TDR)


This subroutine computes the thermal diffusion ratios for the light
species into the mixture.

INPUT
T - Real scalar, temperature.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
IMCWRK(*) - Integer workspace array; dimension at least LENIMC.
RMCWRK(*) - Real workspace array; dimension at least LENRMC.

OUTPUT
TDR(*) - Real array, thermal diffusion ratios for the species;
dimension at least KK, the total species count.
TDR(K) = 0 for any species with molecular weight less
than 5.

9.4. MCAVIS
MCAVIS MCAVIS MCAVIS MCAVIS MCAVIS MCAVIS MCAVIS
**********************************************
**************************
******

SUBROUTINE MCAVIS (T, X, RMCWRK, VISMIX)


Returns mixture viscosity, given temperature and species mole
fractions. It uses modification of the Wilke semi-empirical
formulas.

INPUT
T - Real scalar, temperature.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
RMCWRK(*) - Real workspace array; dimension at least LENRMC.

OUTPUT
VISMIX - Real scalar, mixture viscosity.
cgs units, gm/cm*s

9.5. MCCCEX
MCCCEX MCCCEX MCCCEX MCCCEX MCCCEX MCCCEX MCCCEX
**********************************************
**************************
******

SUBROUTINE MCCCEX (K, RMCWRK, COFCON)


Gets or puts values of the fitting coefficients for the
polynomial fits to species conductivity.

INPUT
K - Integer scalar, species index.
K > 0 gets coefficients from RMCWRK
K < 0 puts coefficients into RMCWRK
RMCWRK(*) - Real workspace array; dimension at least LENRMC.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
190 of ANSYS, Inc. and its subsidiaries and affiliates.
MCCVEX

If K < 1:
COFCON - Real vector of polynomial coefficients for
the species' conductivity; dimension at least NO,
usually 4.

OUTPUT
If K > 1:
COFCON - Real vector of polynomial coefficients for
the species' conductivity; dimension at least NO,
usually 4.

9.6. MCCDEX

MCCDEX MCCDEX MCCDEX MCCDEX MCCDEX MCCDEX MCCDEX


**********************************************

**************************
******

SUBROUTINE MCCDEX (K, KDIM, RMCWRK, COFDIF)


Gets or puts values of the fitting coefficients for the
polynomial fits to species binary diffusion coefficients.

INPUT
K - Integer scalar, species index.
K > 0 gets coefficients from RMCWRK
K < 0 puts coefficients into RMCWRK
KDIM - First dimension for COFDIF matrix;
KDIM should be at least KK, the total number of species
RMCWRK(*) - Real workspace array; dimension at least LENRMC.

If K < 1:
COFDIF - Real matrix of polynomial coefficients for
the species' binary diffusion coefficient with all
other species; the first dimension is KDIM,
which should be at least KK, the total number of species;
the second dimension should be at least NO, usually 4

OUTPUT
If K > 1:
COFDIF - Real matrix of polynomial coefficients for
the species' binary diffusion coefficient with all
other species; the first dimension is KDIM,
which should be at least KK, the total number of species;
the second dimension should be at least NO, usually 4

9.7. MCCVEX
MCCVEX MCCVEX MCCVEX MCCVEX MCCVEX MCCVEX MCCVEX
**********************************************
**************************
******

SUBROUTINE MCCVEX (K, RMCWRK, COFVIS)


Gets or puts values of the fitting coefficients for the
polynomial fits to species viscosity.

INPUT
K - Integer scalar, species index.
K > 0 gets coefficients from RMCWRK
K < 0 puts coefficients into RMCWRK
RMCWRK(*) - Real workspace array; dimension at least LENRMC.

If K < 1:
COFVIS - Real vector of polynomial coefficients for

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 191
Alphabetical Listing of the Transport Subroutine Library

the species' viscosity; dimension at least NO, usually 4

OUTPUT
If K > 1:
COFVIS - Real vector of polynomial coefficients; dimension
at least NO, usually 4

9.8. MCINIT
MCINIT MCINIT MCINIT MCINIT MCINIT MCINIT MCINIT
**********************************************
**************************
******

SUBROUTINE MCINIT (LINKMC, LOUT, LENIMC, LENRMC, IMCWRK, RMCWRK,


IFLAG)
This subroutine reads the transport linkfile from the fitting code
and creates the internal storage and work arrays, IMCWRK(*) and
RMCWRK(*). MCINIT must be called before any other transport
subroutine is called. It must be called after the CHEMKIN package
is initialized.

INPUT
LINKMC - Integer scalar, transport linkfile input unit number.
LOUT - Integer scalar, formatted output file unit number.
LENIMC - Integer scalar, minimum dimension of the integer
storage and workspace array IMCWRK(*);
LENIMC must be at least:
LENIMC = 4*KK + NLITE,
where KK is the total species count, and
NLITE is the number of species with molecular
weight less than 5.
LENRMC - Integer scalar, minimum dimension of the real storage
and workspace array RMCWRK(*);
LENRMC must be at least:
LENRMC = KK*(19 + 2*NO + NO*NLITE) + (NO+15)*KK**2,
where KK is the total species count,
NO is the order of the polynomial fits (NO=4),
NLITE is the number of species with molecular
weight less than 5.

OUTPUT
IMCWRK(*) - Integer workspace array; dimension at least LENIMC.
RMCWRK(*) - Real workspace array; dimension at least LENRMC.

9.9. MCLEN
MCLEN MCLEN MCLEN MCLEN MCLEN MCLEN MCLEN
**********************************************
**************************
******

SUBROUTINE MCLEN (LINKMC, LOUT, LI, LR, IFLAG)


Returns the lengths required for work arrays.

INPUT
LINKMC - Integer scalar, input file unit for the linkfile.
LOUT - Integer scalar, formatted output file unit.

OUTPUT
LI - Integer scalar, minimum length required for the
integer work array.
LR - Integer scalar, minimum length required for the
real work array.
IFLAG - Integer scalar, indicates successful reading of
linkfile; IFLAG>0 indicates error type.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
192 of ANSYS, Inc. and its subsidiaries and affiliates.
MCMDIF

9.10. MCMCDT
MCMCDT MCMCDT MCMCDT MCMCDT MCMCDT MCMCDT MCMCDT
**********************************************
**************************
******

SUBROUTINE MCMCDT (P, T, X, IMCWRK, RMCWRK, ICKWRK, CKWRK,


DT, COND)
Returns thermal diffusion coefficients, and mixture thermal
conductivities, given pressure, temperature, and mole fraction.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T - Real scalar, temperature.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.

IMCWRK(*) - Integer TRANSPORT workspace array;


dimension at least LENIMC.
RMCWRK(*) - Real TRANSPORT workspace array;
dimension at least LENRMC.
ICKWRK(*) - Integer CHEMKIN workspace array;
dimension at least LENICK.
RCKWRK(*) - Real CHEMKIN workspace array;
dimension at least LENRCK.

OUTPUT
DT(*) - Real array, thermal multicomponent diffusion
coefficients;
dimension at least KK, the total species count.
cgs units, gm/(cm*sec)
CGS UNITS - GM/(CM*SEC)
COND - Real scalar, mixture thermal conductivity.
cgs units, erg/(cm*K*s)

9.11. MCMDIF
MCMDIF MCMDIF MCMDIF MCMDIF MCMDIF MCMDIF MCMDIF
**********************************************
**************************
******

SUBROUTINE MCMDIF (P, T, X, KDIM, IMCWRK, RMCWRK, D)


Returns the ordinary multicomponent diffusion coefficients,
given pressure, temperature, and mole fractions.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T - Real scalar, temperature.
cgs units, K
X(*) - Real array, mole fractions of the mixture;
dimension at least KK, the total species count.
KDIM - Integer scalar, actual first dimension of D(KDIM,KK);
KDIM must be at least KK, the total species count.
IMCWRK(*) - Integer workspace array; dimension at least LENIMC.
RMCWRK(*) - Real workspace array; dimension at least LENRMC.

OUTPUT
D(*,*) - Real matrix, ordinary multicomponent diffusion
coefficients;
dimension at least KK, the total species count, for
both the first and second dimensions.
cgs units, cm**2/s

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 193
Alphabetical Listing of the Transport Subroutine Library

9.12. MCPNT
MCPNT MCPNT MCPNT MCPNT MCPNT MCPNT MCPNT
**********************************************
**************************
******

SUBROUTINE MCPNT (LSAVE, LOUT, NPOINT, V, P, LI, LR, IERR)


Reads from a binary file information about a Transport linkfile,
pointers for the Transport Library, and returns lengths of work
arrays.

INPUT
LSAVE - Integer scalar, input unit for binary data file.
LOUT - Integer scalar, formatted output file unit.

OUTPUT
NPOINT - Integer scalar, total number of pointers.
V - Real scalar, version number of the Transport linkfile.
P - Character string, machine precision of the linkfile.
LI - Integer scalar, minimum dimension required for integer
workspace array.
LR - Integer scalar, minimumm dimension required for real
workspace array.
IERR - Logical, error flag.

9.13. MCPRAM
MCPRAM MCPRAM MCPRAM MCPRAM MCPRAM MCPRAM MCPRAM
**********************************************
**************************
******

SUBROUTINE MCPRAM (IMCWRK, RMCWRK, EPS, SIG, DIP, POL, ZROT, NLIN)
Returns the arrays of molecular parameters as read from the
transport database.

INPUT
IMCWRK(*) - Integer workspace array; dimension at least LENIMC.
RMCWRK(*) - Real workspace array; dimension at least LENRMC.

OUTPUT
EPS(*) - Real array, Lennard-Jones Potential well depths for
the species;
dimension at least KK, the total species count.
cgs units, K
SIG(*) - Real array, Lennary-Jones collision diameters for
the species;
dimension at least KK, the total species count.
cgs units, Angstrom
DIP(*) - Real array, dipole moments for the species;
dimension at least KK, the total species count.
cgs units, Debye
POL(*) - Real array, polarizabilities for the species;
dimension at least KK, the total species count.
cgs units, Angstrom**3
ZROT(*) - Real array, rotational collision numbers evaluated at
298K for the species;
dimension at least KK, the total species count.
NLIN(*) - Integer array, flags for species linearity;
dimension at least KK, the total species count.
NLIN=0, single atom,
NLIN=1, linear molecule,
NLIN=2, linear molecule.

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
194 of ANSYS, Inc. and its subsidiaries and affiliates.
MCSDIF

9.14. MCREWR
MCREWR MCREWR MCREWR MCREWR MCREWR MCREWR MCREWR
**********************************************
**************************
******

SUBROUTINE MCREWR (LINKMC, LOUT, IMCWRK, RMCWRK, IFLAG)


This subroutine writes a new the transport linkfile from
the data stored in the integer and real work arrays,
IMCWRK(*) and RMCWRK(*).

INPUT
LINKMC - Integer scalar, transport linkfile output unit number.
LOUT - Integer scalar, formatted output file unit number.

OUTPUT
IMCWRK(*) - Integer workspace array; dimension at least LENIMC.
RMCWRK(*) - Real workspace array; dimension at least LENRMC.

9.15. MCSAVE
MCSAVE MCSAVE MCSAVE MCSAVE MCSAVE MCSAVE MCSAVE
**********************************************
**************************
******

SUBROUTINE MCSAVE (LOUT, LSAVE, IMCWRK, RMCWRK)


Writes to a binary file information about a Transport linkfile,
pointers for the Transport library, and Transport work arrays.

INPUT
LOUT - Integer scalar, formatted output file unit number.
LSAVE - Integer scalar, unformatted output file unit number.
IMCWRK(*) - Integer workspace array; dimension at least LENIMC.
RMCWRK(*) - Real workspace array; dimension at least LENRMC.

9.16. MCSCON
MCSCON MCSCON MCSCON MCSCON MCSCON MCSCON MCSCON
**********************************************
**************************
******

SUBROUTINE MCSCON (T, RMCWRK, CON)


Returns the array of pur species conductivities given temperature.

INPUT
T - Real scalar, temperature.
cgs units, K
RMCWRK(*) - Real workspace array; dimension at least LENRMC.

OUTPUT
CON(*) - Real array, species thermal conductivities;
dimension at least KK, the total species count.
cgs units, erg/cm*K*s

9.17. MCSDIF
MCSDIF MCSDIF MCSDIF MCSDIF MCSDIF MCSDIF MCSDIF
**********************************************
**************************

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 195
Alphabetical Listing of the Transport Subroutine Library

******

SUBROUTINE MCSDIF (P, T, KDIM, RMCWRK, DJK)


Returns the binary diffusion coefficients given pressure and
temperature.

INPUT
P - Real scalar, pressure.
cgs units, dynes/cm**2
T - Real scalar, temperature.
cgs units, K
KDIM - Integer scalar, actual first dimension of DJK(KDIM,KK).
RMCWRK(*) - Real workspace array; dimension at least LENRMC.

OUTPUT
DJK(*,*) - Real matrix, binary diffusion coefficients;
dimension at least KK, the total species count, for
both the first and second dimensions.
cgs units, cm**2/s
CJK(J,K) is the diffusion coefficient of species J
in species K.

9.18. MCSVIS
MCSVIS MCSVIS MCSVIS MCSVIS MCSVIS MCSVIS MCSVIS
**********************************************
**************************
******

SUBROUTINE MCSVIS (T, RMCWRK, VIS)


Returns the array of pure species viscosities, given temperature.

INPUT
T - Real scalar, temperature.
cgs units, K
RMCWRK(*) - Real workspace array; dimension at least LENRMC.

OUTPUT
VIS(*) - Real array, species viscosities;
dimension at least KK, the total species count.
cgs units, gm/cm*s

Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
196 of ANSYS, Inc. and its subsidiaries and affiliates.

You might also like