Changeset 8359 for trunk/anuga_work/development/gareth/tests
- Timestamp:
- Mar 13, 2012, 3:46:12 PM (13 years ago)
- Location:
- trunk/anuga_work/development/gareth/tests
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_work/development/gareth/tests/channel_floodplain/plotme.py
r8355 r8359 4 4 5 5 # Time-index to plot outputs from 6 index= 11006 index=75 7 7 8 8 #p2 = util.get_output('channel_floodplain1_bal_dev.sww', minimum_allowed_height=0.01) -
trunk/anuga_work/development/gareth/tests/dam_break/plotme.py
r8355 r8359 9 9 p2_st=util.get_centroids(p_st) 10 10 11 p_dev = util.get_output('dam_break_201203 08_153245/dam_break.sww', 0.001)11 p_dev = util.get_output('dam_break_20120313_153101/dam_break.sww', 0.001) 12 12 p2_dev=util.get_centroids(p_dev, velocity_extrapolation=True) 13 13 -
trunk/anuga_work/development/gareth/tests/runup_sinusoid/runup_sinusoid.py
r8358 r8359 18 18 #Setup computational domain 19 19 #--------- 20 points, vertices, boundary = anuga.rectangular_cross(40,40 )20 points, vertices, boundary = anuga.rectangular_cross(40,40, len1=1., len2=1.) 21 21 22 22 domain=Domain(points,vertices,boundary) # Create Domain … … 25 25 domain.set_quantities_to_be_stored({'stage': 2, 'xmomentum': 2, 'ymomentum': 2, 'elevation': 1}) 26 26 #domain.set_store_vertices_uniquely(True) 27 domain.minimum_allowed_height=0.001 27 28 28 29 #------------------ … … 30 31 #------------------ 31 32 scale_me=1.0 33 34 #domain.minimum_allowed_height=domain.minimum_allowed_height*scale_me # Seems needed to make the algorithms behave 35 32 36 def topography(x,y): 33 37 return (-x/2.0 +0.05*numpy.sin((x+y)*50.0))*scale_me … … 67 71 # Associate boundary tags with boundary objects 68 72 #---------------------------------------------- 69 domain.set_boundary({'left': Br, 'right': B d, 'top': Br, 'bottom':Br})73 domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom':Br}) 70 74 71 75 #------------------------------ … … 75 79 for t in domain.evolve(yieldstep=0.1,finaltime=20.0): 76 80 print domain.timestepping_statistics() 81 xx = domain.quantities['xmomentum'].centroid_values 82 yy = domain.quantities['ymomentum'].centroid_values 83 dd = domain.quantities['stage'].centroid_values - domain.quantities['elevation'].centroid_values 84 dd = (dd)*(dd>1.0e-03)+1.0e-06 85 vv = ( (xx/dd)**2 + (yy/dd)**2 )**0.5 86 vv = vv*(dd>1.0e-03) 87 print 'Peak velocity is: ', vv.max(), vv.argmax() 77 88 78 89 print 'Finished' -
trunk/anuga_work/development/gareth/tests/shallow_steep_slope/channel_SU_sparse.py
r8354 r8359 57 57 58 58 Br = anuga.Reflective_boundary(domain) # Solid reflective wall 59 Bo= anuga.Dirichlet_boundary([-9.9369037,0.0,0]) # Outflow for steady uniform flow with a depth integrated velocity of 0.1 59 #Bo= anuga.Dirichlet_boundary([-9.9369037,0.0,0]) # Outflow for steady uniform flow with a depth integrated velocity of 0.1 60 61 def constant_water(t): 62 return -9.936903 63 64 #Bo= anuga.shallow_water.boundaries.Transmissive_n_momentum_zero_t_momentum_set_stage_boundary(domain, constant_water) # Outflow for steady uniform flow with a depth integrated velocity of 0.1 65 Bo = anuga.Transmissive_boundary(domain) 60 66 domain.set_boundary({'left': Br, 'right': Bo, 'top': Br, 'bottom': Br}) 61 67 #------------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.