Changeset 8918
- Timestamp:
- Jun 13, 2013, 5:04:12 PM (11 years ago)
- Location:
- trunk/anuga_core/source/anuga_validation_tests/analytical_exact/avalanche_dry
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga_validation_tests/analytical_exact/avalanche_dry/plot_results.py
r8743 r8918 13 13 v2=(p2_st.y==v) 14 14 15 u0,h0,w0,z0,p0 = analytical_sol(p2_st.x[v2], p2_st.time[0]) 16 u10,h10,w10,z10,p10 = analytical_sol(p2_st.x[v2], p2_st.time[10]) 17 u30,h30,w30,z30,p30 = analytical_sol(p2_st.x[v2], p2_st.time[30]) 15 x_n = p2_st.x[v2] 16 17 18 19 u0,h0,w0,z0,p0 = analytical_sol(x_n, p2_st.time[0]) 20 u10,h10,w10,z10,p10 = analytical_sol(x_n, p2_st.time[10]) 21 u30,h30,w30,z30,p30 = analytical_sol(x_n, p2_st.time[30]) 22 23 24 w0_n = p2_st.stage[0,v2] 25 w10_n = p2_st.stage[10,v2] 26 w30_n = p2_st.stage[30,v2] 27 28 z_n = p2_st.elev[v2] 29 30 uh0_n = p2_st.xmom[0,v2] 31 uh10_n = p2_st.xmom[10,v2] 32 uh30_n = p2_st.xmom[30,v2] 33 34 u0_n = p2_st.xvel[0,v2] 35 u10_n = p2_st.xvel[10,v2] 36 u30_n = p2_st.xvel[30,v2] 37 38 18 39 19 40 #Plot stages 20 41 pyplot.clf() 21 pyplot.plot( p2_st.x[v2], p2_st.stage[0,v2],'b.-', label='numerical stage')22 pyplot.plot( p2_st.x[v2], p2_st.stage[10,v2], 'b.-')23 pyplot.plot( p2_st.x[v2], p2_st.stage[30,v2], 'b.-')24 pyplot.plot( p2_st.x[v2], w0,'r-', label='analytical stage')25 pyplot.plot( p2_st.x[v2], w10,'r-')26 pyplot.plot( p2_st.x[v2], w30,'r-')27 pyplot.plot( p2_st.x[v2], p2_st.elev[v2],'k-', label='bed elevation')42 pyplot.plot(x_n, w0_n,'b.-', label='numerical stage') 43 pyplot.plot(x_n, w10_n, 'b.-') 44 pyplot.plot(x_n, w30_n, 'b.-') 45 pyplot.plot(x_n, w0,'r-', label='analytical stage') 46 pyplot.plot(x_n, w10,'r-') 47 pyplot.plot(x_n, w30,'r-') 48 pyplot.plot(x_n, z_n,'k-', label='bed elevation') 28 49 pyplot.title('Stage at several instants in time') 29 50 pyplot.legend(loc='best') … … 36 57 #Plot xmomentum 37 58 pyplot.clf() 38 pyplot.plot( p2_st.x[v2], p2_st.xmom[0,v2], 'b.-', label='numerical')39 pyplot.plot( p2_st.x[v2], p2_st.xmom[10,v2], 'b.-')40 pyplot.plot( p2_st.x[v2], p2_st.xmom[30,v2],'b.-')41 pyplot.plot( p2_st.x[v2], u0*h0,'r-', label='analytical')42 pyplot.plot( p2_st.x[v2], u10*h10,'r-')43 pyplot.plot( p2_st.x[v2], u30*h30,'r-')59 pyplot.plot(x_n, uh0_n, 'b.-', label='numerical') 60 pyplot.plot(x_n, uh10_n, 'b.-') 61 pyplot.plot(x_n, uh30_n,'b.-') 62 pyplot.plot(x_n, u0*h0,'r-', label='analytical') 63 pyplot.plot(x_n, u10*h10,'r-') 64 pyplot.plot(x_n, u30*h30,'r-') 44 65 pyplot.title('Xmomentum at several instants in time') 45 66 pyplot.legend(loc='best') … … 51 72 #Plot velocities 52 73 pyplot.clf() 53 pyplot.plot( p2_st.x[v2], p2_st.xvel[0,v2], 'b.-', label='numerical')54 pyplot.plot( p2_st.x[v2], p2_st.xvel[10,v2], 'b.-')55 pyplot.plot( p2_st.x[v2], p2_st.xvel[30,v2],'b.-')56 pyplot.plot( p2_st.x[v2], u0,'r-', label='analytical')57 pyplot.plot( p2_st.x[v2], u10,'r-')58 pyplot.plot( p2_st.x[v2], u30,'r-')74 pyplot.plot(x_n, u0_n, 'b.-', label='numerical') 75 pyplot.plot(x_n, u10_n, 'b.-') 76 pyplot.plot(x_n, u30_n,'b.-') 77 pyplot.plot(x_n, u0,'r-', label='analytical') 78 pyplot.plot(x_n, u10,'r-') 79 pyplot.plot(x_n, u30,'r-') 59 80 pyplot.title('Xvelocity at several instants in time') 60 81 pyplot.legend(loc='best')
Note: See TracChangeset
for help on using the changeset viewer.