#!/usr/bin/python # Importing Numpy (math, arrays, etc...) import numpy as np # Importing Matplotlib (plotting) import matplotlib.pyplot as plt # Importing plot utilities from plotutils import loadFile, getPoint data = loadFile("../solid_envelope.dat") Tc1, Pc1 = getPoint("../solid_envelope.dat","#Critical point 1") Tc2, Pc2 = getPoint("../solid_envelope.dat","#Critical point 2") colors = [ "black", "blue", "red", "green", "grey", "cyan", "navy"] linestyles = [ "-", "--", ":", "-."] p_conv=1.0e-5 # Pa -> Bar for i in range(int(data.shape[1]/2)): iT = 2*i label=None env, = plt.plot(data[:,iT],data[:,iT+1]*p_conv,color=colors[i],linestyle=linestyles[0],label=label) if Tc1 > 1.0: crit, = plt.plot(Tc1,Pc1*p_conv,'ko') if Tc2 > 1.0: crit, = plt.plot(Tc2,Pc2*p_conv,'ko') plt.xlabel(r"$T$ (K)") plt.ylabel(r"$P$ (bar)")
#!/usr/bin/python # Importing Numpy (math, arrays, etc...) import numpy as np # Importing Matplotlib (plotting) import matplotlib.pyplot as plt # Importing plot utilities from plotutils import loadFile, getFloat T = getFloat("../binary.dat", "#Pxy") data = loadFile("../binary.dat") if T > 0: legend = "T=" + str(T) else: legend = None env, = plt.plot(data[:, 0], data[:, 2] * 1e-5, color="r", label=legend) env, = plt.plot(data[:, 1], data[:, 2] * 1e-5, color="r") plt.xlabel(r"$x$ ($-$)") plt.ylabel(r"$P$ (Bar)") plt.grid(b=True, which='major', color='k', linestyle='--') if legend is not None: leg = plt.legend(loc="best", numpoints=1) leg.get_frame().set_linewidth(0.0) #plt.ylim((0,5)) plt.savefig("binary.pdf") plt.show()
#!/usr/bin/python # Importing Numpy (math, arrays, etc...) import numpy as np # Importing Matplotlib (plotting) import matplotlib.pyplot as plt # Importing plot utilities from plotutils import loadFile, getFloat, file_exists T = None if file_exists("../binary_LLE.dat"): T_LLE = getFloat("../binary_LLE.dat", "#Pxy") if T_LLE is not None: T = T_LLE data = loadFile("../binary_LLE.dat") env, = plt.plot(data[:, 0], data[:, 2] * 1e-5, color="b") env, = plt.plot(data[:, 1], data[:, 2] * 1e-5, color="b") if file_exists("../binary_L1VE.dat"): T_L1VE = getFloat("../binary_L1VE.dat", "#Pxy") if T_L1VE is not None: T = T_L1VE data = loadFile("../binary_L1VE.dat") env, = plt.plot(data[:, 0], data[:, 2] * 1e-5, color="g") env, = plt.plot(data[:, 1], data[:, 2] * 1e-5, color="g") if file_exists("../binary_L2VE.dat"): T_L2VE = getFloat("../binary_L2VE.dat", "#Pxy") if T_L2VE is not None: T = T_L2VE
#!/usr/bin/python # Importing Numpy (math, arrays, etc...) import numpy as np # Importing Matplotlib (plotting) import matplotlib.pyplot as plt # Importing plot utilities from plotutils import loadFile, getInteger, getBinary data = loadFile("../global_binary.dat") diagram_type = getInteger("../global_binary.dat", "#Global phase diagram of type:") nCrit = getInteger("../global_binary.dat", "#Number of critical lines:") nLLVE = getInteger("../global_binary.dat", "#Number of LLVE lines:") nAZ = getInteger("../global_binary.dat", "#Number of AZ lines:") comp1, comp2 = getBinary("../global_binary.dat", "#Binary system:") if diagram_type == 1: ks_str = "I" elif diagram_type == 2: ks_str = "II" elif diagram_type == 3: ks_str = "III" elif diagram_type == 4: ks_str = "IV" elif diagram_type == 5: ks_str = "V" title = "van Konynenburg and Scott type " + ks_str + " binary: " + comp1 + " " + comp2 base_filename = "global_binary_" + comp1 + "_" + comp2
#!/usr/bin/python # Importing Numpy (math, arrays, etc...) import numpy as np # Importing Matplotlib (plotting) import matplotlib.pyplot as plt # Importing plot utilities from plotutils import loadFile, getPoint data = loadFile("../envelope.dat") Tc, Pc = getPoint("../envelope.dat", "#Critical") Tcb, Pcb = getPoint("../envelope.dat", "#Cricondenbar") Tct, Pct = getPoint("../envelope.dat", "#Cricondentherm") env, = plt.plot(data[:, 0] - 273.15, data[:, 1], label="Envelope") if Tc > 1.0: crit, = plt.plot(Tc - 273.15, Pc, 'ko', label="Crit") if Tcb > 1.0: criconBar, = plt.plot(Tcb - 273.15, Pcb, 'ro', label="Cricondenbar") if Tct > 1.0: criconTherm, = plt.plot(Tct - 273.15, Pct, 'go', label="Cricondentherm") plt.xlabel(u"$T$ (\N{DEGREE SIGN}C)") plt.ylabel(r"$P$ (bar)") plt.grid(b=True, which='major', color='k', linestyle='--') leg = plt.legend(loc="lower right", numpoints=1) leg.get_frame().set_linewidth(0.0) #plt.xlim((-50,40)) plt.savefig("envelope.pdf") plt.show()