Changeset 5568


Ignore:
Timestamp:
Jul 24, 2008, 4:05:04 PM (16 years ago)
Author:
sexton
Message:

incorporated definitions from web and Synolakis paper

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/landslide_4/benchmark_problem4.py

    r5567 r5568  
    3030#interior_regions = [[project_slide.poly_syd1, local_res],
    3131#                    [project_slide.poly_coast, coast_res]]
    32 length = 10.
    33 width = 10.
    34 depth = 10.
    35 bounding_polygon = [[0,width],[0,0],[length,0],[length,width]]
     32length = 104.
     33width = 3.7
     34
     35bounding_polygon = [[0,0],[length,0],[length,width],[0,width]]
    3636meshname = 'slide.msh'
     37remainder_res = 1.
     38
    3739from caching import cache
    3840_ = cache(create_mesh_from_regions,
    3941          bounding_polygon,
    40            {'boundary_tags': {'top': [0], 'left': [1],
    41                               'bottom': [2], 'right': [3]},
     42           {'boundary_tags': {'bottom': [0], 'right': [1],
     43                              'top': [2], 'left': [3]},
    4244           'maximum_triangle_area': remainder_res,
    4345           'filename': meshname},
     
    6365#-------------------------------------------------------------------------------
    6466from math import tan
     67depth = 4.6
     68b = 9.144 # from Synolakis paper
    6569def topography(x,y):
    66     z = -depth + tan(0.5)*x
     70    z = []
     71    for xi in x:
     72        if xi < b:
     73            z.append(-xi/2.)
     74        else:
     75            z.append(-depth)
     76        #print 'hello', xi,b, z
    6777    return z
    6878domain.set_quantity('stage', 0.0)
     
    7888#-------------------------------------------------------------------------------
    7989from smf import slide_tsunami
     90from math import atan, degrees
    8091
    81 tsunami_source = slide_tsunami(length=2.,
    82                                width=1.,
    83                                depth=1.,
    84                                slope=45,
    85                                thickness=0.1,
    86                                x0=length/2,
     92a = .4572 # from Synolakis paper
     93tsunami_source = slide_tsunami(length=0.91,
     94                               width=0.61,
     95                               depth=.1, # delta from Synolakis paper
     96                               slope=degrees(atan(0.5)),
     97                               thickness=a,
     98                               x0=0.75,
    8799                               y0=width/2,
    88100                               alpha=0.,
    89                                         #dx=0.001,
    90                                domain=domain)
    91                                #verbose=True)
     101                              #dx=0.001,
     102                               domain=domain,
     103                               verbose=True)
    92104
    93105#-------------------------------------------------------------------------------                                 
     
    97109
    98110Br = Reflective_boundary(domain)
    99 Bd = Dirichlet_boundary([tide,0,0])
     111Bd = Dirichlet_boundary([0,0,0])
    100112
    101 domain.set_boundary( {'e0': Bd,  'e1': Bd, 'e2': Bd, 'e3': Bd} )
     113domain.set_boundary( {'top': Bd,  'bottom': Bd, 'right': Bd, 'left': Bd} )
    102114
    103115
     
    111123t0 = time.time()
    112124
    113 for t in domain.evolve(yieldstep = 1, finaltime = 10):
     125for t in domain.evolve(yieldstep = 1, finaltime = 500):
    114126    domain.write_time()
    115127    stagestep = domain.get_quantity('stage')
Note: See TracChangeset for help on using the changeset viewer.