summaryrefslogtreecommitdiff
path: root/OMChem/Cooler.py
diff options
context:
space:
mode:
authorpravindalve2020-02-14 13:04:30 +0530
committerGitHub2020-02-14 13:04:30 +0530
commita80b6726f5f70d9a2ec1cbf361e7f607849343bf (patch)
tree333d34f58255003939e70b800d2cd57e40253b6b /OMChem/Cooler.py
parent8189de7d424964aac11b81c8297b7af7fcedd2b8 (diff)
parentdf141f35dccc6b21fcfa575707c6435a39d0002f (diff)
downloadChemical-Simulator-GUI-a80b6726f5f70d9a2ec1cbf361e7f607849343bf.tar.gz
Chemical-Simulator-GUI-a80b6726f5f70d9a2ec1cbf361e7f607849343bf.tar.bz2
Chemical-Simulator-GUI-a80b6726f5f70d9a2ec1cbf361e7f607849343bf.zip
Merge pull request #2 from pravindalve/master
Code restructured, some ui improvizations, undo redo implementation and Binary envelops utility
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("'", "")