summaryrefslogtreecommitdiff
path: root/OMChem/ShortcutColumn.py
diff options
context:
space:
mode:
Diffstat (limited to 'OMChem/ShortcutColumn.py')
-rw-r--r--OMChem/ShortcutColumn.py20
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("'", "")