개정판 4aa060ea
issue #1202: calculate press drop
Change-Id: I70e77a77f03ea80410da0f9b838b5b29c0be95d9
HYTOS/HYTOS/Strainer_T.py | ||
---|---|---|
52 | 52 |
self.ui.label_PressureUnit.setText(attr[1]['Pressure']) |
53 | 53 |
self.ui.label_ElevationUnit.setText(attr[1]['Length']) |
54 | 54 |
|
55 |
matches = [connector.nozzle_data for connector in self._item.connectors if connector.nozzle_data]
|
|
55 |
matches = [connector.data for connector in self._item.connectors if connector.data]
|
|
56 | 56 |
if matches: |
57 | 57 |
pressure_drop = matches[0].pressure_drop |
58 | 58 |
if pressure_drop: |
... | ... | |
68 | 68 |
from EngineeringConnectorItem import NozzleData |
69 | 69 |
|
70 | 70 |
for connector in self._item.connectors: |
71 |
if not connector.nozzle_data:
|
|
72 |
connector.nozzle_data = NozzleData()
|
|
71 |
if not connector.data: |
|
72 |
connector.data = NozzleData() |
|
73 | 73 |
|
74 | 74 |
pressure_drop = self.ui.lineEdit_Pressure_Drop.text() |
75 | 75 |
if pressure_drop: |
76 |
connector.nozzle_data.pressure_drop = float(pressure_drop)
|
|
76 |
connector.data.pressure_drop = float(pressure_drop) |
|
77 | 77 |
else: |
78 |
connector.nozzle_data.pressure_drop = None
|
|
78 |
connector.data.pressure_drop = None |
|
79 | 79 |
|
80 | 80 |
elevation = self.ui.lineEdit_Elevation.text() |
81 | 81 |
if elevation: |
82 |
connector.nozzle_data.elevation = float(elevation)
|
|
82 |
connector.data.elevation = float(elevation) |
|
83 | 83 |
else: |
84 |
connector.nozzle_data.elevation = None
|
|
84 |
connector.data.elevation = None |
|
85 | 85 |
|
86 | 86 |
QDialog.accept(self) |
87 | 87 |
|
내보내기 Unified diff