Changeset 8917


Ignore:
Timestamp:
Jun 13, 2013, 5:02:54 PM (12 years ago)
Author:
steve
Message:

Added in validation test for avalanche_wet

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  
    1313v2=(p2_st.y==v)
    1414
    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])
     15x_n = p2_st.x[v2]
     16
     17u0,h0,w0,z0,p0 = analytical_sol(x_n, p2_st.time[0])
     18u20,h20,w20,z20,p20 = analytical_sol(x_n, p2_st.time[20])
     19u40,h40,w40,z40,p40 = analytical_sol(x_n, p2_st.time[40])
     20
     21
     22
     23w0_n  = p2_st.stage[0,v2]
     24w20_n = p2_st.stage[20,v2]
     25w40_n = p2_st.stage[40,v2]
     26
     27z_n = p2_st.elev[v2]
     28
     29uh0_n  = p2_st.xmom[0,v2]
     30uh20_n = p2_st.xmom[20,v2]
     31uh40_n = p2_st.xmom[40,v2]
     32
     33u0_n  = p2_st.xvel[0,v2]
     34u20_n = p2_st.xvel[20,v2]
     35u40_n = p2_st.xvel[40,v2]
    1836
    1937#Plot stages
    2038pyplot.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')
     39pyplot.plot(x_n, w0_n,'b.-', label='numerical stage')
     40pyplot.plot(x_n, w20_n, 'b.-')
     41pyplot.plot(x_n, w40_n, 'b.-')
     42pyplot.plot(x_n, w0,'r-', label='analytical stage')
     43pyplot.plot(x_n, w20,'r-')
     44pyplot.plot(x_n, w40,'r-')
     45pyplot.plot(x_n, p2_st.elev[v2],'k-', label='bed elevation')
    2846pyplot.title('Stage at several instants in time')
    2947pyplot.legend(loc='best')
     
    3654#Plot xmomentum
    3755pyplot.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-')
     56pyplot.plot(x_n, uh0_n, 'b.-', label='numerical')
     57pyplot.plot(x_n, uh20_n, 'b.-')
     58pyplot.plot(x_n, uh40_n,'b.-')
     59pyplot.plot(x_n, u0*h0,'r-', label='analytical')
     60pyplot.plot(x_n, u20*h20,'r-')
     61pyplot.plot(x_n, u40*h40,'r-')
    4462pyplot.title('Xmomentum at several instants in time')
    4563pyplot.legend(loc='best')
     
    5169#Plot velocities
    5270pyplot.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-')
     71pyplot.plot(x_n, u0_n, 'b.-', label='numerical')
     72pyplot.plot(x_n, u20_n, 'b.-')
     73pyplot.plot(x_n, u40_n,'b.-')
     74pyplot.plot(x_n, u0,'r-', label='analytical')
     75pyplot.plot(x_n, u20,'r-')
     76pyplot.plot(x_n, u40,'r-')
    5977pyplot.title('Xvelocity at several instants in time')
    6078pyplot.legend(loc='best')
Note: See TracChangeset for help on using the changeset viewer.