# Ticket #41: 24T04_contr.mso

File 24T04_contr.mso, 5.4 KB (added by , 15 years ago) |
---|

Line | |
---|---|

1 | #* |

2 | Exemplo de coluna de destilação multicomponente |

3 | *# |

4 | |

5 | using "stage_separators/column"; |

6 | using "controllers/PIDIncr"; |

7 | |

8 | FlowSheet Coluna_24T04 |

9 | PARAMETERS |

10 | PP as CalcObject(Brief="Physical Properties",File="vrpp"); |

11 | NComp as Integer; |

12 | Qmin as heat_rate (Brief="Heat supplied"); |

13 | Qmax as heat_rate (Brief="Heat supplied"); |

14 | Pmax as pressure (Brief="Maximum column pressure"); |

15 | Pmin as pressure (Brief="Minimum column pressure"); |

16 | Hmin as length (Brief="Minimum Level of liquid phase"); |

17 | Hmax as length (Brief="Maximum Level of liquid phase"); |

18 | |

19 | VARIABLES |

20 | Qc as heat_rate (Brief="Heat rate removed from condenser"); |

21 | Qr as heat_rate (Brief="Heat rate supplied to reboiler"); |

22 | Pad as fraction (Brief="Dimensionless pressure"); |

23 | Had_cond as fraction (Brief="Dimensionless condenser level"); |

24 | Had_reb as fraction (Brief="Dimensionless reboiler level"); |

25 | Qtank as heat_rate ; |

26 | SET |

27 | PP.Components = [ "benzene", "toluene", "ethylbenzene", "water", "methylcyclohexane", |

28 | "cis-1,2-dimethylcyclohexane", "cyclopentadiene"]; |

29 | PP.LiquidModel = "UNIFAC"; |

30 | PP.VapourModel = "Ideal"; |

31 | PP.Derivatives = 1; |

32 | NComp = PP.NumberOfComponents; |

33 | |

34 | DEVICES |

35 | col as Distillation_thermosyphon_cond; |

36 | PC as PIDIncr_Ideal_AW; |

37 | LCtop as PIDIncr_Ideal_AW; |

38 | LCbot as PIDIncr_Ideal_AW; |

39 | feed as streamTP; |

40 | zero as stream; |

41 | |

42 | CONNECTIONS |

43 | #* feed to col.trays(24).Inlet; |

44 | zero to col.trays([1:23]).Inlet; |

45 | zero to col.trays([25:col.NTrays]).Inlet; |

46 | *# feed to col.trays(5).Inlet; |

47 | zero to col.trays([1:4]).Inlet; |

48 | zero to col.trays([6:col.NTrays]).Inlet; |

49 | Qc to col.cond.Q; |

50 | Qr to col.reb.Q; |

51 | Qtank to col.tbottom.Q; |

52 | EQUATIONS |

53 | "Pressure Controller" |

54 | PC.Parameters.tau = 0*"s"; |

55 | PC.Parameters.tauSet = 0*"s"; |

56 | PC.Parameters.alpha = 0.3; |

57 | PC.Parameters.bias = 0.0192; |

58 | PC.Parameters.gamma = 1; |

59 | PC.Parameters.beta = 1; |

60 | PC.Options.action = -1; |

61 | PC.Options.clip = 1; |

62 | PC.Options.autoMan = 0; |

63 | PC.Parameters.intTime = 60*"s"; |

64 | PC.Parameters.gain = 0.8; |

65 | PC.Parameters.derivTime = 1*"s"; |

66 | PC.Ports.setPoint = 0.4; |

67 | PC.Ports.input = Pad; |

68 | Pad = (col.cond.OutletV.P-Pmin)/(Pmax-Pmin); |

69 | Qc = Qmax+(Qmin-Qmax)*PC.Ports.output; |

70 | |

71 | "Condenser Level Controller" |

72 | LCtop.Parameters.tau = 0*"s"; |

73 | LCtop.Parameters.tauSet = 0*"s"; |

74 | LCtop.Parameters.alpha = 0.3; |

75 | LCtop.Parameters.bias = 0.17; |

76 | LCtop.Parameters.gamma = 1; |

77 | LCtop.Parameters.beta = 1; |

78 | LCtop.Options.action = -1; |

79 | LCtop.Options.clip = 1; |

80 | LCtop.Options.autoMan = 0; |

81 | LCtop.Parameters.intTime = 100*"s"; |

82 | LCtop.Parameters.gain = 3; |

83 | LCtop.Parameters.derivTime = 1*"s"; |

84 | LCtop.Ports.setPoint = 0.5; |

85 | LCtop.Ports.input = Had_cond; |

86 | Had_cond = (col.cond.Level-Hmin)/(Hmax-Hmin); |

87 | col.sptop.Outlet1.F = 32 * "kmol/h" * LCtop.Ports.output; |

88 | |

89 | "Reboiler Level Controller" |

90 | LCbot.Parameters.tau = 0*"s"; |

91 | LCbot.Parameters.tauSet = 0*"s"; |

92 | LCbot.Parameters.alpha = 0.3; |

93 | LCbot.Parameters.bias = 0.83; |

94 | LCbot.Parameters.gamma = 1; |

95 | LCbot.Parameters.beta = 1; |

96 | LCbot.Options.action = -1; |

97 | LCbot.Options.clip = 1; |

98 | LCbot.Options.autoMan = 0; |

99 | LCbot.Parameters.intTime = 100*"s"; |

100 | LCbot.Parameters.gain = 1; |

101 | LCbot.Parameters.derivTime = 1*"s"; |

102 | LCbot.Ports.setPoint = 0.5; |

103 | LCbot.Ports.input = Had_reb; |

104 | Had_reb = (col.tbottom.Level-Hmin)/(Hmax-Hmin); |

105 | col.spbottom.Outlet1.F = 32 * "kmol/h" * LCbot.Ports.output; |

106 | |

107 | SPECIFY |

108 | feed.F = 32 * "kmol/h"; |

109 | feed.T = (273+98) * "K"; |

110 | feed.P = 4.1 * "kgf/cm^2"; |

111 | feed.z = [0.436162058, |

112 | 0.554079669, |

113 | 8.15494E-05, |

114 | 0.004802355, |

115 | 0.002541396, |

116 | 0.00184928, |

117 | 0.000483693]; |

118 | |

119 | zero.F = 0 * "kmol/h"; |

120 | zero.T = 300 * "K"; |

121 | zero.P = 90 * "mmHg"; |

122 | zero.z = 1/NComp; |

123 | zero.v = 0; |

124 | zero.h = 0 * "J/mol"; |

125 | |

126 | col.sptop.Outlet2.F = 36 * "kmol/h"; |

127 | #col.spbottom.Outlet1.F = 30 * "kmol/h"; |

128 | #col.sptop.Outlet1.F = 6 * "kmol/h"; |

129 | col.cond.OutletV.F = 0 * "kmol/h"; |

130 | |

131 | col.tbottom.Q = 0 * "J/s"; |

132 | col.pump1.dP = 5 * "atm"; |

133 | |

134 | #Q = -0.48e6/2.5 * "kcal/h"; |

135 | |

136 | #Qr = 0.64e6 * "kcal/h"; |

137 | col.reb.OutletV.T = (273+170) * "K"; |

138 | col.trays.Emv = 1; |

139 | |

140 | SET |

141 | col.NTrays = 10; |

142 | col.trays.V = 0.255 * "m^3"; |

143 | col.trays.Ah = 0.31 * "m^2"; |

144 | col.trays.lw = 0.69 * "m"; |

145 | col.trays.hw = 0.03 * "m"; |

146 | col.trays.Q = 0 * "kW"; |

147 | col.trays.beta = 0.6; |

148 | col.trays.alfa = 4; |

149 | col.trays.Ap = 0.407 * "m^2"; |

150 | |

151 | col.cond.V = 2.1 * "m^3"; |

152 | col.cond.Across = 1 * "m^2"; |

153 | Qmax = 0 * "kcal/h"; |

154 | Qmin = -1e7 * "kcal/h"; |

155 | Pmax = 6 * "atm"; |

156 | Pmin = 0.1 * "atm"; |

157 | Hmin = 0.1 * "m"; |

158 | Hmax = 1.9 * "m"; |

159 | |

160 | col.tbottom.Across = 0.903 * "m^2"; |

161 | |

162 | col.reb.DP = -0.002 * "atm"; |

163 | |

164 | INITIAL |

165 | col.cond.OutletL.T = (273+100) *"K"; |

166 | col.cond.Level = 0.55 * "m"; |

167 | col.cond.OutletL.z([1:6]) = [0.3975, 0.5956, 1.01E-04, 1.01E-03, 2.91E-03, 2.42E-03]; |

168 | |

169 | col.tbottom.Outlet.T = (273+170) *"K"; |

170 | col.tbottom.Level = 1.5 * "m"; |

171 | col.tbottom.Outlet.z([1:6]) = [0.02, 0.98, 0, 0, 0, 0]; |

172 | |

173 | col.trays.OutletL.T = (273+100) * "K"; #(273+120) * "K"; |

174 | col.trays.Level = 0.8 * col.trays.hw; |

175 | col.trays.OutletL.z([1:6]) = [0.3975, 0.5956, 1.01E-04, 1.01E-03, 2.91E-03, 2.42E-03]; |

176 | #* |

177 | Ah: área perfurada do prato, isto é, área dos furos do prato |

178 | lw: comprimento do vertedor |

179 | hw: altura do vertedor |

180 | Q: calor fornecido ao prato |

181 | Ap: área do prato (área total área do downcomer) |

182 | b : fração de aeração do líquido |

183 | a : coeficiente de queda de pressão do prato seco |

184 | Ah: área perfurada do prato, isto é, área dos furos do prato |

185 | *# |

186 | |

187 | OPTIONS |

188 | outputLevel = "high"; |

189 | |

190 | #relativeAccuracy = 1e-4; |

191 | time = [0:0.05:5]*"h"; |

192 | end |