diff options
-rw-r--r-- | DockWidgets/__pycache__/DockWidget.cpython-37.pyc | bin | 4730 -> 4730 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc | bin | 3614 -> 3614 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc | bin | 10155 -> 10155 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc | bin | 3202 -> 3202 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc | bin | 8986 -> 8986 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc | bin | 2388 -> 2388 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc | bin | 5350 -> 5350 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc | bin | 3023 -> 3023 bytes | |||
-rw-r--r-- | Graphics.py | 4 | ||||
-rw-r--r-- | Streams.py | 46 | ||||
-rw-r--r-- | Undo.dat | bin | 42133 -> 1014 bytes | |||
-rw-r--r-- | UnitOperations.py | 12 |
12 files changed, 60 insertions, 2 deletions
diff --git a/DockWidgets/__pycache__/DockWidget.cpython-37.pyc b/DockWidgets/__pycache__/DockWidget.cpython-37.pyc Binary files differindex cca7be4..b0cf5d3 100644 --- a/DockWidgets/__pycache__/DockWidget.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidget.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc Binary files differindex 7bf913d..db18769 100644 --- a/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc Binary files differindex 34174b8..aa0f582 100644 --- a/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc Binary files differindex 9dfa718..53d07bc 100644 --- a/DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc Binary files differindex d693fd0..29c3683 100644 --- a/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc Binary files differindex 454fa28..58c8a9e 100644 --- a/DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc Binary files differindex ec04e53..dd67795 100644 --- a/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc Binary files differindex c888614..e19a9a3 100644 --- a/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc diff --git a/Graphics.py b/Graphics.py index 7d456fe..1472516 100644 --- a/Graphics.py +++ b/Graphics.py @@ -424,7 +424,7 @@ class NodeItem(QtWidgets.QGraphicsItem): if (self.obj.modes_list): default_tooltip = f"{self.name}\n\n" - default_tooltip_dict = self.obj.param_getter(self.obj.mode) + default_tooltip_dict = self.obj.param_getter_tooltip(self.obj.mode) for i, j in default_tooltip_dict.items(): if j is not None: default_tooltip = default_tooltip + f" {i} : {j}\n" @@ -585,7 +585,7 @@ class NodeItem(QtWidgets.QGraphicsItem): def update_tooltip(self): default_tooltip = f"{self.name}\n\n" - default_tooltip_dict = self.obj.param_getter(self.obj.modes_list[0]) + default_tooltip_dict = self.obj.param_getter_tooltip(self.obj.mode) for i, j in default_tooltip_dict.items(): if j is not None: default_tooltip = default_tooltip + f" {i} : {j}\n" @@ -81,6 +81,52 @@ class MaterialStream(): for i in self.compound_names: self.variables[i] = {'value':''} + def param_getter_tooltip(self,mode): + dict = {} + + temp = [] + for i, val in enumerate(self.compound_names): + try: + temp.append(self.variables['x_pc[1,' + str(i+1) + ']']['value']) + except: + pass + self.variables['x_pc']['value'] = temp + + if(mode=="PT"): + self.mode1 = self.variables['P']['name'] + self.mode2 = self.variables['T']['name'] + dict = {self.mode1:str(self.variables['P']['value'])+' '+self.variables['P']['unit'], + self.mode2:str(self.variables['T']['value'])+' '+self.variables['T']['unit']} + elif(mode=="PH"): + self.mode1 = self.variables['P']['name'] + self.mode2 = self.variables['H_p[1]']['name'] + + dict = {self.mode1:str(self.variables['P']['value'])+' '+self.variables['P']['unit'], + self.mode2:str(self.variables['H_p[1]']['value'])+' '+self.variables['H_p[1]']['unit']} + elif(mode=="PVF"): + self.mode1 = self.variables['P']['name'] + self.mode2 = self.variables['xvap']['name'] + + dict = {self.mode1:str(self.variables['P']['value'])+' '+self.variables['P']['unit'], + self.mode2:str(self.variables['xvap']['value'])+' '+self.variables['xvap']['unit']} + elif(mode=="TVF"): + self.mode1 = self.variables['T']['name'] + self.mode2 = self.variables['xvap']['name'] + dict = {self.mode1:str(self.variables['T']['value'])+' '+self.variables['T']['unit'], + self.mode2:str(self.variables['xvap']['value'])+' '+self.variables['xvap']['unit']} + + elif(mode=="PS"): + self.mode1 = self.variables['P']['name'] + self.mode2 = self.variables['S_p[1]']['name'] + + dict = {self.mode1:str(self.variables['P']['value'])+' '+self.variables['P']['unit'], + self.mode2:str(self.variables['S_p[1]']['value'])+' '+self.variables['S_p[1]']['unit']} + + dict['Mole Flow'] = str(self.variables['F_p[1]']['value'])+' '+self.variables['F_p[1]']['unit'] + dict[self.variables['x_pc']['name']] = str(self.variables['x_pc']['value'])+' '+self.variables['x_pc']['unit'] + dict['Thermo Package'] = self.thermo_package + return dict + def param_getter(self,mode): dict = {} diff --git a/UnitOperations.py b/UnitOperations.py index 912c19e..da01df0 100644 --- a/UnitOperations.py +++ b/UnitOperations.py @@ -43,6 +43,18 @@ class UnitOperation(): params[i] = self.variables[i]['value'] return params + + def param_getter_tooltip(self,mode=None): + params = {} + if mode == None and self.modes_list: + self.mode = self.modes_list[0] + else: + self.mode = mode + params[self.mode] = None + for i in self.parameters: + params[self.variables[i]['name']] = str(self.variables[i]['value'])+' '+self.variables[i]['unit'] + + return params def param_setter(self,params): print("param_setter ", params) |