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/test_shallow_water.py

    r5563 r5587  
    5050        zr = 0.0
    5151
     52        #This assumes h0 = 1.0e-3!!
    5253        edgeflux, maxspeed = flux_function(normal, ql,qr,zl,zr)
    53 
    54         assert allclose(array([2.0, 8.9],Float), edgeflux)
    55         assert allclose(5.1304951685, maxspeed)
     54        #print maxspeed
     55        #print edgeflux
     56       
     57        assert allclose(array([1.998002, 8.89201198],Float), edgeflux)
     58        assert allclose(5.1284971665, maxspeed)
    5659
    5760        normal = -1.0
     
    6366        edgeflux, maxspeed = flux_function(normal, ql,qr,zl,zr)
    6467
    65         assert allclose(array([-2.0, -8.9],Float), edgeflux)
    66         assert allclose(5.1304951685, maxspeed)
     68
     69        #print maxspeed
     70        #print edgeflux       
     71       
     72        assert allclose(array([-1.998002, -8.89201198],Float), edgeflux)
     73        assert allclose(5.1284971665, maxspeed)
    6774
    6875    def test_domain_flux_function(self):
     
    231238    """
    232239
    233     from config import g, epsilon
     240    from config import g, epsilon, h0
    234241    from math import sqrt
    235242    from Numeric import array
     
    256263        h_left = 0.0
    257264    else:
    258         u_left  = uh_left/h_left
    259 
     265        u_left  = uh_left/(h_left +  h0/h_left)
     266
     267
     268    uh_left = u_left*h_left
    260269
    261270    w_right  = q_right[0]  #w=h+z
     
    268277        h_right = 0.0
    269278    else:
    270         u_right  = uh_right/h_right
    271 
     279        u_right  = uh_right/(h_right + h0/h_right)
     280
     281    uh_right = u_right*h_right
     282   
    272283    #vh_left  = q_left[2]
    273284    #vh_right = q_right[2]
Note: See TracChangeset for help on using the changeset viewer.