1235 |
1235 |
|
1236 |
1236 |
drawing = AppDocData.instance().activeDrawing
|
1237 |
1237 |
if drawing:
|
1238 |
|
for hmb in drawing.hmbTable._hmbs:
|
1239 |
|
if hmb.components_uid == self.item.uid:
|
1240 |
|
|
1241 |
|
self.ui.groupBox_StreamNo.setTitle('Stream No. : {}'.format(hmb.stream_no))
|
1242 |
|
|
1243 |
|
if hmb.phase_type:
|
1244 |
|
index = self.ui.comboBox_PhaseType.findData(hmb.phase_type)
|
1245 |
|
if index > -1:
|
1246 |
|
self.ui.comboBox_PhaseType.setCurrentIndex(index)
|
1247 |
|
if hmb.flowrate_mass:
|
1248 |
|
self.ui.lineEdit_Flowrate_Mass_Liquid.setText(str(hmb.flowrate_mass))
|
1249 |
|
self.ui.lineEdit_Flowrate_Mass_Vapor.setText(str(hmb.flowrate_mass))
|
1250 |
|
if hmb.flowrate_volume:
|
1251 |
|
self.ui.lineEdit_Flowrate_Volume.setText(str(hmb.flowrate_volume))
|
1252 |
|
if hmb.viscosity:
|
1253 |
|
self.ui.lineEdit_Viscosity_Liquid.setText(str(hmb.viscosity))
|
1254 |
|
self.ui.lineEdit_Viscosity_Vapor.setText(str(hmb.viscosity))
|
1255 |
|
|
1256 |
|
if hmb.specific_heat_ratio:
|
1257 |
|
self.ui.lineEdit_Specific_Heat_Ratio.setText(str(hmb.specific_heat_ratio))
|
1258 |
|
if hmb.molecular_weight:
|
1259 |
|
self.ui.lineEdit_Molecular_Weight.setText(str(hmb.molecular_weight))
|
1260 |
|
if hmb.temperature:
|
1261 |
|
self.ui.lineEdit_Temperature.setText(str(hmb.temperature))
|
1262 |
|
if hmb.compress_factor:
|
1263 |
|
self.ui.lineEdit_Compress_Factor.setText(str(hmb.compress_factor))
|
1264 |
|
|
1265 |
|
if hmb.density:
|
1266 |
|
self.ui.lineEdit_Density.setText(str(hmb.density))
|
1267 |
|
if hmb.limitation_velocity:
|
1268 |
|
self.ui.lineEdit_Limitation_Velocity.setText(str(hmb.limitation_velocity))
|
1269 |
|
if hmb.limitation_pressure_drop:
|
1270 |
|
self.ui.lineEdit_Limitation_Pressure_Drop.setText(str(hmb.limitation_pressure_drop))
|
1271 |
|
if hmb.nominal_pipe_size:
|
1272 |
|
self.ui.comboBox_Nominal_Pipe_Size.setCurrentText(str(hmb.nominal_pipe_size))
|
1273 |
|
if hmb.schedule_no:
|
1274 |
|
self.ui.comboBox_Schedule_No.setCurrentText(str(hmb.schedule_no))
|
1275 |
|
if hmb.roughness:
|
1276 |
|
self.ui.lineEdit_Roughness.setText(str(hmb.roughness))
|
1277 |
|
if hmb.straight_length:
|
1278 |
|
self.ui.lineEdit_Straight_Length.setText(str(hmb.straight_length))
|
1279 |
|
if hmb.equivalent_length_input:
|
1280 |
|
self.ui.lineEdit_Equivalent_Length_Input.setText(str(hmb.equivalent_length_input))
|
1281 |
|
if hmb.fitting_length:
|
1282 |
|
self.ui.lineEdit_Fitting_Length.setText(str(hmb.fitting_length))
|
1283 |
|
if hmb.fitting_K:
|
1284 |
|
self.ui.lineEdit_Fitting_K.setText(str(hmb.fitting_K))
|
1285 |
|
if hmb.equivalent_length_cal:
|
1286 |
|
self.ui.lineEdit_Equivalent_Length_Cal.setText(str(hmb.equivalent_length_cal))
|
1287 |
|
if hmb.vapor_flowrate_mass:
|
1288 |
|
self.ui.lineEdit_Mixed_Flowrate_Mass_Vapor.setText(str(hmb.vapor_flowrate_mass))
|
1289 |
|
if hmb.vapor_density:
|
1290 |
|
self.ui.lineEdit_Mixed_Density_Vapor.setText(str(hmb.vapor_density))
|
1291 |
|
if hmb.vapor_viscosity:
|
1292 |
|
self.ui.lineEdit_Mixed_Viscosity_Vapor.setText(str(hmb.vapor_viscosity))
|
1293 |
|
if hmb.vapor_pressure:
|
1294 |
|
self.ui.lineEdit_Mixed_Pressure_Vapor.setText(str(hmb.vapor_pressure))
|
1295 |
|
if hmb.vapor_temperature:
|
1296 |
|
self.ui.lineEdit_Mixed_Temperature_Vapor.setText(str(hmb.vapor_temperature))
|
1297 |
|
if hmb.vapor_molecular_weight:
|
1298 |
|
self.ui.lineEdit_Mixed_Molecular_Weight_Vapor.setText(str(hmb.vapor_molecular_weight))
|
1299 |
|
if hmb.vapor_compress_factor:
|
1300 |
|
self.ui.lineEdit_Mixed_Compress_Factor_Vapor.setText(str(hmb.vapor_compress_factor))
|
1301 |
|
if hmb.liquid_flowrate_mass:
|
1302 |
|
self.ui.lineEdit_Mixed_Flowrate_Mass_Liquid.setText(str(hmb.liquid_flowrate_mass))
|
1303 |
|
if hmb.liquid_density:
|
1304 |
|
self.ui.lineEdit_Mixed_Density_Liquid.setText(str(hmb.liquid_density))
|
1305 |
|
if hmb.liquid_viscosity:
|
1306 |
|
self.ui.lineEdit_Mixed_Viscosity_Liquid.setText(str(hmb.liquid_viscosity))
|
1307 |
|
break
|
|
1238 |
matches = [hmb for hmb in drawing.hmbTable._hmbs if hmb.components_uid == self.item.uid]
|
|
1239 |
if matches:
|
|
1240 |
self.ui.groupBox_StreamNo.setTitle('Stream No. : {}'.format(matches[0].stream_no))
|
|
1241 |
|
|
1242 |
if matches[0].phase_type:
|
|
1243 |
index = self.ui.comboBox_PhaseType.findData(matches[0].phase_type)
|
|
1244 |
if index > -1:
|
|
1245 |
self.ui.comboBox_PhaseType.setCurrentIndex(index)
|
|
1246 |
if matches[0].flowrate_mass:
|
|
1247 |
self.ui.lineEdit_Flowrate_Mass_Liquid.setText(str(matches[0].flowrate_mass))
|
|
1248 |
self.ui.lineEdit_Flowrate_Mass_Vapor.setText(str(matches[0].flowrate_mass))
|
|
1249 |
if matches[0].flowrate_volume:
|
|
1250 |
self.ui.lineEdit_Flowrate_Volume.setText(str(matches[0].flowrate_volume))
|
|
1251 |
if matches[0].viscosity:
|
|
1252 |
self.ui.lineEdit_Viscosity_Liquid.setText(str(matches[0].viscosity))
|
|
1253 |
self.ui.lineEdit_Viscosity_Vapor.setText(str(matches[0].viscosity))
|
|
1254 |
|
|
1255 |
if matches[0].specific_heat_ratio:
|
|
1256 |
self.ui.lineEdit_Specific_Heat_Ratio.setText(str(matches[0].specific_heat_ratio))
|
|
1257 |
if matches[0].molecular_weight:
|
|
1258 |
self.ui.lineEdit_Molecular_Weight.setText(str(matches[0].molecular_weight))
|
|
1259 |
if matches[0].temperature:
|
|
1260 |
self.ui.lineEdit_Temperature.setText(str(matches[0].temperature))
|
|
1261 |
if matches[0].compress_factor:
|
|
1262 |
self.ui.lineEdit_Compress_Factor.setText(str(matches[0].compress_factor))
|
|
1263 |
|
|
1264 |
if matches[0].density:
|
|
1265 |
self.ui.lineEdit_Density.setText(str(matches[0].density))
|
|
1266 |
if matches[0].limitation_velocity:
|
|
1267 |
self.ui.lineEdit_Limitation_Velocity.setText(str(matches[0].limitation_velocity))
|
|
1268 |
if matches[0].limitation_pressure_drop:
|
|
1269 |
self.ui.lineEdit_Limitation_Pressure_Drop.setText(str(matches[0].limitation_pressure_drop))
|
|
1270 |
if matches[0].nominal_pipe_size:
|
|
1271 |
self.ui.comboBox_Nominal_Pipe_Size.setCurrentText(str(matches[0].nominal_pipe_size))
|
|
1272 |
if matches[0].schedule_no:
|
|
1273 |
self.ui.comboBox_Schedule_No.setCurrentText(str(matches[0].schedule_no))
|
|
1274 |
if matches[0].roughness:
|
|
1275 |
self.ui.lineEdit_Roughness.setText(str(matches[0].roughness))
|
|
1276 |
if matches[0].straight_length:
|
|
1277 |
self.ui.lineEdit_Straight_Length.setText(str(matches[0].straight_length))
|
|
1278 |
if matches[0].equivalent_length_input:
|
|
1279 |
self.ui.lineEdit_Equivalent_Length_Input.setText(str(matches[0].equivalent_length_input))
|
|
1280 |
if matches[0].fitting_length:
|
|
1281 |
self.ui.lineEdit_Fitting_Length.setText(str(matches[0].fitting_length))
|
|
1282 |
if matches[0].fitting_K:
|
|
1283 |
self.ui.lineEdit_Fitting_K.setText(str(matches[0].fitting_K))
|
|
1284 |
if matches[0].equivalent_length_cal:
|
|
1285 |
self.ui.lineEdit_Equivalent_Length_Cal.setText(str(matches[0].equivalent_length_cal))
|
|
1286 |
if matches[0].vapor_flowrate_mass:
|
|
1287 |
self.ui.lineEdit_Mixed_Flowrate_Mass_Vapor.setText(str(matches[0].vapor_flowrate_mass))
|
|
1288 |
if matches[0].vapor_density:
|
|
1289 |
self.ui.lineEdit_Mixed_Density_Vapor.setText(str(matches[0].vapor_density))
|
|
1290 |
if matches[0].vapor_viscosity:
|
|
1291 |
self.ui.lineEdit_Mixed_Viscosity_Vapor.setText(str(matches[0].vapor_viscosity))
|
|
1292 |
if matches[0].vapor_pressure:
|
|
1293 |
self.ui.lineEdit_Mixed_Pressure_Vapor.setText(str(matches[0].vapor_pressure))
|
|
1294 |
if matches[0].vapor_temperature:
|
|
1295 |
self.ui.lineEdit_Mixed_Temperature_Vapor.setText(str(matches[0].vapor_temperature))
|
|
1296 |
if matches[0].vapor_molecular_weight:
|
|
1297 |
self.ui.lineEdit_Mixed_Molecular_Weight_Vapor.setText(str(matches[0].vapor_molecular_weight))
|
|
1298 |
if matches[0].vapor_compress_factor:
|
|
1299 |
self.ui.lineEdit_Mixed_Compress_Factor_Vapor.setText(str(matches[0].vapor_compress_factor))
|
|
1300 |
if matches[0].liquid_flowrate_mass:
|
|
1301 |
self.ui.lineEdit_Mixed_Flowrate_Mass_Liquid.setText(str(matches[0].liquid_flowrate_mass))
|
|
1302 |
if matches[0].liquid_density:
|
|
1303 |
self.ui.lineEdit_Mixed_Density_Liquid.setText(str(matches[0].liquid_density))
|
|
1304 |
if matches[0].liquid_viscosity:
|
|
1305 |
self.ui.lineEdit_Mixed_Viscosity_Liquid.setText(str(matches[0].liquid_viscosity))
|
1308 |
1306 |
|
1309 |
1307 |
except Exception as ex:
|
1310 |
1308 |
from App import App
|