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 | |
---|
1 | from anuga.utilities import plot_utils as util |
---|
2 | from matplotlib import pyplot as pyplot |
---|
3 | |
---|
4 | p2=util.get_output('carrier_greenspan.sww',0.001) |
---|
5 | p=util.get_centroids(p2,velocity_extrapolation=True) |
---|
6 | |
---|
7 | maxx=p.x.max() |
---|
8 | |
---|
9 | minx=p.x.min() |
---|
10 | |
---|
11 | v1 = abs(p.x -minx).argmin() |
---|
12 | #v2 = abs(p.x -0.5*(minx+maxx)).argmin() |
---|
13 | #v3 = abs(p.x -maxx).argmin() |
---|
14 | |
---|
15 | pyplot.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') |
---|
18 | pyplot.ylim((-1.0,1.0)) |
---|
19 | pyplot.legend() |
---|
20 | pyplot.xlabel('Time (s)') |
---|
21 | pyplot.ylabel('m') |
---|
22 | pyplot.savefig('wave_atten_at_origin.png') |
---|
Note: See
TracBrowser
for help on using the repository browser.