Home
DETCHEM User Manual
Contents
1. E 3 6 3 8 SURFACE MODELS 35 To define this inhibition factor insert the following text in the lt MECHANISM gt section of the input file 1t must be directly in the hierarchy level of the lt MECHANISM gt tag not inside the lt GASPHASE gt or lt SURFACE gt tags lt INHIBITION FACTOR gt ID 1 T Exponent 1 05 lt FACTOR gt lt SUMMAND gt A 0 3 CO 0 75 C3H6 0 5 lt SUMMAND gt lt FACTOR gt lt FACTOR gt lt SUMMAND gt A 5 Ea R 5000 NO lt SUMMAND gt exponent 2 lt FACTOR gt lt INHIBITION FACTOR gt The complete list of options of the lt INHIBITION FACTOR gt tag is given in the following table ID i ID of inhibition factor T Exponent d temperature exponent default 1 lt Factor gt factor of the form 1 Ki Xi with following options in the lt FACTOR gt tag exponent d exponent of the factor default 1 lt Summand gt summand of the form K X1 n1 X2 n2 and in the lt SUMMAND gt tag A d preexponential factor default 1 Ea J_mol d activation energy J mol default 0 Ea kJ_mol d activation energy kJ mol default 0 Ea R d activation energy R K default 0 species name species name eed species exponent Each inhibition factor is identified by an ID number which must be an integer number 1 2 The inhibition factor can then be used to modify the Arrhenius law of a global reaction This is done by the optional parameter INHIBITION FACTOR within the lt GLOBA
2. 0 LIMEX h 1 0e 08 hmax 1 d0 rtol 1 0e 02 atol 1 0e 09 monitor 1 lt MOLEFRAC gt C3H6 0 996 CH4 0 003 C3H8 0 001 lt MOLEFRAC gt lt P_PROFILE gt 0 0 8000 30 0 10000 70 0 8000 100 0 10000 lt P_PROFILE gt lt T_PROFILE gt 0 0 1173 50 0 1273 100 0 1173 lt T_PROFILE gt lt OUTPUT gt mole concentration mole_fraction mass_fraction fileNr 1 dt_out 0 01 lt OUTPUT gt u lt lt lt lt BATCH gt 1 DAESOL 8 2 USER INPUT example 3 include species inp include mech inp lt BATCH gt p Pa 8000 d0 A m2 1 0 time 100 h 1 0e 08 hmax 1 d0 rtol 1 0e 03 atol 1 0e 09 monitor 1 lt MOLEFRAC gt C3H6 0 996 CH4 0 003 C3H8 0 001 lt MOLEFRAC gt lt V_PROFILE gt 0 0 1 5 30 0 1 0 70 0 1 5 100 0 1 0 lt V_PROFILE gt lt CONST_QUANTITY gt T K 1173 const_quantity Q Q or H surf_thermdata n lt CONST_QUANTITY gt lt OUTPUT gt mole y concentration y mole_fraction y mass_fraction y fileNr 1 dt_out 0 01 lt OUTPUT gt lt BATCH gt solver_id 1 0 LIMEX 1 DAESOL example 4 include species inp include mech inp lt BATCH gt solver_id 1 LIMEX 1 DAESOL V m3 1 0 A m2 1 0 time 100 h hmax rtol atol e monitor 1 lt MOLEFRAC gt C3H6 0 996 CH4 0 003 C3H8 0 001 lt MOLEFRAC gt lt P_PROFILE gt 0 0 8000 30 0 10000 70 0 8
3. Application The detailed washcoat model is a time consuming model Depending on the reaction system the calculation times can rise by one or two orders of magnitude The benefit of this model is that it can be applied to every reaction system Also the concentrations and coverages within the washcoat can be calculated 2 3 3 Effectiveness factor approach Consider the reaction diffusion equation 2 75 for a species with the folowing conditions e The species is consumed by a reaction with a first order rate law i e kc e The diffusion coefficient is constant e The washcoat is thick enough to assume zero concentration gradients at deepest point of the washcoat at position L In this case there is an analytical solution of equation 2 75 Y e e r eb e e cig ett cig e Olt 2 77 ed e where the so called Thiele modulus L 2 78 has been used for convenience 20 CHAPTER 2 FUNDAMENTALS OF DETCHEM The diffusion flux at the boundary between the gas phase and the washcoat can be seen as an effective reaction rate 5 jio tanh VkDcio 2 79 This expression can be compared to the surface reaction rate of the same amount of catalyst without diffusion limitations Si kLcio 2 80 The ratio of the two rate expressions is called effectiveness factor 7 which can be calculated analytically sj _ tanh Si Implementation If the effectiveness factor mo
4. Directory Content constant This directory contains a full description of the case mesh in a subdirectory polyMesh and files specifying physical properties for the application concerned e g transportProperties system This directory is for setting parameters associated with the solution procedure itself It con tains at least the following files controlDict in which run control parameters are set includ ing start end time time step and parameters for data output fvSchemes in which discretisa tion schemes used in the solution may be selected at run time and fvSolution in which the equation solvers tolerances and other algorithm controls are set for the run Additionally the keyword file couplingParameters for control of DUO has to be located in this folder lt time gt These directories contain individual files of data for particular fields The data can be ei ther initial values and boundary conditions that the user must specify to define the problem or results written to file by OpenFOAM Note that the OpenFOAM fields must always be initialised even when the solution does not strictly require it as in steady state problems The name of each time directory is based on the simulated time at which the data is written Since we usually start our simulations at time t 0 the initial conditions are usually stored in a directory named 0 or 0 000000e 00 depending on the name format specified For ex ample the velocity field U and the pr
5. The simulation of fluid flows which includes detailed schemes for surface and gas phase chemistry has recently received considerable attention due to the availability of faster computers the development of new numerical algorithms and the establishment of elementary reaction mechanisms A key problem still remaining is the stiffness of the governing equations because of the different time scales introduced by chemical reactions including adsorption and desorption Therefore simulations often use a simplified model either for the flow field or for the chemistry This simplification can be risky if there are strong interactions between flow and chemistry In this case extrapolations of the achieved results to conditions which are different from those used for the model validation are not reliable The DETCHEM software package consequently applies detailed models for the description of the chemical reactions and transport processes It has been designed for a better understanding of the interactions between transport and chemistry and can assist in reactor and process development and optimization The basic models of DETCHEM are DETCHEMGASPROBE DETCHEMSURFPROBE DETCHEMEQUL DETCHEMBATCH DETCHEMSTR DETCHEMSTAG DETCHEMPLUG DETCHEMCHANNEL DETCHEMCRIDGEN3D DETCHEMMONOLITH DETCHEMRESERVOIR DETCHEMS gt OFC DC40penFOAM e DUO 10 CHAPTER 1 GETTING STARTED 1 2 Program structure All the DETCHEM models are built up on the
6. lt PLUG gt lt GEOMETRY factor 1 gt Mechanism input file Species input file optional if washcoat reaction is desired opening tag for plug specific data opening tag for geometry specific data factor stands for the type of geometry HH RR HH lt CYLINDRICA1 gt opening tag for cylindrical geometry rin 0 025 radius at reactor inlet rout 0 025 radius at reactor outlet lt CYLINDRICAL gt closing tag for geometry lt SINUSOIDAL gt opening tag for sinusoidal geometry decay n option to specify whether the geometry has a decaying aplitude structure y or n decay at 3 1415 amplitude 1 5 step 0 001 if decaying structure then the starting point for decay multiples of pi amplitude of the sine wave surface area integration factor for sinusoidal geometry phase shift 0 1 desired phase shift decay ratio 0 2 rate at which decay should happen lt SINUSOIDAL gt closing tag for simusoidal geometry lt OTHERS gt opeing tag for other supported geometries dim 1 d 03 dimension for any geometry other then cylindrical lt OTHERS gt closing tag for other lt SECTION gt opening tag for cascading reactors length 1 0 length of the zone Fcat geom 1 ratio of catalyst to physical surface in this tw 1200 washcoat y gasphase reaction y surface reaction n lt SECTION gt lt GEOMETRY gt zone wall temperature of the reactor section washcoat reactions y or no n volumetric reactions
7. opening tag for output options file 6 integer number to be appended at the end of output file names title noo2 required title in the output file monitor 1 option to monitor the solution progress coverage y coverage output y or n species mass mass or mole output option for the species lt OUTPUT gt lt PFR gt 12 3 1 The lt SECTION gt tag With this tag the total reactor length can be divided into a maximum of 20 sections And each section can be assigned different properties For eg the porous media properties can be assigned different values as well as a particular part of the porous media can be assumed to be inert and so on 12 3 2 The lt WALL gt tag When it is desired to take care of the heat transfer from the outside wall this tag must be used and the wall thickness must be given In case if the thickness is assigned a value O then the conduction within the wall will not be taken care in the simulation 12 3 3 The lt SOLVER gt tag Though the solver option under the solver tag lets the user to switch between LIMEX and DASSL it is highly recommended to use LIMEX in this release of the code 12 3 4 The lt TOLERANCE gt tag The convergence rate can vary from case to case In any case if the code fails during the run then the user is advised to change the tolerance parameters as well as hmax under the lt SOLVER gt tag 1 e lowering hmax and increasing tolerances can help in convergence There are no stric
8. If the user wants to calculate a monolith with flow regions upstream or around a monolith it might be insufficient to use this rough approach Additionally chemical reactions may be of interest in these flow regions There are solvers in OpenFOAM which can handle gas phase reactions But until now there is no capability to handle 18 2 PROGRAMMING OF DUO 131 Figure 18 3 Mapping CFD mesh to 1D grid surface reactions Within DC4OpenFOAM the calculation of properties and gas phase source terms is managed using a precompiled shared library which was made out of several parts of the DETCHEM toolbox Figure 18 4 shows the principal structure of the Internal Coupling For each cell of the fluid domain calls to subroutines which are implied in the library are performed For each cell the variables the pressure the gas temperature and the concentrations of the gas phase species have to be provided to the library From that the properties heat conductivity dynamic viscosity and the multi component diffusion coefficients of the gas phase species are send back to the CFD code The same holds for the calculation of the source terms of the gas phase kinetics For the calculation of the surface reactions terms the temperature of the wall is needed additionally C Mixing of External and Internal Coupling The two couplings can be mixed up If we want for example to calculate a reformer where the flow in the channels of the monolith should be calculate
9. In the stagnation point flow reactor catalytically active surface interacts with the surrounding flow Therefore model equations consist of three parts i e gas phase equations surface equations and boundary conditions 10 2 1 Gas phase equations Temperature equation Neg Ng OT x 1 OT 1 x 1 9 0T ae Pvx De MA M h 04 10 1 PPS x Pep E PCp Ox x Species equation OY x OY 1 1 Oj era 10 2 t p x p p Ox Continuity equation N P M SOY T Pvx T 2pV 10 0 RT iM p Ep 10 3 Radial momentum equation E A 1 E A eN 10 4 p Ox p pax dx The equation for the eigenvalue of the momentum OA 0 On 10 5 x Ideal gas law 7 M p Tr 10 6 Axial velocity v appears in the equations However pv is considered to be an independent variable not only the axial velocity Heat capacity c thermal conductivity A and viscosity u of the mixture heat capacity c molar mass M and enthalpy h of each species and gas phase reaction rates Ww are calculated in the DETCHEM library Diffusion velocity of each species is also introduced in the temperature and species equations It is calculated at the mixture average level by the following equation Y OX DOT ji gt 10 7 D m iM Y Ox T Ox 63 64 CHAPTER 10 DETCHEMS S Diffusion velocities are corrected with the Eq 10 8 Ne eis 10 8 k 1 where Y is the mass fraction of each species Mol
10. Inhibition factors The rate laws of global net reactions can be quite complex However for technical systems like in the automo tive exhaust gas aftertreatment a detailed reaction mechanism is either not available or not feasible for a fast solution In such cases experimental data is used to fit parameters that cover the desired range of conditions Often a simple Arrhenius law is not satisfying enough Especially in cases where washcoat effects are directly taken into account in the rate expression so called inhibition factors are frequently used The type of inhibition factors that can be evaluated within a global reaction definition is a follows I 3 4 b b TR 1 K X X KoX X IH KXSXE with Ei K Ai exp 3 5 The inhibition factors contain a temperature dependent factor and a product of composition dependencies Each of those factors consists of a sum of terms that depend on the mole fractions of one or two species The factors themselves can be raised to an arbitrary power Furthermore the K are Arrhenius type of rate factors with and pre expontial factor A and an activation energy E Therefore several parameters can be defined an temperature exponent mole fraction exponents a factor exponents b and Arrhenius parameters A and E The definition of an inhibition factor will be illustrated by an example Suppose an inhibition factor 1 T105 1 0 3 X075x05 1 Sexp 09X o
11. patch names given in mapsToDetchemTubes namesOfCoupledPatches a C tube number has to be allocated Number_1 For the equivalent wall patch the Number_2 result of a DETCHEM calculation is applied The number of entries in the list has to be the same as the number of entries in the list namesOfCoupledPatches Dict Dictionary to control which mapOutletsToDetchemTubes namesOfCoupledOutlets outlets are used as inlets in the DETCHEMcalculations Requires the list namesOfCoupledOutlets 142 CHAPTER 18 DUO List For each of the boundary out lets Name_x area averaged val ues are calculated and used as C inlet conditions by DETCHEM Name_1 If coupleOutlets is active the Name_2 number of entries in the list has to be same as the integer numberOfDetchemTubes namesOfCoupledOutlets Numerical parameters repetitionFactor I DETCHEM is called at every n it any eration 18 3 5 Start of a Calculation with DUO Start the OpenFOAM application DUO by typing the command chtMultiRegionSimpleFoamChemDuo All the keywords required for the coupling to DETCHEM see table Tab 4 1 have to be present in the file lt caseDir gt couplingParameters Now the entry for the keyword coupling has to be coupling on For the first run it is advisable to activate additional output by setting debugLevel 2 You could also create an executable shell script named start
12. 3d heat transfer code OpenFOAM Fluid 3d flow code OpenFOAM External Coupling Grid cell pa Internal Coupling Fluid properties gas phase chemistry surface chemistry Figure 17 1 Typical configuration of a calculation domain 17 1 3 How DUO and DC40penFOAM work A DUO External Coupling to OpenFOAM The capability of DUO is to model a reformer based on a monolithic structure In figure 17 1 a schematic drawing of a monolith with nine channels located in a surrounding flow field is shown The flow covers the region upstream of the monolith as well as the channels in the monolith Heat transfer occurs inside the fluid and the solid regions as well as at the interfaces between these regions Using DUO the flow outside of the monolith is calculated with the CFD code OpenFOAM which handles essentially arbitrary geometry In addition to the outer fluid flow the code also solves the conjugate heat transfer in the solid structure of the monolith This implies the handling of the heat transfer between the solid and fluid regions as well as the exchange of heat with the external environment In the outer flow regions the chemistry is often simple or can be fully neglected The flow inside the channels is calculated with DETCHEM codes by applying detailed gas phase and surface chemistry As the flow is handled as a one or two dimensional flow only a simple grid is used This 17 1 INTRODUCTION 115 Fl
13. 8 su wann a Ss wR Ae a len 137 1 User Inp t Tore 2 284 8 Zus he eng Ade a wR ge tt he dS ed 13 722 OUtpur to tio ee A ee teilte BLS 14 DETCHEMGRIDGENSD 14 1 14 2 14 3 14 4 14 5 IMtOdUCH ONY s 6 35 Shape B s ee eo Be ole et chas UserInp t soes 8 eo 3 Par eR A ye Be Ed ee eo Bet EE 14 2 1 The lt POLYGON gt tag ee 14 2 2 The lt CIRCUMPOINTS gt tag ee ee 142 3 The lt TECPLOT gt tag emp 2 25 4 Ske sus way May np ne ae Rara 14 2 4 The lt LAYER gt tag 22 2 oo ee ee 14 2 5 The lt BORDER gt tag col 220 nn nn a res QUUPUL es a rs 8 Bedok See ee Rd dE ee ee 14 3 Serec output Sa are he eh ee Elend he with 14 32 BETA u thee la are Re de a le 143 3 Bra plt 2 2 52 AA ra een ap Examples o lt Se en s ee ee dde lewis af Fe a a re Running the tool ene Ce e er en a LEE De a O Et 15 DETCHEMRESERVOIR 15 1 15 2 15 3 15 4 15 5 Introduction be ke AE AAA et USET IPU A 4 24 un A ee oe Rae ce A AA ie QUIPUL I ae en ae BAG a ee De ita Dr te Oe oe ee Examples una er ee AA AS a wer Running the tool sia ba is eBook Sak 2S ee eM Se oS et Be 16 DETCHEMS FC 16 1 16 2 16 3 16 4 Introduction ic 2 ek weeding GR Se gee Be eras Bae ele a Rogen a age Physical and chemical fundamentals e 16 2 1 Heat and mass transport CC mn nn Wser Input tac et RE AE OR oe Ge BEE Se ee es Cupos ad Bet te Bete tes EE A A Ge Bette 16 4 1 EXam
14. Temperature K E 1200 Pressure Pa 100000 Gas Species Mass fraction Mole fraction concentration mol m 3 NO 0 00000000 0 00000000 0 00000000 02 0 00000000 0 00000000 0 00000000 NO2 0 15432169 0 10000000 1 00226377 0 0 00000000 0 00000000 0 00000000 N2 0 84567831 0 90000000 9 02037391 Initial Coverage PT s 1 OCs 0 NO2 s 0 NO s f 0 Coverage after 100 s PT s 0 445116025 OCs z 0 554778335 NO2 s 0 000105502945 NO s 1 34432106E 07 Fluxes at surface mole m 2 s kg m 2 s NO 0 44215373E 01 0 13267707E 00 02 0 22107687E 01 0 70742386E 01 NO2 0 44215373E 01 0 20342167E 00 0 0 00000000E 00 0 00000000E 00 N2 0 00000000E 00 0 00000000E 00 Net surface mass flux 2 21076882E 06 kg m 2 s d Coverage dt after 100 s PT s 0 44304429E 06 OCs 0 44206469E 06 NO2 s 0 76278853E 07 NO s 0 76768657E 07 6 4 Examples There is one example supplied with the installation The example directory contains the following files surf probe inp species inp mech inp a gas phase mechanism noo2m a surface mechanism noo2sm thermdata moldata and a script file go The script file go may be used for convenience to call the executable and run the program It requires a system variable DETCHEM DIR that contains the path to the DETCHEM root directory Depending on your system you can set this variable by either of these commands export DETCHEM_DIR myDirectory DETCHEM or setenv DETCHEM
15. and i i 2 88 s Du Dmoli Dinud du In all the above models p T dp Mi Dmoli Dinud i Dett i Em represent the porosity tortuosity pore diameter molecular weight of species i Binary diffusion coefficient of species i Knudsen diffusion coefficient of species i Molecular diffusion coefficient of species i porosity for macro pores and porosity for micro pores respectively Chapter 3 Input files This chapter briefs about the input files used in DETCHEM models Other than the files described in this chapter there are model specific input files and the CHEMINP gener ated detchem inp file Model specific input files are explained in the specific chapters for each model and detchem inp is explained in chapter 4 3 1 General structure of inp files One of the major changes comparing version 2 0 with previous versions of DETCHEM is the syntax of input files Except for the databases thermdata moldata and the mechanism files all application specific data is now specified using the same format These files should be assigned an application specific name with the extention inp The generic structure of such input files can be described as follows command lt tagl gt optionl value option2 value option3 string option4 lt tag2 gt option5 value lt tag2 gt lt tagl gt comment 1 comment 2 comment 3 comment4 There are several items e tags options values nu
16. coupling plug couple0utlets on repetitionFactor 10 debugLevel 1 directionOfPatches Zs numberOfDetchemTubes 2 lengthOfDetchemTubes 0 01 numberOfDetchemBands 50 SUBDICTIONARY 1 MAPPING PARAMETERS FOR WALLS namesOfReferencePatches C WALL_0202 WALL_0204 3 namesOfCoupledPatches WALL_0201 WALL_0202 WALL_0203 WALL_0204 I SUBDICTIONARY 2 MAPPING PARAMETERS FOR OUTLETS namesOfCoupledOutlets C FLUID_0UT_0202 FLUID_0UT_0204 VE A File Header After the several comment lines usually used in OpenFOAM files a block starts in which some information about the file can be found In this part the user does not have to change anything Next the standard parameters for the coupling can be found Make sure that each line ends with the symbol After that the dictionaries including the parameters for the control of the patch mappings are shown 18 4 APPENDIX 145 Standard parameters The coupling to DETCHEM itself is activated coupling on The coupling of outlets to DETCHEM in lets is active coupleOutlets on A calculation with plug or channel is performed at every 10th timestep repetitionFactor 10 of OpenFOAM The amount of information output is moderate debugLevel 1 The tubes point into the direction z directionOfPatches z The count of tubes of the monolith for which a DETCHEM calculation is performed is 2 numberOfDetchemTubes 2 The length of the tub
17. important tags and input parameters are separately described below lt SOFC gt tag This is the opening tag for the sofc input parameters The general behavior of the solution is controlled by the parameters specified right after this tag They are described below e op_pre this specifies the operating pressure e surfchem the surface chemistry can be stitched on or off by assigning yes or no to this option The surface chemistry option may be switched off for a case of pure Hz species which saves the computation time e open_circuit when this option is specified as yes then the electrochemistry solution is automatically switched off In this case the fuel cell reactor behaves like a normal chemical reactor e pot_step potential step for polarization curve If one desires to do a button cell calculation then the pot_step option must be specified If the button cell option is specified as no and the pot_step option is specified then the code will start simulating a polarization curve for a channel case The code will start calculating the current for the cell potential specified by Ecell and then steps specified by pot_step will be taken For eg if Ecell is specified as 0 9 and pot_step as 0 1 then the code will start calculating the current for cell potentials 0 9 0 8 0 7 and so on until Ecell becomes 0 lt GEOMETRY model gt tag This tag is used to specify the geometrical configuration of the model Four different configurations are
18. lt TOLERANCE gt The user can specified multiple Feat geo profiles for different surface sites lt FCATGEOPROFILES gt Nsites 1 number of surface sites lt list gt Pt lt list gt z fcat geo 0 0 15 0 0254 25 lt FCATGEOPROFILES gt 13 7 2 Output The screen output looks like Fe Fe de de Fe Fe Fe Te Fe Fe de Fe Fe Fe Fe Fe Fe Fe de Fe Fe Fe Fe Fe Fe Fe de Te Fe Fe Fe Fe Fe Fe de Te Fe Fe Te Fe Te Fe e Te Fe Fe Te e Te Te Fe Fe Fe de Te Fe Fe Te Fe Te Fe e Te Fe Fe de Fe Te KKK wur DETCHEM BLAYER war war HOANG DUC MINH war SEHE VERSION 2 0 1 2007 07 16 EEE TI RE RU RE Fe Fe RR RRA RR RARE Fe de Te Fe RR RARE RARE RR RR RR Te Fe Te RAR RR RR Te Fe Fe Te Fe de de e Te Fe Ke Te Fe zZ 1 0000E 11 step_size 1 0000E 11 order 1 next_order 1 Zu 2 0000E 11 step_size 2 0000E 11 order 1 next_order 1 z 4 0000E 11 step_size 4 0000E 11 order 1 next_order 1 zt 8 0000E 11 step_size 8 0000E 11 order 1 next_order 1 zi 1 6000E 10 step_size 1 6000E 10 order 1 next_order 1 zZ 3 2000E 10 step_size 3 2000E 10 order 1 next_order 1 z 6 4000E 10 step_size 6 4000E 10 order 1 next_order 1 zZ 1 4971E 02 step_size 2 6213E 03 order 3 next_order 3 zi 1 7592E 02 step_size 3 0224E 03 order 3 next_order 3 zi 2 0615E 02 step_size 3 4702E 03 order 3 next_order 3 Zi 2 5400E 02 step_size 2 2096E 03 order 3 next_order 3 2 CHAPTER 13 DETCHEMCHANNEL SIMULATION IS SUCCESSFULLY FINISHED NUMBER OF STEP 78 THE OUTPUT IS
19. name s surface mechanism name file s surface mechanism file name lt REACTION gt elementary step reaction lt STICK gt stick reaction lt GLOBAL gt global surface reaction One or more external surface mechanism files see chapter 3 5 can specified by the file option Alterna tively or in addition the user can define stick reactions elementary step reactions with Arrhinus rate laws or complex global reactions with arbitrary rate laws The syntax will described later in this chapter If the logical option MotzWise is set then the Motz Wise correction for stick reactions will be applied lt REACTION gt elementary step reactions Both gas phase and surface reactions can be declared in the input file by using the lt REACTION gt tag Each tag holds one reaction and its reaction parameters as shown in the example below lt REACTION gt NO2 NO2 NO NO 02 A cm_ units 1 6el2 Ea kJ_mol 109 19 lt REACTION gt First the reaction equation is written in a natural way It is only required to separate species names and operators by at least one blank character Each reaction can contain up to 3 reactants and up to 3 products The limitation to a total of 5 species of the formatted input files does not apply However stoichiometric coefficients cannot be applied see also input for global reactions further below Use a sign to separate two reactants or two products The gt and symbols are used for a non reversible a
20. the inlet options can be summarize as follows type s type of inlet condition constant or variable FILE s name of inlet input file velfactor d conversion factor for inlet velocities default 1 user b use user defined inlet conditions default no External inlet file For variable inlet conditions it is necessary to prepare another input file It can have any name e g inlet inp Use this name as reference for the file member in the lt INLET gt section of the input file The inlet file consists of two sections lt INLETINFO gt and lt INLETDATA gt An example is shown below lt INLETINFO gt u 0 8 constant velocity lt MOLEFRAC list gt CH4 02 N2 lt MOLEFRAC gt lt INLETINFO gt lt INLETDATA gt time CH4 0 0 0 0 5 0 1 60 0 1 120 0 1 lt INLETDATA gt eses RkENNN eses CON aN In lt INLETINFO gt the user needs to specify which data is read from a list or file and which is constant Assign a constant value or the keyword list to the parameter u for velocity and to lt MASSFRAC gt or lt MOLEFRAC gt for the species composition The section lt INLETDATA gt contains the values of all data that has been assigned the list option Although it is not required it is strongly recommended to use a column oriented format for better readability The first 15 3 OUTPUT 101 column contains the start time of the following conditions These conditions are valid until the next time in the list or until the simula
21. 0 gradient uniform 0 value uniform 0 WALL_0202 type detchemHeatFluxTemperature K q uniform 0 gradient uniform 0 value uniform 0 WALL_0203 type detchemHeatFluxTemperature K K 146 CHAPTER 18 DUO a uniform 0 gradient uniform 0 value uniform 0 WALL_0204 type detchemHeatFluxTemperature K K a uniform 0 gradient uniform 0 value uniform 0 The values for the parameters K q gradient and value are arbitrary because they are not used 18 4 2 Example of an Input File plug inp In the following an example of a parameter file named plug inp which is necessary for DUO to call the exe cutable DETCHEMPFUS is printed and described This file has to be located in the folder lt caseDir gt detchen verbose n include species inp include mech inp include walltemp to DETCHEM include outlet to DETCHEM lt SURFACE MODEL gt lt CHEMSURF gt hini 1 d 10 time 10 lt CHEMSURF gt Fcatgeo 5 lt SURFACE MODEL gt lt PFR gt lt GEOMETRY gt reactor cylindrical lt SECTION gt length 0 0002 rin 0 000796 rout 0 000796 isothermal n adiabatic n mass transfer n axial temp profile n gaschem n surfchem y tw get T1 lt SECTION gt lt SECTION gt length 0 0002 rin 0 000796 rout 0 000796 isothermal n adiabatic n mass transfer n axial temp profile n gaschem n surfchem y tw get T50 lt SECTION gt lt GEOMETRY gt lt INLET gt u0 get Vinlet p0 1 e 05
22. 1 6 relative_load 1 zone2 lt ZONE gt ngrid 10 thickness 1 d 4 lt ZONE gt porosity 5 tau 3 diameter 1 7 relative_load 3 lt SOLVER gt time 10 lt SOLVER gt lt MIXED_DIFF gt lt SURFACE MODEL gt In this example the two zones are both 1 mm thick but they differ in their pore diameters and their catalyst loadings First the fluid encouters a layer with large pores Below there is a layer with smaller pores but the specific catalytic surface area is three times larger Use the parameter relative_load in order to define a ratio of the catalytic surface areas of the two layers only the ratio of the two values is important The actual amount of catalyst in the layers also depends on their thickness and the total catalytic surface area defined in lt Fcatgeo gt Unfortunately it is not possible to define layers with different F at geo 1 the composition of the washcoat must not change Otherwise the effectiveness factor model would not be applicable Therefore it is not possible so far to define a system with two layers of different coatings e g one layer platinum and one layer rhodium However by assigning relative_load 0 in one layer an inactive layer can be created Options in lt ZONE gt ngrid i number of grid points aspect d aspect ratio of adjacent grid cells default 1 1 e equal spacing thickness d thickness of washcoat layer m Options in lt MACRO gt and lt MICRO gt porosity d porosity of wash
23. 1 d 4 rtol 1 d 4 atol 1 d 20 lt SOLVER gt lt MIXED_DIFF gt EFF_MODEL 02 lt SURFACE MODEL gt lt CHANNEL Version 2 0 gt lt BASICS gt title CH4_auf_Rh ngrid 18 zmax 0 01 rmax 0 0004384 lt BASICS gt lt SECTION gt gaschem n lt WALL gt surfchem y mechanism Rh lt WALL gt lt SECTION gt lt SOLVER gt hini 1 d 10 hmax 0 01 lt SOLVER gt lt OUTPUT gt outg y outs y outflux y summary n file get Filenumber copy n monitor 1 molefrac y lt OUTPUT gt lt INLET gt u get Vinlet p 1 e 05 TO get Tinlet lt MOLEFRAC gt C O 1 0 CH4 0 13 02 0 0666 N lt MOLEFRAC gt lt INLET gt lt TPROFILE gt include points txt lt TPROFILE gt lt CHANNEL gt The file points txt includes the temperatures of the 50 bands or sections which were choosen here to ex change data between the codes Caution DETCHEMCHANNEL needs here 51 data points because the temperature is specified at the bound aries of the sections The temperatures calculated in OpenFOAM are the average temperatures of each band Therefore we get 50 values We use the temperature of band 50 for the left and the right boundary of the last section Contrary in DETCHEMPLUS the temperature is defined for the whole band lt DISCRETE gt 0 0 get T1 0 0002 get T2 0 0004 get T3 0 0096 get T49 0 0098 get T50 0 01 get T50 lt DISCRETE gt Description For the explanation of the keyword
24. 128 18 1 4 How DUO and DC40penFOAM work 2 2 non 128 18 2 Programming of DUO mora a be ee 131 18 21 Open FOAM 2 Ste ie 2 4s A a ke 131 18 22 Code Files u pts ii Br EEE De Bg eel dos 132 18 3 Usage of DUO wes 4 4 tr Bane eh aE a ee Bed ia 133 18 3 1 General a rs a A 133 18 3 2 Installation and Test e 133 18 3 3 Preprocessing oR ee e RNA eee A e 135 18 3 4 Control Gf DUO ori ne a ne ae Sp Ae EL idR 139 18 3 5 Start of a Calculation with DUO 2 aaa 142 18 3 6 Data Exchange 4 2 e 2 8 4 un a ee Bu e 142 18 3 7 Data Output c cial 2 bod ae Dr en ag 143 18 4 Appendix 2 xis ia ae ner BE E E AO IAE RA 143 18 4 1 Example of a Keyword File couplingParameters 22220 143 18 4 2 Example of an Input File plug inp ooo o 146 18 4 3 Example of an Input File channel inp Coon 147 19 DETCHEM Parameters 151 20 Installation guide 153 207 Extract datas da a ir A EAS A A Re Peed 153 20 27 Run Make 6 0 ad AA IS a Pe AA A ee 154 Chapter 1 Getting Started This chapter provides an introduction to DETCHEM an explanation of its structure and capabilites The detailed explanation of the models are presented in the subsequent chapters 1 1 Introduction Chemical reaction engineering and combustion processes are very often characterized by complex interactions between transport and chemical kinetics The chemistry may include gas phase as well as surface reactions
25. 68 The parameters a T T und T are the so called Troe parameters and they are used to fit experimental data 2 2 4 Surface Reactions The description of surface reactions has been chosen in analogy to the gas phase reactions However since there exist almost innumerable numbers of different surface structures only little is know about the exact reaction paths Instead of looking at interactions between single adsorbed species we will use a mean field approximation for the description of the surface Thus the adsorbate on the surface are described in terms of locally varying coverage fractions that represent concentrations of randomly distributed particles The set of surface reactions shall be denoted by Rs In the case of the existence of more than on surface type it can consist of several disjoint subsets R j 1 2 The surface reaction rate is then given in analogy to eq 2 59 X vi ke ies 2 69 keRs jeS Using an Arrhenius expression eq 2 55 local interactions between adsorbate and their influence on the rate coefficients can be modeled in the mean field approximation by an additional factor Ear kk AP expe fan 2 70 Some adsorbate may change the energy potentials of the surface which lead to a change of activation energies for some reactions Furthermore the probability of adsorption can be changed which is associated with the pre exponential factor Therfore the function fg shall be chosen as follo
26. CHANNEL ngrid i number of radial grid points zmin d starting position of the channel default 0 zmax d end point of the channel or length rmin d inner radius of an annular channel default 0 rmax d radius of the channel DETCHEMCHANNEL was desinged to simulate cylindrical channels Nevertheless the same approach is also valid for annular reactors i e cylinder geometries with an inner and an outer wall Use the rmin member to specify the radius of an inner wall 13 2 2 The lt SECTION gt tag The user can divide the channel in to several default up to 5 sections This is desired when you have different catalyst properties along the length of the channel or when the wall surface reactions are happening only at certain specific part of the reactor In each of the sections you can specify the following options to d end point of section default zmax gaschem b enable gas phase chemistry default no lt INWALL gt inner wall boundary conditions for an annular channel default none lt WALL gt wall boundary conditions whereas the lt WALL gt and lt INWALL gt subsections contain boundary b enable flow boundary condition default yes surfchem enable catalytic surface reactions default no adiabatic b adiabatic wall conditions default no Fcatgeo d ratio catalytic geometric surface area default 1 mechanism s surface mechanism name default first surface mechanism defined in lt MECHANISM gt The me
27. German for and OpenFOAM and is a synonym for the joint utilisation of these two programmes OpenFOAM is an open source CFD tool which enables the calculation of three dimensional fluid and solid regions It is free of cost DETCHEM is a purchasable package of tools specifically designed for the modeling and simulation of reacting flows particularly for heterogeneous systems such as catalysis materials synthesis and fuel cells The simulation tool DUO is the gateway between the two codes The basic idea is to combine the advantages of the two programmes Parts of the DETCHEM software can be used in different ways additionally to OpenFOAM The user has to distinct between two different approaches DUO and DC4OpenFOAM which can be applied solely or together In DUO sinele tools of DETCHEM are called as external executables from OpenFOAM external coupling These tools calculate flow and the complex reactions in straight channels in one or two dimensions in space axial or axial radial This feature can be used to calculate monolithic structures with many channels or tubes In this case the flow regions inside the channels are not included in the CFD grid The data exchange between the codes is managed with ASCII data files In DC40penFOAM some features of DETCHEM are provided by calling a precompiled shared library internal coupling This feature is used to calculate the fluid properties and the source terms of the chemical reactions in arbitrary regio
28. Hence regular triangles squares hexagons and other polygons can be modeled The lt POLYGON gt sections expects the following parameters n i number of edges r d radius of polygon m r2 d second radius of an ellipsoidal polygon m default r dmax d maximum distance of grid points m default circumference n name s layer name used as ID Define the shape maximum grid size and a name of the polygomial domain The name member use up to 8 characters will be used in the grid definition of the DETCHEMMONOLITH input file to refer to this domain The definition lt POLYGON gt name poly n 20 number of points r 0 10 radius r2 0 08 2nd radius if elliptical can be omitted dmax 0 03 maximum distance between 2 grid points lt POLYGON gt results in a grid like shown below 14 2 2 The lt CIRCUMPOINTS gt tag In this section an arbitrary shape of the monolithic domain can be declared by giving the coordinates of its vertices Besides the coordinates two more parameters are required dmax d maximum distance of grid points m name s layer name used as ID x coordinate y coordinate coordinates x y of circumferential points m The name member use up to 8 characters will be used in the grid definition of the DETCHEMMONOLITH input file to refer to this domain The definition lt CIRCUMPOINTS gt name poly dmax 0 01 maximum distance between two grid points 0 0 y and z coordinates of circumference 10 1
29. Lennard Jones potential well depth e kg in K 2 920 Lennard Jones collision diameter o in Angstroms 0 000 Dipole moment u in Debye 0 790 Polarizability in cubic Angstrom 280 000 Rotational relaxation collision number Z ot at 298 K Wa 82 Comment Each species occurring the mechanism files described later must be contained in this database otherwise the program will formally fail Except the molar mass data all other data do not have any meaning for surface species 3 4 Gas phase chemistry mechanism file The gas phase chemistry mechanism file lists the elementary reactions occurring in the gas phase This file can be give any name and the same should be mentioned in the mech inp file description follows For convenience the user is advised to copy and modify the lines while keeping the same format An example of gas phase reaction mechanism file is shown below 26 CHAPTER 3 INPUT FILES MECHANISM OF THE NO 02 REACTION P KLAUS 1997 RRA 0 0 4 M 1 02 M 1 2 900E 17 1 000 0 0 NO2 M 1 NO 0 M 1 1 100E 16 0 0 275 88 NO2 0 NO 02 1 000E 13 0 0 2 51 NO2 NO2 NO NO 02 1 600E 12 0 00 109 19 END 000 COMPLEX REACTIONS END COLLISION EFFICIENCIES MD 02 N2 0 40 0 40 END In the above example each reaction is given in one line Irreversible reactions denoted by gt as well as re versible ones denoted by can be specified The reaction equations can have a maximum of 3 species on the left and three spe
30. MONOLITH gt sections you can redefine the parameters directly in the input file For this insert a lt PARAMETERS gt tag directly after the opening tag of one of these sections The lt PARAMETERS gt tag must be the first evaluatable option in these sections For instance lt SPECIES gt lt PARAMTERS gt DCSGMAX 500 maximum number of gas phase species DCSMMAX 50 maximum number of collision efficiencies lt PARAMETERS gt lt GASPHASE gt FR Er list of species lt GASPHASE gt lt SPECIES gt lt MECHANISM gt lt PARAMETERS gt DCRGMAX 2000 maximum number of gas phase reactions DCRGTMAX 100 maximum number of Troe reactions DCRGGMAX 20 maximum number of global gas phase reactions lt PARAMETERS gt lt GASPHASE gt E a gas phase mechanism lt GASPHASE gt lt MECHANISM gt In case dynamic memory allocation is not yet available you have to change the parameter in the file named by the error message and recompile the application If you change a parameter in on of the DETCHEM libraries it is required to recompile the whole package by calling make in the DETCHEM root directory The following table gives an overview of the parameter files 151 152 module lib_input lib_detchem lib_washcoat CHANNEL GRIDGEN3D MONOLITH filename constINP F commINPlink F parameterDC f90 parameterWC f90 parameterBL f90 commGRID F parameterM f90 CHAPTER 19 DETCHEM PARAMETERS kind of p
31. Operation and Manipulation is a free open source CFD software package developed by the OpenFOAM Team at SGI Corp and distributed by the OpenFOAM Foundation It has a large user base across most areas of engineering and science from both commercial and academic organisations OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions turbulence and heat transfer to solid dynamics and electromagnetics It includes tools for meshing and for pre and post processing Almost everything including meshing as well as pre and post processing runs in parallel by default enabling users to take full advantage of the computer hardware at their disposal 132 CHAPTER 18 DUO Fluid and solid DETCHEM Figure 18 4 Internal Coupling between DETCHEM and OpenFOAM By being open source OpenFOAM offers users complete freedom to customise and extend its existing functionality either themselves or through support from OpenCFD The code follows a highly modular de sign in which collections of functionality e g numerical methods meshing physical models etc are each compiled into their own shared library Then executable applications are created that are simply linked to the library functionality OpenFOAM which includes over 80 solver applications that simulate specific problems in engineering mechanics and over 170 utility applications that perform pre and post processing tasks e g meshing
32. THE bl plt FILE FOR GAS PHASE SPECIES AND THE surf plt FILE FOR SURFACE SPECIES The gas phase species mass fractions mole fractions and the temperature the pressure the axial velocity profiles are written in the file bl plt in 2 D TECPLOT format The average of gas phase species mass fractions mole fractions in radial direction are written in in the file avg plt in 1 D TECPLOT format The the surface species coverages are written in the file surf plt in 1 D TECPLOT format Chapter 14 DETCHEMCRIDGEN 3D 14 1 Introduction DETCHEM DGENSD is a preprocessor for generating grid information used by DETCHEMMONOLITH in case of 3 dimensional simulations Run DETCHEMSRIDGEND prior to setting up your 3d problem with DETCHEMMONOLITH The preprocessor can be used to create simple grids for an arbitrary cross section or to import grids in TEC PLOT format that have been created with other programs If the user wishes to run a 3d simulation with spatially varying inlet conditions the grid of the inlet data must be imported using DETCHEM SR DGENSD In any DETCHEMMONOLITH simulation the cross section of the domain must not change along the channel axis Therefore it is sufficient to specify the geometry of the cross section This arbitrary two dimensional shape will be discretized by a triangular grid DETCHEMCRIDGENSD tries to make the grid as regular as possible so that neighboring cells have similair size On execution DETCHEMCRIDSENSD generat
33. TO get Tinlet lt MOLEFRAC gt CH4 0 133 02 0 0666 N2 lt MOLEFRAC gt lt INLET gt lt SOLVER gt ini_step 1e 16 max h 2e 4 lt TOLERANCE gt s_aTol 1 0d 06 s_rTol 1 0d 05 t_aTol 1 0d 06 t_rTol 1 0d 06 al_aTol 1 0d 06 al_rTol 1 0d 06 lt TOLERANCE gt lt SOLVER gt 18 4 APPENDIX 147 lt OUTPUT gt file_num get Filenumber title CH4 coverage y species mole monitor no lt OUTPUT gt lt PFR gt Description For the explanation of the keywords the user should read the manual of DETCHEMP WS Here only the entries which are essential for the performance of DUO are explained An important fact is that we have a tube which is divided in 50 geometrical sections or bands The definitions for each band can be found between the tags lt SECTION gt and lt SECTION gt only two of them are shown in the example It should be recapitulated that the calculations for all coupled tubes or channels take place in the same directory using the same input file plug inp The names of the include files are therefore always constant But the content of the include files changes for each tube because it is overwritten by DUO for each DETCHEM calculation The included files are linked in the first lines In the file walltemp to DETCHEM the wall temperatures for the bands and the tube identification number can be found Here is an example of the content of the file Define Filenumber 2 Define T1 1050 Define T5
34. VERSION 2 0 01 01 2004 RRR weer A A AAA PETES e de de de Te Fe Fe Te Fe Fe de Fe Fe Fe Fe Fe Fe Fe Fe Te Fe Fe Fe Fe de Fe de Te Fe Fe Fe Fe de Fe Fe Te Fe Fe Te Fe de Fe Fe Te Fe de Te Fe de Te Fe de Fe de Te Fe Fe Te Fe de Fe Fe Te Fe e Te Te Te Fe Ke Te Te Iterations 1 0 00000 700 00000 2 0 00000 698 27944 3 0 00000 700 85369 56 0 04867 1200 01246 57 0 04967 1200 01246 58 0 05000 1200 01199 Elapsed Execution time 0 180971995 User time 0 175972998 System time 0 00499900011 11 3 2 outg plt The output file outg pit lists velocity residence times temperature density and the gas species mass or mole fractions depending on whether the species tag in lt OUTPUT gt element is supplied with mass or mole option 0 1 Without mass transfer With mass transfer 0 08 Mole fraction 0 024 11 3 3 outs plt If coverage option is chosen in then the file outs plt will be produced which lists the surface coverages along the axial position of the reactor 11 3 4 trans plt If transfer coeff option is chosen then the file trans plt will be produced which will list the mass and heat transfer coefficient calculated using the correlations 11 3 5 summary dat The file summary dat contains the exit temperature and composition of the species listed in the lt SUMMARY gt tag If the lt SUM gt tag is also used then the file summary dat also contains the sum of the mass mole
35. availability of finanical resources 17 1 2 Simulation Tools DUO and DC40penFOAM To reduce the costs of modeling the calculation has to be fast and the software should to be powerful and cheap The licensing of a commercial CFD code is very expensive and often not suitable for small companies OpenFOAM is an open source CFD tool free of cost which enables the calculation of three dimensional fluid and solid regions www openfoam com However the handling of detailed thermophysical properties and chemical surface reactions is left to the user Parts of the DETCHEM software can be used in different ways additionally to OpenFOAM The user has to distinct between two different approaches DUO and DC40penFOAM which can be applied solely or together In DUO single tools of DETCHEM are called as external executables from OpenFOAM external coupling These tools calculate flow and the complex reactions in straight channels in one or two dimensions in space axial or axial radial This feature can be used to calculate monolithic structures with many channels or tubes In this case the flow regions inside the channels are not included in the CFD grid In DC40penFOAM some features of DETCHEM are provided to OpenFOAM calling a precompiled shared library internal coupling DC4OpenFOAM is a collection of tools from DETCHEM to handle ther mophysical properties and detailed chemistry gas phase and surface within OpenFOAM DC4OpenFOAM is an interface from D
36. avg_cd lt SOLVER gt tag check_negative option Other than the input variables for the solver defined in the user input section the check_negative option can also be used in case of convergence difficulties In certain cases if the code faces some convergence difficulties it is recommended to rerun the calculation with the option check_negative yes With this option switched on the calculations may turn slower By default this option is switched off and in most cases the code runs successfully with this option switched off lt TOLERANCE gt tag The tolerance tag holds the tolerance values for various dependent variables In the case of convergence diffi culties the user may relax the tolerance parameters In all cases we recommend to try out the tolerance values specified in the examples lt OUTPUT gt tag In the output tag the user can specify either mole fraction or mass fraction output for the species using the parameter species When mole is specified species output will be in mole fraction and when mass is specified the species output will be in mass fractions DETCHEM OF generates a number of output file The file option can be used to specify a file number that will be appended to each output file Furthermore a copy of the input file sofc lt file gt inp will be generated The option monitor can be used to monitor the solver integration When monitor is specified as no the screen output will be for each axial position for a chann
37. but not evaluated in the present version The rest of the columns are used to define the temperature intervals as follows Low temperature Tiow E10 0 and high temperature Thigh E10 0 jump temperature Tjump 1000K unless specified E8 0 line 2 4 Coefficients a a7 for upper first seven rules and lower next seven rules temperature interval 5 E15 8 per line In the case of reversible reactions this data is used to calculate the kinetic data for the reverse reaction And also the thermodynamic data for the gas phase species are used to calculate the reaction enthalpies If the thermodynamic data of the adsorbed species are unknown and if these species are not involved in reversible reactions dummy values e g 0 0 can be given A section of thermdata file with dummy values is shown below H20 PD 92491 O 1H 2PD 1 I 300 00 3000 00 1000 00 0 00000000E 00 0 00000000E 00 0 00000000E 00 0 00000000E 00 0 0000000VE 00 0 00000000E 00 0 00000000E 00 0 00000000E 00 0 00000000E 00 0 0000000VE 00 0 00000000E 00 0 00000000E 00 0 00000000E 00 0 00000000E 00 3 3 moldata The moldata file contains the molar mass and kinetic theory parameters of chemical species A section of moldata is shown above where the entries has the following meaning H2 Species Symbol 1 Index indicating whether the molecule has a monoatomic linear or non linear geometrical configuration 0 single atom 1 linear 2 nonlinear 2 016 molar mass in g mol 38 000
38. calculated from the momentum balance equation K Op fu O p ruu 5 Pe i 16 2 7 aha 16 2 Here P is the perimeter associated with the membrane electrode assembly and A is the cross sectional area of the channel Assuming constant pressure in the channels density is calculated from the ideal gas equation _ pM ORT In Eq 16 1 and 16 2 J is the flux at the electrode channel interface and is calculated using dusty gas model Eq 16 11 Temperature in the flow channels is determined from the energy equation pr 16 3 KprCorTr __ OlupfCpsTf h T T 16 4 Ot Oz Dy f The heat transfer coefficient h is evaluated from Nusselt number hD Nu 16 5 k which is expressed empirically as 1000 y 0 5386 6 7275 Nu 3 095 8 933 gt exp 16 6 Gz Gz 103 104 CHAPTER 16 DETCHEMS FC where Graetz number Gz is given by Dn Gz RePr 16 7 Porous media transport Species transport through the porous media is assumed to be one dimensional along the thickness of the porous structure and is given by XEPIY _ ATeWe Ot oy Where s is the heterogeneous production rate of the chemical species k and A is the specific catalyst area available for surface reactions The total density of the gas phase within the porous structure can be calculated from SkWrA 16 8 Kg K alepr 7 a5 JW N y Was 16 9 t k 1 dy k 1 In the above equations the fluxes J are evaluated u
39. capacities and enthalpy are calculated within OpenFOAM and not from the external coupling Coming from a calculation with DETCHEM the user has to perform a three step approach to create the files needed 1 Perform DETCHEMCHEMINP which is a pre processor and translator for DETCHEM species and mecha nism information files DETCHEMCHEMINP requires one input file named cheminp inp This file acts as a container for the species and mechanism information If this information is stored in external files e g species inp and mech inp then cheminp inp may simply look like the following example lt CHEMINP gt include species inp include mech inp lt CHEMINP gt Like in all other DETCHEM applications the files thermdata and moldata have to be present The library DETCHEMCHEMINP produces several output files The file chem new contains the species and the mechanism information in a compact form The files thermdata new and moldata new contain the thermodynamic data and the molecular properties respectively of the required species The last file is not needed here Rename the files chem new and thermdata new to chem inp and therm dat Remove all information about mechanisms from the file chem new Only the parts describing the elements and the species are needed 17 3 USAGE OF DCAOPENFOAM 123 3 Apply the OpenFOAM application converseChemkinToFoam to transform the files into a format which can be used form OpenFOAM The output will b
40. case of unsuccessful simulations the extended output can write additional information For multiple channel calculations e g using DETCHEMMONOLITH we recommend to switch off monitoring of the channel calculations CHAPTER 13 DETCHEMCHANNEL 13 2 6 The lt INLET gt tag In this section the user specifies the gas phase properties at the inlet Following options can be specified T0 d inlet temperature K u0 d inlet velocity m s p d pressure Pa default 101325 p bar d pressure bar lt MOLEFRAC gt _ inlet mole fractions lt MASSFRAC gt inlet mass fractions Note that the velocity u is the actual inlet velocity at the given temperature TO and pressure p It is up to the user to convert volume fluxes e g in slpm in to velocities in m s 13 2 7 The lt TPROFILE gt tag Specify the wall temperature in this section The following options apply ignite_at d ignition temperature K acts as a minimum temperature in adiabatic simulation default 0 ignore_below d minimum temperature K for considering chemical reactions default 0 adiabatic b use adiabatic wall yes or temperature profile no default no lt DISCRETE gt piecewise constant temperature profile lt LINEAR gt piecewise linear temperature profile lt ISOTHERM gt multiple simulation runs with isothermal conditions In order to define a temperature profile along the channel wall for a single run use the tags lt DISCRETE gt or lt LINEAR gt B
41. close the cathode section tag open the section tag for electrolyte name of the section must be electrolyte height of the electrolyte m width of the electrolyte m number of discretization in the y direction close the electrolyte tag start the anode section tag name of the section height of the anode m width of the anode m number of dicretization in the y direction Se SR SR SR Fe SR SR OE FR SRO ORE porosity of the anode mictro structure tortuosity of the anode micro structure pore diameter of the anode micro structure m particle diameter of the anode micro structure m active specific area of the anode 1 m species tag for anode initial guess for the anode species can also be lt MASSFRAC gt closing tag for initial guess closing tag for the species close the anode section open the fuel channel section name of the section height of the fuel channel m width of the fuel channel m number of discretization in the y direction opening tag for inlet conditions for the fuel channel inlet velocity m s inlet temperature K fuel channel pressure Pa opening tag for the fuel channel species mole fraction of the inlet species can also be lt MASSFRAC gt Se FR SE o o e FR SR SR SR OSE Sk close the mole fraction tag closing tag for fuel channel species closing tag for fuel channel inlet conditions close the fuel channel section closing tag for geometry specification o
42. detailed gas phase and surface mechanisms e availability of computer power e availability of finanical resources 127 128 CHAPTER 18 DUO Reformers that are based on monolithic structures include thousands of equally sized small channels To resolve these structures with numerical methods grids with high spatial resolution are needed which leads to large counts of cells As the type of the basic differential equations is elliptical the solution process is always iterative The catalytic reforming kinetics of practical fuels e g diesel depend on gas phase and heterogeneous reaction mechanisms which may involve over a thousand elementary reactions For each of the hundreds of species a transport equation in a CFD code has to be solved This would lead to simulation times in the time span of weeks up to months or years even if a large number of processors e g several thousands were available Therefore direct coupling of chemistry at this level greatly exceeds the capability of computational fluid dynamics CFD models which can handle geometric complexity but not in combination with complex chem istry Therefore the development and investigation of reformer systems using solely a common CFD code is not practical Beyond that the licensing of a commercial CFD code is very expensive and not suitable for small companies 18 1 3 Simulation Tools DUO and DC40penFOAM DUO stands for the coupling of the two computer codes DETCHEM Und
43. dictionary name followed by the entries enclosed in curly braces as follows lt dictionaryName gt keyword entries List Structures A second keyword structure is a list The format of a list comprises the specification of the list name followed by the entries enclosed in round parentheses as follows lt listName gt C entries J Keywords for DUO The next table shows all keywords and data elements in the file couplingParameters required by DUO The column type describes the value of the lt dataEntry gt Entries of the type R demand a real value after the keyword name and those of the type J demand an integer value Keywords of the type C demand a character string The type Dict stands for a dictionary The type List contains multiple elements of the same type each of type C or T In the following the term patch is used to define a boundary condition For the purpose of applying boundary conditions a boundary is generally broken up into a set of patches One patch may include one or more enclosed areas of the boundary surface which do not necessarily need to be physically connected Caution All keywords have to be included in the file There are no default values The dictionaries and lists also have to be present If they are not used they have to be empty e g namesOfCoupledOutlets Keyword structure Type Unit Meaning Values General C Switches the
44. en Oe ARA eh 10 DETCHEMS G 10 1 Introduction oc 4 4 oa ee wur Ba le a e Sd we ee ed 10 2 Governing Equations lt siss s 2 he ee a 10 2 1 Gas phase equations 2 2 Comm 10 2 2 Surface equations pa eee Be eh PS we ee ew 10 2 3 Boundary conditions 2 0 0 nn 1033 Solutionsi 24 2 e A Aisle ae aie ed ee RD op ee ed 10 4 User Input pa 2 poe sare ee ek See ae Pl ee food Game eas LOS Output e a be er en ee ee er a eg 10 5 1 Screen Sutp t hos in of Rees Soles wh rn Re a ee ees eg ae pede 10 52 DAS EF dat sc 0 Gy oe ee Pe ho Be ee Ge GS ee oy Be eee 10 537 SUELA dat a an te ba o Bose PL Boe ble ne eden ee 10 54 Wood A Edita 2 Ba ee ey EO le OO ne ee de 10 55 WU datos BA A RA gs AA el al 10 50 Westan Att dat ac ro eee a foe en nee eh ea rd 10 6 Examples 4 daa a A nee Deed 10 7 Setting Up a problem Vii ar sa ae Sw eS Ble we pelas eae SS 10 8 Running the tool iv Poe et Bene Fa er ns sr 11 DETCHEM LUG 11 1 Introduction si eA Es BE BE BERR Ee RAR a ee ee eS 11 1 1 Governing Equations 2 Comm nn 11 1 2 Mass and Heat transfer coefficients o o a 11 132 SOMO riada a o J hoe Be dct 112 Useelnput 4 area A de E A REA 11 21 The lt GEOMETRY gt taS o ai 24 Sr ee ne Anh eee 11 2 2 The lt SECTION gt tag cerco Ge aed Bb eh RA ad Bi 11 25 The lt SOLVER gt taS or 5 5 pe bint A en ep aed 11 2 4 The lt SUMMARY gt and lt SUM gt tag e 11 3 Output
45. external coupling to plug DETCHEM and controls which chan coupling DETCHEM code will be coupled nel off I Controls the amount of information 0 1 2 output debugLevel C Switches mapping of out on off lets Requires the dictionary couple0utlets mapOutletsToDetchemTubes and the list namesOfCoupledOutlets Geometry 18 3 USAGE OF DUO 141 C Global direction of the wall patches X x coupled to DETCHEM tubes Y y directionOfPatches Z z R Length of the coupled tubes any lengthOfDetchemTubes I Number of bands used in any DETCHEM calculations numberOfDetchemBands Boundary mapping I Total number of tubes for which any DETCHEM is called numberOfDetchemTubes Dict Dictionary to control for which wall patches a DETCHEM calculation is Be performed Requires the lists namesOfReferencePatches namesOfReferencePatches namesOfCoupledPatches namesOfCoupledPatches mapsToDetchemTubes mapsToDetchemTubes List For each of the wall patches Name_x a DETCHEM calcula namesOfReferencePatches tion is performed The niti C ber of entries in the list has Name_1 to be the same as the integer oe numberOfDetchemTubes List For each of these wall patches with the name Name_x a DETCHEM namesOfCoupledPatches calculation is applied The number C of entries in the list has to be the Name_1 same as the number of entries in the os list mapsToDetchemTube List For each of these wall
46. for consistency of the unit is made Thus by stating a unit explicitly in the input file you can avoid confusion of physical properties For instance a step size required in units of time i e seconds will be refused if the value is given in meters For instance an input file could consist of the following lines lt myproperties gt p 1 bar pressure V 5 L volume T 473 K temperature Vdot 2 L min volume flux Cp 1 5 kJ kg K heat capacity lt myproperties gt Thus a unit follows a numerical value using square brackets You can leave blanks between the numerical value and the brackets but the unit must be on the same line of the input file The unit symbol is case sensitive While mm stands for 1073 meters Mm means 10 meters Each single unit symbol can be followed by an integer exponent e g a cubic centimeter is written as cm3 To multiply two unit symbols simply separate them by a blank character or use the symbol That is both N m and N m symbolize the unit Newton meter The slash charcater is used to indicate that the next unit appears in the denominator of a fraction However notice that it only applies to one following unit symbol In order to specify the unit J kgK write J kg K or J kg 1 K 1 SI units usually can be prefixed to abbreviate powers of ten If a unit is prefixable you can use the prefixes h for 10 k for 10 M for 10 G T P E Z Y and d for 107 c for 107 m fo
47. gas phase mass fractions lt COVERAGE gt _ surface coverages default coverages from lt SPECIES gt section and the subsection lt INLET gt T d temperature K lt MOLEFRAC gt _ gas phase mole fractions lt MASSFRAC gt gas phase mass fractions Vflux d 9 3 Output inlet volume flux at current T p m 3 s 9 3 1 Screen output On screen the integration progress is monitored The values in the two columns displayed stand for time and temperature 9 4 SETTING UP A PROBLEM 61 AS DETCHEM_CSTR S Tischer O Deutschmann VERSION 2 0 4 05 05 31 Fe Fe e Fe Fe Fe Fe de Fe Fe de RARE RR RR RR RARE RARE Fe Fe Te Fe Fe Fe de RARE RARA RR RR RR Te Fe de Fe Fe Te Fe Fe de Fe RR ce 0 00E 00 1200 0 5 63E 02 1098 5 1 08E 01 1081 5 100 00 1040 2 CSTR finished successfully 9 3 2 cstr plt DETCHEMTR produces one output file cstr plt The output file is in TECPLOT format TECPLOT will create a line graph upon loading the file cstr plt Nevertheless this format also allows for easy import into spreadsheet programs like Microsoft Excel The variables in the file are time temperature species mole fractions prefixed with X and species mass fractions prefixed with Y 9 3 3 Examples There is one example supplied along with the installation The example directory contains the following files cstr inp species inp mech inp a gas phase mechanism noo2m thermdata moldata and a script file go The script
48. in the following in which represents the copying process system walltemp to DETCHEM detchem walltemp to DETCHEM system outlet to DETCHEM detchem outlet to DETCHEM The filenames walltemp to DETCHEM and outlet to DETCHEM are linked as includes in the files plug inp and channel inp and interpreted from the codes plug or channel 18 4 APPENDIX 143 B Intermediate Data from DETCHEM to OpenFOAM For each calculation of a tube with the compiled codes plug or channel in the directory detchem a file lt caseDir gt detchem heatflux from DETCHEM containing the profile of the heatflux at the tube wall is created Afterwards this file is copied to the folder lt caseDir gt system with a new name The file name is heatflux from DETCHEM in which the symbol stands for the identification number of the tube This is illustrated in the following in which represents the copying process detchem heatflux from DETCHEM system heatflux from DETCHEM The heatfluxes in the files heatflux from DETCHEM are red and mapped to the wall patches of the boundary handling subroutine detchemHeatFluxTemperatureFvPatchScalarField C 18 3 7 Data Output A Information Output During the analysis of the keywords in the file couplingParameters the code checks the user parameters and stops if something is specified wrongly Additionally several quantities and variables are checked during the calculation The code stops if someth
49. inp starts with the species and mechanism definition section that can appear directly in the input file or can be included from external input files In addition the files thermdata and moldata must be located in the executing directory Alternatively the pre processed input file detchem inp can be included The options within the lt CSTR gt tag are as follows lt INITIAL gt lt INLET gt p Pa d p bar d time d volume d surface d isothermal b dT s d dT min d cov_relax d ini_surf b fileNr i dt_out d atol d rtol d h d initial conditions inlet conditions pressure Pa default 100000 pressure bar default 1 integration time s reactor volume m 3 default 1 catalytic surface area m 2 isothermal yes or adiabatic no conditions default no linear temperature gradient per second for TPD simulations linear temperature gradient per minute for TPD simulations under relaxation factor for surface coverages default 1 call CHEMSURF for initial coverages yes or use default no default no file number for output e g cstr001 plt default 1 minimum step size for output s default none absolute tolerances for concentrations mol m 3 default le 12 relative tolerances for concentrations default 1e 6 initial integration step size s default 1e 10 The subsection lt INITIAL gt may contain T d temperature K lt MOLEFRAC gt _ gas phase mole fractions lt MASSFRAC gt
50. last dot chtMultiRegionSimpleFoamChemDuo case To check the functionality of the application all the requirements for the start of an OpenFOAM run have to be fulfilled For testing the coupling should be disabled in the file lt caseDir gt couplingParameters coupling off 17 3 2 Preprocessing A Grid Generation in ICEM OpenFOAM is able to use any mesh which was saved in the format needed for the code FLUENT The grid can generated with GAMBIT ICEM or any other software In the actual section some important facts for the grid generation with the software ANS YS ICEM are given 1 Create two bodies named FLUID and SOLID for the two regions which shall be filled with flowing material and solid material Normally the body FLUID is inherently present Add all blocks to the appropriate materials 2 The interfaces for which surface chemistry will be applied have to be defined in the file constant FLUID chemistryProperties after the keyword surfacePatchName Example surfacePatchName FLUID_to_SOLID 3 Convert the mesh to an unstructured mesh using the right mouse click on the entry PreMesh in the task bar 4 Check the mesh carefully inside ICEM No errors should arise 5 On the strength of past experience it might happen that an check in ICEM shows no errors whereas the check in OpenFOAM fails If possible firat load the mesh into FLUENT and perform an additional mesh check If FLUENT accepts the mesh OpenFOAM is also
51. library modules lib_detchem lib_utils and lib input lib_detchem comprises all library routines for calculating the chemical reaction source terms while lib_utils comprises the auxiliary routines for the standard solvers and lib_input consists of all the routines for reading the newly designed input format of version 2 0 1 3 Program Capabilities DETCHEM has the following modeling capabilities DETCHEMSASPROBE is a computational tool that calculates homogeneous chemical reaction rates and species thermodynamic and transport data at given conditions of temperature pressure and composition DETCHEMSUFFPROBE is a computational tool that calculates the surface coverages and fluxes at catalytic surfaces at given conditions of temperature pressure and composition DETCHEMEQUIL is a computational tool to calculate equilibrium gas phase compositions on the basis of thermodynamical data DETCHEMPATCH is a tool that simulates the temporal variations of temperature and concentrations of gas phase species as a result of homogeneous gas phase and or heterogeneous surface chemical reactions DETCHEMSS is a tool that simulates the time dependent variations of temperature and concentrations of gas phase species as a result of homogeneous gas phase and or heterogeneous surface chemical reactions in a continuous stirred tank reactor DETCHEMS G is a tool that simulates the one dimensional profile of a reacting flow in a stagnation point flow configuratio
52. lt T gt from 500 to 1200 step 50 lt T gt The table below lists all available options Where applicable the default values are given 7 3 OUTPUT 49 lt SPECIES gt species list lt CONDENSED gt list of species in a condensed phase optional T d temperature K default 298 lt T gt list of temperatures K p d pressure Pa default 101325 V d volume m 3 default 1e 3 lt MOLEFRAC gt species mole fractions lt MASSFRAC gt species mass fractions atol d absolute tolerance of concentrations mol m default 1e 30 rtol d realtive tolerance of concentrations default 1e 6 Ttol d absolute tolerance of temperature K default 0 1 const v v2 operation condition choose 2 constant properties from p V T S H Two constraints can be chosen from constant pressure p volume V temperature T enthalpy H or entropy S However since enthalpy is a function of temperature only for ideal mixtures constants T and H cannot be selected at the same time The classical equilibrium problem is solved for const T p If you want the adiabatic case choose const H p 7 2 2 thermdata For a detailed description of the thermdata file see chapter 3 2 Here it shall only be mentioned that besides the thermodynamic coefficients the file thermdata also contains information about the atomic composition of each species This information plays an important role when running DETCHEM QU Make sure that the first line of each species conta
53. lt casDir gt system Copy the following files into this folder best from a previous calculation controlDict fvSchemes fvSolution 2 Transform the mesh Perform the OpenFOAM application fluent3DMeshToFoam grid file name msh case Check care fully the output If the code recognizes the two materials some information should be printed which looks like Zone 32 name INTERFACE_SOLID_FLUID type interface Reading zone data done FINISHED LEXING Creating faceZone 2 name INTERFACE_SOLID_FLUID type interface 3 Split mesh Perform the OpenFOAM application splitMeshRegions cellZones overwrite Check carefully the output If the code handles the two regions rightly some information should be printed which look like this Region Cells 0 729 1 729 Region Zone Name 0 0 FLUID 1 1 SOLID Sizes inbetween regions Region Region Faces Additionally you should find something like this For interface between region 9 and 1 added patch 8 FLUID_to_SOLID 4 Check mesh Perform OpenFOAM application checkMesh constant Check carefully the output If something is wrong here the calculation will not work C Boundary Conditions in OpenFOAM For the normal boundary conditions see the example case for the two zone solver chtMultiRegionSimpleFoam The special boundary conditions which are necessary to manage the coupling are described later D Directory Structure of a Case DUO and DC40penFOAM DUO and DC40penFO
54. manuals However the installation including some basic commands which are necessary to compile the codes will be given in this chapter 134 CHAPTER 18 DUO application chtMultiRegionSimpleFoamChemDuo DETCHEM_CHANNEL_FOR_CFD CODE_FOR_OPENFOAM DETCHEM_PLUG_FOR_CFD CODE_FOR_OPENFOAM Figure 18 5 Folder Structure System A System B Kernel Name Linux 3 1 10 1 16 desktop Linux 2 6 34 12 desktop System software openSUSE 12 1 x86_64 openSUSE 11 3 x86_64 OpenFOAM version OpenFOAM1 7 1 OpenFOAM 1 7 1 Compiler for OpenFOAM gcc SUSE Linux 4 5 0 gcc SUSE Linux 4 5 0 g SUSE Linux 4 5 0 g SUSE Linux 4 5 0 Compiler for DETCHEM gfortran pgf90 C Compiling of the individual Codes To perform DUO it is necessary to install the following resources 1 C resources e CFD Code OpenFOAM 1 7 1 e OpenFOAM 1 7 1 solver chtMultiRegionSimple FoamChemDuo 2 Fortran90 resources e DETCHEM executable plug e DETCHEM executable channel Compiling of executable DETCHEMP YG DETCHEMP US can be compiled in the directory lt caseDir gt detchem code by typing the command make plug The executable plug is moved automatically to the folder which is one level higher lt caseDir gt detchem Compiling of executable DETCHEMCHANNEL DETCHEMCHANNEL can be compiled in the directory lt caseDir gt detchem code by typing the command make channel The executable channel is moved au
55. phase at the interface This is repeated through the whole time integration of the system Default n A normal simulation is performed without washcoat effect if this option is not invoked WASHCOAT3 b The effect of the washcoat is calculated based on the effectiveness factor approach Default n A normal simulation is performed without washcoat effect if this option is not invoked TRANSIENTOUT b Enable transient solution output Default n in this case just the steady state solution output will be given TCONSTANT b Activate the option to keep the surface temperature constant through whole solution Default n The lt MOLEFRAC gt tag Mole fraction of the species entering from the inlet must be included within this tag The lt SURFACE gt tag The following surface parameters must can also be supplied by the user within this tag TSURF d Surface temperature K ALPHA d Thermal conductivity of the foil W m K Default 1 44 PINIT d Initial Power supplied to heat the catalytic surface W m 2 Default 0 0 PLAST d Last Power supplied to heat the catalytic surface W m 2 Default 0 0 PINCR d Step Power supplied to heat the catalytic surface W m 2 Default 0 0 RFOI d Thickness of the foil m Default 0 003 TRAD d Radiation temperature to the wall K default 300 EPS d Emissivity of the surface Default 0 77 TBACK d Backside temperature of the foil K Default 300 As seen in the lt SURFACE gt tag t
56. possible as follows e lt GEOMETRY model button gt e lt GEOMETRY model planar gt e lt GEOMETRY model tubular gt e lt GEOMETRY model planar_stack gt When model is specified as button the code simulates a button cell configuration A polarization curve cal also be generated for a button cell by specifying a value for the pot_step The code can be used to simulate a planar or tubular cell configuration by specifying planar or tubular for the model It should be kept in mind that the code simulates only axi symmetric geometry for a tubular cell While doing stack calculations the model must be specified as planar_stack lt SECTION gt tag The various domains such as fuel channel anode electrolyte cathode and air channel are separated by the lt SECTION gt tag Each section is given a name such as fuel anode electrolyte cathode and air The lt SECTION gt tags for each domain holds sub tags depending on the domain For e g the electrodes con tain sub tags such as lt porous gt lt species gt etc Each of these sub tags holds micro structural properties and initial and boundary conditions relevant to that particular domain 16 3 USER INPUT 107 lt MOLEFRAC gt option for the anode and cathode It is important to specify a right initial guess for the species mole or mass fractions in the anode and cathode Generally air flows through the cathode channel However the user is free to specify pure oxygen running through the ca
57. reading from the current file and to read the file specified instead Any self contained piece of code can be put into a header file and included at the relevant location in the main code in order to improve code readability The application directories can be located anywhere but it is recommended they be within an application subdirectory of the users project directory i e HOME OpenFOAM USER 1 7 1 In the following the folder where the applications can be found is called lt appDir gt The code files which were additionally programmed in OpenFOAM to perform the external coupling to DETCHEM within the application chtMultiRegionSimpleFoamChemDuo are described shortly in the following table They can be found in the directory lt appDir gt chtMultiRegionSimpleFoamChemDuo Solver class files chtMultiRegionSimple FoamChemDuo C Includes the OpenFOAM solver Calls all sub sequent routines of DUO Header files for coupling readCoupling Parameters H Reading and interpretation of keyword file couplingParameters initializeCoupling H Initialisation of coupling callDetchem H Calls DETCHEMP US or DETCHEMCHANNEL and copies input output and exchange files writeOutletConditions H Calculates average conditions at outlets of CFD grid for all coupled tubes and writes to files The data is used to set the inlet condi tions for the DETCHEM calculations Calculates band averaged wall temperatures for all couple
58. run the tool just by typing go in the command prompt or by any of the appropriate methods explained in the installation guide Chapter 6 DETCHEM gt SURFPROBE 6 1 Introduction DETCHEM URFPROBE is basically a tool to probe the surface chemistry It calculates the surface coverages and fluxes at catalytic surfaces at constant ambient conditions It is recommended to test a new mechanism using DETCHEM URFPROBE before using it with DETCHEM reactive flow models Most surface reactions are supposed to reach a steady state in few seconds or even less DETCHEMSURFPROBE integrates the surface coverages until it reaches steady state 6 2 User Input Before running DETCHEMSURFPROBE the user must prepare the input file surfprobe inp An example is shown below include species inp include mech inp lt SURFACE MODEL gt lt CHEMSURF gt time 100 integration time for surface chemistry lt CHEMSURF gt lt SURFACE MODEL gt lt SURFPROBE gt T K 1200 operating temperature in K p Pa 1 d5 operating pressure in Pa lt GASPHASE gt lt MOLEFRAC gt NO2 0 1 name and mole fraction N2 balance mole fractions lt MOLEFRAC gt lt GASPHASE gt lt SURFPROBE gt The file surfprobe inp starts with the species and mechanism definition section that can appear directly in the input file or can be included from external input files In addition the files thermdata and moldata must be located in the executing directory Alternativel
59. the library libDetchemFortran90 PropsAndSources so work separately Test of libDetchemFortran90 PropsAndSources The library can be tested in the directory lt appDir gt libDetchemFortran90 PropsAndSources bin by typing the command duotest duotest is an executable to run the shared library as a stand alone tool Be sure that the keyword file properties inp the data files moldata and thermdata and the mechanism files are present in a subdirectory named detchem This is because in OpenFOAM the library is called in the lt caseDir gt and reads all information from the subdirectory detchem 17 3 USAGE OF DCAOPENFOAM 119 Test of OpenFOAM After reading the instructions of the OpenFOAM manual the user can install and test the system by starting a test case of the standard installation Test of DUO First of all one of the example cases should be tested For the test of DUO for a new case a grid for a geometry consisting of a fluid part and a solid part has to be generated All directories and files which are necessary for an OpenFOAM calculation have to be prepared Firstly the application should be tested without any coupling The internal name of the application is chtMultiRegionSimpleFoamChemDuo Each application is de signed to be executed from a terminal command line typically reading and writing a set of data files associated with a particular case The command to start the OpenFOAM application in lt caseDir gt is dont forget the very
60. tool After setting up the case directory the executable can be evoked by specifying the relative path or the absolute path to the binary If the user wishes any name can be given for the input file sofc inp and then use the batch script go supplied with the distribution to run the code However the user should make sure that the relative path present in the go correct according to his her file structure Chapter 17 DC40penFOAM 17 1 Introduction 17 1 1 Modelling of Complex Flow with Detailed Chemistry Modeling practical systems require the coupling of both arbitrary flow configurations including complex chem ical reactions and additional conjugate heat transfer in solid bodies From the point of view of simulation those systems can be described with the following characteristics three dimensional laminar flow coupled heat transfer inside and between three dimensional fluid and solid regions complex chemistry of gas phase reactions complex chemistry of catalyzed surface reactions exchange of heat with the surroundings availability of temperature dependent properties for all the compounds involved For the solution of problems of this type there are in principle several CFD Computational Fluid Dynam ics codes available e g FLUENT STAR CD CFX However there are three constraints which restrict the simulation e availability of reliable detailed gas phase and surface mechanisms e availability of computer power e
61. with the following entry bin csh chtMultiRegionSimpleFoamChemDuo If you start the calculation with the command Start gt log amp the job will work in the background and the output will be written into the file log 18 3 6 Data Exchange The external coupling between the two codes is done using ASCII data files These files are written into the folder system of the OpenFOAM case directory lt caseDir gt The procedure of data exchange between several directories might seem a little bit illogical at first sight This is because the input and output from to other directories than normally used from OpenFOAM e g to the folder detchem is complicated to handle Therefore the exchange of data is managed within the folder system A Intermediate Data from OpenFOAM to DETCHEM For each iteration or time step OpenFOAM creates two input files for every coupled tube In the following the symbol stands for the identification number of a tube The temperatures at the outer walls of the coupled tubes are written to the file lt caseDir gt system walltemp to DETCHEM The conditions at the outlets of the CFD mesh which shall be used as inlet conditions in the DETCHEM calculations are written to the file lt caseDir gt system outlet to DETCHEM For every time step in which a DETCHEM program is called these files are copied to the folder lt caseDir gt detchem with a new name cut of identification number This is illustrated
62. y or n surface reactions y or n closing tag for cascade closing tag for geometry 11 2 USER INPUT lt OP CONDITIONS gt opening tag to specify operating conditions isothermal n isothermal condition y or no n adiabatic n adiabatic condition y or no n mass transfer y whether mass transfer resistance has to be enabled axial temp profile n axial temperature profile supplied by subroutine y else n lt OP CONDITIONS gt closing tag for operating conditions lt PROCESS gt opening tag for process lt PARAM gt opening tag for process parameters T inlet 600 inlet temperature of the gas mixture Ignite_at 1200 external ignition temperature to initiate the reaction Vel inlet 0 1 average velocity of the inlet gas mixture Pressure 1 d5 pressure at inlet htceff heat transfer coefficient lt PARAM gt closing tag for process parameters lt GASPHASE gt opening tag to specify the gasphase species lt MASSFRAC gt or lt MOLEFRAC gt mass or mole fraction of the species NO2 0 1 name and mass mole fraction of 1 st gas species N name and mass mole fraction of 2 nd gas species lt MASSFRAC gt or lt MOLEFRAC gt closing tag for mass mole frac lt GASPHASE gt closing tag for gasphase species lt PROCESS gt closing tag for species lt SOLVER solver limex gt or lt SOLVER solver daspk gt opening tag for solver step size 0 d0 minimum stepsize allowed for integration max
63. your system path and call reservoir channel orreservoir_plug e Create a symbolic link to the executable DETCHEM _DIR bin reservoir_channel and call reser voir channel The latter option does not require setting of system variables and is therefore less system specific Chapter 16 DETCHEM gt SOFC 16 1 Introduction DETCHEMS C is a quasi two dimensional numerical model for the simulation of solid oxide fuel cells SOFC The model can be applied to a button cell b planar cell co flow configurations and c tubular cell co flow configuration The model takes into account of the details of transport as well as chemical electrochemical processes The thermo catalytic processes occurring in the cell can be represented by a global reaction mecha nism or by an elementary reaction mechanism The examples following this distribution utilizes an elementary like reaction mechanism for the steam reforming of methane on Ni catalysts The electrochemical processes are implemented by a modified Butler Volmer equation The transport processes within the porous electrodes are modeled by the Dusty Gas Model DGM 16 2 Physical and chemical fundamentals 16 2 1 Heat and mass transport Channel Flow Flow through fuel and air channels is assumed to be one dimensional and laminar in nature The plug flow equation for species continuity in the channel are given by orY __KpruY P 4 Wi k 1 Kg 16 1 ar z AT ee The velocity is
64. 0 02 06 02 04 04 04 10 0 10 lt CIRCUMPOINTS gt results in a grid like shown below 14 2 USER INPUT 93 14 2 3 The lt TECPLOT gt tag If the user wants to use a grid created by other applications then the lt TECPLOT gt tag shall be used Especially in case of spatially varying inlet conditions the grid of the inlet data must be the same as the grid of the monolith s cross section Thus derive the monolith grid from the inlet data grid using the lt TECPLOT gt tag An example is shown below lt TECPLOT gt name poly file velin001 dat name of tecplot file 3d slice y transformation into y z plane necessary lt TECPLOT gt where the possible options are file s TECPLOT file name 3d slice b co ordinates are given in 3d yes or 2d no if yes transformation to 2d is done default no name s layer name used as ID The name member use up to 8 characters will be used in the grid definition of the DETCHEMMONOLITH input file to refer to this domain If the 3d slice option is not set the first two variables of the TECPLOT file will be interpreted as the coordinates of the grid points Otherwise The first three variables are considered and the coordinates are transformed into the y z plane automatically 14 2 4 The lt LAYER gt tag This tag may be used to define additional layers around the monolithic domain e g to represent insulation layers These layers must have equidistant thicknes
65. 0 1000 In the file outlet to DETCHEM the inlet conditions for the tubes can be found Here is an example of the content of the file Define Tinlet 836 70239 Define Vinlet 0 54443955 The name lt name of variable gt of each variable T1 T2 Filenumber Vinlet Tinlet is referred to by using the tag get lt name of variable gt in plug inp This means that the value of the variable is inserted here while running DETCHEMPLUS Therefore the real content of the file plug inp is different for every call Caution If the coupling of the outlets is NOT activated in the parameter file couplingParameters coupleOutlets off the values for uO and TO have to be set by values Additionally the appropriate include has to be removed or to be commented include outlet to DETCHEM 18 4 3 Example of an Input File channel inp In the following an example of a parameter file named channel inp which is necessary for DUO to call the executable DETCHEMCHANNEL is printed and described This file has to be located in the folder lt caseDir gt detchem verbose n include species inp include mech inp include walltemp to DETCHEM include outlet to DETCHEM lt SURFACE MODEL gt lt CHEMSURF gt hini 1 d 10 time 1 d0 lt CHEMSURF gt Fcatgeo 185 lt MIXED_DIFF gt lt ZONE gt ngrid 10 aspect 1 thickness 4 d 5 lt ZONE gt porosity 0 5 148 CHAPTER 18 DUO tau 3 diameter 2 3e 8 lt SOLVER gt time 10 hini
66. 000 100 0 10000 lt P_PROFILE gt lt CONST_QUANTITY gt T K 1173 const_quantity Q Q or H surf_thermdata n lt CONST_QUANTITY gt lt OUTPUT gt mole y concentration y mole_fraction y mass_fraction y fileNr 1 dt_out 0 01 lt OUTPUT gt lt BATCH gt 55 The input file must always contain either user specified pressure exapmles 1 and 3 or volume examples 2 and 4 profile but not both profiles simultaneously The user can also define a time dependent temperature profile examples 1 and 2 or specify adiabatic examples 3 and 4 or isenthapic conditions Initial values for pressure volume and or temperature must be specified provided the corresponding parameter has no user specified profile This means that in case of user defined volume profile initial pressure is to be given P Pa in examples 1 and 3 in case of user defined pressure profile initial volume is to be given V m3 examples 2 and 4 and in the adiabatic or isenthalpic examples initial temperatures T K in the lt CONST_QUANTITY gt section in examples 3 and 4 have to be specified The simultaneous presence of user defined profile and initial value for the same parameter p V or T is ambiguous and causes an error message Profiles are defined by pairs of values The first value is the time and the second one is the value of the corresponding parameter p V or T Time must always increase 1 e each time value must be greater th
67. 13 6 Running the tool There are several ways to call the executable e Using the go script from the example directory The user needs to define the system variable DETCHEM_DIR e Add the DETCHEM_DIR bin directory to your system path and call channel e Create a symbolic link to the executable DETCHEM DIR bin channel and call channel The latter option does not require setting of system variables and is therefore less system specific 13 7 BLAYER VERSION 89 13 7 BLAYER version DETCHEMBL4YER is a software package for simulation of 2 D chemically reacting flows in cylindrical channel which is similar to DETCHEMCHANNEL but using different numerical methods The PDE governing equations are semi discretized using a method of lines leading to a special structure DAE system which is solved using a special tailored BDF code developed based on the DAESOL code for more details see H D Minh PhD thesis Department of Mathematics and Computer Science University of Heidelberg 2005 The input and output files have similar formats as of DETCHEMCHANNEL Tn the following we only discuss the differences 13 7 1 User Input In the lt SOLVER gt tag the user can specify the following name value pairs only require names have to be specified optional names can be specified if they are not specified the default value will be taken lt SOLVER gt hini 1 d 12 optional default 1 d 12 hmax 0 025 optional default 1 d 1 relax jac yes lopti
68. 2 02 c if 02 le 0 then error call DCS_GetIndex N2 n2 call DCS_GetIndex NO no call DCS_GetIndex NO2 no2 note In DETCHEM reactions module species are always identified by their index in the list of all species DCS In the rare case that you want the index according to the gas phase DCSG or surface DCSS species list you must call DCSG_GetIndex oder DCSS_GetIndex respectively nnnnnn c end subroutine DCRGU_Init end c e e de Fe Fe Fe de Fe Fe Fe Te Fe de de Te EERE e Fe de Te de Te He e Te Fe Te Fe Te Te e de Te Te de de Te Te Fe de Te e de Te Te de de Te de de Te Te de de Te subroutine DCRGU_CalcRate c T r here you can specify your own rate laws for user defined global gas phase reactions input c concentration vector according to DCS mol m 3 T temperature K output r reaction rates for all user defined global reactions referenced by userID mol m 3 s Ama AO A implicit none include DCRGU_UserData F double precision c T r example assuming you have defined the following reaction in your mechanism lt GLOBAL gt 2 NO 02 gt 2 NO2 userID 1 lt GLOBAL gt 000000000 then provide code like this r 1 1 e5 c no c o2 exp 1000 T end subroutine DCRGU_CalcRate end c e e Fe Fe Fe Fe de Fe He Fe Te Fe Fe de ERE Te Fe de Te e Fe de Te de Te He Te de Fe He Fe Te Te e de Te Te de de Te Te Fe de Te e de Te Te de de Te de de Te Te e de Te
69. 2 2 4 A A A AA e te lg 11 341 Screen Output Gare ee ae eee A E EA 4 ee 1 1 3 2 OUPS FE PU en nn rt u BM Bae he Reds De Ble He mii 11 33 0u1s Dt ise fea bh Oe a Whe ee ee Boho e 11 34 trans lb te e233 2 ee Boe AS Steele Pe een Bok ees 11 3 3 Summary dat 200 meye A Br Bee RE ORO BD Ka 1 4 Examples 22 4 20 0 th gee dae ly Goes Mig en da ob Ge ee eH ade ae Sted 11 5 Setting upa problem aoi 2 5 5 u ns rs bade a Di a en Gow ok Ane vedio ele E 11 6 Runtmethe tool wee wkend Bar en ayaa a oe wp HR Sale Seed 12 DETCHEMPACKEDBED 12 1 Introduction vii A a Be rd Rn Skea AR EE Bacon goed 12 1 1 Governing Equations s c c teree ee ee 12 2 SOMO 435 4 Ss o BED Re A ee be ee a 123 User Input 8 at ee 20 28 Pie i ped Bara ols AA Sed eee Bae 12 331 The lt SECTION gt tag lt sacha a eh aaa bio kw Po Bar ead eo ara 123 2 The lt WALL gt tae i e nu s oae alaanu he Pb heal be oe Peele be eo he 12 3 3 The lt SOLVERS ap Du 2 22 a Ra le A a E 12 3 4 The lt TOLERANCE gt tag o nocc aen ee 12 33 The lt OUTPUT gt tag 2 22 2 8 4 2 ee ne ERG eee bee E IZA OUTPUT os 3 5 ee agen RB td See a Ge eed Be Siege Rad 12 41 Scfeen output soie 548 RE eA eae eb ae bo Oe ee eee 12 42 OMBEEREDIC eof tb he A PRMD EE MES READ A wd PDAS Outs EDU ne kB BR AA PA GPR Se AE ER oP 12 5 Examples iniciar iria he eae oe Bo weed slg ths se BSA e rn Ae ad 12 6 Setting up a problem e a2 ba dene dG Peed that a d Se hd 12 7 Running t
70. 4 2 outg plt The outg plt contains mass mole fraction of the gas phase chemical species depending on the option given in the lt OUTPUT gt tag in the input file pack inp The outg plt also contains the solid and fluid temperature designated as T f and T s respectively 0 1 0 08 NO c 2 0 06 Y S 0 04 a 0 02 i 0 02 0 03 05 Axial position m 12 4 3 outs plt outs _plt contains the surface coverages for the surface adsorbed chemical species and the fluid ans solid temperatures 12 5 Examples There are a few examples supplied along with the installation Each example directory contains the following files plug inp species inp mech inp a gas phase mechanism file a surface mechanism file thermdata and moldata 12 6 SETTING UP A PROBLEM 79 12 6 Setting up a problem It is recommended to create new problems in separate directories The directories can be created anywhere the user wishes them to be The created directory which becomes your working directory must contain all the input files mentioned in the above section The user can copy these files from the example directory to the working directory and make necessary changes In case of problems adjusting the solver and tolerance parameters may improve the performance 12 7 Running the tool There are several ways to call the executable e Using the go script from the example directory The user needs to define the system variabl
71. 7 000000E 01 hypothetical reactions 2 H20 1 CH4 gt 4H2 1 co2 2 H20 1 co2 gt 202 1 CH4 6 H20 1 co2 gt 8 OH 1 CH4 2 H20 1 CH4 gt 8H 1 C02 2 H20 1 co2 gt 40 1 CH4 6 H20 1 co2 gt 4 H202 1 CH4 1 CH4 3 co2 gt 2 H20 4 CO Thermodynamic equilibrium p 101325 Pa V 0 00100199314 m 3 T 500 K S 5 28418255 J K U 1681 16951 J H 1579 64255 J F 4323 26079 J G 4221 73383 J species moles mole frac H2 9 680003E 05 3 963701E 03 02 7 432120E 23 3 043253E 21 OH 1 950599E 22 7 987177E 21 H20 3 607736E 03 1 477271E 01 H 9 364217E 23 3 834395E 21 0 4 954746E 23 2 028835E 21 H202 4 409470E 23 1 805559E 21 CH4 1 803689E 03 7 385622E 02 co2 1 851910E 03 7 583075E 02 co 3 577961E 07 1 465079E 05 N2 1 706114E 02 6 986076E 01 First the atomic compostion of all species is printed in order to allow checking that the data is read cor rectly Then the initial conditions are shown thermodynamic variables and composition As an additional information one set of hypothetical reactions is printed Finally the thermodynamic variables and the compos tion of the mixture in equilibrium are shown 732 equil plt DETCHEMEFUL creates a file equil plt that contains the equilibrium composition s and their thermodynamic variables This file may be useful for graphical data evaluation in case of multi temperature runs However a new file is created upon each call of DETCHEMEQUIL so data will not be appended The output file is in TECPLOT for
72. 8 CHAPTER 3 INPUT FILES lt SURFACE MODEL gt include washcoatl inp activated washcoat diffusion model include washcoat2 inp deactivated washcoat diffusion model lt SURFACE MODEL gt The options for each model are summarized below lt ZONE gt 1 dimensional washcoat grid zone porosity d porosity of washcoat tau d tortuosity of washcoat diameter d mean pore diameter m lt MACRO gt macro pore parameters random model lt MICRO gt micro pore parameters random model relative_load d relative load of this zone zone2 start a second zone with different parameters lt SOLVER gt DAE solver parameters The washcoat model basically solves a reaction diffusion equation The tags lt MACRO gt and lt MICRO gt stand for macro pores and micro pores which are required for the random pore model Otherwise specify porosity and diameter for all cells once without these tags The information under the lt ZONE gt tag is used for the discretization of the governing equation 2 75 There can be any number of lt ZONE gt tags however these zones will all have the same properties except for the grid spacing If the washcoat properties porosity pore diameter or loading should vary along the grid the zone definition can be devided into two layers by using the keyword zone2 as shown in the following example lt SURFACE MODEL gt lt MIXED_DIFF gt lt ZONE gt ngrid 10 thickness 1 d 4 lt ZONE gt porosity 5 tau 3 diameter
73. 900E 00 1 9790E 01 0800E 00 1 6803E 01 0700E 00 1 3275E 01 0600E 00 9 0957E 02 0500E 00 4 1322E 02 0400E 00 9 5443E 03 0300E 00 4429E 02 0200E 00 1001E 02 0100E 00 1919E 01 0000E 00 5894E 01 9000E 01 0017E 01 8000E 01 4280E 01 fer WOORPRFPRPEPREPEPRPHP PEE NNF FOF 16 4 Output DETCHEM FT generates a number of output files depending on whether the calculation is done for button cell or for planar cell The various files their contents and the cases for which these files are generated are listed below echem plt This file will be generated for button cell as well as for planar cell calculations The name echem will be appended with the file number specified in the lt OUTPUT gt tag For e g echem0010 plt This file contains the information regarding the electrochemical variables as a function of axial position For a button cell calculation the axial position will always be zero The file contains variables in the following order e z Axia position m 0 for button cell calculation e Ecell cell potential V e Erev Reversible potential or the Nernst potential V e i Current density A cm e eta_a Anode activation over potential V e eta_c Cathode activation over potential V e Rel Ohmic resistance Q m e Rct_a Anode charge transfer resistance Q cm e Rct_c Cathode charge transfer resistance Q cm The following figure 16 1 displays the current density as a functio
74. 9747184E 03 1 10406954E 06 1 28813565E 03 species mix diff coeff m 2 s viscosity kg m s heat cond J m K s NO 2 13229567E 04 4 83696341E 05 7 94895416E 02 02 2 17922412E 04 5 39862825E 05 8 48086050E 02 NO2 1 66925845E 04 4 76563231E 05 7 58873612E 02 0 3 35261372E 04 6 30643181E 05 1 22901973E 01 N2 2 74149764E 04 4 67349007E 05 7 97217804E 02 average 4 68262397E 05 7 93296638E 02 5 4 Examples There is an example supplied with the installation The example directory contains the following files gasprobe inp species inp mech inp a gas phase mechanism noo2m thermdata moldata and a script file go The script file go may be used for convenience to call the executable and run the program It requires a system variable DETCHEM_DIR that contains the path to the DETCHEM root directory Depending on your system you can set this variable by either of these commands export DETCHEM_DIR myDirectory DETCHEM or setenv DETCHEM_DIR myDirectory DETCHEM 5 5 Setting up a problem It is recommended to create new problems in separate directories The directories can be created anywhere the user wishes them to be The created directory which becomes your working directory must contain all the input files mentioned in the above section The user can copy these files from the example directory to the working directory and make necessary changes 5 6 Running the tool The example directory is supplied with a go script which can be used to
75. ACE MODEL gt definition after the data of the according time step Most conveniently this can be done by saving the different lt SURFACE MODEL gt sections in a separate files and including them in the input file e g lt INLETINFO gt u 0 8 constant velocity lt MOLEFRAC list gt CO NO 02 N2 lt MOLEFRAC gt lt INLETINFO gt lt INLETDATA gt time CO NO 02 N2 0 01 0 0 09 0 9 include surface modell inp CO is limiting species 60 0 09 0 01 9 0 9 include surface model2 inp NO is limiting species lt INLETDATA gt 15 3 Output reservoir plt At each time defined in the lt OUTPUT gt section a file reservoir plt is written The file is in TECPLOT format and can be used to draw one dimesional contour plots of the storage concentrations It can also be imported into other spreadsheet programs like Microsoft Excel The file header contains the time when the file was written The user may change this time when this file shall be used as a restart file of a new simulation In contrast to outs pit files the storage concetrations are now written with respect to Feat geo Since the capacity may change along the channel the written coverages are already multiplied with Feat geo of the storage component reservoir plt This file contains the data of all reservoir plt files The file is in TECPLOT format and can be used to draw two dimesional contour plots of the storage concentrations depending on time and posit
76. AM need various objects data files keyword files executables libraries The struc ture of a folder lt caseDir gt is shown in figure 18 6 There are many other objects needed for the calculation In the folder only the most important files are shown The objects in grey colour are needed for a calculation of a system with two regions In this manual they are always named as FLUID and SOLID The coloured objects have to be changed for the setup of a new case They should be copied from one of the example cases and adapted afterwards The objects their functionality and content are explained in the following sections The reader should always refer to figure 18 6 to get an overview about the data structure 18 3 USAGE OF DUO 137 one file for each transport equation one file for each property boundary conditions initial values boundary conditions initial values one file for each transport equation one file for each property boundary conditions initial values boundary conditions initial values regionProperties 1 region definitions turbulenceProperties g transportProperties thermophysicalProperties chemistryProperties keywordfile gravity options keywordfile keywordfile keywordfile ___ boundary patchfile Objects needed for boundary o aE penFOAM with FLUID SOLID patchfile O E DUO external coupling ze controlDict coup
77. Current 1A yes Voltage 1V 1W A yes Electrical Resistance 1 Ohm 1 V A yes Electrical Charge 1C 1As yes Volume Pressure 3 2 thermdata The thermodynamic database contains enthalpy entropy and heat capacity data for each species in the NASA Equilibrium code 10 The calculation of thermodynamic data from the coefficients a a7 is described by equation 2 13 2 16 and 2 17 There are two temperature intervals with different sets of coefficients to achieve better accuracy The first seven entries are the values a a7 for the temperature interval Tiump lt T lt Thigh the next seven entries are the values a a7 for the temperature interval Tjow lt T lt Tjump H2 J 3 77H 2 0 0 OG 300 000 5000 000 0 30667095E 01 0 57473755E 03 0 13938319E 07 0 25483518E 10 0 29098574E 14 0 86547412E 03 0 17798424E 01 0 33553514E 01 0 50136144E 03 0 23006908E 06 0 47905324E 09 0 48522585E 12 0 10191626E 04 0 35477228E 01 3 3 MOLDATA 25 The following format is used for the section above selected from the thermdata file line 1 The first 8 characters in this line are used to define the chemical species with the format specifi cation A8 which is followed by comments with A16 format The next 20 columns are reserved to specify the atoms present in the defined chemical species with the format 4 A5 In the above example H represents the atom and 2 stands for the number of atoms present The next 3 columns are reserved for the species type
78. D Sizes inbetween regions Region Region Faces Additionally you should find something like this For interface between region 9 and 1 added patch 8 FLUID_to_SOLID 4 Check mesh Perform OpenFOAM application checkMesh constant Check carefully the output If something is wrong here the calculation will not work C Boundary Conditions in OpenFOAM See example case for the two zone solver chtMultiRegionSimple Foam in the OpenFOAM manual D Directory Structure of a Case DUO and DC40penFOAM DUO and DC40penFOAM needs various objects data files keyword files executables libraries The struc ture of a folder lt caseDir gt is shown in Fig 3 1 There are many other objects needed for the calculation In the folder only the most important files are shown The objects in grey colour are needed for a calculation of a system with two regions In this manual they are always named as FLUID and SOLID The coloured objects have to be changed for the setup of a new case They should be copied from one of the example cases and adapted afterwards The objects their functionality and content are explained in the following sections The reader should always refer to figure 17 5 to get an overview about the data structure E Data Input for OpenFOAM Directories and files for the solver The coupling of the codes OpenFOAM and DETCHEM is an application in OpenFOAM The application or solver directories can be located anywhere but 1t is recomme
79. DETCHEM User Manual Version 2 5 http www detchem com Olaf Deutschmann Steffen Tischer Chrys Correa Daniel Chatterjee Stefan Kleditzsch Vinod Janardhanan Nikolay Mladenov Hoang Duc Minh Hiiseyin Karadeniz Matthias Hettel c o Olaf Deutschmann STZ 240 Simulation of Reactive Flows Germany October 22 2014 Tel 49 7247 9542387 E Mail mail detchem com Preface DETCHEM DET ailed CHEMistry is a package of FORTRAN routines for the modeling of gaseous re active flows including reactions on solid surfaces using elementary step like reaction mechanisms as well as global reaction mechanisms It is also designed to couple DET ailed CHEMistry with Computational Fluid Dynamics CFD programs This approach allows the simulation of both the flow and chemistry using models based on the molecular processes The DETCHEM software package consists of several computer programs DETCHEM can also be coupled to the open source CFD software package OpenFOAM as described in this manual With version 2 1 DETCHEM software package is restructured uniform input format has been introduced and several tools have been added DETCHEM has been applied to simulations in the following fields catalytic reactors catalytic combustion automotive catalytic converters micro reactors micro burners solid oxid fuel cells chemical vapor deposition etc The FORTRAN routines used in the DETCHEM package have been developed by O Deutschmann S Tis
80. DETCHEM package DETCHEM_PATH absolute path to current directory assign a value if you want make to use asolute path names when left blank relative paths will be used DETCHEM_PATH fortran compiler FC 995 compiler flags FCFLAGS c 02 linker LD 995 linker flags LDFLAGS parallel version fortran compiler PFC 995 compiler flags PFCFLAGS FCFLAGS linker PLD 995 linker flags PLDFLAGS LDFLAGS MPI library PLIBS 1mpi You can call the Makefile in each code subdirectory seperately More convenient is to call make just once in the code directory It automatically calls make in all subdirectories in the required order For generating the parallel version of DETCHEMMONOLITH type make parallel The executabels of all modules will be saved in the bin directory A bin directory will be created automat ically by make if not present In case you changed some code e g user defined functions call make to update the executables When you have changed size parameters for memory allocation it is strongly suggested to remove all compiled files by typing make clean before recompiling the code again Installing DC4FLUENT See chapter for installation guide lines of DC4FLUENT 10 11 12 13 14 15 16 17 18 List of Scientific Publications Using DETCHEM O Deutschmann and L D Schmidt Two Dimensional Modeling of Partial Oxidation of Me
81. E STAG_WCOAT_AND_GASPHASE VARIABLES y TIME rro co DEN co2 ll 0 100000000000000E 03 0 000000000000000E 00 0 486946019131708E 03 0 722022776070702E 01 0 100000000000000E 03 0 219975998217398E 01 0 486946019131708E 03 0 722022776070702E 01 0 100000000000000E 03 0 429476948900635E 01 0 486947118172136E 03 0 722022762284908E 01 0 100000000000000E 03 0 629001663837050E 01 0 487295820737408E 03 0 722018319160494E 01 0 100000000000000E 03 0 819025201871732E 01 0 587980625221570E 03 0 720735682409933E 01 0 100000000000000E 03 0 100000000000000E 00 0 257785466728995E 01 0 399837172511616E 01 0 100000000000000E 03 0 914846147153505E 01 0 558739720682844E 01 0 835443519329686E 03 0 100000000000000E 03 0 186493460166468E 02 0 566910726668075E 01 0 676735726010959E 05 0 100000000000000E 03 0 286252747890142E 02 0 566999270155862E 01 0 413898503389330E 07 0 100000000000000E 03 0 391000000000000E 02 0 566999997202967E 01 0 118393880838135E 09 The washcoat thickness is taken 100u m for the above example 0 mm indicates there the washcoat support side 0 1 mm indicates the gas washcoat interface and 39 1 mm indicates the gas inlet side 10 6 Examples There is one example supplied along with the installation The example directory contains the following files stag inp species inp mech inp a gas phase mechanism gas fest a surface mechanism surf test mech inp thermdata moldata and a script file go 10 7 Setting up a problem It
82. EMINP produces several output files The file chem new contains the species and the mechanism information in a compact form It can be used to replace the species and the mechanism information in any detchem apllication Just write include chem new at the beginning of the application specific input file The files thermdata new and moldata new contain the thermodynamic data and the molecular properties respectively of the required species That is only the information of the relavant species is extracted from thermdata and moldata If you want to use the new files with your application please remove new from the file names Furthermore two files named gasmech chemkin and surfmech chemkin are created These files contain the gas phase and surface mechanisms in CHEMKIN format Thus DETCHEMCHEMINP can be used as a DETCHEM to CHEMKIN translator for input files 4 4 Isotope analysis An experimental method to examine reaction paths is the isotope analysis Reactants could be marked using different isotopes in order to find out which product is formed from which reactant This set up can be simulated in any DETCHEM application However one needs to create new input files because isotopes need to be treated as different species Such new input files can be created using DETCHEMCHEMINP This is done by adding a line to cheminp inp using the option isotopes followed by the symbol of a chemical element If you want to distinguish two oxigen isotop
83. EMS S they must be supplied by the user Default values for some of the parameters can be used or they can also be supplied by the user TIN d Inlet gas temperature K VIN d Axial inlet velocity m s XLEN d Surface inlet distance m p d Pressure Pa default 1 E5 NGRID i Number of the grid points default 60 TIMES d Initial integration time s Default 0 0 TIMEF d Maximum integration time s Default 100 HSTEP d Initial time integration step size s Default 1 E 12 ATOL d Absolute tolerance mol m 3 Default 1 E 6 RTOL d Relative tolerance Default 1 E 3 ASPECT d Aspect ratio for the non equidistant grid generation Default 1 0 An equidistant grid is generated if aspect 1 0 THERMALDIFF b Thermal diffusion effect Default n Thermal diffusion is important especially for light species e g H2 WASHCOAT b The effect of the washcoat is taken into account based on the detailed reaction diffusion equations A direct coupling is considered between the washcoat and the surrounding gas phase Default n A normal simulation is performed without washcoat effect if this option is not invoked WASHCOAT2 b The effect of the washcoat is taken into account based on the detailed reaction diffusion equations An indirect coupling is considered between the washcoat and the surrounding gas phase Indirect coupling implies that the washcoat is solved first After it reaches steady state it is coupled with the gas
84. ETCHEM to OpenFOAM This capability is needed if gas phase reactions in flow regions 113 114 CHAPTER 17 DCIOPENFOAM outside of the channels of a monolith e g upstream of a monolith have to be considered Additionally the surface reactions at walls can be calculated Therefore it is also possible to calculate the full three dimensional flow and the chemistry inside the channels of a monolith In this case the flow regions inside the single channels would be included in the CFD grid Both tools DUO and DC40penFOAM can be used independently or can be mixed up The approach allows for example the calculation of a reformer in which the combined gas phase and surface chemistry is confined within geometrically simple tubes or channels and additional reactions take place in the gas phase out of the monolith and at the outer surface In figure 17 1 a schematic drawing of a monolith with nine channels located in a surrounding flow field is shown The flow covers the region upstream of the monolith as well as the channels in the monolith Flow over the external surfaces of the catalyst tubes may be used to achieve thermal control For example hot exhaust products from an SOFC tail gas combustor can be used to support endothermic steam reforming Heat transfer occurs inside the fluid and the solid regions as well as at the interfaces between these regions Channels in Monolith 1d or 2d flow detailed chemistry code DETCHEM Solid
85. Fe de Te Fe Fe Te Fe RRE Te Fe Fe Te RARA Te Fe de Te Fe Te Te Fe Te Fe de Te Fe Fe e Fe Te Fe Fe Te Fe Fe de de Te Fe Ke Te Fe ARRE REGRID DONE wee Old grid points 60New grid points 64 ERARE REGRIDDING PROCESS COMPLETED KEREN Calculation for 0 00 W m2 Time 0 00s Calculation for 0 00 W m2 Time 0 00s Calculation for 0 00 W m2 Time 0 01s Calculation for 0 00 W m2 Time 0 02s Calculation for 0 00 W m2 Time 0 04s Calculation for 0 00 W m2 Time 0 07s Limex finished successfully DETCHEMST S has the ability to implement an adaptive refinement procedure during the grid generation except the washcoat part An information will be given about the implementation of the adaptive refinement 1f the user invokes the option After the header the next three lines will give a short information about the grid generation whether it is done or it is not necessary The number of the old and new grid points will be displayed The next lines will give following for which power the calculation is performed for instance 300 0 W m2 and current integration time of the solution The last line gives information whether the solution is finished successfully 10 5 2 gas_ dat This file is generated according to the power input For instance if the user gives zero power input the output file will look like gas 0 00dat If a power increase is supplied in the stag inp the program will also give an output for each power increase for ins
86. L gt tags as shown in the example below lt GLOBAL gt 2 CO 02 gt 2 C02 lt ARRHENIUS gt A cm_units 1E10 Ea kJ_mol 275 lt ARRHENIUS gt INHIBITION FACTOR 1 lt GLOBAL gt 3 8 Surface models Note for DETCHEM Version 2 0 users Because of some ambiguities between washcoat input and lt CHEM SURF gt input the data has been rearranged For any simulation involving surface species the new section lt SURFACE MODEL gt has to be defined The information must be given between the lt MECHANISM gt section and the beginning of the application specific section Now as a consequence all DETCHEM applications can apply at least the washcoat effectivness factor model The lt SURFACE MODEL gt section contains information for the calculation of the net surface fluxes due to chemical reactions Three properties influence the solution method e The steady state solver lt CHEMSURF gt e The ratio of catalytic to geometric surface area e The washcoat diffusion model A simple example is shown below 36 CHAPTER 3 INPUT FILES lt SURFACE MODEL gt lt CHEMSURF gt time 1 integration time for surface coverages analytical no use analytical Jacobian matrix lt CHEMSURF gt Fcatgeo 1 ratio of catalytic to geometric area mo washcoat diffusion model defined lt SURFACE MODEL gt The possible options inside the lt SURFACE MODEL gt tags are listed in the following table lt CHEMSURF gt CHEMSURF parameters F
87. LITH Especially in the case of adiabatic calculations the reaction may not ignite under the given conditions The option ignite_at can be used to simulate a spark to initiate the chemical reaction The temperature specified in this option is used as a minimum temperature for the calculation of the chemical source terms All properties of the fluid are calculated at the actual temperature The ignite_at temperature shall be chosen high enough to initiate the chemical reaction but it should be lower than the expected reaction temperature In case a reaction mechanism is negligible for low temperatures the option ignore_below can be used to speed up calculations For temperatures lower than the specified value the chemical source terms will not be calculated and are set zero 13 3 OUTPUT 87 13 3 Output Depending on the settings in the lt OUTPUT gt section of the input file DETCHEMCHANNEL produces screen output and file output 13 3 1 Screen output If monitoring is activated the screen output will look like below ES were DETCHEM CHANNEL war wur STEFFEN TISCHER wur BETH VERSION 2 0 001 2003 07 24 ARER ES 0 0 00000000 0 01000000 1123 00 1123 00 1 0 00000000 0 01000000 300 00 1123 00 2 0 00000000 0 01000002 300 00 1123 00 3 0 00000000 0 01000014 300 00 1123 00 161 1 00000000 0 01000000 1123 03 1123 00 Iterations 161 Errors 0 The five colums show the number of integration step the z position along the channel covergence
88. M gt This input defines a reaction 2CO O 2C0 3 2 with the rate law d O3 dr 275kJ mol RT 10 cm mols exp CcO 09 3 3 In the global section the user can specify any chemical reaction Just write the reaction equation in a natural way component1 component2 gt component3 component4 for forward reactions or component1 component2 component3 component4 for reversible reactions Each component consits of an optional stoichiometric coefficient and a species name The stoichiometric coefficient must be integer if omitted it defaults to 1 Stoichiometric coefficients species names and signs must be separated by space characters The rate law can be defined in two ways First the user can specify the coefficients of an Arrhenius rate law The possible parameters in the lt ARRHENIUS gt subsection are A SIunits d pre exponential factor mol m s K A cm_units d pre exponential factor mol cm s K A molefracs d pre expontential factor w r t mole fractions mol m3 s K beta d temperature exponent default 0 Ea J_mol d activation energy J mol Ea kJ_mol d activation energy kJ mol Ea R d activation energy R K species symbol d reaction order of species So the user can specify the preexponential factor A the temperature exponent 6 and or the activation energy Ea The reaction order of a species defaults to the reactant s stoichiometric coefficient If st
89. MASSFRAC gt species mass fractions In the lt MASSFRAC gt or lt MOLEFRAC gt section one species can be assigned a instead of a numerical value The mass or mole fraction of this species will be balanced to unity respectively 5 3 Output DETCHEMC4 PROBE produces only screen output The output contains information on operating conditions mass and mole fractions chemical source terms heat capacity enthalpy and entropy FERRERA RE RU Fe Fe Fe Fe Fe de RRA RR Fe Fe de Te ARRE Te Fe RRA RR Fe Te Fe e RR RR RR RRA Fe Fe Te Fe Fe Te Rc tete RER DETCHEM_GASPROBE vegy S Tischer 0 Deutschmann AER RENN VERSION 2 0 04 06 22 KEER Fe Fe de Fe Fe Fe Fe Te Fe Fe de de Fe Fe Fe Fe Fe Fe de Fe Te Fe Fe Fe Fe Fe de Te Fe Fe de Tee een initial values Temperature K 1200 Pressure Pa 100000 species mass fraction mole fraction 43 js CHAPTER 5 DETCHEMC4SPROBE NO 0 00000000 0 00000000 02 0 00000000 0 00000000 NO2 0 15432169 0 10000000 0 0 00000000 0 00000000 N2 0 84567831 0 90000000 species chemical source term mol m 3 s NO 0 000000E 00 02 8 896840E 05 NO2 8 896840E 05 0 0 000000E 00 N2 4 448420E 05 species heat capacity J kg K enthalpy J kg entropy J kg K NO 1 16141735E 03 3 98023574E 06 1 16141735E 03 02 1 11232116E 03 9 30481572E 05 1 11232116E 03 NO2 1 16560234E 03 1 65341201E 06 1 16560234E 03 0 1 30519414E 03 1 67661108E 07 1 30519414E 03 N2 1 20328747E 03 1 00382402E 06 1 20328747E 03 average 1 1
90. M_CASE chemkin chem inp CHEMKINThermoFile FOAM_CASE chemkin therm dat inertSpecie N2 Chemistry Model The file lt caseDir gt constant FLUID chemistryProperties has always to be present if chemical reactions are calculated within the internal coupling Use the file which can be found in the example cases 17 3 4 Start of a Calculation with DC40penFOAM Start the OpenFOAM application by typing the command chtMultiRegionSimpleFoamChemDuo All the keywords required for the coupling to DETCHEM see table have to be present in the file lt caseDir gt couplingParameters Now the entry for the keyword coupling has to be coupling on For the first run it is advisable to activate additional output by setting debugLevel 25 You could also create an executable shell script named start with the following entry bin csh chtMultiRegionSimpleFoamChemDuo If you start the calculation with the command Start gt log the job will work in the background and the output will be written into the file log 17 3 5 Solution Data from OpenFOAM A Solution Data from OpenFOAM The lt time gt directories contain the result files For an example case with the name reformer the velocity field U for the timestep 10 s is stored in the file run reformer 10 U The solution files can be converted to the TECPLOT format using the utility foam ToTecplot360 17 4 Appendix 17 4 1 Example of an Input File properties inp In the following a
91. O et To Outputs BE os ao dado a 4 fe we bas eee bak we eet eA fe we ok Bad verdes Took SCIELO BR Big adic Be ey ty Ral SA 0 DIE 4 22 2 erpa DA SEGA te Tee BIE cease tied ciel Bathe Jo oo ate oss Say ep as are LA Example 0 a eed re gr tee ae ae Go ae ou ge ae ee aed 75 Setting up a problem ss isc 2 a ele eee ss ee eg ew eee een eg DETCHEMPATCH 8 1 Introduction 2 2 2 2 05 seen a De CE eS A Ra er ee Sr SEL GoOverning equations u pt eae eee wll era eG wet 8 1 25 Solon pde e e WO TAR in Par ne Owl ees 8 2 User Input ran na e ee ae aaa A Sats A oad 3 OUUTE Ls gage mie tert Ad PR PR REE RRP oe OG eR EES AA 8 3 1 Screen outputs so Mrs ie RO Ba He aw e ee ha BD et 8 32 batch 9 1 AAA E wre Big fet hale Agee ee 8 3 3 batch sens AY FAL 2 ae ee Ae Sb ee a we ede det eA PG a 8 4 Examples sob Sie eh ee BA eee es ead Vang ee tld 85 Setting upa problem e e e 6405 See ee REA A ee ee wes 86 Running the tool soos e as Bee keg en eg Se Baia cee AR ge DETCHEMSTR 9 1 Introduction ers A AE AR pi Pd ee An eh 9 1 1 Governing equations 3 4 rar apart ee na ed 9 12 SOMO 2 2 2 a sarah A A nen SS vg s 92 User Input 22 2 54 una ehe Bee oa ee Be he Bd 9 3 QUtpUE s a 24 4506 wf Be re Be ede 4 9 3 1 Scree outputa 2 6 io ee Be le ee A o a S ID OSE RE DU 2 3 ee A 93 3 Example teo ees Be tds in Sle wk ee 94 Setting Upa problem Lune on 42 ehr A Brake ehem 95 Running the tool acs eee ds ee ar une
92. OLEFRAC gt lt GASPHASE gt lt INLET gt lt PROCESS gt isothermal y isothermal conditions y or n adiabatic n adiabatic conditions y or n mass transfer y mass transfer resistance y or n lt PROCESS gt lt CHEMSURF gt opening tag for chemsurf options hini 1 d 10 inital time step for integration time 100 end time for integration for surface coverages lt CHEMSURF gt closing tag for chemsurf lt SOLVER solver limex gt opening tag for solver using limex solver hini 0 d0 initial step size for integration hmax 0 1 maximum stepsize allowed for integration lt TOLERANCE gt opening tag for convergence tolerance lt MOMENTUM gt tag to specify tolerence for momentum equation aTol 1 d 06 absolute tolerence for convergence rTol 1 d 06 relative tolerence for convergence lt MOMENTUM gt closing tag for momentum tolerence lt SPECIES gt tag to specify tolerence for species equations aTol 1 d 06 absolute tolerence for convergence 12 4 OUTPUT 77 rTol 1 d 06 relative tolerence for convergence lt SPECIES gt closing tag for species tolerences lt TEMPERATURE gt opeing tag for temperature tolerence aTol 1 d 06 absolute tolerence for temperature equation rTol 1 d 06 relative tolerence for temperature equation lt TEMPERATURE gt closing tag for temperature tolerences lt TOLERANCE gt closing tag for tolerances lt SOLVER gt closing tag for solver lt OUTPUT gt
93. OMAIN gt lt GRID gt lt SOLUTION gt time 130 h 2 6 T K 623 lt SOLUTION gt lt OUTPUT gt lt do gt from 5 to 55 step 5 lt do gt 59 9 60 1 64 9 lt do gt from 65 to 125 step 5 lt do gt write_restart yes lt OUTPUT gt lt STORAGE gt surface BaC03 mechanism Speicher lt STORAGE gt lt INLET type variable gt file inlet inp lt INLET gt lt RESERVOIR gt The file reservoirinp must start with the definitions necessary for the channel calculation This implies that first the species definiton the mechanism definition the optional washcoat deinition and the channel definition appear first in the input file It is probably most convenient to use the same input file as for the channel simulations and include the channel input file by an include statement The DETCHEMRESERVOIR specific input data follows enclosed in lt RESERVOIR gt tags The options inside this section are listed in the following table Version s input file version not evaluated lt GRID gt define grid must be the first tag lt SOLUTION gt define solver options lt OUTPUT gt define output options lt POSTPROCESS gt postprocessing lt STORAGE gt storage model lt INLET gt define inlet conditions lt GRID gt grid definition For the calculation of the transient concentraition profiles the channel needs to be discretized in axial direction This is done by the one dimensional grid definition The lt GRID gt
94. Washcoat diffusion models o e e o 3 8 4 Effectiveness factor model 2 mann on 4 DETCHEMCHEMINP 4 1 Introduction 2 2 tench tot Gh amp oe Soe a SP Ey tied a e Soe Ps 42 gt User Inputs ie 2222 Bibs Be ee Ba Bible le eh 4 4 3 QU PUE a So ete SE ee Beal BAT Ge ode Bee ot Ae ee baat 4 4 Isotope analysis sr cne e BOR a we Bie Ge lode BAA Be Oo ae dd AS Running the tool sansa 022 Bf a een aa nn Bleib aed 10 10 11 11 11 11 14 15 15 15 17 17 19 19 19 19 20 DETCHEMS ASPROBE 3 1 Introduction e 2 an eh Bde ne er Be ee Sd 972 User Input a ae ee ehe 9 3 OUUTE A ti ER E Bald nT ee Re 9 4 Examples 2 02 air Werder Beste dee Be er Dep E Gin a 3 9 setting up problem spees 2 Seok or er 3 0 Running thetool gt Haste RK neh Panett sue ee erated DETCHEMSURFPROBE 6 1 Introduction exi rt ER at a Ben ad Bie eS 6 2 sernput r r 2 bob baled ee ea Ba hd 6 3 Outputs 3 A hee ee Ba ae Beh A A A 6 4 Examples 2 is is ook Rare we AA e gt a ace ed AA Pd 65 Setting Up A proble Lies Geos Me ate eet oe bee Dae ae Ge et 6 6 Running the tool arte GES PR SEE nee DETCHEMEQUIL TA Introduction 4 ed ace ee so hd oe E SO AA DA EA Gre eA 7 1 1 Theoretical background e T2 AA Be eth ele wa be GS ae Bes 12 Wseranputss io ibe beatae bee ea ith bat en a ad 1 21 CQUIL INDY 2 5800 Bed A an IA ee Re Reet is T22 th rmdat o oe el hs ede he ee BE EEE E RD ee BA
95. _DIR myDirectory DETCHEM 6 5 Setting up a problem It is recommended to create new problems in separate directories The directories can be created anywhere the user wishes them to be The created directory which becomes your working directory and must contain all the input files mentioned in the above section The user can copy the files from the example directory to the working directory and make the necessary changes 6 6 Running the tool The example directory is supplied with a go script which can be used to run the tool just by typing go in the command prompt or by any of the appropriate methods explained in the installation guide Chapter 7 DETCHEMEQUIL 7 1 Introduction This code calculates the equilibrium composition of a given gas phase mixture which is defined by its thermo dynamic potentials 7 1 1 Theoretical background The state of a closed system can be described by pressure p temperature 7 and the number of moles of each species n This state can be expressed in terms of the Gibbs Free Enthapy as potential function G T p ni The system is in equilibrium when G is a minimum with respect to all possible combinations of nj In chemical systems the mass is conserved and hence the number of atoms must not change in a chemical reaction If we denote the number of atoms of type j in species i by aj then the changes n of amount of species i must fulfil X aji6n 0 Vi 7 1 1 If the system is described
96. able to relax the tolerance criteria as well as the maxh especially when calculations are performed with mass transfer option 11 2 4 The lt SUMMARY gt and lt SUM gt tag In the plug input file there is an option to produce summary of the simulation which is nothing but the exit conditions of the chemical species In case if there are large number of species involved in the problem and the user wants to know the exit conditions of certain specific species then the name of those species can be listed under the lt SUMMARY gt tag and hence the exit conditions will be written in the file summary dat If the user wants to find the sum of mass mole fraction of certain species up on exit then the lt SUM gt tag can be used which will produce the sum of the mass mole fraction of the species in the output file summary dat 11 3 Output Depending on the options set in the input file DETCHEMP S produces several file outputs All the output files are in Tecplot format 11 3 1 Screen output Other than the file output DETCHEMP WS produces screen output depending on the monitor option specified in the input file With monitor 1 the screen output reports the iteration count and the temperature With monitor 2 it reports the iteration count temperature and the species mass fractions An example of screen output is shown below 11 3 OUTPUT 73 ES ES DETCHEM PLUG ES EUER Vinod M Janardhanan Steffen Tischer amp Olaf Deutschmann RER ARA
97. activation losses efficiency etc If the file summary dat 112 CHAPTER 16 DETCHEMS9FC exists the the file will be appended with the information for every new calculation The file contains information in the following order e Ecell Operating cell potential V e Erev Reversible cell potential V e CD Average current density A cm e PD Average power density W cm e FU Fuel utilization e Eff Efficiency 9 e AU Air utilization e Act_A Average anode activation loss V e Act_C Average cathode activation loss V e R_el Average ohmic resistance Q m e Asp Active specific area 1 m e La Thickness of anode m e Le Thickness of electrolyte m e Lc Thickness of cathode m e Ra_ct Average charge transfer resistance of anode Q cm e Rc ct Average charge transfer resistance of cathode Q cm 16 4 1 Examples The examples directory with the distribution contains a sub directory named SOFC which contains a number of case files Other than the case files the directory also contains files such as thermdata moldata species inp mech inp and the surface chemistry mechanism file The go file may be used to run the examples 16 4 2 Setting up a problem It is advised setup every new case in new directories The directory should contains the following files species inp mech inp sofc inp thermdata moldata and the mechanism file specified in the mech inp file 16 4 3 Running the
98. age effects On the other hand some ill conditioned surface reaction mechanisms may result in poor convergence behavior In this case long integration times may slow down the simulation Using the member analytical the user can choose if the Jacobian of the ODE system shall be determined analytically or numerically In general the analytical solution should be faster but in some cases the numerical solution is more stable In case the ChemSurf integration process shall be monitored the option write_file can be activated Then a file chemsurf plt will be written upon the first call of ChemSurf during execution of any DETCHEM application e g DETCHEMSURFPROBE This file contains the surface concentrations of all non inert surface species vs time Note When using the detailed reaction diffusion washcoat model this option will be ignored because a different solver is called All options in the lt CHEMSURF gt section are summarized below time d integration time s default 1 hini d initial integration time step s default 1e 8 rTol d relative tolerance of surface coverages default 1e 4 aTol d absoulute tolerance of surface coverages default 1e 20 maxIter i maximum number of iterations default unlimited analytical b analytical yes or numerical no calculation of Jacobian default no write file b write file chemsurf plt during first ChemSurf call default no 3 8 2 Catalytic vs geometric surface area The rates
99. al tube and calculates the corresponding band number by projecting the face centroid onto the 1D grid Figure 18 3 illustrates the relationships between a general triangular surface mesh on a tube and the one dimensional band grid All triangular faces whose centroid touches the band are assigned to that band index As can be seen no special alignment is needed between the CFD mesh and the band grid At the beginning of each solver iteration DUO calculates face averaged temperatures for all bands in a tube These band averages correspond to azimuthally averaged temperatures on the tube wall faces in the band DUO then creates a file with the list of the band temperatures and executes codes form DETCHEM Typically the chemistry model uses a spatial discretization which is different from the CFD grid Therefore interpolation of the temperature from the band grid to the chemistry grid is required If the user wishes the conditions at the outflow areas of the CFD mesh which cover the same areas as the inflows for the single channels are also written to additional files and used for the calculation of the channels s Fig figure 18 1 After that DUO executes the code DETCHEMPFUS or DETCHEMCHANNEL for each channel When the tube simulation is complete the tool creates a file containing the heat flux profile for the band grid DUO then analyses these heat flux profiles and assigns the fluxes for each band to the corresponding collection of mesh faces in t
100. all the input files mentioned in the above section The user can copy these files from the example directory to the working directory and make necessary changes 8 6 Running the tool There are several ways to call the executable e Using the go script from the example directory The user needs to define the system variable DETCHEM_DIR e Add the DETCHEM DIR bin directory to your system path and call batch e Create a symbolic link to the executable DETCHEM_DIR bin batch and call batch The latter option does not require setting of system variables and is therefore less system specific Chapter 9 DETCHEMCSIR 9 1 Introduction The program DETCHEMSTR simulates the behavior of the continuous stirred tank reactor CSTR under dif ferent temperature conditions for applications involving gasses The code is designed to simulate homogeneous gas phase and heterogeneous surface reactions in a CSTR 9 1 1 Governing equations dc a A p Vin Vout h 9 1 Ckin as phase species Tt k V Sk V Ck V Ck gas p P d F aS surface species 9 2 dH a 2 ArTin CkinVin MATIC Von 9 3 Tou Mn Vot Vi 9 4 TinMou In the above equation Wz Sk A V Vin Vout amp Touts Tin Min Mout Min and h represent the gas phase reaction rate surface reaction rate surface area reactor volume inlet flow outlet flow coverage relaxation factor outlet temperature inlet temperature mean inlet mola
101. an be modeled for Gas phase and the Surface reactions 12 3 User Input Before running DETCHEMPACKEDBED the user must prepare an input file pack inp An example is shown below include species inp Species input file include mech inp Mechanism input file lt PACK gt opening tag for plug specific data lt GEOMETRY model channel gt opening tag for geometry specific data rin 0 025 inner radii of the reactor lt SECTION gt length 0 05 length of the reactor section gaschem y gas phase chemistry y or n surfchem y surface reactiosn y or n t wall 1000 wall temperature of the reactor section porosity 0 37 void fraction of the packing particle_dia 3 7d 03 equivalent diameter of the packing particles kp 0 3 thermal conductivity of the solid packings area volume 400 porous area to volume ratio lt SECTION gt lt WALL gt thickness thickness of the reactor wall conductivity thermal conductivity of the reactor wall ho outside heat transfer coefficient lt WALL gt lt GEOMETRY gt closing tag for geometry lt INLET gt velocity 1 inlet velocity of the fluid stream temperature 300 inlet temperature of the fluid stream pressure 1d05 inlet pressure of the fluid stream lt GASPHASE gt lt MASSFRAC gt lt MOLEFRAC gt mass or mole fraction of the species NO2 0 name and mass mole fraction of 1 st gas species NV E name and mass mole fraction of 2 nd gas species lt MASSFRAC gt lt M
102. an the preceding times For instance lt V_Profile gt 0 0 0 001 20 0 0 002 40 0 0 0025 60 0 0 0028 100 0 0 003 lt V_Profile gt The user can specify an arbitrary number of pairs If the profile consists only of one pair of values the specified parameter p V or T remains constant during the whole simulation Intermediate states are deter mined by means of linear interpolation For example according to the volume profile shown above the reactor volume after 30 s will be 0 00225 m 56 CHAPTER 8 DETCHEMPATCH Adiabatic and isenthalpic conditions are specified in the lt CONST_QUANTITY gt section It contains the initial reactor temperature T K and the options const_quantity and surf thermdata The const_quantity option can be set to Q for adiabatic and to H for isenthalpic simulation For adiabatic isobaric problems either of both values can be used However the user is recommended to use const_quantity H in this case because the solution converges faster and provides more accurate results The surf thermdata determines whether thermo dynamic data for the surface species have to be taken into account y or not n This option ist set to n by default because in most cases thermodynamic data for the surface species are not available The options within the lt BATCH gt tag are as follows solver _id i swtich between the LIMEX 0 and DAESOL 1 solvers default 0 p Pa d initial pressure Pa V m3 d initial react
103. and any number memory allocation de faults to five of surface mechanisms In order to distinguish different surface mechanisms the name member can be assigned a string of up to 8 characters A mechanism is enclosed within a pair of lt GASPHASE gt or lt SURFACE gt tags However each mechanism can can constist of an arbitrary number of mechanism files e g lt MECHANISM gt lt GASPHASE gt file gasphase lt GASPHASE gt lt SURFACE name Pt gt file surfacel file surface2 lt SURFACE gt lt SURFACE name Rh gt file surface3 lt SURFACE gt lt SURFACE name Ni gt file surface4 lt SURFACE gt lt MECHANISM gt Note Now the use of external mechanism files is not mandatory anymore Each reaction can also be defined directly in the input file using the format free input file syntax Gasphase mechanism The lt GASPHASE gt tag can hold the following types of input file s gas phase mechanism file lt REACTION gt elementary step reaction lt TROE gt Troe reeaction lt GLOBAL gt global reaction An external gas phase mechanism file as descibed in chapter 3 4 is specified by the file option Alterna tively or in addition the user can define elementary step reactions with Arrhinus or Troe rate laws or complex global reactions with arbitrary rate laws The syntax will described later in this chapter Surface mechanisms The lt SURFACE gt subsection may contain the following options
104. ant class of reactors in chemical in dustry They are the most commonly fund reactors in Petroleum and Petrochemical industry There are a number of ways by which one can represent a packed bed reactor mathematically and hence to solve it numerically The most commonly found models are 1 One dimensional homogeneous 2 two dimensional homogeneous model 3 One dimensional heterogeneous model 4 two dimensional heterogeneous model DETCHEMPACKEDBED jg basically a one dimensional heterogeneous model The one dimensional heterogeneous model assumes that there is no radial variations in the flow properties Most of the industrial reactors runs under adiabatic condi tions The model presented here can be used for any operating conditions The model do not takes care of axial diffusion 12 1 1 Governing Equations For setting up the above equations it is assumed that a there is no variation in the transverse direction and b axial diffusion of any quantity is negligible relative to the corresponding convective term kg am 2 3 si My 12 1 kg PS pu Y a Ss sk Mg Mi a sk we 12 2 k l d C T 4 pu Dr cr h Mge 2 sk hu Miay UAT Tp 12 3 dp _ pu 12 4 dz dp PM pRT 12 5 The above listed represent the total continuity species continuity energy and the equation of state respectively In addition to these equations since the residence time of gas is often a quantity of interest a differential equatio
105. application it might also be advisible to save the species information together with thermdata and moldata in a separate directory and create symbolic links to your working directory e g ln s detchem data species thermdata Make sure that all species in your species list are also contained in thermdata and moldata Define the initial conditions and tolerances and start the program There are several ways to call the executable e Using the go script from the example directory The user needs to define the system variable DETCHEM DIR e Add the DETCHEM DIR bin directory to your system path and call equil e Create a symbolic link to the executable SDETCHEM DIR bin equil and call equil The latter option does not require setting of system variables and is therefore less system specific Chapter 8 DETCHEMBATCH 8 1 Introduction The batch code simulates homogeneous gas phase and heterogeneous surface reactions in a batch reactor The user can specify his own time dependent pressure volume and temperature profiles In case of missing temper ature profile isenthalpic or adiabatic analysis can be performed 8 1 1 Governing equations d Va AS gas phase species 8 1 d AS surface species 8 2 PV nRT ideal gas equation 8 3 In the above equations Wx k A V a represent the gas phase reaction rate surface reaction rate catalytic surface area reactor volume and surface relaxation factor respectively The s
106. ar mass of the mixture M averaged diffusion D m and thermal diffusion D coefficient of each species are also calculated in the DETCHEM library Please note that N represents the gas phase species in the equations 10 2 2 Surface equations Chemical processes at the surface can be calculated based on three different approaches Instantaneous dif fusion at the gas surface interface detailed washcoat model and effectiveness factor approach Instantaneous diffusion considers a flat surface where the catalyst is virtually distributed Therefore it does not account the internal mass transfer limitations The detailed washcoat model and the effectiveness factor approach account the internal mass transfer limitations that are due to the porous washcoat layer More detailed information can be found in section 2 3 10 2 3 Boundary conditions In order to completely describe the system boundary conditions must also be included Gas Surface Washcoat Interface In order to couple the catalytic surface and the surrounding flow interaction between them must be accounted Energy balance and species conservation equations are established at the interface Energy balance is calculated as follows Ng N 8 l P j 4 4 l A 2 Pcpi i W h oe T Trad 2 Mih P T T 10 9 ecpAx di a Species governing equation accounts diffusion and convection processes Due to the fact that species can be created or destroyed by the surfac
107. arameters line and name length include depth tag depth number of options in one tag number of species reactions and surface types fully dy namic number of washcoat grid points number of radial grid points number of axial sections fully dynamic number of points cells and layers grid size number of materials and boundaries output times channel types fully dynamic Chapter 20 Installation guide The following section describes how to install DETCHEM 20 1 Extract data DETCHEM is distributed as a tar tar or zipped tar tgz file Extract the tar file in your desired directory by tar xvf detchem tar or the compressed file by tar zxvf detchem tgz Now you will find the following directory structure e code lib_input lib utils lib_detchem lib_washcoat CHEMINP GASPROBE MONOLITH Makefile Makefile common e examples CHEMINP GASPROBE MONOLITH e bin e README 153 154 CHAPTER 20 INSTALLATION GUIDE 20 2 Run Make Each of code subdirectories contains a Makefile System specific information that need to be known to all Makefiles is saved in Makefile common Define the commands to call the compiler and linker and their flags in this file On some systems relative path names in Makefiles seem not to work properly In this case also define the absolute path to your DETCHEM directory in Makefile common An example file is show below Compiler Options for
108. ata can be given in a line below the reaction equation this line must start with a symbol followed by the species that the modification refers to species i in 28 CHAPTER 3 INPUT FILES Equation 2 70 Several modifications can be used as shown in Example 3 4 1 The value in the second column modifies the order of the reaction uig the change to the stoichiometric value is specified here The value in the third column ex modifies the activation energy In the following reaction STICK H2 PT s PT s gt H s H s 0 046E 00 0 PT S 1 0 0 0 0 0 0 STICK in the line above the reaction means that 0 046 is the initial sticking coefficient PT s below the reac tion line means that the rate coefficients order of the reaction have an additional coverage dependence in the following way PT s gives the related species here PT s vacancies and a nonzero value in second column 1 0 modifies the order by 1 for this species i e the reaction order in PT s is now first order and not second order In the following reaction OCs 0 s gt PT s PT s 02 3 700E 21 213 0 70 0 0 0 0 s 0 0 A is 3 7x107 cm mol s is 0 and E is 213 kJ mol O s below the reaction line means the rate coeff cients order of the reaction have an additional coverage dependence in the following way Equation 2 70 The nonzero value in the third column 70 0 reduces the activation energy by 70 kJ mol if the surface is completely covered with the
109. bsolute sensitivities during mechnism development For that reason users are recommended to use d n i d Inp j y 8 3 Output 8 3 1 Screen output On screen the integration progress is monitored The values in the column displayed stand for time monitor 1 Te He de te He de te He He de He He He He He Fe He He He He He He de ae He He He e Fe Fe e de He He Hee He He He He He He He Te He He He ee He He He ee ee we DETCHEM BATCH N Mladenov S Tischer 0 Deutschmann VERSION 2 1 20792 HRI IRIE REE Te Fe He de Te Te Fe de Te e Fe de Te de de Te e Fe de Te de Fe de Te de de Te Fe Te Te Te IEEE de Te e de de Te He Fe Te time s 0 0000000E 00 5 1100105E 02 1 0197794E 01 1 5368989E 01 5 0000000E 00 DETCHEM copyright by O Deutschmann licence agreement required For further information visit www detchem com BATCH finished successfully 8 3 2 batch_ plt DETCHEMPATH produces four output files batch_n_ plt batch_c_ plt batch_x_ plt and batch y_ plt The output files are in TECPLOT format TECPLOT will create a line graph upon loading a plt file Nevertheless this format also allows for easy import into spreadsheet programs like Microsoft Excel The variables in the files are time pressure volume temperature and species data Species data can be written as 1 mole numbers prefixed with n and written in batch_n_ plt 2 concentrations prefixed with c and written in batch_c_ plt 3 mole fracti
110. c structure The approach exploits the structure of reformers in which the combined gas phase and catalytic chemistry is confined within geometrically simple tubes or channels In figure 18 1 a schematic drawing of a monolith with nine channels located in a surrounding flow field is shown The flow covers the region upstream of the monolith as well as the channels in the monolith Flow over the external surfaces of the catalyst tubes may be used to achieve thermal control For example hot exhaust products from an SOFC tail gas combustor can be used to support endothermic steam reforming Heat transfer occurs inside the fluid and the solid regions as well as at the interfaces between these regions 18 1 INTRODUCTION 129 Solid 3d heat transfer code OpenFOAM Channels in Monolith 1d or 2d flow detailed chemistry code DETCHEM Fluid 3d flow code OpenFOAM Grid cell mt Internal Coupling Fluid properties gas phase chemistry surface chemistry Figure 18 1 Typical configuration of a calculation domain Using DUO the flow outside of the monolith see figure 18 1 is calculated with the CFD code OpenFOAM which handles essentially arbitrary geometry In addition to the outer fluid flow the code also solves the conjugate heat transfer in the solid structure of the monolith This implies the handling of the heat transfer between the solid and fluid regions as well as the exchange of heat with the external
111. catgeo d ratio catalytic geometric surface default 1 lt Fcatgeo gt ratio catalytic geometric surface individual values for each surface type Ageo d geometric surface area without washcoat lt active moles gt moles of active catalyst Eff Model s species for effictiveness factor model skip this option for detailed wash coat model lt EFF_MODEL gt list of species for effictiveness factor model skip this option for detailed washcoat model lt MOLECULAR_DIFF gt molecular diffusion model lt KNUDSEN_DIFF gt Knudsen diffusion model lt MIXED_DIFF gt molecular diffusion model lt RANDOM_PORE gt molecular diffusion model lt 0UTS gt modified species list in OUTS file 3 8 1 lt CHEMSURF gt input The DETCHEM library provides routines to calculate surface reaction source terms For most DETCHEM applications steady state conditions of the surface conditions are of interest For this purpose the routine CHEMSURF is called CHEMSURF integrates the surface coverages under the constraints of a given gas phase composition and temperature for a given time It is assumed that this integration time is sufficient to reach steady state In many cases it is sufficient to specify an integration time only To do so use the time member The integration time should be long enough in order to equilibrate the system Use shorter times only in cases when transient effects of surface coverages are desired in your simulation e g long term stor
112. ch ns s e e p 20 phage Bhat Ae ahi eo Ge wre Bae veliab a e 2 2 1 Enero en tiles pts A 22 2 GaS phas reactions sos af Sane A Rd oR ee SAN 2 2 3 Pressure dependent gas phase reactions o e 2 2 4 Surface Reactions lt s eci rios en na yg we a ad 2 3 Modeling of transport and surface reactions in washcoats 2 3 1 Diffusion and reaction in porous catalysts 2 2 2 3 2 Detailed washcoat model 2 2 non 2 3 3 Effectiveness factor approach s soe s sci oe o 002 0000 0000004 2 3 4 Effective diffusion coefficients 2 1 e 3 Input files 3 1 General structur of np Dles xido 2er ae BRP PO Eo et E TABS acd eng Sec cil BE a ay laa acta oe ots ones een SOAS Bee Mee Beene Ped ena ng 3 1 2 Options and Values e e a E a a E E 31 3 Commands 5 is epa a A eg 3 14 Comments 22 0 A A AA oe BR A ARA ee 34 9 COMES unge a ia Seg BE o e creia aed 3 2 thermdata gt is de a E AAA A A eee 39 imoldatao tia a a de a a 3 4 Gas phase chemistry mechanism file o o e 3 5 Surface chemistry mechanism file o o e 3 6 Species Input s na y e wre EA a A A er 3 7 Mechanism Input 22 4 3 A e Re an A RR ee di R 3 8 Surface Models 3 0 5 fae eee EA EEA GSR EAA a ES 3 8 1 lt CHEMSURF gt input 2205 22 2 ee ER AER ee Berner 3 8 2 Catalytic vs geometric surface area 2 ee ee 3 8 3
113. cher V Janardhanan C Correa D Chatterjee S Kleditzsch N Mladenov and H D Minh DETCHEM applies the DAE solvers LIMEX developed by P Deufihard et al Berlin Germany and DAESOL developed by H G Bock et al Heidelberg Germany LIMEX and DAESOL are not part of DETCHEM Fruitful discussions with many colleagues helped to develop the code in particular we would like to thank J Warnatz University of Heidelberg H Zhu and R J Kee Colorado School of Mines No guarantee of faultless performance of the software is given The DAE solvers applied in the software the mathematical libraries and compilers needed are not part of DETCHEM Reaction mechanisms are not part of the software A selection of reaction mechanisms is available and can be downloaded from www detchem com for free The software is distributed by the STZ 240 Reaktive Str mungen Heidelberg Germany within the Steinbeis Stiftung For further information please contact mail detchem com Contents 1 Getting Started 1 1 Introduction 5 2084 Diese a a Re ebd 1 2 3Programsstruct re ts y ae AAA a la a ey ed 1 3 Program Capabilities 2 005 e a a Be A a wth A ee A 2 Fundamentals of DETCHEM US O a anne E aoe Segoe ts Bean Z LLI Genetali soc 4 Ae Re ee ee Se Gob eee Al ee 2 1 2 Gas phase species s s s pri Sa BAe eR ee a ee 21 3 Thirdsbody species 22 ea Po AE ER POS REAP A 21 34 Surlace species se te A olde A dee BP We Se edd Sd 2 2 Chemical Rea
114. cies on the right side of the equation however the total number of species in an equation is not allowed to exceed five A species can contain a maximum of 8 characters at maximum followed by a separator gt unless the end of the equation is reached Then the kinetics data follows The format of the whole line is 5 A8 A1 E10 3 F7 1 F10 1 Unless familiar with FORTRAN nomenclature just copy and modify wherever appropriate keeping the given format The reaction rate is calculated by using concentrations in the units mol cm The rate coefficients are given in terms of modified Arrhenius expression as stated in equation 2 55 The input order is assigned as follows Ax value in the first column in cm s mol according to the reaction order Br value in second column Ea value in third column in kJ mol For reversible reactions the reverse reaction rates are derived from the equilibrium constants using Equations 2 48 All of the reaction orders are according to the stoichiometry of the reaction The symbol M 1 in the mechanism denotes third bodies as described in section 2 1 3 The last part of the gas phase mechanism file denotes the collision efficiencies for these third bodies if reaction with third bodies are specified The collision are by default unity for the species not given in the list In example 3 3 1 the collision efficiencies of the species Oz and N are modified to be 0 4 instead of unity Information on proper collision
115. coat diameter d pore diameter m Options in lt SOLVER gt 3 8 SURFACE MODELS 39 time d integration time s default 1 hini d initial integration step size default 1e 8 rTol d relative tolerances of concentrations and coverages default 1e 4 aTol d absolute tolerances of concentrations and coverages default 1e 20 maxiter maximum number of iterations default no limit 3 8 4 Effectiveness factor model The detailed washcoat diffusion model is very time consuming and may not be available in some application e g MONOLITH with transient coverages of a storage medium In order to account for diffusion limitations of washcoats an effectiveness factor approch can be applied In this model the diffusion of one species is assumed to account for the diffusion limitions Assign the name of one species to the Ef Model or list some under lt EFF MODEL gt in the lt SURFACE MODEL gt section in addition to the washcaot definition Then no reaction diffusion equation will be solved Instead the surface reaction rate will be calclulated the same way as without the washcoat diffusion model Using the total rate for the chosen species an effictiveness factor is calculated Finally all rates are multiplied by this effectiveness factor In case more than one species is listed the effectiveness factor of the species that gives the strongest limita tion will be selected automatically An example definition of an effectiveness factor
116. composition overriding definition from lt SURFACE MODEL gt lt SOLUTION gt operation parameters The operation conditions of the DETCHEM SERVOIR simulation are defined within the lt SOLUTION gt tag These parameters are the total time of simulation the maximum step size and the isothermal wall temperature Alternatively to a constant wall temperature a linear temperature profile can be defined Moreover if a previous simulation is to be continued you can use an exisiting output file for initialization All available options are summarized below time d end time s h d integration time step s T K d temperature K T_in d temperature at inlet K T_out d temperature at outlet K dT s d temperature ramp for TPD simulations K s dT min d temperature ramp for TPD simulations K min restart s restart file name lt OUTPUT gt output options Several output files are written during a DETCHEMRESERVOIR simulation Use the lt OUTPUT gt tag to define the time steps for wich individual output files are desired The time steps can be listed individually just give the numeric value of the time in seconds or generated with regular frequency use a lt DO gt tag The times listed must be in ascending order Furthermore there is an option to generate an output file restart plt that contains the latest status of the simulation This file might be useful in case a simulation needs to be restarted after an interruption Th
117. ction define the screen and file output of DETCHEMCHANNEL outg b enable gas phase output file e g outg001 plt default no outs b enable surface output file e g outs001 plt default no outflux b enable output file for axial species fluxes default no summary b enable output in file summary_out dat default no file i file number used as file name extension default 1 copy b save copy of input file e g channel001 inp default no minstep d minimum step size for writing output m default none monitor i monitoring options O no monotoring l monitor integration progress 2 additional screen output default 0 molefrac b write mole fractions instead of mass fractions default no The output files will be described later in this chapter Each of the output file filenames except sum mary _out dat contains a three digit extention with the filenumber specified by the file member For parame ter studies it may be useful to log the input for a specific cas If the copy option is activated a copy of the input file channel inp will be saved with the same file extention as the other output files The monitor option determines the screen output during the integration process There are three levels of output none 0 normal 1 extended 2 In a single run of DETCHEMCHANNEL it is useful to monitor the integration process By doing this the user may get useful information about the speed of calculation and its convergence In
118. d Bed with Detailed Chemistry AIChE J 50 2004 1289 1299 S Tischer O Deutschmann Recent advances in numerical modeling of catalytic monolith reactors Catalysis Today 2005 in press V M Janardhanan O Deutschmann CFD analysis of a solid oxide fuel cell with internal reform ing Coupled interactions of transport heterogeneous catalysis and electrochemical processes J Power Sources 162 2006 1192 1202 V M Janardhanan O Deutschmann Numerical study of mass and heat transport in solid oxide fuel cells running on humidified methane Chem Eng Sci in press V M Janardhanan V Heuveline O Deutschmann Performance evaluation of planar solid oxide fuel cells J Power Sources accepted
119. d only in one or two dimensions the external coupling DUO is sufficient If we want also to consider the flow upstream of the monolith we can do this within the range of the external coupling as long we don t have to include chemical reactions in this regions and the determi nation of the temperature dependent properties based on the Sutherland law is enough If we want to imply chemical reactions of the gas phase in the upstream region of a monolith and or to determine the properties in more detail could be important for mixture effects we have to include additionally the internal coupling DC40penFOAM If we want to calculate the flow in the single channels of the monolith in three dimensions including gas phase and surface reactions we have to use the internal coupling DC4OpenFOAM solely 18 2 Programming of DUO In this chapter some basic information about the programming is given DUO is a collection of subroutines which allows to create a new solver or application in the world of OpenFOAM For the external coupling of DETCHEM some changes were made in the original codes DETCHEM S and DETCHEMCHANNEL to allow the exchange of data The code is written in the language C The code lines are well commented In general the user should not change any code lines For a deeper understanding of the code or information about the capabilities and the execution of OpenFOAM the user should refer to the manual 18 2 1 OpenFOAM OpenFOAM Open Field
120. d tubes and writes them to inter mediate files write WallTemperatures H Class and header files for boundary handling detchemHeatFluxTemperatureFvPatchScalarField C detchemHeatFluxTemperatureFvPatchScalarField H Reads wall heat fluxes from intermediate files and maps them on the appropriate cells of the wall patches 18 3 Usage of DUO 18 3 1 General As DUO is the coupling of two codes each code can be used as a stand alone tool For each program several di rectories and files have to be present For the use of each of the two programs OpenFOAM and DETCHEMPLUG or DETCHEMCHANNEL the user should refer to the appropriate manuals In this section only the parts which are necessary for the control of the coupling between the two codes are described 18 3 2 Installation and Test A Folder structure Figure 18 5 shows the final structure of the folders The folders application and run have to be copied to the folder HOME OpenFOAM USER 1 7 1 on your system The folder DETCHEM can be copied to anywhere you want B Operating System The installation was tested on two different PC systems A and B s Tab 3 2 In both cases version 1 7 1 of OpenFOAM was used This version needs the compilers gcc 4 5 and g 4 5 This led problems in configu ration A because the standard version of the compilers for this linux version is 4 6 2 For the installation and compiling of each code the user should refer to the appropriate
121. data visualisation etc For further information concerning the functionality and use of OpenFOAM the user should refer to the appropriate manual DUO stands for the coupling of the two computer codes DETCHEM Und German for and OpenFOAM and is a synonym for the joint utilisation of these two programmes Generally we use the name DUO if we speak about the coupling of DETCHEM and OpenFOAM OpenFOAM is a C library used primarily to create executables known as applications OpenFOAM is distributed with a large set of precompiled applications but users also have the freedom to create their own or modify existing ones The applications fall into two categories solvers that are each designed to solve a specific problem in continuum mechanics and utilities that are designed to perform simple pre and post processing tasks mainly involving data manipulation and algebraic calculations The OpenFOAM distribution contains numerous solvers and utilities covering a wide range of problems In this terminology DUO is firstly a solver Some coding was done by creating new subroutines which can be used to create a new solver or application More precisely DUO is a solver made of modules available in OpenFOAM In the following the terms application and solver are used synonymously Additional code was written to handle the coupling The resulting solver DUO calculates laminar flows with reactions in gas phase as well as surface reactions and conjugate heat tra
122. del is used first the reaction rate is calculated From this the effective rate constant k the Thiele modulus and the effectiveness factor 7 are calculated for a user defined species It is important that this species is representative for the consumption of all reactants Choosing a species with vanishing concentration may yield non realistic effectiveness factors Since conservation of mass is required all reaction rates of a surface are multiplied by the same effectiveness factor Application The effectiveness factor model is a very fast model The calculation times are nearly the same with or without this model Because of the application of the same effectiveness factor for the mean reaction rates of all species the model can only be applied for reaction systems which are determined by the consumption of a major species 2 81 i 2 3 4 Effective diffusion coefficients In both washcoat models effective diffusion coefficients are needed Depending on the pore size distribution of the washcoat different models can be used 1 Knudsen diffusion coefficient d 8RT Dase 2 82 Knud T3 mM 2 Molecular diffusion coefficient p Dari D oii 2 83 T 3 Mixed diffusion coefficient Deri D 2 84 T D is defined as 1 1 1 2 85 D Doli Dinud i 4 Random pore model ed 3em Deri Dumie Dui 2 86 1 EM where Dy and D is defined as 1 1 1 2 87 Dumi Dmoti Dimadm
123. e DETCHEM_DIR e Add the DETCHEM_DIR bin directory to your system path and call pbed e Create a symbolic link to the executable DETCHEM DIR bin pbed and call pbed The latter option does not require setting of system variables and is therefore less system specific Chapter 13 DETCHEMCHAN NEL 13 1 Introduction The DETCHEMCHANNEL code simulates the steady state chemically reacting gas flow through a cylindrical channel using the boundary layer approximation Detailed mechanisms for surface and gas phase reactions are considered 13 1 1 The boundary layer approach In the most general case of simulating the flow field of a fluid the governing equations are of Navier Stokes type However due to their mathematical structure finding a solution can become very time and resource consuming In order to get a faster algorithm one possible simplification is given by the boundary layer ap proximation It is suitable for systems with a main direction of the convective flow in which the diffusive transport along this direction is negligible compared to the convection This assumption becomes valid for a channel or any cylindrical reactor with sufficiently high velocity of the fluid or sufficiently small diameter of the channel All other transport effects within the fluid e g diffusion limitations of surface reaction rates are considered in this approximation 13 1 2 Governing Equations O rpu A O rpv DOD c 13 1 aba
124. e RARE Fe Fe RE Fe Fe RRA Fe Te Fe de Fe de Te Fe Fe RAR Te Fe Te Fe de RR tot were NO 02 SIMPLE TEST SURFACE MECHANISM ON PT were e Fe de Fe Fe Fe de Te Fe Fe de RU RE RR RAE R RARE RARE Fe Fe Fe Fe RRE RARE Fe de Fe de RR RR RR RR RR AR Fe Fe Te Fe Te Fe RR 1 ADSORPTION STICK 02 PT s PT s gt 0 s 0 s 7 000E 02 0 0 0 0 STICK NO PT s gt NO s 8 500E 01 0 0 0 0 STICK NO2 PT s gt NO2 s 9 000E 01 0 0 0 0 STICK 0 PT s gt 0 s 1 000E 00 0 0 0 0 wort 2 DESORPTION OCs 0 s gt PT s PT s 02 3 700E 21 0 0 213 0 0 s 0 0 0 0 70 0 NO s gt NO PT s 1 000E 16 0 0 90 0 NO2 s gt NO2 PT s 1 000E 13 0 0 60 0 week 3 SURFACE REACTION NO s 0 s gt NO2 s PT S 3 700E 21 0 0 96 3 0 s 0 0 0 0 70 0 NO s 0 0 1 0 70 0 NO2 s PT s gt NO s 0 s 3 700E 21 0 0 79 57 END The first line of the mechanism must begin with SURE The mechanism is given in terms of elementary reactions Each reaction is given in one line with possible extension lines one above and or one below this line Irreversible reactions denoted by gt as well as reversible ones denoted by can be specified The reaction equations can have a maximum of three species on the left and three species on the right side of the equation however the total number of species in one equation is not allowed to exceed five A species can contain a maximum of 8 characters followed by a separator gt unless the end of the equation is r
125. e an input file batch inp The program considers four batch reactor types 1 with user defined volume and temperature profiles 2 with user defined pressure and temperature profiles 3 with user defined volume profile isenthalpic or adiabatic reactor 4 with user defined pressure profile isenthalpic or adiabatic reactor Examples for these four cases are shown in the table below The file batch inp starts with the species and mechanism definition section that can appear directly in the input file or can be included from external input files In addition the files thermdata and moldata must be located in the executing directory Alternatively the pre processed input file detchem inp can be included example 1 finclude species i include mech inp lt BATCH gt solver_id 0 p Pa 8000 d0 A m2 1 0 time 100 h 1 0e 08 hmax 1 d0 rtol 1 0e 02 atol 1 0e 09 monitor 1 lt MOLEFRAC gt C3H6 0 996 CH4 0 003 C3H8 0 001 lt MOLEFRAC gt lt V_PROFILE gt 0 0 1 5 30 0 1 0 70 0 1 5 100 0 1 0 lt V_PROFILE gt lt T_PROFILE gt 0 0 1173 50 0 1273 100 0 1173 lt T_PROFILE gt lt OUTPUT gt mole mole_fraction mass_fraction fileNr 1 dt_out 9 01 lt OUTPUT gt lt BATCH gt concentration np LIMEX 1 DAESOL lt lt lt example 2 include species inp include mech inp lt BATCH gt solver_id 0 V m3 1 0 A m2 1 0 time 100
126. e declaration into a separate file e g species inp Important The user has to guarantee that the count the names and the order of the species in the file properties inp are the same as in the file lt caseDir gt chemkin chemFoam 17 3 3 Control of DC4OpenFOAM As usual OpenFOAM is managed with the parameters in the ASCII file controlDict which can be found in the subfolder system of the directory lt caseDir gt In case of internal coupling the properties and source terms are calculated from the shared Fortran90 library libDetchemFortran90 PropsAndSources so Fluid Model The file lt caseDir gt constant FLUID turbulenceProperties has always to be present for the calculation Use the file which can be found in the example cases Nothing has to be changed Properties Model The transport properties are managed in the file lt caseDir gt constant FLUID transportProperties Thermophysical Model The thermophysical models including the chemistry are managed in the file lt caseDir gt constant FLUID thermophysicalProperties In case of external coupling only the file should include the following lines thermoType hsPsiMixtureThermo lt reactingMixture lt gasThermoPhysics gt gt inertSpecie N2 In case of internal coupling the following lines should be present 124 CHAPTER 17 DCIOPENFOAM thermoType detchemHsPsiMixtureThermo lt reactingMixture lt gasThermoPhysics gt gt chemistryReader chemkinReader CHEMKINFile FOA
127. e file channel inp is different for every call Caution If the coupling of the outlets is NOT activated in the parameter file couplingParameters coupleOutlets off the values for uO and TO have to be set by values Additionally the appropriate include has to be removed or to be commented include outlet to DETCHEM Chapter 19 DETCHEM Parameters Up to version 2 1 DETCHEM was mainly written in Fortran 77 which did not offer dynamic memory allo cation In order to give more flexibility to the user version 2 2 is based on Fortran 90 and can no longer be compiled using a Fortran 77 compiler The main parameters e g number of species and reactions can now be changed during run time Recompilation is no longer necessary The default size parameters set in the distribution of DETCHEM may be not sufficient to meet the needs of the user If you try to define a case for that more memory allocation is necessary the program will usually abort with an error message In some rare cases an exception is not found the execution may then terminate surprisingly or give wrong results ERROR More than 50 cells defined increase parameter MGRmaxX in lt PARAMETERS gt section If you receive such an error message first check your input file for wrong parameters If you do not know which option may have caused this error message use the verbose yes command in the input file In the lt SPECIES gt lt MECHANISM gt lt CHANNEL gt and lt
128. e flow field in the single channels of the monolith is often simple 1D or 2D but the chemistry is complex An iterative coupling algorithm was developed that models the geometrically complex flow outside the monolith with one code and calculates the chemically complex reforming process in the channels of the monolith with another code For this the chemical models are designed to accommodate detailed gas phase and catalytic reaction kinetics possibly including hundreds of species and thousands of reactions The developed software tool DUO controls the interaction between the two programmes 18 1 2 Modelling of a Monolithic Reformer Modeling practical systems requires the coupling of complex flow configurations with complex chemical kinetics From the point of view of simulation reformers based on mini channels can be described with the following characteristics three dimensional laminar flow coupled heat transfer inside and between three dimensional fluid and solid regions complex chemistry of gas phase reactions complex chemistry of catalyzed surface reactions exchange of heat with the surroundings availability of temperature dependent properties for all the compounds involved For the solution of problems of this type there are in principle several CFD Computational Fluid Dynam ics codes available e g FLUENT STAR CD CFX However there are three constraints which restrict the simulation e availability of reliable
129. e option within the lt OUTPUT gt tag can be summarized as lt DO gt generate equistant output times output time time for that output shall be written s WRITE_RESTART b write a file restart plt after each iteration default no and the lt DO gt parameters are from d start time s to d end time s step d time between two outputs s lt STORAGE gt transient species and mechanism The main purpose of simulations with DETCHEMRFSERVOR is the storage process The user must choose one surface type for which the transient concentrations are calculated For instance when a catalytic converter contains platinum and barium as catalytic active components the platinum surface may be considered in quasi steady state whereas the slow NOx storage processes occur on the barium sites In this case choose the barium surface as storage surface use the name of the surface as it is defined in the lt SPECIES gt section at the beginning of the input file The reaction mechanism containing the relavant reactions for the storage must also ds CHAPTER 15 DETCHEMRESERVOIR be referenced In most cases this mechanism can be identical with the complete surface reaction mechanism Refer to it by the name as it is defined in the lt MECHANISM gt section at the beginning of the input file surface s name of the storing surface mechanism s name of the storage mechanism lt INLET gt inlet information The transient nature of DETCHEMRESERVOIR will usually r
130. e reactions the source term is also included The source term appears different based on the considered surface model In case of instantaneous diffusion the species governing equation at the gas surface interface becomes O pa x Ji PUY Feat geoSiMi 10 10 Since there is mass flux to the surface velocity cannot be zero Therefore Stefan velocity is considered in the species governing equation yd u Y 5M 10 11 If the surface model is based on the detailed reaction diffusion equations the species governing equation at the gas washcoat interface becomes OY 2 pa ae j puY ef fM 10 12 where the diffusion flux at the gas washcoat interface is treated as an effective surface reaction rate If the surface model is based on the effectiveness factor approach the species governing equation at the gas washcoat interface becomes OY pa AY Ji PUY NF carjgeoSi ef f Mi 10 13 Finally continuity and radial velocity are also included at the interface pvx pu V 0 10 14 10 3 SOLUTION 65 Inlet boundary Inlet boundary conditions follow PE Y Y 10 15 pv pv V 0 10 16 In order to close the equation system a zero gradient condition is used for the mass flow at the inlet ev _ 0 10 17 10 3 Solution In DETCHEM AS the standard implicit code LIMEX is used to solve the coupled governing equations PCHIPD package is used for the interpolations needed fo
131. e the two files chemFoam and thermFoam However the user could also generate the files chem inp and therm dat using CHEMKIN files Important The user has to guarantee that the count the names and the order of the species in the file lt caseDir gt chemkin chemFoam are the same as in the file lt caseDir gt detchem properties inp The species Na should be the last in each case F Data Input for DETCHEM Library The shared library libDetchemFortran90 PropsAndSources so needs an input file properties inp in the folder lt caseDir gt detchem A typical input file properties inp with explanations is shown in the appendix Addi tionally the following data files are necessary thermdata The thermodynamic database contains enthalpy entropy and heat capacity data for each species moldata This file contains the molar mass and kinetic theory parameters of chemical species gasphase mech inp The gas phase chemistry mechanism file lists the elementary reactions occur ring in the gas phase This file can be give any name and this name should be mentioned in the mech inp file surface mech inp The surface chemistry reaction mechanism file surface mech inp lists the el ementary reactions occurring on the surface This file can be given any name and this name must be mentioned in the mech inp file species inp For any DETCHEM application the user needs to define the species that are to be considered In many cases it is advisable to put th
132. eached Then the kinetic data follow The format of the whole line is 5 A8 A1 E10 3 F7 1 F10 1 Unless familiar with FORTRAN nomenclature just copy and modify wherever appropriate keeping the given format The reaction rate is calculated by using concentrations with the units mol cm in the gas phase and mol cm2 on the surface The rate coefficients are given in terms of a modified Arrhenius expression as stated in Equa tion 2 70 The input order is assigned as follows Ak value in the first column cm s or mol according to order of the reaction Br value in the second column E value in the third column kJ mol For reversible reactions the reverse reaction rates are derived from the equilibrium constants using Equa tion 2 48 STICK means that a sticking coefficient is given first column in the subsequent line for the reaction in the next line The given coefficient is the initial sticking coefficient S It can be modified by additional parameters Band Ez By default all of the reaction orders are according to the stoichiometry of the reaction for instance the reaction STICK 02 PT s PT s gt 0 s 0 s 7 000E 02 0 0 0 0 is second order in vacancies PT s and first order in O2 Here the value 7 000E 02 is the initial sticking coefficient 0 07 The order of the reaction can be modified and the activation energy can be made coverage dependent by us ing the parameters jj and eig in Equation 2 70 The modified d
133. efficiencies will be provided in connection with reaction mechanisms If the collision efficiencies for all species in a reaction are unity them plain symbol M can be used H CH20 M 2 CH20H M 2 0 540E 12 0 5 15 070 LOW 1 270E 32 4 820 27 32 TROE 7187 103 0 1291 0 4160 0 Aside from the conventional way to model the reaction rate by an Arrhenius expression a Troe expression can be used which is very useful to include the additional pressure dependence of recombination and dissociation reactions The rate law here becomes more complicated the 3 3 2 illustrates the format used to define Troe reactions by ten parameters The data in the first line are As Bo Egoo the data in the line behind the LOW keywords are Ao Bo Eao and the data behind the TROE keyword are a T T T Ifa 0 5 and T T 1E30 then a Lindemann expression is used where the broadening factor F is unity 3 5 Surface chemistry mechanism file This file lists the surface elementary reaction mechanism This file can be given any name and the same must be mentioned in the mech inp file described later An example of the surface mechanism file is shown below For convenience the user is advised to copy and modify the lines while keeping the same format An example of surface chemistry mechanism file is shown below 3 5 SURFACE CHEMISTRY MECHANISM FILE 27 SURFACE MECHANISM OF THE NO 02 REACTION ES e Fe de de Fe Fe Fe Te Fe Fe de Fe UREA RR RR RR Fe Fe F
134. el case and for each cell potential for a button cell case A sample screen output for channel case is shown below CH4 H20 H2 co co2 02 N2 NI s H20 s H s OH s COCs C s CH3 s CH2 s CH s CH4 s O s C02 s HCO s An Fe de Te Fe Fe de de Fe Fe Fe Fe RARE Teen rawa DETCHEM SOFC kank yare Vinod Janardhanan amp Olaf Deutschmann eee ware Version 1 0 March 2006 RN Fe de Te Fe Fe de de Fe RE RARE Fe Fe Fe Fe Fe RE Fe Fe Fe Fe RR ea n Solving cell potential 0 200000000000000 n Axlpsn m CD A cm2 Erev V 0 0000E 00 5 4109E 00 8 3462E 01 4 1667E 04 5 2078E 00 8 1632E 01 1 2500E 03 4 9645E 00 7 9476E 01 2 0833E 03 4 6781E 00 7 6961E 01 2 9167E 03 4 3551E 00 7 4125E 01 3 7500E 03 4 0113E 00 7 1082E 01 4 5833E 03 3 6653E 00 6 7971E 01 5 4167E 03 3 3311E 00 6 4898E 01 6 2500E 03 3 0162E 00 6 1926E 01 7 0833E 03 2 7239E 00 5 9088E 01 7 9167E 03 2 4550E 00 5 6395E 01 In the case of button cell calculation the screen output contains only the cell potential and the corresponding current density as shown below 16 4 OUTPUT 109 Fe de Te Fe Fe de de Fe Fe Fe Fe RARE RR REA RR RARE RR RAR RR Fe Fe Fe Fe ea dette DETCHEM SOFC RRR Vinod Janardhanan amp Olaf Deutschmann werk Version 1 0 March 2006 e de Fe e Fe Ze e Te Fe Fe Fe Te Fe Fe de Te Fe de de Fe He Fe de Te de de Te e Fe de Te de Te He Te de Te Te Fe Te Te e de Te Te de de Te Te Te Te Te EEE 1200E 00 2 6356E 01 1100E 00 2 4497E 01 1000E 00 2 2329E 01 0
135. ely There fore they are related to each other However translational rotational and vibrational energy give different contributions A T UC var SrotCv rot SribCv vib 2 28 Using the following relations 5 2 Cyror A r x l 2 2 fi 2 T Cyr 5 Pi Dii fio 2 2 30 Mi 2A foa fali H 5 2 31 TB with 3 Here 2 32 2 and Bee er 2 33 rot 3 R rib Zot 18 also a characteristic parameter Once know for a given temperature 298 K it can be calculated by the proportionality 1 3 2 ec T a E O TOE 2 34 Zrot T 2 Averaging is handled in analogy to the viscosity by Y Xii ESy g 1 E x 2 35 ESy g MN 2 2 1 3 Third body species In most recombination and decomposition reactions a third particle is involved in order to guarantee conserva tion of energy and momentum Any species of the mixture can take this part which therefore is denoted by the Symbol M A B M AB M 2 36 2 2 CHEMICAL REACTIONS 15 The efficiency of collisions with diffent species is different In order to summarize all reactions of the same kind we can define an effective concentration of species M by cM X amici gt 2 37 ESyg where am are the collision efficiencies of the gas phase species i with respect to a reference species e g Argon The set of all third body species shall be denoted by Sm 2 1 4 Surface species In analogy to the gas phase
136. ent species equation de z siles Sur cStoragey 15 1 The concentrations of the gas phase species c are calculated by a quasi steady state channel simulation using DETCHEMCHANNEL or DETCHEM S whereas for the non storage surface species c steady state is also assumed Thus for each time step DETCHEMRFSERVOR calls DETCHEMCHANNEL or DETCHEMPLUG with fixed storage concentrations c After the single channel simulation the locally resolved gas phase concentrations c are passed back to the reservoir model Then equation 15 1 is integrated for a given time step and the cycle starts from the beginning again The principle of the decoupling of the two codes is illustrated in figure 15 1 MONOLITH dO dt 0 o A 2 g S dO _ 3 an 2 seconds p dt T fe E hours 8 transient AAA S peccnecccscccccccsecee IA O 5 milliseconds a steady state pas a o an Figure 15 1 Schematic communication between DETCHEMRESERVOIR and single channel simulation 97 i CHAPTER 15 DETCHEMRESERVOIR 15 2 User input The input required for DETCHEMRESERVOIR is similar to DETCHEMMONOLITA however a few sections can be dropped due to the simplifications of the model DETCHEMRESERVOIR requires one input file named reser voir inp An example is shown below include channel inp lt RESERVOIR gt lt GRID gt lt XDOMAIN gt from 0 to 200 d 3 cells 40 aspratio 1 lt XD
137. environment In the outer flow regions the chemistry is often simple or can be fully neglected The flow inside the channels is calculated with DETCHEM codes by applying detailed gas phase and surface chemistry As the flow is handled as a one or two dimensional flow only a simple grid is used This makes the calculation fast DUO handles the exchange of data at the inner surface of the channels between the two codes see fig ure 18 2 DUO provides the interface between the geometrically complex three dimensional outer mesh and the one dimensional axial mesh for the catalyst tubes The internal chemistry problem is solved using axial wall temperature profiles that are specified by OpenFOAM Tube wall heat fluxes are predicted as a result of the chemically reacting flow problem within the tubes These flux profiles are supplied to OpenFOAM by DETCHEM OpenFOAM then solves the external problem using the tube wall heat fluxes as boundary conditions The outer flow solution provides new tube wall temperature profiles which are used to solve the chemistry problem The iterative process continues until convergence between the inner and outer problems is achieved The capability of DUO is quite general in the sense that there are essentially no restrictions on the external flow of geometry or the chemistry and transport within the tubes Therefore DUO cannot only be used to model reformers but also can be applied to simulate arbitrary systems where monolithic s
138. equire transient input data However it is also possible to define constant input data directly inside this input file In the latter case just specify the inlet velocity and the species composition e g lt INLET type constant gt u0 2 velocity in m s lt MOLEFRAC gt NO2 0 1 mole fraction N2 Y balance lt MOLEFRAC gt lt INLET gt As an alternative to mole fractions mass fractions can be defined using the tag lt MASSFRAC gt In most cases however the inlet conditions will vary in time This is declared like in the following example lt INLET type variable gt file inlet inp name of the external file velfactor 2 0 velocity conversion factor lt INLET gt Instead of declaring all information inside this input file the transient inlet information is stored in an external file e g inlet inp The format of this external file will be described later in this chapter Sometimes the inlet velocity needs to be converted due to changes in the diameter of the channel or in the temperature Therefore the member velfactor can be assigned a numerical value The velocities in the external file are multiplied with this factor Note Use for convenience this conversion factor in case your external file contains mass or volume fluxes instead of velocities All inlet data can also be altered by user defined functions If the user wants to provide own code see chapter for DETCHEMMONOLITH activate the user option Thus
139. er Since the Greatz number is calculated as a function of reactor position the mass and heat transfer coefficient calculated in DETCHEMPS are the local values 11 1 3 Solution In DETCHEMP S the standard implicit code LIMEX is used to solve the coupled governing equations In stead of LIMEX DASPK3 can also be used but for problems involving mass transfer coefficient use of DASPK3 is not advised DETCHEMPLUS offers various options to solve the problem The temperature so lution offers Isothermal Non isothermal Adiabatic and Non adiabatic conditions In addition to these the axial temperature profile can be specified by a subroutine In Isothermal as well as in the Axial temperature profile case the energy equation is not solved The species transport can be modeled for Gas phase and the Surface reactions As a special case the surface reactions can be specified to take place on Washcoat Though DETCHEMPIOS is essentially a one dimensional model it supports a number of geometrical configura tion The mass and heat transfer coefficients are specific to the flow geometry The configurations supported currently are cylindrical cylindrical with gradually increasing cross sectional area triangular square hexagonal and a sinusoidal geometry 11 2 User Input Before running DETCHEM the user must prepare an input file plug inp An example is shown below include mech inp include species inp include detchem inp include washcoat inp
140. er of axial discretization points length 0 01 length of the cell m elperi 1 2E 03 electrochemically active perimeter m lt SECTION gt name air fluid in the cathode channel must be air height 1 0e 03 height of the channel width 1 0e 03 width of the channel ny 1 number of discretization in the y direction must be 1 lt INLET gt opening tag to specify inlet conditions of the cathode stream u 5 inlet velocity of cathode stream m s temperature 1073 15 inlet temperature of the cathode stream K pressure 101325 0 cathode channel pressure Pa lt SPECIES gt cathode channel inlet species Max 2 species lt MOLEFRAC gt mole fraction of the inlet species Can also be lt MASSFRAC gt 02 0 21 N2 lt MOLEFRAC gt 16 3 USER INPUT lt SPECIES gt lt INLET gt lt SECTION gt lt SECTION gt name cathode height 30 0d 06 width 1 0d 03 ny 10 lt POROUS model DGM gt porosity 0 35 tortuosity 3 5 pore_dia 1 0E 06 part_dia 2 5e 06 specific_area 1080 0E02 lt POROUS gt lt SPECIES gt lt MOLEFRAC gt 02 0 21 N 2 lt MOLEFRAC gt lt SPECIES gt lt SECTION gt lt SECTION gt name electrolyte height 2 5e 05 width 1 0e 03 ny 1 lt SECTION gt lt SECTION gt name anode height 30E 06 width 1 0e 03 ny 15 lt POROUS model DGM gt porosity 0 35 tortuosity 3 5 pore_dia 1 0E 06 part_dia 2 5e 06 specific_area 1080 0E02 lt POROUS gt lt SPECIES
141. es in DETCHEM and OpenFOAM is 0 01 m lengthOfDetchemTubes 0 01 The number of bands or tube wall sections in the DETCHEM calculations is 50 numberOfDetchemBands 50 Dictionary mapPatchesToDetchemTubes The word list namesOfReferencePatches includes the names of two wall patches For each of these patches a DETCHEM calculation of a tube is performed This means that for each of the tubes the distribution of the wall temperature is taken from the corresponding wall patch of OpenFOAM Caution the count of names in the word list has to be the same as the value of the parameter numberOfDetchemTubes The word list namesOfCoupledPatches includes the names of four wall patches For each of these patches a result of a DETCHEM calculation is applied For each of the tubes the distribution of the wall temperature is taken from the corresponding wall patch of OpenFOAM This means that the wall heat flux of a wall patch is set using a result from a DETCHEM calculation For each of the coupled patches a mapping number has to be allocated Caution each reference patch is also a coupled patch The word list mapsToDetchemTubes includes four mapping numbers Each number belongs to one of the names of the coupled patches The number represents the index of the tube calculated for which the resulting heat flux is mapped to the wall patch Caution each coupled patch has to have its own number This means that the counts of elements in the list namesOfCoupledPatch
142. es then use an input like the following 41 i CHAPTER 4 DETCHEMCHEMINP lt CHEMINP gt include species inp include mech inp isotopes O lt CHEMINP gt After running DETCHEMCHEMINP the files chem new thermdata new and moldata new will contain species new species and reactions where the number of atoms that have been replaced by generic isotopes go through all possible combinations Note It is recommended to use only species that contain no more than two atoms of the desired isotopes The rate laws of complex reactions can only be translated if the desired atom does not ap pear more than once A new atom type e g 0 will be created For each species containing a replaced atom a generic species name will be created starting with an integer number that indicates the number of replace atoms Therefore the species 02 will be replaced by three species 02 102 202 The files gasmech chemkin and surfmech chemkin are not influenced by the isotope variation In order to use the isotope analysis in any application copy the files chem new thermdata new and mol data new to your working directory Remove new from thermdata new and moldata new Include chem new at top of your application specific input file Then for example you want to find out whether the oxygen in your product H20 originates from O or CO In this case you may use the species 02 unmarked and 2C02 marked in your list of reactants By looking at the product compos
143. es an output file r_grid inp that contains the radial grid speci fication to be included in DETCHEM ONOUTH s input file monolith inp 14 2 User Input DETCHEM DGENSD requires only one input file named gridgen inp An example is shown below lt GRIDGEN gt lt POLYGON gt name poly n 20 number of points r 0 10 radius dmax 0 03 maximum distance between 2 grid points lt POLYGON gt lt LAYER gt name insu cells 2 thickness 0 005 lt LAYER gt lt BORDER gt name bound lt BORDER gt lt GRIDGEN gt Since DETCHEMSRIDGENSD js a preprocessor and does not do any simulation there is no species or mech anism information in the input file gridgen inp immediately starts with the lt GRIDGEN gt tag that may contain the following subsections lt POLYGON gt define a regular polygon lt CIRCUMPOINTS gt define an arbitrary shape lt TECPLOT gt use a grid in TECPLOT format lt LAYER gt define additional layers lt BORDER gt define border Depending on the type of grid definition one of the tags lt POLYGON gt lt CIRCUMPOINTS gt or lt TECPLOT gt is required For all types additional layers may be declared in the lt LAYER gt subsection Finally a border name declaration is required 91 CHAPTER 14 DETCHEMSRIDGEN3D 14 2 1 The lt POLYGON gt tag Use this tag if the cross section of the monolith has a shape that can be fitted by a regular polygon with an ellipsoidal circumference
144. es and the list mapsToDetchemTubes have to be the same Again the explanation of the wall mappings For the two wall patches WALL_0202 and WALL_0204 two DETCHEM calculations for two tubes will be performed For each of the calculations the boundary temperature of the corresponding patch is used as a boundary condition The result boundary heat flux of the first tube calculation is used for TWO boundary patches in OpenFOAM for WALL_0201 AND WALL_0202 Both patches have the same tube number 1 in the list mapsToDetchemTubes The result of the second tube calculation is used for TWO boundary patches in OpenFOAM for WALL_0203 AND WALL_0242 Both patches have the same tube number 2 in the list mapsToDetchemTubes Dictionary mapOutletsToDetchemTubes The word list namesOfCoupledOutlets includes the names of two outlet patches For each of these patches the outflow conditions average velocity and averaged temperature are calculated and used as input for the DETCHEM calculations For the calculation of tube 1 the outflow conditions of the patch FLUID_0UT_0202 are applied for the calculation of tube 2 the outflow conditions of the patch FLUID_0UT_0204 Boundary conditions Every tube interchange surface has to be defined with the boundary condition name detchemHeatFluxTempe rature in the file lt time gt SOLID T For the actual case the following entry would be necessary WALL_0201 type detchemHeatFluxTemperature K K uniform
145. essure field p are initialised from files O FLUID U and 0 FLUID p respectively detchem This directory contains all the files necessary for the external coupling of DETCHEM This includes the executables named plug and or channel as well as all other files required for a calculation such as thermodynamic data mechanisms property file and the input files plug inp and or channel inp Also all result files from the DETCHEM calculations can be found in this folder 1 Perform DETCHEMC EMINP which is a pre processor and translator for DETCHEM species and mecha nism information files DETCHEMCHEMINP requires one input file named cheminp inp This file acts as a container for the species and mechanism information If this information is stored in external files e g species inp and mech inp then cheminp inp may simply look like the following example lt CHEMINP gt include species inp include mech inp lt CHEMINP gt Like in all other DETCHEM applications the files thermdata and moldata have to be present The library DETCHEMCHEMINP produces several output files The file chem new contains the species and the mechanism information in a compact form The files thermdata new and moldata new contain the thermodynamic data and the molecular properties respectively of the required species The last file is not needed here 2 Rename the files chem new and thermdata new to chem inp and therm dat Remove all information about mechanisms from
146. execution of DETCHEMRESERVOIR Tf you want to restart an earlier calculation save global plt with a different name before calling the executable again Channel output For DETCHEMRESERVOIR it is not required to do post processing in order to generate channel output All channel output files are written automatically for each time step listed in the lt OUTPUT gt section of the input file 15 4 Examples There are several examples in the distribution Each directory contains several input files inp species and mechanism information as well as the databases thermdata and moldata The plt files are generated on execution The script file go may be used for convenience to call the executable and run the program It requires a system variable DETCHEM_DIR that contains the path to the DETCHEM root directory Depending on your system you can set this variable by either of these commands export DETCHEM_DIR myDirectory DETCHEM or setenv DETCHEM_DIR myDirectory DETCHEM 15 5 Running the tool There are two executables for DETCHEMRESERVOR in the DETCHEM DIR bin directory They are named reservoir_channel and reservoir plug indicating the channel model used for the single channel simulation i e DETCHEMCHANNEL or DETCHEMPIUS respectively There are several ways to call the executable e Using the go script from the example directory The user needs to define the system variable DETCHEM_DIR e Add the DETCHEM DIR bin directory to
147. fferent PC systems A and B see next table In both cases version 1 7 1 of OpenFOAM was used This version needs the compilers gcc 4 5 and g 4 5 This led problems in configu ration A because the standard version of the compilers for this linux version is 4 6 2 For the installation and compiling of each code the user should refer to the appropriate manuals However the installation including some basic commands which are necessary to compile the codes will be given in this chapter 118 CHAPTER 17 DCIOPENFOAM System A System B Kernel Name Linux 3 1 10 1 16 desktop Linux 2 6 34 12 desktop System software openSUSE 12 1 x86_64 openSUSE 11 3 x86_64 OpenFOAM version OpenFOAM1 7 1 OpenFOAM1 7 1 Compiler for OpenFOAM gcc SUSE Linux 4 5 0 gcc SUSE Linux 4 5 0 g SUSE Linux 4 5 0 g SUSE Linux 4 5 0 Compiler for DETCHEM gfortran pgf90 C Compiling of the individual Codes To perform DC40penFOAM it is necessary to install the following resources 1 C resources e CFD Code OpenFOAM 1 7 1 e OpenFOAM 1 7 1 solver chtMultiRegionSimpleFoamChemDuo e OpenFOAM 1 7 1 library libDetchemFoamModel so 2 Fortran90 resources e DETCHEM shared library libDetchemFortran90 PropsAndSources so Compiling of library libDetchemFortran90 PropsAndSources so This library can be compiled in the directory lt appDir gt libDetchemFortran90 PropsAndSources by typ ing the command make Without any option
148. file go may be used for convenience to call the executable and run the program It requires a system variable DETCHEM_DIR that contains the path to the DETCHEM root directory Depending on your system you can set this variable by either of these commands export DETCHEM_DIR myDirectory DETCHEM or setenv DETCHEM_DIR myDirectory DETCHEM 9 4 Setting up a problem It is recommended to create new problems in separate directories The directories can be created anywhere the user wishes them to be The created directory which becomes your working directory must contain all the input files mentioned in the above section The user can copy these files from the example directory to the working directory and make necessary changes 9 5 Running the tool There are several ways to call the executable e Using the go script from the example directory The user needs to define the system variable DETCHEM_DIR e Add the DETCHEM_DIR bin directory to your system path and call batch e Create a symbolic link to the executable DETCHEM DIR bin batch and call batch The latter option does not require setting of system variables and is therefore less system specific Chapter 10 DETCHEM gt AG 10 1 Introduction The DETCHEM AS code simulates the behaviour of a catalytically active stagnation point flow reactor Model equations couple flow equations together with the energy species continuity and surface equations 10 2 Governing Equations
149. fraction of the species listed in the lt SUM gt tag 74 CHAPTER 11 DETCHEMPLUG 11 4 Examples There are a few examples supplied along with the installation Each example directory contains the following files plug inp species inp mech inp a gas phase mechanism file a surface mechanism file thermdata and moldata The optional washcoat input has been saved in a separate file washcoat inp 11 5 Setting up a problem It is recommended to create new problems in separate directories The directories can be created anywhere the user wishes them to be The created directory which becomes your working directory must contain all the input files mentioned in the above section The user can copy these files from the example directory to the working directory and make necessary changes In case of problems adjusting the solver and tolerance parameters may improve the performance 11 6 Running the tool There are several ways to call the executable e Using the go script from the example directory The user needs to define the system variable DETCHEM_DTR e Add the DETCHEM_DIR bin directory to your system path and call plug e Create a symbolic link to the executable DETCHEM _DIR bin plug and call plug The latter option does not require setting of system variables and is therefore less system specific Chapter 12 DETCHEMPACKEDBED 12 1 Introduction Since the discovery of solid catalysts packed bed reactors become an import
150. g within a definition of a surface reaction lt REACTION gt OCs OCs gt s s 02 A cm_units 3 7e21 Ea kJ_mol 213 lt COV gt O s epsilon kJ_mol 70 lt COV gt lt REACTION gt The lt COV gt tag first lists the name of the surface species that appears as the argument of the modifying function Then the parameters u and e can be defined If one of them is omitted its value defaults to zero For the change of activation energy varaious units may be used All possible options are summarized in the table below species name name of surface species epsilon J_mol d change of activation energy J mol epsilon kJ_mol d change of activation energy kJ mol epsilon R d change of activation energy R K mu d change of reaction order lt GLOBAL gt complex global reactions Sometimes more complex reactions that are no elementary reactions need to be defined Due to the strict format limitations of the gas phase and surface mechanism files they cannot be declared using the external mechanism files Global reactions were introduced in DETCHEM version 2 0 and are to be declared in the the input file directly An example of a global gas phase reaction is shown below lt MECHANISM gt lt GASPHASE gt lt GLOBAL gt 2 CO 02 gt 2 C02 lt ARRHENIUS gt 3 7 MECHANISM INPUT 33 co 1 1 A cm_ units 1E10 beta 0 Ea kJ_mol 275 lt ARRHENIUS gt lt GLOBAL gt lt GASPHASE gt lt MECHANIS
151. given species here O s 3 6 Species input For any DETCHEM application the user needs to define the species that are to be considered In many cases it is advisible to put the declaration in a separate file e g species inp and bind it to the applications input file by an an include statement include species inp The lt SPECIES gt section contains gas phase species as well as surface species Always there must be exactly one gas phase ensemble where as you can have any number of surface ensembles for reasons of memory allocation the number is usually limited to 5 In addition third body species can be defined in this section An example is shown below lt SPECIES gt lt GASPHASE gt NO 02 NO2 0 N2 lt GASPHASE gt lt SURFACE name Pt mol cm2 2 72e 9 gt PT s 0 s NO2 s NO s lt INITIAL gt PT s OCs 0 01 NO s 0 08 lt INITIAL gt lt SURFACE gt lt THIRD BODY gt M 0 4 02 0 4 N2 lt THIRD BODY gt lt SPECIES gt In order to distinguish different surface types e g Platinum Rhodium etc you can assign an optional string parameter name inside the lt SURFACE gt tag up to 8 characters Further for each surface a surface site density must be defined It can be given in moles per square centimeter or moles per square meter The ini tial coverage of surface species must be specified under element tag lt INITIAL gt While specifying the initial coverage one species can be given value In th
152. gt The reaction equation is written in the same way as explained before A third body species must appear in the reaction equation on both sides Then the two rates coefficients ko and kg are defined by their corresponding Arrhenius parameters Finally the four Troe parameters need to be defined The available parameters are summarized below A inf SIunits d pre exponential factor mol m s K Ainf cm units d pre exponential factor mol cm s K beta_inf d temperature exponent default 0 Ea_inf J_mol d activation energy J mol Ea_inf kJ_mol d activation energy kJ mol Ea_inf R d activation energy R K A_0 SIunits d pre exponential factor mol m s K A 0 cm units d pre exponential factor mol cm s K beta 0 d temperature exponent default 0 Ea_0 J_mol d activation energy J mol Ea_0 kJ_mol d activation energy kJ mol Ea_0 R d activation energy R K alpha d Troe parameter alpha T 4 Troe parameter T K T d Troe parameter T K T d Troe parameter T K cflag s character flag The character flag is only used for special applications like sensitivity analysis It will be described in detail where necessary lt STICK gt surface adsorption reactions Adsorption reactions are often described in terms of a sticking probability Such reactions are declared as in the following example 32 CHAPTER 3 INPUT FILES lt STICK gt CO s CO s SO 0 9 lt STICK gt The reaction equation is writ
153. gt lt MOLEFRAC gt H2 0 5 H20 lt MOLEFRAC gt lt SPECIES gt lt SECTION gt lt SECTION gt name fuel height 1 0e 03 width 1 0e 03 ny 1 lt INLET gt u 0 3 temperature 1073 15 pressure 101325 0 lt SPECIES gt lt MOLEFRAC gt CH4 H20 0 5 lt MOLEFRAC gt lt SPECIES gt lt INLET gt lt SECTION gt lt GEOMETRY gt lt ELECTROCHEM gt Ecell 0 7 Beta_a Beta_c iH2 8 5 102 2 8 kH2 1 5E6 EH2 100 k02 1 E6 E02 200 lt ELECTROCHEM gt lt INIT gt p 101325 0 T 1073 15 isothermal yes lt INIT gt lt SOLVER gt t_Begin 0 t_End 100 dt 1 0d 04 lt TOLERANCE gt cont 1 0d 05 u_Tol 1 0d 05 0 5 0 5 u species closing tag for the cathode stream inlet condition closing tag for the cathode stream close the cathode channel section open the cathode boundary conditions and properties name of the section must be cathode height of the cathode m width of the cathode m number of discretization in the y direction porous media transport model DGM or MIXED porosity of the cathode tortuosity of the cathode pore diameter of the cathode micro structure m particle diameter of the cathode micro structure m active specific area of the cathode 1 m close the porous media property tag species tag for cathode initial guess for the cathode species can also be lt MASSFRAC gt Se FR SR HR A closing tag for the initial guess close the species tag
154. h 0 1 maximum stepsize allowed for integration lt TOLERANCE gt opening tag for convergence tolerance lt SPECIES gt tag to specify tolerence for species equations absTol 1 d 03 absolute tolerence for convergence relTol 1 d 06 relative tolerence for convergence lt SPECIES gt closing tag for species tolerences lt OTHERS gt opeing tag for temperature tolerence absTol 1 d 03 absolute tolerence for temperature equation relTol 1 d 05 relative tolerence for temperature equation lt OTHERS gt closing tag for temperature tolerances lt TOLERANCE gt closing tag for tolerences lt SOLVER gt closing tag for solver lt CHEMSURF gt opening tag for chemsurf options hini 1 d 10 inital time step for integration time 100 end time for integration for surface coverages lt CHEMSURF gt closing tag for chemsurf lt OUTPUT gt opening tag for output options file 6 integer number to be appended at the end of output file names title noo2 required title in the output file transfer coeff y transfer coefficient outputs y or n monitor 1 option to monitor the solution progress coverage y coverage output y or n species y mass or mole output option for the species lt SUMMARY gt sp NO name of species whose exit conditions required sp 02 name of species whose exit conditions required lt SUMMARY gt lt SUM gt sp NO2 sp N2 lt SUM gt lt OUTPUT gt lt PFR gt 71 The file plug inp
155. hat band This procedure is repeated for all tubes The CFD code solves the outer flow and heat transfer problem with the prescribed heat fluxes as boundary conditions The iterative process of averaging tube temperatures in bands solving the catalytic chemistry problem transferring the heat fluxes back to the CFD model and solving the outer flow and temperature is repeated until convergence is achieved DUO can perform a user specified number of CFD flow and thermal iterations between tube chemistry simulations The inner tube chemistry calculation is typically run to convergence for each intermediate tube wall temperature profile as provided by the CFD model In contrast the CFD solution is always iterative and hence overall convergence is accelerated by performing several CFD iterations between running the chemistry model if the tube calculations are computationally expensive relative to the CFD calculations It is possible that a reactor has a very large number of tubes such that modeling detailed chemistry in all the tubes is impractical Therefore the algorithm is generalized so that such groups of tubes can be modeled with one representative tube The chemistry problem is solved for this representative tube with the resulting heat fluxes being dis tributed back to all the tubes in the group B DC40penFOAM Internal Coupling to OpenFOAM In the standard form OpenFOAM calculates the temperature dependent properties only via the Sutherland law
156. hcoat 2 3 1 Diffusion and reaction in porous catalysts In a porous catalyst the reaction occurs inside the pores therefore the reactants must diffuse into the catalyst As the reactants diffuse into the catalyst they encounter active sites and some of the reactants react Therefore the reactant concentration declines as the distance into the catalyst increases giving rise to a concentration gradient inside the catalyst If the diffusion velocity is much lower than the intrinsic rate the concentration gradients can be quite large Also the intrinsic rate depends on the gas phase concentration at the active sites Hence it is necessary to have a mean of calculation the effective rate of reaction at the gas wall boundary for a catalytic wall with variable concentration profiles inside 2 3 2 Detailed washcoat model The detailed washcoat model solves the reaction diffusion equations in radial direction for every species i within the washcoat Oj eye 2 75 Or The radial diffusion flux of species i is calculated by Oc ji De 2 76 or where c concentration of species i within the washcoat y ratio of catalytic active area to washcoat volume and Deg effective diffusion coefficient Implementation In order to solve the reaction diffusion equations the washcoat is discretized according to the method of finite differences The reaction rate at the gas wall boundary is determined from the diffusion flux at the gas wall boundary
157. he Transient Behavior of a Three Way Catalytic Converter SAE Technical paper 2002 01 0065 2002 R P O Connor L D Schmidt O Deutschmann Simulating the Millisecond Oxidation of Cyclohexane by Coupled Chemistry and Fluid Dynamics AIChE J 48 2002 1241 1256 R Schwiedernoch S Tischer C Correa O Deutschmann J Warnatz Experimental and numerical investigation of the ignition of methane combustion in a platinum coated honeycomb monolith Proc Combust Inst 29 2002 K Maruta K Takeda J Ahn K Borer L Sitzki P D Ronney O Deutschmann Extinction Limits of Catalytic Combustion in Microchannels Proc Combust Inst 29 2002 R Schwiedernoch S Tischer C Correa O Deutschmann Experimantal and Numerical Study of the Transient Behaviour of a Catalytic Partial Oxidation Monolith Chem Eng Sci 58 2003 633 642 20 221 22 23 24 25 J Windmann J Braun P Zacke S Tischer D Chatterjee O Deutschmann J Warnatz Impact of the Inlet Flow Distribution on the Light Off Behaviour of a 3 Way Catalytic Converter SAE Technical Paper 2003 01 0937 2003 R Schwiedernoch S Tischer H R Volpp O Deutschmann Towards a better understanding of transient processes in catalytic oxidation reactors Natural Gas Conversion VI Studies in Surface Science and Catalysis 147 2004 511 516 M Bizzi R Schwiedernoch O Deutschmann G Saracco Modeling the Partial Oxidation of Methane in a Fixe
158. he current constant avg_cd 0 3 current density in A cm2 for which the calculation has to be done lt ELECTROCHEM gt closing tag for electrochemical properties Ecell specifies the operating cell potential In the case of button cell calculation or a polarization curve cal culation the code will start the calculation at the specified Ecell The next potential the code chooses depends on the step size specified by the option pot_step In short the code starts the calculation at the specified Ecell and then decreases the Ecell in steps specified by pot_step until O cell potential is reached For example for H3 button cell or channel calculation it is wise to specify Ecell as 1 2 V rather than starting the calculation at 0 8 V The parameters Beta_a and Beta_c respective are the charge transfer coefficients or asymmetry factor for anode and cathode half cell reactions In generally their values are 0 5 However the user is free to choose the values The parameters iH2 and iO2 are the exchange current density parameters and are very important For isothermal conditions the exchange current density in DETCHEM OFT are modeled according to the following equations The exchange current density for Hz oxidation is given by Cm pi po ig 16 12 lo ly 1 Pm IP and exchange current density for O reduction is given by Po Po je A 16 13 ea AA 1 po Ip iH2 and iO2 stands for the parameters i and respect
159. he previous case the name air will be appended with the file number specified in the lt OUTPUT gt tag For e g air0010 plt The file contains variables in the following order e z Axial position m e rho density kg m e u velocity m s e Nre Reynold number e T Temperature e species 1 to K mole or mass fraction outs plt The file outs plt will be generated for planar cell calculations when surface chemistry is switched on and con tains information related to the surface coverges of species in the anode However the user should keep in mind that while calculating polarization curve for planar cell the file outs plt will be overwritten for each operating cell potential As in the previous case the name outs will be appended with the file number specified in the lt OUTPUT gt tag For e g outs0010 plt The file contains variables in the following order e z Axial position m e y Radial position m e species 1 to K surface coverages 16 4 OUTPUT 111 Mole fraction y 0 0 01 0 02 0 03 0 04 Axial position m Figure 16 2 Species profile within the fuel channel as a function of axial position The inlet fuel consists 66 H2 10 CHa 20 CO and rest H20 Operating cell potential 0 7 V operating temperatyre 800 C summary dat The file summary dat will be generated for each planar cell calculation and contains information on the average properties such as average current density average
160. he tool o egasi Errat Sede be eee Pe Eee ee ee Be pl a 63 63 63 64 64 65 65 67 67 67 67 67 68 68 68 68 68 69 69 69 70 70 70 72 72 12 72 72 72 73 73 73 73 74 74 74 13 DETCHEMCHANNEL 13 1 13 2 13 4 13 5 13 6 13 7 INtTOUCHON y 44 4 ur a ea A a ld be ee Bd 13 1 1 The boundary layer approach 2 o o e e 13 1 2 Governing Equations ee 13 1 3 SOMO 32228 Bra ee dE ae ghee ae User Inputs ssaa Boe eat sree dd tee hak we Re Se wk Bae Sed 13 2 1 Whe lt BASLCS gt tag one ad ede ee AE Kenn eae Bae el 13 22 The lt SECTION gt S td 3 24 rand ar a awk Seo Sate oath cs See ach 13 23 The lt SOLVER gt tage lt 5 degen ode e wee a rd ate ee at 13 2 4 The lt TOLERANCE gt tas o 2 2 5 a np ek ee Ge ai 13 2 5 The lt OUTPUT gt tag 3 moues ea 4 4 oe be do ee Ba er 13 2 6 The lt INLET gt AS 4 4 a Soe Gok veh Siege tee ee 13 27 The lt TPROFILE gt tage san ole Su Oa oO A eo ae A es Outputs ol oe en eo AAA A Sadie ee rinnen 13 31 SereenOutput s ee we ee fee 4 bin Bie he ie ee BE Oe ee Bees 1332 outo AE pU a2 ee ee AER Ey Aid aa ae eee 132323 is AA we eA op Socks Gees Beech looks Bashy Eee 13 3 4 outflux pl 2 2 has ee A BEE ee ee ee ee rede 13 3 5 summary_out dat a aae ae a n e laa e R n e a a A D R e a TUG Examples mm rr ee E aa Setting up a problem s ccs ab ow a Ba Se ek a Running the tool Siete e a ne ee dt A da S t BLAYER version 4 2
161. he user can give just one exact power input with the initial power PINIT parameter in this case PLAST and PINCR are not required It is also possible to give a linear power increase to the program by supplying PINIT PLAST PINCR values Estimated coverage of the surface species and surface site density must also be supplied to the code An example is given below in the species inp input file lt SPECIES gt lt GASPHASE gt AR H2 H20 0 OH H lt GASPHASE gt lt SURFACE mol cm2 2 72E 09 gt PT s H20 s H s OH s lt INITIAL gt H s 4 0E 01 PT s H20 s 2 0E 01 lt INITIAL gt lt SURFACE gt lt SPECIES gt 10 5 OUTPUT 67 As seen on the above example estimated coverage of the surface species are given within the lt INITIAL gt tag Sum of the surface coverages must add upto 1 Surface site density is given with the unit of mol cm in the lt SURFACE gt tag declaration 10 5 Output DETCHEM S creates five different output files and a screen output 10 5 1 Screen output A short information of the current solution will be given on the screen as given below e Fe de de Fe Fe Fe Te Fe Fe de RU Fe Fe Fe Fe Fe de RRA Fe Fe Fe Fe RR ARRE Fe Fe de Te Fe Fe Te Fe Te Fe de Te Fe Fe RR RR Fe Te Fe Fe Te Fe Fe Te Fe Te Fe Fe Te Fe Fe Te Fe Te Fe Ke Te e ser DETCHEM STAGNATION Kar H KARADENIZ ware Ren VERSION 2 3 21 2012 01 30 CRES e Fe de Fe Fe Fe Fe Te Fe Fe de Fe Fe Fe Fe Fe Fe Fe de Fe Fe Fe Fe de Fe
162. holds all the parameters which are grouped into different sections required to setup the problem The file must start with the include statements for species inp mech inp and washcoat inp if washcoat reaction is desired Alternatively the pre processed input file detchem inp can be included The following table specifies the different geometries that can be used with mass and heat transfer coefficients Factor Shape regular cylinder circular cylinder with steadily varying c s area square equilateral triangle hexagonal sinusoidal ou sun In the input file when factor is given the value 1 then plug assumes a regular cylinder and rout will be set equal to rin The rout option in the cylindrical tab is effective only when factor is given the value 2 For any value of factor greater than 2 the dimension given in the OTHERS tab will be used to calculate the surface area and cross sectional area 72 CHAPTER 11 DETCHEMPLUG If htceff is supplied in process parameters then the user supplied value will be used while solving the energy equation On the other hand the user can comment the tag htceff then the heat transfer coefficient will be cal culated using correlations If axial temperature profile is opted in operating conditions then a subroutine named PFR_ TempProfile_Usr must be supplied A pseudo code for subroutine TempProfile_Usr is supplied along with the installation Note that the point temperatures must be stored in the var
163. iable tp z is the position along the length of the reactor The user can modify the code and recompile the files using Makefile The convergence rate can vary from case to case In any case if the code fails during the run then the user is advised to change the tolerance parameters There are no strict guidelines for setting the tolerance 11 2 1 The lt GEOMETRY gt tag The important point to be noticed in the lt GEOMETRY gt tag is the option factor The values assigned for the factor decides the reactor shape under consideration The values that can Ga assigned to factor is explained above 11 2 2 The lt SECTION gt tag By this feature the reactor can be divided into a number of sections and each section can be assigned with different process boundary conditions A total of 20 sections are supported If there is only one lt SECTION gt tag then the reactor is assumed to be of single section with the length of the reactor equal to the length of the section If more than one lt SECTION gt is specified then the length of reactor is equal to the total length of the sections And the simulation of each reactor section will be carried out according to the conditions specified under each lt SECTION gt tag 11 2 3 The lt SOLVER gt tag This tag holds the option for choosing the solver and the tolerance levels that can be assigned for different so lution variables In any case if the solver is unable to finish the calculation it is advis
164. ical reactions in this regions and the determination of the temperature dependent properties based on the Sutherland law is enough If we want to imply chemical reactions of the gas phase in the upstream region of a monolith and or to determine the properties in more detail could be important for mixture effects we have to include additionally the internal coupling If we want to calculate the flow in the single channels of the monolith in three dimensions including gas phase and surface reactions we have to use the internal coupling solely 17 2 Programming of DC40penFOAM For the internal coupling of DETCHEM to OpenFOAM the library libDetchemFortran90 PropsAndSources so was made out of several parts of the DETCHEM software package Additionally some routines which are needed to make a new solver or application in OpenFOAM are provided They are written in the language C For a deeper understanding of the code or information about the capabilities and the execution of Open FOAM the user should refer to the appropriate manual 17 2 1 OpenFOAM OpenFOAM Open Field Operation and Manipulation is a free open source CED software package developed by the OpenFOAM Team at SGI Corp and distributed by the OpenFOAM Foundation It has a large user base across most areas of engineering and science from both commercial and academic organisations OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reac
165. ile channel inp below include species inp include mech inp lt SURFACE MODEL gt lt CHEMSURF gt hini 1 d 10 time 1 d0 lt CHEMSURF gt lt Fcatgeo gt Pt 4 lt Fcatgeo gt include washcoat inp lt SURFACE MODEL gt lt CHANNEL Version 2 0 gt lt BASICS gt title EXAMPLE DETCHEM V2 0 ngrid 15 zmax 0 1 rmax 0 001 lt BASICS gt lt SECTION gt gaschem y lt WALL gt surfchem y mechanism Pt lt WALL gt lt SECTION gt lt SOLVER gt hini 1 d 10 hmax 0 01 lt SOLVER gt lt OUTPUT gt outg y outs y summary y file 1 copy y monitor 1 lt OUTPUT gt lt INLET gt TO 300 ud 0 1 p 1 00e5 lt MOLEFRAC gt NO2 0 1 N lt MOLEFRAC gt lt INLET gt lt TPROFILE gt lt DISCRETE gt 0 000 lt DISCRETE gt lt TPROFILE gt 1123 lt CHANNEL gt Fe Fk Sk Sk E title used in the output file number of grids in the radial direction length of the channel m radius of the channel m gas phase chemistry yes no surface chemistry yes no name of the surface mechanism initial step size m maximum step size m gas phase output file y n surface output file y n add a line to summary_out dat y n file no appended to output file names save a copy of this input file y n screen output none 1 normal 2 extended inlet temperature K inlet velocity m s static pressure Pa inlet mole fraction balance mole fraction z posi
166. ill be produced which list the surface coverages along the axial position of the reactor If the transfercoeff option is chosen the files trans plt will be produced and will list the mass and heat transfer coefficient calculated using the correlations The file summary dat contains the exit temperature and composition of the species listed in the lt SUMMARY gt tag If the lt SUM gt tag is additionally used the file summary dat contains the sum of the mass mole fraction of the species listed in the lt SUM gt tag 18 4 Appendix 18 4 1 Example of a Keyword File couplingParameters In the following an example of a parameter file named couplingParameters is printed and described The syntax is the same as in C because the file is handled as an include file Lines with in the first column and between the symbols and are comments The sequence of the parameters and the positions of the dictionaries are arbitrary The sequence of the lists in each dictionary and the sequence of entries inside a list are also in a random order IN Field OpenFOAM The Open Source CFD Toolbox 1 W 0 peration Version 1 7 0 N A nd Web www OpenFOAM com NY M anipulation 144 CHAPTER 18 DUO NP FoamFile version 2 0 format ascii class dictionary location system object couplingParameters EEE IEEE E ak E 2 2 2 2 2 STANDARD PARAMETERS l 2 2 2 2 2 22
167. in terms of chemical reactions we denote the stoichiometric coefficient of species iin reaction k by vj and the reaction coordinate by Applying this we can write ni Vind 7 2 k Inserting eq 7 2 into eq 7 1 we get 2 2 a paj 0 1 3 k i This must be fulfilled for arbitrary amp Therefore the inner brackets must vanish The matrices a Mi and vir are othogonal with respect to each other Hence for any v x with maximum rank any possible reaction can be written as linear combination of its columns The columns of matrix vj are the stoichiometric coefficients of hypothetical reactions Instead of solving the minimization problem with constraints eq 7 1 we can solve the minimization problem for the hypothetical reactions For a mixture of ideal gases the Gibbs Free Enthalpy is given by the expression G T p n gt nj sr RT In z 7 4 i where g denotes the standard specific molar free enthalpy at pressure p p is the partial pressure according to the ideal gas law n RT V Equation 7 4 can be generalized to other mixtures than ideal gases by introduction of an activity a that replaces the term i Here we also consider mixtures of ideal liquids where a is the mole fraction of species i in the condensed phase pi 7 5 47 48 Reaction k is in equilibrium when pz Pint 0 IE a This is equivalent to the formualtion involving the equilibrium constant ArG a Kp ex
168. ing seems to be false By setting the value of the keyword debugLevel DUO produces additional output coming from OpenFOAM which is always helpful for debugging All output is displayed on the screen Additionally DETCHEM produces screen output depending on the monitor option specified with the tag lt OUTPUT gt in the input files plug inp or channel inp With monitor 1 the screen output reports the iteration count and the temperature With monitor 2 it reports the iteration count temperature and the species mass fractions With monitor no no additional output is generated B Solution Data from OpenFOAM The lt time gt directories contain the result files For an example case with the name reformer the velocity field U for the timestep 10 s is stored in the file run reformer 10 U The solution files can be converted to the TECPLOT format using the utility foam ToTecplot360 C Solution Data from DETCHEM Depending on the options set in the input file DETCHEMP YS or DETCHEMCHANNEL produces several file outputs All the output files are in the TECPLOT format In the following the symbol stands for the value of the tag Filenumber in plug inp or channel inp The output files outg plt list velocity residence times temperature density and the gas species mass or mole fractions depending on whether the species tag in the lt OUTPUT gt element is supplied with mass or mole option If the coverage option is chosen the files outs plt w
169. ins the atomic composition in the correct format e g CH30 C 1H 30 1 OG 300 000 5000 000 1 E H3 0 none The symbols are expected in colums 25 30 35 and 40 Each atom symbol can be up to two characters followed by an integer value in the next 3 columns 7 3 Output 7 31 Screen output After successfully executing DETCHEMFQUIL the screen will look like this Fe Fe de de Fe Fe Fe Te Fe Fe de de Fe Fe Fe Fe Fe Fe ee Fe Fe Fe de Te Te Fe Fe Fe Fe Fe de Te Fe Fe de Fe Te Fe de Te Fe Fe Te Fe Te Te Fe Te Fe Fe Te Fe Fe Te Fe Te Fe eee ee en were DETCHEM EQUIL wre werke S Tischer wR FENE VERSION 2 0 100 05 04 27 KEER Fe Fe de Fe Fe Fe Fe Te Fe Fe de Fe Fe Fe Fe Fe Fe Fe de Fe Fe Fe Fe Fe Fe Fe de Te Fe Fe de Fe Fe Fe de Te Fe Fe de Fe Te Fe de Te Fe Fe Te Fe Te Te Fe Te Fe Ae Te Fe Fe Te Fe Te Fe Ke Te Fe Fe de de Te Fe Ke Te Fe species H2 02 OH H20 PNBANRPENENN oo o 2oommonrrmmonw anno Hrrev 2 initial conditions p 101325 Pa V 0 001 m 3 T 500 K S 5 25471088 J K U 221 736483 J H 120 411483 J F 2849 09192 J G 2747 76692 J species moles mole frac H2 0 000000E 00 0 000000E 00 02 3 655958E 03 1 500000E 01 OH 0 000000E 00 0 000000E 00 H20 0 000000E 00 0 000000E 00 H 0 000000E 00 0 000000E 00 0 0 000000E 00 0 000000E 00 H202 0 000000E 00 0 000000E 00 50 CHAPTER 7 DETCHEM QUIL CH4 3 655958E 03 1 500000E 01 co2 0 000000E 00 0 000000E 00 co 0 000000E 00 0 000000E 00 N2 1 706114E 02
170. ion Note In case of a restart the previosly written data may be lost Therefore it is advisible to copy reser voir plt to a different file and concatenate the data manually after successful simulation restart plt The file restart plt contains the same data as a reservoir plt file If the write_restart option is activated the file will be written in each time step Therefore it always contains the state of the simulation at the latest time step 102 CHAPTER 15 DETCHEMRESERVOIR global plt The file global plt summarizes the global inlet and global outlet composition at each time step not only the times listed The file is in TECPLOT format and can be used to draw line graphs of gas phase temperature and mass fractions However this format also allows for simple import into other spreadsheet programs e g Microsoft Excel The variables in this file are time inlet temperature inlet mass fractions outlet temperature outlet mass fractions and an error flag You can use this file for simple calculation of conversions and selectivities It is recommended to pay attention the the error flag If the flag is not zero an error in one or more channel simulations at this time step has occurred The outlet composition at this time step is most likely wrong If this only happens sparsely you may delete the wrong line However if the error flag keeps to be set the simulation was not successful A new file global plt is written on each
171. is case the value assigned to the particular species would be 1 sum of initial coverage of rest of the species In the example given above Pt s would be assigned a value of 0 91 Surface species having zero initial coverage need not be specified The tag lt THIRD BODY gt which is optional can be used to define reactions involving third bodies This option is especially useful while defining global reactions with third bodies In the above example M stands for the 3 7 MECHANISM INPUT 29 third body It can be any alphabet and 0 4 is the collision efficiency If the third body is already defined in the mechanism file then the definitions of the mechanism will be taken In short the third body definitions in the mechanism file over rides the definitions in the lt SPECIES gt section Species occupying more than one site There are instances where an adsorbed surface species can occupy more than one site on the given surface For example some hydrocarbon species have size which needs more than one site to be adsorbed on the surface In such cases the information should be specified in the lt SURFACE gt section as shown below lt SURFACE mol cm2 2 7E 09 gt PT s OCs NO2 s 2 NO s lt INITIAL gt PT s OCs 0 01 NO s 0 08 lt INITIAL gt lt SURFACE gt In the above example NO2 s occupies 2 surface sites Options in lt SPECIES gt section lt GASPHASE gt gas phase species list lt SURFACE gt surface species
172. is case v must be zero i Sy The reaction rate of each gas phase species is then computed as a sum over the reaction rates of each reaction i vk ee 2 59 keRy JES USM 2 2 3 Pressure dependent gas phase reactions Various dissociation and recombination reactions are treated like elementary reactions for simplicity They always involve a third body in the collision process symbol M Due to complex interactions between the reactants the reaction coefficient k depends on the concentration of M According to the Lindemann theory one can observe a direct proportionality in the low pressure limit where as in the high pressure limit we get saturation Therefore we can define the two rate limiting constants k k lim 2 60 mi gt 0 M N and ko limk 2 61 M gt 00 These two constants can be modeled by Arrhenius equations eq 2 55 The Lindemann theory further yields for the rate coefficient with given concentrations Pr k ko F 2 62 l 5 where pr is the reduced pressure Ko M Pr 2 2 63 and F the so called pressure fall off blending function In the most simple case the latter one equals unity In DETCHEM also the Troe formalism has been implemented to model this function 18 CHAPTER 2 FUNDAMENTALS OF DETCHEM 27 1 log F o aie logig Feen 2 64 With c 0 4 0 67logigFeent gt 2 65 n 0 75 1 27logyy Fem gt 2 66 0 14 2 67 and Few dee vee eet 2
173. is recommended to create new problems in separate directories The directories can be created anywhere the user wishes them to be The created directory which becomes your working directory must contain all the input files mentioned in the above section The user can copy these files from the example directory to the working directory and make necessary changes 10 8 Running the tool The example directory is supplied with a go script which can be used to run the tool just by typing go in the command prompt or by any of the appropriate methods explained in the installation guide Chapter 11 DETCHEMPLUG 11 1 Introduction The plug code simulates the behavior of plug flow chemical reactors The code is designed for the non dispersive one dimensional flow of chemically reacting ideal gas mixture The following sections describe the DETCHEMPLUS code that can be used to analyze the plug flow reactor for applications involving gases 11 1 1 Governing Equations For setting up the above equations it is assumed that a there is no variation in the transverse direction and b axial diffusion of any quantity is negligible relative to the corresponding convective term kg d puA _ z A St My 11 1 k 1 dY E puA YrAs y Sk Mk MUA Sk Ac Oy 11 2 kg kg d C T UA Er ds gt wx MIA Sx hrM As UA Tu T 11 3 k 1 k 1 PM pRT 11 4 The above listed represents the total continuity species continuity energ
174. ition H20 and or 1H20 the reaction path can be determined 4 5 Running the tool The example directory is supplied with a go script which can be used to run the tool just by typing go in the command prompt or by any of the appropriate methods explained in the installation guide Chapter 5 DETCHEMCASPROBE 5 1 Introduction DETCHEMSASPROBE ig basically a tool to probe the gas phase chemistry thermodynamic and transport prop erties Whenever a new gas phase mechanism is to be used with the DETCHEM reactive flow models it is recommended to test the mechanism using DETCHEMSASPROBE 5 2 User Input Before running DETCHEM 4SPROBE the user must prepare the input file gasprobe inp An example is shown below include species inp include mech inp lt GASPROBE gt T K 1200 operating temperature in K p Pa 100000 operating pressure in Pa lt MOLEFRAC gt NO2 0 1 name and mole fraction N2 de balance mole fractions lt MOLEFRAC gt lt GASPROBE gt The file gasprobe inp starts with the species and mechanism definition section that can appear directly in the input file or can be included from external input files In addition the files thermdata and moldata must be located in the executing directory Alternatively the pre processed input file detchem inp can be included The options within the lt GASPROBE gt tag are as follows T K d temperature K p Pa d pressure Pa lt MOLEFRAC gt species mole fractions lt
175. ively For non isothermal cases even for isothermal the parameters i and io can be further expressed in an Arrhenius form as shown below se En in ky exp RT 16 14 4 Eo lo ko exp RT 3 16 15 In the input file parameters kH2 kO2 EH2 and EO2 respectively stands for ky ko En and Ey in the above equations The user should either specify the parameters iH2 and 02 or the parameters kH2 kO2 EH2 and EO2 108 CHAPTER 16 DETCHEMS FC For more information on these topics the user is referred to the following references 1 H Zhu R J Kee V M Janardhanan O Deutschmann and D G Goodwin Modeling Elementary Chemistry and Electrochemistry in Solid Oxide Fuel Cells J Electrochemical Society 152 12 A2427 A2440 2005 2 Vinod M Janardhanan and Olaf Deutschmann CFD analysis of a solid oxide fuel cell with internal re forming Coupled interactions of transport heterogeneous catalysis and electrochemical processes J Power Sources 162 2 1192 1202 2006 The electrochmical model equations can be solved by either fixing the operating cell potential or by fixing the current The option constant can be used to specify the parameter the user wishes to keep as constant while solving the electrochemical model equations The default value for constant is voltage If the user whishes to keep cell current as constant then specify constant current and specify the average current by using the input variable
176. ize Cells Add layer Calculate nodes weight Calculate flux parameters Calculate cell areas Write grid 14 3 2 r_grid inp The file r_grid inp will be necessary to set up a 3d simultion with DETCHEMMONOLITH This file should not be edited or changed by the user Just copy it to your DETCHEMMONOLITH case directory and include the information in the input file monolith inp Details will be explained in chapter 14 3 3 r grid plt Before using the grid with DETCHEMMONOLITH it can be visualized using the file r_grid plt This file contains the grid information in TECPLOT format Upon loading the file as 2d plot with TECPLOT the grid is displayed The uniformity of the grid can be visulized by activating a contour plot of the cell volumes Since the file is saved in text format it can also be imported into other viewing programs There are three variables the two coordintes and the cell volume They are stored in block format i e all values of one variable sequentially Below the cell definitions follow Four integers make one cell If the first and the last point are identical the cell is triangular otherwise it is quadrilateral 14 4 EXAMPLES 95 14 4 Examples There is an example for each of the three types of grid definition in the distribution In each subdirectory you can find a file gridgen inp In the case of the TECPLOT import example there is also another file velin001 dat The script file go may be used for convenience to call
177. lained in the gas_ dat file generation The output files will consist of the following information TIME integration time of the solution R distance from the washcoat support side to the gas washcoat interface the interface is not included mole fractions mole fraction of each gas phase species at the spatial distances 68 CHAPTER 10 DETCHEMS S 10 5 5 wsurf_ dat This file is generated for the washcoat and washcoat2 simulations It is named according to the power input as explained in the gas_ dat file generation The output files will consist of the following information TIME integration time of the solution R distance from the washcoat support side to the gas washcoat interface the interface is not included surface coverages coverages of the surface species at spatial distances 10 5 6 westag_ dat This file is generated for the washcoat simulation It is named according to the power input as explained in the gas_ dat file generation The output files will consist of the following information TIME integration time of the solution R distance from the washcoat support side to the inlet at the gas phase the gas washcoat interface and the gas phase is consequently included mole fractions mole fraction of each gas phase species at the spatial distances The spatial distances are printed in mm because of the low thickness of the washcoat An illustration of the output follows TITL
178. lculates some not all properties of the fluid as well as the source terms of the gas phase and the surface kinetics for a fluid cell of the computational domain of a CFD calculation with OpenFOAM Therefore the following cell variables are needed pressure gas wall temperature mass fractions of the gas phase species For each cell of the fluid domain calls to subroutines which are implied in the library are performed For each cell the variables the pressure the gas temperature and the concentrations of the gas phase species have to be provided to the library From that the properties heat conductivity dynamic viscosity and the multi component diffusion coefficients of the gas phase species are send back to the CFD code The same holds for the calculation of the source terms of the gas phase kinetics For the calculation of the surface reactions terms the temperature of the wall is needed additionally 116 CHAPTER 17 DCIOPENFOAM Fluid and solid DETCHEM Figure 17 3 Internal Coupling between DETCHEM and OpenFOAM C Mixing of External Coupling and Internal Coupling The two couplings can be mixed up If we want for example to calculate a reformer where the flow in the channels of the monolith should be calculated only in one or two dimensions the external coupling is sufficient If we want also to consider the flow upstream of the monolith we can do this within the range of the external coupling as long we dont have to include chem
179. lingParameters E DUO internal coupling Keywordfile OpenFOAM keywordfile DUO E fvSolution m DUO external and internal coupling numerical schemes numerical parameters fvSchemes fvSolution numerical schemes numerical parameters 4 plug plug inp _ surface mech inp moldata _ thermdata 1 executable keywordfile surface mechanism species data thermo data ehannel channel inp gasphase mech inp species inp properties inp executable keywordfile gasphase mechanism species names keywordfile ll thermFoam chemFoam thermo data species names Figure 18 6 Folder structure of a calculation case E Data Input for OpenFOAM Directories and files for the solver The coupling of the codes OpenFOAM and DETCHEM is an application in OpenFOAM The application or solver directories can be located anywhere but it is recommended they be within an application subdirectory of the users project directory i e HOME OpenFOAM USER 1 7 1 application In the following this folder is called lt appDir gt OpenFOAM applications are organised using a standard convention according to which the source code of each application is placed in a directory whose name is that of the application The top level source file takes the application name with the C extension The application name is chtMultiRegionSimpleFoamChemDuo Therefore the folder where the application is located has the same name The directory struct
180. lision depends on the kinetic energy of the colliding particles Therefore Arrhenius chose the following ansatz for the rate coefficient k A exp 5 2 54 The constant A is called pre exponential factor However sometimes there is an additional temperature depen dence in this factor Thus we use the following expression E k AT exp 2 55 with an additional fit parameter 2 2 CHEMICAL REACTIONS 17 Elementary reactions An elementary reaction is a reaction that can be observed on a molecular scale between single particles There fore every complex chemical mechanism can at least in theory be broken down into elementary reactions The advantage of such a scheme is that the coefficients in the Arrhenius equation get a physical meaning which can be measured The reaction orders equal the stoichiometric coefficients Vil v bzw Vi v 2 56 In practical matters collisions between three particles a relevant only The reaction is in equilibrium when the forward reaction eq 2 52 is as fast as the reverse reaction eq 2 53 Rearranging the terms we get kr vj p Nie 2 57 E jcS Comparing with eq 2 48 yields k K E 2 58 2 2 2 Gas phase reactions The set of all gas phase reactions in an mechanism shall be denoted by R These reactions only involve gas phase species in Sz If only the collision efficiency of a species matters we can formally take it as a representant of the set Sy In th
181. list lt THIRD BODY gt third body species list Options in lt SURFACE gt subsection name s surface name e g Pt Rb etc mol cm2 d surface site density mol cm 2 mol m2 d surface site density mol m 2 j number of surface sites occupied by one molecule of species default 1 species name species name lt INITIAL gt initial coverages 3 7 Mechanism input Most DETCHEM applications deal with chemical reaction mechanisms Therefore the reaction system needs to be declared in the application input file This is done in the lt MECHANISM gt section of the input file An example using the classic style of mechanism input files is shown below lt MECHANISM gt lt GASPHASE gt file gasphase lt GASPHASE gt lt SURFACE name Pt gt file surface lt SURFACE gt lt MECHANISM gt In this case the lt MECHANISM gt tag only acts as a name holder for the external mechanism files Due to compatibility with older DETCHEM versions such mechanism files do not follow the new input format and therefore they can not be included directly into the input file These files must be refered to by using the file option If several apllications shall use the same sets of reactions it is advisible to put the mechanism declaration into a separate file e g mech inp and inlcude it in the application input file by include mech inp 30 CHAPTER 3 INPUT FILES DETCHEM can be used with zero or one gas phase mechanism
182. m between the reactants and products yA yin 2 42 gt eS eS In case of equilibrium the Gibbs Free Energy G H TS 2 43 16 CHAPTER 2 FUNDAMENTALS OF DETCHEM 1s a minimum for a given pressure and temperature The specific Gibbs Energy can be defined using the specific enthalpy and entropy for a given pressure p as 8i hi Ts n 2 44 The change of Gibbs Free Energy in a reaction that converts v mol of each species is AG Y vigimol 2 45 eS This quantity is related to the equilibrium constant a 2 2 46 eS by ARG K z 2 47 ol 22 aan In analogy a equilibrium constant with respect to concentrations can be defined as K I a 2 48 icS Using the reference concentration c at pressure p we can write 0 ARG 0 Ary K 2 49 ol 2 49 with Av Dv 2 50 eS For a gas mixture the ideal gas law yields 0 o_P 2 51 C PP 2 51 Reaction rate The reaction rate in general depends on the concentrations of the reactants probability of a collision and on temperature collision energy Therefore the dynamics of reaction can be written as de i vr Vik e 2 52 dt ar jeS where k is a temperature dependent rate coefficient of the forward reaction and y are the reaction orders of each species In analogy we can write for the backward reaction dc vn a 7 vik 2 53 jeS The probability of a reaction due to a col
183. mat TECPLOT will create a line graph upon loading the file equil plt Nevertheless this format also allows for easy import into spreadsheet programs like Microsoft Excel The variables in the file are initial temperature equilibrium values of pressure volume temperature entropy enthalpy free enthalpy amount of species and species mole fractions separately for gas and condensed phase Frame 001 22 Jun 2005 DETCHEM_EQUIL V2 0 1 H H2 0 15 N20 E L 2 P L g o E L 2 E co o 0 05 F co2 p CH4 500 600 700 800 900 1000 1100 1200 Temperature K 7 4 Example The distribution contains an example for DETCHEM EQUIL in the directory DETCHEM DIR EQUIL example It contains three input files equil inp thermdata and moldata The script file go may be used for convenience to call the executable and run the program It requires a system variable DETCHEM_DIR that contains the path to the DETCHEM root directory Depending on your system you can set this variable by either of these commands 7 5 SETTING UP A PROBLEM 51 export DETCHEM_DIR myDirectory DETCHEM or setenv DETCHEM_DIR myDirectory DETCHEM 7 5 Setting up a problem It is recommended to create new problems in separate directories The user must supply the files equil inp thermdata and moldata In most cases it might be convenient to copy an existing directory and modify the files If the same species data is used by more than one DETCHEM
184. mber Fcatgeo defines an additional surface factor for this section However this factor cannot distinguish between different surface types So it applies to all surface reactions in the same way If the user wants individual catalytic surface areas declare them in the lt SURFACE MODEL gt section If F at geo is defined in both lt SECTION gt and lt SURFACE MODEL gt then both apply to the calculation of the reaction rates i e the rates are multiplied by the product of the two values WARNING Declaration of Fcatgeo in this section may give wrong results when CHANNEL is used as part of other applications involving the calculation of transient coverages This value is not passed to higher order applications 13 2 3 The lt SOLVER gt tag In this section the user can define solver specific options 13 2 USER INPUT 85 hini d initial integration step size m default 1e 10 hmin d minimum step size m default 1e 20 hmax d maximum step size m default zmax chemmax i maximum number of iterations with chemical source terms default unlimited p_relax d pressure equation relaxation length m default 1e 10 bulk s bulk species i e species for that no conservation equation is solved default none The members hini hmin and hmax define the step size of the integration process If the integration process fails lowering these values may help p_relax defines the relaxation length in the pressure correction equation I
185. merical strings or logical commands and comments All items must be separated by spaces line breaks commas or equal signs The number of delimiters are not significant A line break is also required behind the last tag in any input file Tags options and com mands do not distinguish small from capital letters however in strings and names e g species names they are treated differently The length of a line is limited to 999 characters each option name can be up to 32 characters 3 1 1 Tags Tags are used to group data in the input file They always consist of a pair in sharp brackets lt tag gt lt tag gt They define a hierarchy in the input file Therefore do not forget the closing tag at the appropriate place An error message will be generated in case of an unknown option or insufficient information given within the tag environment 21 22 CHAPTER 3 INPUT FILES 3 1 2 Options and Values The user defined data is specified using options There are several types of options most of them require a value but some do not Depending on the type of information the values can be integers floating point numbers strings or logicals Integers are numbers that may contain a negative sign but no decimal point or exponent whereas all FORTRAN type formats are accepted for floating point numbers e g 0 0001 le 4 1 d 04 Logical values are yes and no or shorter y and n All character combinations that do not contai
186. mixture with respect to the total volume the mixture is quatifyed with respect to moles or mass Then we can define the mole fraction wog 2 3 Ctotal and the mass fraction M Y X 2 4 M 12 CHAPTER 2 FUNDAMENTALS OF DETCHEM Under the assumption of the ideal gas law we can write the density p for given pressure p and temperature T as E Fee 5 2 5 R is the gas constant Thermodynamic parameters For most systems we assume an almost constant static pressure Therefore the thermodynamic potential of choice is the enthalpy H The enthalpy density per mole h is a specific property of each species When we also include the enthalpy of formation Ar A in the definition then the total enthalpy is conserved in a reacting system under isobaric conditions The heat capacity C gives the relation between heat 90 and a temperature change y 2 CS ae 2 6 The specific heat capacity at constant pressure cp is then connected to the enthalpy density by dh G F 2 7 Under the assumption of the ideal gas law the heat capacity at constant volume is given by Cv Cp R 2 8 Translations rotations and vibrations contribute to cy which can be written as follows Cy CV tr Cyrot t CV yvib gt 2 9 3 Cvr 5 Ro 2 10 CVrot Ro 2 11 f is the number of excited rotational degrees of freedom 0 for atoms 2 for linear molecules 3 for others Another variable of interest is the entropy S According to
187. model is shown below lt SURFACE MODEL gt lt MIXED_DIFF gt lt ZONE gt thickness 1 d 04 thickness of the washcoat layer ngrid 10 dummy value no grid generated lt ZONE gt tau 3 tortuosity porosity 0 5 porosity diameter 1d 9 pore diameter lt SOLVER gt time 1 dummy value no separate integration lt SOLVER gt lt MIXED_DIFF gt EFF_MODEL CO CO is the diffusion limiting species alternatively lt EFF_MODEL gt CO C3H6 effectiveness factor for CO or C3H6 is applied whichever is smaller threshold 1le 10 minimum mole fraction for Thiele modulus lt EFF_MODEL gt lt SURFACE MODEL gt Chapter 4 DETCHEMCHEMIN P 4 1 Introduction DETCHEMCHEMM is a pre processor and translator for DETCHEM species and mechanism information files It creates a compact species and mechanism input file chem new as well as input files in CHEMKIN format 4 2 User Input DETCHEMCHEMINP requires one input file named cheminp inp This file acts as a container for the species and mechanism information If this information is stored in external files e g species inp and mech inp then cheminp inp may simply look like the following example lt CHEMINP gt include species inp include mech inp lt CHEMINP gt Like in all other DETCHEM applications the files thermdata and moldata need to be present For more information on these files please refer to chapter 3 4 3 Output DETCHEMCH
188. mole or mass fractions prefix X or Y respectively depends on settings in lt OUTLET gt section 13 3 4 outflux plt If the user wants to get information about the averaged conversion and selectivity at each position along the channel axis the file outflux plt can be used The file contains the radially avaraged mole or mass fractions vs the axial coordinate The data is stored in TECPLOT format but it can easily be imported in to and be displayed with other programs e g Microsoft Excel ni CHAPTER 13 DETCHEMCHANNEL 13 3 5 summary_out dat Each run of DETCHEMCHANNEL appends one line in the file summary_out dat If the file does not exist it will be created and a header line is written first In summary_out dat the inlet and the outlet compostions of each channel simulation are summarized Hence it can be used to compare conversion and selectivity of multiple runs of DETCHEMCHANNEL The file summary_out dat is a simple text file that has been designed to be opened with any spreadsheet program e g Microsoft Excel It contains the file numbers velocities temperatures and eiter mole or mass fractions of all gas phase species at the inlet suffix i and outlet suffix o The header is only valid as long as the species list does not change So remember to delete or move summary _out dat manually when the species list has changed 13 4 Examples There are a few examples supplied along with the installation Each example direc
189. moni toring for the radial coordinate should always be close to rmax temperature at the channel center and tem perature of the wall 13 3 2 outg plt The file outg plt contains two dimensional data of the gas phase of the channel The file is in TECPLOT format and can be used to draw two dimensional contour plots Since the data is stored in ASCII format it can easily be imported in to other programs e g Microsoft Excel but Excel cannot be used to draw 2d contour plots The variables in outg plt are axial coordinate z radial coordinate r temperature T axial velocity u radial velocity v density rho dynamic pressure pdyn either mole or mass fractions prefix X or Y respectively depends on settings in lt OUTLET gt section Frame 001 11 Jul 2005 EXAMPLE DETCHEM V2 0 noo2_sg 0 01 os 0 008 0 085 0 075 0 006 0 065 0 055 0 004 0 045 0 035 0 025 0 002 0 015 0 0 005 0 0 05 yn 0 15 0 2 13 3 3 outs plt In case of surface chemistry the file outs plt is written The file is in TECPLOT format and can be used to draw one dimensional line plots of the variables at the wall The data can easily be imported in to and displayed with other programs e g Microsoft Excel The variables in outs plt are axial coordiante z radial coordinate r shows convergence of the solver wall temperature T surface coverages species name without prefix gas phase
190. n DETCHEM S is a computational tool that simulates one dimensional reacting flows with and without mass and heat transfer coefficients DETCHEMCHANNEL is a computational tool that simulates parabolic two dimensional reacting flows in straight channels and annulus using boundary layer approach DETCHEMMONOLITH is a computational tool that simulates the two dimensional as well as the three di mensional heat field in monoliths The reactive flows inside the monolith channels are simulated by the tools DETCHEMCHANNEL or DETCHEMPLUG DETCHEM DGENSD jg a pre processor that can be used to set up the computational grid for three dimen sional monolith simulations with DETCHEMMONOLITH DETCHEMRESERVOIR is a computational tool that simulates the transient concentrations within a stor age catalyst It serves as a transient one dimensional wrapper model for single channel simulations with DETCHEMCHANNEL or DETCHEMPIUS DETCHEM FT is a computational tool that simulates the two dimensional transient fields within a Solid Oxide Fuel Cell SOFC DC4OpenFOAM is a library which provides transport properties gas phase and surface chemistry to Open FOAM to calculate an arbitrary number of coupled fluid and solid regions in three dimensions DUO is an interface to OpenFOAM to calculate monoliths coupled with 3D flow regions upstream The flow the gas phase and surface chemistry in the tubes are handled in 1D or 2D optionally Chapter 2 F
191. n any delimiting character can also be interpreted as strings To avoid confusion or to include delimiting characters especially blanks or other special characters etc use quotation marks In the later chapters we use a notation like in the following table to list the members of a tag lt TAG_NAME gt tag lt tag name gt tag with variable name option1 d floating point argument option2 i integer argument option3 b logical argument yes or no option4 s string argument option5 option without argument value value without option name 3 1 3 Commands The input file parser supports a few basic commands that help increasing the reusability of input files and debugging Commands are always included in curly brackets as shown in the following example verbose y include filenamel include filename2 define temperature 523 ifdef temperature label1 T 273 use default temperature goto label2 label label1 T get temperature use defined temperature label label2 include filename is used to include other files which are present in the working directory This command can be used to increase readability and reusability of the input file For instance data commmon to several simulations like species input data can be saved in a separate file By including the external file it can be easily established that all simulations use the same data An included file can also contain an include command A maximum of five
192. n be done automatically lt active_moles gt Pt 0 002 Rh 0 0005 lt active_moles gt Ageo 3 14e 4 geometric surface area m2 3 8 3 Washcoat diffusion models Washcoats are used to enlarge the catalytic surface of a reactor However because of their porous structure diffusion limitations can become significant Therefore additional information about the geometric properties of the washcoat is required An example of washcoat input is shown below lt RANDOM_PORE gt lt ZONE gt thickness 1 d 04 thickness of the washcoat layer ngrid 10 number of grid cells aspect 1 aspect ratio of neighboring grid cells lt ZONE gt tau 3 tortuosity lt MACRO gt porosity 0 15 porosity diameter 1d 6 pore diameter lt MACRO gt lt MICRO gt porosity 0 35 diameter 1d 9 lt MICRO gt lt SOLVER gt time 10 solver integration time hini 1 d 4 initial integration step size lt SOLVER gt lt RANDOM_PORE gt The fours diffusion models described in chapter 2 3 4 can be accessed by the following tags e lt MOLECULAR_DIFF gt e lt KNUDSEN_DIFF gt e lt MIXED_DIFF gt e lt RANDOM_PORE gt Including one of the fours tags in the lt SURFACE MODEL gt section activates the detailed washcoat model Note In case the washcoat model shall be easily activated and deactivated it is reccommended to put the washcoat definition into a separate file e g washcoat inp and activate or deactivate the include statement 3
193. n example of a parameter file named properties inp which is necessary to call the shared fortran90 library is printed This file has to be located in the folder lt caseDir gt detchem lt SPECIES gt lt GASPHASE gt NO 02 NO2 O N2 lt GASPHASE gt lt SURFACE mol cm2 2 72E 09 gt PT s OCs NO2 s NO s lt INITIAL gt NO s lt INITIAL gt lt SURFACE gt lt THIRD BODY gt MM 0 4 02 0 4 N2 lt THIRD BODY gt lt SPECIES gt 17 4 APPENDIX lt MECHANISM gt lt GASPHASE gt file detchem noo2m lt GASPHASE gt lt SURFACE name Pt gt file detchem noo2sm lt SURFACE gt lt MECHANISM gt lt SURFACE MODEL gt lt CHEMSURF gt time 100 analytical no write_file yes lt CHEMSURF gt Fcatgeo 1 lt SURFACE MODEL gt lt GASPROBE gt T K 1200 p Pa 100000 lt MOLEFRAC gt NO2 0 1 N 2 lt MOLEFRAC gt lt GASPROBE gt 125 Chapter 18 DUO 18 1 Introduction 18 1 1 Background The code DUO was developed to calculate the chemistry and the mass heat transfer in monolithic reformers The aim is to allow the user to optimise the design and the operating conditions of reformers based on numerical calculations At the entrance of a reformer the flow is distributed to the channels On one hand the flow region upstream of the monolith is often geometrically complex but does not involve complex chemistry Sometimes the flow circulates around the monolith On the other hand th
194. n of axial position Jfuel plt The file fuel plt will be generated for planar cell calculations and contains information related to the species and flow properties in the fuel channel However the user should keep in mind that while calculating polar ization curve for planar cell the file fuel plt will be overwritten for each operating cell potential As in the previous case the name fuel will be appended with the file number specified in the lt OUTPUT gt tag For e g Jfuel0010 plt The file contains variables in the following order e z Axial position m e rho density kg m e u velocity m s e Nre Reynold number 110 CHAPTER 16 DETCHEMS FC 5 1 6 T 14 e o 12 o 1 E g 0 8 gt O 0 6 0 0 01 0 02 0 03 0 04 0 05 Axial position m Figure 16 1 Current density as a function of axial position The inlet fuel consists 66 Hz 10 CH4 20 CO and rest H O Operating cell potential 0 7 V operating temperatyre 800 C e T Temperature e species 1 to K mole or mass fraction The following figure 16 2 depicts an example of species profile within the fuel channel air plt The file air plt will be generated for planar cell calculations and contains information related to the species and flow properties in the air channel However the user should keep in mind that while calculating polarization curve for planar cell the file air plt will be overwritten for each operating cell potential As in t
195. n which computes it automatically is also included This is simply dr 1 a ete 12 6 d u To improve the accuracy mass transfer coefficients are used to approximate the resistance to species mass transport between the mean composition and the composition at the reacting catalyst surface The mass transfer coefficients are defined by the following relationship Sk My hitos Yks Pkm 12 7 75 i CHAPTER 12 DETCHEMPACKEDBED The mass transfer coefficients can be represented in non dimensional form using the species Sherwood numbers Sh ha 12 8 Dim The Sherwood numbers are calculated using standard correlations Since the heat and mass transfer phenomena in reacting flow is still an area of active research the correlation used here represents the best efforts to date Inter phase heat transfer between the solid and the fluid phase inside the reactor leads to difference in tempera ture between the solid and fluid phase Therefore the surface reaction rate has to be evaluated at the prevailing surface temperature of the catalyst The heat transfer inside the reactor reads as follows kg hp Ts Tp gt Sk My 12 9 k l 12 2 Solution In DETCHEMPACKEDBED the standard implicit code LIMEX is used to solve the coupled governing equations DETCHEMP CKEDBED offers various options to solve the problem The temperature solution offers Isothermal Non isothermal Adiabatic and Non adiabatic conditions The species transport c
196. nd reversible reactions respectively 3 7 MECHANISM INPUT 31 Then the rate coefficients need to be declared We assume an Arrhenius type of rate law with a pre exponential factor A a temperature exponent and an activation energy Ea The pre exponential factor and the activation energy can be given in a variety of units The possible options are summarized below A SIunits d pre exponential factor mol m s K A cm_units d pre exponential factor mol cm s K A molefracs d pre expontential factor w r t mole fractions mol m3 s K beta d temperature exponent default 0 Ea J_mol d activation energy J mol Ea kJ_mol d activation energy kJ mol Ea R d activation energy R K cflag s character flag lt COV gt coverage dependency The rate expression for surface reactions can further be modified by coverage dependent factors Such additional factors are defined using the lt COV gt tag the details of which are given later in this chapter The character flag is only used for special applications like sensitivity analysis It will be described in detail where necessary lt TROE gt pressure dependent reactions Pressure dependent gas phase reactions may use Troe parameters The declaration is similar to reactions with Arrhenis parameters lt TROE gt H202 M1 OH OH M1 A_inf cm_units 4e11 Ea_inf kJ_mol 155 A_0 cm_units 4e16 Ea_0 kJ_mol 183 alpha 0 62 T 58 T 2700 T 21700 lt TROE
197. nded they be within an application subdirectory of the users project directory i e HOME OpenFOAM USER 1 7 1 application In the following this folder 17 3 USAGE OF DCAOPENFOAM one file for each transport equation boundary conditions initial values one file for each property boundary conditions initial values one file for each transport equation boundary conditions initial values one file for each property boundary conditions initial values 121 regionProperties 1 region definitions turbulenceProperties g transportProperties thermophysicalProperties chemistryProperties keywordfile gravity options keywordfile keywordfile keywordfile ___ boundary patchfile Objects needed for ___ boundary OpenFOAM with FLUID SOLID patchfile E DUO external coupling controlDict O DUO internal coupling couplingParameters Keywordfile OpenFOAM keywordfile DUO fvSchemes fvSolution numerical schemes numerical parameters fvSchemes fvSolution numerical schemes numerical parameters 4 plug plug inp _ surface mech inp moldata _ thermdata executable keywordfile surface mechanism species data thermo data m DUO external and internal coupling fehannel channel inp gasphase mech inp species inp properties inp executable keywordfile gasphase mechanism species names ke
198. nn constant T temperature The diffusive transport due to a gradient in concentration can be described by the kinetic theory of diluted gases by Chapman and Enskog We define the following reduced quantities e reduced molar mass MM Mj 2 20 M M e reduced diameter 1 oy soi topes 2 21 e reduced potential depth Ej eee 2 22 is a correction factor to account for the interactions between polar index p and non polar particles index n 2 1 Qn Hp Ep n 1 aN 2 23 Sup 4 5 oa En a with a polarizability u dipole moment and permeability constant In all other cases equal unity With these definitions we can express the binary diffusion coefficient as a function of temperature T and pressure p 3 4 2n Nak T M j Dij y 2 24 16 2 OUD png Q T Na Avogadro constant For simplicity most calculations use and averaged diffusion coefficient which can be approximated by Dim ae 2 25 Xi jeS Mi Dy 14 CHAPTER 2 FUNDAMENTALS OF DETCHEM Viscosity The kinetic theory yields a result for the viscosity of a pure species 5 VAM ikpT Na pr 2 26 16 no Ql T Mig E Here an averaged coefficient of viscosity shall be used which can be approximated by 1 X X Xin 2 2 27 ESy ESy 8 g sa re Heat conductivity Heat conduction and viscosity in gases are caused by transfer of energy and momentum respectiv
199. ns This capability is needed if gas phase reactions in flow regions outside of the channels of a monolith e g upstream of a monolith have to be considered Additionally the surface reactions at walls can be calculated Therefore it is also possible to calculate the full three dimensional flow and the chemistry inside the channels of a monolith In this case the flow regions inside the single channels would be included in the CFD grid Both tools DUO and DC4OpenFOAM can be used independently or can be mixed up The approach allows for example the calculation of a reformer in which the combined gas phase and surface chemistry is confined within geometrically simple tubes or channels and additional reactions take place in the gas phase out of the monolith and at the outer surface In figure 18 1 a schematic drawing of a monolith with nine channels located in a surrounding flow field is shown The flow covers the region upstream of the monolith as well as the channels in the monolith Flow over the external surfaces of the catalyst tubes may be used to achieve thermal control For example hot exhaust products from an SOFC tail gas combustor can be used to support endothermic steam reforming Heat transfer occurs inside the fluid and the solid regions as well as at the interfaces between these regions 18 1 4 How DUO and DC40penFOAM work A DUO External Coupling to OpenFOAM As mentioned above the task is to model a reformer based on a monolithi
200. nsfer of connected fluid and solid regions It calls DETCHEMPIVS or DETCHEMCHANNEL as external programs 18 2 2 Code Files The file containing the class definition takes a C extension e g a class nc would be stored in the file nc C As a means of checking errors the piece of code being compiled must know that the classes it uses and the operations they perform actually exist Therefore each class requires a class declaration contained in a header file with a H file extension e g nc H includes the names of the class and its functions This file is included at the beginning of any piece of code using the class including the class declaration code itself Any piece of C code can resource any number of classes and must begin with all the H files required to declare these classes The classes in turn can imply other classes and begin with the relevant H files By searching recursively down the class hierarchy we can produce a complete list of header files for all the classes on which the top level C code ultimately depends these H files are known as the dependencies With a dependency 18 3 USAGE OF DUO 133 list a compiler can check whether the source files have been updated since their last compilation and selectively compile only those that need to be updated Header files are included in the code using include statements e g Hinclude otherHeader H causes the compiler to suspend the
201. of reaction in moles per area are always defined for an ideal flat surface Unless the surface is covered with a thin foil of the catalytic material the boundary between the reactor volume and the surface is rough Often washcoats are used to increase the roughness and therefore to increase the surface area To 3 8 SURFACE MODELS 37 account for this effect DETCHEM uses a factor F eat geo that gives the ratio of the catalytic and the geometric surface area The catalytic area of the reactor can be determined experimentally e g by temperature programmed deso prtion experiments If the number of active moles of catalyst is known then this can be converted into an area using the surface site density I defined in the lt SPECIES gt section The geometric area is the surface area of the reactor with a flat surface i e in case of a cylindrical channel its equals its circumference times the channel length There are three ways defining the ratio e Incase there is only one type of surface it is sufficient to define a constant value Fcatgeo 5 increase catalytic surface area by factor 5 e If you have specified more than one surface type in the lt SPECIES gt section of your input file you can assign an individual ratio of catalytic area to geometric area for each of these surfce types lt Fcatgeo gt surface type dependend Fcat geo Pt 0 75 Rh 0 25 lt Fcatgeo gt e Alternatively the conversion of active moles to Fat geo Ca
202. oichiometric coefficient and reaction order of a species shall be different then specify the species name and its reaction order within the lt ARRHENIUS gt subsection Another way to define a rate law of a global reaction is a user defined rate law This can be declared in the following way lt MECHANISM gt lt GASPHASE gt lt GLOBAL gt 2 NO 02 gt 2 NO2 userID 1 lt GLOBAL gt lt GASPHASE gt lt MECHANISM gt Using user ID an integer number is assinged to the global reaction which identifies the corresponding rate in the source code Then the user needs to provide FORTRAN code for the rate law The interface routines are contained in the DETCHEM distribution in file lib_detchem DCRGU_UserSub f for gas phase mechanisms and lib_detchem DCRSU_UserSub f for surface mechanisms Before running the application the code must be recompiled with your user program code An exaple for user defined gasphase rate law is shown below c e 2 2 22272 27227202 2022022022 22272 2272 2 2772 272 20272 272 2 2502 20220272 272 2 2702 202 20220220202 subroutine DCRGU_Init this subroutine is called once upon initialization of the DETCHEM Library use this subroutine to make your own initialization of variables in the common block declaration e g it is advisable to store species indices by calling the supplied functions of the DETCHEM Library 0000005 34 CHAPTER 3 INPUT FILES include DCRGU_UserData F call DCS_GetIndex 0
203. onal default yes onTLFD yes loptional default yes etal 1 d 3 optional default 1 d 3 eta2 1 d 8 optional default 1 d 8 max bdf order 5 optional default 5 fd order 1 d optional default 1 lt SOLVER gt Usually the default values work fine However in the case of failure of the solver one can try to change the etal and eta2 parameters type double The recommended range of etal would be 1 d 1 1 d 8 the recommended range of eta2 would be 1 d 4 gt 1 d 13 The option relax jac yes no is used for specifing whether the computation of Jacobian by finite difference methods in the BDF code should be relaxed or not By default this option is turned on relax jac yes this would improve performance of the code many times faster The option max bdf order type integer is used for specifing the maximum order of the BDF methods used in the BDF code By default it is set to 5 The valid range of max bdf order would be 1 gt 5 The option fd order type double is used for specifing how the radial grid is generated It specifies how the radial grid points are distributed The higher it is the more the radial grid is fine near the surface The recommended value would be between 1 0 and 3 0 N In the lt TOLERANCE gt tag the user can specify the following name value pairs lt TOLERANCE gt atol 1 d 10 optional absolute tolerance default 1 d 9 rtol 1 d 3 optional relative tolerance default 1 d 3
204. ons prefixed with x and written in batch_x_ plt only gas phase species 4 mass fractions prefixed with y and written in batch_y_ plt only gas phase species 58 CHAPTER 8 DETCHEMPATCH 5 coverages prefixed with cov and written in batch_x_ _plt and batch_y _ plt only surface species The output of the four plt files is controlled via the options mole concetration mole_fraction and mass_ fraction in the lt OUTPUT gt section By default only the batch _n_ plt is written 8 3 3 batch_sens_ txt Absolute sensitivity coefficients eq 8 6 are written to the file batch_sens_abs txt while relative sensitivi ties eq 8 7 are written to batch_sens rel txt Both files have a similar structure The first line contains one of the following three strings identifying the kind of the written sensitivity values e SENS ij d N_i d P_j for absolute sensitivities E j in case d n d Inp j n only in batch sens abs txt e SENS ij d N_1 d InP j for sensitivities Ea 7 in case d n_i d Inp_j y only in batch_sens_abs txt e SENS ij d InN_1 d InP j for relative sensitivities 7 a only in batch _sens_rel txt The variables names for which sensitivity analysis has been done are listed in a lt VARIABLES gt tag Such variables could be not only the species concentrations n but pressure P volume V and temperature T of the reactor as well It is followed by a lt REACTIONS gt tag whe
205. or volume m 3 A m2 d catalytic surface area m 2 time d integration time s ini_surf b cov_relax d calculate equilibrium surface coverages for initialization default no Implemented only with the LIMEX solver under relaxation factor for surface coverages default 1 atol d absolute tolerances for concentrations mol m 3 default 1e 12 rtol d relative tolerances for concentrations default 1e 6 h d initial integration step size s default 1e 10 hmax d maximal integration step size s default not defined the solver deter daesol_ESW d daesol_ETA d mines the step size tolerance needed by the DAESOL solver default 1 0d 02 tolerance needed by the DAESOL solver default 1 0d 11 lt MOLEFRAC gt initial gas phase mole fractions lt MASSFRAC gt initial gas phase mass fractions lt COVERAGE gt initial surface coverages default coverages from lt SPECIES gt section lt V Profile gt user specified time dependent volume profile lt p Profile gt user specified time dependent pressure profile lt T Profile gt user specified time dependent temperature profile lt CONST_QUANTITY gt lt OUTPUT gt lt SENSITIVITY gt section to define isenthalpic or adiabatic conditions output options sensitivity analysis only with the DAESOL solver The tolerances daesol_ESW and daesol_ETA are needed by the the DAESOL solver For simple gas phase problems default values work fine but by stiff gas phase and s
206. oth tags require an arbitrary number of pairs of values in the form position temperature e g lt TPROFILE gt lt DISCRETE gt 0 000 300 z position m temperature K 0 001 400 0 002 450 0 003 500 lt DISCRETE gt lt TPROFILE gt Using lt DISCRETE gt a piecewise constant temperature profile is defined The position indicates the begin of the interval with the specified temperature Define only one pair of values for a constant wall temperature lt LINEAR gt is used to define a piecewise linear temperature profile Specify at least two pairs of values in that case The tag lt ISOTHERM gt is used for multiple runs of DETCHEMCHANNEL under isothermal conditions In that case the wall temperature and the inlet temperature are set to a constant value Also the inlet velocity is being adjusted to the new inlet temperature automatically Specify a temperature for each run e g lt TPROFILE gt lt ISOTHERM gt 300 temperature K 400 500 600 lt ISOTHERM gt lt TPROFILE gt In this example DETCHEMCHANNEL will perform four simulations at temperatures 300 400 500 and 600 K respectively The number of the output file is incremented automatically No temperature profile needs to be defined in case of adiabatic conditions Activate the adiabatic member instead Note adiabatic suppresses heat exchange through the channel wall and therefore should not be used in conjunction with a superordinate simulation like DETCHEMMONO
207. p S I ai with ARG virg 7 1 2 Algorithm Applying the mathematical model we can outline the following algorithm CHAPTER 7 DETCHEM QUIL 7 6 T T 7 8 1 Construct hypothetical reactions preferring those involving species with large amounts 2 Equilibrate all reactions sequentially 3 If amounts of all species have changed less than a given tolerance then finish else go to 1 7 2 User input DETCHEME 2U requires an input file equil inp thermodynamic data in file thermdata and the database for molecular properties moldata For convenience parts of the input file equil inp e g the species list may be saved in a seperate file and included using an include statement 7 2 1 equil inp For running DETCHEM 2U once use an input file like this lt EQUIL gt lt SPECIES gt H2 02 OH H20 H O H202 CH4 CO2 CO N2 lt SPECIES gt lt CONDENSED gt optional list of species in a condensed phase C 2260 species name and its density in kg m3 lt CONDENSED gt T 1000 temperature in K const p T constraints constant pressure amp temperature lt MOLEFRAC gt initial composition CH4 0 15 02 0 15 N2 lt MOLEFRAC gt atol 1 d 20 absoulute tolerances rtol 1 d 6 relative tolerances Ttol 0 1 temperature tolerance lt EQUIL gt Instead of a single temperature the user can also specify a temperature range by replacing the T option with a definition in the following format
208. pecies concentrations n are ex pressed in terms of mole numbers If the reactor temperature as a function of time is not known the user can define an isenthalpic or adiabatic reactor H a 0 inthe isenthalpic case 8 4 0 in the adiabatic case 8 5 The expressions 8 4 and 8 5 provide an additional equation for the reactor temperature DETCHEMPATCH can perform sensitivity analysis for all species with respect to all or reduced number of kinetic parameters Pre exponential factors A Ao and Ao in case of Troe reactions and initial sticking coefficients S are considered parameters in DETCHEM CH Absolute and relative sensitivity values are calculated using the following expressions dn Ej Pi absolute sensitivities 8 6 Pj On Olnn ER PrI i relative sensitivities 8 7 J Ni pj Oln Pj In order to improve the accuracy of the computed relative sensitivities an option for sensitivity analysis with respect to In p is also introduced Inpj _ ni On En e Pip ln pj 8 8 53 54 8 1 2 Solution In DETCHEMP4TCH the standard implicit solvers LIMEX or DAESOL can be used to solve the coupled gov erning equations The temperature solution in batch code offers user defined time dependent thermal conditions CHAPTER 8 DETCHEMPATCH and non isothermal isenthalpic or adiabatic conditions in a batch reactor 8 2 User Input Before running DETCHEM CH the user must prepar
209. pening tag to specify electrochemical properties operating cell potential charge transfer coefficient for the anode charge transfer charge transfer coefficient for the cathode charge transfer fit parameter for H2 oxidation exchange current density fit parameter for 02 reduction exchange current density Pre exponential for H2 oxidation activation energy for H2 oxidation J mol pre exponential for 02 reduction activation energy for 02 reduction J mol closing tag for electrochemical properties general initial conditions initial condition for pressure in the electrode Pa initial temperature K Se FR SR FR FRE Se SR SR OF FR SE FR Fe FR SR OE opening tag to specify the solver set up parameters initial integration time s maximum integration time s initial time step for the solver s tolerance for unknown parameters tolerance for density tolerance for velocity 106 CHAPTER 16 DETCHEMS FC s_Tol 1 0d 04 tolerance for species cdTol 1 0d 05 tolerance for current density lt TOLERANCE gt closing tag for tolerance specification lt SOLVER gt lt OUTPUT gt opening tag to specify output species mole output will be in mole fractions file 20 file number for the output file monitor no monitor option for output y or n lt OUTPUT gt closing tag for output lt SOFC gt The file sofc inp holds all the parameters required to model a button or planar cell configuration The most
210. ples volt 4 We 4 Ge we bag eta it er Boe votes 10 4 2 Setting p a problem teaa 8 304 2 RE en Ba 16 43 Running the tool 2 2 2 0 E he Be RS So as Bee erat ere 17 DC40penFOAM 113 17 1 o A d a eh eee a ee cd we ee E A 113 17 1 1 Modelling of Complex Flow with Detailed Chemistry 113 17 1 2 Simulation Tools DUO and DC4OpenFOAM 113 17 1 3 How DUO and DC40penFOAM work e e 114 17 2 Programming of DC40penFOAM o e 116 17 21 Open FOAM lt p ee dy A a a Pe 116 11 22 CoderBlles ea esa tired a Seale Be A code Peas Bo Ha east 117 17 3 Usage of DC4OpenFOAM 20 0 0 0 00 rennen 117 17 3 1 Installation and Test 4 u sia ae sg ro a Rg Se eel Qe edo 117 173 2 Preprocessing sea bose Sore Se ee ee ee a Se ee ee eee ee 119 17 3 3 Control of DC4OpenFOAM 0 000002 eee ee 123 17 3 4 Start of a Calculation with DC4OpenFOAM 0 2 124 17 3 5 Solution Data from OpenFOAM 0 0 00000004 124 174 APpendix cono amp Jefe A ALR Beek 2 lee OR oe Gale ole wth a Bats 124 17 4 1 Example of an Input File properties inp 0 000000 0 0 0 0 00000 124 18 DUO 127 18 1 Introduction neose ne e Bek A a Scere ae Rees Rn Sea ck a Bacon eer 127 18 1 1 Background 2 3 0 28 4 0 ER a be oe ee 127 18 1 2 Modelling of a Monolithic Reformer Cm nn nn 127 18 1 3 Simulation Tools DUO and DC4OpenFOAM
211. r 1073 u for 10 n p f a z y Note that micrometers are written as um instead of um Usually DETCHEM expects temperatures in Kelvin K Now you can also use Celsius C or Fahrenheit F Note however that the parser does not check if the use of these temperature units is allowed in a specific context When the program expects a temperature difference where you enter 10 C the program will use a step size of 283 15 K Also notice that the use of C and F is not recommended in compound units e g always use J K instead of J C The folowing table lists the known unit symbols Quantity Unit Prefixable None 1 1 10 1 ppm 107 1 ppb 107 24 Quantity Unit CHAPTER 3 INPUT FILES Prefixable Length lm yes 1 Angstrom 107 m 1 in 25 4 mm 1 mil 1 1000 in 1 ft 12 in l yd 3 ft 1 mile 1760 yd 11 1L 1dm yes 1 imp gal 277 42 in 1 imp qt 1 4 imp gal 1 imp pt 1 2 imp qt 1 imp floz 1 20 imp pt 1 USgal 231 in 1 USqt 1 4 USgal 1 USpt 1 2 USqt 1 USfloz 1 16 USpt Time ls yes 1 min 60s 1h 60 min 1d 24h Mass 1 kg yes 1 lb 453 59237 g 1 oz 1 16 lb Temperature 1K 0 C 273 15 K 32 F 0 C 212 F 100 C Quantity 1 mol yes Frequency 1 Hz 1 s7 yes Force 1 N 1 kg ms yes 1 Ibf 4 44822 N 1 Pa 1 N m yes 1 bar 10 Pa yes 1 mmHg 101325 760 Pa 1 psi 1 1bf in Energy 1J 1Nm yes 1 cal 4 1868 J yes Power 1W 1J s yes Electrical
212. r each species moldata This file contains the molar mass and kinetic theory parameters of chemical species gasphase mech inp The gas phase chemistry mechanism file lists the elementary reactions occur ring in the gas phase This file can be give any name and this name should be mentioned in the mech inp file surface mech inp The surface chemistry reaction mechanism file surface mech inp lists the el ementary reactions occurring on the surface This file can be given any name and this name must be mentioned in the mech inp file species inp For any DETCHEM application the user needs to define the species that are to be considered In many cases it is advisable to put the declaration into a separate file e g species inp 18 3 4 Control of DUO As usual OpenFOAM is managed with the parameters in the ASCII file controlDict which can be found in the folder lt caseDir gt system In case of external coupling OpenFOAM calls the executables plug or channel from DETCHEM The coupling between the two codes is managed using the ASCII keyword list coupling Parameters which is located in the same directory Among others two special types of keywords are used dictionaries and lists Special boundary conditions for coupling DUO handles the exchange of data at the inner surface of the channels between the two codes see figure 18 2 In addition to the fluid flow regions the CFD mesh resolves all the solid regions The CFD mesh contains cylind
213. r mass mean outlet molar mass enthalpy at inlet and enthalpy at outlet respectively 9 1 2 Solution In DETCHEMSTR the standard implicit code LIMEX is used to solve the coupled governing equations The temperature solution in cstr code offers isothermal and non isothermal adiabatic conditions in a continuous stirred tank reactor 9 2 User Input Before running DETCHEMSTR the user must prepare an input file cstr inp An example is shown below include species inp include mech inp lt SURFACE MODEL gt lt CHEMSURF gt time 1 suface integration time for steady state lt CHEMSURF gt lt SURFACE MODEL gt lt CSTR gt lt INITIAL gt T 1200 reactor temperature in K lt MOLEFRAC gt 59 60 NO2 0 1 N2 E lt MOLEFRAC gt lt INITIAL gt lt INLET gt T 1200 lt MOLEFRAC gt No2 0 1 N2 lt MOLEFRAC gt Vflux 0 01 lt INLET gt p Pa 100000 time 100 volume 1 surface 1 isothermal n fileNr 1 dt_out 0 05 ini_surf y lt CSTR gt CHAPTER 9 DETCHEMCSTR species name and mole fraction balance mole fraction inlet temperature in K inlet mole fraction inlet flux in m 3 s pressure in Pa integration time reactor volume in m 3 catalytic surface in m 2 isothermal y T const isothermal n solve enthalpy equation number of output file minimum output step size find steady state surface coverages before integration starts The file cstr
214. r the adaptive grid refinement procedure 10 4 User Input Before running DETCHEM S the user must prepare an input file stag inp An example is shown below include species inp include mech inp lt SURFACE MODEL gt lt CHEMSURF gt time 10 lt CHEMSURF gt Fcatgeo 1 lt SURFACE MODEL gt lt STAGNATION gt TIN 3 00E 02 VIN 0 50 XLEN 0 030 p 50000 NGRID 60 TIMES 0 00E 00 TIMEF 1 00E 02 HSTEP 1 00E 12 ATOL 1 00E 06 RTOL 1 00E 03 ASPECT 1 05 TRANSIENTOUT n TCONSTANT n lt MOLEFRAC gt H2 5 00E 02 AR 02 2 00E 02 lt MOLEFRAC gt lt SURFACE gt TSURF 6 00E 02 K ALPHA 1 44E 00 W m K PINIT 2 50E 04 W m2 PLAST 3 00E 04 PINCR 1 00E 03 RFOI 9 00E 03 TRAD 3 00E 02 EPS 2 30E 01 TBACK 3 00E 02 lt SURFACE gt lt STAGNATION gt The file stag inp starts with the species and mechanism definition section that can appear directly in the input file or can be included from external input files In addition the files thermdata and moldata must be located in the executing directory Next the lt SURFACE MODEL gt tag must be included in the input file Please see the surface models section for more detailed information The lt STAGNATION gt tag This is the opening tag for the stagnation input parameters The following pa rameters must be included under this tag If the default values are not given in the parenthesis for the parameters 66 CHAPTER 10 DETCH
215. rated using the do command It can be used in the forms do value from value_to or do value from value_to step_size 3 1 GENERAL STRUCTURE OF INP FILES 23 Here value from value_to and step_size are either constant number expressions or variable names containing numerical values If step_size is omitted a step size of 1 is used Example define Tstep 25 define a variable lt TPROFILE gt do 300 400 Tstep is replaced by 300 325 350 375 400 lt TPROFILE gt The pair commands goto label name and label label_name allows skipping of sections in the input file On encounter of a goto command all following lines will be ignored until the matching label command is found That implies that only forward jumps are possible A simple branching is possible by the command ifdef variable_name label_name This command checks if a variable variable_name is defined without looking at its value If yes goto label_name is executed Otherwise the parser continues at the next available statement 3 1 4 Comments Text in one line preceeded by a or is treated as comment statements in the input file We recommend the use of over the other one 3 1 5 Units In DETCHEM version 2 3 a new feature was added to DETCHEM input files Most physical properties which are usually treated to be given in SI units can automatically be converted by the input file parser from arbitrary units into the required standard unit Where possible a check
216. re the reactions and their corresponing parameters in case d n_i d Inp_j n or the natural logarithm of the parameters in case d n_i d Inp_j y used for the sen sitivity analysis are listed The tag also provides information about the kind of each reaction gas phase or sur face Arrhenius Troe global or reaction with given sticking coefficient The lt SENSITIVITY_VALUES gt tag con tains the sensitivity values E j E orE i el computed during the integration time Files batch_sens_abs txt additionally contain the tag lt SOLUTION_MAX_VALUES gt where maximal values for all variables for the whole in tegration time are stored 8 4 Examples There is one example supplied along with the installation The example directory contains the following files batch inp species inp mech inp a gas phase mechanism noo2m thermdata moldata and a script file go The script file go may be used for convenience to call the executable and run the program It requires a system variable DETCHEM_DIR that contains the path to the DETCHEM root directory Depending on your system you can set this variable by either of these commands export DETCHEM_DIR myDirectory DETCHEM or setenv DETCHEM_DIR myDirectory DETCHEM 8 5 Setting up a problem It is recommended to create new problems in separate directories The directories can be created anywhere the user wishes them to be The created directory which becomes your working directory must contain
217. recursions is allowed verbose yes_or_no switch screen output on or off When activated the parser repeats the lines of the input files while the program reads them This command is especially useful for debugging purposes The user can find out which data was read and where the program has terminated in case an error occurred The parser also provides the possibility to define user variables in the input file Variables can be decalred anywhere in the input file using the command define variable_name value The variable_name can be any combination of letters case sensitive numbers and some special characters e g _ value can also be any expression whout blank characters If the parser later finds the commands get variable name it will be replaced by the content of value Depending on the context where the variable is inserted value can be interpreted as string or numeric value Each variable can only be defined once Attempting to redefine a variable will create an error message For numeric variables the get command can also perform simple arithmetic calculations In this case use it in the form get v1 operator v2 Here v and v2 are either constant number expressions e g 5 1e10 0 003 or variable names containing numerical values The operators can be chosen from and Please note to separate arguments and operator by at least one blank character A series of numeric values e g for temperature inputs can be gene
218. rical cut outs corresponding to the inner walls of the tubes In other words the inner tube walls are these boundaries for the CFD problem where data with DETCHEM is interchanged To handle the data transfer new boundary conditions for OpenFOAM have been defined They can be found in the directory lt appdir gt chtMultiRegionSimpleFoamChemDuo derivedFvPatchFields detchemHeatFluxTemperature Ev ery tube interchange surface has to be defined with the boundary condition name detchemHeatFluxTempe rature in the file lt time gt SOLID T Here an example for the boundary WALL_0101 The values for the parameters K q gradient and value are arbitrary because they are not used WALL_0101 1 type detchemHeatFluxTemperature K K q uniform 0 gradient uniform 0 value uniform 0 140 CHAPTER 18 DUO Dictionaries OpenFOAM uses dictionaries as the most common means of specifying data A dictionary is an entity that contains a set of data entries The keyword entries follow the general format lt keyword gt lt dataEntryl gt lt dataEntryN gt Most entries are single data entries of the form of lt keyword gt lt dataEntry1 gt Most OpenFOAM data files are dictionaries containing a set of keyword entries Dictionaries provide the means for organising entries into logical categories and can be specified hierarchically so that any dictionary can contain one or more subdictionary entries The format for a dictionary is to specify the
219. rol of DUO has to be located in this folder lt time gt These directories contain individual files of data for particular fields The data can be ei ther initial values and boundary conditions that the user must specify to define the problem or results written to file by OpenFOAM Note that the OpenFOAM fields must always be initialised even when the solution does not strictly require it as in steady state problems The name of each time directory is based on the simulated time at which the data is written Since we usually start our simulations at time t 0 the initial conditions are usually stored in a directory named 0 or 0 000000e 00 depending on the name format specified For ex ample the velocity field U and the pressure field p are initialised from files O FLUID U and 0 FLUID p respectively detchem This directory contains all the files necessary for the external coupling of DETCHEM with DUO This includes the executables named plug and or channel as well as all other files re quired for a calculation such as thermodynamic data mechanisms property file and the input files plug inp and or channel inp Also all result files from the DETCHEM calculations can be found in this folder chemkin This directory contains the files necessary for the internal coupling of DETCHEM The code has to know the species names and how many transport equations have to be solved Also the thermophysical data has to be present because the properties heat
220. rter A Numerical Simulation Study SAE paper 2000 01 0211 2000 D K Zerkle M D Allendorf M Wolf O Deutschmann Modeling of On Line Catalyst Addition Effects in a Short Contact Time Reactor Proc Combust Inst 28 2000 1365 1372 D K Zerkle M D Allendorf M Wolf O Deutschmann Understanding Homogeneous and Hetero geneous Contributions to the Platinum Catalyzed Partial Oxidation of Ethane in a Short Contact Time Reactor J Catal 196 2000 18 39 O Deutschmann R Schwiedernoch L I Maier D Chatterjee Natural Gas Conversion in Monolithic Catalysts Interaction of Chemical Reactions and Transport Phenomena Natural Gas Conversion VI Studies in Surface Science and Catalysis 136 E Iglesia J J Spivey T H Fleisch eds p 215 258 Elsevier 2001 J M Redenius L D Schmidt O Deutschmann Millisecond Catalytic Wall Reactors I Radiant Burner AIChE J 47 2001 1177 1184 S Tischer C Correa O Deutschmann Transient three dimensional simulation of a catalytic combustion monolith using detailed models for heterogeneous and homogeneous reactions and transport phenomena Catalysis Today 69 2001 57 62 D Chatterjee O Deutschmann J Warnatz Detailed surface reaction mechanism in a three way catalyst Faraday Discussions 119 2001 371 384 J Braun T Hauber H Tbben J Windmann P Zacke D Chatterjee C Correa O Deutschmann L Maier S Tischer J Warnatz Three Dimensional Simulation of t
221. s As remarked before the shared FORTRAN90 library is called from DUO or the solver chtMultiRegionSimpleFoamChemDuo respectively It is named libDetchemFortran90 PropsAndSources and can be found in the directory lt appDir gt libDetchemFortran90 PropsAndSources so However this library is not called directly from the solver or application chtMultiRegionSimpleFoamChemDuo It is called from an OpenFOAM library which is linked together with the solver as a shared object The OpenFOAM library is named libdetchemFoamModel so and can be found in the directory lt appDir gt detchemFoamModel As the library includes many routines they are not explained in detail here In Principle this library is the gateway to the Fortran library and manages the transport models and thermophysical mod els Both libraries have to be enlistet in the file lt caseDir gt system controlDict This file allows the control of an OpenFOAM calculation In case of internal coupling the following entry has to be added libs C libdetchemFoamModel so libDetchemFortran90 PropsAndSources so 17 3 Usage of DC4OpenFOAM 17 3 1 Installation and Test A Structure of Distribution Figure 17 4 shows the structure of the folders of the distribution of DC4OpenFOAM Figure 17 4 Folder Structure The folders application and run have to be copied to the folder HOME OpenFOAM USER 1 7 1 on your system B Operating System The installation was tested on two di
222. s the user should read the manual of DETCHEMCHANNEL Here only the entries which are essential for the performance of DUO are explained 18 4 APPENDIX 149 In contrast to DETCHEMPTUS we need to define only one section The number of bands or sections where we want to define a temperature is defined in between the keywords lt TPROFILE gt and lt TPROFILE gt It should be recapitulated that the calculations for all coupled tubes or channels take place in the same directory using the same input file channel inp The names of the include files are therefore always con stant But the content of the include files changes for each tube because it is overwritten by DUO for each DETCHEMCHANNEL calculation The included files are linked in the first lines In the file walltemp to DETCHEM the wall temperatures for the bands and the tube identification number can be found Here is an example of the content of the file Define Filenumber 2 Define T1 1050 Define T50 1000 In the file outlet to DETCHEM the inlet conditions for the tubes can be found Here is an example of the content of the file Define Tinlet 836 70239 Define Vinlet 0 54443955 The name lt name of variable gt of each variable T1 T2 Filenumber Vinlet Tinlet is referred to by using the tag get lt name of variable gt in channel inp This means that the value of the variable is inserted here while running DETCHEMCHANNEL Therefore the real content of th
223. s around the whole domain Use a new lt LAYER gt tag for each layer with different material properties The options within this section are thickness d layer thickness m cells i number of cells default 1 name s layer name used as ID The domain and the layers must have different names 8 significant characters because these names are used in the grid declaration of DETCHEM ONOUTH If the following definition is added to the example shown in section 14 2 1 lt LAYER gt name insu cells 2 thickness 0 01 lt LAYER gt the result is z CHAPTER 14 DETCHEMSRIDGEN3D 14 2 5 The lt BORDER gt tag In order to assign a boundary condition to the whole domain including additional layers its border needs an ID that is used in the input file of DETCHEMMONOLITH This ID is declared as shown in the example below lt BORDER gt name bound lt BORDER gt Just assign a string of up to 8 characters to the name member 14 3 Output DETCHEM PGENSD produces two output files r_grid inp and r_grid plt The former contains the grid infor mation to be read by DETCHEMMONOLITR and the latter is a TECPLOT file for visualization of the generated grid 14 3 1 Screen output There is only few screen output when running DETCHEMGRIDGENSD The program informs the user about the current step and eventual errors After successful execution of the program the screen looks like follows Initialize Polygon Triangulate Polygon Initial
224. s recommended they be within a run subdirectory of the users project directory i e HOME OpenFOAM USER 1 7 1 One advantage of this is that the FOAM RUN environment variable is set to HOME OpenFOAM USER 1 7 1 run by default the user can quickly move to that directory by executing a preset alias run at the command line In the following the case folder is called lt caseDir gt As the coupling of the codes in DC4OpenFOAM is controlled via OpenFOAM the appropriate folder structure for a calculation case also has to be applied The basic directory structure for a case whose name is reformer is as follows 122 CHAPTER 17 DCIOPENFOAM e run reformer constant system lt time gt detchem chemkin Directory Content constant This directory contains a full description of the case mesh in a subdirectory polyMesh and files specifying physical properties for the application concerned e g transportProperties system This directory is for setting parameters associated with the solution procedure itself It con tains at least the following files controlDict in which run control parameters are set includ ing start end time time step and parameters for data output fvSchemes in which discretisa tion schemes used in the solution may be selected at run time and fvSolution in which the equation solvers tolerances and other algorithm controls are set for the run Additionally the keyword file couplingParameters for cont
225. s the command prints the capabilities of the makefile script The user can compile single libraries from the different DETCHEM parts maybe if something has to be changed The libraries can also be packed together to the shared library to be used from DUO The user can also compile the stand alone executable duotest to check the functionality of the library All compiled codes can be found in the folder lt appDir gt libDetchemFortran90 PropsAndSources bin The name of the shared library to be used from DUO is libDetchemFortran90 PropsAndSources so The compiled library has to be copied to the standard directory where the libraries for OpenFOAM have to be present This can be done with the command cp libDetchemFortran90 PropsAndSources OpenFOAM USER 1 7 1 lib linux64GccDPOpt Compiling of Solver chtMultiRegionSimple FoamChemDuo The solver chtMultiRegionSimpleFoamChemDuo can be compiled in the directory lt appDir gt chtMulti RegionSimpleFoamChemDuo by typing the command wmake If the code changes it might be helpful to use the commands wmake clean and rmdepall firstly Compiling of Library detchemFoamModel so This library can be compiled in the directory lt appDir gt detchemFoamModel by typing the command wmake If the code changes it might be helpful to use the commands wmake clean and rmdepall firstly D Test of the individual Codes Before testing DUO the user should ensure that the application chtMultiRegionSimpleFoamChemDuo and
226. satisfied 6 For writing out the grid the following parameters have to be used in the appropriate menu Use for the item Output Solver the option Fluent_V6 and for the item Common Structural Solver the option ANSYS Be sure that the grid has the unit m If not scale the grid using a scaling factor in the menu for the output B Grid Check in OpenFOAM To use the grid which was written in format for FLUENT Version 6 the data format has to be transformed the regions have to be split and the mesh has to be checked This can be done with the following steps 1 Generate case folder Generate the folder lt casDir gt system Copy the following files into this folder best from a previous calculation controlDict fvSchemes fvSolution 120 CHAPTER 17 DCIOPENFOAM 2 Transform the mesh Perform the OpenFOAM application fluent3DMeshToFoam grid file name msh case Check care fully the output If the code recognizes the two materials some information should be printed which looks like Zone 32 name INTERFACE_SOLID_FLUID type interface Reading zone data done FINISHED LEXING Creating faceZone 2 name INTERFACE_SOLID_FLUID type interface 3 Split mesh Perform the OpenFOAM application splitMeshRegions cellZones overwrite Check carefully the output If the code handles the two regions rightly some information should be printed which look like this Region Cells 0 729 1 729 Region Zone Name 0 0 FLUID 1 1 SOLI
227. sing DGM Dusty Gas Model The model accounts for three different transport mechanisms molecular diffusion Knudsen diffusion and vis cous transport The total diffusive flux in DGM results from molecular diffusion acting in series with Knudsen diffusion The viscous porous media flow Darcy flow acts in parallel with diffusive flux The DGM can be written as an implicit relationship among molar concentrations fluxes concentration gradients and pressure gradient as XJ X11J J B X 3 X lJk en ee fe el k 16 10 TER Xr Die kn MD kn Eq 16 10 can be inverted to develop a direct formulation of the diffusive molar flux vector J as K K 8 8 DPGM X B Y gt DEM VIX on vp 16 11 El El Lkn H 16 3 User Input Before running DETCHEM the user must prepare an input file sofc inp An example is shown below verbose y include species inp include mech inp lt SURFACE MODEL gt surface chemistry model lt CHEMSURF gt hini 1 0d 10 initial time for chemsurf integration time 10 maximum time for chemsurf integration lt CHEMSURF gt lt SURFACE MODEL gt lt SOFC gt op_pressure 101325 0 surfchem y open_circuit n pot_step 0 04 operating pressure surface reaction y or n open circuit condition y or n potential step for polarization curve lt GEOMETRY model button gt opening tag ot specify the geometry of the cell geometry button planar or tubular nz 20 numb
228. t n relative_sensitivity b output of relative sensitivities output file batch_sens_rel_ plt de fault n d n i d Inp_j b computation of sensitivity values with respect to In p eq 8 8 de fault y threshold_Inp d computation of sensitivity values with respect to In p eq 8 8 only for pj gt threshold_Inp in force only when d n_i d np_j y default 1000 The option complete in the lt SENSITIVITY gt tag determines with respect to which kinetic parameters sensitivity coefficients have to be computed If it is set to yes sensitivities with respect to all reactions will be calculated If complete n only flagged reactions in the mechanism file will be taken into account The flag is the symbol and it has to be put before the first kinetic parameter column 45 In the example below only the pre exponential factor of the first reaction will be included in the sensitivity analysis CH H C H2 1 100E 14 0 0 0 000 3CH2 C C2H H 0 500E 14 0 0 0 000 The way DETCHEMPATCH internally computes the sensitivity values is controlled by the option d n_i d Inp j If it is set to y sensitivities E will be calculated otherwise absolute sensitivities E will be calculated Relative sensitivities E rel are derived from Er 2 by multiplying by n and from E ij by multiplying by n and dividing by p The first way is the more accurate one from numerical point of view Relative sensitivities are more useful than a
229. t guidelines for setting the tolerance 12 3 5 The lt OUTPUT gt tag The lt OUTPUT gt tag contains many options for writing the output file Depending on the options set in the lt OUTPUT gt tag different variables will be writen in the output files 12 4 Output Depending on the options set in the input file pack inp DETCHEMPACKEDBED most important ones being the outg plt and outs plt produces several output files The 12 4 1 Screen output Other than the file output DETCHEMPACKEDBED produces screen output depending on the monitor option specified in the input file With monitor 1 the screen output reports the iteration count and the temperature With monitor 2 it reports the iteration count temperature and the species mass fractions An example is shown below CHAPTER 12 DETCHEMPACKEDBED Fe Fe de de Te Fe de Te Fe Fe de RARA RRA de de Te Fe RRA de de Te Fe RE RR RR Te de de Fe Te RAR RRA RRA Fe de Te de RR RAR Te Fe de Te Fe RRA 3 DETCHEM PACKEDBED kkhk Vinod M Janardhanan Steffen Tischer amp Olaf Deutschmann iik VERSION 2 0 01 01 2004 HRI de Fe Fe Fe Te Fe He Fe de Fe de de Te Fe Fe de Fe Fe Fe He Te Fe Fe He Fe de Fe e Fe Fe ER de Te e de de Te de de Te e Fe He Te de de Te Te de de Te de Fe He Te de de He Fe Te Fe He Te Fe Re He He Te 1 0 00000 500 00000 2 0 00010 506 83525 501 0 05000 1197 60715 Elapsed Execution time 1 71973801 User time 1 71373904 Systemtime 0 00599899981 12
230. t should be as small as possible However by decreasing this parameter the differential equation system becomes more stiff The parameter chemmax defines a maximum number of integration steps for that the chemical source terms are considered This parameter is only useful in applications where DETCHEMCHANNEL ig called automatically multiple times e g in DETCHEMMONOLITH By limiting the number of iterations the user can avoid channel simulations that need too much time to be solved Although the result is incorrect and an error flag is passed the simulation may continue With the bulk member the user can specify a diluting species for that no transport equation will be solved The mass fraction of this species always balances to unity It is recommended that this species is always present e g nitrogen or argon and that this species is the last species in the gas phase list 13 2 4 The lt TOLERANCE gt tag In this optional section the user may define tolerances for the system variables lt MDOT gt mass flux kg s lt PDOT gt momentum flux kg m s 2 lt HDOT gt enthalpy flux J s lt RADIUS gt radial grid m lt TEMPERATURE gt temperature K Each of the subtags may contain the following to parameters atol d absoulte tolerance rtol d relative tolerance In most cases the default values work fine If the simulation is not successful changing these parameters may help 13 2 5 The lt OUTPUT gt tag The options in this se
231. tag must contain one or more lt XDOMAIN gt sections In most cases one such section should be enough However if the grid should be non uniform the use of more than one lt XDOMAIN gt definitions may be useful The lt XDOMAIN gt section can also be used to override the default temperature and catalyst distribution Fcat geo in this section e g lt GRID gt lt XDOMAIN gt from 0 to 0 02 cells 10 aspratio 1 05 non uniform grid at entrance lt XDOMAIN gt lt XDOMAIN gt 15 2 USER INPUT 99 to 0 1 cells 20 T K 500 override temperature from lt SOLUTION gt lt Fcatgeo gt override Fcat geo from lt SURFACE MODEL gt BaC03 20 lt Fcatgeo gt lt XDOMAIN gt lt GRID gt Each domain can be divided into several cells In each cell represents one set of transient concentrations Therefore the number of cells should be chosen accordingly to the expected concentration gradients The user must further make sure that the total length of the discretized grid the to parameter in the last domain equals the length of the channel The members in each lt XDOMAIN gt tag are from d axial coordinate of start of the domain default end of the previous domain to d axial coordinate of end of the domain cells i number of grid cells aspratio d aspect ratio i e ratio of the lengths of two adjacent cells default 1 T K d wall temperature overriding definition from lt SOLUTION gt lt Fcatgeo gt catalyst
232. tance gas 300 00 dat gas 350 00 dat The output files will consist of the following information TIME integration time of the solution R distance from the surface TEMP temperature at the spatial distances from the surface V scaled radial velocity at the spatial distances from the surface RHOVAU the variable pv at the spatial distances from the surface please note that 100 is added as a default value to the variable the actual value is normally 100 of it LAMBDA eigenvalue of the momentum equation which will remain constant at the spatial distances from the surface and mole fractions mole fraction of each gas phase species at the spatial distances from the surface 10 5 3 surf_ dat This file is generated for the normal simulation without washcoat effect and the effectiveness factor approach It is named according to the power input For instance if the user gives zero power input the output file will look like surf_ 0 00dat If a power increase is supplied in the stag inp the program will also give an output for each power increase for instance surf_ 300 00 dat surf 350 00 dat The output files will consist of the following information TIME integration time of the solution TEMP temperature on the catalytic surface surface coverages coverages of the surface species 10 5 4 wcoat_ dat This file is generated for the washcoat and washcoat2 simulations It is named according to the power input as exp
233. te Ma _ le 13 2 ap 2858 13 3 The above listed represent the total continuity axial momentum radial momentum the energy and the species continuity respectively The flux j is calculated by sH or Fs if r Fmin js 4 pD ML if Tein EFG Vax 13 6 F ifr Fmax where z axial coordinate r radial coordinate u axial component of velocity v radial component of velocity p pressure h enthalpy density Y mass fraction of species s X mole fraction of species s u viscosity A sl gt CHAPTER 13 DETCHEMCHANNEL thermal conductivity h species enthalpy w gas phase reaction rate and j the radial diffusion flux 13 1 3 Solution After the radial discretization of the above equations into n cells with boundary coordinates r r one gets a system of first order differential equations in terms of z coordinate The aim is to solve the system by method of lines However the mathematical structure of equation system is not suitable for the used stiff stable integrator LIMEX Therefore some transformation of the system is done A finite volume method is used to solve the system The dependent variables are defined as the index i denotes the number of the cell mass flux 5 m zu r pudr 13 7 ri 1 flux of axial momentum Di an rpu dr 13 8 Ti 1 enthalpy flux H an r puhdr 13 9 Ti 1 and species mass flux Ms an r puY dr 13 10 Fi 1 The system of equa
234. ten in a natural way It is only required to separate species names and operators by at least one blank character Each reaction can contain up to 3 reactants and up to 3 products However stoichiometric coefficients cannot be applied see also input for global reactions further below Use a sign to separate two reactants or two products The gt and symbols are used for a non reversible and reversible reactions respectively A stick reaction must contain exactly one gas phase species on the left hand side of the reaction equation As a reaction parameter only the sticking coefficient S y is required Additional parameters are summarized below S0 d sticking coeflicient beta d temperature exponent default 0 Ea J_mol d activation energy J mol Ea kJ_mol d activation energy kJ mol Ea R d activation energy R K cflag s character flag lt COV gt coverage dependency The rate expression can further be modified by coverage dependent factors Such additional factors are defined using the lt COV gt tag the details of which are given later in this chapter The character flag is only used for special applications like sensitivity analysis It will be described in detail where necessary lt COV gt coverage dependend factors The rate expression of surface reactions can be modified by coverage dependent factors of the form fO ee 8 1 The parameters u and e for a surface species i can be defined using the lt COV gt ta
235. ter reading the instructions in the OpenFOAM manual the user can install and test the system by starting a test case of the standard installation Test of DUO For the test of DUO for a new case a grid for a geometry consisting of a fluid part and a solid part has to be generated All directories and files which are necessary for an OpenFOAM calculation have to be prepared Firstly the application DUO should be tested without any coupling The internal name of the application DUO is chtMultiRegionSimpleFoamChemDuo Each application is designed to be executed from a terminal command line typically reading and writing a set of data files associated with a particular case The command to start the OpenFOAM application in lt caseDir gt is chtMultiRegionSimpleFoamChemDuo case To check the functionality of the application all the requirements for the start of an OpenFOAM run have to be fulfilled For testing the coupling has to be disabled in the file lt caseDir gt couplingParameters coupling off 18 3 3 Preprocessing A Grid Generation in ICEM OpenFOAM is able to use any mesh which was saved in the format needed for the code FLUENT The grid can generated with GAMBIT ICEM or any other software In the actual section some important facts for the grid generation with the software ANSYS ICEM are given 1 Create two bodies named FLUID and SOLID for the two regions which shall be filled with flowing material and solid material Normally
236. thane on Rhodium in a Short Contact Time Reactor Proc Comb Inst 27 1998 2283 2291 L D Schmidt O Deutschmann and C T Goralski Jr Modeling the Partial Oxidation of Methane to Syngas at Millisecond Contact Times Natural Gas Conversion V Studies in Surface Science and Catalysis 119 p 685 692 Elsevier Amsterdam 1998 O Deutschmann and L D Schmidt Modeling the Partial Oxidation of Methane in a Short Contact Time Reactor AICHE J 44 1998 2465 2476 O Deutschmann L D Schmidt J Warnatz Simulation of Reactive Flow in a Partial Oxidation Reactor with Detailed Gas Phase and Surface Chemistry Models In Scientific Computing in Chemical Engi neering II Computational Fluid Dynamics Reaction Engineering and Molecular Properties F Keil W Mackens H Vo J Werther Eds p 368 375 Springer 1999 L L Raja R J Kee O Deutschmann J Warnatz L D Schmidt A Critical Evaluation of Navier Stokes Boundary Layer and Plug Flow Models for the Simulation of Flow and Chemistry in a Catalytic Combustion Honeycomb Channel Catalysis Today 59 2000 47 60 O Deutschmann L Maier U Riedel A H Stroemann R W Dibble Hydrogen Asssisted Catalytic Combustion of Methane on Platinum Catalysis Today 59 2000 141 150 J Braun T Hauber H Tbben P Zacke D Chatterjee O Deutschmann J Warnatz Influence of Physi cal and Chemical Parameters on the Conversion Rate of a Catalytic Conve
237. the body FLUID is inherently present Add all blocks to the appropriate materials 2 Each interface for which an external coupling is wished in DUO has to be in an extra part That means that if a monolith has 100 channels you have to define 100 parts Every interface between fluid and solid for which surface chemistry shall be calculated using the internal coupling has to be in one extra part 3 Convert the mesh to an unstructured mesh using the right mouse click on the entry PreMesh in the task bar 4 Check the mesh carefully inside ICEM No errors should arise 5 On the strength of past experience it might happen that an check in ICEM shows no errors whereas the check in OpenFOAM fails If possible firat load the mesh into FLUENT and perform an additional mesh check If FLUENT accepts the mesh OpenFOAM is also satisfied 6 For writing out the grid the following parameters have to be used in the appropriate menu Use for the item Output Solver the option Fluent_V6 and for the item Common Structural Solver the option ANSYS Be sure that the grid has the unit m If not scale the grid using a scaling factor in the menu for the output 136 CHAPTER 18 DUO B Grid Check in OpenFOAM To use the grid which was written in format for FLUENT Version 6 the data format has to be transformed the regions have to be split and the mesh has to be checked This can be done with the following steps 1 Generate case folder Generate the folder
238. the executable and run the program It requires a system variable DETCHEM_DIR that contains the path to the DETCHEM root directory Depending on your system you can set this variable by either of these commands export DETCHEM_DIR myDirectory DETCHEM or setenv DETCHEM_DIR myDirectory DETCHEM 14 5 Running the tool There are several ways to call the executable e Using the go script from the example directory The user needs to define the system variable DETCHEM_DIR e Add the DETCHEM DIR bin directory to your system path and call gridgen3d e Create a symbolic link to the executable DETCHEM _DIR bin gridgen3d and call gridgen3d The latter option does not require setting of system variables and is therefore less system specific Chapter 15 15 1 Introduction DETCHEMBESERVOIR serves as a transient wrapper for single channel simulations with storage effects It can be used in conjunction with DETCHEMCHANNEL or DETCHEMPLUG Unlike in DETCHEMMONOLITA the wall temperature profile of the channel does not change in time Only the concentrations of selected surface species those of the storage medium are transient For the storage medium we must assume that the rate of reaction is slow enough to be decoupled from the flow field That is the time scale for storage reactions must be larger than the residence time of the gases inside the channel For surface species involved in these reactions DETCHEMRFSERVOR solves the following transi
239. the file chem new Only the parts describing the elements and the species are needed 3 Apply the OpenFOAM application converseChemkinToFoam to transform the files into a format which can be used form OpenFOAM The output will be the two files chemFoam and thermFoam However the user could also generate the files chem inp and therm dat using CHEMKIN files 18 3 USAGE OF DUO 139 Important The user has to guarantee that the count the names and the order of the species in the file lt caseDir gt chemkin chemFoam are the same as in the file lt caseDir gt detchem properties inp The species Na should be the last in each case F Data Input for DETCHEM Before running plug which is the executable of DETCHEMP US the user must prepare an input file plug inp in the folder lt caseDir gt detchem A typical input file plug inp with explanations is shown in the appendix Before running channel which is the executable of DETCHEMCHANNEL the user must prepare an input file channel inp in the folder lt caseDir gt detchem A typical input file channel inp with explanations is shown in the appendix As the input file is the same for all calculated tubes the file contains so called includes These tags allow the substitution of values in the input file with values written into intermediate files by DUO Additionally the following data files are necessary thermdata The thermodynamic database contains enthalpy entropy and heat capacity data fo
240. the properties of the surface are described in terms of a set of surface species Ss Every catalytic material and in fact every surface structure has different catalytic properties Therefore it might be convenient to divide the set S into subsets S j 1 2 e g Ss Sp U Sen On each surface type there is only a limited number of adsorption sites available An adsorption can be viewed as a reaction of a gas phase species with an empty site Thus empty surface sites shall be considered as a species The total number of surface sites is a conserved quantity However some species may occupy more than one site For convenience we can define the surface coverage fraction prt ey 2 38 ry Here o is the number of sites occupied by one particle of the species i and r is the surface site density of the specific surface type For each subset S gt 6 1 2 39 ies must be fulfilled 2 2 Chemical Reactions 2 2 1 General General reaction equation In general a chemical reaction can be written as Y vA z IS 2 40 eS eS where A is a symbol of the i th species v and v are the stoichiometric coefficients of the reactants and products respectively There always exist integer coefficients Their difference shall be denoted by Vi vI vN 2 41 For the set of all reactions we use the symbol R Chemical equilibrium For each reaction there is always a reverse reaction which leads to an equilibriu
241. the second law of thermodymanics it can be written as dS 90 2 12 T The thermodynamic properties of species i is described by a polynomial fit of fourth order to the specific heat at constant pressure 5 Co R 2 an R aji aiT 03 T 04T a5T 2 13 n 1 Once the specific heat is known the other thermodynamic properties can be evaluated in terms of the specific heats The standard state enthalpy is given as T H iR CO T AT 2 14 T and the standard state entropy A sir AT 2 15 2 1 SPECIES 13 and with 7 OK S and H can be written as polynomial fits a azi adj Asi H R a T i ae ES ll agi 2 16 The constant of integration ag is the standard heat of formation at OK This constant can be evaluated from the knowledge of standard heat of formation at 298 K Sr 2 a4 T 4 Asi 3 4 The constant of integration a7 can be evaluated from the standard state entropy at 298 K S R ayjlnT ayT T azi 2 17 Diffusion coefficients The description of the interaction between the particles is based on the model of the Lennard Jones 6 12 potential 2 18 r so eE where o is the diameter of the molecule and the depth of the potential The deviations from the model of solid spheres are expressed in terms of the reduced collision integral T which is only a function of the reduced temperature kgT Te vs 2 19 E kg Boltzma
242. thode channel by specifying the mass or mole fraction of O as 1 in the air channel inlet condi tions In this case the most appropriate initial guess for the cathode species is 100 O In simple terms please do not initialize the cathode with any species other than those specified in the air channel inlet It is quite necessary to have H2O present as one of the species in the initial guess for the anode irrespective of the species present in the fuel inlet condition The code will fail under any circumstances where the initial guess for the anode species do not contain H O lt ELECTROCHEM gt tag It is quite necessary to clearly understand the meaning of various parameters specified in this tag for a physically realistic modeling of the cell The following options are supported in lt ELECTROCHEM gt tag lt ELECTROCHEM gt opening tag to specify electrochemical properties Ecell 0 7 operating cell potential Beta_a 0 5 charge transfer coefficient for the anode charge transfer Beta_c 0 5 charge transfer coefficient for the cathode charge transfer iH2 8 5 fit parameter for H2 oxidation exchange current density 102 2 8 fit parameter for 02 reduction exchange current density kH2 1 5E6 Pre exponential for H2 oxidation EH2 100 activation energy for H2 oxidation J mol k02 1 E6 pre exponential for 02 reduction EO2 200 activation energy for 02 reduction J mol constant current calculation will be done by keeping t
243. tion ends The following columns contain the velocity and species composition in that order If they are constant the column is skipped In lt INLETDATA gt the user also may specify further options between two data lines not before the first data line velocity velocity m s mass or mole fraction mass or mole fractions dtmax d maximum step size use in case step size shall vary with inlet data default difference to next time in list skip failed b skip inlet data in case it produces erroneous results default no lt SURFACE MODEL gt change lt SURFACE MODEL gt options The parameter dtmax may be useful in case of time dependent step size for instance if there is a cycle with a long and slow storage phase and a short and fast regeneration phase The binary option skip failed may be activated in case the simulation is not successful for a few sets of inlet data If activated the inlet data of unsuccessful simulation time steps is skipped The simulation continues with the next time step Although the result is erroneous at this particular time step the simulation may continue instead of abortion due to an error In case of the use of the washcoat effectiveness factor model it may be required to change the effectiveness factor species according to the current inlet data For this purpose the settings of the lt SURFACE MODEL gt section see chapter 3 8 may be altered by the transient inlet file This can be done by including a lt SURF
244. tion m temperature K 83 An example is shown The file channel inp starts with the species and mechanism definition section that can appear directly in the input file or can be included from external input files In addition the files thermdata and moldata must be located in the executing directory Alternatively the pre processed input file detchem inp can be included Next an optional washcoat definition may appear in the input file If washcoat models shall be applied the user must supply this information However by including the washcoat definition the model is not activated automatically Use the washcoat member in the lt SECTION gt tag to activate the model The options within the lt CHANNEL gt tag are as follows s CHAPTER 13 DETCHEMCHANNEL Version s input file version not evaluated name s channel name used in multi channel simulations default none lt BASICS gt basic options must appear as first tag lt SECTION gt channel properties channel may be devided into sections lt SOLVER gt DAE solver parameters lt TOLERANCE gt _ tolerance parameters lt OUTPUT gt output options lt INLET gt inlet specifications lt TPROFILE gt wall temperature profile The optional member name is only required for setting up multi channel simulation with the tool DETCHEMMONOLITH 13 2 1 The lt BASICS gt tag The options within the lt BASICS gt tag are title s title used in TECPLOT output default 7 DETCHEM
245. tions turbulence and heat transfer to solid dynamics and electromagnetics It includes tools for meshing and for pre and post processing Almost everything including meshing as well as pre and post processing runs in parallel by default enabling users to take full advantage of the computer hardware at their disposal By being open source OpenFOAM offers users complete freedom to customise and extend its existing functionality either themselves or through support from OpenCFD Code follows a highly modular design in which collections of functionality e g numerical methods meshing physical models etc are each compiled into their own shared library Then executable applications are created that are simply linked to the library functionality OpenFOAM which includes over 80 solver applications that simulate specific problems in engi neering mechanics and over 170 utility applications that perform pre and post processing tasks e g meshing 17 3 USAGE OF DCAOPENFOAM 117 data visualisation etc For further information concerning the functionality and use of OpenFOAM the user should refer to the manual 17 2 2 Code Files The new code files have to be copied into a new folder HOME OpenFOAM USER 1 7 1 application chtMultiRegionSimpleFoamChemDuo The new solver chtMultiRegionSimpleFoamChemDuo has to be compiled The internal coupling is managed using two libraries The reader should carefully distinguish be tween these two librarie
246. tions are then transformed by using the mass flux instead of radial coordinate as an independent variable This will satisfy equation 1 and the terms containing the radial velocity v vanish Here the boundary layer equations are solved as follows e axial momentum Op du Zuge rrp de an 13 11 Oz or Fi 1 e energy 0H OT y rr up 2ara 13 12 oz r ri e species mass Osi Oe ke i ar Ds 27r j 13 13 Oz Ti 1 where p op is used as abbreviation The radial coordinate as a dependent variable is calculated by an algebraic equation derived from equa tion 7 The temperature T is determined implicitly through the dependence of the enthalpy on temperature and species composition The coefficients u A D are also functions with both dependencies The pressure gradient p must be determined consistently in order to satisfy the boundary conditions that the radius of the outermost cell is fixed to rmax For reasons of numerical stability of the solver LIMEX a differential equation is used which provides a relaxation mechanism to find the correct pressure gradient Op 1 o Pzref 4 h 13 14 Fmax The factor a can be thought of as the relaxation length of the pressure gradient The coupled solution of governing equations in DETCHEMCHANNEL code LIMEX is attained by the standard implicit 13 2 USER INPUT 13 2 User Input Before running DETCHEMCHANNEL the user must prepare an input f
247. tomatically to the folder which is one level higher lt case Dir gt detchem Compiling of Solver chtMultiRegionSimpleFoamChemDuo The solver chtMultiRegionSimpleFoamChemDuo can be compiled in the directory lt appDir gt chtMulti RegionSimpleFoamChemDuo by typing the command wmake If the code changes it might be helpful to use the commands wmake clean and rmdepall firstly D Test of the individual Codes Before testing DUO the user should ensure that the application chtMultiRegionSimpleFoamChemDuo and the executables DETCHEMPFUS and DETCHEMCHANNEL work separately 18 3 USAGE OF DUO 135 Test of DETCHEM LUG DETCHEMP US can be tested in the directory lt caseDir gt detchem by typing the command plug plug is the executable which has to be compiled before running DUO in the directory lt caseDir gt detchem code Running the code alone without coupling by using an input file plug inp using all keywords tags and includes necessary for a normal calculation allows to test the functionality Test of DETCHEMCHANNEL DETCHEMCHANNEL can be tested in the directory lt caseDir gt detchem by typing the command channel channel is the executable which has to be compiled before running DUO in the directory lt caseDir gt detchem code Running the code alone without coupling by using an input file channel inp using all key words tags and includes necessary for a normal calculation allows to test the functionality Test of OpenFOAM Af
248. tory contains the following files channel inp species inp mech inp a gas phase mechanism file a surface mechanism file thermdata and moldata The optional washcoat input has been saved in a separate file washcoat inp The script file go may be used for convenience to call the executable and run the program It requires a system variable DETCHEM_DIR that contains the path to the DETCHEM root directory Depending on your system you can set this variable by either of these commands export DETCHEM_DIR myDirectory DETCHEM or setenv DETCHEM_DIR myDirectory DETCHEM 13 5 Setting up a problem It is recommended to create new problems in separate directories The directories can be created anywhere the user wishes them to be The created directory which becomes your working directory must contain all the input files mentioned in the above section The user can copy these files from the example directory to the working directory and make necessary changes When setting up a new case we also suggest to start as simple as possible and to become more complex gradually Check if the geometry settings and wall temperature profile does not contain errors by running simulations without chemistry first Then add surface and gas phase mechanisms one after another Always check for error messages and watch the solution process to detect convergence problems In case of problems adjusting the solver and tolerance parameters may improve the performance
249. tructures with internal chemistry are utilised DUO accomplishes two additional functions First the algorithm must interpolate between the three dimensional mesh that is used by OpenFOAM and the one dimensional band mesh used by DETCHEM Sec ond DUO has to coordinate the iteration strategy between the outer CFD and the catalytic chemistry inside the tubes In addition to the fluid flow regions the CFD mesh resolves all the solid regions The CFD mesh contains cylindrical cut outs corresponding to the inner walls of the tubes In other words the inner tube walls are seen as boundaries for the CFD problem The cylindrical CFD face mesh on the inside of each tube wall is sectioned into a user specified number of bands The band spacing one dimensional mesh is established to resolve gradients that characterize the interior catalytic chemistry problem In the following discussion grid refers to 130 CHAPTER 18 DUO Fluid and solid QUE OpenFOAM ma la ASCII file Data exchange for whole inner surface of a tube y ASCII file Figure 18 2 External Coupling between DETCHEM and OpenFOAM the one dimensional band discretization and mesh refers to the collection of faces in the CFD discretization of the tube wall An integer band number is identified as the linearly increasing cell index for the grid with the first band in the first grid cell being located at the tube inlet DUO then loops over all mesh faces on a cylindric
250. uid and solid i 3D Sim OpenFOAM ASCII file Data exchange for whole __ inner surface of a tube ASCII file Figure 17 2 External Coupling between DETCHEM and OpenFOAM makes the calculation fast DUO handles the exchange of data at the inner surface of the channels between the two codes see figure 17 2 B DC40penFOAM Internal Coupling to OpenFOAM In the standard form OpenFOAM calculates the temperature dependent properties only via the Sutherland law Tf the user wants to calculate a monolith with flow regions upstream or around a monolith it might be insufficient to use this rough approach Additionally chemical reactions may be of interest in these flow regions There are solvers in OpenFOAM which can handle gas phase reactions But until now there is no capability to handle surface reactions Within DC40penFOAM the calculation of properties and gas phase source terms is managed using a precompiled shared library which was made out of several parts of the DETCHEM toolbox Figure 17 3 shows the principal structure of the Internal Coupling DC40penFOAM is a FORTRANDO library which was made out of several parts of the DETCHEM software package It implies the tools DETCHEMSASPROBE and DETCHEMSURFPROBE as well as the basic DETCHEM libraries At startup the library reads in e the thermodynamic database e the kinetic theory parameters e the gas phase chemistry mechanism e the surface chemistry reaction mechanism The library ca
251. undamentals of DETCHEM The core of all DETCHEM applications is a library of routines that is called to calculate species data and chemical source terms The species properties include thermodynamic and transport parameters Whereas for the chemistry reaction schemes based on elementary and global reaction mechanism are used 2 1 Species 2 1 1 General The smallest model level is an entity called species A species represents identical oder similar objects mole cules adsobats etc of a system in the thermodynamic limit Microscopic properties of single particles are considered only indirectly in the derivation of transport coefficients The fundamental property of a species is its concentration c Furthermore if the species is formed by real particles a molar mass M can also be defined The set of all Species is called a thermodynamic system S Depending on the kind of interactions among the species it is convenient to consider various subsets of the system 2 1 2 Gas phase species The gas phase S is formed by the gas phase species atomic gases molecules radicals etc The particles consist of one or more atoms Their number composition electronic state etc are characteristics for each species For the composition of the gas we shall consider the following physical properties total concentration Croat Ye 2 1 ESg and mean molar mass Dies Mi M 2 2 Ctotal Instead of looking at the composition of a
252. ure is as follows e lt appDir gt chtMultiRegionSimpleFoamChemDuo Make fluid solid derivedFvPatchFields The class and header files of the application DUO which are responsible for solving and external coupling are directly located in the folder dirchtMultiRegionSimpleFoamChemDuo The code files for the handling of the wall patches are located in the subdirectory dirderivedFvPatchFields Directories and files for the calculation A calculation with OpenFOAM including all files is called a case Normally a user would assign a name to a calculation case e g reformer This name becomes the name of a directory in which all the case files and subdirectories are stored The case directories themselves can be located anywhere but it is recommended they be within a run subdirectory of the users project directory i e HOME OpenFOAM USER 1 7 1 One advantage of this is that the FOAM_RUN environment variable is set to HOME OpenFOAM USER 1 7 1 run by default the user can quickly move to that directory by executing a preset alias run at the command line 138 CHAPTER 18 DUO In the following the case folder is called lt caseDir gt As the coupling of the codes in DUO is controlled via OpenFOAM the appropriate folder structure for a calculation case also has to be applied The basic directory structure for a case whose name is reformer is as follows e run reformer constant system lt time gt detchem
253. urface systems convergence difficulties may oc cur In case of divergence or slow convergence following values are recommended daesol_ESW in the range 1E 2 1E 7 and daesol_ETA in the range 1E 10 1E 14 The options within the lt OUTPUT gt tag are mole b concentration b output in terms of moles output file batch_n_ plt default y output in terms of concentrations output file batch_c_ plt default n output in terms of mole fractions for gas phase species and of coverages for surface species output file batch_x_ plt default n output in terms of mass fractions for gas phase species and of coverages for surface species output file batch y_ plt default n mole fraction b mass fraction b fileNr i output file number default 1 dt_out d minimum step size for output s default none solution is written at every step monitor i 0 no time output on the screen 1 time output on the screen default 0 The options within the lt CONST_QUANTITY gt tag are T K d initial temperature K const_quantity surf thermdata b H for isenthalpic problems Q for adiabatic problems default H thermodynamic data for the surface species default n 8 3 OUTPUT 57 The options within the lt SENSITIVITY gt tag are complete b Sensitivity analysis with respect to all kinetic parameters default n absolute sensitivity b output of absolute sensitivities output file batch_sens_abs_ plt de faul
254. ws A Erd f le gr 2 71 ieS Here uig and are additional model parameters A more convenient way to describe adsorption reactions is given in terms of sticking coefficients S They basically quantify a probability 0 lt S 0 lt 1 that a particle hitting the surface is adsorbed First of all the probability depends on the existence of suitable adsorption sites Furthermore lateral interactions with other adsorbed species may have an influence Therefore one can define a local adsorption probability by ef _ 0 Y jk H jk aot s 119 2 72 JE S The reaction rate can be computed using the kinetic theory of gases by RT A gef 2 73 Sj i i 21M 7 The latter equation assumes a Boltzmann distribution of molecular velocities near the surface However Motz and Wise showed that this assumption is not fulfilled for sticking probabilities close to unity In this case the effiective sticking coefficient should be corrected by sot SMY 2 74 1 ceff 1 35 2 3 MODELING OF TRANSPORT AND SURFACE REACTIONS IN WASHCOATS 19 2 3 Modeling of transport and surface reactions in washcoats This section describes the washcoat models of DETCHEM to take into account the pore diffusion within a porous washcaot DETCHEM provides two washcoat models A simple model which is based on the concept of effectiveness factors and a detailed approach which is based on solving reaction diffusion equations within the was
255. y and the equation of state respectively In addition to these equation since the residence time of gas is often a quantity of interest a differential equation which computes it automatically is also included This is simply dr 1 AS 11 5 d u eh To improve the accuracy mass transfer coefficients can be used additionally They approximate the resistance to species mass transport between the mean composition and the composition at the reacting channel surface The mass transfer coefficients are defined by the following relationship Sk M hk PsYk s Pkm 11 6 where hz is the mass transfer coefficient which can be represented in non dimensional form using the species Sherwood numbers Sh pd 11 7 Dim The Sherwood numbers are calculated locally using standard correlations Since the heat and mass transfer phenomena in reacting flow is still an area of active research the correlation used here represents the best efforts to date 69 70 CHAPTER 11 DETCHEMPLUG 11 1 2 Mass and Heat transfer coefficients For the case of constant wall temperature the Nussult number is defined as 1000 y 0 545 48 2 Nur 3 657 88217 ex 11 8 Gz Gz for the case of constant heat flux 1 0 524 2 Nuy 4 364 5125 ep E gt 11 9 Z Where Gz is the Graetz number for heat transfer In the case of mass transfer the Sherwood numbers are ex pressed by the same equation with the Gz replaced by the Greatz number for mass transf
256. y the pre processed input file detchem inp can be included The options within the lt SURFPROBE gt tag are as follows Fcat geo d ratio catalytic geometric surface area T K d temperature K p Pa d pressure Pa lt GASPHASE gt gas phase composition lt SURFACE gt surface coverages default initial coverages from species definition In the lt MASSFRAC gt or lt MOLEFRAC gt subsection one species can be assigned a instead of a numerical value The mass or mole fraction of this species will be balanced to unity respectively 6 3 Output DETCHEM URFPROBE produces only screen output The output contains information on operating conditions mass and mole fractions concentrations chemical source terms coverages and surface fluxes It can easily be 45 ds CHAPTER 6 DETCHEMSURFPROBE inferred from the output whether the surface mechanism reaches a steady state in the specified integration time Fe de de de Fe Fe Fe Te Fe Fe de RARE RR RR RRA RR RARE Fe Fe Fe Fe de Fe de Te Fe RE RARA RR RR RR Fe Fe Fe RAR Fe Fe Te Fe RR te sie DETCHEM SURFPROBE ware ERE Vinod M Janardhanan Steffen Tischer amp Olaf Deutschmann MERE ARA VERSION 2 0 2004 06 22 b id Fe de de de Te Fe Fe Fe Fe Fe de de Fe Fe Fe Fe Fe Fe de de Fe Fe Te Fe RARE Fe Fe de Fe Fe Fe e de Fe Fe Te Fe Te Fe de Te Fe Fe Te Fe Te Fe Fe Fe Fe Fe Te Fe Fe Te Fe Te Fe Fe Te Fe Fe de Fe Te Fe KEE Initial Values Time of integration s 0 Cat Geom Surf Area E
257. ywordfile ll thermFoam chemFoam thermo data species names Figure 17 5 Folder structure of a calculation case is called lt appDir gt OpenFOAM applications are organised using a standard convention according to which the source code of each application is placed in a directory whose name is that of the application The top level source file takes the application name with the C extension The application name is chtMultiRegionSim pleFoamChemDuo Therefore the folder where the application is located has the same name The directory structure is as follows e lt appDir gt chtMultiRegionSimpleFoamChemDuo Make fluid solid derivedFvPatchFields The class and header files of the application DC4OpenFOAM which are responsible for solving and external coupling are directly located in the folder chtMultiRegionSimpleFoamChemDuo The code files for the handling of the wall patches are located in the subdirectory derivedFvPatchFields The C library which manages the external coupling to the Fortran90 library can be found in the directory lt appDir gt detchemFoamModel Directories and files for the calculation A calculation with OpenFOAM including all files is called a case Normally a user would assign a name to a calculation case e g reformer This name becomes the name of a directory in which all the case files and subdirectories are stored The case directories themselves can be located anywhere but it i
Download Pdf Manuals
Related Search
Related Contents
MAXnet - Pro-Dex Philips widescreen flat TV 32PF3302 ZDC ZA-5000 User`s Manual V2.0.3 Manuel d`utilisation Deutsch - M&C TechGroup Séquence 10 Operation Manual 2010 OPERATING INSTRUCTIONS (Continued) Honeywell T7200 User's Manual Janvier - ville Copyright © All rights reserved.
Failed to retrieve file