diff options
author | brenda-br | 2023-02-24 11:55:27 +0530 |
---|---|---|
committer | brenda-br | 2023-02-24 11:55:27 +0530 |
commit | 2b94618c50110c38cd67564a5b58630aeeb2adc5 (patch) | |
tree | 180474d0ed0b1faba9066bb8b9d98432473d9157 /src/main/python/OMChem | |
parent | d476d2e053f937c0060f696312f301591e4f43ea (diff) | |
download | Chemical-Simulator-GUI-2b94618c50110c38cd67564a5b58630aeeb2adc5.tar.gz Chemical-Simulator-GUI-2b94618c50110c38cd67564a5b58630aeeb2adc5.tar.bz2 Chemical-Simulator-GUI-2b94618c50110c38cd67564a5b58630aeeb2adc5.zip |
Fix #62 Remove Redundant Lines
Diffstat (limited to 'src/main/python/OMChem')
-rw-r--r-- | src/main/python/OMChem/CompSep.py | 1 | ||||
-rw-r--r-- | src/main/python/OMChem/ConvReactor.py | 2 | ||||
-rw-r--r-- | src/main/python/OMChem/DistCol.py | 3 | ||||
-rw-r--r-- | src/main/python/OMChem/Flash.py | 2 | ||||
-rw-r--r-- | src/main/python/OMChem/Heater.py | 4 | ||||
-rw-r--r-- | src/main/python/OMChem/Pump.py | 4 | ||||
-rw-r--r-- | src/main/python/OMChem/ShortcutColumn.py | 2 | ||||
-rw-r--r-- | src/main/python/OMChem/Splitter.py | 2 | ||||
-rw-r--r-- | src/main/python/OMChem/Valve.py | 3 | ||||
-rw-r--r-- | src/main/python/OMChem/__pycache__/EngStm.cpython-37.pyc | bin | 929 -> 929 bytes | |||
-rw-r--r-- | src/main/python/OMChem/__pycache__/Flowsheet.cpython-37.pyc | bin | 8508 -> 8508 bytes | |||
-rw-r--r-- | src/main/python/OMChem/__pycache__/__init__.cpython-37.pyc | bin | 203 -> 203 bytes | |||
-rw-r--r-- | src/main/python/OMChem/adiabatic_comp.py | 3 | ||||
-rw-r--r-- | src/main/python/OMChem/adiabatic_exp.py | 3 |
14 files changed, 2 insertions, 27 deletions
diff --git a/src/main/python/OMChem/CompSep.py b/src/main/python/OMChem/CompSep.py index 9579498..d538acb 100644 --- a/src/main/python/OMChem/CompSep.py +++ b/src/main/python/OMChem/CompSep.py @@ -6,7 +6,6 @@ class CompSep(): self.SepFact = json.dumps(SepFact).replace('[','{').replace(']','}') self.SepStrm = str(SepStrm) self.SepFactValue = json.dumps(SepFactValue).replace('[','{').replace(']','}') - #self.name = name self.OM_data_eqn = '' self.OM_data_init = '' self.InputStms = [] diff --git a/src/main/python/OMChem/ConvReactor.py b/src/main/python/OMChem/ConvReactor.py index ccdf524..5c83106 100644 --- a/src/main/python/OMChem/ConvReactor.py +++ b/src/main/python/OMChem/ConvReactor.py @@ -16,7 +16,7 @@ class ConvReactor(): self.Tdef = str(Tdef) self.type = 'ConvReactor' - self.EngStms = EngStms(name="EngStm") + self.EngStms = EngStm(name="EngStm") def OM_Flowsheet_Init(self, addedcomp): self.OM_data_init = '' diff --git a/src/main/python/OMChem/DistCol.py b/src/main/python/OMChem/DistCol.py index 1492bc2..c4a88c3 100644 --- a/src/main/python/OMChem/DistCol.py +++ b/src/main/python/OMChem/DistCol.py @@ -5,7 +5,6 @@ class DistCol(): self.numStage = numStage self.numFeeds=numFeeds self.feedStages=feedStages - #self.name = name[0] self.name = name + str(DistCol.counter) self.OM_data_eqn = '' self.OM_data_init = '' @@ -13,7 +12,6 @@ class DistCol(): self.OutputStms = None self.EngStm1 = EngStm(name='EngStm1'+self.name) self.EngStm2 = EngStm(name='EngStm2'+self.name) - #self.count = name[1] self.count = DistCol.counter self.thermoPackage='Raoults_Law' self.type = 'DistCol' @@ -87,7 +85,6 @@ class DistCol(): def OM_Flowsheet_Eqn(self, addedcomp): self.OM_data_eqn = '' - # self.OM_data_eqn = self.name + '.pressDrop = ' + str(self.PressDrop) + ';\n' self.OM_data_eqn = self.OM_data_eqn + ('connect('+self.name+'.'+'condensor_duty'+','+ self.EngStm1.name+'.inlet);\n') self.OM_data_eqn = self.OM_data_eqn + ('connect('+self.name+'.reboiler_duty'+', '+self.EngStm2.name+'.inlet);\n') self.OM_data_eqn = self.OM_data_eqn + ('connect('+self.name+'.distillate'+", "+self.OutputStms[0].name+'.inlet);\n') diff --git a/src/main/python/OMChem/Flash.py b/src/main/python/OMChem/Flash.py index a3bf5dc..165849a 100644 --- a/src/main/python/OMChem/Flash.py +++ b/src/main/python/OMChem/Flash.py @@ -1,13 +1,11 @@ class Flash(): counter = 1 def __init__(self,name='Flash'): - #self.name = name[0] self.OM_data_eqn = '' self.OM_data_init = '' self.InputStms = None self.OutputStms = None self.type = 'flash' - #self.count = name[1] self.count = Flash.counter self.thermoPackage =None diff --git a/src/main/python/OMChem/Heater.py b/src/main/python/OMChem/Heater.py index cf9b8f1..a24253d 100644 --- a/src/main/python/OMChem/Heater.py +++ b/src/main/python/OMChem/Heater.py @@ -4,12 +4,9 @@ class Heater(): def __init__(self,name='Heater',PressureDrop = None, eff = None): self.PressureDrop = PressureDrop self.eff = eff - #self.name = name self.OM_data_eqn = '' self.OM_data_init = '' self.InputStms = None - #self.heatAdd=heatAdd - #self.outT = outT self.OutputStms = None self.EngStms = EngStm(name='EngStm'+name) self.type = 'Heater' @@ -67,7 +64,6 @@ class Heater(): def OM_Flowsheet_Eqn(self, addedcomp): self.OM_data_eqn = '' - # self.OM_data_eqn = self.name + '.pressDrop = ' + str(self.PressDrop) + ';\n' self.OM_data_eqn = self.OM_data_eqn + ('connect(' + self.InputStms[0].name + '.outlet,' + self.name + '.inlet' + ');\n') self.OM_data_eqn = self.OM_data_eqn + ('connect(' + self.name + '.outlet,' + self.OutputStms[0].name + '.inlet);\n') self.OM_data_eqn = self.OM_data_eqn + ('connect(' + self.EngStms.name + '.outlet,' + self.name + '.energy);\n') diff --git a/src/main/python/OMChem/Pump.py b/src/main/python/OMChem/Pump.py index 3b6ed2c..e9b9149 100644 --- a/src/main/python/OMChem/Pump.py +++ b/src/main/python/OMChem/Pump.py @@ -3,12 +3,9 @@ class Pump(): counter = 1 def __init__(self,name='Pump',eff = None): self.eff = eff - #self.name = name self.OM_data_eqn = '' self.OM_data_init = '' self.InputStms = None - #self.heatAdd=heatAdd - #self.outT = outT self.OutputStms = None self.EngStms = EngStm(name='EngStm'+name) self.type = 'Pump' @@ -54,7 +51,6 @@ class Pump(): def OM_Flowsheet_Eqn(self, addedcomp): self.OM_data_eqn = '' - # self.OM_data_eqn = self.name + '.pressDrop = ' + str(self.PressDrop) + ';\n' self.OM_data_eqn = self.OM_data_eqn + ('connect(' + self.InputStms[0].name + '.outlet,' + self.name + '.inlet' + ');\n') self.OM_data_eqn = self.OM_data_eqn + ('connect(' + self.name + '.outlet,' + self.OutputStms[0].name + '.inlet);\n') self.OM_data_eqn = self.OM_data_eqn + ('connect(' + self.EngStms.name + '.outlet,' + self.name + '.energy);\n') diff --git a/src/main/python/OMChem/ShortcutColumn.py b/src/main/python/OMChem/ShortcutColumn.py index a018873..60d9d1b 100644 --- a/src/main/python/OMChem/ShortcutColumn.py +++ b/src/main/python/OMChem/ShortcutColumn.py @@ -8,7 +8,6 @@ class ShortcutColumn(): self.HKey = HKey self.LKeyMolFrac = None self.HKeyMolFrac = None - #self.name = name[0] self.name = name + str(ShortcutColumn.counter) self.OM_data_eqn = '' self.OM_data_init = '' @@ -17,7 +16,6 @@ class ShortcutColumn(): self.EngStm1 = EngStm(name='EngStm1'+self.name) self.EngStm2 = EngStm(name='EngStm2'+self.name) - #self.count = name[1] self.count = ShortcutColumn.counter self.condType='' self.actR = None diff --git a/src/main/python/OMChem/Splitter.py b/src/main/python/OMChem/Splitter.py index f873146..98d41ab 100644 --- a/src/main/python/OMChem/Splitter.py +++ b/src/main/python/OMChem/Splitter.py @@ -51,7 +51,7 @@ class Splitter(): self.OM_data_eqn = '' comp_count = len(addedcomp) strcount = 1 - print("Output#########",self.OutputStms) + #print("Output#########",self.OutputStms) for strm in self.OutputStms: self.OM_data_eqn = self.OM_data_eqn + ( 'connect(' + strm.name + '.inlet,' + self.name + '.outlet[' + str(strcount) + ']);\n') diff --git a/src/main/python/OMChem/Valve.py b/src/main/python/OMChem/Valve.py index 9e8494b..05fa55f 100644 --- a/src/main/python/OMChem/Valve.py +++ b/src/main/python/OMChem/Valve.py @@ -1,10 +1,8 @@ class Valve(): counter = 1 def __init__(self,name='Valve'): - #self.PressDrop = PressureDrop self.mode = None self.modeVal = None - #self.name = name self.OM_data_eqn = '' self.OM_data_init = '' self.InputStms = None @@ -56,6 +54,5 @@ class Valve(): self.OM_data_eqn = self.OM_data_eqn + ('connect(' + self.InputStms[0].name + '.outlet,' + self.name + '.inlet' + ');\n') self.OM_data_eqn = self.OM_data_eqn + ('connect(' + self.name + '.outlet,' + self.OutputStms[0].name + '.inlet);\n') - print("asdfvfdasdsqdfdedfdfv12345678987654321234567898765") self.OM_data_eqn = self.OM_data_eqn + (self.name+'.'+self.mode+'='+ self.modeVal + ';\n') return self.OM_data_eqn
\ No newline at end of file diff --git a/src/main/python/OMChem/__pycache__/EngStm.cpython-37.pyc b/src/main/python/OMChem/__pycache__/EngStm.cpython-37.pyc Binary files differindex fd407a2..d065cdb 100644 --- a/src/main/python/OMChem/__pycache__/EngStm.cpython-37.pyc +++ b/src/main/python/OMChem/__pycache__/EngStm.cpython-37.pyc diff --git a/src/main/python/OMChem/__pycache__/Flowsheet.cpython-37.pyc b/src/main/python/OMChem/__pycache__/Flowsheet.cpython-37.pyc Binary files differindex d602758..2a2da08 100644 --- a/src/main/python/OMChem/__pycache__/Flowsheet.cpython-37.pyc +++ b/src/main/python/OMChem/__pycache__/Flowsheet.cpython-37.pyc diff --git a/src/main/python/OMChem/__pycache__/__init__.cpython-37.pyc b/src/main/python/OMChem/__pycache__/__init__.cpython-37.pyc Binary files differindex d9f9b6b..ee871fe 100644 --- a/src/main/python/OMChem/__pycache__/__init__.cpython-37.pyc +++ b/src/main/python/OMChem/__pycache__/__init__.cpython-37.pyc diff --git a/src/main/python/OMChem/adiabatic_comp.py b/src/main/python/OMChem/adiabatic_comp.py index d0a6b72..bda0476 100644 --- a/src/main/python/OMChem/adiabatic_comp.py +++ b/src/main/python/OMChem/adiabatic_comp.py @@ -3,7 +3,6 @@ class AdiabaticCompressor(): counter = 1 def __init__(self,name='AdiabaticCompressor', eff = None): self.eff = eff - #self.name = name[0] self.name = name + str(AdiabaticCompressor.counter) self.OM_data_eqn = '' @@ -11,7 +10,6 @@ class AdiabaticCompressor(): self.InputStms = None self.OutputStms = None self.EngStms = EngStm(name='EngStm'+self.name) - #self.count = name[1] self.count = AdiabaticCompressor.counter self.type = 'AdiabaticCompressor' self.thermoPackage ="RaoultsLaw" @@ -59,7 +57,6 @@ class AdiabaticCompressor(): def OM_Flowsheet_Eqn(self, addedcomp): self.OM_data_eqn = '' - # self.OM_data_eqn = self.name + '.pressDrop = ' + str(self.PressDrop) + ';\n' self.OM_data_eqn = self.OM_data_eqn + ('connect(' + self.InputStms[0].name + '.outlet,' + self.name + '.inlet' + ');\n') self.OM_data_eqn = self.OM_data_eqn + ('connect(' + self.name + '.outlet,' + self.OutputStms[0].name + '.inlet);\n') self.OM_data_eqn = self.OM_data_eqn + ('connect(' + self.EngStms.name + '.outlet,' + self.name + '.energy);\n') diff --git a/src/main/python/OMChem/adiabatic_exp.py b/src/main/python/OMChem/adiabatic_exp.py index 2754f0a..48381fa 100644 --- a/src/main/python/OMChem/adiabatic_exp.py +++ b/src/main/python/OMChem/adiabatic_exp.py @@ -3,14 +3,12 @@ class AdiabaticExpander(): counter = 1 def __init__(self,name='AdiabaticExpander', eff = None): self.eff = eff - #self.name = name[0] self.name = name + str(AdiabaticExpander.counter) self.OM_data_eqn = '' self.OM_data_init = '' self.InputStms = None self.OutputStms = None self.EngStms = EngStm(name='EngStm'+self.name) - #self.count = name[1] self.count = AdiabaticExpander.counter self.type = 'AdiabaticExpander' self.thermoPackage ="RaoultsLaw" @@ -59,7 +57,6 @@ class AdiabaticExpander(): def OM_Flowsheet_Eqn(self, addedcomp): self.OM_data_eqn = '' - # self.OM_data_eqn = self.name + '.pressDrop = ' + str(self.PressDrop) + ';\n' self.OM_data_eqn = self.OM_data_eqn + ('connect(' + self.InputStms[0].name + '.outlet,' + self.name + '.inlet' + ');\n') self.OM_data_eqn = self.OM_data_eqn + ('connect(' + self.name + '.outlet,' + self.OutputStms[0].name + '.inlet);\n') self.OM_data_eqn = self.OM_data_eqn + ('connect(' + self.EngStms.name + '.outlet,' + self.name + '.energy);\n') |