개정판 4aa060ea
issue #1202: calculate press drop
Change-Id: I70e77a77f03ea80410da0f9b838b5b29c0be95d9
HYTOS/HYTOS/LineSplitter.py | ||
---|---|---|
66 | 66 |
self.ui.label_PressureUnit.setText(attr[1]['Pressure']) |
67 | 67 |
self.ui.label_ElevationUnit.setText(attr[1]['Length']) |
68 | 68 |
|
69 |
matches = [connector.nozzle_data for connector in self._item.connectors if connector.nozzle_data]
|
|
69 |
matches = [connector.data for connector in self._item.connectors if connector.data]
|
|
70 | 70 |
if matches: |
71 | 71 |
pressure_drop = matches[0].pressure_drop |
72 | 72 |
if pressure_drop: |
... | ... | |
82 | 82 |
from EngineeringConnectorItem import NozzleData |
83 | 83 |
|
84 | 84 |
for connector in self._item.connectors: |
85 |
if not connector.nozzle_data:
|
|
86 |
connector.nozzle_data = NozzleData()
|
|
85 |
if not connector.data: |
|
86 |
connector.data = NozzleData() |
|
87 | 87 |
|
88 | 88 |
pressure_drop = self.ui.lineEdit_Pressure_Drop.text() |
89 | 89 |
if pressure_drop: |
90 |
connector.nozzle_data.pressure_drop = float(pressure_drop)
|
|
90 |
connector.data.pressure_drop = float(pressure_drop) |
|
91 | 91 |
else: |
92 |
connector.nozzle_data.pressure_drop = None
|
|
92 |
connector.data.pressure_drop = None |
|
93 | 93 |
|
94 | 94 |
elevation = self.ui.lineEdit_Elevation.text() |
95 | 95 |
if elevation: |
96 |
connector.nozzle_data.elevation = float(elevation)
|
|
96 |
connector.data.elevation = float(elevation) |
|
97 | 97 |
else: |
98 |
connector.nozzle_data.elevation = None
|
|
98 |
connector.data.elevation = None |
|
99 | 99 |
|
100 | 100 |
QDialog.accept(self) |
101 | 101 |
|
내보내기 Unified diff