-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPSmb.m
113 lines (65 loc) · 2.42 KB
/
PSmb.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright Xin-Guang Zhu, Yu Wang, Donald R. ORT and Stephen P. LONG
%CAS-MPG Partner Institute for Computational Biology, Shanghai Institutes for Biological Sciences, CAS, Shanghai,200031
%China Institute of Genomic Biology and Department of Plant Biology, Shanghai Institutes for Biological Sciences, CAS, Shanghai,200031
%University of Illinois at Urbana Champaign
%Global Change and Photosynthesis Research Unit, USDA/ARS, 1406 Institute of Genomic Biology, Urbana, IL 61801, USA.
% This file is part of e-photosynthesis.
% e-photosynthesis is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation;
% e-photosynthesis is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
% You should have received a copy of the GNU General Public License (GPL)
% along with this program. If not, see <http://www.gnu.org/licenses/>.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function PSdydt = PSmb(t,PSs, Param)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Modifying KM, KI, KE VMAX for different reactions as the regulation%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Regulations first.
fini = Condition (t);
% Get the rate for the reactions in the photosynthesis sytem
PSr = PSRate(t,PSs,Param);
% Get the rate
v1 = PSr(1) ;
v2 = PSr(2) ;
v3 = PSr(3) ;
NONE= PSr(4) ;
v5 = PSr(5) ;
v6 = PSr(6) ;
v7 = PSr(7) ;
v8 = PSr(8) ;
v9 = PSr(9) ;
v10 = PSr(10) ;
v13 = PSr(11) ;
v16 = PSr(12) ;
v23 = PSr(13) ;
v31 = PSr(14) ;
v32 = PSr(15) ;
v33 = PSr(16) ;
v24 = PSr ( 17);
v25 = PSr (18);
% Implement the mass balance equations
tmp = zeros(15,1);
tmp(1) = v13-v1;
tmp(2) = 2*v1-v2-v32;
tmp(3) = v2-v3;
tmp(4) = v3 - 2 * v5 - v7 - v8 - v10 - v31 - v33;
tmp(5) = v23 - v24;
tmp(6) = v5-v6;
tmp(7) = v7-v8;
tmp(8) = v9-v10;
tmp(9) = v8 - v9;
tmp(10) = v16 - v2 - v23 - v13 - v25;
global PS2EPS_NADPH;
global PS_C_CN;
tmp(11) = 0;
tmp(12) = 0;
tmp(13) = 0;
tmp(14) = v6 - v7 - v23 + v25;
tmp(15) = v7 + v10 * 2 - v13;
PSdydt = zeros(15,1);
PSdydt = tmp;