diff options
author | lucaszhao19 | 2020-07-10 22:00:01 +0630 |
---|---|---|
committer | lucaszhao19 | 2020-07-10 22:00:01 +0630 |
commit | 4754490bd9f60c89f66f886e399abc9ea91e932a (patch) | |
tree | ef608a903aafb6454eeec02eb69b69aa5e98928c | |
parent | 2cd248a0ae312672d63a55cf6ac72436e515b2e6 (diff) | |
download | Chemical-Simulator-GUI-4754490bd9f60c89f66f886e399abc9ea91e932a.tar.gz Chemical-Simulator-GUI-4754490bd9f60c89f66f886e399abc9ea91e932a.tar.bz2 Chemical-Simulator-GUI-4754490bd9f60c89f66f886e399abc9ea91e932a.zip |
Result issues fixed and optional input for DistillationColumn
-rw-r--r-- | Container.py | 6 | ||||
-rw-r--r-- | DockWidgets/DockWidget.py | 7 | ||||
-rw-r--r-- | DockWidgets/__pycache__/DockWidget.cpython-37.pyc | bin | 6107 -> 6155 bytes | |||
-rw-r--r-- | Graphics.py | 6 | ||||
-rw-r--r-- | Undo.dat | bin | 63193 -> 4777 bytes | |||
-rw-r--r-- | UnitOperations.py | 3 |
6 files changed, 14 insertions, 8 deletions
diff --git a/Container.py b/Container.py index 5469de2..ec46706 100644 --- a/Container.py +++ b/Container.py @@ -186,11 +186,9 @@ class Container(): self.msg_browser() self.result=self.flowsheet.result_data print("under Eqn mode simulation") + print("710 ", self.result) - try: - DockWidget.show_result(NodeItem.get_dock_widget()) - except AttributeError: - pass + DockWidget.show_result(NodeItem.get_dock_widget()) def flat_list(lst): flat_lst=[] diff --git a/DockWidgets/DockWidget.py b/DockWidgets/DockWidget.py index 6fc7731..2b1cdb9 100644 --- a/DockWidgets/DockWidget.py +++ b/DockWidgets/DockWidget.py @@ -187,10 +187,11 @@ class DockWidget(QDockWidget,ui_dialog): @staticmethod def show_result(lst): - #DockWidget1.flag = True for i in lst: - i.results_category(i.name) - #i.show() + try: + i.results_category(i.name) + except AttributeError: + pass # result data tab def results_category(self,name): diff --git a/DockWidgets/__pycache__/DockWidget.cpython-37.pyc b/DockWidgets/__pycache__/DockWidget.cpython-37.pyc Binary files differindex f1fa8b5..b042722 100644 --- a/DockWidgets/__pycache__/DockWidget.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidget.cpython-37.pyc diff --git a/Graphics.py b/Graphics.py index fd02d39..47aa4ea 100644 --- a/Graphics.py +++ b/Graphics.py @@ -473,6 +473,12 @@ class NodeItem(QtWidgets.QGraphicsItem): self.nop = int(text) self.obj.no_of_outputs = self.nop self.obj.variables['No']['value'] = self.nop + elif self.obj.type == 'DistillationColumn': + text, ok = QInputDialog.getText(self.container.graphicsView, 'DistillationColumn', 'Enter number of input:') + if ok and text: + self.nin = int(text) + self.obj.no_of_inputs = self.nin + self.obj.variables['NI']['value'] = self.nin self.dock_widget = None lst.append(self) Binary files differdiff --git a/UnitOperations.py b/UnitOperations.py index 90111d1..7105606 100644 --- a/UnitOperations.py +++ b/UnitOperations.py @@ -214,7 +214,7 @@ class DistillationColumn(UnitOperation): def __init__(self,name='DistillationColumn'): self.name = name + str(DistillationColumn.counter) self.type = 'DistillationColumn' - self.no_of_inputs = 2 + self.no_of_inputs = 1 self.no_of_outputs = 2 self.compounds = compound_selected @@ -232,6 +232,7 @@ class DistillationColumn(UnitOperation): type(self).counter += 1 self.variables = { + 'NI' : {'name':'Number of Input', 'value':2, 'unit':''}, 'RR' : {'name':'Reflux Ratio', 'value':None, 'unit':''}, 'T' : {'name':'Temperature', 'value':300, 'unit':'K'}, 'Nout' : {'name':'No of Sidedraws', 'value':None, 'unit':''}, |