From 9f86138b86efebb816a2289bf84b96d688615f41 Mon Sep 17 00:00:00 2001 From: lucaszhao19 Date: Mon, 23 Dec 2019 13:25:49 +0530 Subject: Feature implementation - saving and partial loading --- OMChem/ShortcutColumn.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'OMChem/ShortcutColumn.py') diff --git a/OMChem/ShortcutColumn.py b/OMChem/ShortcutColumn.py index 13cffea..5c42545 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 [] -- cgit From 8dfb7d836e438035be2284e49554dac36d0af7bf Mon Sep 17 00:00:00 2001 From: SaurabhAgarwala Date: Fri, 3 Jan 2020 15:54:24 +0530 Subject: Made GUI compatible with the new Simulator, abbreviations updated to new convention and few bugs eliminated with code clean up at places --- OMChem/ShortcutColumn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OMChem/ShortcutColumn.py') diff --git a/OMChem/ShortcutColumn.py b/OMChem/ShortcutColumn.py index 5c42545..a018873 100644 --- a/OMChem/ShortcutColumn.py +++ b/OMChem/ShortcutColumn.py @@ -59,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("'", "") -- cgit