Changeset 3486


Ignore:
Timestamp:
Aug 11, 2006, 8:30:52 PM (18 years ago)
Author:
ole
Message:

Attempt to make runup example more interesting and also using the symmetric mesh generated by rectangular_cross

File:
1 edited

Legend:

Unmodified
Added
Removed
  • documentation/user_manual/examples/runup.py

    r3275 r3486  
    1010#------------------------------------------------------------------------------
    1111
    12 from pyvolution.mesh_factory import rectangular
     12from pyvolution.mesh_factory import rectangular_cross
    1313from pyvolution.shallow_water import Domain
    1414from pyvolution.shallow_water import Reflective_boundary
     
    2222#------------------------------------------------------------------------------
    2323
    24 points, vertices, boundary = rectangular(10, 10) # Basic mesh
     24points, vertices, boundary = rectangular_cross(10, 10) # Basic mesh
    2525
    2626domain = Domain(points, vertices, boundary) # Create domain
    27 domain.set_name('bedslope')                 # Output to bedslope.sww
     27domain.set_name('runup')                    # Output to bedslope.sww
    2828domain.set_datadir('.')                     # Use current directory for output
    29 domain.set_quantities_to_be_stored(['stage',# Store all conserved quantities
    30                                     'xmomentum',
    31                                     'ymomentum'])   
     29#domain.set_quantities_to_be_stored(['stage',# Store all conserved quantities
     30#                                    'xmomentum',
     31#                                    'ymomentum'])   
    3232
    3333
     
    5252Br = Reflective_boundary(domain)      # Solid reflective wall
    5353Bt = Transmissive_boundary(domain)    # Continue all values on boundary
    54 Bd = Dirichlet_boundary([-0.5,0.,0.]) # Constant boundary values
     54Bd = Dirichlet_boundary([-0.2,0.,0.]) # Constant boundary values
    5555Bw = Time_boundary(domain=domain,     # Time dependent boundary 
    56                    f=lambda t: [(1.*sin(t*2*pi)-0.3), 0.0, 0.0])
     56                   f=lambda t: [(.1*sin(t*2*pi)-0.3), 0.0, 0.0])
    5757
    5858# Associate boundary tags with boundary objects
     
    6464#------------------------------------------------------------------------------
    6565
    66 for t in domain.evolve(yieldstep = 0.1, finaltime = 4.0):
     66for t in domain.evolve(yieldstep = 0.1, finaltime = 10.0):
    6767    domain.write_time()
    6868   
Note: See TracChangeset for help on using the changeset viewer.