source: trunk/anuga_work/development/gareth/tests/dam_break/plotme.py @ 9358

Last change on this file since 9358 was 9292, checked in by davies, 11 years ago

Adding local extrapolation and flux updating

File size: 1.2 KB
Line 
1"""
2    Quick plot of the dam break outputs
3
4"""
5from anuga.utilities import plot_utils as util
6from matplotlib import pyplot as pyplot
7
8p_st = util.get_output('dam_break_20140811_130209/dam_break.sww')
9p2_st=util.get_centroids(p_st)
10
11
12p_dev = util.get_output('dam_break_20140811_130049/dam_break.sww', 0.001)
13p2_dev=util.get_centroids(p_dev, velocity_extrapolation=True)
14
15pyplot.clf()
16pyplot.ion()
17pyplot.plot(p2_st.x, p2_st.stage[10,:],'r-', label='standard')
18pyplot.plot(p2_st.x, p2_st.stage[50,:], 'r-')
19pyplot.plot(p2_st.x, p2_st.stage[100,:], 'r-')
20
21pyplot.plot(p2_dev.x, p2_dev.stage[10,:],'b-', label='devel')
22pyplot.plot(p2_dev.x, p2_dev.stage[50,:],'b-')
23pyplot.plot(p2_dev.x, p2_dev.stage[100,:],'b-')
24
25pyplot.title('Stage at several instants in time')
26
27pyplot.legend(loc=3)
28pyplot.savefig('stage_plot.png')
29
30pyplot.clf()
31pyplot.ion()
32pyplot.plot(p2_st.x, p2_st.xvel[10,:], 'r-', label='standard')
33pyplot.plot(p2_st.x, p2_st.xvel[50,:], 'r-')
34pyplot.plot(p2_st.x, p2_st.xvel[100,:],'r-')
35
36pyplot.plot(p2_dev.x, p2_dev.xvel[10,:],'b-', label='devel')
37pyplot.plot(p2_dev.x, p2_dev.xvel[50,:],'b-')
38pyplot.plot(p2_dev.x, p2_dev.xvel[100,:],'b-')
39
40pyplot.title('Velocity at several instants in time')
41
42pyplot.legend(loc=2)
43pyplot.savefig('xvel_plot.png')
44
45
Note: See TracBrowser for help on using the repository browser.