프로젝트

일반

사용자정보

개정판 db64b691

IDdb64b69125c221532008269c69f6930a2d1f5abd
상위 85e7cfcb
하위 a307208a

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

issue #1213 : Line Sizing Criteria 통합

Change-Id: I799ee1f31a631245f243dd9bd2155ff7ab68bd7e

차이점 보기:

HYTOS/HYTOS/LineSizingCriteria.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 LineSizingCriteria_UI
17
import math
18

  
19

  
20
def set_table_widget_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

  
32
class QLineSizingCriteria(QDialog):
33
    def __init__(self):
34
        QDialog.__init__(self)
35

  
36
        self.ui = LineSizingCriteria_UI.Ui_Dialog()
37

  
38
        self.ui.setupUi(self)
39
        self.isAccepted = False
40
        self.velocity = None
41
        self.dp_pressure = None
42

  
43
        self.units = {}
44
        self.ui.tableWidget.cellDoubleClicked.connect(self.double_clicked)
45

  
46
    def show_dialog(self, phase_type):
47
        self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)
48

  
49
        self.init_units()
50
        self.init_line_sizing_criteria(phase_type)
51

  
52
        self.exec_()
53

  
54
        return self.isAccepted, self.ui.tableWidget.item(self.ui.tableWidget.currentRow(), 1).text(), self.ui.tableWidget.item(self.ui.tableWidget.currentRow(), 2).text()
55

  
56
    def init_units(self):
57
        app_doc_data = AppDocData.instance()
58
        active_drawing = app_doc_data.activeDrawing
59

  
60
        for attr in active_drawing.attrs:
61
            if attr[0] == 'Units':
62
                self.units = attr[1]
63

  
64
    def get_type_vapor(self):
65
        type = {}
66

  
67
        pressure_unit = self.units['Pressure']
68
        if pressure_unit == 'kg/cm2':
69
            # General Service
70
            type['Pressure_1'] = '~ 4.55 kg/cm2(g)'
71
            type['Pressure_2'] = '4.55 ~ 15.1 kg/cm2(g)'
72
            type['Pressure_3'] = '15.1 ~ 36.2 kg/cm2(g)'
73
            type['Pressure_4'] = '36.2 kg/cm2(g) ~'
74
            # Tower Overhead
75
            type['Pressure_5'] = '~ 0.7 kg/cm2(g)'
76
            type['Pressure_6'] = '3.5 kg/cm2(g) ~'
77
            # Stream Lines
78
            type['Pressure_7'] = '~ 4.55 kg/cm2(g)'
79
            type['Pressure_8'] = '4.55 ~ 15.1 kg/cm2(g)'
80
            type['Pressure_9'] = '21 kg/cm2(g) ~'
81
        elif pressure_unit == 'psi':
82
            # General Service
83
            type['Pressure_1'] = '~ 64.71 psi(g)'
84
            type['Pressure_2'] = '64.71 ~ 214.7 psi(g)'
85
            type['Pressure_3'] = '214.7 ~ 514.9 psi(g)'
86
            type['Pressure_4'] = '514.9 psi(g) ~'
87
            # Tower Overhead
88
            type['Pressure_5'] = '~ 9.9 psi(g)'
89
            type['Pressure_6'] = '49.7 psi(g) ~'
90
            # Stream Lines
91
            type['Pressure_7'] = '~ 64.71 psi(g)'
92
            type['Pressure_8'] = '64.71 ~ 214.7 psi(g)'
93
            type['Pressure_9'] = '298.7 psi(g) ~'
94
        elif pressure_unit == 'atm':
95
            # General Service
96
            type['Pressure_1'] = '~ 5.4 atm'
97
            type['Pressure_2'] = '5.4 ~ 15.6 atm'
98
            type['Pressure_3'] = '15.6 ~ 36 atm'
99
            type['Pressure_4'] = '36 atm ~'
100
            # Tower Overhead
101
            type['Pressure_5'] = '~ 1.67 atm'
102
            type['Pressure_6'] = '4.38 atm ~'
103
            # Stream Lines
104
            type['Pressure_7'] = '~ 5.4 atm'
105
            type['Pressure_8'] = '5.4 ~ 15.6 atm'
106
            type['Pressure_9'] = '21.3 atm ~'
107
        elif pressure_unit == 'bar':
108
            # General Service
109
            type['Pressure_1'] = '~ 4.46 bar(g)'
110
            type['Pressure_2'] = '4.46 ~ 14.8 bar(g)'
111
            type['Pressure_3'] = '14.8 ~ 35.5 bar(g)'
112
            type['Pressure_4'] = '35.5 bar(g) ~'
113
            # Tower Overhead
114
            type['Pressure_5'] = '~ 0.68 bar(g)'
115
            type['Pressure_6'] = '3.43 bar(g) ~'
116
            # Stream Lines
117
            type['Pressure_7'] = '~ 4.46 bar(g)'
118
            type['Pressure_8'] = '4.46 ~ 14.8 bar(g)'
119
            type['Pressure_9'] = '20.6 bar(g) ~'
120
        elif pressure_unit == 'mmHg':
121
            # General Service
122
            type['Pressure_1'] = '~ 3346.8 mmHg(g)'
123
            type['Pressure_2'] = '3346.8 ~ 11107 mmHg(g)'
124
            type['Pressure_3'] = '11107mmHg ~ 26627 mmHg(g)'
125
            type['Pressure_4'] = '26627 mmHg(g) ~'
126
            # Tower Overhead
127
            type['Pressure_5'] = '~ 514.9 mmHg(g)'
128
            type['Pressure_6'] = '2574 mmHg(g) ~'
129
            # Stream Lines
130
            type['Pressure_7'] = '~ 3346.8 mmHg(g)'
131
            type['Pressure_8'] = '3346.8 ~ 11107 mmHg(g)'
132
            type['Pressure_9'] = '15446.7 mmHg(g) ~'
133
        elif pressure_unit == 'kPa':
134
            # General Service
135
            type['Pressure_1'] = '~ 446.2 kPa(g)'
136
            type['Pressure_2'] = '446.2 ~ 1480.8 kPa(g)'
137
            type['Pressure_3'] = '1480.8 ~ 3550 kPa(g)'
138
            type['Pressure_4'] = '3550 kPa(g) ~'
139
            # Tower Overhead
140
            type['Pressure_5'] = '~ 64.65 kPa(g)'
141
            type['Pressure_6'] = '343.2 kPa(g) ~'
142
            # Stream Lines
143
            type['Pressure_7'] = '~ 446.2 kPa(g)'
144
            type['Pressure_8'] = '446.2 ~ 1480.8 kPa(g)'
145
            type['Pressure_9'] = '2059.4 kPa(g) ~'
146
        elif pressure_unit == 'MPa':
147
            # General Service
148
            type['Pressure_1'] = '~ 0.4462 MPa(g)'
149
            type['Pressure_2'] = '0.4462 ~ 1.4808 MPa(g)'
150
            type['Pressure_3'] = '1.4808 ~ 3.55 MPa(g)'
151
            type['Pressure_4'] = '3.55 MPa(g) ~'
152
            # Tower Overhead
153
            type['Pressure_5'] = '~ 0.06465 MPa(g)'
154
            type['Pressure_6'] = '0.3432 MPa(g) ~'
155
            # Stream Lines
156
            type['Pressure_7'] = '~ 0.4462 MPa(g)'
157
            type['Pressure_8'] = '0.4462 ~ 1.4808 MPa(g)'
158
            type['Pressure_9'] = '2.0594 MPa(g) ~'
159

  
160
        return type
161

  
162
    def get_type_liquid(self):
163
        type = {}
164

  
165
        flowrate_volume_unit = self.units['Flowrate_Volume']
166
        if flowrate_volume_unit == 'm3/h':
167
            type['Flowrate_Volume_1'] = '0 ~ 56 m3/h'
168
            type['Flowrate_Volume_2'] = '56 ~ 155 m3/h'
169
            type['Flowrate_Volume_3'] = '155 m3/h ~'
170
        elif flowrate_volume_unit == 'l/min':
171
            type['Flowrate_Volume_1'] = '0 ~ 933 l/min'
172
            type['Flowrate_Volume_2'] = '933 ~ 2583 l/min'
173
            type['Flowrate_Volume_3'] = '2583 l/min ~'
174
        elif flowrate_volume_unit == 'ft3/h':
175
            type['Flowrate_Volume_1'] = '0 ~ 1977 ft3/h'
176
            type['Flowrate_Volume_2'] = '1977 ~ 5473 ft3/h'
177
            type['Flowrate_Volume_3'] = '5473 ft3/h ~'
178
        elif flowrate_volume_unit == 'USgpm':
179
            type['Flowrate_Volume_1'] = '0 ~ 246 USgpm'
180
            type['Flowrate_Volume_2'] = '246 ~ 682 USgpm'
181
            type['Flowrate_Volume_3'] = '682 USgpm ~'
182
        elif flowrate_volume_unit == 'BPSD':
183
            type['Flowrate_Volume_1'] = '0 ~ 8458 BPSD'
184
            type['Flowrate_Volume_2'] = '8458 ~ 23411 BPSD'
185
            type['Flowrate_Volume_3'] = '23411 BPSD ~'
186

  
187
        return type
188

  
189
    def get_velocity_vapor(self):
190
        velocity = {}
191

  
192
        velocity_unit = self.units['Velocity']
193
        if velocity_unit == 'm/s':
194
            # General Service
195
            velocity['Pressure_1'] = '-'
196
            velocity['Pressure_2'] = '-'
197
            velocity['Pressure_3'] = '-'
198
            velocity['Pressure_4'] = '-'
199
            velocity['Air_Service'] = '18.3'
200
            # Compressor Lines
201
            velocity['Suction_Reciprocating_Type'] = '12.2'
202
            velocity['Suction_Centrifugal_Type'] = '24.4'
203
            velocity['Discharge'] = '13'
204
            # Tower Overhead
205
            velocity['Pressure_5'] = '61'
206
            velocity['Atm'] = '30.5'
207
            velocity['Pressure_6'] = '15.2'
208
            # Stream Lines
209
            velocity['Pressure_7'] = '50'
210
            velocity['Pressure_8'] = '40'
211
            velocity['Pressure_9'] = '30'
212
            velocity['High_Pressure_Steam'] = '20'
213
            # Flare
214
            velocity['Header'] = '-'
215
            velocity['Branch'] = '10.7'
216
        elif velocity_unit == 'ft/s':
217
            # General Service
218
            velocity['Pressure_1'] = '-'
219
            velocity['Pressure_2'] = '-'
220
            velocity['Pressure_3'] = '-'
221
            velocity['Pressure_4'] = '-'
222
            velocity['Air_Service'] = '60'
223
            # Compressor Lines
224
            velocity['Suction_Reciprocating_Type'] = '40'
225
            velocity['Suction_Centrifugal_Type'] = '80'
226
            velocity['Discharge'] = '42.6'
227
            # Tower Overhead
228
            velocity['Pressure_5'] = '200'
229
            velocity['Atm'] = '100'
230
            velocity['Pressure_6'] = '49.8'
231
            # Stream Lines
232
            velocity['Pressure_7'] = '164'
233
            velocity['Pressure_8'] = '131.2'
234
            velocity['Pressure_9'] = '98.4'
235
            velocity['High_Pressure_Steam'] = '65.6'
236
            # Flare
237
            velocity['Header'] = '-'
238
            velocity['Branch'] = '35.1'
239

  
240
        return velocity
241

  
242
    def get_velocity_liquid(self):
243
        velocity = {}
244

  
245
        velocity_unit = self.units['Velocity']
246
        if velocity_unit == 'm/s':
247
            # General Service
248
            velocity['General_Service'] = '4.5'
249
            # Pump Suction Lines
250
            velocity['Boiling_Liquids'] = '1.8'
251
            velocity['Non_Boiling_Liquids'] = '2.4'
252
            # Pump Discharge Lines
253
            velocity['Flowrate_Volume_1'] = '2.4'
254
            velocity['Flowrate_Volume_2'] = '3'
255
            velocity['Flowrate_Volume_3'] = '4.5'
256
            # Process Lines
257
            velocity['Reboiler_Trapout'] = '1.2'
258
            velocity['To_Control_Valve'] = '-'
259
            velocity['Gravity_Flow_Service'] = '2.4'
260
            velocity['Boiler_Feed_Water_Service'] = '4.5'
261
            velocity['From_Condenser'] = '1.5'
262
            velocity['Liquid_Feed_To_Tower'] = '1.8'
263
            velocity['Refrigerant_Lines'] = '1.2'
264
            # Process Fluids
265
            velocity['Cooling_Water_Header'] = '4.8'
266
            velocity['Cooling_Water_Branch'] = '3'
267
            velocity['Phenolic_Water'] = '0.9'
268
            velocity['Concentrated_H2SO4'] = '1.2'
269
            velocity['Salt_Water'] = '1.8'
270
            velocity['Caustic_Solution'] = '1.2'
271
            velocity['CO2_Rich_Amine_Liquid'] = '3'
272
        elif velocity_unit == 'ft/s':
273
            # General Service
274
            velocity['General_Service'] = '14.7'
275
            # Pump Suction Lines
276
            velocity['Boiling_Liquids'] = '5.9'
277
            velocity['Non_Boiling_Liquids'] = '7.8'
278
            # Pump Discharge Lines
279
            velocity['Flowrate_Volume_1'] = '7.8'
280
            velocity['Flowrate_Volume_2'] = '9.8'
281
            velocity['Flowrate_Volume_3'] = '14.7'
282
            # Process Lines
283
            velocity['Reboiler_Trapout'] = '3.9'
284
            velocity['To_Control_Valve'] = '-'
285
            velocity['Gravity_Flow_Service'] = '7.8'
286
            velocity['Boiler_Feed_Water_Service'] = '14.7'
287
            velocity['From_Condenser'] = '4.9'
288
            velocity['Liquid_Feed_To_Tower'] = '5.9'
289
            velocity['Refrigerant_Lines'] = '3.9'
290
            # Process Fluids
291
            velocity['Cooling_Water_Header'] = '15.7'
292
            velocity['Cooling_Water_Branch'] = '9.8'
293
            velocity['Phenolic_Water'] = '2.9'
294
            velocity['Concentrated_H2SO4'] = '3.9'
295
            velocity['Salt_Water'] = '5.9'
296
            velocity['Caustic_Solution'] = '3.9'
297
            velocity['CO2_Rich_Amine_Liquid'] = '9.8'
298

  
299
        return velocity
300

  
301
    def get_dp_pressure_vapor(self):
302
        dp_pressure = {}
303

  
304
        # 초기값 (kg/cm2/100m) 설정
305
        seclvdp = [0.023, 0.058, 0.115, 0.138, 0.231, 0.346, 0.557, 1.461]
306
        length_unit = self.units['Length']
307
        pressure_unit = self.units['Pressure']
308

  
309
        if pressure_unit == 'kg/cm2':
310
            if length_unit == 'm':
311
                seclvdp = seclvdp
312
            elif length_unit == 'in':
313
                for i in range(len(seclvdp)):
314
                    seclvdp[i] *= 0.0254
315
            elif length_unit == 'ft':
316
                for i in range(len(seclvdp)):
317
                    seclvdp[i] /= 3.28084
318
            elif length_unit == 'yd':
319
                for i in range(len(seclvdp)):
320
                    seclvdp[i] /= 1.09361
321
            elif length_unit == 'mile':
322
                for i in range(len(seclvdp)):
323
                    seclvdp[i] /= 0.000621371
324
            elif length_unit == 'mm':
325
                for i in range(len(seclvdp)):
326
                    seclvdp[i] /= 1000
327
        elif pressure_unit == 'psi':
328
            for i in range(len(seclvdp)):
329
                seclvdp[i] = seclvdp[i] / 1.033 * 14.7
330

  
331
            if length_unit == 'm':
332
                seclvdp = seclvdp
333
            elif length_unit == 'in':
334
                for i in range(len(seclvdp)):
335
                    seclvdp[i] *= 0.0254
336
            elif length_unit == 'ft':
337
                for i in range(len(seclvdp)):
338
                    seclvdp[i] /= 3.28084
339
            elif length_unit == 'yd':
340
                for i in range(len(seclvdp)):
341
                    seclvdp[i] /= 1.09361
342
            elif length_unit == 'mile':
343
                for i in range(len(seclvdp)):
344
                    seclvdp[i] /= 0.000621371
345
            elif length_unit == 'mm':
346
                for i in range(len(seclvdp)):
347
                    seclvdp[i] /= 1000
348
        elif pressure_unit == 'atm':
349
            for i in range(len(seclvdp)):
350
                seclvdp[i] = seclvdp[i] / 1.033
351

  
352
            if length_unit == 'm':
353
                seclvdp = seclvdp
354
            elif length_unit == 'in':
355
                for i in range(len(seclvdp)):
356
                    seclvdp[i] *= 0.0254
357
            elif length_unit == 'ft':
358
                for i in range(len(seclvdp)):
359
                    seclvdp[i] /= 3.28084
360
            elif length_unit == 'yd':
361
                for i in range(len(seclvdp)):
362
                    seclvdp[i] /= 1.09361
363
            elif length_unit == 'mile':
364
                for i in range(len(seclvdp)):
365
                    seclvdp[i] /= 0.000621371
366
            elif length_unit == 'mm':
367
                for i in range(len(seclvdp)):
368
                    seclvdp[i] /= 1000
369
        elif pressure_unit == 'bar':
370
            for i in range(len(seclvdp)):
371
                seclvdp[i] = seclvdp[i] / 1.033 * 1.013
372

  
373
            if length_unit == 'm':
374
                seclvdp = seclvdp
375
            elif length_unit == 'in':
376
                for i in range(len(seclvdp)):
377
                    seclvdp[i] *= 0.0254
378
            elif length_unit == 'ft':
379
                for i in range(len(seclvdp)):
380
                    seclvdp[i] /= 3.28084
381
            elif length_unit == 'yd':
382
                for i in range(len(seclvdp)):
383
                    seclvdp[i] /= 1.09361
384
            elif length_unit == 'mile':
385
                for i in range(len(seclvdp)):
386
                    seclvdp[i] /= 0.000621371
387
            elif length_unit == 'mm':
388
                for i in range(len(seclvdp)):
389
                    seclvdp[i] /= 1000
390
        elif pressure_unit == 'mmHg':
391
            for i in range(len(seclvdp)):
392
                seclvdp[i] = seclvdp[i] / 1.033 * 760
393

  
394
            if length_unit == 'm':
395
                seclvdp = seclvdp
396
            elif length_unit == 'in':
397
                for i in range(len(seclvdp)):
398
                    seclvdp[i] *= 0.0254
399
            elif length_unit == 'ft':
400
                for i in range(len(seclvdp)):
401
                    seclvdp[i] /= 3.28084
402
            elif length_unit == 'yd':
403
                for i in range(len(seclvdp)):
404
                    seclvdp[i] /= 1.09361
405
            elif length_unit == 'mile':
406
                for i in range(len(seclvdp)):
407
                    seclvdp[i] /= 0.000621371
408
            elif length_unit == 'mm':
409
                for i in range(len(seclvdp)):
410
                    seclvdp[i] /= 1000
411
        elif pressure_unit == 'kPa':
412
            for i in range(len(seclvdp)):
413
                seclvdp[i] = seclvdp[i] / 1.033 * 101.325
414

  
415
            if length_unit == 'm':
416
                seclvdp = seclvdp
417
            elif length_unit == 'in':
418
                for i in range(len(seclvdp)):
419
                    seclvdp[i] *= 0.0254
420
            elif length_unit == 'ft':
421
                for i in range(len(seclvdp)):
422
                    seclvdp[i] /= 3.28084
423
            elif length_unit == 'yd':
424
                for i in range(len(seclvdp)):
425
                    seclvdp[i] /= 1.09361
426
            elif length_unit == 'mile':
427
                for i in range(len(seclvdp)):
428
                    seclvdp[i] /= 0.000621371
429
            elif length_unit == 'mm':
430
                for i in range(len(seclvdp)):
431
                    seclvdp[i] /= 1000
432
        elif pressure_unit == 'MPa':
433
            for i in range(len(seclvdp)):
434
                seclvdp[i] = seclvdp[i] / 1.033 * 0.101325
435

  
436
            if length_unit == 'm':
437
                seclvdp = seclvdp
438
            elif length_unit == 'in':
439
                for i in range(len(seclvdp)):
440
                    seclvdp[i] *= 0.0254
441
            elif length_unit == 'ft':
442
                for i in range(len(seclvdp)):
443
                    seclvdp[i] /= 3.28084
444
            elif length_unit == 'yd':
445
                for i in range(len(seclvdp)):
446
                    seclvdp[i] /= 1.09361
447
            elif length_unit == 'mile':
448
                for i in range(len(seclvdp)):
449
                    seclvdp[i] /= 0.000621371
450
            elif length_unit == 'mm':
451
                for i in range(len(seclvdp)):
452
                    seclvdp[i] /= 1000
453

  
454
        # General Service
455
        dp_pressure['Pressure_1'] = str(round(seclvdp[0], 3))
456
        dp_pressure['Pressure_2'] = str(round(seclvdp[3], 3))
457
        dp_pressure['Pressure_3'] = str(round(seclvdp[5], 3))
458
        dp_pressure['Pressure_4'] = str(round(seclvdp[7], 3))
459
        dp_pressure['Air_Service'] = str(round(seclvdp[6], 3))
460
        # Compressor Lines
461
        dp_pressure['Suction_Reciprocating_Type'] = '-'
462
        dp_pressure['Suction_Centrifugal_Type'] = '-'
463
        dp_pressure['Discharge'] = str(round(seclvdp[4], 3))
464
        # Tower Overhead
465
        dp_pressure['Pressure_5'] = str(round(seclvdp[0], 3))
466
        dp_pressure['Atm'] = str(round(seclvdp[2], 3))
467
        dp_pressure['Pressure_6'] = str(round(seclvdp[2], 3))
468
        # Stream Lines
469
        dp_pressure['Pressure_7'] = str(round(seclvdp[1], 3))
470
        dp_pressure['Pressure_8'] = str(round(seclvdp[4], 3))
471
        dp_pressure['Pressure_9'] = str(round(seclvdp[5], 3))
472
        dp_pressure['High_Pressure_Steam'] = str(round(seclvdp[2], 3))
473
        # Flare
474
        dp_pressure['Header'] = str(round(seclvdp[2], 3))
475
        dp_pressure['Branch'] = '-'
476

  
477
        return dp_pressure
478

  
479
    def get_dp_pressure_liquid(self):
480
        dp_pressure = {}
481

  
482
        # 초기값 (kg/cm2/100m) 설정
483
        secldp = [0.9, 0.081, 0.2, 1.4, 0.5, 0.03, 0.09]
484
        length_unit = self.units['Length']
485
        pressure_unit = self.units['Pressure']
486

  
487
        if pressure_unit == 'kg/cm2':
488
            if length_unit == 'm':
489
                secldp = secldp
490
            elif length_unit == 'in':
491
                for i in range(len(secldp)):
492
                    secldp[i] *= 0.0254
493
            elif length_unit == 'ft':
494
                for i in range(len(secldp)):
495
                    secldp[i] /= 3.28084
496
            elif length_unit == 'yd':
497
                for i in range(len(secldp)):
498
                    secldp[i] /= 1.09361
499
            elif length_unit == 'mile':
500
                for i in range(len(secldp)):
501
                    secldp[i] /= 0.000621371
502
            elif length_unit == 'mm':
503
                for i in range(len(secldp)):
504
                    secldp[i] /= 1000
505
        elif pressure_unit == 'psi':
506
            for i in range(len(secldp)):
507
                secldp[i] = secldp[i] / 1.033 * 14.7
508

  
509
            if length_unit == 'm':
510
                secldp = secldp
511
            elif length_unit == 'in':
512
                for i in range(len(secldp)):
513
                    secldp[i] *= 0.0254
514
            elif length_unit == 'ft':
515
                for i in range(len(secldp)):
516
                    secldp[i] /= 3.28084
517
            elif length_unit == 'yd':
518
                for i in range(len(secldp)):
519
                    secldp[i] /= 1.09361
520
            elif length_unit == 'mile':
521
                for i in range(len(secldp)):
522
                    secldp[i] /= 0.000621371
523
            elif length_unit == 'mm':
524
                for i in range(len(secldp)):
525
                    secldp[i] /= 1000
526
        elif pressure_unit == 'atm':
527
            for i in range(len(secldp)):
528
                secldp[i] = secldp[i] / 1.033
529

  
530
            if length_unit == 'm':
531
                secldp = secldp
532
            elif length_unit == 'in':
533
                for i in range(len(secldp)):
534
                    secldp[i] *= 0.0254
535
            elif length_unit == 'ft':
536
                for i in range(len(secldp)):
537
                    secldp[i] /= 3.28084
538
            elif length_unit == 'yd':
539
                for i in range(len(secldp)):
540
                    secldp[i] /= 1.09361
541
            elif length_unit == 'mile':
542
                for i in range(len(secldp)):
543
                    secldp[i] /= 0.000621371
544
            elif length_unit == 'mm':
545
                for i in range(len(secldp)):
546
                    secldp[i] /= 1000
547
        elif pressure_unit == 'bar':
548
            for i in range(len(secldp)):
549
                secldp[i] = secldp[i] / 1.033 * 1.013
550

  
551
            if length_unit == 'm':
552
                secldp = secldp
553
            elif length_unit == 'in':
554
                for i in range(len(secldp)):
555
                    secldp[i] *= 0.0254
556
            elif length_unit == 'ft':
557
                for i in range(len(secldp)):
558
                    secldp[i] /= 3.28084
559
            elif length_unit == 'yd':
560
                for i in range(len(secldp)):
561
                    secldp[i] /= 1.09361
562
            elif length_unit == 'mile':
563
                for i in range(len(secldp)):
564
                    secldp[i] /= 0.000621371
565
            elif length_unit == 'mm':
566
                for i in range(len(secldp)):
567
                    secldp[i] /= 1000
568
        elif pressure_unit == 'mmHg':
569
            for i in range(len(secldp)):
570
                secldp[i] = secldp[i] / 1.033 * 760
571

  
572
            if length_unit == 'm':
573
                secldp = secldp
574
            elif length_unit == 'in':
575
                for i in range(len(secldp)):
576
                    secldp[i] *= 0.0254
577
            elif length_unit == 'ft':
578
                for i in range(len(secldp)):
579
                    secldp[i] /= 3.28084
580
            elif length_unit == 'yd':
581
                for i in range(len(secldp)):
582
                    secldp[i] /= 1.09361
583
            elif length_unit == 'mile':
584
                for i in range(len(secldp)):
585
                    secldp[i] /= 0.000621371
586
            elif length_unit == 'mm':
587
                for i in range(len(secldp)):
588
                    secldp[i] /= 1000
589
        elif pressure_unit == 'kPa':
590
            for i in range(len(secldp)):
591
                secldp[i] = secldp[i] / 1.033 * 101.325
592

  
593
            if length_unit == 'm':
594
                secldp = secldp
595
            elif length_unit == 'in':
596
                for i in range(len(secldp)):
597
                    secldp[i] *= 0.0254
598
            elif length_unit == 'ft':
599
                for i in range(len(secldp)):
600
                    secldp[i] /= 3.28084
601
            elif length_unit == 'yd':
602
                for i in range(len(secldp)):
603
                    secldp[i] /= 1.09361
604
            elif length_unit == 'mile':
605
                for i in range(len(secldp)):
606
                    secldp[i] /= 0.000621371
607
            elif length_unit == 'mm':
608
                for i in range(len(secldp)):
609
                    secldp[i] /= 1000
610
        elif pressure_unit == 'MPa':
611
            for i in range(len(secldp)):
612
                secldp[i] = secldp[i] / 1.033 * 0.101325
613

  
614
            if length_unit == 'm':
615
                secldp = secldp
616
            elif length_unit == 'in':
617
                for i in range(len(secldp)):
618
                    secldp[i] *= 0.0254
619
            elif length_unit == 'ft':
620
                for i in range(len(secldp)):
621
                    secldp[i] /= 3.28084
622
            elif length_unit == 'yd':
623
                for i in range(len(secldp)):
624
                    secldp[i] /= 1.09361
625
            elif length_unit == 'mile':
626
                for i in range(len(secldp)):
627
                    secldp[i] /= 0.000621371
628
            elif length_unit == 'mm':
629
                for i in range(len(secldp)):
630
                    secldp[i] /= 1000
631

  
632
        # General Service
633
        dp_pressure['General_Service'] = str(round(secldp[0], 5))
634
        # Pump Suction Lines
635
        dp_pressure['Boiling_Liquids'] = str(round(secldp[1], 5))
636
        dp_pressure['Non_Boiling_Liquids'] = str(round(secldp[2], 5))
637
        # Pump Discharge Lines
638
        dp_pressure['Flowrate_Volume_1'] = str(round(secldp[3], 5))
639
        dp_pressure['Flowrate_Volume_2'] = str(round(secldp[0], 5))
640
        dp_pressure['Flowrate_Volume_3'] = str(round(secldp[4], 5))
641
        # Process Lines
642
        dp_pressure['Reboiler_Trapout'] = str(round(secldp[5], 5))
643
        dp_pressure['To_Control_Valve'] = str(round(secldp[2], 5))
644
        dp_pressure['Gravity_Flow_Service'] = str(round(secldp[6], 5))
645
        dp_pressure['Boiler_Feed_Water_Service'] = '-'
646
        dp_pressure['From_Condenser'] = '-'
647
        dp_pressure['Liquid_Feed_To_Tower'] = '-'
648
        dp_pressure['Refrigerant_Lines'] = '-'
649
        # Process Fluids
650
        dp_pressure['Cooling_Water_Header'] = str(round(secldp[4], 5))
651
        dp_pressure['Cooling_Water_Branch'] = str(round(secldp[4], 5))
652
        dp_pressure['Phenolic_Water'] = '-'
653
        dp_pressure['Concentrated_H2SO4'] = '-'
654
        dp_pressure['Salt_Water'] = '-'
655
        dp_pressure['Caustic_Solution'] = '-'
656
        dp_pressure['CO2_Rich_Amine_Liquid'] = '-'
657

  
658
        return dp_pressure
659

  
660
    def init_line_sizing_criteria(self, phase_type):
661
        self.ui.tableWidget.setColumnCount(3)
662
        self.ui.tableWidget.setHorizontalHeaderLabels(['Type', 'Velocity ({})'.format(self.units['Velocity']),
663
                                                       '△P ({}/100{})'.format(self.units['Pressure'],
664
                                                                              self.units['Length'])])
665
        self.ui.tableWidget.verticalHeader().setVisible(False)
666
        self.ui.tableWidget.setSelectionMode(QAbstractItemView.SingleSelection)
667
        self.ui.tableWidget.setSelectionBehavior(QAbstractItemView.SelectRows)
668
        self.ui.tableWidget.setEditTriggers(QAbstractItemView.NoEditTriggers)
669
        self.ui.tableWidget.horizontalHeaderItem(1).setSizeHint(QSize(210, 30))
670
        self.ui.tableWidget.horizontalHeader().setStretchLastSection(True)
671

  
672
        if phase_type == 'Liquid':
673
            type = self.get_type_liquid()
674
            velecity = self.get_velocity_liquid()
675
            dp_pressure = self.get_dp_pressure_liquid()
676

  
677
            # General Service
678
            self.add_data('- General Service', None, None, True)
679
            self.add_data('General Service', velecity['General_Service'], dp_pressure['General_Service'])
680
            # Pump Suction Lines
681
            self.add_data('- Pump Suction Lines', None, None, True)
682
            self.add_data('Boiling Liquids', velecity['Boiling_Liquids'], dp_pressure['Boiling_Liquids'])
683
            self.add_data('Non-boiling Liquids', velecity['Non_Boiling_Liquids'], dp_pressure['Non_Boiling_Liquids'])
684
            # Pump Discharge Lines
685
            self.add_data('- Pump Discharge Lines', None, None, True)
686
            self.add_data(type['Flowrate_Volume_1'], velecity['Flowrate_Volume_1'], dp_pressure['Flowrate_Volume_1'])
687
            self.add_data(type['Flowrate_Volume_2'], velecity['Flowrate_Volume_2'], dp_pressure['Flowrate_Volume_2'])
688
            self.add_data(type['Flowrate_Volume_3'], velecity['Flowrate_Volume_3'], dp_pressure['Flowrate_Volume_3'])
689
            # Process Lines
690
            self.add_data('- Process Lines', None, None, True)
691
            self.add_data('Reboiler Trapout', velecity['Reboiler_Trapout'], dp_pressure['Reboiler_Trapout'])
692
            self.add_data('To Control Valve', velecity['To_Control_Valve'], dp_pressure['To_Control_Valve'])
693
            self.add_data('Gravity Flow Service', velecity['Gravity_Flow_Service'], dp_pressure['Gravity_Flow_Service'])
694
            self.add_data('Boiler Feed Water Service', velecity['Boiler_Feed_Water_Service'], dp_pressure['Boiler_Feed_Water_Service'])
695
            self.add_data('From Condenser', velecity['From_Condenser'], dp_pressure['From_Condenser'])
696
            self.add_data('Liquid Feed to Tower', velecity['Liquid_Feed_To_Tower'], dp_pressure['Liquid_Feed_To_Tower'])
697
            self.add_data('Refrigerant Lines', velecity['Refrigerant_Lines'], dp_pressure['Refrigerant_Lines'])
698
            # Process Fluids
699
            self.add_data('- Process Fluids', None, None, True)
700
            self.add_data('Cooling Water (header)', velecity['Cooling_Water_Header'], dp_pressure['Cooling_Water_Header'])
701
            self.add_data('Cooling Water (branch)', velecity['Cooling_Water_Branch'], dp_pressure['Cooling_Water_Branch'])
702
            self.add_data('Phenolic Water', velecity['Phenolic_Water'], dp_pressure['Phenolic_Water'])
703
            self.add_data('Concentrated H2SO4', velecity['Concentrated_H2SO4'], dp_pressure['Concentrated_H2SO4'])
704
            self.add_data('Salt Water', velecity['Salt_Water'], dp_pressure['Salt_Water'])
705
            self.add_data('Caustic Solution', velecity['Caustic_Solution'], dp_pressure['Caustic_Solution'])
706
            self.add_data('CO2 Rich Amine Liquid', velecity['CO2_Rich_Amine_Liquid'], dp_pressure['CO2_Rich_Amine_Liquid'])
707
        elif phase_type == 'Vapor':
708
            type = self.get_type_vapor()
709
            velecity = self.get_velocity_vapor()
710
            dp_pressure = self.get_dp_pressure_vapor()
711

  
712
            # General Service
713
            self.add_data('- General Service', None, None, True)
714
            self.add_data(type['Pressure_1'], velecity['Pressure_1'], dp_pressure['Pressure_1'])
715
            self.add_data(type['Pressure_2'], velecity['Pressure_2'], dp_pressure['Pressure_2'])
716
            self.add_data(type['Pressure_3'], velecity['Pressure_3'], dp_pressure['Pressure_3'])
717
            self.add_data(type['Pressure_4'], velecity['Pressure_4'], dp_pressure['Pressure_4'])
718
            self.add_data('Air Service', velecity['Air_Service'], dp_pressure['Air_Service'])
719
            # Compressor Lines
720
            self.add_data('- Compressor Lines', None, None, True)
721
            self.add_data('Suction (Reciprocating type)', velecity['Suction_Reciprocating_Type'], dp_pressure['Suction_Reciprocating_Type'])
722
            self.add_data('Suction (Centrifugal type)', velecity['Suction_Centrifugal_Type'], dp_pressure['Suction_Centrifugal_Type'])
723
            self.add_data('Discharge', velecity['Discharge'], dp_pressure['Discharge'])
724
            # Tower Overhead
725
            self.add_data('- Tower Overhead', None, None, True)
726
            self.add_data(type['Pressure_5'], velecity['Pressure_5'], dp_pressure['Pressure_5'])
727
            self.add_data('Atm.', velecity['Atm'], dp_pressure['Atm'])
728
            self.add_data(type['Pressure_6'], velecity['Pressure_6'], dp_pressure['Pressure_6'])
729
            # Stream Lines
730
            self.add_data('- Stream Lines', None, None, True)
731
            self.add_data(type['Pressure_7'], velecity['Pressure_7'], dp_pressure['Pressure_7'])
732
            self.add_data(type['Pressure_8'], velecity['Pressure_8'], dp_pressure['Pressure_8'])
733
            self.add_data(type['Pressure_9'], velecity['Pressure_9'], dp_pressure['Pressure_9'])
734
            self.add_data('High Pressure Steam.', velecity['High_Pressure_Steam'], dp_pressure['High_Pressure_Steam'])
735
            # Flare
736
            self.add_data('- Flare', None, None, True)
737
            self.add_data('Header', velecity['Header'], dp_pressure['Header'])
738
            self.add_data('Branch', velecity['Branch'], dp_pressure['Branch'])
739

  
740

  
741

  
742

  
743

  
744

  
745

  
746

  
747

  
748

  
749
    def add_data(self, type, velocity, dp_pressure, separation=None):
750
        row = self.ui.tableWidget.rowCount()
751
        self.ui.tableWidget.setRowCount(row + 1)
752

  
753
        if separation:
754
            self.ui.tableWidget.setItem(row, 0, set_table_widget_item_properties(type,
755
                                                                                 Qt.AlignLeft | Qt.AlignVCenter,
756
                                                                                 QColor(153, 204, 255)))
757
            self.ui.tableWidget.setItem(row, 1, set_table_widget_item_properties(velocity,
758
                                                                                 Qt.AlignHCenter | Qt.AlignVCenter,
759
                                                                                 QColor(153, 204, 255)))
760
            self.ui.tableWidget.setItem(row, 2, set_table_widget_item_properties(dp_pressure,
761
                                                                                 Qt.AlignHCenter | Qt.AlignVCenter,
762
                                                                                 QColor(153, 204, 255)))
763
        else:
764
            self.ui.tableWidget.setItem(row, 0, set_table_widget_item_properties(type,
765
                                                                                 Qt.AlignLeft | Qt.AlignVCenter))
766
            self.ui.tableWidget.setItem(row, 1, set_table_widget_item_properties(velocity,
767
                                                                                 Qt.AlignHCenter | Qt.AlignVCenter))
768
            self.ui.tableWidget.setItem(row, 2, set_table_widget_item_properties(dp_pressure,
769
                                                                                 Qt.AlignHCenter | Qt.AlignVCenter))
770

  
771
        self.ui.tableWidget.resizeRowsToContents()
772
        self.ui.tableWidget.resizeColumnsToContents()
773

  
774
    def double_clicked(self, row):
775
        self.isAccepted = True
776
        QDialog.accept(self)
777

  
778
    def accept(self):
779
        self.isAccepted = True
780
        QDialog.accept(self)
781

  
782
    def reject(self):
783
        self.isAccepted = False
784
        QDialog.reject(self)
785

  
786
    if __name__ == '__main__':
787
        from LineSizingCriteria import QLineSizingCriteria
788
        from App import App
789
        app = App(sys.argv)
790

  
791
        if True:
792
            dlg = QLineSizingCriteria()
793
            dlg.exec_()
HYTOS/HYTOS/LineSizingCriteria_UI.py
1
# -*- coding: utf-8 -*-
2

  
3
# Form implementation generated from reading ui file '.\UI\LineSizingCriteria.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(537, 331)
17
        icon = QtGui.QIcon()
18
        icon.addPixmap(QtGui.QPixmap(":/images/HYTOS.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
19
        Dialog.setWindowIcon(icon)
20
        self.gridLayout = QtWidgets.QGridLayout(Dialog)
21
        self.gridLayout.setObjectName("gridLayout")
22
        self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
23
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
24
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
25
        self.buttonBox.setObjectName("buttonBox")
26
        self.gridLayout.addWidget(self.buttonBox, 1, 0, 1, 1)
27
        self.gridLayout_2 = QtWidgets.QGridLayout()
28
        self.gridLayout_2.setObjectName("gridLayout_2")
29
        self.tableWidget = QtWidgets.QTableWidget(Dialog)
30
        self.tableWidget.setObjectName("tableWidget")
31
        self.tableWidget.setColumnCount(0)
32
        self.tableWidget.setRowCount(0)
33
        self.gridLayout_2.addWidget(self.tableWidget, 0, 0, 1, 1)
34
        self.gridLayout.addLayout(self.gridLayout_2, 0, 0, 1, 1)
35

  
36
        self.retranslateUi(Dialog)
37
        self.buttonBox.accepted.connect(Dialog.accept)
38
        self.buttonBox.rejected.connect(Dialog.reject)
39
        QtCore.QMetaObject.connectSlotsByName(Dialog)
40

  
41
    def retranslateUi(self, Dialog):
42
        _translate = QtCore.QCoreApplication.translate
43
        Dialog.setWindowTitle(_translate("Dialog", "Line Sizing Criteria"))
44
import Resource_rc
HYTOS/HYTOS/Line_Sizing_LiquidDialog.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

  
9
from PyQt5 import QtCore, QtGui, QtWidgets
10
from PyQt5.QtWidgets import *
11
import sys
12
import os
13
from AppDocData import AppDocData
14
import Line_Sizing_Liquid_UI
15
import math
16

  
17

  
18
class QLine_Sizing_LiquidDialog(QDialog):
19
    def __init__(self):
20
        QDialog.__init__(self)
21

  
22
        self.ui = Line_Sizing_Liquid_UI.Ui_Dialog()
23
        self.ui.setupUi(self)
24
        self.units = {}
25
        self.isAccepted = False
26
        self.velocity = None
27
        self.drop_pressure = None
28

  
29
        self.init_units()
30
        self.initialize()
31

  
32
    def show_dialog(self):
33
        self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)
34

  
35
        self.exec_()
36

  
37
        return self.isAccepted, self.velocity, self.drop_pressure
38

  
39
    def init_units(self):
40
        app_doc_data = AppDocData.instance()
41
        active_drawing = app_doc_data.activeDrawing
42

  
43
        for attr in active_drawing.attrs:
44
            if attr[0] == 'Units':
45
                self.units = attr[1]
46

  
47
    def initialize(self):
48
        try:
49
            self.ui.label_Velocity_Unit.setText(self.units['Velocity'])
50
            self.ui.label_Drop_Pressure_Unit.setText('{}/100{}'.format(self.units['Pressure'], self.units['Length']))
51
            # Flowrate Volume
52
            flowrate_volume_unit = self.units['Flowrate_Volume']
53
            if flowrate_volume_unit == 'm3/h':
54
                self.ui.radioButton_Flowrate_Volume_1.setText('0 ~ 56 m3/h')
55
                self.ui.radioButton_Flowrate_Volume_2.setText('56 ~ 155 m3/h')
56
                self.ui.radioButton_Flowrate_Volume_3.setText('155 m3/h ~')
57
            elif flowrate_volume_unit == 'l/min':
58
                self.ui.radioButton_Flowrate_Volume_1.setText('0 ~ 933 l/min')
59
                self.ui.radioButton_Flowrate_Volume_2.setText('933 ~ 2583 l/min')
60
                self.ui.radioButton_Flowrate_Volume_3.setText('2583 l/min ~')
61
            elif flowrate_volume_unit == 'ft3/h':
62
                self.ui.radioButton_Flowrate_Volume_1.setText('0 ~ 1977 ft3/h')
63
                self.ui.radioButton_Flowrate_Volume_2.setText('1977 ~ 5473 ft3/h')
64
                self.ui.radioButton_Flowrate_Volume_3.setText('5473 ft3/h ~')
65
            elif flowrate_volume_unit == 'USgpm':
66
                self.ui.radioButton_Flowrate_Volume_1.setText('0 ~ 246 USgpm')
67
                self.ui.radioButton_Flowrate_Volume_2.setText('246 ~ 682 USgpm')
68
                self.ui.radioButton_Flowrate_Volume_3.setText('682 USgpm ~')
69
            elif flowrate_volume_unit == 'BPSD':
70
                self.ui.radioButton_Flowrate_Volume_1.setText('0 ~ 8458 BPSD')
71
                self.ui.radioButton_Flowrate_Volume_2.setText('8458 ~ 23411 BPSD')
72
                self.ui.radioButton_Flowrate_Volume_3.setText('23411 BPSD ~')
73

  
74
            velocity_unit = self.units['Velocity']
75
            if velocity_unit == 'm/s':
76
                self.ui.label_General_Service_Velocity.setText('4.5')
77
                # Pump Suction Lines
78
                self.ui.label_Boiling_Liquids_Velocity.setText('1.8')
79
                self.ui.label_Non_Boiling_Liquids_Velocity.setText('2.4')
80
                # Pump Discharge Lines
81
                self.ui.label_Flowrate_Volume_1_Velocity.setText('2.4')
82
                self.ui.label_Flowrate_Volume_2_Velocity.setText('3')
83
                self.ui.label_Flowrate_Volume_3_Velocity.setText('4.5')
84
                # Process Lines
85
                self.ui.label_Reboiler_Trapout_Velocity.setText('1.2')
86
                self.ui.label_Gravity_Flow_Service_Velocity.setText('2.4')
87
                self.ui.label_Boiler_Feed_Water_Service_Velocity.setText('4.5')
88
                self.ui.label_From_Condenser_Velocity.setText('1.5')
89
                self.ui.label_Liquid_Feed_To_Tower_Velocity.setText('1.8')
90
                self.ui.label_Refrigerant_Lines_Velocity.setText('1.2')
91
                # Process Fluids
92
                self.ui.label_Cooling_Water_Header_Velocity.setText('4.8')
93
                self.ui.label_Cooling_Water_Branch_Velocity.setText('3')
94
                self.ui.label_Phenolic_Water_Velocity.setText('0.9')
95
                self.ui.label_Concentrated_H2SO4_Velocity.setText('1.2')
96
                self.ui.label_Salt_Water_Velocity.setText('1.8')
97
                self.ui.label_Caustic_Solution_Velocity.setText('1.2')
98
                self.ui.label_CO2_Rich_Amine_Liquid_Velocity.setText('3')
99
            elif velocity_unit == 'ft/s':
100
                self.ui.label_General_Service_Velocity.setText('14.7')
101
                # Pump Suction Lines
102
                self.ui.label_Boiling_Liquids_Velocity.setText('5.9')
103
                self.ui.label_Non_Boiling_Liquids_Velocity.setText('7.8')
104
                # Pump Discharge Lines
105
                self.ui.label_Flowrate_Volume_1_Velocity.setText('7.8')
106
                self.ui.label_Flowrate_Volume_2_Velocity.setText('9.8')
107
                self.ui.label_Flowrate_Volume_3_Velocity.setText('14.7')
108
                # Process Lines
109
                self.ui.label_Reboiler_Trapout_Velocity.setText('3.9')
110
                self.ui.label_Gravity_Flow_Service_Velocity.setText('7.8')
111
                self.ui.label_Boiler_Feed_Water_Service_Velocity.setText('14.7')
112
                self.ui.label_From_Condenser_Velocity.setText('4.9')
113
                self.ui.label_Liquid_Feed_To_Tower_Velocity.setText('5.9')
114
                self.ui.label_Refrigerant_Lines_Velocity.setText('3.9')
115
                # Process Fluids
116
                self.ui.label_Cooling_Water_Header_Velocity.setText('15.7')
117
                self.ui.label_Cooling_Water_Branch_Velocity.setText('9.8')
118
                self.ui.label_Phenolic_Water_Velocity.setText('2.9')
119
                self.ui.label_Concentrated_H2SO4_Velocity.setText('3.9')
120
                self.ui.label_Salt_Water_Velocity.setText('5.9')
121
                self.ui.label_Caustic_Solution_Velocity.setText('3.9')
122
                self.ui.label_CO2_Rich_Amine_Liquid_Velocity.setText('9.8')
123

  
124
            # 압력의 기준
125
            # 초기값 (kg/cm2/100m) 설정
126
            secldp = [0.9, 0.081, 0.2, 1.4, 0.5, 0.03, 0.09]
127
            length_unit = self.units['Length']
128
            pressure_unit = self.units['Pressure']
129

  
130
            if pressure_unit == 'kg/cm2':
131
                if length_unit == 'm':
132
                    secldp = secldp
133
                elif length_unit == 'in':
134
                    for i in range(len(secldp)):
135
                        secldp[i] *= 0.0254
136
                elif length_unit == 'ft':
137
                    for i in range(len(secldp)):
138
                        secldp[i] /= 3.28084
139
                elif length_unit == 'yd':
140
                    for i in range(len(secldp)):
141
                        secldp[i] /= 1.09361
142
                elif length_unit == 'mile':
143
                    for i in range(len(secldp)):
144
                        secldp[i] /= 0.000621371
145
                elif length_unit == 'mm':
146
                    for i in range(len(secldp)):
147
                        secldp[i] /= 1000
148
            elif pressure_unit == 'psi':
149
                for i in range(len(secldp)):
150
                    secldp[i] = secldp[i] / 1.033 * 14.7
151

  
152
                if length_unit == 'm':
153
                    secldp = secldp
154
                elif length_unit == 'in':
155
                    for i in range(len(secldp)):
156
                        secldp[i] *= 0.0254
157
                elif length_unit == 'ft':
158
                    for i in range(len(secldp)):
159
                        secldp[i] /= 3.28084
160
                elif length_unit == 'yd':
161
                    for i in range(len(secldp)):
162
                        secldp[i] /= 1.09361
163
                elif length_unit == 'mile':
164
                    for i in range(len(secldp)):
165
                        secldp[i] /= 0.000621371
166
                elif length_unit == 'mm':
167
                    for i in range(len(secldp)):
168
                        secldp[i] /= 1000
169
            elif pressure_unit == 'atm':
170
                for i in range(len(secldp)):
171
                    secldp[i] = secldp[i] / 1.033
172

  
173
                if length_unit == 'm':
174
                    secldp = secldp
175
                elif length_unit == 'in':
176
                    for i in range(len(secldp)):
177
                        secldp[i] *= 0.0254
178
                elif length_unit == 'ft':
179
                    for i in range(len(secldp)):
180
                        secldp[i] /= 3.28084
181
                elif length_unit == 'yd':
182
                    for i in range(len(secldp)):
183
                        secldp[i] /= 1.09361
184
                elif length_unit == 'mile':
185
                    for i in range(len(secldp)):
186
                        secldp[i] /= 0.000621371
187
                elif length_unit == 'mm':
188
                    for i in range(len(secldp)):
189
                        secldp[i] /= 1000
190
            elif pressure_unit == 'bar':
191
                for i in range(len(secldp)):
192
                    secldp[i] = secldp[i] / 1.033 * 1.013
193

  
194
                if length_unit == 'm':
195
                    secldp = secldp
196
                elif length_unit == 'in':
197
                    for i in range(len(secldp)):
198
                        secldp[i] *= 0.0254
199
                elif length_unit == 'ft':
200
                    for i in range(len(secldp)):
201
                        secldp[i] /= 3.28084
202
                elif length_unit == 'yd':
203
                    for i in range(len(secldp)):
204
                        secldp[i] /= 1.09361
205
                elif length_unit == 'mile':
206
                    for i in range(len(secldp)):
207
                        secldp[i] /= 0.000621371
208
                elif length_unit == 'mm':
209
                    for i in range(len(secldp)):
210
                        secldp[i] /= 1000
211
            elif pressure_unit == 'mmHg':
212
                for i in range(len(secldp)):
213
                    secldp[i] = secldp[i] / 1.033 * 760
214

  
215
                if length_unit == 'm':
216
                    secldp = secldp
217
                elif length_unit == 'in':
218
                    for i in range(len(secldp)):
219
                        secldp[i] *= 0.0254
220
                elif length_unit == 'ft':
221
                    for i in range(len(secldp)):
222
                        secldp[i] /= 3.28084
223
                elif length_unit == 'yd':
224
                    for i in range(len(secldp)):
225
                        secldp[i] /= 1.09361
226
                elif length_unit == 'mile':
227
                    for i in range(len(secldp)):
228
                        secldp[i] /= 0.000621371
229
                elif length_unit == 'mm':
230
                    for i in range(len(secldp)):
231
                        secldp[i] /= 1000
232
            elif pressure_unit == 'kPa':
233
                for i in range(len(secldp)):
234
                    secldp[i] = secldp[i] / 1.033 * 101.325
235

  
236
                if length_unit == 'm':
237
                    secldp = secldp
238
                elif length_unit == 'in':
239
                    for i in range(len(secldp)):
240
                        secldp[i] *= 0.0254
241
                elif length_unit == 'ft':
242
                    for i in range(len(secldp)):
243
                        secldp[i] /= 3.28084
244
                elif length_unit == 'yd':
245
                    for i in range(len(secldp)):
246
                        secldp[i] /= 1.09361
247
                elif length_unit == 'mile':
248
                    for i in range(len(secldp)):
249
                        secldp[i] /= 0.000621371
250
                elif length_unit == 'mm':
251
                    for i in range(len(secldp)):
252
                        secldp[i] /= 1000
253
            elif pressure_unit == 'MPa':
254
                for i in range(len(secldp)):
255
                    secldp[i] = secldp[i] / 1.033 * 0.101325
256

  
257
                if length_unit == 'm':
258
                    secldp = secldp
259
                elif length_unit == 'in':
260
                    for i in range(len(secldp)):
261
                        secldp[i] *= 0.0254
262
                elif length_unit == 'ft':
263
                    for i in range(len(secldp)):
264
                        secldp[i] /= 3.28084
265
                elif length_unit == 'yd':
266
                    for i in range(len(secldp)):
267
                        secldp[i] /= 1.09361
268
                elif length_unit == 'mile':
269
                    for i in range(len(secldp)):
270
                        secldp[i] /= 0.000621371
271
                elif length_unit == 'mm':
272
                    for i in range(len(secldp)):
273
                        secldp[i] /= 1000
274

  
275
            self.ui.label_General_Service_Drop_Pressure.setText(str(round(secldp[0], 5)))
276
            self.ui.label_Boiling_Liquids_Drop_Pressure.setText(str(round(secldp[1], 5)))
277
            self.ui.label_Non_Boiling_Liquids_Drop_Pressure.setText(str(round(secldp[2], 5)))
278
            self.ui.label_Flowrate_Volume_1_Drop_Pressure.setText(str(round(secldp[3], 5)))
279
            self.ui.label_Flowrate_Volume_2_Drop_Pressure.setText(str(round(secldp[0], 5)))
280
            self.ui.label_Flowrate_Volume_3_Drop_Pressure.setText(str(round(secldp[4], 5)))
281
            self.ui.label_Reboiler_Trapout_Drop_Pressure.setText(str(round(secldp[5], 5)))
282
            self.ui.label_To_Control_Valve_Drop_Pressure.setText(str(round(secldp[2], 5)))
283
            self.ui.label_Gravity_Flow_Service_Drop_Pressure.setText(str(round(secldp[6], 5)))
284
            self.ui.label_Cooling_Water_Header_Drop_Pressure.setText(str(round(secldp[4], 5)))
285
            self.ui.label_Cooling_Water_Branch_Drop_Pressure.setText(str(round(secldp[4], 5)))
286

  
287
        except Exception as ex:
288
            from App import App
289
            from AppDocData import MessageType
290

  
291
            message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
292
                                                           sys.exc_info()[-1].tb_lineno)
293
            App.mainWnd().addMessage.emit(MessageType.Error, message)
294

  
295
    def accept(self):
296
        if self.ui.radioButton_General_Service.isChecked():
297
            self.velocity = self.ui.label_General_Service_Velocity.text()
298
            self.drop_pressure = self.ui.label_General_Service_Drop_Pressure.text()
299
        elif self.ui.radioButton_Boiling_Liquids.isChecked():
300
            self.velocity = self.ui.label_Boiling_Liquids_Velocity.text()
301
            self.drop_pressure = self.ui.label_Boiling_Liquids_Drop_Pressure.text()
302
        elif self.ui.radioButton_Non_Boiling_Liquids.isChecked():
303
            self.velocity = self.ui.label_Non_Boiling_Liquids_Velocity.text()
304
            self.drop_pressure = self.ui.label_Non_Boiling_Liquids_Drop_Pressure.text()
305
        elif self.ui.radioButton_Flowrate_Volume_1.isChecked():
306
            self.velocity = self.ui.label_Flowrate_Volume_1_Velocity.text()
307
            self.drop_pressure = self.ui.label_Flowrate_Volume_1_Drop_Pressure.text()
308
        elif self.ui.radioButton_Flowrate_Volume_2.isChecked():
309
            self.velocity = self.ui.label_Flowrate_Volume_2_Velocity.text()
310
            self.drop_pressure = self.ui.label_Flowrate_Volume_2_Drop_Pressure.text()
311
        elif self.ui.radioButton_Flowrate_Volume_3.isChecked():
312
            self.velocity = self.ui.label_Flowrate_Volume_3_Velocity.text()
313
            self.drop_pressure = self.ui.label_Flowrate_Volume_3_Drop_Pressure.text()
314
        elif self.ui.radioButton_Reboiler_Trapout.isChecked():
315
            self.velocity = self.ui.label_Reboiler_Trapout_Velocity.text()
316
            self.drop_pressure = self.ui.label_Reboiler_Trapout_Drop_Pressure.text()
317
        elif self.ui.radioButton_To_Control_Valve.isChecked():
318
            self.velocity = None
319
            self.drop_pressure = self.ui.label_To_Control_Valve_Drop_Pressure.text()
320
        elif self.ui.radioButton_Gravity_Flow_Service.isChecked():
321
            self.velocity = self.ui.label_Gravity_Flow_Service_Velocity.text()
322
            self.drop_pressure = self.ui.label_Gravity_Flow_Service_Drop_Pressure.text()
323
        elif self.ui.radioButton_Boiler_Feed_Water_Service.isChecked():
324
            self.velocity = self.ui.label_Boiler_Feed_Water_Service_Velocity.text()
325
            self.drop_pressure = None
326
        elif self.ui.radioButton_From_Condenser.isChecked():
327
            self.velocity = self.ui.label_From_Condenser_Velocity.text()
328
            self.drop_pressure = None
329
        elif self.ui.radioButton_Liquid_Feed_To_Tower.isChecked():
330
            self.velocity = self.ui.label_Liquid_Feed_To_Tower_Velocity.text()
331
            self.drop_pressure = None
332
        elif self.ui.radioButton_Refrigerant_Lines.isChecked():
333
            self.velocity = self.ui.label_Refrigerant_Lines_Velocity.text()
334
            self.drop_pressure = None
335
        elif self.ui.radioButton_Cooling_Water_Header.isChecked():
336
            self.velocity = self.ui.label_Cooling_Water_Header_Velocity.text()
337
            self.drop_pressure = self.ui.label_Cooling_Water_Header_Drop_Pressure.text()
338
        elif self.ui.radioButton_Cooling_Water_Branch.isChecked():
339
            self.velocity = self.ui.label_Cooling_Water_Branch_Velocity.text()
340
            self.drop_pressure = self.ui.label_Cooling_Water_Branch_Drop_Pressure.text()
341
        elif self.ui.radioButton_Phenolic_Water.isChecked():
342
            self.velocity = self.ui.label_Phenolic_Water_Velocity.text()
343
            self.drop_pressure = None
344
        elif self.ui.radioButton_Concentrated_H2SO4.isChecked():
345
            self.velocity = self.ui.label_Concentrated_H2SO4_Velocity.text()
346
            self.drop_pressure = None
347
        elif self.ui.radioButton_Salt_Water.isChecked():
348
            self.velocity = self.ui.label_Salt_Water_Velocity.text()
349
            self.drop_pressure = None
350
        elif self.ui.radioButton_Caustic_Solution.isChecked():
351
            self.velocity = self.ui.label_Caustic_Solution_Velocity.text()
352
            self.drop_pressure = None
353
        elif self.ui.radioButton_CO2_Rich_Amine_Liquid.isChecked():
354
            self.velocity = self.ui.label_CO2_Rich_Amine_Liquid_Velocity.text()
355
            self.drop_pressure = None
356

  
357
        if self.velocity is None and self.drop_pressure is None:
358
            self.isAccepted = False
359
        else:
360
            self.isAccepted = True
361

  
362
        QDialog.accept(self)
363

  
364
    def reject(self):
365
        QDialog.reject(self)
HYTOS/HYTOS/Line_Sizing_Liquid_UI.py
1
# -*- coding: utf-8 -*-
2

  
3
# Form implementation generated from reading ui file '.\UI\Line_Sizing_Liquid.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(440, 757)
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.verticalLayout_2 = QtWidgets.QVBoxLayout(Dialog)
24
        self.verticalLayout_2.setObjectName("verticalLayout_2")
25
        self.scrollArea = QtWidgets.QScrollArea(Dialog)
26
        self.scrollArea.setWidgetResizable(True)
27
        self.scrollArea.setObjectName("scrollArea")
28
        self.scrollAreaWidgetContents = QtWidgets.QWidget()
29
        self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 420, 708))
30
        self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
31
        self.horizontalLayout_27 = QtWidgets.QHBoxLayout(self.scrollAreaWidgetContents)
32
        self.horizontalLayout_27.setObjectName("horizontalLayout_27")
33
        self.gridLayout = QtWidgets.QGridLayout()
34
        self.gridLayout.setContentsMargins(-1, -1, -1, 6)
35
        self.gridLayout.setObjectName("gridLayout")
36
        self.horizontalLayout_22 = QtWidgets.QHBoxLayout()
37
        self.horizontalLayout_22.setObjectName("horizontalLayout_22")
38
        self.radioButton_Flowrate_Volume_2 = QtWidgets.QRadioButton(self.scrollAreaWidgetContents)
39
        self.radioButton_Flowrate_Volume_2.setObjectName("radioButton_Flowrate_Volume_2")
40
        self.horizontalLayout_22.addWidget(self.radioButton_Flowrate_Volume_2)
41
        self.label_Flowrate_Volume_2_Velocity = QtWidgets.QLabel(self.scrollAreaWidgetContents)
42
        self.label_Flowrate_Volume_2_Velocity.setMinimumSize(QtCore.QSize(100, 0))
43
        self.label_Flowrate_Volume_2_Velocity.setMaximumSize(QtCore.QSize(100, 16777215))
44
        self.label_Flowrate_Volume_2_Velocity.setText("")
45
        self.label_Flowrate_Volume_2_Velocity.setAlignment(QtCore.Qt.AlignCenter)
46
        self.label_Flowrate_Volume_2_Velocity.setObjectName("label_Flowrate_Volume_2_Velocity")
47
        self.horizontalLayout_22.addWidget(self.label_Flowrate_Volume_2_Velocity)
48
        self.label_Flowrate_Volume_2_Drop_Pressure = QtWidgets.QLabel(self.scrollAreaWidgetContents)
49
        self.label_Flowrate_Volume_2_Drop_Pressure.setMinimumSize(QtCore.QSize(100, 0))
50
        self.label_Flowrate_Volume_2_Drop_Pressure.setMaximumSize(QtCore.QSize(100, 16777215))
51
        self.label_Flowrate_Volume_2_Drop_Pressure.setText("")
52
        self.label_Flowrate_Volume_2_Drop_Pressure.setAlignment(QtCore.Qt.AlignCenter)
53
        self.label_Flowrate_Volume_2_Drop_Pressure.setObjectName("label_Flowrate_Volume_2_Drop_Pressure")
54
        self.horizontalLayout_22.addWidget(self.label_Flowrate_Volume_2_Drop_Pressure)
55
        self.gridLayout.addLayout(self.horizontalLayout_22, 9, 0, 1, 1)
56
        self.horizontalLayout_18 = QtWidgets.QHBoxLayout()
57
        self.horizontalLayout_18.setObjectName("horizontalLayout_18")
58
        self.radioButton_Reboiler_Trapout = QtWidgets.QRadioButton(self.scrollAreaWidgetContents)
59
        self.radioButton_Reboiler_Trapout.setObjectName("radioButton_Reboiler_Trapout")
60
        self.horizontalLayout_18.addWidget(self.radioButton_Reboiler_Trapout)
61
        self.label_Reboiler_Trapout_Velocity = QtWidgets.QLabel(self.scrollAreaWidgetContents)
62
        self.label_Reboiler_Trapout_Velocity.setMinimumSize(QtCore.QSize(100, 0))
63
        self.label_Reboiler_Trapout_Velocity.setMaximumSize(QtCore.QSize(100, 16777215))
64
        self.label_Reboiler_Trapout_Velocity.setText("")
65
        self.label_Reboiler_Trapout_Velocity.setAlignment(QtCore.Qt.AlignCenter)
66
        self.label_Reboiler_Trapout_Velocity.setObjectName("label_Reboiler_Trapout_Velocity")
67
        self.horizontalLayout_18.addWidget(self.label_Reboiler_Trapout_Velocity)
68
        self.label_Reboiler_Trapout_Drop_Pressure = QtWidgets.QLabel(self.scrollAreaWidgetContents)
69
        self.label_Reboiler_Trapout_Drop_Pressure.setMinimumSize(QtCore.QSize(100, 0))
70
        self.label_Reboiler_Trapout_Drop_Pressure.setMaximumSize(QtCore.QSize(100, 16777215))
71
        self.label_Reboiler_Trapout_Drop_Pressure.setText("")
72
        self.label_Reboiler_Trapout_Drop_Pressure.setAlignment(QtCore.Qt.AlignCenter)
73
        self.label_Reboiler_Trapout_Drop_Pressure.setObjectName("label_Reboiler_Trapout_Drop_Pressure")
74
        self.horizontalLayout_18.addWidget(self.label_Reboiler_Trapout_Drop_Pressure)
75
        self.gridLayout.addLayout(self.horizontalLayout_18, 12, 0, 1, 1)
76
        self.horizontalLayout_24 = QtWidgets.QHBoxLayout()
77
        self.horizontalLayout_24.setObjectName("horizontalLayout_24")
78
        self.radioButton_General_Service = QtWidgets.QRadioButton(self.scrollAreaWidgetContents)
79
        self.radioButton_General_Service.setObjectName("radioButton_General_Service")
80
        self.horizontalLayout_24.addWidget(self.radioButton_General_Service)
81
        self.label_General_Service_Velocity = QtWidgets.QLabel(self.scrollAreaWidgetContents)
82
        self.label_General_Service_Velocity.setMinimumSize(QtCore.QSize(100, 0))
83
        self.label_General_Service_Velocity.setMaximumSize(QtCore.QSize(100, 16777215))
84
        self.label_General_Service_Velocity.setText("")
85
        self.label_General_Service_Velocity.setAlignment(QtCore.Qt.AlignCenter)
86
        self.label_General_Service_Velocity.setObjectName("label_General_Service_Velocity")
87
        self.horizontalLayout_24.addWidget(self.label_General_Service_Velocity)
88
        self.label_General_Service_Drop_Pressure = QtWidgets.QLabel(self.scrollAreaWidgetContents)
89
        self.label_General_Service_Drop_Pressure.setMinimumSize(QtCore.QSize(100, 0))
90
        self.label_General_Service_Drop_Pressure.setMaximumSize(QtCore.QSize(100, 16777215))
91
        self.label_General_Service_Drop_Pressure.setText("")
92
        self.label_General_Service_Drop_Pressure.setAlignment(QtCore.Qt.AlignCenter)
93
        self.label_General_Service_Drop_Pressure.setObjectName("label_General_Service_Drop_Pressure")
94
        self.horizontalLayout_24.addWidget(self.label_General_Service_Drop_Pressure)
95
        self.gridLayout.addLayout(self.horizontalLayout_24, 2, 0, 1, 1)
96
        self.horizontalLayout_8 = QtWidgets.QHBoxLayout()
97
        self.horizontalLayout_8.setObjectName("horizontalLayout_8")
98
        self.label_21 = QtWidgets.QLabel(self.scrollAreaWidgetContents)
99
        font = QtGui.QFont()
100
        font.setBold(True)
101
        font.setWeight(75)
102
        self.label_21.setFont(font)
103
        self.label_21.setObjectName("label_21")
104
        self.horizontalLayout_8.addWidget(self.label_21)
105
        self.gridLayout.addLayout(self.horizontalLayout_8, 11, 0, 1, 1)
106
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
107
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
108
        self.label = QtWidgets.QLabel(self.scrollAreaWidgetContents)
109
        font = QtGui.QFont()
110
        font.setBold(True)
111
        font.setWeight(75)
112
        self.label.setFont(font)
113
        self.label.setAlignment(QtCore.Qt.AlignCenter)
114
        self.label.setObjectName("label")
115
        self.horizontalLayout_2.addWidget(self.label)
116
        self.label_3 = QtWidgets.QLabel(self.scrollAreaWidgetContents)
117
        self.label_3.setMinimumSize(QtCore.QSize(100, 0))
118
        self.label_3.setMaximumSize(QtCore.QSize(100, 16777215))
119
        font = QtGui.QFont()
120
        font.setBold(True)
121
        font.setWeight(75)
122
        self.label_3.setFont(font)
123
        self.label_3.setAlignment(QtCore.Qt.AlignCenter)
124
        self.label_3.setObjectName("label_3")
125
        self.horizontalLayout_2.addWidget(self.label_3)
126
        self.label_2 = QtWidgets.QLabel(self.scrollAreaWidgetContents)
127
        self.label_2.setMinimumSize(QtCore.QSize(100, 0))
128
        self.label_2.setMaximumSize(QtCore.QSize(100, 16777215))
129
        font = QtGui.QFont()
130
        font.setBold(True)
131
        font.setWeight(75)
132
        self.label_2.setFont(font)
133
        self.label_2.setAlignment(QtCore.Qt.AlignCenter)
134
        self.label_2.setObjectName("label_2")
135
        self.horizontalLayout_2.addWidget(self.label_2)
136
        self.gridLayout.addLayout(self.horizontalLayout_2, 0, 0, 1, 1)
137
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
138
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
139
        self.radioButton_Salt_Water = QtWidgets.QRadioButton(self.scrollAreaWidgetContents)
140
        self.radioButton_Salt_Water.setObjectName("radioButton_Salt_Water")
141
        self.horizontalLayout_4.addWidget(self.radioButton_Salt_Water)
142
        self.label_Salt_Water_Velocity = QtWidgets.QLabel(self.scrollAreaWidgetContents)
143
        self.label_Salt_Water_Velocity.setMinimumSize(QtCore.QSize(100, 0))
144
        self.label_Salt_Water_Velocity.setMaximumSize(QtCore.QSize(100, 16777215))
145
        self.label_Salt_Water_Velocity.setText("")
146
        self.label_Salt_Water_Velocity.setAlignment(QtCore.Qt.AlignCenter)
147
        self.label_Salt_Water_Velocity.setObjectName("label_Salt_Water_Velocity")
148
        self.horizontalLayout_4.addWidget(self.label_Salt_Water_Velocity)
149
        self.label_Salt_Water_Drop_Pressure = QtWidgets.QLabel(self.scrollAreaWidgetContents)
150
        self.label_Salt_Water_Drop_Pressure.setMinimumSize(QtCore.QSize(100, 0))
151
        self.label_Salt_Water_Drop_Pressure.setMaximumSize(QtCore.QSize(100, 16777215))
152
        self.label_Salt_Water_Drop_Pressure.setAlignment(QtCore.Qt.AlignCenter)
153
        self.label_Salt_Water_Drop_Pressure.setObjectName("label_Salt_Water_Drop_Pressure")
154
        self.horizontalLayout_4.addWidget(self.label_Salt_Water_Drop_Pressure)
155
        self.gridLayout.addLayout(self.horizontalLayout_4, 24, 0, 1, 1)
156
        self.horizontalLayout_25 = QtWidgets.QHBoxLayout()
157
        self.horizontalLayout_25.setObjectName("horizontalLayout_25")
158
        self.label_14 = QtWidgets.QLabel(self.scrollAreaWidgetContents)
159
        font = QtGui.QFont()
160
        font.setBold(True)
161
        font.setWeight(75)
162
        self.label_14.setFont(font)
163
        self.label_14.setObjectName("label_14")
164
        self.horizontalLayout_25.addWidget(self.label_14)
165
        self.gridLayout.addLayout(self.horizontalLayout_25, 7, 0, 1, 1)
166
        self.horizontalLayout_26 = QtWidgets.QHBoxLayout()
167
        self.horizontalLayout_26.setObjectName("horizontalLayout_26")
168
        self.radioButton_Non_Boiling_Liquids = QtWidgets.QRadioButton(self.scrollAreaWidgetContents)
169
        self.radioButton_Non_Boiling_Liquids.setObjectName("radioButton_Non_Boiling_Liquids")
170
        self.horizontalLayout_26.addWidget(self.radioButton_Non_Boiling_Liquids)
171
        self.label_Non_Boiling_Liquids_Velocity = QtWidgets.QLabel(self.scrollAreaWidgetContents)
172
        self.label_Non_Boiling_Liquids_Velocity.setMinimumSize(QtCore.QSize(100, 0))
173
        self.label_Non_Boiling_Liquids_Velocity.setMaximumSize(QtCore.QSize(100, 16777215))
174
        self.label_Non_Boiling_Liquids_Velocity.setText("")
175
        self.label_Non_Boiling_Liquids_Velocity.setAlignment(QtCore.Qt.AlignCenter)
176
        self.label_Non_Boiling_Liquids_Velocity.setObjectName("label_Non_Boiling_Liquids_Velocity")
177
        self.horizontalLayout_26.addWidget(self.label_Non_Boiling_Liquids_Velocity)
178
        self.label_Non_Boiling_Liquids_Drop_Pressure = QtWidgets.QLabel(self.scrollAreaWidgetContents)
179
        self.label_Non_Boiling_Liquids_Drop_Pressure.setMinimumSize(QtCore.QSize(100, 0))
180
        self.label_Non_Boiling_Liquids_Drop_Pressure.setMaximumSize(QtCore.QSize(100, 16777215))
181
        self.label_Non_Boiling_Liquids_Drop_Pressure.setText("")
182
        self.label_Non_Boiling_Liquids_Drop_Pressure.setAlignment(QtCore.Qt.AlignCenter)
183
        self.label_Non_Boiling_Liquids_Drop_Pressure.setObjectName("label_Non_Boiling_Liquids_Drop_Pressure")
184
        self.horizontalLayout_26.addWidget(self.label_Non_Boiling_Liquids_Drop_Pressure)
185
        self.gridLayout.addLayout(self.horizontalLayout_26, 6, 0, 1, 1)
186
        self.horizontalLayout_19 = QtWidgets.QHBoxLayout()
187
        self.horizontalLayout_19.setObjectName("horizontalLayout_19")
188
        self.radioButton_To_Control_Valve = QtWidgets.QRadioButton(self.scrollAreaWidgetContents)
189
        self.radioButton_To_Control_Valve.setObjectName("radioButton_To_Control_Valve")
190
        self.horizontalLayout_19.addWidget(self.radioButton_To_Control_Valve)
191
        self.label_To_Control_Valve_Velocity = QtWidgets.QLabel(self.scrollAreaWidgetContents)
192
        self.label_To_Control_Valve_Velocity.setMinimumSize(QtCore.QSize(100, 0))
193
        self.label_To_Control_Valve_Velocity.setMaximumSize(QtCore.QSize(100, 16777215))
194
        self.label_To_Control_Valve_Velocity.setAlignment(QtCore.Qt.AlignCenter)
195
        self.label_To_Control_Valve_Velocity.setObjectName("label_To_Control_Valve_Velocity")
196
        self.horizontalLayout_19.addWidget(self.label_To_Control_Valve_Velocity)
197
        self.label_To_Control_Valve_Drop_Pressure = QtWidgets.QLabel(self.scrollAreaWidgetContents)
198
        self.label_To_Control_Valve_Drop_Pressure.setMinimumSize(QtCore.QSize(100, 0))
199
        self.label_To_Control_Valve_Drop_Pressure.setMaximumSize(QtCore.QSize(100, 16777215))
200
        self.label_To_Control_Valve_Drop_Pressure.setText("")
201
        self.label_To_Control_Valve_Drop_Pressure.setAlignment(QtCore.Qt.AlignCenter)
202
        self.label_To_Control_Valve_Drop_Pressure.setObjectName("label_To_Control_Valve_Drop_Pressure")
203
        self.horizontalLayout_19.addWidget(self.label_To_Control_Valve_Drop_Pressure)
204
        self.gridLayout.addLayout(self.horizontalLayout_19, 13, 0, 1, 1)
205
        self.horizontalLayout_11 = QtWidgets.QHBoxLayout()
206
        self.horizontalLayout_11.setObjectName("horizontalLayout_11")
207
        self.label_36 = QtWidgets.QLabel(self.scrollAreaWidgetContents)
208
        font = QtGui.QFont()
209
        font.setBold(True)
210
        font.setWeight(75)
211
        self.label_36.setFont(font)
212
        self.label_36.setObjectName("label_36")
213
        self.horizontalLayout_11.addWidget(self.label_36)
214
        self.gridLayout.addLayout(self.horizontalLayout_11, 19, 0, 1, 1)
215
        self.horizontalLayout_20 = QtWidgets.QHBoxLayout()
216
        self.horizontalLayout_20.setObjectName("horizontalLayout_20")
217
        self.radioButton_Gravity_Flow_Service = QtWidgets.QRadioButton(self.scrollAreaWidgetContents)
218
        self.radioButton_Gravity_Flow_Service.setObjectName("radioButton_Gravity_Flow_Service")
219
        self.horizontalLayout_20.addWidget(self.radioButton_Gravity_Flow_Service)
220
        self.label_Gravity_Flow_Service_Velocity = QtWidgets.QLabel(self.scrollAreaWidgetContents)
221
        self.label_Gravity_Flow_Service_Velocity.setMinimumSize(QtCore.QSize(100, 0))
222
        self.label_Gravity_Flow_Service_Velocity.setMaximumSize(QtCore.QSize(100, 16777215))
223
        self.label_Gravity_Flow_Service_Velocity.setText("")
224
        self.label_Gravity_Flow_Service_Velocity.setAlignment(QtCore.Qt.AlignCenter)
225
        self.label_Gravity_Flow_Service_Velocity.setObjectName("label_Gravity_Flow_Service_Velocity")
226
        self.horizontalLayout_20.addWidget(self.label_Gravity_Flow_Service_Velocity)
227
        self.label_Gravity_Flow_Service_Drop_Pressure = QtWidgets.QLabel(self.scrollAreaWidgetContents)
228
        self.label_Gravity_Flow_Service_Drop_Pressure.setMinimumSize(QtCore.QSize(100, 0))
229
        self.label_Gravity_Flow_Service_Drop_Pressure.setMaximumSize(QtCore.QSize(100, 16777215))
230
        self.label_Gravity_Flow_Service_Drop_Pressure.setText("")
231
        self.label_Gravity_Flow_Service_Drop_Pressure.setAlignment(QtCore.Qt.AlignCenter)
232
        self.label_Gravity_Flow_Service_Drop_Pressure.setObjectName("label_Gravity_Flow_Service_Drop_Pressure")
233
        self.horizontalLayout_20.addWidget(self.label_Gravity_Flow_Service_Drop_Pressure)
234
        self.gridLayout.addLayout(self.horizontalLayout_20, 14, 0, 1, 1)
235
        self.horizontalLayout = QtWidgets.QHBoxLayout()
236
        self.horizontalLayout.setObjectName("horizontalLayout")
237
        self.radioButton_CO2_Rich_Amine_Liquid = QtWidgets.QRadioButton(self.scrollAreaWidgetContents)
238
        self.radioButton_CO2_Rich_Amine_Liquid.setObjectName("radioButton_CO2_Rich_Amine_Liquid")
239
        self.horizontalLayout.addWidget(self.radioButton_CO2_Rich_Amine_Liquid)
240
        self.label_CO2_Rich_Amine_Liquid_Velocity = QtWidgets.QLabel(self.scrollAreaWidgetContents)
241
        self.label_CO2_Rich_Amine_Liquid_Velocity.setMinimumSize(QtCore.QSize(100, 0))
242
        self.label_CO2_Rich_Amine_Liquid_Velocity.setMaximumSize(QtCore.QSize(100, 16777215))
243
        self.label_CO2_Rich_Amine_Liquid_Velocity.setText("")
244
        self.label_CO2_Rich_Amine_Liquid_Velocity.setAlignment(QtCore.Qt.AlignCenter)
245
        self.label_CO2_Rich_Amine_Liquid_Velocity.setObjectName("label_CO2_Rich_Amine_Liquid_Velocity")
246
        self.horizontalLayout.addWidget(self.label_CO2_Rich_Amine_Liquid_Velocity)
247
        self.label_CO2_Rich_Amine_Liquid_Drop_Pressure = QtWidgets.QLabel(self.scrollAreaWidgetContents)
248
        self.label_CO2_Rich_Amine_Liquid_Drop_Pressure.setMinimumSize(QtCore.QSize(100, 0))
249
        self.label_CO2_Rich_Amine_Liquid_Drop_Pressure.setMaximumSize(QtCore.QSize(100, 16777215))
250
        self.label_CO2_Rich_Amine_Liquid_Drop_Pressure.setAlignment(QtCore.Qt.AlignCenter)
251
        self.label_CO2_Rich_Amine_Liquid_Drop_Pressure.setObjectName("label_CO2_Rich_Amine_Liquid_Drop_Pressure")
252
        self.horizontalLayout.addWidget(self.label_CO2_Rich_Amine_Liquid_Drop_Pressure)
253
        self.gridLayout.addLayout(self.horizontalLayout, 26, 0, 1, 1)
254
        self.horizontalLayout_10 = QtWidgets.QHBoxLayout()
255
        self.horizontalLayout_10.setObjectName("horizontalLayout_10")
256
        self.radioButton_Cooling_Water_Branch = QtWidgets.QRadioButton(self.scrollAreaWidgetContents)
257
        self.radioButton_Cooling_Water_Branch.setObjectName("radioButton_Cooling_Water_Branch")
258
        self.horizontalLayout_10.addWidget(self.radioButton_Cooling_Water_Branch)
259
        self.label_Cooling_Water_Branch_Velocity = QtWidgets.QLabel(self.scrollAreaWidgetContents)
260
        self.label_Cooling_Water_Branch_Velocity.setMinimumSize(QtCore.QSize(100, 0))
261
        self.label_Cooling_Water_Branch_Velocity.setMaximumSize(QtCore.QSize(100, 16777215))
262
        self.label_Cooling_Water_Branch_Velocity.setText("")
263
        self.label_Cooling_Water_Branch_Velocity.setAlignment(QtCore.Qt.AlignCenter)
264
        self.label_Cooling_Water_Branch_Velocity.setObjectName("label_Cooling_Water_Branch_Velocity")
265
        self.horizontalLayout_10.addWidget(self.label_Cooling_Water_Branch_Velocity)
266
        self.label_Cooling_Water_Branch_Drop_Pressure = QtWidgets.QLabel(self.scrollAreaWidgetContents)
267
        self.label_Cooling_Water_Branch_Drop_Pressure.setMinimumSize(QtCore.QSize(100, 0))
... 이 차이점은 표시할 수 있는 최대 줄수를 초과해서 이 차이점은 잘렸습니다.

내보내기 Unified diff

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