summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DockWidgets/DockWidgetDistillationColumn.py17
-rw-r--r--DockWidgets/DockWidgetDistillationColumn.ui4
-rw-r--r--DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pycbin4911 -> 5219 bytes
-rw-r--r--Undo.datbin0 -> 27403 bytes
-rw-r--r--UnitOperations.py16
5 files changed, 25 insertions, 12 deletions
diff --git a/DockWidgets/DockWidgetDistillationColumn.py b/DockWidgets/DockWidgetDistillationColumn.py
index 3255015..5aa1a36 100644
--- a/DockWidgets/DockWidgetDistillationColumn.py
+++ b/DockWidgets/DockWidgetDistillationColumn.py
@@ -35,32 +35,42 @@ class DockWidgetDistillationColumn(QDockWidget,ui_dialog):
# tab 1
l1 = QLineEdit()
+ l1.setText(str(self.obj.variables['Nt']['value']))
self.lay1.addWidget(QLabel(self.obj.variables['Nt']['name'] + " :"), 0 ,0, alignment=Qt.AlignLeft)
self.lay1.addWidget(l1,0,1, alignment=Qt.AlignCenter)
self.input_dict.append(l1)
+
for i in range(self.obj.variables['Ni']['value']):
print(i)
- l = QLineEdit()
- self.lay1.addWidget(QLabel(self.obj.variables['InT_s']['name'] +" " + str(i+1) + " location :"),i+1,0, alignment=Qt.AlignLeft)
+ l = QLineEdit()
+ if len(self.obj.variables['InT_s']['value']) is not 0:
+ l.setText(str(self.obj.variables['InT_s']['value'][i]))
+ self.lay1.addWidget(QLabel(self.obj.variables['InT_s']['name'] +" " + str(i+1) + " location :"),i+1,0, alignment=Qt.AlignLeft)
self.lay1.addWidget(l,i+1,1, alignment=Qt.AlignCenter)
self.input_dict.append(l)
# tab 2
self.l4.setText(self.obj.variables['Ctype']['name']+":")
+
self.u1.setText(self.obj.variables['Ctype']['unit'])
self.l5.setText(self.obj.variables['Pcond']['name']+":")
self.le5.setText(str(self.obj.variables['Pcond']['value']))
self.u2.setText(self.obj.variables['Pcond']['unit'])
self.l6.setText(self.obj.variables['C_Spec']['name']+":")
+ self.le6.setText(str(self.obj.variables['C_Spec']['value']))
self.l7.setText("Compounds :")
self.cb5.addItem("Total")
self.cb5.addItem("Partial")
+ self.cb5.setCurrentText(self.obj.variables['Ctype']['value'])
for j in self.obj.Cspec_list:
self.cb1.addItem(str(j))
+ self.cb1.setCurrentText(self.obj.variables['C_Spec']['type'])
for j in self.obj.compounds:
self.cb2.addItem(str(j))
+ self.cb2.setCurrentText(self.obj.variables['C_Spec']['comp'])
+
self.cb2.setDisabled(True)
self.cb1.currentIndexChanged.connect(self.fun2)
@@ -75,12 +85,15 @@ class DockWidgetDistillationColumn(QDockWidget,ui_dialog):
self.le7.setText(str(self.obj.variables['Preb']['value']))
self.u3.setText(self.obj.variables['Preb']['unit'])
self.l9.setText(self.obj.variables['R_Spec']['name']+":")
+ self.le8.setText(str(self.obj.variables['R_Spec']['value']))
self.l10.setText('Compounds')
for j in self.obj.Rspec_list:
self.cb3.addItem(str(j))
+ self.cb3.setCurrentText(self.obj.variables['R_Spec']['type'])
for j in self.obj.compounds:
self.cb4.addItem(str(j))
+ self.cb4.setCurrentText(self.obj.variables['R_Spec']['comp'])
self.cb4.setDisabled(True)
self.cb3.currentIndexChanged.connect(self.fun3)
diff --git a/DockWidgets/DockWidgetDistillationColumn.ui b/DockWidgets/DockWidgetDistillationColumn.ui
index e603071..ba6b365 100644
--- a/DockWidgets/DockWidgetDistillationColumn.ui
+++ b/DockWidgets/DockWidgetDistillationColumn.ui
@@ -69,7 +69,7 @@
</sizepolicy>
</property>
<property name="currentIndex">
- <number>0</number>
+ <number>1</number>
</property>
<widget class="QWidget" name="tab1">
<attribute name="title">
@@ -90,7 +90,7 @@
</widget>
<widget class="QWidget" name="tab2">
<attribute name="title">
- <string>Condensor</string>
+ <string>Condenser</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
diff --git a/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc
index 17ef882..42d5c26 100644
--- a/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc
+++ b/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc
Binary files differ
diff --git a/Undo.dat b/Undo.dat
index e69de29..0c2cf5d 100644
--- a/Undo.dat
+++ b/Undo.dat
Binary files differ
diff --git a/UnitOperations.py b/UnitOperations.py
index 394c179..c868730 100644
--- a/UnitOperations.py
+++ b/UnitOperations.py
@@ -179,9 +179,9 @@ class ShortcutColumn(UnitOperation):
'LKey' : {'name':'Light Key', 'value':None, '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':'Condensor Type', 'value':None, 'unit':''},
+ 'Ctype' : {'name':'Condenser Type', 'value':None, 'unit':''},
'thermo_package' : {'name':'Thermo Package', 'value':'Raoults_Law', 'unit':''},
- 'Pcond' : {'name':'Condensor Pressure', 'value':101325, 'unit':'Pa'},
+ 'Pcond' : {'name':'Condenser Pressure', 'value':101325, 'unit':'Pa'},
'Preb' : {'name':'Reboiler Pressure', 'value':101325, 'unit':'Pa'},
'RR' : {'name':'Reflux Ratio', 'value':1.5, 'unit':''},
@@ -238,25 +238,25 @@ class DistillationColumn(UnitOperation):
# self.modes_list = ['RR', 'Nout', 'T']
self.modes_list = []
- self.parameters = ['Nt', 'Ni', 'InT_s', 'Ctype']
+ self.parameters = ['Nt', 'Ni', 'Ctype', 'Pcond', 'condmode', 'C_comp', 'C_Spec', 'Preb', 'rebmode', 'rebcomp', 'R_Spec']
#self.parameters = ['Nt', 'InT_s', 'In_s', 'thermo_package', 'Ctype', 'Pcond', 'Preb']
self.Cspec_list = ['Reflux Ratio','Product Molar Flow (mol/s)', 'Temperature (K)', 'Compound Molar Fraction', 'Compound Molar Flow (mol/s)']
self.Rspec_list = ['Product Molar Flow (mol/s)', 'Temperature (K)', 'Compound Molar Fraction', 'Compound Molar Flow (mol/s)']
type(self).counter += 1
self.variables = {
- 'Ni' : {'name':'Number of Input', 'value':2, 'unit':''},
+ 'Ni' : {'name':'Number of Input', 'value':1, 'unit':''},
'RR' : {'name':'Reflux Ratio', 'value':None, 'unit':''},
'T' : {'name':'Temperature', 'value':300, 'unit':'K'},
'Nout' : {'name':'No of Sidedraws', 'value':None, 'unit':''},
'Nt' : {'name':'No of Stages', 'value':12, 'unit':''},
'InT_s' : {'name':'Feed Stage', 'value':[], 'unit':''},
'thermo_package' : {'name':'Thermo Package', 'value':'Raoults_Law', 'unit':''},
- 'Ctype' : {'name':'Condensor Type', 'value':'', 'unit':''},
- 'Pcond' : {'name':'Condensor Pressure', 'value':101325, 'unit':'Pa'},
+ 'Ctype' : {'name':'Condenser Type', 'value':'Total', 'unit':''},
+ 'Pcond' : {'name':'Condenser Pressure', 'value':101325, 'unit':'Pa'},
'Preb' : {'name':'Reboiler Pressure', 'value':101325, 'unit':'Pa'},
- 'C_Spec': {'name':'Condensor Specification', 'type':'Reflux Ratio', 'value':'', 'comp':'', 'unit':''},
- 'R_Spec': {'name':'Reboiler Specification', 'type':'', 'value':'', 'comp':'', 'unit':''},
+ 'C_Spec': {'name':'Condenser Specification', 'type':self.Cspec_list[0], 'value':'', 'comp':compound_selected[0], 'unit':''},
+ 'R_Spec': {'name':'Reboiler Specification', 'type':self.Rspec_list[0], 'value':'', 'comp':compound_selected[0], 'unit':''},
}
def param_setter(self,params):