- Timestamp:
- Dec 6, 2006, 5:35:00 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/newcastle_2006/run_newcastle_slide.py
r4058 r4063 2 2 3 3 Source data such as elevation and boundary data is assumed to be available in 4 directories specified by project .py5 The output sww file is stored in project .outputtimedir4 directories specified by project_slide.py 5 The output sww file is stored in project_slide.outputtimedir 6 6 7 The scenario is defined by a triangular mesh created from project .polygon,7 The scenario is defined by a triangular mesh created from project_slide.polygon, 8 8 the elevation data and a tsunami wave generated by s submarine mass failure. 9 9 … … 38 38 39 39 # creates copy of code in output dir 40 copy_code_files(project .outputtimedir,__file__,dirname(project.__file__)+sep+ project.__name__+'.py' )40 copy_code_files(project_slide.outputtimedir,__file__,dirname(project_slide.__file__)+sep+ project_slide.__name__+'.py' ) 41 41 myid = 0 42 42 numprocs = 1 43 start_screen_catcher(project .outputtimedir, myid, numprocs)43 start_screen_catcher(project_slide.outputtimedir, myid, numprocs) 44 44 45 print 'USER: ', project .user45 print 'USER: ', project_slide.user 46 46 47 47 #------------------------------------------------------------------------------- … … 79 79 print 'add' 80 80 G = G11.clip(Geospatial_data(project_slide.poly_surveyclip)) +\ 81 G12.clip(Geospatial_data(project_slide.polyAll)) 82 (G4.clip(Geospatial_data(project_slide.polyAll)) ).clip_outside(Geospatial_data(project_slide.poly_surveyclip))81 G12.clip(Geospatial_data(project_slide.polyAll)) +\ 82 (G4.clip(Geospatial_data(project_slide.polyAll)).clip_outside(Geospatial_data(project_slide.poly_surveyclip))) 83 83 print 'export points' 84 84 G.export_points_file(project_slide.combined_dem_name + '.pts') … … 88 88 #---------------------------------------------------------------------------- 89 89 # Create the triangular mesh based on overall clipping polygon with a tagged 90 # boundary and interior regions defined in project .py along with90 # boundary and interior regions defined in project_slide.py along with 91 91 # resolutions (maximal area of per triangle) for each polygon 92 92 #------------------------------------------------------------------------------- … … 94 94 from anuga.pmesh.mesh_interface import create_mesh_from_regions 95 95 remainder_res = 500000 96 local_res = 25000 97 newcastle_res = 5000 98 coast_res = 500 99 interior_regions = [[project.poly_newcastle1, local_res], 100 [project.poly_newcastle2, newcastle_res], 101 [project.poly_newcastle3, coast_res]] 96 local_res = 50000 97 newcastle_res = 1000 98 interior_regions = [[project_slide.poly_local, local_res], 99 [project_slide.poly_newcastle, newcastle_res]] 102 100 103 101 from caching import cache 104 102 _ = cache(create_mesh_from_regions, 105 project .polyAll,103 project_slide.polyAll, 106 104 {'boundary_tags': {'e0': [0], 'e1': [1], 'e2': [2], 107 'e3': [3], 'e4':[4], 'e5': [5], 108 'e6': [6]}, 105 'e3': [3], 'e4':[4]}, 109 106 'maximum_triangle_area': remainder_res, 110 107 'filename': meshname, … … 122 119 print domain.statistics() 123 120 124 domain.set_name(project .basename)125 domain.set_datadir(project .outputtimedir)121 domain.set_name(project_slide.basename) 122 domain.set_datadir(project_slide.outputtimedir) 126 123 domain.set_quantities_to_be_stored(['stage', 'xmomentum', 'ymomentum']) 127 124 domain.set_minimum_storable_height(0.01) … … 135 132 domain.set_quantity('friction', 0.0) 136 133 domain.set_quantity('elevation', 137 filename = project .combined_dem_name + '.pts',134 filename = project_slide.combined_dem_name + '.pts', 138 135 use_cache = True, 139 136 verbose = True, … … 146 143 from smf import slide_tsunami 147 144 148 tsunami_source = slide_tsunami(length=30000.0, 149 depth=400.0, 150 slope=6.0, 151 thickness=176.0, 152 radius=3330, 153 dphi=0.23, 154 x0=project.slump_origin[0], 155 y0=project.slump_origin[1], 156 alpha=0.0, 145 tsunami_source = slide_tsunami(length=project_slide.bulli_length, 146 width=project_slide.bulli_width, 147 depth=project_slide.bulli_depth, 148 slope=project_slide.bulli_slope, 149 thickness=project_slide.bulli_thickness, 150 x0=project_slide.slide_origin_c[0], 151 y0=project_slide.slide_origin_c[1], 152 alpha=project_slide.bulli_alpha, 157 153 domain=domain) 158 154 … … 165 161 Bd = Dirichlet_boundary([tide,0,0]) 166 162 167 domain.set_boundary( {'e0': Bd, 'e1': Bd, 'e2': Bd, 'e3': Bd, 'e4': Bd, 168 'e5': Bd, 'e6': Bd} ) 163 domain.set_boundary( {'e0': Bd, 'e1': Bd, 'e2': Bd, 'e3': Bd, 'e4': Bd} ) 169 164 170 165
Note: See TracChangeset
for help on using the changeset viewer.