Changeset 5568
- Timestamp:
- Jul 24, 2008, 4:05:04 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/landslide_4/benchmark_problem4.py
r5567 r5568 30 30 #interior_regions = [[project_slide.poly_syd1, local_res], 31 31 # [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]]32 length = 104. 33 width = 3.7 34 35 bounding_polygon = [[0,0],[length,0],[length,width],[0,width]] 36 36 meshname = 'slide.msh' 37 remainder_res = 1. 38 37 39 from caching import cache 38 40 _ = cache(create_mesh_from_regions, 39 41 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]}, 42 44 'maximum_triangle_area': remainder_res, 43 45 'filename': meshname}, … … 63 65 #------------------------------------------------------------------------------- 64 66 from math import tan 67 depth = 4.6 68 b = 9.144 # from Synolakis paper 65 69 def 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 67 77 return z 68 78 domain.set_quantity('stage', 0.0) … … 78 88 #------------------------------------------------------------------------------- 79 89 from smf import slide_tsunami 90 from math import atan, degrees 80 91 81 tsunami_source = slide_tsunami(length=2., 82 width=1., 83 depth=1., 84 slope=45, 85 thickness=0.1, 86 x0=length/2, 92 a = .4572 # from Synolakis paper 93 tsunami_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, 87 99 y0=width/2, 88 100 alpha=0., 89 90 domain=domain )91 #verbose=True)101 #dx=0.001, 102 domain=domain, 103 verbose=True) 92 104 93 105 #------------------------------------------------------------------------------- … … 97 109 98 110 Br = Reflective_boundary(domain) 99 Bd = Dirichlet_boundary([ tide,0,0])111 Bd = Dirichlet_boundary([0,0,0]) 100 112 101 domain.set_boundary( {' e0': Bd, 'e1': Bd, 'e2': Bd, 'e3': Bd} )113 domain.set_boundary( {'top': Bd, 'bottom': Bd, 'right': Bd, 'left': Bd} ) 102 114 103 115 … … 111 123 t0 = time.time() 112 124 113 for t in domain.evolve(yieldstep = 1, finaltime = 10):125 for t in domain.evolve(yieldstep = 1, finaltime = 500): 114 126 domain.write_time() 115 127 stagestep = domain.get_quantity('stage')
Note: See TracChangeset
for help on using the changeset viewer.