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

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

Updates to validation tests and to DE1 solver

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