summaryrefslogtreecommitdiff
path: root/OMChem
diff options
context:
space:
mode:
authorpravindalve2023-02-23 21:23:29 +0530
committerGitHub2023-02-23 21:23:29 +0530
commit7740d1ca0c2e6bf34900460b0c58fa4d528577fb (patch)
tree0061e4117d1f16fd2fc9e37d078d5b5585af0aef /OMChem
parent651b94f869dde8c3ca75fd1a0e41c32bc01c240d (diff)
parentc5f533673ea9ab4315e76940f6d014e349f97884 (diff)
downloadChemical-Simulator-GUI-7740d1ca0c2e6bf34900460b0c58fa4d528577fb.tar.gz
Chemical-Simulator-GUI-7740d1ca0c2e6bf34900460b0c58fa4d528577fb.tar.bz2
Chemical-Simulator-GUI-7740d1ca0c2e6bf34900460b0c58fa4d528577fb.zip
Merge pull request #54 from brenda-br/Fix-35
Fix #51, 52, 53, 55, 56, 57, 58, 59, 60, 61
Diffstat (limited to 'OMChem')
-rw-r--r--OMChem/Flowsheet.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/OMChem/Flowsheet.py b/OMChem/Flowsheet.py
index c38b94e..f47c203 100644
--- a/OMChem/Flowsheet.py
+++ b/OMChem/Flowsheet.py
@@ -21,7 +21,7 @@ class Flowsheet():
self.stdout=None
self.stderr=None
- def get_omc_path(self):
+ def get_omc_path(self,msg):
try:
self.omhome = os.environ.get('OPENMODELICAHOME')
if self.omhome is None:
@@ -32,6 +32,8 @@ class Flowsheet():
self.omhome = '/usr'
return os.path.join(self.omhome, 'bin', 'omc')
except BaseException:
+ msg.parent().parent().parent().container.disableInterfaceforSimulation(False)
+ msg.append("<span style=\"color:red\"><b>Installation Error : </b>The OpenModelica compiler is missing in the System path please install it.</span>")
print("The OpenModelica compiler is missing in the System path please install it" )
raise
@@ -44,9 +46,9 @@ class Flowsheet():
def add_compound_list(self,C):
self.compounds = C
- def send_for_simulation_Eqn(self):
+ def send_for_simulation_Eqn(self,msg):
self.result_data = []
- self.omc_path = self.get_omc_path()
+ self.omc_path = self.get_omc_path(msg)
#print(self.omc_path)
if self.sim_method == 'Eqn':
@@ -94,7 +96,7 @@ class Flowsheet():
resultval = str(self.result_data[-1][ind])
unit[0].Prop[key] = resultval
- def simulate_EQN(self):
+ def simulate_EQN(self,msg):
self.data = []
self.sim_method = 'Eqn'
self.data.append("model Flowsheet\n")
@@ -154,7 +156,7 @@ class Flowsheet():
#print('Initiating Simulation in Equation Oriented Mode')
- self.send_for_simulation_Eqn()
+ self.send_for_simulation_Eqn(msg)
def simulate_SM(self,ip,op):
self.sim_method = 'SM'