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/ShortcutColumn.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/ShortcutColumn.py')
-rw-r--r-- | OMChem/ShortcutColumn.py | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/OMChem/ShortcutColumn.py b/OMChem/ShortcutColumn.py index 13cffea..a018873 100644 --- a/OMChem/ShortcutColumn.py +++ b/OMChem/ShortcutColumn.py @@ -1,25 +1,37 @@ from OMChem.EngStm import EngStm class ShortcutColumn(): - def __init__(self,name=("ShortcutCol",1),condP = None, rebP = None, LKey = None, HKey = None): + counter = 1 + def __init__(self,name='ShortCol',condP = None, rebP = None, LKey = None, HKey = None): self.condP = condP self.rebP = rebP self.LKey = LKey self.HKey = HKey self.LKeyMolFrac = None self.HKeyMolFrac = None - self.name = name[0] + #self.name = name[0] + self.name = name + str(ShortcutColumn.counter) self.OM_data_eqn = '' self.OM_data_init = '' self.InputStms = None self.OutputStms = None + self.EngStm1 = EngStm(name='EngStm1'+self.name) self.EngStm2 = EngStm(name='EngStm2'+self.name) - self.count = name[1] + #self.count = name[1] + self.count = ShortcutColumn.counter self.condType='' self.actR = None self.thermoPackage='Raoults_Law' self.type = 'ShortCol' + # new + self.no_of_input = 1 + self.no_of_output = 2 + ShortcutColumn.counter += 1 + + def getname(self): + return self.name + def modesList(self): return [] @@ -47,7 +59,7 @@ class ShortcutColumn(): self.OM_data_init = self.OM_data_init + ("extends Simulator.Files.Thermodynamic_Packages."+self.thermoPackage+";\n") self.OM_data_init = self.OM_data_init + ("end sc"+str(self.count)+";\n") comp_count = len(addedcomp) - self.OM_data_init = self.OM_data_init + "sc"+str(self.count)+ " " + self.name + "(NOC = " + str(comp_count) + self.OM_data_init = self.OM_data_init + "sc"+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("'", "") |