- Timestamp:
- Mar 7, 2007, 1:53:12 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/newlanguage/sample/reactors/fogler/chap9/cstr_startup.mso
r82 r188 57 57 NComp as Integer (Brief="Number of components"); 58 58 stoic(NComp)as Real (Brief="Stoichiometric number"); 59 UA as Real (Brief="Exchange heat", Unit= "Btu/h/degR");59 UA as Real (Brief="Exchange heat", Unit='Btu/h/degR'); 60 60 V as volume (Brief="Volume of the reactor"); 61 61 Ta1 as temperature (Brief="Cooling temperature"); … … 66 66 ko as frequency (Brief="Frequency factor"); 67 67 E as energy_mol (Brief="Activation energy"); 68 R as Real (Brief="Universal gas constant", Unit= "Btu/lbmol/degR", Default=1.987);68 R as Real (Brief="Universal gas constant", Unit='Btu/lbmol/degR', Default=1.987); 69 69 70 70 VARIABLES 71 C(NComp) as conc_mol (Brief="Molar concentration", Unit="lbmol/ft^3", Lower=0);72 N(NComp) as mol (Brief="Molar holdup", Unit="lbmol");73 Co(NComp) as conc_mol (Brief="Initial molar concentration", Unit="lbmol/ft^3", Lower=0);74 Fo(NComp) as flow_mol (Brief="Initial molar flow", Unit="lbmol/h");75 T as temperature (Brief="Reactor temperature", Unit="degR");76 To as temperature (Brief="Initial reactor temperature", Unit="degR");77 Ta2 as temperature (Brief="Temperature of heat exchange", Unit="degR");78 r(NComp) as reaction_mol (Brief="Rate of reaction", Unit="lbmol/ft^3/h");79 k as frequency (Brief="Specific rate of reaction", Unit="1/h", Upper=1e5);80 mc as flow_mol (Brief="Molar flow of cooling water", Unit="lbmol/h");81 Q as heat_rate (Brief="Heat exchange", Unit="Btu/h");71 C(NComp) as conc_mol (Brief="Molar concentration", DisplayUnit='lbmol/ft^3', Lower=0); 72 N(NComp) as mol (Brief="Molar holdup", DisplayUnit='lbmol'); 73 Co(NComp) as conc_mol (Brief="Initial molar concentration", DisplayUnit='lbmol/ft^3', Lower=0); 74 Fo(NComp) as flow_mol (Brief="Initial molar flow", DisplayUnit='lbmol/h'); 75 T as temperature (Brief="Reactor temperature", DisplayUnit='degR'); 76 To as temperature (Brief="Initial reactor temperature", DisplayUnit='degR'); 77 Ta2 as temperature (Brief="Temperature of heat exchange", DisplayUnit='degR'); 78 r(NComp) as reaction_mol (Brief="Rate of reaction", DisplayUnit='lbmol/ft^3/h'); 79 k as frequency (Brief="Specific rate of reaction", DisplayUnit='1/h', Upper=1e5); 80 mc as flow_mol (Brief="Molar flow of cooling water", DisplayUnit='lbmol/h'); 81 Q as heat_rate (Brief="Heat exchange", DisplayUnit='Btu/h'); 82 82 Theta(NComp)as Real (Brief="Parameter Theta"); 83 vo as flow_vol (Brief="Volumetric flow", Unit="ft^3/h");84 tau as time_h (Brief="Residence time", Unit="h");83 vo as flow_vol (Brief="Volumetric flow", DisplayUnit='ft^3/h'); 84 tau as time_h (Brief="Residence time", DisplayUnit='h'); 85 85 86 86 EQUATIONS … … 122 122 stoic = [-1, -1, 1, 0]; # A + 2B -> C + D 123 123 124 UA = 16000* "Btu/h/degR";125 V = 500* "gal";126 Ta1 = (60 + 460)* "degR";127 DH =-3.6e4* "Btu/lbmol";128 rho = [0.923, 3.45, 1, 1.54]* "lbmol/ft^3";129 cp = [35, 18, 46, 19.5]* "Btu/lbmol/degR";130 131 ko = 16.96e12* "1/h";132 E = -32400* "Btu/lbmol";124 UA = 16000*'Btu/h/degR'; 125 V = 500*'gal'; 126 Ta1 = (60 + 460)*'degR'; 127 DH =-3.6e4*'Btu/lbmol'; 128 rho = [0.923, 3.45, 1, 1.54]*'lbmol/ft^3'; 129 cp = [35, 18, 46, 19.5]*'Btu/lbmol/degR'; 130 131 ko = 16.96e12*'1/h'; 132 E = -32400*'Btu/lbmol'; 133 133 end 134 134 … … 140 140 SPECIFY 141 141 "Inlet molar flow" 142 CSTR.Fo = [80, 1000, 0, 100]* "lbmol/h";142 CSTR.Fo = [80, 1000, 0, 100]*'lbmol/h'; 143 143 "Inlet reactor temperature" 144 CSTR.To = (75 + 460)* "degR";144 CSTR.To = (75 + 460)*'degR'; 145 145 "Molar flow of cooling water" 146 CSTR.mc = 1e3* "lbmol/h";146 CSTR.mc = 1e3*'lbmol/h'; 147 147 148 148 INITIAL 149 149 "Molar concentration" 150 CSTR.C = [0, 3.45, 0, 0]* "lbmol/ft^3";150 CSTR.C = [0, 3.45, 0, 0]*'lbmol/ft^3'; 151 151 "Reactor temperature" 152 152 CSTR.T = CSTR.To; 153 153 154 154 OPTIONS 155 time = [0:0.05:4]*"h"; 155 TimeStep = 0.05; 156 TimeEnd = 4; 157 TimeUnit = 'h'; 156 158 end 157 159 … … 185 187 SPECIFY 186 188 "Inlet molar flow" 187 CSTR.Fo = [80, 1000, 0, 100]* "lbmol/h";189 CSTR.Fo = [80, 1000, 0, 100]*'lbmol/h'; 188 190 "Inlet reactor temperature" 189 CSTR.To = (70 + 460)* "degR"; # Reduction of temperature: 75°F to 70°F191 CSTR.To = (70 + 460)*'degR'; # Reduction of temperature: 75°F to 70°F 190 192 "Molar flow of cooling water" 191 CSTR.mc = 1e3* "lbmol/h";193 CSTR.mc = 1e3*'lbmol/h'; 192 194 193 195 INITIAL 194 196 "Molar concentration" 195 CSTR.C = [0.039, 2.12, 0.143, 0.226]* "lbmol/ft^3"; # Final values of SS in 9-4197 CSTR.C = [0.039, 2.12, 0.143, 0.226]*'lbmol/ft^3'; # Final values of SS in 9-4 196 198 "Reactor temperature" 197 CSTR.T = (138.5 + 460)* "degR"; # Final values of SS in 9-4199 CSTR.T = (138.5 + 460)*'degR'; # Final values of SS in 9-4 198 200 199 201 OPTIONS 200 time = [0:0.05:4]*"h"; 202 TimeStep = 0.05; 203 TimeEnd = 4; 204 TimeUnit = 'h'; 201 205 end 202 206 … … 210 214 Tsp as temperature (Brief="Reference temperature"); 211 215 mco as flow_mol (Brief="Molar flow of cooling water"); 212 kc as Real (Brief="Gain", Unit= "lbmol/degR/h");216 kc as Real (Brief="Gain", Unit='lbmol/degR/h'); 213 217 214 218 VARIABLES 215 I as Real (Brief="Integral action", Unit= "degR*h");219 I as Real (Brief="Integral action", Unit='degR*h'); 216 220 X as fraction (Brief="Fraction conversion", Lower=0); 217 221 … … 233 237 234 238 SET 235 CSTR.mco = 1000* "lbmol/h";236 CSTR.Tsp = (138 + 460)* "degR";237 CSTR.kc = 8.5 ;239 CSTR.mco = 1000*'lbmol/h'; 240 CSTR.Tsp = (138 + 460)*'degR'; 241 CSTR.kc = 8.5*'lbmol/degR/h'; 238 242 239 243 SPECIFY 240 244 "Inlet molar flow" 241 CSTR.Fo = [80, 1000, 0, 100]* "lbmol/h";245 CSTR.Fo = [80, 1000, 0, 100]*'lbmol/h'; 242 246 "Inlet reactor temperature" 243 CSTR.To = (70 + 460)* "degR";247 CSTR.To = (70 + 460)*'degR'; 244 248 245 249 INITIAL 246 250 "Molar concentration" 247 CSTR.C = [0.03789, 2.12, 0.143, 0.2265]* "lbmol/ft^3";251 CSTR.C = [0.03789, 2.12, 0.143, 0.2265]*'lbmol/ft^3'; 248 252 "Reactor temperature" 249 CSTR.T = (138.53 + 460)* "degR";253 CSTR.T = (138.53 + 460)*'degR'; 250 254 "Integral action" 251 CSTR.I = 0 ;255 CSTR.I = 0*'degR*h'; 252 256 253 257 OPTIONS 254 time = [0:0.01:4]*"h"; 255 end 258 TimeStep = 0.01; 259 TimeEnd = 4; 260 TimeUnit = 'h'; 261 end
Note: See TracChangeset
for help on using the changeset viewer.