DianaICSolver: AdsColumn.mdl

File AdsColumn.mdl, 6.1 KB (added by miroshkin, 14 years ago)

Adsorption column model

Line 
1(define-module :class "AdsColumn"
2  :super-classes ("module")
3  :documentation
4  "Adsorption column"
5;;================================================================
6  :variables
7  (
8;;================parameters==================================
9   ("CinA"
10    :documentation "Concentrations of Components in Input Flow."
11    :system-theoretic "real-parameter"
12    :value "8")
13;;
14   ("CinB"
15    :documentation "Concentrations of Components in Input Flow."
16    :system-theoretic "real-parameter"
17    :value "8" )
18;;
19   ("NC"
20    :documentation "Number of Components"
21    :system-theoretic "structure-parameter"
22    :value "2")
23;;
24   ("N"
25    :documentation "Number of elementary parts of the tube, Concentration in which is constant"
26    :system-theoretic "structure-parameter"
27    :value "10")
28;;
29   ("F"
30    :documentation "Porosity. Volume share of liquid phase."
31    :system-theoretic "real-parameter"
32    :value "(1-0.843)/0.843")
33;;
34   ("l"
35    :documentation "Length of the Tube. [m]"
36    :system-theoretic "real-parameter"
37    :value "20")
38;;
39   ("D_A"
40    :documentation "Component A Inner Diffusion Coefficient. [1]"
41    :system-theoretic "real-parameter"
42    :value "v*0.136")
43;;
44   ("D_B"
45    :documentation "Component B Inner Diffusion Coefficient. [1]"
46    :system-theoretic "real-parameter"
47    :value "v*0.136")
48;;
49   ("v"
50    :documentation "Velocity of liquid phase flow. [m/s]"
51    :system-theoretic "real-parameter"
52    :value "8/((3.14/4)*4)" )
53;;
54   ("H_A"
55    :documentation "Component A Liquid phase Concentration Coefficients"
56    :system-theoretic "real-parameter"
57    :value "20")
58;;
59   ("H_B"
60    :documentation "Component B Liquid phase Concentration Coefficients"
61    :system-theoretic "real-parameter"
62    :value "5.22")
63;;
64   ("b_A"
65    :documentation "Component A Solid phase Concentration Coefficients"
66    :system-theoretic "real-parameter"
67    :value "0.167" )
68;;
69   ("b_B"
70    :documentation "Component B Solid phase Concentration Coefficients"
71    :system-theoretic "real-parameter"
72    :value "0.121")
73;; ========================= Indices ===============================
74   ("i"
75    :system-theoretic "index")
76;; ========================= help variable========================
77   ("dz"
78        :documentation "Size of elementary length og tube. [m]"
79        :is-a "variable"
80        :system-theoretic "help"
81        :report "distributed"
82        :value "l/N")
83;;===============states=======================================
84   ("C_A"
85        :documentation "Concentration of Component A in liquid phase"
86        :is-a "variable"
87        :system-theoretic "state"
88        :indices ((:index "i" :lower "1" :upper "N"))
89        :report "distributed"
90        :value "0"
91        :minimum "0.0"
92        :maximum "1000.0"
93        :absolute-error "1.0d-09")
94;;
95   ("C_B"
96        :documentation "Concentration of Component B in liquid phase"
97        :is-a "variable"
98        :system-theoretic "state"
99        :report "distributed"
100        :indices ((:index "i" :lower "1" :upper "N"))
101        :value "0"
102        :minimum "0.0"
103        :maximum "1000.0"
104        :absolute-error "1.0d-09")
105;;
106   ("q_A"
107        :documentation "Concentration of Component A in solid phase"
108        :is-a "variable"
109        :system-theoretic "state"
110        :report "distributed"
111        :indices ((:index "i" :lower "1" :upper "N"))
112        :value "0.0"
113        :minimum "0.0"
114        :maximum "1000.0"
115        :absolute-error "1.0d-09")
116;;
117   ("q_B"
118        :documentation "Concentration of Component B in solid phase"
119        :is-a "variable"
120        :system-theoretic "state"
121        :report "distributed"
122        :indices ((:index "i" :lower "1" :upper "N"))
123        :value "0.0"
124        :minimum "0.0"
125        :maximum "1000.0"
126        :absolute-error "1.0d-09")
127  )
128;; =================== Equations ==========================
129  :equations
130  (
131   ("CMB_Eq_NA_l"
132        :documentation "Component A Mass Balance at the first point of the Tube"
133        :is-a "equation"
134        :relation "(:diff<t> C_A[1]) + F*(:diff<t> q_A[1]) == ((V * (CinA - C_A[1]))/dz) + ((D_A*(C_A[2]-C_A[1]))/(dz*dz))")
135;;
136   ("CMB_Eq_NA_m"
137        :documentation "Component A Mass Balance at the middle points of the Tube"
138        :is-a "equation"
139        :indices ((:index "i" :lower "2" :upper "N-1"))
140        :relation "(:diff<t> C_A[i]) + F*(:diff<t> q_A[i]) == ((V * (C_A[i-1] - C_A[i]))/dz) + ((D_A*(C_A[i+1]-C_A[i]-C_A[i]+C_A[i-1]))/(dz*dz))")
141
142   ("CMB_Eq_NA_r"
143        :documentation "Component A Mass Balance at the last point of the Tube"
144        :is-a "equation"
145        :relation "(:diff<t> C_A[N]) + F*(:diff<t> q_A[N]) == ((V * (C_A[N-1] - C_A[N]))/dz) + ((D_A*(C_A[N-1]-C_A[N]))/(dz*dz))")
146;;
147   ("CMB_Eq_NB_l"
148        :documentation "Component B Mass Balance at the first point of the Tube"
149        :is-a "equation"
150        :relation "(:diff<t> C_B[1]) + F*(:diff<t> q_B[1]) == ((V * (CinB - C_B[1]))/dz) + ((D_B*(C_B[2]-C_B[1]))/(dz*dz))")
151;;
152   ("CMB_Eq_NB_m"
153        :documentation "Component B Mass Balance at the middle points of the Tube"
154        :is-a "equation"
155        :indices ((:index "i" :lower "2" :upper "N-1"))
156        :relation "(:diff<t> C_B[i]) + F*(:diff<t> q_B[i]) == ((V * (C_B[i-1] - C_B[i]))/dz) + ((D_B*(C_B[i+1]-C_B[i]-C_B[i]+C_B[i-1]))/(dz*dz))")
157
158   ("CMB_Eq_NB_r"
159        :documentation "Component B Mass Balance at the last point of the Tube"
160        :is-a "equation"
161        :relation "(:diff<t> C_B[N]) + F*(:diff<t> q_B[N]) == ((V * (C_B[N-1] - C_B[N]))/dz) + ((D_B*(C_B[N-1]-C_B[N]))/(dz*dz))")
162;;
163  ("CMB_Eq_qA_m"
164    :documentation "Components Mass Balance equations for q_A in solid phase"
165    :is-a "equation"
166    :indices ((:index "i" :lower "1" :upper "N"))
167    :relation
168    "q_A[i] == (H_A * C_A[i]) / (1 + b_A*C_A[i] + b_B*C_B[i])")
169;;
170   ("CMB_Eq_qB_m"
171    :documentation "Components Mass Balance equations for q_B in solid phase"
172    :is-a "equation"
173    :indices ((:index "i" :lower "1" :upper "N"))
174    :relation
175    "q_B[i] == (H_B * C_B[i]) / (1 + b_A*C_A[i] + b_B*C_B[i])")
176  )
177)