Ignore:
Timestamp:
Apr 27, 2006, 11:10:38 AM (19 years ago)
Author:
nick
Message:

small changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/examples/bedslope.py

    r2619 r2772  
    11"""Simple example of shallow water wave equation using Pyvolution
    22
    3 Water driven by linear slope and Dirichlet boundary
     3Water driven up a linear slope with a time varying boundary,
     4similar to beach environment
    45
    56"""
     
    1213
    1314#Create basic triangular mesh
    14 points, vertices, boundary = rectangular(2, 1)
     15points, vertices, boundary = rectangular(10, 10)
    1516
    1617#Create shallow water domain
     
    3031domain.set_quantity('friction', 0.1)
    3132
    32 h = 0.05  # Constant depth
    33 domain.set_quantity('stage', expression = 'elevation + %f' %h)
     33h = 0.00               # Constant depth over elevation
     34domain.set_quantity('stage', -.4)
    3435
    3536
     
    4142Bd = Dirichlet_boundary([0.2,0.,0.])
    4243Bw = Time_boundary(domain=domain,
    43                    f=lambda t: [(0.1*sin(t*2*pi)), 0.0, 0.0])
     44                   f=lambda t: [(0.1*sin(t*2*pi)-0.3), 0.0, 0.0])
    4445
    4546
    4647print 'Tags are ', domain.get_boundary_tags()
    4748
    48 domain.set_boundary({'left': Bd, 'right': Br, 'top': Br, 'bottom': Br})
    49 #domain.set_boundary({'left': Bw, 'right': Br, 'top': Br, 'bottom': Br})
     49domain.set_boundary({'left': Br, 'right': Bw, 'top': Br, 'bottom': Br})
    5050
    5151
     
    5454domain.check_integrity()
    5555
    56 for t in domain.evolve(yieldstep = 0.1, finaltime = 0.2):
     56for t in domain.evolve(yieldstep = 0.1, finaltime = 4.0):
    5757    domain.write_time()
    5858
Note: See TracChangeset for help on using the changeset viewer.