Changeset 2155
- Timestamp:
- Dec 19, 2005, 4:34:15 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/examples/bedslope.py
r1853 r2155 19 19 domain = Domain(points, vertices, boundary) 20 20 domain.smooth = False 21 domain.visualise = True21 domain.visualise = False 22 22 domain.store = True 23 23 domain.filename = 'bedslope' … … 25 25 26 26 ####################### 27 # Bed-slope and friction27 # Initial conditions 28 28 domain.set_quantity('elevation', lambda x,y: -x/3) 29 29 domain.set_quantity('friction', 0.1) 30 31 h = 0.05 # Constant depth 32 domain.set_quantity('stage', expression = 'elevation + %f' %h) 30 33 31 34 … … 39 42 f=lambda t: [(0.1*sin(t*2*pi)), 0.0, 0.0]) 40 43 44 41 45 domain.set_boundary({'left': Bd, 'right': Br, 'top': Br, 'bottom': Br}) 46 #domain.set_boundary({'left': Bw, 'right': Br, 'top': Br, 'bottom': Br}) 42 47 43 48 44 49 ###################### 45 #Initial condition 46 h = 0.05 47 #h = 0.0 48 elevation = domain.quantities['elevation'].vertex_values 49 domain.set_quantity('stage', elevation + h) 50 #Evolution 50 51 51 52 domain.check_integrity() 52 53 53 54 ###################### 55 #Evolution 56 for t in domain.evolve(yieldstep = 0.1, finaltime = 3.0): 54 for t in domain.evolve(yieldstep = 0.1, finaltime = 4.0): 57 55 domain.write_time() 58 56 59 for t in domain.evolve(yieldstep = 0.01, finaltime = 4.0):60 domain.write_time()61 57 58
Note: See TracChangeset
for help on using the changeset viewer.