-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplot_TP.py
74 lines (49 loc) · 1.6 KB
/
plot_TP.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import numpy as np
import matplotlib.pylab as plt
data1 = np.loadtxt('FMS_RC_ic.out')
Pic = data1[:,1]
Tic = data1[:,2]
data2 = np.loadtxt('FMS_RC_pp.out')
Ppp = data2[:,1]
Tpp = data2[:,2]
dT_rad = data2[:,3]
dT_conv = data2[:,4]
Kzz = data2[:,5]
fig = plt.figure()
plt.plot(Tic,Pic/1e5,ls='dashed',lw=3,label='Initial Conditions',c='orange')
plt.plot(Tpp,Ppp/1e5,lw=3,label='Numerical Result',c='blue')
plt.ylabel('Pressure [bar]')
plt.xlabel('Temperature [K]')
plt.legend()
plt.yscale('log')
plt.gca().invert_yaxis()
yticks = [1000,100,10,1,0.1,0.01,1e-3,1e-4,1e-5,1e-6]
yticks_lab = ['1000','100','10','1','0.1','0.01','10$^{-3}$','10$^{-4}$','10$^{-5}$','10$^{-6}$']
plt.legend()
plt.ylim(1000,1e-6)
plt.yticks(yticks,yticks_lab)
fig = plt.figure()
plt.plot(dT_rad,Ppp/1e5,lw=3,label='dT_rad',c='red')
plt.plot(dT_conv,Ppp/1e5,lw=3,label='dT_conv',c='blue')
plt.ylabel('Pressure [bar]')
plt.xlabel('dT [K s$^{-1}$]')
plt.yscale('log')
plt.gca().invert_yaxis()
yticks = [1000,100,10,1,0.1,0.01,1e-3,1e-4,1e-5,1e-6]
yticks_lab = ['1000','100','10','1','0.1','0.01','10$^{-3}$','10$^{-4}$','10$^{-5}$','10$^{-6}$']
plt.legend()
plt.ylim(1000,1e-6)
plt.yticks(yticks,yticks_lab)
fig = plt.figure()
plt.plot(Kzz*1e4,Ppp/1e5,lw=3,label='Kzz',c='red')
plt.ylabel(r'Pressure [bar]')
plt.xlabel(r'K$_{\rm zz}$ [cm$^{2}$ s$^{-1}$]')
plt.yscale('log')
plt.xscale('log')
plt.gca().invert_yaxis()
yticks = [1000,100,10,1,0.1,0.01,1e-3,1e-4,1e-5,1e-6]
yticks_lab = ['1000','100','10','1','0.1','0.01','10$^{-3}$','10$^{-4}$','10$^{-5}$','10$^{-6}$']
plt.legend()
plt.ylim(1000,1e-6)
plt.yticks(yticks,yticks_lab)
plt.show()