Ignore:
Timestamp:
Dec 6, 2006, 5:35:00 PM (17 years ago)
Author:
sexton
Message:

updates for nsw slide modelling and cairns demo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/newcastle_2006/run_newcastle_slide.py

    r4058 r4063  
    22
    33Source data such as elevation and boundary data is assumed to be available in
    4 directories specified by project.py
    5 The output sww file is stored in project.outputtimedir
     4directories specified by project_slide.py
     5The output sww file is stored in project_slide.outputtimedir
    66
    7 The scenario is defined by a triangular mesh created from project.polygon,
     7The scenario is defined by a triangular mesh created from project_slide.polygon,
    88the elevation data and a tsunami wave generated by s submarine mass failure.
    99
     
    3838
    3939# creates copy of code in output dir
    40 copy_code_files(project.outputtimedir,__file__,dirname(project.__file__)+sep+ project.__name__+'.py' )
     40copy_code_files(project_slide.outputtimedir,__file__,dirname(project_slide.__file__)+sep+ project_slide.__name__+'.py' )
    4141myid = 0
    4242numprocs = 1
    43 start_screen_catcher(project.outputtimedir, myid, numprocs)
     43start_screen_catcher(project_slide.outputtimedir, myid, numprocs)
    4444
    45 print 'USER:    ', project.user
     45print 'USER:    ', project_slide.user
    4646
    4747#-------------------------------------------------------------------------------
     
    7979print 'add'
    8080G = 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)))
    8383print 'export points'
    8484G.export_points_file(project_slide.combined_dem_name + '.pts')
     
    8888#----------------------------------------------------------------------------
    8989# Create the triangular mesh based on overall clipping polygon with a tagged
    90 # boundary and interior regions defined in project.py along with
     90# boundary and interior regions defined in project_slide.py along with
    9191# resolutions (maximal area of per triangle) for each polygon
    9292#-------------------------------------------------------------------------------
     
    9494from anuga.pmesh.mesh_interface import create_mesh_from_regions
    9595remainder_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]]
     96local_res = 50000
     97newcastle_res = 1000
     98interior_regions = [[project_slide.poly_local, local_res],
     99                    [project_slide.poly_newcastle, newcastle_res]]
    102100
    103101from caching import cache
    104102_ = cache(create_mesh_from_regions,
    105           project.polyAll,
     103          project_slide.polyAll,
    106104           {'boundary_tags': {'e0': [0], 'e1': [1], 'e2': [2],
    107                               'e3': [3], 'e4':[4], 'e5': [5],
    108                               'e6': [6]},
     105                              'e3': [3], 'e4':[4]},
    109106           'maximum_triangle_area': remainder_res,
    110107           'filename': meshname,
     
    122119print domain.statistics()
    123120
    124 domain.set_name(project.basename)
    125 domain.set_datadir(project.outputtimedir)
     121domain.set_name(project_slide.basename)
     122domain.set_datadir(project_slide.outputtimedir)
    126123domain.set_quantities_to_be_stored(['stage', 'xmomentum', 'ymomentum'])
    127124domain.set_minimum_storable_height(0.01)
     
    135132domain.set_quantity('friction', 0.0)
    136133domain.set_quantity('elevation',
    137                     filename = project.combined_dem_name + '.pts',
     134                    filename = project_slide.combined_dem_name + '.pts',
    138135                    use_cache = True,
    139136                    verbose = True,
     
    146143from smf import slide_tsunami
    147144
    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,
     145tsunami_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,
    157153                               domain=domain)
    158154
     
    165161Bd = Dirichlet_boundary([tide,0,0])
    166162
    167 domain.set_boundary( {'e0': Bd,  'e1': Bd, 'e2': Bd, 'e3': Bd, 'e4': Bd,
    168                       'e5': Bd,  'e6': Bd} )
     163domain.set_boundary( {'e0': Bd,  'e1': Bd, 'e2': Bd, 'e3': Bd, 'e4': Bd} )
    169164
    170165
Note: See TracChangeset for help on using the changeset viewer.