프로젝트

일반

사용자정보

개정판 d5938d7a

IDd5938d7af72324be669771ecf8e3d8bb9714b77f
상위 74878e2a
하위 a045fa1a, 68e17c46

김연진이(가) 약 5년 전에 추가함

issue #1289 : Vapor Pressure Gradient

Change-Id: Ie6656195dc19462a2276fd9259e0458d0219191e

차이점 보기:

HYTOS/HYTOS/AppDocData.py
980 980

  
981 981
        return ret
982 982

  
983
    def get_pressure_variation(self, uid):
983
    def get_mixed_pressure_variation(self, uid):
984 984
        res = []
985 985
        try:
986 986
            # Creates or opens a file called mydb with a SQLite3 DB
HYTOS/HYTOS/Calculation.py
636 636
        self.geometry = geometry
637 637
        self.units = {}
638 638

  
639
        self.pressure_variation = []
639
        self.mixed_pressure_variation = []
640 640

  
641 641
        self.calc_factor = None
642 642
        self.tp_flow = None
......
1256 1256
            elif self.tp_angle > 0:
1257 1257
                self.tp_vu_regime()
1258 1258

  
1259
            self.pressure_variation[self.no][13] = self.x[self.no]
1260
            self.pressure_variation[self.no][14] = self.y[self.no]
1261
            self.pressure_variation[self.no][15] = str(self.regime[self.no])
1259
            self.mixed_pressure_variation[self.no][13] = self.x[self.no]
1260
            self.mixed_pressure_variation[self.no][14] = self.y[self.no]
1261
            self.mixed_pressure_variation[self.no][15] = str(self.regime[self.no])
1262 1262
        except Exception as ex:
1263 1263
            from App import App
1264 1264
            from AppDocData import MessageType
......
2062 2062
            dp_momen = self.dp_momen[key] if key in self.dp_momen else None
2063 2063
            total = self.total[key] if key in self.total else None
2064 2064

  
2065
            self.pressure_variation.append([element, inside_diameter, length, angle, k, pressure, void,
2065
            self.mixed_pressure_variation.append([element, inside_diameter, length, angle, k, pressure, void,
2066 2066
                                            quality, mean_den, v_density, homo_vel, max_vel, ero_vel,
2067 2067
                                            x, y, regime, dp_fric, dp_stat, dp_momen, total])
2068 2068

  
HYTOS/HYTOS/MainWindow.py
1449 1449
                                        row_no += 1
1450 1450

  
1451 1451
                                    row_no = 37
1452
                                    for row in lines[0].pressure_variation:
1452
                                    for row in lines[0].mixed_pressure_variation:
1453 1453
                                        col_no = 12
1454 1454
                                        ws.cell(row_no, col_no, str(row[0]))  # Element
1455 1455
                                        col_no += 1
HYTOS/HYTOS/PressureGradient.py
1
# -*- coding: utf-8 -*-
2

  
3
# Form implementation generated from reading ui file 'ProjectDialog.ui'
4
#
5
# Created by: PyQt5 UI code generator 5.6
6
#
7
# WARNING! All changes made in this file will be lost!
8
import sys
9
from PyQt5.QtCore import *
10
from PyQt5.QtGui import *
11
from PyQt5.QtWidgets import *
12
from PyQt5 import QtCore, QtGui, QtWidgets
13
from PyQt5.QtWidgets import *
14
import os
15
from AppDocData import AppDocData
16
import PressureGradient_UI
17
import math
18

  
19

  
20
def set_item_properties(name, alignment, color=None):
21
    if name is None:
22
        name = ''
23

  
24
    item = QTableWidgetItem(str(name))
25
    item.setTextAlignment(alignment)
26
    if color:
27
        item.setBackground(color)
28

  
29
    return item
30

  
31
def is_float(s):
32
    try:
33
        if s:
34
            float(s)
35
            return True
36
        else:
37
            return False
38
    except ValueError:
39
        return False
40

  
41

  
42
def is_blank(s):
43
    return not (s and s.strip())
44

  
45

  
46
def convert_to_fixed_point(value):
47
    if is_float(str(value)):
48
        tokens = f"{float(value):.10f}".split('.')
49
        if len(tokens) == 2:
50
            # 소수점 아래가 있을 경우 소수점 아래의 trailing zero를 제거한다.
51
            if is_blank(tokens[1].rstrip('0')):
52
                return tokens[0]
53
            else:
54
                tokens[1] = tokens[1].rstrip('0')
55
                return '.'.join(tokens)
56
        else:
57
            return tokens[0]
58
    else:
59
        return value
60

  
61
class QPressureGradient(QDialog):
62
    def __init__(self, item):
63
        QDialog.__init__(self)
64

  
65
        self.ui = PressureGradient_UI.Ui_Dialog()
66
        self.ui.setupUi(self)
67

  
68
        self.item = item
69
        self.units = {}
70

  
71
    def show_dialog(self):
72
        self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)
73

  
74
        self.init_units()
75
        self.init_pressure_gradient()
76
        self.load_data()
77

  
78
        self.exec_()
79

  
80
    def init_units(self):
81
        try:
82
            app_doc_data = AppDocData.instance()
83
            active_drawing = app_doc_data.activeDrawing
84

  
85
            for attr in active_drawing.attrs:
86
                if attr[0] == 'Units':
87
                    self.units = attr[1]
88
        except Exception as ex:
89
            from App import App
90
            from AppDocData import MessageType
91

  
92
            message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
93
                                                           sys.exc_info()[-1].tb_lineno)
94
            App.mainWnd().addMessage.emit(MessageType.Error, message)
95

  
96
    def get_barometric_pressure(self):
97
        try:
98
            unit = self.units['Pressure']
99
            if unit == 'kg/cm2':
100
                barometric_pressure = 1.033
101
            elif unit == 'bar':
102
                barometric_pressure = 1.01325
103
            elif unit == 'psi':
104
                barometric_pressure = 14.7
105
            elif unit == 'mmHg':
106
                barometric_pressure = 760
107
            elif unit == 'kPa':
108
                barometric_pressure = 101.325
109
            elif unit == 'MPa':
110
                barometric_pressure = 0.101325
111

  
112
            return barometric_pressure
113
        except Exception as ex:
114
            from App import App
115
            from AppDocData import MessageType
116

  
117
            message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
118
                                                           sys.exc_info()[-1].tb_lineno)
119
            App.mainWnd().addMessage.emit(MessageType.Error, message)
120

  
121
    def load_data(self):
122
        try:
123
            pressure_gradient = self.item.vapor_pressure_gradient
124
            if pressure_gradient:
125
                baro_p = self.get_barometric_pressure()
126
                for i in range(len(pressure_gradient)):
127
                    data = pressure_gradient[i]
128
                    if i == 0:
129
                        self.add_data(data[0] - baro_p, data[1], data[2], '', '')
130
                    else:
131
                        prev_length = 0 if is_blank(str(pressure_gradient[i - 1][3])) else pressure_gradient[i - 1][3]
132
                        distance = prev_length + data[3]
133
                        self.add_data(data[0] - baro_p, data[1], data[2], data[3], distance)
134
        except Exception as ex:
135
            from App import App
136
            from AppDocData import MessageType
137

  
138
            message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
139
                                                           sys.exc_info()[-1].tb_lineno)
140
            App.mainWnd().addMessage.emit(MessageType.Error, message)
141

  
142
    def init_pressure_gradient(self):
143
        try:
144
            self.ui.tableWidget.setColumnCount(5)
145
            self.ui.tableWidget.setHorizontalHeaderLabels(['Pressure(g)\n {}(g)'.format(self.units['Pressure']), 'Velocity\n {}'.format(self.units['Velocity']),
146
                                                           'Density\n {}'.format(self.units['Density']), 'Length\n {}'.format(self.units['Length']),
147
                                                           'Distance\n {}'.format(self.units['Length'])])
148
            self.ui.tableWidget.verticalHeader().setVisible(False)
149
            self.ui.tableWidget.setSelectionMode(QAbstractItemView.SingleSelection)
150
            self.ui.tableWidget.setSelectionBehavior(QAbstractItemView.SelectRows)
151
            self.ui.tableWidget.setEditTriggers(QAbstractItemView.NoEditTriggers)
152
            # self.ui.tableWidget.horizontalHeaderItem(1).setSizeHint(QSize(120, 30))
153
            self.ui.tableWidget.horizontalHeader().setStretchLastSection(True)
154
        except Exception as ex:
155
            from App import App
156
            from AppDocData import MessageType
157

  
158
            message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
159
                                                           sys.exc_info()[-1].tb_lineno)
160
            App.mainWnd().addMessage.emit(MessageType.Error, message)
161

  
162
    def add_data(self, pressure, velocity, density, length, distance):
163
        try:
164
            row = self.ui.tableWidget.rowCount()
165
            self.ui.tableWidget.setRowCount(row + 1)
166

  
167
            self.ui.tableWidget.setItem(row, 0, set_item_properties(convert_to_fixed_point(pressure),
168
                                                                    Qt.AlignRight | Qt.AlignVCenter))
169
            self.ui.tableWidget.setItem(row, 1, set_item_properties(convert_to_fixed_point(velocity),
170
                                                                    Qt.AlignRight | Qt.AlignVCenter))
171
            self.ui.tableWidget.setItem(row, 2, set_item_properties(convert_to_fixed_point(density),
172
                                                                    Qt.AlignRight | Qt.AlignVCenter))
173
            self.ui.tableWidget.setItem(row, 3, set_item_properties(convert_to_fixed_point(length),
174
                                                                    Qt.AlignRight | Qt.AlignVCenter))
175
            self.ui.tableWidget.setItem(row, 4, set_item_properties(convert_to_fixed_point(distance),
176
                                                                    Qt.AlignRight | Qt.AlignVCenter))
177

  
178
            self.ui.tableWidget.resizeRowsToContents()
179
            # self.ui.tableWidget.resizeColumnsToContents()
180
        except Exception as ex:
181
            from App import App
182
            from AppDocData import MessageType
183

  
184
            message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
185
                                                           sys.exc_info()[-1].tb_lineno)
186
            App.mainWnd().addMessage.emit(MessageType.Error, message)
187

  
188
    def accept(self):
189
        QDialog.accept(self)
190

  
191
    def reject(self):
192
        QDialog.reject(self)
193

  
HYTOS/HYTOS/PressureGradient_UI.py
1
# -*- coding: utf-8 -*-
2

  
3
# Form implementation generated from reading ui file '.\UI\PressureGradient.ui'
4
#
5
# Created by: PyQt5 UI code generator 5.13.0
6
#
7
# WARNING! All changes made in this file will be lost!
8

  
9

  
10
from PyQt5 import QtCore, QtGui, QtWidgets
11

  
12

  
13
class Ui_Dialog(object):
14
    def setupUi(self, Dialog):
15
        Dialog.setObjectName("Dialog")
16
        Dialog.resize(528, 330)
17
        font = QtGui.QFont()
18
        font.setFamily("맑은 고딕")
19
        Dialog.setFont(font)
20
        icon = QtGui.QIcon()
21
        icon.addPixmap(QtGui.QPixmap(":/images/HYTOS.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
22
        Dialog.setWindowIcon(icon)
23
        self.gridLayout = QtWidgets.QGridLayout(Dialog)
24
        self.gridLayout.setObjectName("gridLayout")
25
        self.verticalLayout = QtWidgets.QVBoxLayout()
26
        self.verticalLayout.setObjectName("verticalLayout")
27
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
28
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
29
        self.tableWidget = QtWidgets.QTableWidget(Dialog)
30
        self.tableWidget.setObjectName("tableWidget")
31
        self.tableWidget.setColumnCount(0)
32
        self.tableWidget.setRowCount(0)
33
        self.horizontalLayout_2.addWidget(self.tableWidget)
34
        self.verticalLayout.addLayout(self.horizontalLayout_2)
35
        self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)
36
        self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
37
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
38
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
39
        self.buttonBox.setObjectName("buttonBox")
40
        self.gridLayout.addWidget(self.buttonBox, 1, 0, 1, 1)
41

  
42
        self.retranslateUi(Dialog)
43
        self.buttonBox.accepted.connect(Dialog.accept)
44
        self.buttonBox.rejected.connect(Dialog.reject)
45
        QtCore.QMetaObject.connectSlotsByName(Dialog)
46

  
47
    def retranslateUi(self, Dialog):
48
        _translate = QtCore.QCoreApplication.translate
49
        Dialog.setWindowTitle(_translate("Dialog", "Vapor Line Pressure Gradient"))
50
import Resource_rc
HYTOS/HYTOS/PressureVariation.py
185 185
            dp_display_noz = 0
186 186

  
187 187
            no = 0
188
            for row in self.item.pressure_variation:
188
            for row in self.item.mixed_pressure_variation:
189 189
                data = list(row)
190 190
                data[0] = row[0]  # element
191 191
                data[1] = row[1]  # diameter
HYTOS/HYTOS/Shapes/EngineeringLoopItem.py
887 887
            elif pressure_unit == 'MPa':
888 888
                self.pressure_drops[self.items[i]] = (press1 - press2) / 10.33 * 0.101325
889 889

  
890
            # Vapor DB에 입력
891
            vapor_pressure_gradient = []
892

  
893
            if pressure_unit == 'kg/cm2':
894
                vapor_pressure = round(press2, 3)
895
            elif pressure_unit == 'psi':
896
                vapor_pressure = round(press2 / 1.033 * 14.7, 3)
897
            elif pressure_unit == 'atm':
898
                vapor_pressure = round(press2 / 1.033, 3)
899
            elif pressure_unit == 'bar':
900
                vapor_pressure = round(press2 / 1.033 * 1.033, 3)
901
            elif pressure_unit == 'mmHg':
902
                vapor_pressure = round(press2 / 1.033 * 760)
903
            elif pressure_unit == 'kPa':
904
                vapor_pressure = round(press2 / 1.033 * 101.325, 3)
905
            elif pressure_unit == 'MPa':
906
                vapor_pressure = round(press2 / 10.33 * 0.101325, 3)
907

  
908
            velocity_unit = self.units['Velocity']
909
            if velocity_unit == 'm/s':
910
                vapor_velocity = round(self.items[i].data.velocity, 3)
911
            elif velocity_unit == 'ft/s':
912
                vapor_velocity = round(self.items[i].data.velocity * 3.28084, 3)
913

  
914
            density_unit = self.units['Density']
915
            if density_unit == 'kg/m3':
916
                vapor_density = round(self.density_elevations[self.items[i]], 3)
917
            elif density_unit == 'lb/ft3':
918
                vapor_density = round(self.density_elevations[self.items[i]] * 0.062428, 3)
919

  
920
            vapor_pressure_gradient.append([vapor_pressure, vapor_velocity, vapor_density, ''])
921

  
922
            if pressure_unit == 'kg/cm2':
923
                vapor_pressure = round(press1, 3)
924
            elif pressure_unit == 'psi':
925
                vapor_pressure = round(press1 / 1.033 * 14.7, 3)
926
            elif pressure_unit == 'atm':
927
                vapor_pressure = round(press1 / 1.033, 3)
928
            elif pressure_unit == 'bar':
929
                vapor_pressure = round(press1 / 1.033 * 1.033, 3)
930
            elif pressure_unit == 'mmHg':
931
                vapor_pressure = round(press1 / 1.033 * 760)
932
            elif pressure_unit == 'kPa':
933
                vapor_pressure = round(press1 / 1.033 * 101.325, 3)
934
            elif pressure_unit == 'MPa':
935
                vapor_pressure = round(press1 / 10.33 * 0.101325, 3)
936

  
937
            if velocity_unit == 'm/s':
938
                vapor_velocity = round(press1 * self.items[i].data.velocity / press2, 3)
939
            elif velocity_unit == 'ft/s':
940
                vapor_velocity = round(press1 * self.items[i].data.velocity / press2 * 3.28084, 3)
941

  
942
            if density_unit == 'kg/m3':
943
                vapor_density = round(press1 * self.density_elevations[self.items[i]] / press2, 3)
944
            elif density_unit == 'lb/ft3':
945
                vapor_density = round(press1 * self.density_elevations[self.items[i]] / press2 * 0.062428, 3)
946

  
947
            if length_unit == 'm':
948
                vapor_length = round(length, 3)
949
            elif length_unit == 'in':
950
                vapor_length = round(length * 39.3701, 3)
951
            elif length_unit == 'ft':
952
                vapor_length = round(length * 3.28084, 3)
953
            elif length_unit == 'yd':
954
                vapor_length = round(length * 1.09361, 3)
955
            elif length_unit == 'mile':
956
                vapor_length = round(length * 0.000621371, 3)
957
            elif length_unit == 'mm':
958
                vapor_length = round(length * 1000, 3)
959

  
960
            vapor_pressure_gradient.append([vapor_pressure, vapor_velocity, vapor_density, vapor_length])
961

  
962
            if self.items[i].vapor_pressure_gradient is None:
963
                self.items[i].vapor_pressure_gradient = vapor_pressure_gradient
964

  
890 965
            self.discharge_p_cal(i)
891 966

  
892 967
        except Exception as ex:
......
895 970
                                                           sys.exc_info()[-1].tb_lineno)
896 971
            App.mainWnd().addMessage.emit(MessageType.Error, message)
897 972

  
973
    def vproperty_input(self, vapor_pressure_gradient, press2, density2, velocity, length):
974
        try:
975
            vapor_pressure = round(press2, 3)
976
            vapor_density = round(density2, 3)
977
            vapor_velocity = round(velocity, 3)
978

  
979
            length_unit = self.units['Length']
980
            if length_unit == 'm':
981
                vapor_length = round(length, 3)
982
            elif length_unit == 'in':
983
                vapor_length = round(length * 39.3701, 3)
984
            elif length_unit == 'ft':
985
                vapor_length = round(length * 3.28084, 3)
986
            elif length_unit == 'yd':
987
                vapor_length = round(length * 1.09361, 3)
988
            elif length_unit == 'mile':
989
                vapor_length = round(length * 0.000621371, 3)
990
            elif length_unit == 'mm':
991
                vapor_length = round(length * 1000, 3)
992

  
993
            vapor_pressure_gradient.append([vapor_pressure, vapor_velocity, vapor_density, vapor_length])
994
        except Exception as ex:
995
            from App import App
996
            message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
997
                                                           sys.exc_info()[-1].tb_lineno)
998
            App.mainWnd().addMessage.emit(MessageType.Error, message)
999

  
898 1000
    def vproperty_recal(self, press1, mw, temp, z, ida, mass):
899 1001

  
900 1002
        press2 = press1
......
914 1016

  
915 1017
            trial_length.append(estlength)
916 1018

  
1019
            # Vapor DB에 입력
1020
            vapor_pressure_gradient = []
1021

  
1022
            pressure_unit = self.units['Pressure']
1023
            if pressure_unit == 'kg/cm2':
1024
                vapor_pressure = round(press2, 3)
1025
            elif pressure_unit == 'psi':
1026
                vapor_pressure = round(press2 / 1.033 * 14.7, 3)
1027
            elif pressure_unit == 'atm':
1028
                vapor_pressure = round(press2 / 1.033, 3)
1029
            elif pressure_unit == 'bar':
1030
                vapor_pressure = round(press2 / 1.033 * 1.033, 3)
1031
            elif pressure_unit == 'mmHg':
1032
                vapor_pressure = round(press2 / 1.033 * 760)
1033
            elif pressure_unit == 'kPa':
1034
                vapor_pressure = round(press2 / 1.033 * 101.325, 3)
1035
            elif pressure_unit == 'MPa':
1036
                vapor_pressure = round(press2 / 10.33 * 0.101325, 3)
1037

  
1038
            velocity_unit = self.units['Velocity']
1039
            if velocity_unit == 'm/s':
1040
                vapor_velocity = round(self.items[i].data.velocity, 3)
1041
            elif velocity_unit == 'ft/s':
1042
                vapor_velocity = round(self.items[i].data.velocity * 3.28084, 3)
1043

  
1044
            density_unit = self.units['Density']
1045
            if density_unit == 'kg/m3':
1046
                vapor_density = round(self.density_elevations[self.items[i]], 3)
1047
            elif density_unit == 'lb/ft3':
1048
                vapor_density = round(self.density_elevations[self.items[i]] * 0.062428, 3)
1049

  
1050
            vapor_pressure_gradient.append([vapor_pressure, vapor_velocity, vapor_density, ''])
1051

  
917 1052
            # 'press2 재정의 끝
918 1053
            press2, density2, velocity = self.vproperty_recal(press2 / 0.95, mw, temp, z, ida, mass)
1054
            self.vproperty_input(vapor_pressure_gradient, press2, density2, velocity, estlength)
919 1055

  
920 1056
            for j in range(1, 100):
921 1057
                press1est = press2 / 0.95
......
930 1066
                    remain_length = equivalent_length - trial_length[j - 1]
931 1067
                    press1 = self.Vap_Discharge_1(press2, g, mw, temp, f, z, ida, remain_length)
932 1068
                    press2, density2, velocity = self.vproperty_recal(press1, mw, temp, z, ida, mass)
1069
                    self.vproperty_input(vapor_pressure_gradient, press2, density2, velocity, remain_length)
933 1070
                    break
934 1071
                else:
935 1072
                    press1 = self.Vap_Discharge_1(press2, g, mw, temp, f, z, ida, estlength)
936 1073
                    press2, density2, velocity = self.vproperty_recal(press1, mw, temp, z, ida, mass)
1074
                    self.vproperty_input(vapor_pressure_gradient, press2, density2, velocity, estlength)
1075

  
1076
            if self.items[i].vapor_pressure_gradient is None:
1077
                self.items[i].vapor_pressure_gradient = vapor_pressure_gradient
937 1078

  
938 1079
            self.pressure_drops[self.items[i]] = press2 - ori_press2
939 1080

  
......
1181 1322
                    # pressure drop
1182 1323
                    if self.items[i].data.pressure_drop is not None:
1183 1324
                        self.pressure_drops[self.items[i]] = self.items[i].data.pressure_drop
1184
                    else:
1185
                        name = str(self.items[i])[:3]
1186
                        if name not in ('L_K', 'L_P', 'R_P', 'V_P', 'CV_'):
1187
                            self.pressure_drops[self.items[i]] = 0
1188 1325

  
1189 1326
                    # elevation
1190 1327
                    if self.items[i].data.elevation is None:
......
1533 1670
            else:
1534 1671
                # '끊어서 계산하는 모듈이 들어가야함
1535 1672
                # 'length 여유 없음. 압력 재계산->밀도 재계산->re, f 재계산->압력 재계산 체계로 가야함
1536
                self.suction_vap_dp_cal2(i, press2, g, mw, temp, f, z, ida)
1673
                self.suction_vap_dp_cal2(i, press2, g, mw, temp, f, z, ida, estlength, mass, density1est, equivalent_length)
1537 1674

  
1538 1675
        except Exception as ex:
1539 1676
            from App import App
......
1541 1678
                                                           sys.exc_info()[-1].tb_lineno)
1542 1679
            App.mainWnd().addMessage.emit(MessageType.Error, message)
1543 1680

  
1544
    def suction_vap_dp_cal2(self, i, press2, g, mw, temp, f, z, ida):
1545
        # 끊은 결과 length 여유가 없음, 고로 물성치 (밀도) 를 재계산해주어야 함
1681
    def suction_vap_dp_cal2(self, i, press2, g, mw, temp, f, z, ida, estlength, mass, density1est, equivalent_length):
1682
        try:
1683
            # 끊은 결과 length 여유가 없음, 고로 물성치 (밀도) 를 재계산해주어야 함
1684

  
1685
            ori_press2 = press2
1686
            trial_length = []
1687
            trial_length.append(estlength)
1546 1688

  
1547
        pass
1689
            # Vapor DB에 입력
1690
            vapor_pressure_gradient = []
1691

  
1692
            pressure_unit = self.units['Pressure']
1693
            if pressure_unit == 'kg/cm2':
1694
                vapor_pressure = round(press2, 3)
1695
            elif pressure_unit == 'psi':
1696
                vapor_pressure = round(press2 / 1.033 * 14.7, 3)
1697
            elif pressure_unit == 'atm':
1698
                vapor_pressure = round(press2 / 1.033, 3)
1699
            elif pressure_unit == 'bar':
1700
                vapor_pressure = round(press2 / 1.033 * 1.033, 3)
1701
            elif pressure_unit == 'mmHg':
1702
                vapor_pressure = round(press2 / 1.033 * 760)
1703
            elif pressure_unit == 'kPa':
1704
                vapor_pressure = round(press2 / 1.033 * 101.325, 3)
1705
            elif pressure_unit == 'MPa':
1706
                vapor_pressure = round(press2 / 10.33 * 0.101325, 3)
1707

  
1708
            velocity_unit = self.units['Velocity']
1709
            if velocity_unit == 'm/s':
1710
                vapor_velocity = round(self.items[i].data.velocity, 3)
1711
            elif velocity_unit == 'ft/s':
1712
                vapor_velocity = round(self.items[i].data.velocity * 3.28084, 3)
1713

  
1714
            density_unit = self.units['Density']
1715
            if density_unit == 'kg/m3':
1716
                vapor_density = round(self.density_elevations[self.items[i]], 3)
1717
            elif density_unit == 'lb/ft3':
1718
                vapor_density = round(self.density_elevations[self.items[i]] * 0.062428, 3)
1719

  
1720
            vapor_pressure_gradient.append([vapor_pressure, vapor_velocity, vapor_density, ''])
1721

  
1722
            # 'press2 재정의 끝
1723
            press2, density2, velocity = self.vproperty_recal(press2 * 0.95, mw, temp, z, ida, mass)
1724
            self.vproperty_input(vapor_pressure_gradient, press2, density2, velocity, estlength)
1725

  
1726
            for j in range(1, 100):
1727
                press1est = press2 * 0.95
1728

  
1729
                if press2 < 0:
1730
                    raise ValueError('{} : Calculation is terminated'.format(self.items[i]))
1731

  
1732
                estlength = abs((((
1733
                                      press1est ** 2 - press2 ** 2) * mw / g ** 2 / 0.08206 / 1.033 ** 2 / temp / z * 101325) - (
1734
                                     2 * math.log(density1est / density2))) * ida / f)
1735

  
1736
                trial_length.append(trial_length[j - 1] + estlength)
1737

  
1738
                if trial_length[j] > equivalent_length:
1739
                    remain_length = equivalent_length - trial_length[j - 1]
1740
                    press1 = self.Vap_Suction_1(press2, g, mw, temp, f, z, ida, remain_length)
1741
                    press2, density2, velocity = self.vproperty_recal(press1, mw, temp, z, ida, mass)
1742
                    self.vproperty_input(vapor_pressure_gradient, press2, density2, velocity, remain_length)
1743
                    break
1744
                else:
1745
                    press1 = self.Vap_Suction_1(press2, g, mw, temp, f, z, ida, estlength)
1746
                    press2, density2, velocity = self.vproperty_recal(press1, mw, temp, z, ida, mass)
1747
                    self.vproperty_input(vapor_pressure_gradient, press2, density2, velocity, estlength)
1748

  
1749
            if self.items[i].vapor_pressure_gradient is None:
1750
                self.items[i].vapor_pressure_gradient = vapor_pressure_gradient
1751

  
1752
            self.pressure_drops[self.items[i]] = press2 - ori_press2
1753

  
1754
        except Exception as ex:
1755
            from App import App
1756
            message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
1757
                                                           sys.exc_info()[-1].tb_lineno)
1758
            App.mainWnd().addMessage.emit(MessageType.Error, message)
1548 1759

  
1549 1760
    def suction_vap_dp_cal1(self, i, press2, g, mw, temp, f, z, ida):
1550 1761
        try:
......
1584 1795
            elif pressure_unit == 'MPa':
1585 1796
                self.pressure_drops[self.items[i]] = (press2 - press1) / 10.33 * 0.101325
1586 1797

  
1798
            # Vapor DB에 입력
1799
            vapor_pressure_gradient = []
1800

  
1801
            if pressure_unit == 'kg/cm2':
1802
                vapor_pressure = round(press2, 3)
1803
            elif pressure_unit == 'psi':
1804
                vapor_pressure = round(press2 / 1.033 * 14.7, 3)
1805
            elif pressure_unit == 'atm':
1806
                vapor_pressure = round(press2 / 1.033, 3)
1807
            elif pressure_unit == 'bar':
1808
                vapor_pressure = round(press2 / 1.033 * 1.033, 3)
1809
            elif pressure_unit == 'mmHg':
1810
                vapor_pressure = round(press2 / 1.033 * 760)
1811
            elif pressure_unit == 'kPa':
1812
                vapor_pressure = round(press2 / 1.033 * 101.325, 3)
1813
            elif pressure_unit == 'MPa':
1814
                vapor_pressure = round(press2 / 10.33 * 0.101325, 3)
1815

  
1816
            velocity_unit = self.units['Velocity']
1817
            if velocity_unit == 'm/s':
1818
                vapor_velocity = round(self.items[i].data.velocity, 3)
1819
            elif velocity_unit == 'ft/s':
1820
                vapor_velocity = round(self.items[i].data.velocity * 3.28084, 3)
1821

  
1822
            density_unit = self.units['Density']
1823
            if density_unit == 'kg/m3':
1824
                vapor_density = round(self.density_elevations[self.items[i]], 3)
1825
            elif density_unit == 'lb/ft3':
1826
                vapor_density = round(self.density_elevations[self.items[i]] * 0.062428, 3)
1827

  
1828
            vapor_pressure_gradient.append([vapor_pressure, vapor_velocity, vapor_density, ''])
1829

  
1830
            if pressure_unit == 'kg/cm2':
1831
                vapor_pressure = round(press1, 3)
1832
            elif pressure_unit == 'psi':
1833
                vapor_pressure = round(press1 / 1.033 * 14.7, 3)
1834
            elif pressure_unit == 'atm':
1835
                vapor_pressure = round(press1 / 1.033, 3)
1836
            elif pressure_unit == 'bar':
1837
                vapor_pressure = round(press1 / 1.033 * 1.033, 3)
1838
            elif pressure_unit == 'mmHg':
1839
                vapor_pressure = round(press1 / 1.033 * 760)
1840
            elif pressure_unit == 'kPa':
1841
                vapor_pressure = round(press1 / 1.033 * 101.325, 3)
1842
            elif pressure_unit == 'MPa':
1843
                vapor_pressure = round(press1 / 10.33 * 0.101325, 3)
1844

  
1845
            if velocity_unit == 'm/s':
1846
                vapor_velocity = round(press1 * self.items[i].data.velocity / press2, 3)
1847
            elif velocity_unit == 'ft/s':
1848
                vapor_velocity = round(press1 * self.items[i].data.velocity / press2 * 3.28084, 3)
1849

  
1850
            if density_unit == 'kg/m3':
1851
                vapor_density = round(press1 * self.density_elevations[self.items[i]] / press2, 3)
1852
            elif density_unit == 'lb/ft3':
1853
                vapor_density = round(press1 * self.density_elevations[self.items[i]] / press2 * 0.062428, 3)
1854

  
1855
            if length_unit == 'm':
1856
                vapor_length = round(length, 3)
1857
            elif length_unit == 'in':
1858
                vapor_length = round(length * 39.3701, 3)
1859
            elif length_unit == 'ft':
1860
                vapor_length = round(length * 3.28084, 3)
1861
            elif length_unit == 'yd':
1862
                vapor_length = round(length * 1.09361, 3)
1863
            elif length_unit == 'mile':
1864
                vapor_length = round(length * 0.000621371, 3)
1865
            elif length_unit == 'mm':
1866
                vapor_length = round(length * 1000, 3)
1867

  
1868
            vapor_pressure_gradient.append([vapor_pressure, vapor_velocity, vapor_density, vapor_length])
1869

  
1870
            if self.items[i].vapor_pressure_gradient is None:
1871
                self.items[i].vapor_pressure_gradient = vapor_pressure_gradient
1872

  
1587 1873
            self.suction_p_cal(i)
1588 1874
        except Exception as ex:
1589 1875
            from App import App
HYTOS/HYTOS/Shapes/EngineeringStreamlineItem.py
56 56

  
57 57
            self._fittings = None
58 58
            self._mixed_geometry = None
59
            self._pressure_variation = None
59
            self._mixed_pressure_variation = None
60
            self._vapor_pressure_gradient = None
60 61

  
61 62
            self.transfer = Transfer()
62 63
            self.setZValue(QEngineeringStreamlineItem.ZVALUE)
......
93 94
        self._mixed_geometry = value
94 95

  
95 96
    @property
96
    def pressure_variation(self):
97
        return self._pressure_variation
97
    def mixed_pressure_variation(self):
98
        return self._mixed_pressure_variation
99

  
100
    @mixed_pressure_variation.setter
101
    def mixed_pressure_variation(self, value):
102
        self._mixed_pressure_variation = value
103

  
104
    @property
105
    def vapor_pressure_gradient(self):
106
        return self._vapor_pressure_gradient
107

  
108
    @vapor_pressure_gradient.setter
109
    def vapor_pressure_gradient(self, value):
110
        self._vapor_pressure_gradient = value
98 111

  
99
    @pressure_variation.setter
100
    def pressure_variation(self, value):
101
        self._pressure_variation = value
102 112

  
103 113
    @property
104 114
    def stream_no(self):
......
150 160
        res = None
151 161

  
152 162
        if self.data and self.data.phase_type == 'Mixed':
153
            res = None if self.pressure_variation else [[self, 'need to check pressure variation']]
163
            res = None if self.mixed_pressure_variation else [[self, 'need to check pressure variation']]
154 164

  
155 165
        return res
156 166

  
......
265 275
        self._pt = None
266 276
        self.isCreated = False
267 277

  
268
    def set_pressure_variation(self):
278
    def set_mixed_pressure_variation(self):
269 279
        from AppDocData import AppDocData
270 280

  
271 281
        res = []
272 282

  
273 283
        app_doc_data = AppDocData.instance()
274
        pressure_variation = app_doc_data.get_pressure_variation(self.uid)
275
        '''
276
        for row in pressure_variation:
277
            res.append((row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7], row[8], row[9],
278
                        row[10], row[11], row[12], row[13], row[14], row[15], row[16], row[17], row[18], row[19]))
279
        '''
284
        mixed_pressure_variation = app_doc_data.get_mixed_pressure_variation(self.uid)
280 285

  
281
        self.pressure_variation = pressure_variation
286
        self.mixed_pressure_variation = mixed_pressure_variation
282 287

  
283 288
    def set_mixed_geometry(self):
284 289
        from AppDocData import AppDocData
......
954 959
                    res.append((sql, tuple(param)))
955 960

  
956 961
            # save pressure variation
957
            if self.pressure_variation:
958
                for row in self.pressure_variation:
962
            if self.mixed_pressure_variation:
963
                for row in self.mixed_pressure_variation:
959 964
                    cols = ['UID', 'Components_UID', 'Element', 'Inside_Pipe_Size', 'Length', 'Angle', 'K', 'Pressure',
960 965
                            'Void', 'Quality', 'Density', 'V_Den', 'Mean_Vel', 'Max_Vel', 'Ero_Vel', 'Pattern_X',
961 966
                            'Pattern_Y', 'Regime', 'Friction', 'Gravity', 'Momentum', 'Total']
......
1010 1015
            item.build_connectors(connectorItems, pointsUids)
1011 1016
            item.set_fittings()
1012 1017
            item.set_mixed_geometry()
1013
            item.set_pressure_variation()
1018
            item.set_mixed_pressure_variation()
1014 1019
            item.update()
1015 1020

  
1016 1021
        except Exception as ex:
HYTOS/HYTOS/StreamDataDialog.py
123 123
        self.ui.pushButton_Copy_Stream.clicked.connect(self.show_copy_stream_dialog)
124 124
        self.ui.pushButton_Calculation.clicked.connect(self.mixed_type_calculation)
125 125
        self.ui.pushButton_view.clicked.connect(self.show_result_dialog)
126
        self.ui.pushButton_Pressure_Gradient.clicked.connect(self.show_pressure_gradient_dialog)
126 127
        self.ui.lineEdit_Equivalent_Length_Input.textChanged.connect(self.equivalent_length_change_event)
127 128
        self.ui.lineEdit_Flowrate_Mass_Liquid.textChanged.connect(self.flowrate_change_event)
128 129
        self.ui.lineEdit_Flowrate_Volume.textChanged.connect(self.flowrate_change_event)
......
529 530
    def show_result_dialog(self):
530 531
        from PressureVariation import QPressureVariation
531 532

  
532
        if self.item.pressure_variation:
533
        if self.item.mixed_pressure_variation:
533 534
            dlg = QPressureVariation()
534 535
            dlg.show_dialog(self.item)
535 536
        else:
......
570 571
                if is_not_blank(process['v_density']):
571 572
                    if is_not_blank(process['tp_pressure']):
572 573
                        res = Calculation_Mixed(self.item, process, self.ui.tableWidget_GeometryData_Mixed)
573
                        self.item.pressure_variation = res.pressure_variation
574
                        self.item.mixed_pressure_variation = res.mixed_pressure_variation
574 575
                        QMessageBox.information(self, self.tr("Information"),
575 576
                                                self.tr("Calculation completed successfully."))
576 577
                    else:
......
581 582
                    if is_not_blank(process['tp_pressure']) and is_not_blank(process['v_temp']) and is_not_blank(
582 583
                            process['v_mw']) and is_not_blank(process['v_z']):
583 584
                        res = Calculation_Mixed(self.item, process, self.ui.tableWidget_GeometryData_Mixed)
584
                        self.item.pressure_variation = res.pressure_variation
585
                        self.item.mixed_pressure_variation = res.mixed_pressure_variation
585 586
                        QMessageBox.information(self, self.tr("Information"),
586 587
                                                self.tr("Calculation completed successfully."))
587 588
                    else:
......
792 793
            App.mainWnd().addMessage.emit(MessageType.Error, message)
793 794
        '''
794 795

  
796
    def show_pressure_gradient_dialog(self):
797
        from PressureGradient import QPressureGradient
798

  
799
        dialog = QPressureGradient(self.item)
800
        dialog.show_dialog()
801

  
795 802
    def show_fitting_dialog(self):
796 803
        from FittingsDialog import QFittingsDialog
797 804

  
......
1131 1138
            self.ui.pushButton_Diameter_Estimation.setVisible(True)
1132 1139
            self.ui.pushButton_Copy_Stream.setVisible(True)
1133 1140
            self.ui.groupBox_ProcessData_Liquid.setVisible(False)
1141
            self.ui.pushButton_Pressure_Gradient.setVisible(True)
1134 1142

  
1135 1143
            self.ui.groupBox_ProcessData_Mixed.setVisible(False)
1136 1144
            self.ui.groupBox_GeometryData_Mixed.setVisible(False)
......
1145 1153
            self.ui.pushButton_Diameter_Estimation.setVisible(True)
1146 1154
            self.ui.pushButton_Copy_Stream.setVisible(True)
1147 1155
            self.ui.groupBox_ProcessData_Vapor.setVisible(False)
1156
            self.ui.pushButton_Pressure_Gradient.setVisible(False)
1148 1157

  
1149 1158
            self.ui.groupBox_ProcessData_Mixed.setVisible(False)
1150 1159
            self.ui.groupBox_GeometryData_Mixed.setVisible(False)
......
1563 1572
        # Mixed Type Check
1564 1573
        phase_type = self.ui.comboBox_PhaseType.currentData()
1565 1574
        if phase_type == 'Mixed':
1566
            if self.item.pressure_variation is None:
1575
            if self.item.mixed_pressure_variation is None:
1567 1576
                QMessageBox.information(self, self.tr("Information"), self.tr("Calculate this line !"))
1568 1577
                return
1569 1578

  
HYTOS/HYTOS/StreamData_UI.py
322 322
        self.verticalLayout_4.addLayout(self.horizontalLayout_9)
323 323
        self.horizontalLayout = QtWidgets.QHBoxLayout()
324 324
        self.horizontalLayout.setObjectName("horizontalLayout")
325
        self.pushButton = QtWidgets.QPushButton(self.groupBox_GeometryData)
325
        self.pushButton_Pressure_Gradient = QtWidgets.QPushButton(self.groupBox_GeometryData)
326 326
        font = QtGui.QFont()
327 327
        font.setBold(False)
328 328
        font.setWeight(50)
329
        self.pushButton.setFont(font)
330
        self.pushButton.setObjectName("pushButton")
331
        self.horizontalLayout.addWidget(self.pushButton)
329
        self.pushButton_Pressure_Gradient.setFont(font)
330
        self.pushButton_Pressure_Gradient.setObjectName("pushButton_Pressure_Gradient")
331
        self.horizontalLayout.addWidget(self.pushButton_Pressure_Gradient)
332 332
        self.verticalLayout_4.addLayout(self.horizontalLayout)
333 333
        spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
334 334
        self.verticalLayout_4.addItem(spacerItem3)
......
1148 1148
        Dialog.setTabOrder(self.lineEdit_Equivalent_Length_Input, self.pushButton_Fitting)
1149 1149
        Dialog.setTabOrder(self.pushButton_Fitting, self.lineEdit_Fitting_Length)
1150 1150
        Dialog.setTabOrder(self.lineEdit_Fitting_Length, self.lineEdit_Equivalent_Length_Cal)
1151
        Dialog.setTabOrder(self.lineEdit_Equivalent_Length_Cal, self.pushButton)
1152
        Dialog.setTabOrder(self.pushButton, self.pushButton_Line_Sizing)
1151
        Dialog.setTabOrder(self.lineEdit_Equivalent_Length_Cal, self.pushButton_Pressure_Gradient)
1152
        Dialog.setTabOrder(self.pushButton_Pressure_Gradient, self.pushButton_Line_Sizing)
1153 1153
        Dialog.setTabOrder(self.pushButton_Line_Sizing, self.pushButton_Calculation)
1154 1154
        Dialog.setTabOrder(self.pushButton_Calculation, self.pushButton_Diameter_Estimation)
1155 1155
        Dialog.setTabOrder(self.pushButton_Diameter_Estimation, self.pushButton_Copy_Stream)
......
1192 1192
        self.label_13.setText(_translate("Dialog", "K :"))
1193 1193
        self.label_9.setText(_translate("Dialog", "Equiv. Length (Cal\'d) :"))
1194 1194
        self.label_Equivalent_Lenght_Cal_Unit.setText(_translate("Dialog", "-"))
1195
        self.pushButton.setText(_translate("Dialog", "View Pressure Gradient ..."))
1195
        self.pushButton_Pressure_Gradient.setText(_translate("Dialog", "View Pressure Gradient ..."))
1196 1196
        self.groupBox_ProcessData_Liquid.setTitle(_translate("Dialog", "Process Data"))
1197 1197
        self.label_31.setText(_translate("Dialog", "Flowrate (Mass) :"))
1198 1198
        self.label_Flowrate_Mass_Unit_Liquid.setText(_translate("Dialog", "-"))
HYTOS/HYTOS/UI/PressureGradient.ui
1
<?xml version="1.0" encoding="UTF-8"?>
2
<ui version="4.0">
3
 <class>Dialog</class>
4
 <widget class="QDialog" name="Dialog">
5
  <property name="geometry">
6
   <rect>
7
    <x>0</x>
8
    <y>0</y>
9
    <width>528</width>
10
    <height>330</height>
11
   </rect>
12
  </property>
13
  <property name="font">
14
   <font>
15
    <family>맑은 고딕</family>
16
   </font>
17
  </property>
18
  <property name="windowTitle">
19
   <string>Vapor Line Pressure Gradient</string>
20
  </property>
21
  <property name="windowIcon">
22
   <iconset resource="../res/Resource.qrc">
23
    <normaloff>:/images/HYTOS.png</normaloff>:/images/HYTOS.png</iconset>
24
  </property>
25
  <layout class="QGridLayout" name="gridLayout">
26
   <item row="0" column="0">
27
    <layout class="QVBoxLayout" name="verticalLayout">
28
     <item>
29
      <layout class="QHBoxLayout" name="horizontalLayout_2">
30
       <item>
31
        <widget class="QTableWidget" name="tableWidget"/>
32
       </item>
33
      </layout>
34
     </item>
35
    </layout>
36
   </item>
37
   <item row="1" column="0">
38
    <widget class="QDialogButtonBox" name="buttonBox">
39
     <property name="orientation">
40
      <enum>Qt::Horizontal</enum>
41
     </property>
42
     <property name="standardButtons">
43
      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
44
     </property>
45
    </widget>
46
   </item>
47
  </layout>
48
 </widget>
49
 <resources>
50
  <include location="../res/Resource.qrc"/>
51
 </resources>
52
 <connections>
53
  <connection>
54
   <sender>buttonBox</sender>
55
   <signal>accepted()</signal>
56
   <receiver>Dialog</receiver>
57
   <slot>accept()</slot>
58
   <hints>
59
    <hint type="sourcelabel">
60
     <x>248</x>
61
     <y>254</y>
62
    </hint>
63
    <hint type="destinationlabel">
64
     <x>157</x>
65
     <y>274</y>
66
    </hint>
67
   </hints>
68
  </connection>
69
  <connection>
70
   <sender>buttonBox</sender>
71
   <signal>rejected()</signal>
72
   <receiver>Dialog</receiver>
73
   <slot>reject()</slot>
74
   <hints>
75
    <hint type="sourcelabel">
76
     <x>316</x>
77
     <y>260</y>
78
    </hint>
79
    <hint type="destinationlabel">
80
     <x>286</x>
81
     <y>274</y>
82
    </hint>
83
   </hints>
84
  </connection>
85
 </connections>
86
</ui>
HYTOS/HYTOS/UI/StreamData.ui
773 773
    <item>
774 774
     <layout class="QHBoxLayout" name="horizontalLayout">
775 775
      <item>
776
       <widget class="QPushButton" name="pushButton">
776
       <widget class="QPushButton" name="pushButton_Pressure_Gradient">
777 777
        <property name="font">
778 778
         <font>
779 779
          <weight>50</weight>
......
2885 2885
  <tabstop>pushButton_Fitting</tabstop>
2886 2886
  <tabstop>lineEdit_Fitting_Length</tabstop>
2887 2887
  <tabstop>lineEdit_Equivalent_Length_Cal</tabstop>
2888
  <tabstop>pushButton</tabstop>
2888
  <tabstop>pushButton_Pressure_Gradient</tabstop>
2889 2889
  <tabstop>pushButton_Line_Sizing</tabstop>
2890 2890
  <tabstop>pushButton_Calculation</tabstop>
2891 2891
  <tabstop>pushButton_Diameter_Estimation</tabstop>
HYTOS/HYTOS/ValidationDialog.py
25 25
        row = 0
26 26
        for error in errors:
27 27
            item = QTableWidgetItem(repr(error[0]))
28
            item.setTextAlignment(Qt.AlignHCenter | Qt.AlignVCenter)
28
            # item.setTextAlignment(Qt.AlignHCenter | Qt.AlignVCenter)
29
            item.setTextAlignment(Qt.AlignLeft | Qt.AlignVCenter)
29 30
            self.ui.tableWidgetValidation.setItem(row, 0, item)
30 31

  
31 32
            item = QTableWidgetItem(error[1])
32
            item.setTextAlignment(Qt.AlignHCenter | Qt.AlignVCenter)
33
            # item.setTextAlignment(Qt.AlignHCenter | Qt.AlignVCenter)
34
            item.setTextAlignment(Qt.AlignLeft | Qt.AlignVCenter)
33 35
            self.ui.tableWidgetValidation.setItem(row, 1, item)
34 36

  
35 37
            row += 1
36 38

  
37
        self.ui.tableWidgetValidation.horizontalHeader().setSectionResizeMode(0, QHeaderView.ResizeToContents)
38
        self.ui.tableWidgetValidation.horizontalHeader().setSectionResizeMode(1, QHeaderView.ResizeToContents)
39
        self.ui.tableWidgetValidation.horizontalHeader().setStretchLastSection(True)
40
        # self.ui.tableWidgetValidation.horizontalHeader().setSectionResizeMode(0, QHeaderView.ResizeToContents)
41
        # self.ui.tableWidgetValidation.horizontalHeader().setSectionResizeMode(1, QHeaderView.ResizeToContents)
39 42

  
40 43
    def accept(self):
41 44
        QDialog.accept(self)

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)