Changeset 8918


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

Added in validation test for avalanche_dry (actually doesn't pass
due to large error at wet dry interface)

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  
    1313v2=(p2_st.y==v)
    1414
    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])
     15x_n = p2_st.x[v2]
     16
     17
     18
     19u0,h0,w0,z0,p0 = analytical_sol(x_n, p2_st.time[0])
     20u10,h10,w10,z10,p10 = analytical_sol(x_n, p2_st.time[10])
     21u30,h30,w30,z30,p30 = analytical_sol(x_n, p2_st.time[30])
     22
     23
     24w0_n  = p2_st.stage[0,v2]
     25w10_n = p2_st.stage[10,v2]
     26w30_n = p2_st.stage[30,v2]
     27
     28z_n = p2_st.elev[v2]
     29
     30uh0_n  = p2_st.xmom[0,v2]
     31uh10_n = p2_st.xmom[10,v2]
     32uh30_n = p2_st.xmom[30,v2]
     33
     34u0_n  = p2_st.xvel[0,v2]
     35u10_n = p2_st.xvel[10,v2]
     36u30_n = p2_st.xvel[30,v2]
     37
     38
    1839
    1940#Plot stages
    2041pyplot.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')
     42pyplot.plot(x_n, w0_n,'b.-', label='numerical stage')
     43pyplot.plot(x_n, w10_n, 'b.-')
     44pyplot.plot(x_n, w30_n, 'b.-')
     45pyplot.plot(x_n, w0,'r-', label='analytical stage')
     46pyplot.plot(x_n, w10,'r-')
     47pyplot.plot(x_n, w30,'r-')
     48pyplot.plot(x_n, z_n,'k-', label='bed elevation')
    2849pyplot.title('Stage at several instants in time')
    2950pyplot.legend(loc='best')
     
    3657#Plot xmomentum
    3758pyplot.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-')
     59pyplot.plot(x_n, uh0_n, 'b.-', label='numerical')
     60pyplot.plot(x_n, uh10_n, 'b.-')
     61pyplot.plot(x_n, uh30_n,'b.-')
     62pyplot.plot(x_n, u0*h0,'r-', label='analytical')
     63pyplot.plot(x_n, u10*h10,'r-')
     64pyplot.plot(x_n, u30*h30,'r-')
    4465pyplot.title('Xmomentum at several instants in time')
    4566pyplot.legend(loc='best')
     
    5172#Plot velocities
    5273pyplot.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-')
     74pyplot.plot(x_n, u0_n, 'b.-', label='numerical')
     75pyplot.plot(x_n, u10_n, 'b.-')
     76pyplot.plot(x_n, u30_n,'b.-')
     77pyplot.plot(x_n, u0,'r-', label='analytical')
     78pyplot.plot(x_n, u10,'r-')
     79pyplot.plot(x_n, u30,'r-')
    5980pyplot.title('Xvelocity at several instants in time')
    6081pyplot.legend(loc='best')
Note: See TracChangeset for help on using the changeset viewer.