source: trunk/anuga_work/development/carrier_greenspan/plot_origin.py @ 8866

Last change on this file since 8866 was 8594, checked in by mungkasi, 12 years ago

Uploading the 1D Carrier-Greenspan test for 2D model.

File size: 645 bytes
Line 
1from anuga.utilities import plot_utils as util
2from matplotlib import pyplot as pyplot
3
4p2=util.get_output('carrier_greenspan.sww',0.001)
5p=util.get_centroids(p2,velocity_extrapolation=True)
6
7maxx=p.x.max()
8
9minx=p.x.min()
10
11v1 = abs(p.x -minx).argmin()
12#v2 = abs(p.x -0.5*(minx+maxx)).argmin()
13#v3 = abs(p.x -maxx).argmin()
14
15pyplot.plot(p.time, p.stage[:,v1], label='Left edge of domain')
16#pyplot.plot(p.time, p.stage[:,v2], label='Middle of domain')
17#pyplot.plot(p.time, p.stage[:,v3], label='Right edge of domain')
18pyplot.ylim((-1.0,1.0))
19pyplot.legend()
20pyplot.xlabel('Time (s)')
21pyplot.ylabel('m')
22pyplot.savefig('wave_atten_at_origin.png')
Note: See TracBrowser for help on using the repository browser.