Changeset 2155


Ignore:
Timestamp:
Dec 19, 2005, 4:34:15 PM (19 years ago)
Author:
ole
Message:

Simplified example

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/examples/bedslope.py

    r1853 r2155  
    1919domain = Domain(points, vertices, boundary)
    2020domain.smooth = False
    21 domain.visualise = True
     21domain.visualise = False
    2222domain.store = True
    2323domain.filename = 'bedslope'
     
    2525
    2626#######################
    27 #Bed-slope and friction
     27# Initial conditions
    2828domain.set_quantity('elevation', lambda x,y: -x/3)
    2929domain.set_quantity('friction', 0.1)
     30
     31h = 0.05  # Constant depth
     32domain.set_quantity('stage', expression = 'elevation + %f' %h)
    3033
    3134
     
    3942                   f=lambda t: [(0.1*sin(t*2*pi)), 0.0, 0.0])
    4043
     44
    4145domain.set_boundary({'left': Bd, 'right': Br, 'top': Br, 'bottom': Br})
     46#domain.set_boundary({'left': Bw, 'right': Br, 'top': Br, 'bottom': Br})
    4247
    4348
    4449######################
    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
    5051
    5152domain.check_integrity()
    5253
    53  
    54 ######################
    55 #Evolution
    56 for t in domain.evolve(yieldstep = 0.1, finaltime = 3.0):
     54for t in domain.evolve(yieldstep = 0.1, finaltime = 4.0):
    5755    domain.write_time()
    5856
    59 for t in domain.evolve(yieldstep = 0.01, finaltime = 4.0):
    60     domain.write_time()   
    6157
     58
Note: See TracChangeset for help on using the changeset viewer.