Changeset 5587 for anuga_work/development/anuga_1d/dam_h_sudi.py
 Timestamp:
 Jul 30, 2008, 5:03:47 PM (16 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

anuga_work/development/anuga_1d/dam_h_sudi.py
r5535 r5587 1 1 import os 2 2 from math import sqrt 3 from shallow_water_h import * 3 #from shallow_water_h import * 4 from shallow_water_domain import * 4 5 from Numeric import zeros, Float 5 6 from analytic_dam_sudi import AnalyticDam … … 31 32 32 33 L=2000.0 33 N= 10034 N=400 34 35 35 36 cell_len=L/N … … 41 42 domain=Domain(points) 42 43 43 domain.default_order = 144 domain.default_order = 2 44 45 domain.default_time_order = 1 45 #domain.cfl = 1.046 #domain.limiter = "minmod"46 domain.cfl = 1.0 47 domain.limiter = "vanleer" 47 48 48 49 49 50 50 51 52 53 54 51 def height(x): 55 52 y=zeros(len(x), Float) … … 63 60 return y 64 61 65 domain.set_quantity(' height', height)62 domain.set_quantity('stage',height) #('height', height) 66 63 domain.order=domain.default_order 67 64 print "domain order", domain.order … … 78 75 t0=time.time() 79 76 yieldstep=30.0 80 finaltime= 30.081 print "integral", domain.quantities[' height'].get_integral()77 finaltime=20.0 78 print "integral", domain.quantities['stage'].get_integral() #['height'].get_integral() 82 79 for t in domain.evolve(yieldstep=yieldstep, finaltime=finaltime): 83 80 domain.write_time() 84 print "integral", domain.quantities[' height'].get_integral()81 print "integral", domain.quantities['stage'].get_integral() #['height'].get_integral() 85 82 if t>0.0: 86 HeightQ=domain.quantities[' height'].vertex_values83 HeightQ=domain.quantities['stage'].vertex_values #['height'].vertex_values 87 84 MomentumQ=domain.quantities['xmomentum'].vertex_values 88 85 h, uh=analytical_sol(X.flat, domain.time)
Note: See TracChangeset
for help on using the changeset viewer.