- Timestamp:
- Feb 16, 2010, 1:47:29 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/sample/stage_separators/Sample_TankVL_PID.mso
r795 r905 3 3 *----------------------------------------------*# 4 4 5 using "streams"; 6 using "pressure_changers/valve"; 7 using "controllers/PIDs"; 8 using "stage_separators/tank"; 5 using "streams.mso"; 6 using "pressure_changers/valve.mso"; 7 using "controllers/PIDs.mso"; 8 using "stage_separators/tank.mso"; 9 using "pressure_changers/pump.mso"; 9 10 10 11 FlowSheet Sample_TankVL_PID … … 22 23 DEVICES 23 24 Feed as simple_source; 24 25 SET26 27 SPECIFY28 Feed.MolarComposition(1) = 0.3;29 Feed.MolarComposition(2) = 0.3;30 Feed.MolarComposition(3) = 0.4;31 Feed.F = 500 * 'kmol/h';32 Feed.T = 338 * 'K';33 Feed.P = 5 * 'atm';34 35 INITIAL36 37 GUESS38 39 DEVICES40 25 VaporProduct as sink; 41 42 SET43 44 SPECIFY45 46 INITIAL47 48 GUESS49 50 DEVICES51 26 valve_liquid as valve_flow; 52 53 SET54 55 SPECIFY56 57 INITIAL58 59 GUESS60 61 DEVICES62 27 valve_Vapour as valve_flow; 63 64 SET65 66 SPECIFY67 68 INITIAL69 70 GUESS71 72 DEVICES73 28 PID_LC as PID; 74 75 SET76 PID_LC.PID_Select = "Parallel_AWBT";77 PID_LC.Action = "Direct";78 PID_LC.Mode = "Automatic";79 PID_LC.Clip = "Clipped";80 PID_LC.alpha = 1;81 PID_LC.beta = 1;82 PID_LC.bias = 0.5;83 PID_LC.derivTime = 19 * 's';84 PID_LC.intTime = 76 * 's';85 PID_LC.gain = 1.1776;86 PID_LC.gamma = 1;87 PID_LC.tau = 1 * 's';88 PID_LC.tauSet = 1 * 's';89 PID_LC.MinInput = 0;90 PID_LC.MaxInput = 2;91 PID_LC.MinOutput = 0;92 PID_LC.MaxOutput = 1;93 94 SPECIFY95 PID_LC.SetPoint = 0.7;96 97 INITIAL98 99 GUESS100 101 DEVICES102 29 PID_PC as PID; 103 104 SET105 PID_PC.PID_Select = "Parallel_AWBT";106 PID_PC.Action = "Direct";107 PID_PC.Mode = "Automatic";108 PID_PC.Clip = "Clipped";109 PID_PC.alpha = 1;110 PID_PC.beta = 1;111 PID_PC.bias = 0.5;112 PID_PC.derivTime = 18 * 's';113 PID_PC.intTime = 72 * 's';114 PID_PC.gain = 0.9275;115 PID_PC.gamma = 1;116 PID_PC.tau = 1 * 's';117 PID_PC.tauSet = 1 * 's';118 PID_PC.MinInput = 0;119 PID_PC.MaxInput = 4;120 PID_PC.MinOutput = 0;121 PID_PC.MaxOutput = 1;122 123 SPECIFY124 PID_PC.SetPoint = 0.6;125 126 INITIAL127 128 GUESS129 130 DEVICES131 30 LiquidProduct as simple_sink; 132 133 SET134 135 SPECIFY136 137 INITIAL138 139 GUESS140 141 DEVICES142 31 Heat_Duty as energy_source2; 143 144 SET145 146 SPECIFY147 Heat_Duty.OutletQ = 0 * 'kW';148 149 INITIAL150 151 GUESS152 153 DEVICES154 32 V001 as TankVL; 155 156 SET 157 V001.Orientation = "horizontal"; 158 V001.Heads = "elliptical"; 159 V001.Diameter = 3.1 * 'm'; 160 V001.Lenght = 6 * 'm'; 161 V001.Levelpercent_Initial = 0.5; 162 V001.Temperature_Initial = 300 * 'K'; 163 164 SPECIFY 165 166 INITIAL 167 168 GUESS 33 pump_1 as pump; 169 34 170 35 CONNECTIONS … … 173 38 PID_PC.Output to valve_Vapour.FlowFraction; 174 39 valve_liquid.Outlet to LiquidProduct.Inlet; 175 Feed.Outlet to V001.Inlet;176 40 V001.OutletVapour to valve_Vapour.Inlet; 177 41 V001.PI to PID_PC.Input; … … 179 43 Heat_Duty.OutletQ to V001.InletQ; 180 44 V001.OutletLiquid to valve_liquid.Inlet; 45 Feed.Outlet to pump_1.Inlet; 46 pump_1.Outlet to V001.Inlet; 47 48 SET 49 valve_liquid.MaxFlow = 2000 * 'kmol/h' ; 50 valve_liquid.MinFlow = 0 * 'kmol/h' ; 51 valve_Vapour.MinFlow = 0 * 'kmol/h' ; 52 valve_Vapour.MaxFlow = 1000 * 'kmol/h' ; 53 PID_LC.PID_Select = "Parallel_AWBT" ; 54 PID_LC.Action = "Direct" ; 55 PID_LC.Mode = "Automatic" ; 56 PID_LC.Clip = "Clipped" ; 57 PID_LC.alpha = 1 ; 58 PID_LC.beta = 1 ; 59 PID_LC.bias = 0.5 ; 60 PID_LC.derivTime = 19 * 's' ; 61 PID_LC.intTime = 76 * 's' ; 62 PID_LC.gain = 1.1776 ; 63 PID_LC.gamma = 1 ; 64 PID_LC.tau = 1 * 's' ; 65 PID_LC.tauSet = 1 * 's' ; 66 PID_LC.MinInput = 0 ; 67 PID_LC.MaxInput = 2 ; 68 PID_LC.MinOutput = 0 ; 69 PID_LC.MaxOutput = 1 ; 70 PID_PC.PID_Select = "Parallel_AWBT" ; 71 PID_PC.Action = "Direct" ; 72 PID_PC.Mode = "Automatic" ; 73 PID_PC.Clip = "Clipped" ; 74 PID_PC.alpha = 1 ; 75 PID_PC.beta = 1 ; 76 PID_PC.bias = 0.5 ; 77 PID_PC.derivTime = 18 * 's' ; 78 PID_PC.intTime = 72 * 's' ; 79 PID_PC.gain = 0.9275 ; 80 PID_PC.gamma = 1 ; 81 PID_PC.tau = 1 * 's' ; 82 PID_PC.tauSet = 1 * 's' ; 83 PID_PC.MinInput = 0 ; 84 PID_PC.MaxInput = 4 ; 85 PID_PC.MinOutput = 0 ; 86 PID_PC.MaxOutput = 1 ; 87 V001.Levelpercent_Initial = 0.5 ; 88 V001.Temperature_Initial = 300 * 'K' ; 89 V001.Geometry.Diameter = 2 * 'm' ; 90 V001.Geometry.Lenght = 6 * 'm' ; 91 V001.Geometry.Heads = "flat" ; 92 V001.Geometry.Orientation = "horizontal" ; 93 V001.Kfactor = 0.6 ; 94 V001.Composition_Initial(1) = 0.3 ; 95 V001.Composition_Initial(2) = 0.3 ; 96 97 SPECIFY 98 Feed.MolarComposition(1) = 0.3 ; 99 Feed.MolarComposition(2) = 0.3 ; 100 Feed.MolarComposition(3) = 0.4 ; 101 Feed.T = 338 * 'K' ; 102 Feed.P = 5 * 'atm' ; 103 PID_LC.SetPoint = 0.7 ; 104 PID_PC.SetPoint = 0.6 ; 105 Heat_Duty.OutletQ = 0 * 'kW' ; 106 pump_1.Pincrease = 12 * 'kPa' ; 181 107 182 108 OPTIONS 183 109 Dynamic = true; 184 110 TimeStep = 0.2; 185 TimeEnd = 12;111 TimeEnd = 4; 186 112 TimeUnit = 'h'; 187 113 Integration = "original"; … … 193 119 ); 194 120 DAESolver( 195 File = " sundials",121 File = "dasslc", 196 122 RelativeAccuracy = 1e-2, 197 123 AbsoluteAccuracy = 1e-6,
Note: See TracChangeset
for help on using the changeset viewer.