DianaOptimization: twophase_cstr.mdl

File twophase_cstr.mdl, 2.2 KB (added by danker, 15 years ago)
Line 
1(define-module :class "cstr"
2  :super-classes ("module")
3  :documentation
4  "CSTR model used by Schaffner and Zeitz"
5  ;;================================================================
6  :variables
7  (
8   ("a1"
9    :system-theoretic "real-parameter"
10    :value "0.2674"
11    :unit "1/min"
12    )
13   ;;
14   ("a2"
15    :system-theoretic "real-parameter"
16    :value "1.815"
17    :unit "1/min"
18    )
19   ;;
20   ("b1"
21    :system-theoretic "real-parameter"
22    :value "1.05e+14"
23    :unit "1/min"
24    )
25   ;;
26   ("b2"
27    :system-theoretic "real-parameter"
28    :value "4.92e+13"
29    :unit "1/min"
30    )
31   ;;
32   ("g"
33    :system-theoretic "real-parameter"
34    :value "1.5476"
35    :unit "1/min"
36    )
37   ;;
38   ("u"
39    :system-theoretic "real-parameter"
40    :value "-0.002"
41    :unit "1"
42    )
43   ;;
44   ("E"
45    :system-theoretic "real-parameter"
46    :value "34.2583"
47    :unit "1"
48    )
49   ;;
50   ("x2boil"
51    :system-theoretic "real-parameter"
52    :value "0.06"
53   )
54   ;;
55   ("x1"
56    :system-theoretic "state"
57    :report "lumped"
58    :value "0.670598"
59    )
60   ;;
61   ("x2"
62    :system-theoretic "state"
63    :report "lumped"
64    :value "0.415042e-01"
65    )
66   ;;
67   ("Q"
68    :system-theoretic "state"
69    :report "lumped"
70    :value "0.0"
71    )
72   ;;
73   ("rreac"
74    :system-theoretic "help"
75    :value "(1-x1)*:exp(-E/(1+x2))"
76    )
77   ;;
78   );;end-of-variables
79  ;;==================================================================
80  :places
81  (
82   ("onephase"
83    :initial-mark "yes"
84   )
85   ("boiling")
86  )
87  :transitions
88  (
89   ("toboiling"
90    :system-theoretic "implicit"
91    :phi-function "x2boil - x2"
92    :from ("onephase")
93    :to   ("boiling")
94    :direction "unidirectional"
95   )
96   ;;
97   ("toonephase"
98    :system-theoretic "implicit"
99    :phi-function "Q"
100    :from ("boiling")
101    :to   ("onephase")
102    :direction "unidirectional"
103   )
104  )
105  ;;==================================================================
106  :equations
107  (
108   ("eq_x1"
109    :relation
110    ":diff<t>  x1 == -a1*x1 + b1*rreac"
111    )
112   ;;
113   ("eq_x2"
114    :relation
115    ":diff<t> x2 == :cond( onephase, -a2*x2 + b2*rreac +g*u, 0.0 )"
116    )
117   ;;
118   ("eq_Q"
119    :relation
120    "0.0 == :cond( onephase, Q, -a2*x2 + b2*rreac +g*u - Q)"
121   )
122   );;end-of-equations
123);;end-of-define-module