Changeset 5162 for anuga_work/development
- Timestamp:
- Mar 11, 2008, 8:43:22 PM (17 years ago)
- Location:
- anuga_work/development
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/analytical_solutions/oblique_shock.py
r5030 r5162 29 29 30 30 31 from shallow_water import Domain, Constant_height32 from shallow_water import Transmissive_boundary, Reflective_boundary,\31 from anuga.shallow_water import Domain 32 from anuga.shallow_water import Transmissive_boundary, Reflective_boundary,\ 33 33 Dirichlet_boundary 34 34 from anuga.visualiser import RealtimeVisualiser 35 35 from math import sqrt, cos, sin, pi 36 from mesh_factory import oblique 36 from mesh_factory import oblique_cross 37 37 38 38 … … 44 44 leny = 30. 45 45 lenx = 40. 46 n = 5047 m = 6046 n = 100 47 m = 120 48 48 49 points, elements, boundary = oblique (m, n, lenx, leny)49 points, elements, boundary = oblique_cross(m, n, lenx, leny) 50 50 domain = Domain(points, elements, boundary) 51 51 … … 54 54 55 55 # Store output 56 domain.store=True56 #domain.store=True 57 57 58 58 # Output format 59 domain.format="sww" #NET.CDF binary format59 #domain.format="sww" #NET.CDF binary format 60 60 # "dat" for ASCII 61 61 … … 87 87 #Initial condition 88 88 h = 0.5 89 domain.set_quantity('stage', Constant_height(x_slope, h))89 domain.set_quantity('stage', expression = 'elevation + %d'%h ) 90 90 91 #--------------------------------- 92 # Setup visualization 93 #--------------------------------- 94 vis = RealtimeVisualiser(domain) 95 vis.render_quantity_height("elevation", dynamic=False) 96 vis.render_quantity_height("stage", zScale=10, dynamic=True) 97 vis.colour_height_quantity('stage', (0.75, 0.5, 0.5)) 98 vis.start() 91 99 92 100 ###################### … … 96 104 for t in domain.evolve(yieldstep = 0.5, finaltime = 50): 97 105 domain.write_time() 106 vis.update() 98 107 99 108 print 'That took %.2f seconds' %(time.time()-t0) 109 110 111 vis.evolveFinished() 112 vis.join() 100 113 101 114 #FIXME: Compute average water depth on either side of shock and compare -
anuga_work/development/near_shore_PMD/run_beach.py
r5154 r5162 167 167 domain.set_boundary( {'wall': Br, 'wave': Bwp_velocity} ) 168 168 169 169 170 #------------------------------------------------------------------------- 170 171 # Evolve system through time … … 174 175 for t in domain.evolve(yieldstep, finaltime): 175 176 domain.write_time() 177 176 178 print 'That took %.2f seconds' %(time.time()-t0) 177 179 print 'finished'
Note: See TracChangeset
for help on using the changeset viewer.