Changeset 5173 for anuga_core/documentation/user_manual/demos/channel1.py
- Timestamp:
- Mar 18, 2008, 5:05:34 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/documentation/user_manual/demos/channel1.py
r3982 r5173 16 16 # Setup computational domain 17 17 #------------------------------------------------------------------------------ 18 length = 10. 19 width = 5. 20 dx = dy = 1 # Resolution: Length of subdivisions on both axes 18 points, vertices, boundary = rectangular_cross(10, 5, 19 len1=10.0, len2=5.0) # Mesh 21 20 22 points, vertices, boundary = rectangular_cross(int(length/dx), int(width/dy), 23 len1=length, len2=width) 24 25 domain = Domain(points, vertices, boundary) # Create domain 21 domain = Domain(points, vertices, boundary) # Create domain 26 22 domain.set_name('channel1') # Output name 27 23 … … 35 31 domain.set_quantity('elevation', topography) # Use function for elevation 36 32 domain.set_quantity('friction', 0.01) # Constant friction 37 domain.set_quantity('stage', 38 expression='elevation') # Dry 39 #domain.set_quantity('stage', 40 # expression='elevation + 0.1') # Wet 33 domain.set_quantity('stage', # Dry bed 34 expression='elevation + 0.0') 41 35 42 36 … … 54 48 #------------------------------------------------------------------------------ 55 49 for t in domain.evolve(yieldstep = 0.2, finaltime = 40.0): 56 domain.write_time()50 print domain.timestepping_statistics() 57 51 58 52
Note: See TracChangeset
for help on using the changeset viewer.