Presentation is loading. Please wait.

Presentation is loading. Please wait.

                         University of Wisconsin – Madison Engine Research Center WAVE/Chemkin Interface May 2002 pg. 1 GTI.

Similar presentations


Presentation on theme: "                         University of Wisconsin – Madison Engine Research Center WAVE/Chemkin Interface May 2002 pg. 1 GTI."— Presentation transcript:

1                          University of Wisconsin – Madison Engine Research Center WAVE/Chemkin Interface May 2002 pg. 1 GTI and ERC WAVE/Chemkin Interface Reference Sponsors and Contributors Chol-Bum Kweon and John Pratapas Gas Technology Institute Kushal Narayanaswamy and Randy Hessel University of Wisconsin-Madison, Engine Research Center Version 05-27-04 (contains information about the WAVE/Chemkin interface developed at the ERC)

2                          University of Wisconsin – Madison Engine Research Center WAVE/Chemkin Interface May 2002 pg. 2 This document discusses the WAVE/Chemkin interface developed at the ERC. The interface was developed by Kushal Narayanaswamy under the sponsorship of the DOE and exercised by Randy Hessel under the sponsorship of the Gas Technology Institute. This document covers: –description of engine modeled and operating conditions –information passed between WAVE and Chemkin –how the two programs are interfaced –sample results Introduction

3                          University of Wisconsin – Madison Engine Research Center WAVE/Chemkin Interface May 2002 pg. 3 Engine description and operating conditions These conditions are for diesel operation.

4                          University of Wisconsin – Madison Engine Research Center WAVE/Chemkin Interface May 2002 pg. 4 The WAVE model Intake surge tank Intake ducts Exhaust ducts Dual intake ports Dual exhaust ports Single cylinder with direct injection Exhaust surge tank This model is for diesel operation.

5                          University of Wisconsin – Madison Engine Research Center WAVE/Chemkin Interface May 2002 pg. 5 WAVE/Chemkin interface type WAVE uses Chemkin to estimate the amount of fuel burned each computational time step. In WAVE terminology, this is called a User Burn Rate Model. In our case, WAVE supplies Chemkin with sufficient information to calculate the fuel burn rate at each time step, then Chemkin returns to WAVE the amount of fuel burned. The group of subroutines written by the user that allow this information to be exchanged between WAVE and Chemkin is called an interface.

6                          University of Wisconsin – Madison Engine Research Center WAVE/Chemkin Interface May 2002 pg. 6 Simplified flowchart WAVE Interface Chemkin WAVE is a self-contained commercial program that can calculate engine performance, 1D gas dynamics and a host of other quantities. WAVE has its own combustion models, but in this application, WAVE will be calling Chemkin through an interface. Ricardo supplies sample interface subroutines that the user can modify to communicate with their own combustion model. The first subroutine, user_init_comb_case, is used to initialize many quantities and is called only once at the beginning of the simulation. WAVE calls a second subroutine, user_comb, which in turn calls Chemkin at every time step for a current estimate of the amount of fuel burned. Chemkin is its own set of subroutines and is used to estimate the amount of fuel burned, based on current combustion chamber pressure, temperature and species concentration.

7                          University of Wisconsin – Madison Engine Research Center WAVE/Chemkin Interface May 2002 pg. 7 Linking the programs together The user subroutines, that is, the subroutines that constitute the interface and Chemkin, are compiled into a dynamic link library. We used Digital Visual Fortran to build this library, but other compilers can also be used. WAVE uses dynamic link libraries when properly assigned. Assigning is done through Model  Engine  Combustion  Profile, then selecting User Model and entering the User Model DLL path and file name.

8                          University of Wisconsin – Madison Engine Research Center WAVE/Chemkin Interface May 2002 pg. 8 Minimum information passed from WAVE to Chemkin 0cylinder number 1simulation time[s] 2cycle number 3crank angledeg 4injected and trapped fuel per cycle kg 5start of injectiondeg 6end of injectiondeg 7exhaust valve opensdeg 8engine speed1/min 9pressurePa 10temperatureK 11change of temperatureK/deg 12cylinder displacementm3m3 13mass concentration of oxygenkg/kg 14fresh air mass fractionkg/kg 15vaporized fuel mass fractionkg/kg 16burned air mass fractionkg/kg 17burned fuel mass fractionkg/kg 18liquid fuel mass fractionkg/kg 19total cylinder masskg 20start of burningdeg All angle values are measured relative to TDC firing. These variables are passed via the wave_to_user array. Columns are array element, variable name and units.

9                          University of Wisconsin – Madison Engine Research Center WAVE/Chemkin Interface May 2002 pg. 9 Information that can be passed from Chemkin to WAVE array elementVariable DescriptionUnitsRemarks Subroutine user_init_comb_case data passed back to WAVE 0crank angle at start of burningdegoptional 1user model call frequency required 2user model profile type required Subroutine user_comb data passed back to WAVE 0mass fraction burnedkg/kgrequired 1crank angle at start of burningdegoptional Our setting:Other options: 0do not specify start of ignitionspecify start of ignition 1call Chemkin every time stepcall combustion model once at start of combustion and calculate the complete combustion profile based on current conditions 2return fraction of cumulative burn to WAVEreturn burn rate fraction to WAVE 0cumulative mass burn fraction valuemass burn rate fraction value 1do not return the crank angle at start of burning return the crank angle to WAVE at start of burning

10                          University of Wisconsin – Madison Engine Research Center WAVE/Chemkin Interface May 2002 pg. 10 How the interface works The initialization interface subroutine, user_init_comb_case, is called once at the beginning of the simulation. user_init_comb_case has three main purposes. They are: 1.to make variable values defined in WAVE’s constants table available to the combustion model, 2.to specify how frequently the combustion model is to be called, and 3.to tell WAVE whether burn rate fraction, or cumulative burn fraction [(kg burned so far)/(kg injected or trapped in cycle)] values will be passed back to WAVE. Note that our interface passes back cumulative burn fraction, but since it is dimensionless, the calculation is actually the cumulative heat release divided by the total fuel energy. 4.Upon completion of this subroutine, control returns to WAVE. WAVE user_init_comb_case

11                          University of Wisconsin – Madison Engine Research Center WAVE/Chemkin Interface May 2002 pg. 11 How the interface works The subroutine user_comb is called every engine cycle. The first time user_comb is called, it in turn calls a Chemkin initialization subroutine called wisckinit. wisckinit initializes reaction mechanism and species information based on CHEMKIN interpreter. Note that the interpreter of CHEMKIN is run as a preprocessor to generate the 'cklink‘ file.

12                          University of Wisconsin – Madison Engine Research Center WAVE/Chemkin Interface May 2002 pg. 12 How the interface works Some of the things required to initialize for Chemkin via wisckinit are: 1.CKLEN gets the length of real, integer and character working arrays. 2.CKINIT assigns values to the working arrays, ICKWRK, CCKWRK, and RCKWORK by reading the linking file. ICKWRK - Array of integer workspace. RCKWRK - Array of real work space. CCKWRK - Array of character work space. 3.CKINDX gets a group of indices that define the size of the particular reaction mechanism. 4.CKSYMS returns the character strings of species names. 5.CKWT returns the molecular weights of the species. 6.CKRP returns universal gas constants and the pressure of one standard atm. 7.Read initial species mass fractions, pressure and temperature from an input file, ckinp.in. Currently this is set to air, 1 atm and 331 K. Perhaps ckinp.in should be created based on initial conditions at the start of combustion??? 8.CKXTY given mole fractions, returns mass fractions. 9.CKRHOX given pressure, temperature and mole fraction, returns total density. 10.CKHML returns enthalpies in molar units, array ckhk. 11.CKHML returns enthalpy of formation by calling with temperature = 298. WAVE user_comb wisckinit

13                          University of Wisconsin – Madison Engine Research Center WAVE/Chemkin Interface May 2002 pg. 13 How the interface works WAVE user_comb wisckinit comb if combustion if no combustion if 1 st call for combustion continue in section of user_comb just before where comb is called. and figure out flow chart below.

14                          University of Wisconsin – Madison Engine Research Center WAVE/Chemkin Interface May 2002 pg. 14 Questions I have been going through wiscinit. I see that the initial species specified in ckinp.in are air (0.21 o2 and 0.79 n2), 1 atm pressure and 331 K temperature. The title of this ckinp.in is "Dec's Case 1 2D Bomb c7h16.“ Why are kiva species assigned in user_comb after wisckinit is called? We are using this with WAVE. Are things hard-coded for a particular mechanism? For example “if(theta2.lt.-5.3) …” in user_comb. This ‘if’ appears more than once. (perfer to use tchop in ‘if’ statement, as is used in the line above this if, but is commented out. What are these statements in user_comb !mass fraction of fuel vapor+liquid fuel - burned fuel yc(1)=wave_to_user(15)+wave_to_user(18)-wave_to_user(17) !mass fraction of o2 yc(2)=0.2328*wave_to_user(14) !mass fraction of n2 + burned air mass fraction yc(3)=0.7372*wave_to_user(14)+wave_to_user(16) In user_comb, why have this statement if (icycle.gt.1)then combustion flag cmode is always on (value = 0.0).


Download ppt "                         University of Wisconsin – Madison Engine Research Center WAVE/Chemkin Interface May 2002 pg. 1 GTI."

Similar presentations


Ads by Google