summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DockWidgets/DockWidgetShortcutColumn.py6
-rw-r--r--DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pycbin3065 -> 3257 bytes
-rw-r--r--DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pycbin2737 -> 2857 bytes
-rw-r--r--DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pycbin4435 -> 4646 bytes
-rw-r--r--Undo.datbin1063 -> 1981 bytes
-rw-r--r--UnitOperations.py13
6 files changed, 12 insertions, 7 deletions
diff --git a/DockWidgets/DockWidgetShortcutColumn.py b/DockWidgets/DockWidgetShortcutColumn.py
index 2b7dfae..96069e5 100644
--- a/DockWidgets/DockWidgetShortcutColumn.py
+++ b/DockWidgets/DockWidgetShortcutColumn.py
@@ -34,6 +34,8 @@ class DockWidgetShortcutColumn(QDockWidget,ui_dialog):
for i in self.obj.compounds:
self.cb1.addItem(str(i))
self.cb2.addItem(str(i))
+ self.cb1.setCurrentText(self.obj.compounds[int(self.obj.variables['HKey']['value'])-1])
+ self.cb2.setCurrentText(self.obj.compounds[int(self.obj.variables['LKey']['value'])-1])
self.l3.setText(self.obj.variables['HKey_x_pc']['name']+":")
self.le3.setText(str(self.obj.variables['HKey_x_pc']['value']))
@@ -45,6 +47,7 @@ class DockWidgetShortcutColumn(QDockWidget,ui_dialog):
self.l5.setText(self.obj.variables['Ctype']['name']+":")
self.cb5.addItem('Total')
self.cb5.addItem('Partial')
+ self.cb5.setCurrentText(self.obj.variables['Ctype']['value'])
self.l6.setText(self.obj.variables['Pcond']['name']+":")
self.le6.setText(str(self.obj.variables['Pcond']['value']))
@@ -61,9 +64,10 @@ class DockWidgetShortcutColumn(QDockWidget,ui_dialog):
self.lines = [line.rstrip('\n') for line in open('thermopackage.txt')]
for j in self.lines:
self.cb6.addItem(str(j))
+ self.cb6.setCurrentText(self.obj.variables['thermo_package']['value'])
self.input_dict = [self.cb1, self.cb2, self.le3, self.le4, self.cb5, self.le6, self.le7, self.le8, self.cb6]
-
+
except Exception as e:
print(e)
diff --git a/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc
index 03ba8d4..8f43ce8 100644
--- a/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc
+++ b/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc
Binary files differ
diff --git a/DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc
index d8eaa0b..c7d0661 100644
--- a/DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc
+++ b/DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc
Binary files differ
diff --git a/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc
index d057db2..bc4eb06 100644
--- a/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc
+++ b/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc
Binary files differ
diff --git a/Undo.dat b/Undo.dat
index 61e69a6..d22999d 100644
--- a/Undo.dat
+++ b/Undo.dat
Binary files differ
diff --git a/UnitOperations.py b/UnitOperations.py
index 32a12cb..33479d3 100644
--- a/UnitOperations.py
+++ b/UnitOperations.py
@@ -181,11 +181,11 @@ class ShortcutColumn(UnitOperation):
type(self).counter += 1
self.variables = {
- 'HKey' : {'name':'Heavy Key', 'value':None, 'unit':''},
- 'LKey' : {'name':'Light Key', 'value':None, 'unit':''},
+ 'HKey' : {'name':'Heavy Key', 'value': 0, 'unit':''},
+ 'LKey' : {'name':'Light Key', 'value': 0, 'unit':''},
'HKey_x_pc' : {'name':'Heavy Key Mole Fraction', 'value':0.01, 'unit':''},
'LKey_x_pc' : {'name':'Light Key Mole Fraction', 'value':0.01, 'unit':''},
- 'Ctype' : {'name':'Condenser Type', 'value':None, 'unit':''},
+ 'Ctype' : {'name':'Condenser Type', 'value':'Total', 'unit':''},
'thermo_package' : {'name':'Thermo Package', 'value':'Raoults_Law', 'unit':''},
'Pcond' : {'name':'Condenser Pressure', 'value':101325, 'unit':'Pa'},
'Preb' : {'name':'Reboiler Pressure', 'value':101325, 'unit':'Pa'},
@@ -214,7 +214,7 @@ class ShortcutColumn(UnitOperation):
self.variables['Pcond']['value'] = params[5]
self.variables['Preb']['value'] = params[6]
self.variables['RR']['value'] = params[7]
- self.thermo_package = params[8]
+ self.variables['thermo_package']['value'] = params[8]
def OM_Flowsheet_Equation(self):
self.OM_data_eqn = ''
@@ -289,7 +289,8 @@ class DistillationColumn(UnitOperation):
self.variables['R_Spec']['type'] = params[temp+7]
if 'Compound' in self.variables['R_Spec']['type']:
self.variables['R_Spec']['comp'] = params[temp+8]
- self.variables['R_Spec']['value'] = params[temp+9]
+ self.variables['R_Spec']['value'] = params[temp+9]
+ self.variables['thermo_package']['value'] = params[temp+10]
print(self.variables)
def OM_Flowsheet_Initialize(self):
@@ -443,7 +444,7 @@ class CompoundSeparator(UnitOperation):
SepFact = []
for i in range(len(self.compounds)):
SepFact.append(self.variables['SepFact_c']['value'][i].split(' ')[0])
- SepFact = json.dumps(SepFact).replace('[','{').replace(']','}')
+ SepFact = json.dumps(SepFact).replace('[', '{').replace(']', '}')
self.OM_data_init = ''
comp_count = len(self.compounds)
self.OM_data_init = self.OM_data_init + (