Changeset 8212 for trunk/anuga_validation/validation_tests/dam_break.py
- Timestamp:
- Sep 13, 2011, 1:44:23 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_validation/validation_tests/dam_break.py
r8156 r8212 8 8 # Import necessary modules 9 9 #------------------------------------------------------------------------------ 10 11 10 import sys 12 11 import anuga 13 14 12 from math import cos 15 13 from numpy import zeros, float … … 27 25 output_file = 'dam_break' 28 26 29 anuga.copy_code_files(output_dir,__file__)27 #anuga.copy_code_files(output_dir,__file__) 30 28 #start_screen_catcher(output_dir+'_') 31 29 … … 72 70 domain.set_quantity('friction', 0.0) 73 71 74 h0 = 10 .072 h0 = 10000.0 75 73 h1 = 1.0 76 74 … … 83 81 z[i] = h1 84 82 return z 83 domain.set_quantity('stage', height) 85 84 86 87 88 89 90 91 domain.set_quantity('stage', height)92 85 #----------------------------------------------------------------------------- 93 86 # Setup boundary conditions … … 98 91 Bd = anuga.Dirichlet_boundary([1,0.,0.]) # Constant boundary values 99 92 100 101 93 # Associate boundary tags with boundary objects 102 94 domain.set_boundary({'left': Bt, 'right': Bt, 'top': Br, 'bottom': Br}) … … 104 96 105 97 #=============================================================================== 106 from anuga.visualiser import RealtimeVisualiser107 vis = RealtimeVisualiser(domain)108 vis.render_quantity_height("stage", zScale =h0*500, dynamic=True)109 vis.colour_height_quantity('stage', (0.0, 0.5, 1.0))110 vis.start()98 ##from anuga.visualiser import RealtimeVisualiser 99 ##vis = RealtimeVisualiser(domain) 100 ##vis.render_quantity_height("stage", zScale =h0*500, dynamic=True) 101 ##vis.colour_height_quantity('stage', (0.0, 0.5, 1.0)) 102 ##vis.start() 111 103 #=============================================================================== 112 104 … … 115 107 # Evolve system through time 116 108 #------------------------------------------------------------------------------ 117 118 for t in domain.evolve(yieldstep = 100.0, finaltime = 60*60.): 109 for t in domain.evolve(yieldstep = 1.0, finaltime = 10*10.): 119 110 #print domain.timestepping_statistics(track_speeds=True) 120 111 print domain.timestepping_statistics() 121 vis.update()112 #vis.update() 122 113 123 114 124 115 #test against know data 125 116 126 vis.evolveFinished()117 #vis.evolveFinished() 127 118
Note: See TracChangeset
for help on using the changeset viewer.