summaryrefslogtreecommitdiff
path: root/OMChem/Pump.py
diff options
context:
space:
mode:
Diffstat (limited to 'OMChem/Pump.py')
-rw-r--r--OMChem/Pump.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/OMChem/Pump.py b/OMChem/Pump.py
index 04c8425..3b6ed2c 100644
--- a/OMChem/Pump.py
+++ b/OMChem/Pump.py
@@ -1,8 +1,9 @@
from OMChem.EngStm import EngStm
class Pump():
+ counter = 1
def __init__(self,name='Pump',eff = None):
self.eff = eff
- self.name = name
+ #self.name = name
self.OM_data_eqn = ''
self.OM_data_init = ''
self.InputStms = None
@@ -13,6 +14,14 @@ class Pump():
self.type = 'Pump'
self.mode = None
self.modeVal = None
+ # new
+ self.name = name + str(Pump.counter)
+ self.no_of_input = 1
+ self.no_of_output = 1
+ Pump.counter += 1
+
+ def getname(self):
+ return self.name
def connect(self,InputStms = None,OutputStms = None):
self.InputStms = InputStms
@@ -27,7 +36,6 @@ class Pump():
return dict
def paramsetter(self,dict):
-
self.eff = dict['eff']
self.modeVal = dict[self.mode]
@@ -36,7 +44,7 @@ class Pump():
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.Centrifugal_Pump " + self.name + "(NOC = " + str(comp_count))
+ "Simulator.Unit_Operations.Centrifugal_Pump " + self.name + "(Nc = " + str(comp_count))
self.OM_data_init = self.OM_data_init + (",comp = {")
comp = str(addedcomp).strip('[').strip(']')
comp = comp.replace("'", "")