summaryrefslogtreecommitdiff
path: root/OMChem/Cooler.py
diff options
context:
space:
mode:
Diffstat (limited to 'OMChem/Cooler.py')
-rw-r--r--OMChem/Cooler.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/OMChem/Cooler.py b/OMChem/Cooler.py
index 577b181..9a44033 100644
--- a/OMChem/Cooler.py
+++ b/OMChem/Cooler.py
@@ -1,9 +1,10 @@
from OMChem.EngStm import EngStm
class Cooler():
- def __init__(self,name='cooler',PressureDrop = None, eff = None):
+ counter = 1
+ def __init__(self,name='Cooler',PressureDrop = None, eff = None):
self.PressureDrop = PressureDrop
self.eff = eff
- self.name = name
+ # self.name = name
self.OM_data_eqn = ''
self.OM_data_init = ''
self.InputStms = None
@@ -21,6 +22,15 @@ class Cooler():
'tempDrop':None,
'heatRem':None,
}
+ # new
+ self.name = name + str(Cooler.counter)
+ self.no_of_input = 1
+ self.no_of_output = 1
+ Cooler.counter += 1
+
+ def getname(self):
+ return self.name
+
def connect(self,InputStms = None,OutputStms = None):
self.InputStms = InputStms
self.OutputStms = OutputStms
@@ -44,7 +54,7 @@ class Cooler():
comp_count = len(addedcomp)
self.OM_data_init = self.OM_data_init + 'Simulator.Streams.Energy_Stream '+self.EngStms.name+';\n'
self.OM_data_init = self.OM_data_init + (
- "Simulator.Unit_Operations.Cooler " + self.name + "(NOC = " + str(comp_count))
+ "Simulator.Unit_Operations.Cooler " + self.name + "(Nc = " + str(comp_count))
self.OM_data_init = self.OM_data_init + (",comp = {")
comp = str(addedcomp).strip('[').strip(']')
comp = comp.replace("'", "")