summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrenda-br2023-03-02 11:03:01 +0530
committerbrenda-br2023-03-02 11:03:01 +0530
commitf7b5ea052db8e59518dcf6283311a7064f842b46 (patch)
treec7e72135797eb89e431475655c8075bc90031c42
parentf85ca605c02f70fcd911547323ee1245265b83ab (diff)
downloadChemical-Simulator-GUI-f7b5ea052db8e59518dcf6283311a7064f842b46.tar.gz
Chemical-Simulator-GUI-f7b5ea052db8e59518dcf6283311a7064f842b46.tar.bz2
Chemical-Simulator-GUI-f7b5ea052db8e59518dcf6283311a7064f842b46.zip
Rounding Values in Dock Widgets
-rw-r--r--.gitignore9
-rw-r--r--src/main/python/DockWidgets/__pycache__/DockWidget.cpython-36.pycbin4878 -> 4843 bytes
-rw-r--r--src/main/python/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-36.pycbin4418 -> 4450 bytes
-rw-r--r--src/main/python/DockWidgets/__pycache__/DockWidgetCompressorExpander.cpython-36.pycbin5411 -> 5466 bytes
-rw-r--r--src/main/python/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-36.pycbin10206 -> 10450 bytes
-rw-r--r--src/main/python/DockWidgets/__pycache__/DockWidgetFlash.cpython-36.pycbin3462 -> 3547 bytes
-rw-r--r--src/main/python/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-36.pycbin9652 -> 9701 bytes
-rw-r--r--src/main/python/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-36.pycbin5569 -> 5592 bytes
-rw-r--r--src/main/python/DockWidgets/__pycache__/DockWidgetSplitter.cpython-36.pycbin3338 -> 3338 bytes
-rw-r--r--src/main/python/OMChem/__pycache__/Flowsheet.cpython-36.pycbin8534 -> 8426 bytes
-rw-r--r--src/main/python/utils/Streams.py26
11 files changed, 22 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore
index 19ba1f9..fa83a1a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,3 +25,12 @@ src/main/python/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.
src/main/python/DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc
src/main/python/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc
src/main/python/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc
+src/main/python/DockWidgets/__pycache__/DockWidgetSplitter.cpython-36.pyc
+src/main/python/OMChem/__pycache__/Flowsheet.cpython-36.pyc
+src/main/python/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-36.pyc
+src/main/python/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-36.pyc
+src/main/python/DockWidgets/__pycache__/DockWidgetFlash.cpython-36.pyc
+src/main/python/DockWidgets/__pycache__/DockWidgetCompressorExpander.cpython-36.pyc
+src/main/python/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-36.pyc
+src/main/python/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-36.pyc
+src/main/python/DockWidgets/__pycache__/DockWidget.cpython-36.pyc
diff --git a/src/main/python/DockWidgets/__pycache__/DockWidget.cpython-36.pyc b/src/main/python/DockWidgets/__pycache__/DockWidget.cpython-36.pyc
index d1958e4..0910bb4 100644
--- a/src/main/python/DockWidgets/__pycache__/DockWidget.cpython-36.pyc
+++ b/src/main/python/DockWidgets/__pycache__/DockWidget.cpython-36.pyc
Binary files differ
diff --git a/src/main/python/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-36.pyc b/src/main/python/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-36.pyc
index 2f08a64..0bb8ec2 100644
--- a/src/main/python/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-36.pyc
+++ b/src/main/python/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-36.pyc
Binary files differ
diff --git a/src/main/python/DockWidgets/__pycache__/DockWidgetCompressorExpander.cpython-36.pyc b/src/main/python/DockWidgets/__pycache__/DockWidgetCompressorExpander.cpython-36.pyc
index b8ca696..75c33c9 100644
--- a/src/main/python/DockWidgets/__pycache__/DockWidgetCompressorExpander.cpython-36.pyc
+++ b/src/main/python/DockWidgets/__pycache__/DockWidgetCompressorExpander.cpython-36.pyc
Binary files differ
diff --git a/src/main/python/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-36.pyc b/src/main/python/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-36.pyc
index aad2e1f..18ebc2a 100644
--- a/src/main/python/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-36.pyc
+++ b/src/main/python/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-36.pyc
Binary files differ
diff --git a/src/main/python/DockWidgets/__pycache__/DockWidgetFlash.cpython-36.pyc b/src/main/python/DockWidgets/__pycache__/DockWidgetFlash.cpython-36.pyc
index bda9fee..665e2e1 100644
--- a/src/main/python/DockWidgets/__pycache__/DockWidgetFlash.cpython-36.pyc
+++ b/src/main/python/DockWidgets/__pycache__/DockWidgetFlash.cpython-36.pyc
Binary files differ
diff --git a/src/main/python/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-36.pyc b/src/main/python/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-36.pyc
index 9c60f72..7be87c9 100644
--- a/src/main/python/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-36.pyc
+++ b/src/main/python/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-36.pyc
Binary files differ
diff --git a/src/main/python/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-36.pyc b/src/main/python/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-36.pyc
index 34b2b4a..34ef4fe 100644
--- a/src/main/python/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-36.pyc
+++ b/src/main/python/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-36.pyc
Binary files differ
diff --git a/src/main/python/DockWidgets/__pycache__/DockWidgetSplitter.cpython-36.pyc b/src/main/python/DockWidgets/__pycache__/DockWidgetSplitter.cpython-36.pyc
index 91cd0b7..eaac842 100644
--- a/src/main/python/DockWidgets/__pycache__/DockWidgetSplitter.cpython-36.pyc
+++ b/src/main/python/DockWidgets/__pycache__/DockWidgetSplitter.cpython-36.pyc
Binary files differ
diff --git a/src/main/python/OMChem/__pycache__/Flowsheet.cpython-36.pyc b/src/main/python/OMChem/__pycache__/Flowsheet.cpython-36.pyc
index 314fe9e..b2b2518 100644
--- a/src/main/python/OMChem/__pycache__/Flowsheet.cpython-36.pyc
+++ b/src/main/python/OMChem/__pycache__/Flowsheet.cpython-36.pyc
Binary files differ
diff --git a/src/main/python/utils/Streams.py b/src/main/python/utils/Streams.py
index 3f13b42..7b2aadc 100644
--- a/src/main/python/utils/Streams.py
+++ b/src/main/python/utils/Streams.py
@@ -43,16 +43,16 @@ class MaterialStream():
'T' : {'name':'Temperature', 'value':300, 'unit':'K'},
'xvap' : {'name':'Vapour Mole Fraction', 'value':None, 'unit':''},
- 'H_p[1]' : {'name':'Mixture Molar Entalpy', 'value':None, 'unit':'J/mol'},
+ 'H_p[1]' : {'name':'Mixture Molar Enthalpy', 'value':None, 'unit':'J/mol'},
'S_p[1]' : {'name':'Mixture Molar Entropy', 'value':None, 'unit':'J/mol.K'},
'F_p[1]' : {'name':'Mixture Molar Flow', 'value':100, 'unit':'mol/s'},
'Fm_p[1]' : {'name':'Mixture Mass Flow', 'value':None, 'unit':'g/s'},
- 'H_p[2]' : {'name':'Liquid Molar Entalpy', 'value':None, 'unit':'J/mol'},
+ 'H_p[2]' : {'name':'Liquid Molar Enthalpy', 'value':None, 'unit':'J/mol'},
'S_p[2]' : {'name':'Liquid Molar Entropy', 'value':None, 'unit':'J/mol.K'},
'F_p[2]' : {'name':'Liquid Molar Flow', 'value':None, 'unit':'mol/s'},
- 'H_p[3]' : {'name':'Vapour Molar Entalpy', 'value':None, 'unit':'J/mol'},
+ 'H_p[3]' : {'name':'Vapour Molar Enthalpy', 'value':None, 'unit':'J/mol'},
'S_p[3]' : {'name':'Vapour Molar Entropy', 'value':None, 'unit':'J/mol.K'},
'F_p[3]' : {'name':'Vapour Molar Flow', 'value':None, 'unit':'mol/s'},
@@ -193,34 +193,34 @@ class MaterialStream():
self.mode1 = 'P'
self.mode2 = 'T'
- dict = {self.mode1:self.variables['P']['value'], self.mode2:self.variables['T']['value'],
- "MolFlow":self.variables['F_p[1]']['value'],"x_pc":self.variables['x_pc']['value'],
+ dict = {self.mode1:str(round(float(self.variables['P']['value']),4)), self.mode2:str(round(float(self.variables['T']['value']),4)),
+ "MolFlow":str(round(float(self.variables['F_p[1]']['value']),4)),"x_pc":self.variables['x_pc']['value'],
"Thermo Package": self.thermo_package}
#print('dictionary is :' + str(dict))
elif(mode=="PH"):
self.mode1 = 'P'
self.mode2 = 'H_p[1]'
- dict = {self.mode1:self.variables['P']['value'], self.mode2:self.variables['H_p[1]']['value'],
- "MolFlow":self.variables['F_p[1]']['value'], "x_pc":self.variables['x_pc']['value'],
+ dict = {self.mode1:str(round(float(self.variables['P']['value']),4)), self.mode2:round(float(self.variables['H_p[1]']['value']),4),
+ "MolFlow":round(float(self.variables['F_p[1]']['value']),4), "x_pc":self.variables['x_pc']['value'],
"Thermo Package": self.thermo_package}
elif(mode=="PVF"):
self.mode1 = 'P'
self.mode2 = 'xvap'
- dict = {self.mode1:self.variables['P']['value'], self.mode2:self.variables['xvap']['value'],
- "MolFlow":self.variables['F_p[1]']['value'], "x_pc":self.variables['x_pc']['value'],
+ dict = {self.mode1:round(float(self.variables['P']['value']),4), self.mode2:round(float(self.variables['xvap']['value']),4),
+ "MolFlow":round(float(self.variables['F_p[1]']['value']),4), "x_pc":self.variables['x_pc']['value'],
"Thermo Package": self.thermo_package}
elif(mode=="TVF"):
self.mode1 = 'T'
self.mode2 = 'xvap'
- dict = {self.mode1:self.variables['T']['value'], self.mode2:self.variables['xvap']['value'],
- "MolFlow":self.variables['F_p[1]']['value'], "x_pc":self.variables['x_pc']['value'],
+ dict = {self.mode1:round(float(self.variables['T']['value']),4), self.mode2:round(float(self.variables['xvap']['value']),4),
+ "MolFlow":round(float(self.variables['F_p[1]']['value']),4), "x_pc":self.variables['x_pc']['value'],
"Thermo Package": self.thermo_package}
elif(mode=="PS"):
self.mode1 = 'P'
self.mode2 = 'S_p[1]'
- dict = {self.mode1:self.variables['P']['value'], self.mode2: self.variables['S_p[1]']['value'],
- "MolFlow":self.variables['F_p[1]']['value'], "x_pc":self.variables['x_pc']['value'],
+ dict = {self.mode1:round(float(self.variables['P']['value']),4), self.mode2: round(float(self.variables['S_p[1]']['value']),4),
+ "MolFlow":round(float(self.variables['F_p[1]']['value']),2), "x_pc":self.variables['x_pc']['value'],
"Thermo Package": self.thermo_package}
return dict