Changeset 738 for branches/gui/eml/heat_exchangers/heater.mso
- Timestamp:
- Feb 27, 2009, 1:26:23 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/eml/heat_exchangers/heater.mso
r656 r738 19 19 using "streams"; 20 20 21 Model heater _basic21 Model heater 22 22 23 23 ATTRIBUTES 24 Pallete = false; 25 Brief = "Basic model for Heater or Cooler Operation"; 24 Pallete = true; 25 Icon = "icon/heater"; 26 Brief = "Heater"; 26 27 Info = 27 28 "Determines thermal and phase conditions of an outlet stream. 29 30 == Specify == 31 * The Inlet stream 32 * Specify: 33 **The outlet temperature and the outlet pressure or 34 ** The outlet temperature and the inlet energy stream or 35 ** The outlet pressure and the inlet energy stream 28 36 "; 29 37 … … 41 49 Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P"); 42 50 43 in Inlet as stream (Brief = "Inlet Stream", PosX=0, PosY=0.45, Symbol="^{in}"); 44 out Outlet as streamPH (Brief = "Outlet Stream", PosX=1, PosY=0.45, Symbol="^{out}"); 45 51 in Inlet as stream (Brief = "Inlet Stream", PosX=0, PosY=0.40, Symbol="^{in}"); 52 out Outlet as streamPH (Brief = "Outlet Stream", PosX=1, PosY=0.40, Symbol="^{out}"); 53 in Heat as power (Brief ="Inlet Heat Stream", PosX=0.5, PosY=1, Symbol="_{out}"); 54 46 55 EQUATIONS 47 56 … … 83 92 end 84 93 85 end86 87 Model heater as heater_basic88 89 ATTRIBUTES90 Pallete = true;91 Icon = "icon/heater";92 Brief = "Heater";93 Info =94 "Determines thermal and phase conditions of an outlet stream.95 96 == Specify ==97 * The Inlet stream98 * Specify:99 **The outlet temperature and the outlet pressure or100 ** The outlet temperature and the inlet energy stream or101 ** The outlet pressure and the inlet energy stream102 ";103 104 VARIABLES105 106 in Heat as power (Brief ="Inlet Heat Stream", PosX=0.5, PosY=1, Symbol="_{out}");107 108 EQUATIONS109 110 94 "Duty Specification" 111 95 Heat = Duty; … … 113 97 end 114 98 115 Model cooler as heater_basic99 Model cooler 116 100 117 101 ATTRIBUTES … … 130 114 "; 131 115 116 PARAMETERS 117 outer PP as Plugin (Brief="Physical Properties", Type="PP"); 118 outer NComp as Integer (Brief="Number of Components"); 119 Kvalues as Switcher (Brief="Option for Display Phase Equilibrium K-values",Valid=["yes","no"], Default="yes"); 120 132 121 VARIABLES 122 Duty as power (Brief = "Actual Duty",Symbol="Q_{Duty}"); 123 Vfrac as fraction (Brief = "Vapor fraction Outlet Stream",Symbol="V_{frac}"); 124 Lfrac as fraction (Brief = "Liquid fraction Outlet Stream",Symbol="L_{frac}"); 125 Kvalue(NComp) as Real (Brief = "Phase Equilibrium K-values",Lower=1E-30,Upper=1E30,Symbol="K_{value}"); 126 Pratio as positive (Brief = "Pressure Ratio", Symbol ="P_{ratio}"); 127 Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P"); 133 128 129 in Inlet as stream (Brief = "Inlet Stream", PosX=0, PosY=0.615, Symbol="^{in}"); 130 out Outlet as streamPH (Brief = "Outlet Stream", PosX=1, PosY=0.615, Symbol="^{out}"); 134 131 out Heat as power (Brief ="Inlet Heat Stream", PosX=0.5, PosY=0, Symbol="_{out}"); 135 132 136 133 EQUATIONS 134 135 "Flow" 136 Outlet.F = Inlet.F; 137 138 for j in [1 : NComp] do 139 140 "Composition" 141 Outlet.F*Outlet.z(j) = Inlet.F*Inlet.z(j); 142 143 end 144 145 "Vapor fraction Outlet Stream" 146 Vfrac = Outlet.v; 147 148 "Liquid fraction Outlet Stream" 149 Lfrac = 1-Vfrac; 150 151 "Heat Duty" 152 Duty = Outlet.F*Outlet.h - Inlet.F*Inlet.h; 153 154 "Pressure Drop" 155 Outlet.P = Inlet.P - Pdrop; 156 157 "Pressure Ratio" 158 Outlet.P = Inlet.P * Pratio; 159 160 switch Kvalues # Fix for better convergence !!! 161 162 case "yes": 163 "K-values Phase Equilibrium" 164 Kvalue*Outlet.x = Outlet.y; 165 166 case "no": 167 "K-values Phase Equilibrium" 168 Kvalue = 1; 169 170 end 171 137 172 138 173 "Duty Specification"
Note: See TracChangeset
for help on using the changeset viewer.