Changeset 169 for branches/newlanguage/eml/reactors/cstr.mso
- Timestamp:
- Mar 1, 2007, 3:09:21 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/newlanguage/eml/reactors/cstr.mso
r77 r169 16 16 * Model of cstr reactor 17 17 *-------------------------------------------------------------------- 18 *19 *20 *21 *----------------------------------------------------------------------22 18 * Author: Paula B. Staudt 23 19 * $Id$ … … 27 23 28 24 Model cstr_basic 29 PARAMETERS30 ext NComp as Integer;31 NReac as Integer;32 stoic(NComp, NReac) as Real (Brief = "Stoichiometric Matrix");33 25 34 VARIABLES35 in Inlet as stream;36 out Outlet as stream_therm;37 q as heat_rate;38 Vr as volume (Brief="Reacting Volume");39 M as mol (Brief = "Molar total amount");40 C(NComp) as conc_mol(Brief="Components concentration"); 26 ATTRIBUTES 27 Pallete = false; 28 Brief = "Brief"; 29 Info = 30 "write some information"; 31 32 PARAMETERS 41 33 42 EQUATIONS 43 "Molar fraction" 34 outer NComp as Integer (Brief = "Number Of Components"); 35 NReac as Integer (Brief = "Number Of Reactions"); 36 stoic(NComp, NReac) as Real (Brief = "Stoichiometric Matrix"); 37 38 VARIABLES 39 40 in Inlet as stream (Brief="Inlet Stream"); 41 out Outlet as streamPH (Brief="Outlet Stream"); 42 43 q as heat_rate (Brief="Heat"); 44 Vr as volume (Brief="Reacting Volume"); 45 M as mol (Brief = "Molar total amount"); 46 C(NComp) as conc_mol (Brief="Components concentration"); 47 48 EQUATIONS 49 50 "Molar fraction" 44 51 Outlet.z * M = C * Vr; 45 "Vapourisation Fraction" 52 53 "Vapourisation Fraction" 46 54 Outlet.v = Inlet.v; 55 47 56 end 48 57 49 58 Model cstr_yield as cstr_basic 50 PARAMETERS 51 yield(NReac) as fraction; 59 60 ATTRIBUTES 61 Pallete = true; 62 Brief = "Brief"; 63 Info = 64 "write some information"; 52 65 53 EQUATIONS 66 PARAMETERS 67 68 yield(NReac) as fraction (Brief="Yield"); 69 70 EQUATIONS 71 54 72 Outlet.z*Outlet.F = Inlet.z*Inlet.F * sumt(stoic*(1-yield)); 55 "Reactor Energy Balance" 73 74 "Reactor Energy Balance" 56 75 diff(M*Outlet.h) = Inlet.F*Inlet.h - Outlet.F*Outlet.h - q; 76 57 77 end 58 78 59 79 60 80 Model cstr as cstr_basic 61 VARIABLES62 r(NReac) as reaction_mol;63 Hr(NReac) as heat_reaction;64 81 65 EQUATIONS 66 "Component Molar Balance" 82 ATTRIBUTES 83 Pallete = true; 84 Brief = "Brief"; 85 Info = 86 "write some information"; 87 88 VARIABLES 89 90 r(NReac) as reaction_mol (Brief="Molar Reaction Rate"); 91 Hr(NReac) as heat_reaction (Brief="Heat Reaction"); 92 93 EQUATIONS 94 95 "Component Molar Balance" 67 96 diff(Outlet.z*M) = (Inlet.F*Inlet.z - Outlet.F*Outlet.z) + sumt(stoic*r)*Vr; 68 97 69 70 diff(M*Outlet.h) = Inlet.F*Inlet.h - Outlet.F*Outlet.h + 71 sum(Hr*sum(stoic*r))*Vr - q; 98 "Reactor Energy Balance" 99 diff(M*Outlet.h) = Inlet.F*Inlet.h - Outlet.F*Outlet.h +sum(Hr*sum(stoic*r))*Vr - q; 100 72 101 end
Note: See TracChangeset
for help on using the changeset viewer.