1 | C User-defined Rate Law functions |
---|
2 | C Note: the default argument type for rate laws, as read from the equations file, is single precision |
---|
3 | C but all the internal calculations are performed in REAL*8 |
---|
4 | |
---|
5 | C Arrhenius |
---|
6 | KPP_REAL FUNCTION ARR( A0,B0,C0 ) |
---|
7 | INCLUDE 'KPP_ROOT_Parameters.h' |
---|
8 | INCLUDE 'KPP_ROOT_Global.h' |
---|
9 | |
---|
10 | REAL A0,B0,C0 |
---|
11 | ARR = DBLE(A0) * EXP(-DBLE(B0)/TEMP) * (TEMP/300.0D0)**DBLE(C0) |
---|
12 | |
---|
13 | RETURN |
---|
14 | END |
---|
15 | |
---|
16 | |
---|
17 | C Simplified Arrhenius, with two arguments |
---|
18 | C Note: The argument B0 has a changed sign when compared to ARR |
---|
19 | KPP_REAL FUNCTION ARR2( A0,B0 ) |
---|
20 | INCLUDE 'KPP_ROOT_Parameters.h' |
---|
21 | INCLUDE 'KPP_ROOT_Global.h' |
---|
22 | |
---|
23 | REAL A0,B0 |
---|
24 | ARR2 = DBLE(A0) * EXP( DBLE(B0)/TEMP ) |
---|
25 | |
---|
26 | RETURN |
---|
27 | END |
---|
28 | |
---|
29 | KPP_REAL FUNCTION EP2(A0,C0,A2,C2,A3,C3) |
---|
30 | INCLUDE 'KPP_ROOT_Parameters.h' |
---|
31 | INCLUDE 'KPP_ROOT_Global.h' |
---|
32 | |
---|
33 | REAL A0,C0,A2,C2,A3,C3 |
---|
34 | REAL*8 K0,K2,K3 |
---|
35 | |
---|
36 | K0 = DBLE(A0) * EXP(-DBLE(C0)/TEMP) |
---|
37 | K2 = DBLE(A2) * EXP(-DBLE(C2)/TEMP) |
---|
38 | K3 = DBLE(A3) * EXP(-DBLE(C3)/TEMP) |
---|
39 | K3 = K3*CFACTOR*1.0d6 |
---|
40 | EP2 = K0 + K3/(1.0d0+K3/K2 ) |
---|
41 | |
---|
42 | RETURN |
---|
43 | END |
---|
44 | |
---|
45 | |
---|
46 | KPP_REAL FUNCTION EP3(A1,C1,A2,C2) |
---|
47 | INCLUDE 'KPP_ROOT_Parameters.h' |
---|
48 | INCLUDE 'KPP_ROOT_Global.h' |
---|
49 | |
---|
50 | REAL A1, C1, A2, C2 |
---|
51 | REAL*8 K1, K2 |
---|
52 | |
---|
53 | K1 = DBLE(A1) * EXP(-DBLE(C1)/TEMP) |
---|
54 | K2 = DBLE(A2) * EXP(-DBLE(C2)/TEMP) |
---|
55 | EP3 = K1 + K2*(1.0d6*CFACTOR) |
---|
56 | |
---|
57 | RETURN |
---|
58 | END |
---|
59 | |
---|
60 | |
---|
61 | KPP_REAL FUNCTION FALL ( A0,B0,C0,A1,B1,C1,CF) |
---|
62 | INCLUDE 'KPP_ROOT_Parameters.h' |
---|
63 | INCLUDE 'KPP_ROOT_Global.h' |
---|
64 | |
---|
65 | REAL A0,B0,C0,A1,B1,C1,CF |
---|
66 | REAL*8 K0, K1 |
---|
67 | |
---|
68 | K0 = DBLE(A0) * EXP(-DBLE(B0)/TEMP)* (TEMP/300.0D0)**DBLE(C0) |
---|
69 | K1 = DBLE(A1) * EXP(-DBLE(B1)/TEMP)* (TEMP/300.0D0)**DBLE(C1) |
---|
70 | K0 = K0*CFACTOR*1.0D6 |
---|
71 | K1 = K0/K1 |
---|
72 | FALL = (K0/(1.0d0+K1))* |
---|
73 | * DBLE(CF)**(1.0d0/(1.0d0+(DLOG10(K1))**2)) |
---|
74 | |
---|
75 | RETURN |
---|
76 | END |
---|