|
@@ -11,24 +11,26 @@ class CalculationProcess(object):
|
|
|
|
|
|
def pre_to_temp(self):
|
|
|
if self.dict_input["evapPre"] and not self.dict_input["evapTemp"]:
|
|
|
- self.dict_input["evapTemp"] = PropsSI('T', 'P', self.dict_input['evapTemp']*1000,
|
|
|
+ self.dict_input["evapTemp"] = PropsSI('T', 'P', self.dict_input['evapPre']*1000 + 101325,
|
|
|
'Q', 1, self.dict_input['refrigerant']) - 273.15
|
|
|
if self.dict_input["condPre"] and not self.dict_input["condTemp"]:
|
|
|
- self.dict_input["condTemp"] = PropsSI('T', 'P', self.dict_input['condTemp']*1000,
|
|
|
+ self.dict_input["condTemp"] = PropsSI('T', 'P', self.dict_input['condPre']*1000 + 101325,
|
|
|
'Q', 1, self.dict_input['refrigerant']) - 273.15
|
|
|
+ if self.dict_input["evapTemp"] and not self.dict_input["sucTemp"]:
|
|
|
+ self.dict_input["sucTemp"] = self.dict_input["evapTemp"]
|
|
|
|
|
|
def judge_null(self):
|
|
|
Num = 0
|
|
|
self.pre_to_temp()
|
|
|
for k in self.dict_input:
|
|
|
- if self.dict_input[k] == '':
|
|
|
+ if self.dict_input[k] == '' or not self.dict_input[k]:
|
|
|
Num += 1
|
|
|
return Num
|
|
|
|
|
|
def cop_calculation(self):
|
|
|
dtm = DischargeTempModified(self.dict_input)
|
|
|
self.dict_input = dtm.discharge_temp_modified()
|
|
|
- pc=PerformanceCalculation(self.dict_input)
|
|
|
+ pc = PerformanceCalculation(self.dict_input)
|
|
|
self.is_success, self.results_depict, self.results = pc.performance_calculation()
|
|
|
return None
|
|
|
|