개정판 397fe521
issue #1255 Mean Vel 값이 20이상이면 Error 처리
Change-Id: I1ef19c697fb31d0585906db62a904fba67868235
HYTOS/HYTOS/PressureVariation.py | ||
---|---|---|
230 | 230 |
dp_display_noz = 0 |
231 | 231 |
|
232 | 232 |
no = 0 |
233 |
find_velocity_20 = False |
|
234 |
|
|
233 | 235 |
for row in self.item.mixed_pressure_variation: |
234 | 236 |
data = list(row) |
235 | 237 |
data[0] = row[0] # element |
... | ... | |
274 | 276 |
mean_vel = row[10] if row[10] is not None else 0 |
275 | 277 |
max_vel = row[11] if row[11] is not None else 0 |
276 | 278 |
|
279 |
if float(mean_vel) >= 20: |
|
280 |
find_velocity_20 = True |
|
281 |
|
|
277 | 282 |
if float(max_vel) < float(mean_vel): |
278 | 283 |
# str(row[0]).split('_', 1)[0] |
279 | 284 |
message = '{} velocity is higher than maximum velocity!'.format(row[0]) |
... | ... | |
298 | 303 |
self.ui.lineEdit_Valve_Loss.setText(str(round(dp_display_valve, 5))) |
299 | 304 |
self.ui.lineEdit_Nozzle_Loss.setText(str(round(dp_display_noz, 5))) |
300 | 305 |
|
301 |
if self.ui.listWidget_Status.count() > 0: |
|
306 |
if find_velocity_20: |
|
307 |
message = "Velocity is not OK" |
|
308 |
item = QListWidgetItem(message) |
|
309 |
item.setForeground(Qt.black) |
|
310 |
self.ui.listWidget_Status.insertItem(0, item) |
|
311 |
self.ui.listWidget_Status.setStyleSheet('background-color:rgb(255, 0, 0)') |
|
312 |
elif self.ui.listWidget_Status.count() > 0: |
|
302 | 313 |
message = "Calculation result is not available !" |
303 | 314 |
item = QListWidgetItem(message) |
304 | 315 |
item.setForeground(Qt.black) |
HYTOS/HYTOS/PressureVariation_UI.py | ||
---|---|---|
23 | 23 |
Dialog.setWindowIcon(icon) |
24 | 24 |
self.gridLayout_2 = QtWidgets.QGridLayout(Dialog) |
25 | 25 |
self.gridLayout_2.setObjectName("gridLayout_2") |
26 |
self.gridLayout = QtWidgets.QGridLayout() |
|
27 |
self.gridLayout.setObjectName("gridLayout") |
|
26 |
self.verticalLayout_2 = QtWidgets.QVBoxLayout() |
|
27 |
self.verticalLayout_2.setObjectName("verticalLayout_2") |
|
28 |
self.groupBox_2 = QtWidgets.QGroupBox(Dialog) |
|
29 |
font = QtGui.QFont() |
|
30 |
font.setBold(True) |
|
31 |
font.setWeight(75) |
|
32 |
self.groupBox_2.setFont(font) |
|
33 |
self.groupBox_2.setObjectName("groupBox_2") |
|
34 |
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.groupBox_2) |
|
35 |
self.verticalLayout_3.setObjectName("verticalLayout_3") |
|
36 |
self.tableWidget = QtWidgets.QTableWidget(self.groupBox_2) |
|
37 |
self.tableWidget.setObjectName("tableWidget") |
|
38 |
self.tableWidget.setColumnCount(0) |
|
39 |
self.tableWidget.setRowCount(0) |
|
40 |
self.verticalLayout_3.addWidget(self.tableWidget) |
|
41 |
self.textEditDescription = QtWidgets.QTextEdit(self.groupBox_2) |
|
42 |
self.textEditDescription.setMaximumSize(QtCore.QSize(16777215, 55)) |
|
43 |
self.textEditDescription.setReadOnly(True) |
|
44 |
self.textEditDescription.setObjectName("textEditDescription") |
|
45 |
self.verticalLayout_3.addWidget(self.textEditDescription) |
|
46 |
self.verticalLayout_2.addWidget(self.groupBox_2) |
|
28 | 47 |
self.groupBox = QtWidgets.QGroupBox(Dialog) |
29 | 48 |
self.groupBox.setMinimumSize(QtCore.QSize(0, 360)) |
30 | 49 |
self.groupBox.setMaximumSize(QtCore.QSize(16777215, 360)) |
... | ... | |
210 | 229 |
self.label_3.setGeometry(QtCore.QRect(10, 25, 236, 271)) |
211 | 230 |
self.label_3.setObjectName("label_3") |
212 | 231 |
self.gridLayout_4.addWidget(self.groupBox_5, 0, 2, 1, 1) |
213 |
self.gridLayout.addWidget(self.groupBox, 1, 0, 1, 1) |
|
214 |
self.groupBox_2 = QtWidgets.QGroupBox(Dialog) |
|
215 |
font = QtGui.QFont() |
|
216 |
font.setBold(True) |
|
217 |
font.setWeight(75) |
|
218 |
self.groupBox_2.setFont(font) |
|
219 |
self.groupBox_2.setObjectName("groupBox_2") |
|
220 |
self.gridLayout_3 = QtWidgets.QGridLayout(self.groupBox_2) |
|
221 |
self.gridLayout_3.setObjectName("gridLayout_3") |
|
222 |
self.tableWidget = QtWidgets.QTableWidget(self.groupBox_2) |
|
223 |
self.tableWidget.setObjectName("tableWidget") |
|
224 |
self.tableWidget.setColumnCount(0) |
|
225 |
self.tableWidget.setRowCount(0) |
|
226 |
self.gridLayout_3.addWidget(self.tableWidget, 0, 0, 1, 1) |
|
227 |
self.gridLayout.addWidget(self.groupBox_2, 0, 0, 1, 1) |
|
228 |
self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1) |
|
232 |
self.verticalLayout_2.addWidget(self.groupBox) |
|
233 |
self.gridLayout_2.addLayout(self.verticalLayout_2, 0, 0, 1, 1) |
|
229 | 234 |
self.buttonBox = QtWidgets.QDialogButtonBox(Dialog) |
230 | 235 |
self.buttonBox.setOrientation(QtCore.Qt.Horizontal) |
231 | 236 |
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) |
... | ... | |
247 | 252 |
def retranslateUi(self, Dialog): |
248 | 253 |
_translate = QtCore.QCoreApplication.translate |
249 | 254 |
Dialog.setWindowTitle(_translate("Dialog", "Calculation Result")) |
255 |
self.groupBox_2.setTitle(_translate("Dialog", "Calculation Result - pressure drop")) |
|
256 |
self.textEditDescription.setHtml(_translate("Dialog", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" |
|
257 |
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" |
|
258 |
"p, li { white-space: pre-wrap; }\n" |
|
259 |
"</style></head><body style=\" font-family:\'맑은 고딕\'; font-size:9pt; font-weight:600; font-style:normal;\">\n" |
|
260 |
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Gulim\'; font-weight:400;\">In case of the rich amine feed service, </span><span style=\" font-family:\'Gulim\'; font-size:10pt;\">velocity limit is</span><span style=\" font-family:\'Gulim\'; font-size:10pt; font-weight:400;\"> </span><span style=\" font-family:\'Gulim\'; font-size:10pt;\">20 m/s</span><span style=\" font-family:\'Gulim\'; font-weight:400;\"> to avoid vibration and noise even though calculated maximum allowable velocity is higher than 20 m/s.</span></p>\n" |
|
261 |
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Gulim\'; font-weight:400;\">However, it shall be considered in general two phase lines, not only amine service.</span></p>\n" |
|
262 |
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Gulim\'; font-weight:400;\">Please consult with noise analysis specialist before fixing line size of two phase if mean velocity is higher than 20 m/s regardless calculated maximum velocity in HYTOS.</span></p></body></html>")) |
|
250 | 263 |
self.groupBox.setTitle(_translate("Dialog", "Calculation Result - Regime")) |
251 | 264 |
self.groupBox_3.setTitle(_translate("Dialog", "Vertical Upward")) |
252 | 265 |
self.label_2.setText(_translate("Dialog", "<html><head/><body><p><img src=\":/images/PressureVariation_Vertical_Upward.png\"/></p></body></html>")) |
... | ... | |
267 | 280 |
self.label_Nozzle_Loss_Unit.setText(_translate("Dialog", "-")) |
268 | 281 |
self.groupBox_5.setTitle(_translate("Dialog", "Vertical Downward")) |
269 | 282 |
self.label_3.setText(_translate("Dialog", "<html><head/><body><p><img src=\":/images/PressureVariation_Vertical_Downward.png\"/></p></body></html>")) |
270 |
self.groupBox_2.setTitle(_translate("Dialog", "Calculation Result - pressure drop")) |
|
271 | 283 |
import Resource_rc |
HYTOS/HYTOS/UI/PressureVariation.ui | ||
---|---|---|
30 | 30 |
</property> |
31 | 31 |
<layout class="QGridLayout" name="gridLayout_2"> |
32 | 32 |
<item row="0" column="0"> |
33 |
<layout class="QGridLayout" name="gridLayout"> |
|
34 |
<item row="1" column="0"> |
|
33 |
<layout class="QVBoxLayout" name="verticalLayout_2"> |
|
34 |
<item> |
|
35 |
<widget class="QGroupBox" name="groupBox_2"> |
|
36 |
<property name="font"> |
|
37 |
<font> |
|
38 |
<weight>75</weight> |
|
39 |
<bold>true</bold> |
|
40 |
</font> |
|
41 |
</property> |
|
42 |
<property name="title"> |
|
43 |
<string>Calculation Result - pressure drop</string> |
|
44 |
</property> |
|
45 |
<layout class="QVBoxLayout" name="verticalLayout_3"> |
|
46 |
<item> |
|
47 |
<widget class="QTableWidget" name="tableWidget"/> |
|
48 |
</item> |
|
49 |
<item> |
|
50 |
<widget class="QTextEdit" name="textEditDescription"> |
|
51 |
<property name="maximumSize"> |
|
52 |
<size> |
|
53 |
<width>16777215</width> |
|
54 |
<height>55</height> |
|
55 |
</size> |
|
56 |
</property> |
|
57 |
<property name="readOnly"> |
|
58 |
<bool>true</bool> |
|
59 |
</property> |
|
60 |
<property name="html"> |
|
61 |
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> |
|
62 |
<html><head><meta name="qrichtext" content="1" /><style type="text/css"> |
|
63 |
p, li { white-space: pre-wrap; } |
|
64 |
</style></head><body style=" font-family:'맑은 고딕'; font-size:9pt; font-weight:600; font-style:normal;"> |
|
65 |
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Gulim'; font-weight:400;">In case of the rich amine feed service, </span><span style=" font-family:'Gulim'; font-size:10pt;">velocity limit is</span><span style=" font-family:'Gulim'; font-size:10pt; font-weight:400;"> </span><span style=" font-family:'Gulim'; font-size:10pt;">20 m/s</span><span style=" font-family:'Gulim'; font-weight:400;"> to avoid vibration and noise even though calculated maximum allowable velocity is higher than 20 m/s.</span></p> |
|
66 |
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Gulim'; font-weight:400;">However, it shall be considered in general two phase lines, not only amine service.</span></p> |
|
67 |
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Gulim'; font-weight:400;">Please consult with noise analysis specialist before fixing line size of two phase if mean velocity is higher than 20 m/s regardless calculated maximum velocity in HYTOS.</span></p></body></html></string> |
|
68 |
</property> |
|
69 |
</widget> |
|
70 |
</item> |
|
71 |
</layout> |
|
72 |
</widget> |
|
73 |
</item> |
|
74 |
<item> |
|
35 | 75 |
<widget class="QGroupBox" name="groupBox"> |
36 | 76 |
<property name="minimumSize"> |
37 | 77 |
<size> |
... | ... | |
547 | 587 |
</layout> |
548 | 588 |
</widget> |
549 | 589 |
</item> |
550 |
<item row="0" column="0"> |
|
551 |
<widget class="QGroupBox" name="groupBox_2"> |
|
552 |
<property name="font"> |
|
553 |
<font> |
|
554 |
<weight>75</weight> |
|
555 |
<bold>true</bold> |
|
556 |
</font> |
|
557 |
</property> |
|
558 |
<property name="title"> |
|
559 |
<string>Calculation Result - pressure drop</string> |
|
560 |
</property> |
|
561 |
<layout class="QGridLayout" name="gridLayout_3"> |
|
562 |
<item row="0" column="0"> |
|
563 |
<widget class="QTableWidget" name="tableWidget"/> |
|
564 |
</item> |
|
565 |
</layout> |
|
566 |
</widget> |
|
567 |
</item> |
|
568 | 590 |
</layout> |
569 | 591 |
</item> |
570 | 592 |
<item row="1" column="0"> |
내보내기 Unified diff