Changeset 8353 for trunk/anuga_work/development/gareth/tests/channel_floodplain/channel_floodplain1.py
- Timestamp:
- Mar 7, 2012, 9:49:06 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_work/development/gareth/tests/channel_floodplain/channel_floodplain1.py
r8309 r8353 10 10 import numpy 11 11 from anuga.structures.inlet_operator import Inlet_operator 12 12 from anuga import * 13 #from swb_domain import domain 13 14 #from anuga import * 14 15 #from balanced_basic import * … … 23 24 floodplain_width = 14.0 # Model domain width 24 25 floodplain_slope = 1./300. 25 chan_initial_depth = 0. 8# Initial depth of water in the channel26 chan_initial_depth = 0.65 # Initial depth of water in the channel 26 27 chan_bankfull_depth = 1.0 # Bankfull depth of the channel 27 28 chan_width = 10.0 # Bankfull width of the channel 28 29 bankwidth = 2. # Width of the bank regions -- note that these protrude into the channel 29 30 man_n=0.03 # Manning's n 30 l0 = 2.009# Length scale associated with triangle side length in channel (min_triangle area = 0.5*l0^2)31 l0 = 1.000 # Length scale associated with triangle side length in channel (min_triangle area = 0.5*l0^2) 31 32 32 33 assert chan_width < floodplain_width, \ … … 81 82 82 83 83 domain.set_name('channel_floodplain1_test') # Output name 84 domain.extrapolate_velocity_second_order=True 84 domain.set_name('channel_floodplain1_bal_dev_lowvisc') # Output name 85 #domain.set_store_vertices_uniquely(True) 86 #domain.use_edge_limiter=False 87 #domain.extrapolate_velocity_second_order=False 85 88 #------------------------------------------------------------------------------ 86 89 # … … 139 142 140 143 # Define inlet operator 144 flow_in_yval=100.0 141 145 if True: 142 line1 = [ [floodplain_width/2. - chan_width/2., 0.],\143 [floodplain_width/2. + chan_width/2., 0.] \146 line1 = [ [floodplain_width/2. - chan_width/2., flow_in_yval],\ 147 [floodplain_width/2. + chan_width/2., flow_in_yval] \ 144 148 ] 145 149 Qin = 0.5*(floodplain_slope*(chan_width*chan_initial_depth)**2.*man_n**(-2.)\ … … 191 195 Br = anuga.Reflective_boundary(domain) # Solid reflective wall 192 196 Bt = anuga.Transmissive_boundary(domain) # Transmissive boundary 193 #Bout_sub = anuga.Dirichlet_boundary( \ 194 # [-floodplain_length*floodplain_slope - chan_bankfull_depth + \ 195 # chan_initial_depth, 0., 0.]) #An outflow boundary for subcritical steady flow 197 198 199 Bout_sub = anuga.Dirichlet_boundary( \ 200 [-floodplain_length*floodplain_slope - chan_bankfull_depth + \ 201 chan_initial_depth, 0., 0.]) #An outflow boundary for subcritical steady flow 196 202 197 203 def outflow_stage_boundary(t): … … 226 232 #------------------------------------------------------------------------------ 227 233 228 for t in domain.evolve(yieldstep= 1.0, finaltime=800.0):234 for t in domain.evolve(yieldstep=2.0, finaltime=3200.0): 229 235 print domain.timestepping_statistics() 236 xx=domain.quantities['ymomentum'].centroid_values 237 dd=(domain.quantities['stage'].centroid_values - domain.quantities['elevation'].centroid_values) 238 dd=dd*(dd>0.) 239 240 tmp = xx/(dd+1.0e-06)*(dd>0.0) 241 print tmp.max(), tmp.argmax(), tmp.min(), tmp.argmin() 242 243 # Compute flow through cross-section -- check that the inflow boundary condition is doing its job 244 # This also provides another useful steady-state check 245 if( numpy.floor(t/100.) == t/100. ): 246 print '#### COMPUTING FLOW THROUGH CROSS-SECTIONS########' 247 s1 = domain.get_flow_through_cross_section([[0., floodplain_length-300.0], [floodplain_width, floodplain_length-300.0]]) 248 s2 = domain.get_flow_through_cross_section([[0., floodplain_length-1.0], [floodplain_width, floodplain_length-1.0]]) 249 250 print 'Cross sectional flows: ', s1, s2 251 print '$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$' 252 253 #vv = domain.get_flow_through_cross_section 230 254 #print domain.quantities['ymomentum'].get_integral() 231 255 #print 'Qin = ', Qin
Note: See TracChangeset
for help on using the changeset viewer.