Changeset 1635
- Timestamp:
- Jul 25, 2005, 11:18:06 AM (19 years ago)
- Location:
- inundation/ga/storm_surge
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/parallel/run_sw_lost_mass.py
r1631 r1635 20 20 # lose of conservation 21 21 # Set it to a larger value (say 0.1) and have 22 # conse vation "restored"22 # conservation "restored" 23 23 ############################################## 24 24 yieldstep = 0.005 25 yieldstep = 0.1 26 finaltime = 100.0 25 #yieldstep = 0.08 26 #yieldstep = 0.05 27 finaltime = 1000.0 27 28 28 29 import sys … … 52 53 53 54 class Set_Stage: 54 """Set an initial condition with constant water height, for x <x055 """Set an initial condition with constant water height, for x0<x<x1 55 56 """ 56 57 … … 110 111 111 112 for t in domain.evolve(yieldstep = yieldstep, finaltime = finaltime): 112 print 'Integral stage = ',domain.quantities['stage'].get_integral(),' Time = ',domain.time 113 #domain.write_time() 114 print ' Integral stage = ', domain.quantities['stage'].get_integral(),' Time = ',domain.time 113 115 114 116 -
inundation/ga/storm_surge/pyvolution/shallow_water.py
r1599 r1635 255 255 if self.visualiser is None: 256 256 from realtime_visualisation_new import Visualiser 257 from Numeric import array, Float 258 259 if rect is None: 260 rect = array(self.xy_extent, Float) 261 257 262 self.visualiser = Visualiser(self,scale_z,rect) 258 263 self.visualise = True … … 564 569 565 570 566 def dry(domain):567 """Protect against infinitesimal heights and associated high velocities568 at vertices569 """570 571 #FIXME: Experimental (from old version). Not in use at the moment572 573 #Shortcuts574 wv = domain.quantities['stage'].vertex_values575 zv = domain.quantities['elevation'].vertex_values576 xmomv = domain.quantities['xmomentum'].vertex_values577 ymomv = domain.quantities['ymomentum'].vertex_values578 hv = wv - zv #Water depths at vertices579 580 #Update581 for k in range(domain.number_of_elements):582 hmax = max(hv[k, :])583 584 if hmax < domain.minimum_allowed_height:585 #Control stage586 wv[k, :] = zv[k, :]587 588 #Control momentum589 xmomv[k,:] = ymomv[k,:] = 0.0571 # def dry(domain): 572 # """Protect against infinitesimal heights and associated high velocities 573 # at vertices 574 # """ 575 576 # #FIXME: Experimental (from old version). Not in use at the moment 577 578 # #Shortcuts 579 # wv = domain.quantities['stage'].vertex_values 580 # zv = domain.quantities['elevation'].vertex_values 581 # xmomv = domain.quantities['xmomentum'].vertex_values 582 # ymomv = domain.quantities['ymomentum'].vertex_values 583 # hv = wv - zv #Water depths at vertices 584 585 # #Update 586 # for k in range(domain.number_of_elements): 587 # hmax = max(hv[k, :]) 588 589 # if hmax < domain.minimum_allowed_height: 590 # #Control stage 591 # wv[k, :] = zv[k, :] 592 593 # #Control momentum 594 # xmomv[k,:] = ymomv[k,:] = 0.0 590 595 591 596
Note: See TracChangeset
for help on using the changeset viewer.