Changeset 8917
- Timestamp:
- Jun 13, 2013, 5:02:54 PM (12 years ago)
- Location:
- trunk/anuga_core/source/anuga_validation_tests/analytical_exact/avalanche_wet
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga_validation_tests/analytical_exact/avalanche_wet/plot_results.py
r8743 r8917 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 u20,h20,w20,z20,p20 = analytical_sol(p2_st.x[v2], p2_st.time[20]) 17 u40,h40,w40,z40,p40 = analytical_sol(p2_st.x[v2], p2_st.time[40]) 15 x_n = p2_st.x[v2] 16 17 u0,h0,w0,z0,p0 = analytical_sol(x_n, p2_st.time[0]) 18 u20,h20,w20,z20,p20 = analytical_sol(x_n, p2_st.time[20]) 19 u40,h40,w40,z40,p40 = analytical_sol(x_n, p2_st.time[40]) 20 21 22 23 w0_n = p2_st.stage[0,v2] 24 w20_n = p2_st.stage[20,v2] 25 w40_n = p2_st.stage[40,v2] 26 27 z_n = p2_st.elev[v2] 28 29 uh0_n = p2_st.xmom[0,v2] 30 uh20_n = p2_st.xmom[20,v2] 31 uh40_n = p2_st.xmom[40,v2] 32 33 u0_n = p2_st.xvel[0,v2] 34 u20_n = p2_st.xvel[20,v2] 35 u40_n = p2_st.xvel[40,v2] 18 36 19 37 #Plot stages 20 38 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[20,v2], 'b.-')23 pyplot.plot( p2_st.x[v2], p2_st.stage[40,v2], 'b.-')24 pyplot.plot( p2_st.x[v2], w0,'r-', label='analytical stage')25 pyplot.plot( p2_st.x[v2], w20,'r-')26 pyplot.plot( p2_st.x[v2], w40,'r-')27 pyplot.plot( p2_st.x[v2], p2_st.elev[v2],'k-', label='bed elevation')39 pyplot.plot(x_n, w0_n,'b.-', label='numerical stage') 40 pyplot.plot(x_n, w20_n, 'b.-') 41 pyplot.plot(x_n, w40_n, 'b.-') 42 pyplot.plot(x_n, w0,'r-', label='analytical stage') 43 pyplot.plot(x_n, w20,'r-') 44 pyplot.plot(x_n, w40,'r-') 45 pyplot.plot(x_n, p2_st.elev[v2],'k-', label='bed elevation') 28 46 pyplot.title('Stage at several instants in time') 29 47 pyplot.legend(loc='best') … … 36 54 #Plot xmomentum 37 55 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[20,v2], 'b.-')40 pyplot.plot( p2_st.x[v2], p2_st.xmom[40,v2],'b.-')41 pyplot.plot( p2_st.x[v2], u0*h0,'r-', label='analytical')42 pyplot.plot( p2_st.x[v2], u20*h20,'r-')43 pyplot.plot( p2_st.x[v2], u40*h40,'r-')56 pyplot.plot(x_n, uh0_n, 'b.-', label='numerical') 57 pyplot.plot(x_n, uh20_n, 'b.-') 58 pyplot.plot(x_n, uh40_n,'b.-') 59 pyplot.plot(x_n, u0*h0,'r-', label='analytical') 60 pyplot.plot(x_n, u20*h20,'r-') 61 pyplot.plot(x_n, u40*h40,'r-') 44 62 pyplot.title('Xmomentum at several instants in time') 45 63 pyplot.legend(loc='best') … … 51 69 #Plot velocities 52 70 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[20,v2], 'b.-')55 pyplot.plot( p2_st.x[v2], p2_st.xvel[40,v2],'b.-')56 pyplot.plot( p2_st.x[v2], u0,'r-', label='analytical')57 pyplot.plot( p2_st.x[v2], u20,'r-')58 pyplot.plot( p2_st.x[v2], u40,'r-')71 pyplot.plot(x_n, u0_n, 'b.-', label='numerical') 72 pyplot.plot(x_n, u20_n, 'b.-') 73 pyplot.plot(x_n, u40_n,'b.-') 74 pyplot.plot(x_n, u0,'r-', label='analytical') 75 pyplot.plot(x_n, u20,'r-') 76 pyplot.plot(x_n, u40,'r-') 59 77 pyplot.title('Xvelocity at several instants in time') 60 78 pyplot.legend(loc='best')
Note: See TracChangeset
for help on using the changeset viewer.