diff options
author | Pravin Dalve | 2021-06-22 00:33:41 +0530 |
---|---|---|
committer | Pravin Dalve | 2021-06-22 00:33:41 +0530 |
commit | ce501c2d9e437e3988105595d2e9068045a98720 (patch) | |
tree | 3c09fc3bebb65db5942cd4f4a5425bde87978428 /Streams.py | |
parent | 3f8095e27df1ea62c4356c08de09cc42ffca00ed (diff) | |
download | Chemical-Simulator-GUI-ce501c2d9e437e3988105595d2e9068045a98720.tar.gz Chemical-Simulator-GUI-ce501c2d9e437e3988105595d2e9068045a98720.tar.bz2 Chemical-Simulator-GUI-ce501c2d9e437e3988105595d2e9068045a98720.zip |
update compounds method added in all unit operations, material stream and material stream dockwidget
Diffstat (limited to 'Streams.py')
-rw-r--r-- | Streams.py | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1,6 +1,7 @@ import json import sys from PyQt5.QtCore import * +from ComponentSelector import compound_selected class MaterialStream(): counter = 1 @@ -56,6 +57,9 @@ class MaterialStream(): } self.init_variables() + def update_compounds(self): + self.compound_names = compound_selected + def init_variables(self): Nc = len(self.compound_names) for i, val in enumerate(self.compound_names): @@ -82,7 +86,10 @@ class MaterialStream(): temp = [] for i, val in enumerate(self.compound_names): - temp.append(self.variables['x_pc[1,' + str(i+1) + ']']['value']) + try: + temp.append(self.variables['x_pc[1,' + str(i+1) + ']']['value']) + except: + pass self.variables['x_pc']['value'] = temp if(mode=="PT"): |