PLUTO
sod.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/Sod/'
9 nlinf = pp.nlast_info(w_dir=wdir)
10 
11 D = pp.pload(nlinf['nlast'],w_dir=wdir) # Loading the data into a pload object D.
12 
13 f1 = figure()
14 ax1 = f1.add_subplot(111)
15 plot(D.x1,D.rho,'r',D.x1,D.prs,'k',D.x1,D.vx1,'g')
16 xlabel(r'x')
17 ylabel(r'$\rho$ [red], P [black], $V_{\rm x}$ [green]')
18 title(r'Sod shock Tube test')
19 axis([0.0,1.0,-0.2,1.2])
20 savefig('sod_1.pdf')
21 show()
string title
Definition: jet.py:14