Changeset 8549 for trunk/anuga_work/development/gareth/tests
- Timestamp:
- Sep 1, 2012, 7:44:08 PM (13 years ago)
- 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 37 37 38 38 def stagefun(x,y): 39 stge=-0.2*scale_me # 39 stge=-0.2*scale_me #+0.01*(x>0.9) 40 40 #topo=topography(x,y) 41 41 return stge#*(stge>topo) + (topo)*(stge<=topo) … … 72 72 # Associate boundary tags with boundary objects 73 73 #---------------------------------------------- 74 domain.set_boundary({'left': Br, 'right': B r, 'top': Br, 'bottom':Br})74 domain.set_boundary({'left': Br, 'right': Bd, 'top': Br, 'bottom':Br}) 75 75 76 76 #------------------------------ … … 78 78 #------------------------------ 79 79 80 for t in domain.evolve(yieldstep=0.2,finaltime= 20.0):80 for t in domain.evolve(yieldstep=0.2,finaltime=40.0): 81 81 print domain.timestepping_statistics() 82 82 xx = domain.quantities['xmomentum'].centroid_values -
trunk/anuga_work/development/gareth/tests/shallow_steep_slope/channel_SU_sparse.py
r8547 r8549 30 30 #------------------------------------------------------------------------------ 31 31 points, vertices, boundary = rectangular_cross(10, 10, 32 len1=100.0, len2=100.0) # Mesh32 len1=100.0, len2=100.0) # Mesh 33 33 domain = Domain(points, vertices, boundary) # Create domain 34 34 domain.set_name('channel_SU_2_v2') # Output name 35 domain.set_store_vertices_uniquely(True)36 domain.CFL=1.035 #domain.set_store_vertices_uniquely(True) 36 #domain.CFL=1.0 37 37 #------------------------------------------------------------------------------ 38 38 # Setup initial conditions 39 39 #------------------------------------------------------------------------------ 40 40 def topography(x, y): 41 return -x/10. + numpy.sin(x/10.) +abs(y-50.)/100. # linear bed slope41 return -x/10. #+ numpy.sin(x/10.) +abs(y-50.)/100. # linear bed slope 42 42 43 43 def stagetopo(x,y): … … 53 53 domain.set_quantity('friction', 0.03) # Constant friction 54 54 domain.set_quantity('stage', stagetopo) 55 55 56 #------------------------------------------------------------------------------ 56 57 # Setup boundary conditions … … 69 70 domain.set_boundary({'left': Br, 'right': Bo, 'top': Br, 'bottom': Br}) 70 71 72 73 myindex=((domain.centroid_coordinates[:,0] - 50.)**2 + (domain.centroid_coordinates[:,1] - 50.)**2).argmin() 74 71 75 #------------------------------------------------------------------------------ 72 76 # Evolve system through time 73 77 #------------------------------------------------------------------------------ 74 78 for 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.