-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathsyseqs.c
88 lines (55 loc) · 2.16 KB
/
syseqs.c
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
sunrealtype Influent_1_mo_comp[14];
sunrealtype Pipe_1_in_comp[14], Pipe_1_mo_comp[14];
// unit Pipe_2 with incomplete connection here;
sunrealtype ASMReactor_1_in_comp[14], ASMReactor_1_mo_comp[14];
sunrealtype FinalClarifier_1_in_comp[14], FinalClarifier_1_mo_comp[14], FinalClarifier_1_so_comp[14];
sunrealtype WAS_1_in_comp[14];
sunrealtype Splitter_1_in_comp[14], Splitter_1_mo_comp[14], Splitter_1_so_comp[14];
sunrealtype Effluent_1_in_comp[14];
sunindextype i;
for(i=0; i<14; i++)
Influent_1_mo_comp[i] = Ith(y, 0+i+1);
for(i=0; i<14; i++)
Pipe_1_in_comp[i] = Ith(y, 14+i+1);
for(i=0; i<14; i++)
Pipe_1_mo_comp[i] = Ith(y, 28+i+1);
for(i=0; i<14; i++)
ASMReactor_1_in_comp[i] = Ith(y, 42+i+1);
for(i=0; i<14; i++)
ASMReactor_1_mo_comp[i] = Ith(y, 56+i+1);
for(i=0; i<14; i++)
FinalClarifier_1_in_comp[i] = Ith(y, 70+i+1);
for(i=0; i<14; i++)
FinalClarifier_1_mo_comp[i] = Ith(y, 84+i+1);
for(i=0; i<14; i++)
FinalClarifier_1_so_comp[i] = Ith(y, 98+i+1);
for(i=0; i<14; i++)
WAS_1_in_comp[i] = Ith(y, 112+i+1);
for(i=0; i<14; i++)
Splitter_1_in_comp[i] = Ith(y, 126+i+1);
for(i=0; i<14; i++)
Splitter_1_mo_comp[i] = Ith(y, 140+i+1);
for(i=0; i<14; i++)
Splitter_1_so_comp[i] = Ith(y, 154+i+1);
for(i=0; i<14; i++)
Effluent_1_in_comp[i] = Ith(y, 168+i+1);
LHS[0] = Pipe_1_in_comp[0] - Influent_1_mo_comp[0]
LHS[1] = Pipe_1_in_comp[0] - Pipe_1_mo_comp[0]
for(i=1; i<14; i++)
LHS[1+i] = Pipe_1_in_comp[i] - Influent_1_mo_comp[i];
for (i=1; i<14; i++)
LHS[14+i] = Pipe_1_in_comp[i] - Pipe_1_mo_comp[i]
LHS[28] = Pipe_2_in_comp[0] - ERROR!
LHS[29] = Pipe_2_in_comp[0] - Pipe_2_mo_comp[0]
// ERROR in Pipe_2's inlet connection.
for (i=1; i<14; i++)
LHS[29+i] = Pipe_2_in_comp[i] - Pipe_2_mo_comp[i]
LHS[43] = Splitter_1_in_comp[0] - FinalClarifier_1_so_comp[0]
LHS[44] = Splitter_1_in_comp[0] - Splitter_1_mo_comp[0] - Splitter_1_so_comp[0]
LHS[45] = Splitter_1_so_comp[0] - 400.1
for(i=1; i<14; i++)
LHS[45+i] = Splitter_1_in_comp[i] - FinalClarifier_1_so_comp[i];
for (i=1; i<14; i++)
LHS[58+i] = Splitter_1_in_comp[i] - Splitter_1_mo_comp[i]
for (i=1; i<14; i++)
LHS[71+i] = Splitter_1_in_comp[i] - Splitter_1_so_comp[i]