diff options
author | pravindalve | 2020-02-14 13:04:30 +0530 |
---|---|---|
committer | GitHub | 2020-02-14 13:04:30 +0530 |
commit | a80b6726f5f70d9a2ec1cbf361e7f607849343bf (patch) | |
tree | 333d34f58255003939e70b800d2cd57e40253b6b /OMChem/Flash.py | |
parent | 8189de7d424964aac11b81c8297b7af7fcedd2b8 (diff) | |
parent | df141f35dccc6b21fcfa575707c6435a39d0002f (diff) | |
download | Chemical-Simulator-GUI-a80b6726f5f70d9a2ec1cbf361e7f607849343bf.tar.gz Chemical-Simulator-GUI-a80b6726f5f70d9a2ec1cbf361e7f607849343bf.tar.bz2 Chemical-Simulator-GUI-a80b6726f5f70d9a2ec1cbf361e7f607849343bf.zip |
Merge pull request #2 from pravindalve/master
Code restructured, some ui improvizations, undo redo implementation and Binary envelops utility
Diffstat (limited to 'OMChem/Flash.py')
-rw-r--r-- | OMChem/Flash.py | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/OMChem/Flash.py b/OMChem/Flash.py index 22335a5..a3bf5dc 100644 --- a/OMChem/Flash.py +++ b/OMChem/Flash.py @@ -1,13 +1,25 @@ class Flash(): - def __init__(self,name=("flash",1)): - self.name = name[0] + counter = 1 + def __init__(self,name='Flash'): + #self.name = name[0] self.OM_data_eqn = '' self.OM_data_init = '' self.InputStms = None self.OutputStms = None self.type = 'flash' - self.count = name[1] + #self.count = name[1] + self.count = Flash.counter self.thermoPackage =None + + # new + self.name = name + str(Flash.counter) + self.no_of_input = 1 + self.no_of_output = 2 + Flash.counter += 1 + + def getname(self): + return self.name + def connect(self,InputStms = None,OutputStms = None): self.InputStms = InputStms self.OutputStms = OutputStms @@ -29,7 +41,7 @@ class Flash(): self.OM_data_init = self.OM_data_init + ("end fls"+str(self.count)+";\n") comp_count = len(addedcomp) self.OM_data_init = self.OM_data_init + ( - "fls"+str(self.count)+" "+ self.name + "(NOC = " + str(comp_count)) + "fls"+str(self.count)+" "+ self.name + "(Nc = " + str(comp_count)) self.OM_data_init = self.OM_data_init + (",comp = {") comp = str(addedcomp).strip('[').strip(']') comp = comp.replace("'", "") |