CHEMKIN基础培训资料
- 格式:ppt
- 大小:9.41 MB
- 文档页数:148
CHEMKIN入门指南《燃烧学》辅助教程上篇基础知识、核心程序、化学平衡(EQUIL)、全混反应(AURORA)如果文中有任何错误,请不吝指出,以便不断改进2004.3第一章CHEMKIN简介本章介绍CHEMKIN的主要功能和求解过程。
第一节安装CHEMKINChemkin最早的版本始于1980,由美国Sandia实验室的Kee RJ等人编写,经过多年的不断发展日趋完善。
后来由Reaction Design公司收购并继续开发,目前最新版为3.7.1。
由于学习和科研需要,我们花费2000$向ReactionDesign公司订购了一套最新版本的CHEMKIN 3.7.1,其中包括20个网络教学许可证,用于《燃烧学》课程的学习。
[安装] 请从ftp://combustion:combustion@166.111.56.202的“CHEMKIN软件”目录内下载安装程序chemkin371_pc_setup.exe,执行安装程序。
安装完后会自动在桌面及开始菜单建立快捷方式。
[运行许可证书] 教学用的CHEMKIN采用网络认证,故电脑必须联网(校内)。
当程序计算(Run)时,系统会提示选择license,选择“Specify license server”,然后next,在下一画面填入“166.111.56.202”即可。
第二节CHEMKIN介绍CHEMKIN是一种非常强大的求解复杂化学反应问题的软件包,常用于对燃烧过程、催化过程、化学气相沉积、等离子体及其他化学反应的模拟。
CHEMKIN包括“核心程序(Core Utilities)”和“应用程序(Application)”两级程序包。
以气相反应、表面反应、传递过程这三个核心软件包为基础,CHEMKIN提供了对12种常见化学过程模拟的软件包及后处理程序。
CHEMKIN的三个核心程序模块:1) 气相动力学(Gas-PhaseKinetics):是所有程序计算的基础,提供气相成分组成、热力学数据、化学反应等信息。
2.气相燃烧过程2.1 平衡2.1.1绝热火焰温度2.1.1.1项目简述这个用户指南提出了使用气相平衡计算确定绝热火焰温度的氢气/空气系统。
绝热火焰温度是指在某一特定条件下测量的混合气体燃烧可以达到的最高温度。
在一个包含热损失,化学动力学和质量传输局限在内的实际系统中,火焰温度可能低于绝热火焰温度。
2.1.1.2项目设置项目文件可以命名为equilibrium__gas.ckprj。
用于此样品的数据文件可以在samples\equilibrium\gas directory中查询。
该反应堆图包含有一个单一的平衡反应堆。
平衡计算仅需要知道物质种类和它们的热力学数据,而没必要知道参加反应的名单。
对于此示例问题,化学输入的文件只包括3个元素:H,O,N和H2, H, O2, O, OH, HO2, H2O,N2, and H2O2等9种物质。
为了获得准确的火焰温度,产品列表中的基础种类和稳定物种是同等重要的。
对于一般的平衡计算来说,包含一些不重要的物种比忽略一些被证明是重要的物种要好得多。
解决这个问题首先需要涉及C1平衡板。
这个问题类型(恒压和焓),初始温度(300 K)和压力(1 atm)进入反应堆物理性质上的标签。
溶液估温2000 K 用于帮助确保获得该解决方案是点燃的气体,而不是未燃的状态。
对于平衡模拟的时候溶液估温不是必要的,但是当涉及辅助解决方案时可能会用到。
在反应物二级的特异性数据选项卡上输入起始组成数据。
反应物混合规定了包括提供初始摩尔元素及初始能量系统的初始状态。
随着初始温度的增加,补遗集面板用来指定两个额外的模拟。
2.1.1.3项目结果图2-1表示的是这些模拟的平衡温度,它代表H/O为2.0的氢气/空气混合物的绝热火焰温度。
这些温度都在2400以上,因此与对应燃烧气体相符合。
正如人们所料的那样,这些绝热火焰温度随着初始气体温度增长而升高。
图2-1氢气/空气混合的绝热火焰温度2.2利用当量比燃烧过程的很多属性强烈依赖于燃烧混合物的化学计量。
Chemkin模型学习读书笔记一、模型总体介绍大型气相动力学计算软件包Chemkin(chemical kinetics)可以用来解决带有化学反应的流动问题,是燃烧领域中普遍使用的一个模拟计算工具。
该软件是1980 年美国Sandia 国家实验室Kee R. J. 等人开发并推出的,经几次完善发展,至今已开发出了第6个版本CHEMKIN 4.0.2。
chemkin有多种针对不同模型的应用程序,在4.0版本中共有23种计算模型,分6大类:○1封闭的0维反应器:包括封闭的内燃发动机模型(closed internal combustion engine simulator),封闭的同质反应器(closed homogeneous batch reactor),封闭的部分搅拌反应器(closed partially stirred reactor)和封闭的等离子反应器(closed plasma reactor)。
顾名思义,此类模型没有出入反应流,只根据反应器的初状态计算其末状态的参数。
○2开放的0维反应器:包括良搅拌反应器PSR(perfectly stirred reactor),等离子良搅拌反应器(plasma PSR)和部分搅拌反应器(partially stirred reactor)。
此类模型需要定义入流的流量、种类和温度等信息,计算后会给出出口的状态参数。
○3流动反应器:包括栓塞流反应器(plug-flow reactor)、等离子栓塞流反应器(plasma plug-flow reactor)、平面层流反应器(planar shear flow reactor)、圆柱形通道内的层流反应器(cylindrical shear flow reactor)和蜂窝整料反应器(honeycomb monolith reactor)。
此类模型考虑流动中的化学反应,主要是表面反应。
○4火焰模拟反应器:包括预混层流燃烧器-稳定的火焰(premixed laminar burner-stabilized flame)、预混层流火焰-火焰速度计算(premixed laminarflame-speed calculation)、和扩散/预混对撞火焰(diffuseion or premixedopposed-flow flame)。
How to use Chemkin-II(Summary and condensed instructions for using the Chemkin-II and transport property databases, subroutine libraries, and application codes on the HP workstations)Submitted to:Dr. Thomas FletcherBy:Jeffrey E. DavidsonSeptember 18, 1996Table of ContentsTitle Page (i)Table of Contents (ii)Introduction (1)Introduction to the HP Work Stations (3)The Tool Bar (3)Essential UNIX Commands (5)Other useful commands and tricks in Unix (8)Equilibrium Calculations using Chemkin-II (10)Instructions for using the Chemkin Equilibrium Solver (10)Example Problems for Chemkin Equilibrium Program (13)Laminar, Pre-mixed, One-dimensioned Flame Calculations (14)Setting up a Premixed Flame Problem (14)Example Problems for Premixed Laminar Flame (20)Perfectly Stirred Reactor Calculations (22)Setting up a PSR problem (22)Example Problems for the Perfectly Stirred Reactor (27)Extracting Transport Data from Chemkin (28)Instructions for Extracting Transport Properties (28)Transferring data from the HP workstations to a PC (31)Programing using Chemkin-II (32)Calculations using Global Mechanisms (36)Calculations Using Global Mechanisms (37)Installing the Chemkin Programs into your Directory (38)References (39)Appendix (40)How to use Chemkin-IIIntroductionChemkin-II is a collection of data bases and subroutines written in text files and in FORTRAN code for solving problems involving gas-phase kinetics, equilibrium and transport properties. There are many different types of problems that can be solved using the Chemkin subroutines. Driver programs (programs that direct the subroutines and control the input/output files) have been written for the following types of problems:1. Adiabatic flame temperatures.2. Equilibrium concentrations for a gas mixtures.3. Species mole fractions as a function of time in laminar, steady state, premixed flames when temperature profile in known.4. Flame speed, species mole fractions and temperature profile as a function of time in laminar, steady-state, premixed flames.5. Mole fractions and temperature of product stream from a perfectly stirred reactor.6. Determination of transport properties of gas mixtures as a function of composition, temperature and pressure.This is just a small sampling of the numerous driver programs that have been written. The number and type of computer programs which incorporate Chemkin subroutines are constantly increaseing.To use these programs, the user must modify several input files. As will be explained in detail below, each of the input files is in a Unix-shell file and the user will only need to modify the shell file. In order for the subroutines to work, the user must tell Chemkin about the gas mixture and the gas phase reactions. This is done in the file named mech . The user must name each of the elements and each of the species which are in the gas mixture. The user must also enter the elementary steps of the chemical reactions being considered with their respective Arrhenius rate coefficients for the equation: k = AT β exp ER T ⎛ ⎝ ⎫ ⎭ ⎪ (1)The user must also specify the problem by modifying the inp file. This file generally contains information such as initial temperature of the gas mixture, mole fractions of thereactants, and initial pressure. Depending of the program and the nature of the problem, the user will need to include other keywords which control the program. As these are specific toeach of the programs, they will be discussed separately below. Once the inp and the mech files have been properly modified, the program can be run by executing the shell file.For each of the types of problems discussed here, the application code has already been written. The user must only supply the reaction description and the application input. The application input varies from application to application and each will be discussed individually below. The Chemkin applications have been setup and modified to run the HP workstations called the STATES located in room 308 CB. An introduction to these machines will be discussed before the discussion of the applications.Introduction to the HP Work StationsThe HP work stations are powerful computers which operate much faster than the typical PCs. (Some of these programs would require a few days to run on a PC or MAC). All of the STATES are large enough that multiple users can be logged onto the same state.For example, if you sit down at either the TEXAS or the DALLAS terminal, you will be automatically logged into the TEXAS computer. It is possible to login to UTAH from TEXAS or from a PC or Macintosh via TELNET (a communication software package) or by using the command rlogin state from another workstation, but the graphical interface will not be available.These machines use HP-UNIX for an operating system which incorporates both text and graphical interfaces. When you sit down at one of the terminals, if the screen is blank, move the mouse. The login screen will appear and ask for your user's name and password. After you enter both of these correctly, the screen will be blank except for a border and a tool bar.The Tool BarMail- If you have new or unread E-mail, this button will show a couple of envelopes. Press this button and a listing the mail stored in your mail box will appear. You can use this program to read and send mail.CPU Load- This figure shows the load on that state’s CPU. As the load increases th e area plot increases. Horizontal lines mean that the scale on the original screen had to be reduced. If the computer has more than 3 or 4 horizontal lines it might be wise to find another computer that does not have quite the work load.One, Two, Three, Four, Five, Six- These are multiple screens from which you can access your files. If the first screen (One) gets too cluttered with windows, you can switch back and forth between the other screens with these buttons.Printer- Text files can be sent to the laser printer in the next room by clicking the file in the file manager screen with the middle button on the mouse and then dragging the file to this button. Clicking the left mouse button while the mouse is on the printer button will display the printer status.Text Editor- This button looks like pencil on a piece of paper. When this button is pressed, a window containing the text editor is opened. This editor behaves much like the MS-DOS text editor or Edit on the Macintosh.X-Term- Text user interface. When you press this button, a screen will pop up with a cursor. From this screen, the user can enter commands to copy, delete, rename and run various files. It is similar to a DOS screen on a PC. The commands are discussed below.Style Manager- The attributes (colors, background, etc.) of the graphical interface can be changed using the options under this button.Rename Workspace- Allows you to give names to the One, Two, Three, Four, Five, Six screens discussed above.? - This is the help button which contains a more detailed explanation of the HP work station environment.File Manager- This button (looks like a file cabinet) puts a window on the screen which displays all the files in the current directory. If you double-click on a text file in this window, the text editor will pop up with the contents of the file.Trash- Drag files that you want to erase from your directories on to this button and they will be erased when you logout.Exit - Press this button to logout. The computer will then ask for conformation.Essential UNIX CommandsIn this section, only the most essential UNIX commands will be presented. This presentation is not intended to be detailed but should be sufficient to survive in HP-UNIX. Other commands and further detail can be found in the books found in the computer laboratory. Several of the commands presented here can also be done using the graphical interface although I have found the text interface to have more options and be more useful. The information for the different commands will be described in terms of function and format or will be presented in a tutorial format.To begin, press the X-Term text interface button with the left-hand button on the mouse. If you were logged-on to TEXAS, a screen would pop-up with the prompt:texas$HelpHP-UNIX has an on-line help program which has a very detailed description of the use and options of the UNIX commands. To access the help program type:man command [Enter]Where command would be the name of the command for which you had a question. For example, if you typed:man pwd [Enter]a help screen will pop up and describe the pwd command. To scroll down in help use the space bar and to exit help press q.DirectoriesFiles can be stored in tree-like directories. That is, any directory can have sub-directories. To find out which directory path you are in, type pwd [Enter]. The p rintw orking d irectory command will show you the absolute path name of the working directory. Whenever you start a new text interface, you will automatically be placed in your main directory. The output for the pwd command should be:cheme/usernameAll your files should be kept within this directory or sub-directories of username. To see what files or sub-directories you have in this directory type ls [Enter] for List files. The command ls -l (l is a lowercase L) will provide more information about the files and sub-directories.To make a sub-directory use the mkdir directoryname command. For example at the prompt, type mkdir junk [Enter].Now type ls to see the directory that you created.To move down to that directory, type cd junk [Enter]. The c hange d irectory command can be used to move up and down in the directory tree. To see in which directory you are working, type pwd [Enter]. The result should read:cheme/username/junkNow, to move back to your main directory, use the move-up- one-directory command, cd .. [Enter]. The two periods mean the parent directory or the directory directly above the current directory. Type pwd [Enter] to make sure you are now in your main directory.To remove the junk directory, type rmdir junk [Enter]. In order to remove a directory, the directory must be empty of all files and sub-directories.Note: Every time you call up a text interface screen, it will automatically open to your main directory. In order to access any of your programs or files in other directories, you must first change to the directory in which the files are located.FilesThere are three basic types of files used by Chemkin. Text files can be edited by the text editor. They cannot be executed unless they are a program source code and are first compiled. Shell files are denoted with the .sh extension are similar to .bat file in MS-DOS. They are text files which can be executed and will direct the compilation of FORTRAN codes, direct a sequence of program calls, and direct file input and file output. They can be edited by the text editor and executed by typing:sh shellname.shIf the .sh file is already in the execute attribute (see File...Properties in graphical interface File Manager) then the shell file can be executed by:shellname.shFor the Chemkin programs for which shell files have been written, you will not need to do any programming in FORTRAN but will need to modify the shell files.The third type of file is an non-text executable file. These files are created by compilers and cannot be edited by a simple text editor. Since all the compilation of the FORTRAN source code will be directed by the shell files, you do not need to directly run these programs.There are several commands which are very useful in manipulating files. To make a copy of a file use the cp command. When using the format cp file1 file2, the computer will make a copy of file1 and call it file2. This will not destroy file1, but will destroy any old copies of file2. To copy a file into another directoryuse the format cp file1 path/directoryname. This will place a second copy of file1 into directoryname. To copy all the files in one directory to another use cp *path/directoryname.To move or rename files and directories use the mv command. This has the same format as the cp command except, the original file is destroyed. For example, if you typed mv file1 file2, file2 would be a copy of file1 and file1 would be erased.To erase a file using the text screen, use rm filename. If you use rm -i filename, the computer will request conformation before a file is deleted.Other than using the text editor, text files can be viewed using the more command. (Format more filename). This command will display the contents of a text file to the screen and will pause before scrolling. Because the more command only allows you to scroll down, it is often better to use the text editor to view files.Other useful commands and tricks in UnixTo change your password, type passwd at the prompt.To run a program in the background add an “&” to th e end of the file name. When a program is running in background, you can log-off the system and the program will keep going. To execute the premixed flame shell in the background, you would type:sh premix.sh &If the program is already running but not in the background, press [ctrl]-[z] to pause the program, and type bg at the prompt to put the program in the background.Once a file is running in the background, you can follow its progress by a number of ways. It is often necessary to follow some of the Chemkin programs, because they tend to crash if the initial guesses are far from the true solution. To see if it is still running type jobs -l (lower case L) at the prompt. This will list all the programs currently being executed from that window. To list all the programs currently being executed on that computer type ps -e. (Sometimes this list can be long so to control the screen output use ps -e | more. The | will pipe the output from the ps command through the more command.) Both the ps and the jobs commands will list a number associated each program in execution. This number can be used to stop the execution of the program with the kill command. For example, if you want to kill program number 1, type kill %1.The contents of the output file can be followed as the file is being generated by using the tail command. For example, to follow the output from the premixed flame shell program, type tail -f premix.out. To exit the tail command press [ctrl]-[c]. When shell files are executed, their progress is written to the file .log. To follow the .log file, use tail -f .log.If your program stops running but the output file is empty, look at the files ckout and tpout(in the text editor) and they will tell you if there are any errors in your mech or inp files.If your workstation should freeze, press [shift]-[ctrl]-[reset]. This will reset your computer. These buttons are on the left side of the keyboard. Any files that were not previously saved will probably be lost.To print files, you can either use the text editor or use the lp command. The format is lp filename. This will print two pages per piece of paper. This command and the printing from the text editor will truncate any line which is over 80 columns. To print files that are wider than 80 columns do the following:1. psf -1sc 150 <filename>junk2. lp junkBe careful when you are printing some of the .out files because they can be quite long and can contain a lot of unnecessary information. In most cases it will be better to first erase the unwanted information by using the text editor and then printing the file.Also be careful not to send non-text files to the printer or hundreds of pages could be wasted.From certain STATES or terminals a file cannot be directly printed. If your file does not print after sending it to the printer you will need to rlogin on ALASKA and print from that machine. Do the following on a X-term window of any machine in the room:1. rlogin alaska2. cd to directory where your file is located. (You can use pwd find out in which directory you are located.3. lp filename4. logoutThere are many other commands available in UNIX. Please refer to a manual to learn other commands.Equilibrium Calculations using Chemkin-IIThe Chemkin equilibrium software is easy to use but is not as powerful as other equilibrium programs like the NASA-LEWIS code or the EDCONV code. The latter two programs, will search their data bases to determine what species should be considered in an equilibrium calculation. The Chemkin code requires that the user input all the species which are to be considered. In the example of methane combustion in air, NO and NO2 formation will not be considered unless those two species are entered into the program. CO will not even be considered unless it is input into the program.Instructions for using the Chemkin Equilibrium Solver1. Login to an HP workstation.2. Open the Text Editor.3. Under the File pull-down menu, select Open...4. Open equil.sh (you may need to change directories)5. Scroll down to the line below “cat << EOF > mech”.6. After the word “ELEMENTS” enter the symbols of every elem ent that will be in any species that should be considered in the equilibrium calculation. Isotopes can be considered if their atomic weight follows their symbol in slashes “/”. Lines beginning with an exclamation mark are ignored. Conclude the elements section with the word “END”. Example:ELEMENTSNH! Define DeuteriumD /2.014/OENDAlso Acceptable is:ELEMENTS N H D /2.014/ O END7. After the word “SPECIES”, enter the symbols of every species that should be considered. The format is similar to the elements section. Example:SPECIES H2 O2 H O OH HO2 N2 N NO ENDIf species which are not contained in the thermodynamic data base need to be considered, check out the manual entitled Chemkin-II: A FORTRAN Chemical Kinetics Package for the Analysis of Gas Phase Chemical Kinetics. This manual will provide more detail on extra features of the Chemkin software package. Thermal dynamic data for numerous hydrocarboncombustion species are available in the correct format for the database in Combustion Chemistry, edited by William C. Gardiner or from the NASA-LEWIS equilibrium code data file.8. Scroll past the driver program to the line: “cat << EOF > inp”9. The shell file generates a file named inp that contains the keyword inputs to specify the problem for the equilibrium program.10. The following keyword inputs are allowed in any order:REAC - Specifics the reactants and their molar quantity or mole fraction. Format: REAC H2 2CONH - Constant enthalpy can be used in conjunction with constant volume or pressure, but not with constant temperature, entropy or internal energy.CONP - Constant pressure can be used with constant temperature, volume, enthalpy or entropy, but not with constant internal energy.CONT - Constant temperature can be used with constant pressure, volume or entropy but not with enthalpy, and constant internal energy.CONV - Constant volume can be used with constant temperature, pressure, internal energy, enthalpy or entropy.CONU - Constant internal energy can be used with constant volume only.CONS - Constant entropy can be used with constant temperature, pressure or volume, not with constant internal energy or enthalpy.CONX - Constant mole fractionCHAP - Chapman-Jouguet- cancels all the above specification except REAC. This keyword causes the detonation-wave velocities to be calculated.TEMP - Required input for the starting temperature in K. Format: TEMP 298TEST - Estimate equilibrium temperature in K.Format: TEST 2500PRES - Starting pressure in atmospheres. Format: PRES 1PEST - Estimate of equilibrium pressure in atmospheres.Format: PEST 1.5CNTN- Tells the computer to look for an additional problem after the keyword END.END - End of keyword input.An example of a input file inp to calculate the equilibrium concentrations of a stoichiometric hydrogen flame in air and a fuel rich hydrogen flame is:REAC H2 2REAC O2 1REAC N2 3.76CONHCONPTEMP 300TEST 2000PRES 1CNTNEND/ This is the second problem.REAC H2 3REAC O2 1REAC N2 3.76END11. If you would like to customize the output file name, you must edit the file name on the second to last line in the shell file.Example:Before:make equile; equile < inp > equil.outAfter:make equile; equile < inp > filename12. Under the File pull-down menu of the text editor, select the Save or Save as.. command.13. Open a text interface window by clicking on the X-term button on the tool bar.14. Change the directory to the directory where the Chemkin files are located using the cd command.15. Run the shell program by typing: sh equil.sh16. When the cursor reappears, the program is completed and the output file can be viewed and printed via the text editor.Example Problems for Chemkin Equilibrium Program1. Calculate the adiabatic flame temperature and equilibrium composition of CO in air with equivalence ratios of 0.5, 1,2. (Do not consider NO x formation). (Feed conditions- 300 K, 1 atm). Consider using the CNTN keyword to save some time.2. Repeat problem 1 but consider NO x formation.3. Repeat problem 2, but make the inlet feed contain 10 percent H2.4. Compare the results from problem 3 with either the EDCONV program or the NASA-LEWIS code. If you forgot a significant species in problem 3 as determined by one of the other two programs, repeat problems 3 and 4 again. What are two reasons for using the Chemkin equilibrium program, if one of the other equilibrium codes is available?Laminar, Pre-mixed, One-dimensioned Flame Calculations“Many practical combustors, such as internal combustion engines, rely on pre-mixed flame propagation. Moreover, burner-stabilized laminar premixed flames are very often used to study chemical kinetics in a combustion environment. Such flames are effectively one-dimensional and can be made very steady, thus facilitating detailed experimental measurements of temperature and species profiles. Also, laminar flame speed is often used to characterize the combustion of various fuel-oxidizer combinations. Therefore, the ability to model chemical kinetics and transport processes in these flames in critical to interpreting flame experiments and to understanding the combustion process itself.” (Kee, 1992)The Chemkin premixed flame code is designed to handle a variety of problems. The calculations involve solving systems of non-linear mass balances, energy equations, and transport relations. There are two major divisions in the types of problems that the premixed code will solve. The burner stabilized problem requires a known mass flow rate, and the temperature profile can either be specified or calculated from energy equations. Often it is better to specify the temperature profile if it can be experimentally determined because heat loses from a flame can be difficult to quantify. Problems where the temperature is specified are relatively easy to solve compared to the second type of problem. The second type of problem involves an adiabatic freely propagating flame. From the input, the flame speed, temperature profile, and concentration profile are calculated. This type of problem is very difficult to converge and solving them requires some skill, experience and a lot of patience. The code is currently configured for a burner diameter of 1.0 cm2.Setting up a Premixed Flame Problem1. Login to an HP workstation.2. Open the Text Editor.3. Under the File pull-down menu, select Open...4. Open premix.sh5. Scroll down to the line below “cat << EOF > mech”.6. After the word “ELEMENTS” enter the symbols of every element that will be in any species that should be considered in the equilibrium calculation. Isotopes can be considered if their atomic weight follows their symbol in slashes “/”. Lines beginning with and exclamation mark are ignored. Conclude the elements section with the word “END”. Example:ELEMENTSNH! Define DeuteriumD /2.014/OENDAlso Acceptable is:ELEMENTS N H D /2.014/ O END7. After the word “SPECIES”, enter the symbols of every species that should be considered. The format is similar to the elements section. Example:SPECIES H2 O2 H O OH HO2 N2 N NO ENDIf species which are not contained in the thermodynamic data base need to be considered, check out the manual entitled Chemkin-II: A FORTRAN Chemical Kinetics Package for the Analysis of Gas Phase Chemical Kinetics. This manual will provide more detail on extra features of the Chemkin software package. Thermodynamic data for numerous hydrocarbon combustion species are available in the correct format for the database in Combustion Chemistry, edited by William C. Gardiner. Transport property data may also need to be added to the transport property data base.a. This section must begin with the word REACTIONS. The default units for the Arrhenius rate coefficients are cal/mole for the activation energy and the units of A are in terms of cm, sec, K, and moles. Equation 1 is shown here again: k = AT β exp ER T ⎛ ⎝ ⎫ ⎭ ⎪ (1)These default units of the activation energy can be changed by adding the words CAL/MOLE, KCAL/MOLE, JOULES/MOLE or KELVINS after the word REACTIONS. The default units for A can be changed by adding MOLECULES so that the units of A are in terms of cm, sec, K, and molecules.b. The information of the reaction is fairly free from format but certainconventions must be observed. At the beginning of the line the reaction mechanism must be symbolically written. No more than 3 molecules can be on either side of the equality. All coefficients of reactants must be integers. A plus sign (+) is used to separate the reactants from the reactants and the products from the products. There are two symbols used to separate the reactants from the products. The equals sign (=) is used to represent a reversible reaction. When this symbol is used, the reverse reaction is considered and calculated using the equilibrium constant. When the symbol => is used, the reaction is assumed to be irreversible and the reverse reaction is not considered. Third body reactions can be considered by using thesymbol M as both a reactant and product. The M species does not need to be declared in the SPECIES section. On both sides of the equation, M must be the last species. The defaultthird body efficiency is one, but this can be modified as shown in the example elementary step. The three Arrhenius coefficients (in order of A, , and E) are on the same line as the reaction and must be separated by at least one space. (Multiple spaces or tabs are acceptable for separating the data on a line.) Exclamation marks (!) signify that information following the ! is to be ignored. An example elementary step is:H + O2 + M = HO2 + M 0.361E18 -0.72 0.0H2O/18.6/ H2/2.86/ N2/1.26/ ! 3rd body efficienciesRefer to the manual, Chemkin-II: A FORTRAN Chemical Kinetics Package for the Analysis of Gas Phase Chemical Kinetics for details on handling photo-chemical reactions, pressure-dependent fall-off reactions and Landau-Teller formulation of rate expressions.c. End the mechanism description with the word END.8. Scroll down to the line: “cat << EOF > inp”9. The shell file generates a file named inp that contains the keyword inputs to specify the problem for the premixed laminar flame program. In the Appendix there are several pages directly from the manual and explain all the possible keyword inputs. Some of the most important keywords will be discussed here.BURN - A required keyword for burner-stabilized flame problems.FREE - Required for adiabatic freely propagating flame. (Note: either BURN or FREE must be specified by not both but this can be changed on continuation (CNTN) or restart (RSTR).)TGIV - For burner-stabilized flames, the species equations will be solved using the user-specified temperature profile.ENRG - The temperature profile will be calculated using the energy equations, but the user must enter initial guesses for a temperature profile using the TEMP keyword. (Note: Either TGIV or ENRG must be specified for BURN type problems.)MOLE or MASS - Used to specify that answers and inputs are in either mole or mass fractions.PRES - Pressure of the flame in atmospheres. Format: PRES 1.0.FLRT - Specified flow rate for burner stabilized flames or initial guess for adiabatic freely propagating flames. Units are in g/cm2-sec. Format: FLRT 0.04.REAC - used to specify initial reactant mole or mass fractions.INTM - used to give the computer initial guesses of intermediate species mole fractions.PROD - used to give the computer initial guesses of product species mole fractions。
CHEMKIN-PROApplicationsMorning Session9:00 –12:00Agenda –Day 2: CHEMKIN-PRO Applications●Overview of CHEMKIN-PRO●Multi-zone IC engine Model●*** BREAK (10:30)***●Reaction Path Analysis●*** LUNCH (12:00)***●Particle Tracking2CHEMKIN Product Feature Comparison3CHEMKIN-PRO New Features●Increase Your Productivity–New 64-bit Windows (Vista and XP) versions allow for more memory use then 32-bit CHEMKIN 4.1–Alert the user immediately regarding machine limitations –New Progress Indicator: know exactly where you are in the calculation process–More intuitive GUI workflow to streamline navigating tasks–Less cumbersome initial guesses4CHEMKIN-PRO New Features●Model Real Fuel Chemistries–Allow reaction mechanisms to include more than one reaction sub-set with different units–Mix-and-match different reaction mechanisms within the same projects file●Simulate more Realistic Engines–Additional heat-release parameters for IC Engine output–Heat release rate provided both in terms of heat-release per time and heat-release per crank angle –Allow use of a non-conventional piston motion in IC Engine models5A Faster CHEMKINFaster on Simple Models●Comparison to Chemkin II (Historical Standard)7Faster on Complex Models8Multi -Zone EngineSimulator10Why is the Multi-Zone Engine Simulator Important?●Understand how CO and HC are formed in different zones of the combustion chamber●Understand how ignition is affected by in-cylinder conditions●Accurately simulate emissionsLower temperaturesnear the walls (COand soot formation)Ignition & HighTemperature in BowlCHEMKIN-PRO Multi-zone Modeling●Homogeneous Charge CompressionIgnition (HCCI) gives gasoline enginesdiesel-like efficiency●Ignition is controlled by kinetics andengine conditions●CFD can not handle the kineticsIgnition11Application:Multi-Zone EngineSimulatorCHEMKIN-PRO Multi-zone Engine Simulator ●Permits the use of detailed combustionchemistry–Ignition timing–Pollutant formation●Addresses in-cylinder temperature and/orcomposition inhomogeneities–Local heat loss–Residual gas or recycled exhaust gas●Facilitates parametric studies13Zone Description●Zones are imaginary regions–Floating and non-contiguous–Total zone volume must equal to cylinder volume●Pressure is uniform inside the cylinder●No mass or heat transfer takes placebetween the zones–Each zone is a closed homogeneous reactor●Zones interact with each other throughpressure work1415●A 10-zone model is used in the simulation:●All zones have the same initial gas composition●A natural gas mechanism (up to C4) is used35251810521112Mass %CoreBoundaryLayerCreviceRegionWall Area %Zone #712223243531221696109876Lower temperaturesnear the walls (COand soot formation) Ignition & HighTemperature in the CoreZone Definitions16●CHEMKIN multi-zone model can be used in thehybrid approach for HCCI engine simulation–Hybrid approach is a two-step simulation process1.A CFD code is used to obtained in-cylinder temperaturedistribution before chemical kinetics becomes important2.The multi-zone model will calculate zone properties usingdetailed chemical kinetics and temperature information from theCFD solution●Zone temperature may be determined in two ways–Constrained with a given temperature vs. time profile–Solved with the energy equation●Transition angle is a model parameter specifyingwhen the energy equation will be used tocompute the zone temperatureHybrid Approach17Wall Heat Transfer●Zones can exchange heat with cylinder wall –Each zone has its own wall heat transfer rate●Zone wall heat transfer rate is computed from zone wall heat transfer coefficient, zonetemperature, and zone wall surface area–Wall heat transfer coefficient is calculated by the Woschni correlationÑThe same set of heat transfer model parameters is appliedto all zones–Zone wall surface area is given as a constant fraction of instantaneous cylinder wall surface areaÑA zone can be made adiabatic by setting its wall surfacearea fraction to zero18User Interface●Reactor properties panel is the same as the single zone model●Zone mass/volume fraction, temperature (profile), initial composition, and wall heat transfer area fraction can be assigned individually● A transition angle (or time) can be specified to turn on the energy equation19●Engine parameters●Fuel–Natural gas/Air, φ= 0.25921Compression ratio 26 cmConnecting rod length 14cmStroke 1000 rpmEngine speed 12.065 cmBore 1600 cm 3Displacement volume Vol %component 91.1CH 40.50.61.41.74.7CON 2n-C 4H 10C 3H 8C 2H 6The 2-bar Boost Case from Aceves et al., SAE 2000-01-032720●Ignition isdetermined by the hottest zone ●Temperatures in cold zones drop quickly due to wall heat loss after the energy equation is turned on –Allow zones to havedifferent heat transfer parameters 600800100012001400160018002000-20-1001020Crank Angle (degree ATDC)T em p er a tu r e(K)single-zone 10-zone aveZone 1Zone 2Zone 3Zone 4Zone 5Zone 6Zone 7Zone 8Zone 9Zone 10use temperature profile solve energy equationθt =-3Using Temperature Profile from CFD21Multi-zone Model●Open Samples problem: ic_engine__multizone.ckprj ●Explore the interface ●Run the example ●Plot temperature resultsHANDS ON22Results from Multi-Zone Engine Simulator ExampleTemperature Distribution in the HCCI EngineIgnitionHANDS ONReaction Path AnalyzerCHEMKIN-PRO’s Reaction Path Analyzer●Key tool for mechanism reduction●Graphically explore reactionmechanism bottlenecks●Identify crucial species andreactions●See the underlying chemistry inyour process●Can be used withall CHEMKIN-PRO reactors●Can be used with sensitivityanalysis24Reaction Path AnalysisInfluence of primary andsecondary radical pathsin the formation of COStart and end speciesRestricting by elementNumber of species drawnVary the point within thesolutionPlots of:Rate of ProductionForward and ReverseComposition25Reaction Path AnalysisLayout optionsLine shape and labelingRelative sizing of linethickness“Side Species”color chartA side species will not bein a diagram, but reactionpaths can be colored bytheir influence26ApplicationReaction Path Analyzer28Reaction Path Analysis Example●Open Samples problem:closed_homogeneous__transient.ckprj●Run Problem●Under Analyze Results select “Analyze Reaction Paths”●Examine how Water is produced in Hydrogen Combustion processHANDS ON29Reaction Path Analysis Example1)Add H2O as a species from the “Species List”2)Select H2 as a Start species and H2O as anEnd species in the “Species Selection”list 3)Remove all Side Species4)Select ignition region on the Temperature plot On “Preferences”tab:1)Select Minimum (relative) ROP drawn 2)Draw line labels all the time 3)Put boxes around the speciesHANDS ONCHEMKIN -PRO ApplicationsAfternoon Session 13:00 –16:00Particle TrackingWhy Particle Chemistry?Have you ever wondered?:●Will my new engine design meet emissionsregulations?●How will different fuels affect particleproduction?●How can I predict particle formation in mymicroelectronics deposition process?Particle Tracking can helpanswer these questions32Ability to Model a Variety of Chemical Interactions●Particle Tracking feature has the ability tosimulate all gas and surface-phase chemicalinteractions, as well as particle-particleinteractionsGas SpeciesSurfaceSpeciesParticle33What is the Particle Tracking?●A utility in CHEMKIN PRO (add-on in 4.1.1)●Enables particle-size distribution tracking●Includes nucleation, coagulation, surface reactions●Reactor models that can be coupled with Particle TrackingBatch ReactorPSRPFRShear FlowPremixOppdif34Industry Applications●Automotive–Soot generation and growth●Propulsion–Aluminum oxide particles●Microelectronics–Silica particles●Materials–Carbon black●Environment–Aerosols35Methodology (1)●Method of Moments–Soot particle simulation by Frenklach and Harris●Evolution of particle size distribution–Moment 0 »total number density–Moment 1 »total mass or total volume–Fractional moments »avg.diameter, surface area 3637●Particle size/class == Number of bulk species in the particle●Mass growth == deposition of certain gas species (such as carbon) on the particle surface●Multiple nucleation pathways ●Coagulation model–Free molecular –Transition –ContinuumMethodology (2)38PTM User Inputs●Gas-phase mechanism: gaseous reactions leading to formation of nucleation precursors ●Surface mechanism: nucleation and gas-particle interactions●Thermodynamic data●Transport data (shear flow, premix, and oppdif)Outputs●Average particle properties–Diameter–Surface area–Volume●Thermodynamic and flow properties of thegaseous mixture39Surface Chemistry Representation (1)●Particle material–Represented by bulk species–Bulk species created in nucleation reaction●Particles composition–Defined by a different surface material andassociated reactions40Surface Chemistry Representation (2)●Nucleation reactions–Initial particle formation from gas-phase species –Define inception particle class and initial surface coverage on the particles–A particle can be formed by multiple nucleationreactions41Surface Chemistry Representation (3)●Chemical processes on particle surface–Surface reactions input●Surface coverage state–Statistical average for all particles–Determines particle reactivity●Particles grow if–the surface reaction results in a net gain of bulk species (and vice versa)4243Example –Surface chemistry input fileMATERIAL SOOT_PARTICLE DISPERSEDENDSITE/PolyC/ SDEN/3.341E-9/H(se) open(se)! se indicates edge or active site. ENDBULK C(B)/1.8/ENDREACTIONS! nucleation from PAH2A4=> 32C(B)+20H(se)+28.72open(se) 9.0E09 0.5 0.0NUCL ! HACA growthH+H(se) => open(se)+H2 4.2E13 0.0 13000.0open(se)+H2 => H(se)+H 3.9E12 0.0 9320.0open(se)+H => H(se) 2.0E13 0.0 0.0 H(se)+OH => H2O+open(se) 1.0E10 0.734 1430.0 H2O+open(se) => OH + H(se) 3.68E8 1.139 17100.0 open(se)+C2H2 => H(se)+2C(B)+H 8.0E7 1.56 3800.0 ! PAH condensationA1+open(se) => H(se)+6C(B)+5H 0.60.0 0.0STICKFORD/open(se) 2.0/DCOL/4.E-8/Inception particle classParticle bulk compositionGrow particle by 2 classes Nucleation reaction Grow particle by 6 classes Indicates a dispersed phase and activates PTMBulk density44Additional Particle Tracking Capabilities in CHEMKIN PRO●Particle Tracking is now available with all of the CHEMKIN Flame reactors–Burner Stabilized Flame –Flame Speed Calculator –Diffusion Flame●Who might be interested in flame + soot capability?–Potential customers working on flame synthesis of particles –Anyone conducting experiments with sooting flames45Typical Particle Tracking ResultsTNucleation RateMean DiameternGrowth RateVolume of ParticlesApplication:Soot Oxidation andGrowth47Application: Soot Formation and Growth●JSR/PFR system developed at MIT (Marr, 1993)●The influence of mass diffusion on gas-phase species is minimized in this configurationHANDS ON48Application: Chemistry Set●Gas-phase: C 2H 4/O 2/N 2(includes formation of PAH precursors)●Surface mechanism (includes nucleation, oxidation and HACA and PAH condensation reactions)HANDS ON491.Open samples project:“\samples45\reactor_network_soot_JSRPFR”2.Pre-process chemistry3.Review various panels4.Run Model5.Post-process Testing PFR results6.Plot various gaseous PAH pre-cursors7.Plot avg particle diameter and number density as afunction of distanceApplication: Soot Formation and Growth HANDSONJSR Ignition (Soot Formation)PFR TransitionSectionPFR TestingSection50Application: Results HANDS ONEnd of CHEMKIN-PRO Applications。
CHEMKIN4.0.1入门指南CHEMKIN入门指南《燃烧学》辅助教程上篇基础知识、核心程序、化学平衡(EQUIL)、全混反应(AURORA)如果文中有任何错误,请不吝指出,以便不断改进2004.3第一章CHEMKIN简介本章介绍CHEMKIN的主要功能和求解过程。
第一节安装CHEMKINChemkin最早的版本始于1980,由美国Sandia实验室的Kee RJ 等人编写,经过多年的不断发展日趋完善。
后来由Reaction Design 公司收购并继续开发,目前最新版为3.7.1。
由于学习和科研需要,我们花费2000$向ReactionDesign公司订购了一套最新版本的CHEMKIN 3.7.1,其中包括20个网络教学许可证,用于《燃烧学》课程的学习。
[安装] 请从ftp://combustion:******************.56.202的“CHEMKIN软件”目录内下载安装程序chemkin371_pc_setup.exe,执行安装程序。
安装完后会自动在桌面及开始菜单建立快捷方式。
[运行许可证书] 教学用的CHEMKIN采用网络认证,故电脑必须联网(校内)。
当程序计算(Run)时,系统会提示选择license,选择“Specify license server”,然后next,在下一画面填入“166.111.56.202”即可。
第二节CHEMKIN介绍CHEMKIN是一种非常强大的求解复杂化学反应问题的软件包,常用于对燃烧过程、催化过程、化学气相沉积、等离子体及其他化学反应的模拟。
CHEMKIN包括“核心程序(Core Util ities)”和“应用程序(Application)”两级程序包。
以气相反应、表面反应、传递过程这三个核心软件包为基础,CHEMKIN提供了对12种常见化学过程模拟的软件包及后处理程序。
CHEMKIN的三个核心程序模块:1) 气相动力学(Gas-PhaseKinetics):是所有程序计算的基础,提供气相成分组成、热力学数据、化学反应等信息。
ChemKin4.0 操作入门安装:运行setup.exe。
然后把carck文件夹中的chemkin.lic文件拷到安装目录下的licenses文件夹中。
一、新算例设置的基本操作1、建立新工程2、设定反应器模型在左侧models面板双击所需反应器模型,如PSR模型,则反应器模型出现在右边的Diagram View面板,下角Update project按钮变成黄色。
当设定好模型后,点击该黄色按钮确定,按键变成灰色,方可进入下一步反应机理设定。
3、设定反应机理在左侧,Open Projects面板,双击Pre-Processing。
进入机理设置界面。
Working Dir 是所有计算结果,包括工程文件的存储位置,自行设定。
点击New Chemistry Set,设定机理文件,必须设定Gas Phase Kinetic File—后缀为.inp;Thermodynamic Data File――后缀为.dat,都通过设定路径来设定。
设好后Save As…,确定,就变成下面的样子,点Run Pre Processor。
运行成功则View Results….变成黑色,Cluster变成黑色,没有跳出任何消息框。
运行成功方可进行计算的初始参数设定。
在cluster中,●properties选求解Gas Energy Equation,●C1表示反应器,在reactor physical properties中设置停留时间、温度、压力、体积、热损失等项。
注意单位。
表面项和传输项设置留待诸位研究设置方法。
在species specific data 中设置反应器中原有的物质组分,要各组分的fraction加起来=1。
这一项我的计算中不需要设置。
注意,此处设置的温度为牛顿迭代计算的初值,默认条件下等于入流温度。
●R1表示入流。
入流可以有多个,比如我的先进再燃就有5个入流,入流再多也应该没有关系,进去就都一样了,看设置参数的方便而定。
(整理)Chemkin模型学习读书笔记.Chemkin模型学习读书笔记⼀、模型总体介绍⼤型⽓相动⼒学计算软件包Chemkin(chemical kinetics)可以⽤来解决带有化学反应的流动问题,是燃烧领域中普遍使⽤的⼀个模拟计算⼯具。
该软件是1980 年美国Sandia 国家实验室Kee R. J. 等⼈开发并推出的,经⼏次完善发展,⾄今已开发出了第6个版本CHEMKIN 4.0.2。
chemkin有多种针对不同模型的应⽤程序,在4.0版本中共有23种计算模型,分6⼤类:○1封闭的0维反应器:包括封闭的内燃发动机模型(closed internal combustion engine simulator),封闭的同质反应器(closed homogeneous batch reactor),封闭的部分搅拌反应器(closed partially stirred reactor)和封闭的等离⼦反应器(closed plasma reactor)。
顾名思义,此类模型没有出⼊反应流,只根据反应器的初状态计算其末状态的参数。
○2开放的0维反应器:包括良搅拌反应器PSR(perfectly stirred reactor),等离⼦良搅拌反应器(plasma PSR)和部分搅拌反应器(partially stirred reactor)。
此类模型需要定义⼊流的流量、种类和温度等信息,计算后会给出出⼝的状态参数。
○3流动反应器:包括栓塞流反应器(plug-flow reactor)、等离⼦栓塞流反应器(plasma plug-flow reactor)、平⾯层流反应器(planar shear flow reactor)、圆柱形通道内的层流反应器(cylindrical shear flow reactor)和蜂窝整料反应器(honeycomb monolith reactor)。
此类模型考虑流动中的化学反应,主要是表⾯反应。