- Timestamp:
- Jul 10, 2014, 5:42:24 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_work/development/gareth/tests/runup_sinusoid/runup_sinusoid.py
r9200 r9257 9 9 10 10 from math import sin, pi, exp 11 #from anuga.shallow_water.shallow_water_domain import Domain as Domain12 #from anuga.shallow_water_balanced2.swb2_domain import Domain as Domain13 #path.append('/home/gareth/storage/anuga_clean/anuga_jan12/trunk/anuga_work/development/gareth/balanced_basic')14 #from swb2_domain import *15 #from balanced_basic import *16 #from balanced_dev import *17 11 from anuga import Domain as Domain 18 #from bal_and import * 19 #from anuga_tsunami import * 12 from anuga.operators.boundary_flux_integral_operator import boundary_flux_integral_operator 20 13 21 14 #--------- … … 27 20 domain.set_name('runup_sinusoid_v2') # Output to file runup.sww 28 21 #domain.set_store_centroids(True) 29 #domain.set_timestepping_method('euler')30 #domain.set_flow_algorithm('DE1')31 #domain.set_flow_algorithm('tsunami')32 22 domain.set_flow_algorithm('DE0') 33 23 domain.set_quantities_to_be_stored({'stage': 2, 'xmomentum': 2, 34 24 'ymomentum': 2, 'elevation': 2}) 35 #domain.minimum_storable_height=1.0e-0336 25 domain.set_store_vertices_uniquely() 37 26 #------------------ … … 70 59 71 60 print '#-#', domain.minimum_allowed_height 72 #domain.minimum_allowed_height=0.00173 #def frict_change(x,y):74 # return 0.2*(x>0.5)+0.1*(x<=0.5)75 #76 #domain.set_quantity('friction',frict_change)77 61 78 62 domain.set_quantity('stage', stagefun) # Constant negative initial stage … … 108 92 #Evolve the system through time 109 93 #------------------------------ 110 111 94 for t in domain.evolve(yieldstep=tstep,finaltime=lasttime): 112 95 #for t in domain.evolve(yieldstep=0.2,finaltime=60.): … … 121 104 vv = vv*(dd>1.0e-03) 122 105 print 'Peak velocity is: ', vv.max(), vv.argmax(), dd[vv.argmax()] 123 print 'Volume is', sum(dd_raw*domain.areas) 106 vol=sum(dd_raw*domain.areas) 107 print 'Volume is', vol 108 flux_integral=domain.get_boundary_flux_integral() 109 print 'Flux integral is: ', flux_integral 110 print 'Their difference is:', vol-flux_integral 124 111 #print 'Volume less flux int', sum(dd_raw*domain.areas) - domain.boundary_flux_integral 125 112 126 113 127 114 vel_final_inds=(vv>1.0e-01).nonzero()
Note: See TracChangeset
for help on using the changeset viewer.