Changeset 376 for trunk/sample/miscellaneous/tenprobs
 Timestamp:
 Sep 26, 2007, 6:48:53 PM (16 years ago)
 Location:
 trunk/sample/miscellaneous/tenprobs
 Files:

 8 added
 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/sample/miscellaneous/tenprobs/prob06.mso
r228 r376 53 53 **# 54 54 Model stream 55 PARAMETERS 56 W as flow_mass (Brief="Mass flow rate", DisplayUnit='kg/min'); 57 cp as cp_mass (Brief="Heat capacity of the oil", DisplayUnit='kJ/kg/K'); 58 55 59 VARIABLES 56 W as flow_mass (Brief="Mass flow rate", DisplayUnit='kg/min');57 60 T as temperature; 61 62 SET 63 cp = 2*'kJ/kg/K'; 64 W = 100*'kg/min'; 65 end 66 67 Model source_ 68 ATTRIBUTES 69 Pallete = true; 70 Brief = "Simple inlet stream"; 71 Icon = "icon/source_"; 72 73 VARIABLES 74 out Outlet as stream (Brief="Outlet stream", PosX=1, PosY=0.5); 75 end 76 77 Model sink_ 78 ATTRIBUTES 79 Pallete = true; 80 Brief = "Simple outlet stream"; 81 Icon = "icon/sink_"; 82 83 VARIABLES 84 in Inlet as stream (Brief="Inlet stream", PosX=0, PosY=0.5); 85 end 86 87 88 Model energy_stream 89 VARIABLES 90 T as temperature; 91 end 92 93 Model steam 94 ATTRIBUTES 95 Pallete = true; 96 Brief = "Simple inlet stream"; 97 Icon = "icon/source_"; 98 99 VARIABLES 100 out Outlet as energy_stream(Brief="Outlet stream", PosX=1, PosY=0.5); 58 101 end 59 102 … … 62 105 * Model of one tank 63 106 **# 64 Model tank 107 Model heated_tank 108 ATTRIBUTES 109 Pallete = true; 110 Brief = "Simple model of a steadystate CSTR"; 111 Icon = "icon/heated_tank"; 112 113 65 114 PARAMETERS 66 cp as cp_mass (Brief="Heat capacity of the oil", DisplayUnit='kJ/kg/K');67 T_steam as temperature (Brief="Saturated steam temperature");68 115 UA as Real (Brief="Product of the heat transfer coefficient and the area", Unit='kJ/min/K'); 69 116 70 117 71 118 VARIABLES 72 in Inlet as stream; 73 out Outlet as stream; 119 in Inlet as stream (Brief="Inlet stream", PosX=0.51, PosY=0); 120 out Outlet as stream (Brief="Outlet stream", PosX=1, PosY=0.975); 121 in InletQ as energy_stream(Brief="Rate of heat supply", PosX=0, PosY=0.715); 74 122 75 123 M as mass (Brief="Mass in tank"); … … 77 125 78 126 127 SET 128 UA = 10*'kJ/min/K'; 129 130 79 131 EQUATIONS 80 132 "Energy balance" 81 (M* cp)*diff(Outlet.T) = Inlet.W*cp*(Inlet.T  Outlet.T) + Q;133 (M*Outlet.cp)*diff(Outlet.T) = Inlet.W*Inlet.cp*(Inlet.T  Outlet.T) + Q; 82 134 83 135 "Rate of heat transferred" 84 Q = UA*(T_steam  Outlet.T); 85 86 "Fixed value of mass flow rate" 87 Outlet.W = Inlet.W; 88 89 "Mass assumed constant" 90 M = 1000*'kg'; 91 92 93 SET 94 cp = 2*'kJ/kg/K'; 95 T_steam = (250 + 273.15)*'K'; 96 UA = 10*'kJ/min/K'; 136 Q = UA*(InletQ.T  Outlet.T); 97 137 end 98 138 … … 108 148 109 149 DEVICES 110 tank1 as tank; 111 tank2 as tank; 112 tank3 as tank; 150 steam1 as steam; 151 steam2 as steam; 152 steam3 as steam; 153 154 tank1 as heated_tank; 155 tank2 as heated_tank; 156 tank3 as heated_tank; 113 157 114 158 … … 118 162 tank2.Outlet to tank3.Inlet; 119 163 164 steam1.Outlet to tank1.InletQ; 165 steam2.Outlet to tank2.InletQ; 166 steam3.Outlet to tank3.InletQ; 167 120 168 121 169 SPECIFY 122 feed.W = 100*'kg/min';123 170 feed.T = (20 + 273.15)*'K'; 171 172 steam1.Outlet.T = (250 + 273.15)*'K'; 173 steam2.Outlet.T = (250 + 273.15)*'K'; 174 steam3.Outlet.T = (250 + 273.15)*'K'; 175 176 tank1.M = 1000*'kg'; 177 tank2.M = tank1.M; 178 tank3.M = tank2.M; 124 179 125 180 126 181 INITIAL 127 182 tank1.Outlet.T = (20 + 273.15)*'K'; 128 tank 1.Outlet.T = tank2.Outlet.T;129 tank 2.Outlet.T = tank3.Outlet.T;183 tank2.Outlet.T = tank1.Outlet.T; 184 tank3.Outlet.T = tank2.Outlet.T; 130 185 131 186
Note: See TracChangeset
for help on using the changeset viewer.