Ignore:
Timestamp:
Jun 14, 2012, 12:31:32 AM (13 years ago)
Author:
davies
Message:

bal_dev: Updates

File:
1 edited

Legend:

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

    r8353 r8446  
    6767#------------------------------
    6868
    69 #xwrite=open("xvel.out","wb")
    70 #ywrite=open("yvel.out","wb")
    71 ## Set print options to be compatible with file writing via the 'print' statement
    72 #numpy.set_printoptions(threshold=numpy.nan, linewidth=numpy.nan)
    73 
    74 for t in domain.evolve(yieldstep=0.2,finaltime=30.0):
     69for t in domain.evolve(yieldstep=0.2,finaltime=60.0):
    7570    print domain.timestepping_statistics()
    76 
     71    uh=domain.quantities['xmomentum'].centroid_values
     72    vh=domain.quantities['ymomentum'].centroid_values
     73    depth=domain.quantities['stage'].centroid_values - domain.quantities['elevation'].centroid_values
     74    depth=depth*(depth>1.0e-06) + 1.0e-06
     75    vel=((uh/depth)**2 + (vh/depth)**2)**0.5
     76    print 'peak speed is', vel.max()
    7777
    7878print 'Finished'
Note: See TracChangeset for help on using the changeset viewer.