diff options
Diffstat (limited to 'OMChem/Heater.py')
-rw-r--r-- | OMChem/Heater.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/OMChem/Heater.py b/OMChem/Heater.py index c0d8d95..cf9b8f1 100644 --- a/OMChem/Heater.py +++ b/OMChem/Heater.py @@ -1,9 +1,10 @@ from OMChem.EngStm import EngStm class Heater(): + counter = 1 def __init__(self,name='Heater',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 @@ -23,6 +24,15 @@ class Heater(): 'heatAdd':None, } + # new + self.name = name + str(Heater.counter) + self.no_of_input = 1 + self.no_of_output = 1 + Heater.counter += 1 + + def getname(self): + return self.name + def connect(self,InputStms = None,OutputStms = None): self.InputStms = InputStms self.OutputStms = OutputStms @@ -46,7 +56,7 @@ class Heater(): 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.Heater " + self.name + "(NOC = " + str(comp_count)) + "Simulator.Unit_Operations.Heater " + self.name + "(Nc = " + str(comp_count)) self.OM_data_init = self.OM_data_init + (",comp = {") comp = str(addedcomp).strip('[').strip(']') comp = comp.replace("'", "") |