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

Last change on this file since 8547 was 8547, checked in by davies, 13 years ago

Major experimental changes to balanced_dev

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