Ignore:
Timestamp:
Jul 30, 2008, 5:03:47 PM (14 years ago)
Author:
steve
Message:

Added in minimum height

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/anuga_1d/dry_dam_sudi.py

    r5565 r5587  
    2222        # Calculate Analytical Solution at time t > 0
    2323        u3 = 2.0/3.0*(sqrt(g*h1)+x[i]/t)
    24         h3 = 4.0/(9.0*g)*(sqrt(g*h1)-x[i]/(2.0*t))*(sqrt(g*h1)-x[i]/(2.0*t))
     24        h3 = 4.0/(9.0*g)*(sqrt(g*h1)-x[i]/(2.0*t))*(sqrt(g*h1)-x[i]/(2.0*t))
     25        u3_ = 2.0/3.0*((x[i]+L/2.0)/t-sqrt(g*h1))
     26        h3_ = 1.0/(9.0*g)*((x[i]+L/2.0)/t+2*sqrt(g*h1))*((x[i]+L/2.0)/t+2*sqrt(g*h1))
    2527
    26         if ( x[i] <= -t*sqrt(g*h1) ):
     28        if ( x[i] <= -1*L/2.0+2*(-sqrt(g*h1)*t)):
     29            u[i] = 0.0
     30            h[i] = h0
     31        elif ( x[i] <= -1*L/2.0-(-sqrt(g*h1)*t)):
     32            u[i] = u3_
     33            h[i] = h3_
     34
     35        elif ( x[i] <= -t*sqrt(g*h1) ):
    2736            u[i] = 0.0
    2837            h[i] = h1
     
    5766
    5867L = 2000.0     # Length of channel (m)
    59 N = 100        # Number of compuational cells
     68N = 800        # Number of computational cells
    6069cell_len = L/N # Origin = 0.0
    6170
     
    8594yieldstep = 1.0
    8695L = 2000.0     # Length of channel (m)
    87 number_of_cells = [100]#,200,500,1000,2000,5000,10000,20000]
     96number_of_cells = [200]#,200,500,1000,2000,5000,10000,20000]
    8897h_error = zeros(len(number_of_cells),Float)
    8998uh_error = zeros(len(number_of_cells),Float)
     
    102111    domain.set_boundary({'exterior': Reflective_boundary(domain)})
    103112    domain.default_order = 2
    104     domain.default_time_order = 1
     113    domain.default_time_order = 2
    105114    domain.cfl = 1.0
    106     domain.limiter = "vanleer"
     115    domain.limiter = "minmod"
    107116
    108117    t0 = time.time()
    109118
    110119    for t in domain.evolve(yieldstep = yieldstep, finaltime = finaltime):
    111         pass
     120        domain.write_time()
    112121
    113122    N = float(N)
Note: See TracChangeset for help on using the changeset viewer.