개정판 857d5558
issue #1060 : hole_calc 계산 시 method를 Configuration에서 얻어오도록 수정
Change-Id: I832ca5047f3787c779ca429a51bf0e6d1fefb719
HYTOS/HYTOS/Shapes/EngineeringLoopItem.py | ||
---|---|---|
131 | 131 |
if res == 0: |
132 | 132 |
break |
133 | 133 |
elif self.items[i].phase_type == 'Vapor': |
134 |
pass # TODO: |
|
134 |
self.discharge_vapor_factor_length(i) |
|
135 |
res = self.hole_p_cal(i) |
|
136 |
if res == 0: |
|
137 |
break |
|
135 | 138 |
except Exception as ex: |
136 | 139 |
from App import App |
137 | 140 |
message = 'error occurred({}) in {}:{}'.format(repr(ex), sys.exc_info()[-1].tb_frame.f_code.co_filename, |
... | ... | |
166 | 169 |
sys.exc_info()[-1].tb_lineno) |
167 | 170 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
168 | 171 |
|
172 |
def get_control_valve_equation(self): |
|
173 |
app_doc_data = AppDocData.instance() |
|
174 |
equation = app_doc_data.getConfigs('Control Valve', 'Equation') |
|
175 |
|
|
176 |
if len(equation) == 1: |
|
177 |
return equation[0].value |
|
178 |
else: |
|
179 |
return 'bd' |
|
180 |
|
|
169 | 181 |
def cv_dp_cal(self): |
170 | 182 |
try: |
171 | 183 |
acv = 0 |
... | ... | |
177 | 189 |
if acv: |
178 | 190 |
pf = (self.total_device_loss if self.total_device_loss else 0) + \ |
179 | 191 |
(self.line_total_friction_loss if self.line_total_friction_loss else 0) |
180 |
method = 'bd' # TODO:
|
|
192 |
method = self.get_control_valve_equation()
|
|
181 | 193 |
if method == 'bd': |
182 | 194 |
self.bd_cal(pf, acv) |
183 | 195 |
elif method == 'lummus': |
내보내기 Unified diff