PLUTO
rayleigh_taylor.py
Go to the documentation of this file.
1 import os
2 import sys
3 from numpy import *
4 from matplotlib.pyplot import *
5 import pyPLUTO as pp
6 
7 plutodir = os.environ['PLUTO_DIR']
8 wdir = plutodir+'/Test_Problems/HD/Rayleigh_Taylor/'
9 
10 D0 = pp.pload(0,w_dir=wdir)
11 D1 = pp.pload(1,w_dir=wdir) # Loading the data into a pload object D.
12 D2 = pp.pload(2,w_dir=wdir)
13 
14 ## SMART WAY##
15 I = pp.Image()
16 I.multi_disp(D0.rho,D1.rho,D2.rho,x1=D0.x1,x2=D0.x2,Ncols=3,label1=3*['x'],
17  label2=3*['y'],title=[r'$\tau=0$',r'$\tau=1$',r'$\tau=2$'],
18  cbar=(True,'vertical','each'),figsize=[12,7])
19 
20 ##BRUTE FORCE WAY##
21 ## f1 = figure(figsize=[12,7])
22 ## ax1 = f1.add_subplot(131)
23 ## pcolormesh(D0.x1,D0.x2,D0.rho.T)
24 ## colorbar()
25 ## ax1.set_xlabel(r'x')
26 ## ax1.set_ylabel(r'y')
27 ## ax1.axis([-0.5,0.5,0.0,4.0])
28 ## ax1.set_aspect('equal')
29 ## ax1.set_title(r'$\tau$ = 0')
30 
31 
32 ## ax2 = f1.add_subplot(132)
33 ## pcolormesh(D1.x1,D1.x2,D1.rho.T)
34 ## colorbar()
35 ## ax2.set_xlabel(r'x')
36 ## ax2.set_ylabel(r'y')
37 ## ax2.axis([-0.5,0.5,0.0,4.0])
38 ## ax2.set_aspect('equal')
39 ## ax2.set_title(r'$\tau$ = 1')
40 
41 ## ax3 = f1.add_subplot(133)
42 ## pcolormesh(D2.x1,D2.x2,D2.rho.T)
43 ## colorbar()
44 ## ax3.set_xlabel(r'x')
45 ## ax3.set_ylabel(r'y')
46 ## ax3.axis([-0.5,0.5,0.0,4.0])
47 ## ax3.set_aspect('equal')
48 ## ax3.set_title(r'$\tau$ = 2')
49 
50 savefig('RayleighTaylor_multi.png')
51 show()
52