diff options
-rw-r--r-- | .DS_Store | bin | 0 -> 8196 bytes | |||
-rw-r--r-- | Bin_Phase_env.py | 5 | ||||
-rw-r--r-- | Simulator/BinaryEnvelopes.mo | 19 |
3 files changed, 23 insertions, 1 deletions
diff --git a/.DS_Store b/.DS_Store Binary files differnew file mode 100644 index 0000000..1659453 --- /dev/null +++ b/.DS_Store diff --git a/Bin_Phase_env.py b/Bin_Phase_env.py index 60d5fc9..6bea7c4 100644 --- a/Bin_Phase_env.py +++ b/Bin_Phase_env.py @@ -92,7 +92,10 @@ class Bin_Phase_env(QWidget,ui_dialog): #print("") def get_omc_path(self): try: - if os.path.exists('/opt/local/bin/omc'): + self.omhome = os.environ.get('OPENMODELICAHOME') + if self.omhome is None: + self.omhome = os.path.split(os.path.split(os.path.realpath(spawn.find_executable("omc")))[0])[0] + elif os.path.exists('/opt/local/bin/omc'): self.omhome = '/opt/local' elif os.path.exists('/usr/bin/omc'): self.omhome = '/usr' diff --git a/Simulator/BinaryEnvelopes.mo b/Simulator/BinaryEnvelopes.mo new file mode 100644 index 0000000..990bf31 --- /dev/null +++ b/Simulator/BinaryEnvelopes.mo @@ -0,0 +1,19 @@ +package BinaryEnvelopes + model NRTL + parameter Integer NOC; + parameter Integer data_points; + parameter Real BIP[NOC, NOC, 2] = Simulator.Files.Thermodynamic_Functions.BIPNRTL(NOC, comp.CAS); + parameter Simulator.Files.Chemsep_Database.General_Properties comp[NOC]; + Simulator.Binary_Phase_Envelope.Binary_Phase_Envelope_NRTL.base points[data_points](each NOC = NOC, each comp = comp, each BIP = BIP); + Real x[data_points, NOC], y[data_points, NOC], P[data_points], T[data_points]; + equation + points[:].x = x; + points[:].y = y; + points[:].P = P; + points[:].T = T; + for i in 1:data_points loop + x[i, 1] = 0 + (i - 1) * 1/(data_points-1); + end for; + end NRTL; + +end BinaryEnvelopes;
\ No newline at end of file |