Changeset 7086 for anuga_core/documentation/user_manual/demos/runup.py
- Timestamp:
- May 26, 2009, 11:33:53 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/documentation/user_manual/demos/runup.py
r7064 r7086 29 29 # Setup initial conditions 30 30 #------------------------------------------------------------------------------ 31 def topography(x, y):31 def topography(x, y): 32 32 return -x/2 # linear bed slope 33 33 #return x*(-(2.0-x)*.5) # curved bed slope … … 35 35 domain.set_quantity('elevation', topography) # Use function for elevation 36 36 domain.set_quantity('friction', 0.1) # Constant friction 37 domain.set_quantity('stage', - .4)# Constant negative initial stage37 domain.set_quantity('stage', -0.4) # Constant negative initial stage 38 38 39 39 #------------------------------------------------------------------------------ … … 44 44 Bd = Dirichlet_boundary([-0.2,0.,0.]) # Constant boundary values 45 45 Bw = Time_boundary(domain=domain, # Time dependent boundary 46 f=lambda t: [( .1*sin(t*2*pi)-0.3) *exp(-t), 0.0, 0.0])46 f=lambda t: [(0.1*sin(t*2*pi)-0.3)*exp(-t), 0.0, 0.0]) 47 47 48 48 # Associate boundary tags with boundary objects … … 52 52 # Evolve system through time 53 53 #------------------------------------------------------------------------------ 54 for t in domain.evolve(yieldstep = 0.1, finaltime =10.0):54 for t in domain.evolve(yieldstep=0.1, finaltime=10.0): 55 55 print domain.timestepping_statistics()
Note: See TracChangeset
for help on using the changeset viewer.