source: palm/trunk/UTIL/chemistry/gasphase_preproc/kpp/util/UserRateLaws.m @ 2825

Last change on this file since 2825 was 2696, checked in by kanani, 7 years ago

Merge of branch palm4u into trunk

File size: 1.3 KB
Line 
1%  User-defined Rate Law functions
2%  Note: insert this file at the end of Update_RCONST
3
4%---  Arrhenius
5   function [rate] =  ARR( A0,B0,C0 )
6      global TEMP CFACTOR
7      rate =  (A0) * exp(-(B0)/TEMP) * (TEMP/300.0)^(C0) ;           
8   return %  ARR       
9
10%--- Simplified Arrhenius, with two arguments
11%--- Note: The argument B0 has a changed sign when compared to ARR
12   function [rate] =  ARR2( A0,B0 )
13      global TEMP CFACTOR
14      rate =  (A0) * exp( (B0)/TEMP ) ;             
15   return %  ARR2         
16
17   function [rate] =  EP2(A0,C0,A2,C2,A3,C3)
18      global TEMP CFACTOR                       
19      K0 = (A0) * exp(-C0/TEMP);
20      K2 = (A2) * exp(-C2/TEMP);
21      K3 = (A3) * exp(-C3/TEMP);
22      K3 = K3*CFACTOR*1.0e+6;
23      rate = K0 + K3/(1.0+K3/K2) ;       
24   return %  EP2
25
26   function [rate] =  EP3(A1,C1,A2,C2)
27      global TEMP CFACTOR               
28      K1 = (A1) * exp(-(C1)/TEMP);
29      K2 = (A2) * exp(-(C2)/TEMP);
30      rate = K1 + K2*(1.0e+6*CFACTOR);     
31   return %  EP3
32
33   function [rate] =  FALL ( A0,B0,C0,A1,B1,C1,CF)
34      global TEMP CFACTOR                     
35      K0 = A0 * exp(-B0/TEMP)* (TEMP/300.0)^(C0);
36      K1 = A1 * exp(-B1/TEMP)* (TEMP/300.0)^(C1);
37      K0 = K0*CFACTOR*1.0e+6;
38      K1 = K0/K1;
39      rate = (K0/(1.0+K1))*(CF)^(1.0/(1.0+(log(K1))^2));       
40   return %  FALL
41
Note: See TracBrowser for help on using the repository browser.