Ignore:
Timestamp:
Sep 1, 2012, 7:44:08 PM (13 years ago)
Author:
davies
Message:

Bugfixes for balanced_dev

Location:
trunk/anuga_work/development/gareth/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_work/development/gareth/tests/runup_sinusoid/runup_sinusoid.py

    r8547 r8549  
    3737
    3838def stagefun(x,y):
    39     stge=-0.2*scale_me # +0.01*(x>0.9)
     39    stge=-0.2*scale_me #+0.01*(x>0.9)
    4040    #topo=topography(x,y)
    4141    return stge#*(stge>topo) + (topo)*(stge<=topo)
     
    7272# Associate boundary tags with boundary objects
    7373#----------------------------------------------
    74 domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom':Br})
     74domain.set_boundary({'left': Br, 'right': Bd, 'top': Br, 'bottom':Br})
    7575
    7676#------------------------------
     
    7878#------------------------------
    7979
    80 for t in domain.evolve(yieldstep=0.2,finaltime=20.0):
     80for t in domain.evolve(yieldstep=0.2,finaltime=40.0):
    8181    print domain.timestepping_statistics()
    8282    xx = domain.quantities['xmomentum'].centroid_values
  • trunk/anuga_work/development/gareth/tests/shallow_steep_slope/channel_SU_sparse.py

    r8547 r8549  
    3030#------------------------------------------------------------------------------
    3131points, vertices, boundary = rectangular_cross(10, 10,
    32 len1=100.0, len2=100.0) # Mesh
     32                                len1=100.0, len2=100.0) # Mesh
    3333domain = Domain(points, vertices, boundary) # Create domain
    3434domain.set_name('channel_SU_2_v2') # Output name
    35 domain.set_store_vertices_uniquely(True)
    36 domain.CFL=1.0
     35#domain.set_store_vertices_uniquely(True)
     36#domain.CFL=1.0
    3737#------------------------------------------------------------------------------
    3838# Setup initial conditions
    3939#------------------------------------------------------------------------------
    4040def topography(x, y):
    41         return -x/10. + numpy.sin(x/10.) +abs(y-50.)/100. # linear bed slope
     41        return -x/10. #+ numpy.sin(x/10.) +abs(y-50.)/100. # linear bed slope
    4242
    4343def stagetopo(x,y):
     
    5353domain.set_quantity('friction', 0.03) # Constant friction
    5454domain.set_quantity('stage', stagetopo)
     55
    5556#------------------------------------------------------------------------------
    5657# Setup boundary conditions
     
    6970domain.set_boundary({'left': Br, 'right': Bo, 'top': Br, 'bottom': Br})
    7071
     72
     73myindex=((domain.centroid_coordinates[:,0] - 50.)**2 + (domain.centroid_coordinates[:,1] - 50.)**2).argmin()
     74
    7175#------------------------------------------------------------------------------
    7276# Evolve system through time
    7377#------------------------------------------------------------------------------
    7478for t in domain.evolve(yieldstep=4.0, finaltime=400.0):
    75         print domain.timestepping_statistics()
     79    print domain.timestepping_statistics()
     80    #print domain.quantities['stage'].centroid_values[myindex] - domain.quantities['elevation'].centroid_values[myindex]
     81    s3 = domain.get_flow_through_cross_section([[30., 0.0], [30., 100.]])
     82    s4 = domain.get_flow_through_cross_section([[32., 0.0], [32., 100.]])
     83    s5 = domain.get_flow_through_cross_section([[34., 0.0], [34., 100.]])
     84    s2 = domain.get_flow_through_cross_section([[45., 0.0], [45., 100.]])
     85    s1 = domain.get_flow_through_cross_section([[53., 0.0], [53., 100.]])
     86    s0 = domain.get_flow_through_cross_section([[60., 0.0], [60., 100.]])
     87    print 'Xsectional flow:', s0, s1, s2, s3, s4, s5
     88   
Note: See TracChangeset for help on using the changeset viewer.