From c6321d3dbdd5cebf66fe8470d9c0a58ed63e4721 Mon Sep 17 00:00:00 2001 From: pravindalve Date: Sun, 18 Apr 2021 21:09:36 +0530 Subject: Fixes for issue #16 --- Graphics.py | 2 +- Undo.dat | Bin 55552 -> 56752 bytes UnitOperations.py | 14 +++---- icon/CentrifugalPump.png | Bin 0 -> 1348 bytes icon/Pump.png | Bin 1348 -> 0 bytes icons/CentrifugalPump.png | Bin 0 -> 1620 bytes icons/Pump.png | Bin 1620 -> 0 bytes main.ui | 8 ++-- mainApp.py | 2 +- svg/Centrifugal Pump.svg | 104 ---------------------------------------------- svg/CentrifugalPump.svg | 104 ++++++++++++++++++++++++++++++++++++++++++++++ 11 files changed, 115 insertions(+), 119 deletions(-) create mode 100644 icon/CentrifugalPump.png delete mode 100644 icon/Pump.png create mode 100644 icons/CentrifugalPump.png delete mode 100644 icons/Pump.png delete mode 100644 svg/Centrifugal Pump.svg create mode 100644 svg/CentrifugalPump.svg diff --git a/Graphics.py b/Graphics.py index 950b1fc..a9a6d23 100644 --- a/Graphics.py +++ b/Graphics.py @@ -538,7 +538,7 @@ class NodeItem(QtWidgets.QGraphicsItem): input = [NodeSocket(QtCore.QRect(3.5, (self.rect.height()*x/(self.nin+1))-2,4,4), self, 'in', x) for x in range(1,self.nin+1) ] output = [NodeSocket(QtCore.QRect(self.rect.width()-8.0,(self.rect.height()*x/(self.nop+1))-2,4,4), self, 'op', x) for x in range(1,self.nop+1)] return input,output - elif(self.type=="Pump"): + elif(self.type=="CentrifugalPump"): input = [NodeSocket(QtCore.QRect(-2.5,(self.rect.height()*x/(self.nin+1))-7, 4,4), self, 'in', x) for x in range(1,self.nin+1) ] output = [NodeSocket(QtCore.QRect(self.rect.width()-2.5,-1.5,4,4), self, 'op', x) for x in range(1,self.nop+1)] return input,output diff --git a/Undo.dat b/Undo.dat index 314d594..bf52137 100644 Binary files a/Undo.dat and b/Undo.dat differ diff --git a/UnitOperations.py b/UnitOperations.py index ba7a763..ddac8b1 100644 --- a/UnitOperations.py +++ b/UnitOperations.py @@ -487,9 +487,7 @@ class Flash(UnitOperation): self.extra = ['Flash'] self.for_naming = ['Flash'] self.no_of_inputs = 1 - self.no_of_outputs = 2 - self.input_stms = [] - self.output_stms = [] + self.no_of_outputs = 2 self.count = Flash.counter self.thermo_pack_req = True self.parameters = ['BTdef', 'Tdef', 'BPdef', 'Pdef'] @@ -523,13 +521,11 @@ class Flash(UnitOperation): return self.OM_data_eqn -class Pump(UnitOperation): - def __init__(self,name='Pump'): +class CentrifugalPump(UnitOperation): + def __init__(self,name='CentrifugalPump'): UnitOperation.__init__(self) - self.name = name + str(Pump.counter) - self.type = 'Pump' - self.input_stms = None - self.output_stms = None + self.name = name + str(CentrifugalPump.counter) + self.type = 'CentrifugalPump' self.modes_list = ['Pdel', 'Pout', 'Q'] #"enFlo" self.parameters = ['Eff'] diff --git a/icon/CentrifugalPump.png b/icon/CentrifugalPump.png new file mode 100644 index 0000000..daf804b Binary files /dev/null and b/icon/CentrifugalPump.png differ diff --git a/icon/Pump.png b/icon/Pump.png deleted file mode 100644 index daf804b..0000000 Binary files a/icon/Pump.png and /dev/null differ diff --git a/icons/CentrifugalPump.png b/icons/CentrifugalPump.png new file mode 100644 index 0000000..a2d3e8e Binary files /dev/null and b/icons/CentrifugalPump.png differ diff --git a/icons/Pump.png b/icons/Pump.png deleted file mode 100644 index a2d3e8e..0000000 Binary files a/icons/Pump.png and /dev/null differ diff --git a/main.ui b/main.ui index 06367ea..b671aa5 100644 --- a/main.ui +++ b/main.ui @@ -148,7 +148,7 @@ 0 0 1068 - 21 + 18 @@ -274,8 +274,8 @@ 0 0 - 221 - 956 + 225 + 914 @@ -1736,7 +1736,7 @@ - icons/Pump.pngicons/Pump.png + icons/CentrifugalPump.pngicons/CentrifugalPump.png diff --git a/mainApp.py b/mainApp.py index 29db874..1d8262c 100644 --- a/mainApp.py +++ b/mainApp.py @@ -99,7 +99,7 @@ class MainApp(QMainWindow,ui): def button_handler(self): self.pushButton.clicked.connect(partial(self.component,'MaterialStream')) self.pushButton_7.clicked.connect(partial(self.component,'Mixer')) - self.pushButton_14.clicked.connect(partial(self.component,'Pump')) + self.pushButton_14.clicked.connect(partial(self.component,'CentrifugalPump')) self.pushButton_26.clicked.connect(partial(self.component,'DistillationColumn')) self.pushButton_18.clicked.connect(partial(self.component,'ShortcutColumn')) self.pushButton_11.clicked.connect(partial(self.component,'Heater')) diff --git a/svg/Centrifugal Pump.svg b/svg/Centrifugal Pump.svg deleted file mode 100644 index 5b60256..0000000 --- a/svg/Centrifugal Pump.svg +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - Centrifugal pump - Centrifugal pump - - - - - - - - - - - - - diff --git a/svg/CentrifugalPump.svg b/svg/CentrifugalPump.svg new file mode 100644 index 0000000..5b60256 --- /dev/null +++ b/svg/CentrifugalPump.svg @@ -0,0 +1,104 @@ + + + + + + + + + + image/svg+xml + + + + + + + + Centrifugal pump + Centrifugal pump + + + + + + + + + + + + + -- cgit