Ignore:
Timestamp:
Mar 18, 2008, 5:05:34 PM (16 years ago)
Author:
ole
Message:

Beautified demos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/documentation/user_manual/demos/channel1.py

    r3982 r5173  
    1616# Setup computational domain
    1717#------------------------------------------------------------------------------
    18 length = 10.
    19 width = 5.
    20 dx = dy = 1           # Resolution: Length of subdivisions on both axes
     18points, vertices, boundary = rectangular_cross(10, 5,
     19                                               len1=10.0, len2=5.0) # Mesh
    2120
    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
     21domain = Domain(points, vertices, boundary)  # Create domain
    2622domain.set_name('channel1')                  # Output name
    2723
     
    3531domain.set_quantity('elevation', topography) # Use function for elevation
    3632domain.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
     33domain.set_quantity('stage',                 # Dry bed
     34                    expression='elevation + 0.0') 
    4135
    4236
     
    5448#------------------------------------------------------------------------------
    5549for t in domain.evolve(yieldstep = 0.2, finaltime = 40.0):
    56     domain.write_time()
     50    print domain.timestepping_statistics()
    5751
    5852
Note: See TracChangeset for help on using the changeset viewer.