diff options
-rw-r--r-- | Container.py | 10 | ||||
-rw-r--r-- | DockWidgets/DockWidgetMixer.py | 2 | ||||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc | bin | 2226 -> 2215 bytes | |||
-rw-r--r-- | Undo.dat | bin | 1641 -> 222191 bytes | |||
-rw-r--r-- | UnitOperations.py | 16 |
5 files changed, 16 insertions, 12 deletions
diff --git a/Container.py b/Container.py index 6da3b25..f8daaee 100644 --- a/Container.py +++ b/Container.py @@ -137,7 +137,7 @@ class Container(): if(i.name==name): return i - def add_aompounds(self,comp): + def add_compounds(self,comp): self.compounds = comp def add_thermo_package(self,thermo): @@ -181,11 +181,9 @@ class Container(): DockWidget.show_result(NodeItem.get_dock_widget()) - for i in self.graphics.scene.items(): - if (isinstance(i, NodeItem)): - i.update_tooltip() - - + # for i in self.graphics.scene.items(): + # if (isinstance(i, NodeItem)): + # i.update_tooltip() def flat_list(lst): flat_lst=[] diff --git a/DockWidgets/DockWidgetMixer.py b/DockWidgets/DockWidgetMixer.py index 01bfd48..804cdba 100644 --- a/DockWidgets/DockWidgetMixer.py +++ b/DockWidgets/DockWidgetMixer.py @@ -52,7 +52,7 @@ class DockWidgetMixer(QDockWidget,ui_dialog): try: self.dict={} print("param.input_dict ", self.input_dict) - self.dict = [int(self.input_dict[0].text()), '"' + self.input_dict[1].currentText() + '"'] + self.dict = [int(self.input_dict[0].text()), self.input_dict[1].currentText()] print("param ", self.dict) self.obj.param_setter(self.dict) self.hide() diff --git a/DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc Binary files differBinary files differindex ab2fad7..3ca772a 100644 --- a/DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc diff --git a/UnitOperations.py b/UnitOperations.py index fbbcce1..0bcff3c 100644 --- a/UnitOperations.py +++ b/UnitOperations.py @@ -68,6 +68,9 @@ class UnitOperation(): self.input_stms.append(UnitOpr) else : self.output_stms.append(UnitOpr) + + print("input and output stms : ") + print(self.input_stms, self.output_stms) def set_pos(self,pos): self.pos = pos @@ -146,7 +149,7 @@ class UnitOperation(): def OM_Flowsheet_Equation(self): self.OM_data_eqn = '' - if len(self.input_stms)>1: + if len(self.input_stms)>1 or self.type == 'Mixer': strcount = 1 for strm in self.input_stms: self.OM_data_eqn += ('connect(' + strm.name + '.Out,' + self.name + '.In[' + str(strcount) + ']);\n') @@ -160,6 +163,7 @@ class UnitOperation(): self.OM_data_eqn += ('connect(' + strm.name + '.In,' + self.name + '.Out[' + str(strcount) + ']);\n') strcount += 1 else: + print("self.output_stms ", self.output_stms) self.OM_data_eqn += ('connect(' + self.name + '.Out,' + self.output_stms[0].name + '.In);\n') if self.mode: @@ -492,17 +496,19 @@ class Mixer(UnitOperation): self.type = 'Mixer' self.no_of_inputs = 6 - self.Pout_modes = ['Inlet Minimum', 'Inlet Average', 'Inlet Maximum'] + self.Pout_modes = ['Inlet_Minimum', 'Inlet_Average', 'Inlet_Maximum'] self.parameters = ['NI', 'outPress'] - # self.output_stms = None type(self).counter += 1 self.variables = { - 'NI' : {'name':'Number of Input', 'value':6, 'unit':''}, + 'NI' : {'name':'Number of Input', 'value':6, 'unit':''}, 'outPress' : {'name':'Outlet Pressure', 'value':'Inlet_Average', 'unit':''}, } + + print(self.input_stms) + print(self.output_stms) + def param_setter(self, params): - self.output_stms = [] print("param_setter ", params) self.variables['NI']['value'] = int(params[0]) self.variables['outPress']['value'] = params[1] |