summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DockWidgets/DockWidgetSplitter.py14
-rw-r--r--DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pycbin2519 -> 2675 bytes
-rw-r--r--Graphics.py12
-rw-r--r--Undo.datbin50380 -> 0 bytes
-rw-r--r--UnitOperations.py6
5 files changed, 18 insertions, 14 deletions
diff --git a/DockWidgets/DockWidgetSplitter.py b/DockWidgets/DockWidgetSplitter.py
index 01974e9..3b8383c 100644
--- a/DockWidgets/DockWidgetSplitter.py
+++ b/DockWidgets/DockWidgetSplitter.py
@@ -27,18 +27,20 @@ class DockWidgetSplitter(QDockWidget,ui_dialog):
self.l1.setText(self.obj.variables['No']['name']+":")
self.le1.setText(str(self.obj.variables['No']['value']))
self.u1.setText(self.obj.variables['No']['unit'])
-
+
+ self.l2.setText(self.obj.variables['CalcType']['name'] + ":")
for i in self.obj.CalcType_modes:
self.cb2.addItem(str(i))
- self.l2.setText(self.obj.variables['CalcType']['name']+":")
-
+ self.cb2.setCurrentText(self.obj.variables['CalcType']['value'])
self.l3.setText("Stream 1 :")
- self.u3.setText('')
+ self.le3.setText(str(self.obj.variables['SpecVal_s']['value'][0]))
+ self.u3.setText(self.obj.variables['SpecVal_s']['unit'])
self.l4.setText("Stream 2 :")
- self.u4.setText('')
+ self.le4.setText(str(self.obj.variables['SpecVal_s']['value'][1]))
+ self.u4.setText(str(self.obj.variables['SpecVal_s']['unit']))
self.cb2.currentIndexChanged.connect(self.fun)
-
+
self.input_dict = [self.le1, self.cb2, self.le3, self.le4]
except Exception as e:
diff --git a/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc
index 7cc065b..f90f086 100644
--- a/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc
+++ b/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc
Binary files differ
diff --git a/Graphics.py b/Graphics.py
index 71d5b71..a8ee43a 100644
--- a/Graphics.py
+++ b/Graphics.py
@@ -429,12 +429,12 @@ class NodeItem(QtWidgets.QGraphicsItem):
self.nin = int(text)
self.obj.no_of_inputs = self.nin
self.obj.variables['NI']['value'] = self.nin
- elif self.obj.type == 'Splitter' and not self.obj.saved:
- text, ok = QInputDialog.getText(self.container.graphicsView, 'Splitter', 'Enter number of output:')
- if ok and text:
- self.nop = int(text)
- self.obj.no_of_outputs = self.nop
- self.obj.variables['No']['value'] = self.nop
+ # elif self.obj.type == 'Splitter' and not self.obj.saved:
+ # text, ok = QInputDialog.getText(self.container.graphicsView, 'Splitter', 'Enter number of output:')
+ # if ok and text:
+ # self.nop = int(text)
+ # self.obj.no_of_outputs = self.nop
+ # self.obj.variables['No']['value'] = self.nop
elif self.obj.type == 'DistillationColumn'and not self.obj.saved:
text, ok = QInputDialog.getText(self.container.graphicsView, 'DistillationColumn', 'Enter number of input:')
if ok and text:
diff --git a/Undo.dat b/Undo.dat
index 54be249..e69de29 100644
--- a/Undo.dat
+++ b/Undo.dat
Binary files differ
diff --git a/UnitOperations.py b/UnitOperations.py
index ed2864c..20c620f 100644
--- a/UnitOperations.py
+++ b/UnitOperations.py
@@ -541,7 +541,7 @@ class Splitter(UnitOperation):
UnitOperation.__init__(self)
self.name = name + str(Splitter.counter)
self.type = 'Splitter'
- self.no_of_outputs = 3
+ self.no_of_outputs = 2
self.CalcType_modes = ['Split_Ratio', 'Molar_Flow', 'Mass_Flow']
@@ -551,7 +551,7 @@ class Splitter(UnitOperation):
self.variables = {
'No' : {'name':'No. of Output', 'value':3, 'unit':''},
'CalcType' : {'name':'Calculation Type', 'value':self.CalcType_modes[0], 'unit':''},
- 'SpecVal_s' : {'name':'Specification Value', 'value':[50,50], 'unit':''}
+ 'SpecVal_s' : {'name':'Specification Value', 'value':[0.5,0.5], 'unit':''}
}
specval = self.variables['SpecVal_s']['value']
@@ -566,6 +566,8 @@ class Splitter(UnitOperation):
self.variables['SpecVal_s']['unit'] = 'mol/s'
elif self.variables['CalcType']['value'] == 'Mass_Flow':
self.variables['SpecVal_s']['unit'] = 'g/s'
+ else:
+ self.variables['SpecVal_s']['unit'] = ''
class Mixer(UnitOperation):