Ignore:
Timestamp:
Jan 4, 2006, 4:33:02 PM (19 years ago)
Author:
sexton
Message:

Update script for Sydney scenario

File:
1 edited

Legend:

Unmodified
Added
Removed
  • production/sydney_2006/run_sydney.py

    r2181 r2186  
    4040      verbose = True)
    4141
    42 south = project.south
    43 north = project.north
    44 west = project.west
    45 east = project.east
     42#this was going to switch between different clipping polygons but doesn't
     43#seem to work, so keep this at zero
     44mytest = 0
    4645
    4746#Create Triangular Mesh
    4847from pmesh.create_mesh import create_mesh_from_regions
    4948
    50 interior_regions = [[project.harbour_polygon, 25000]] # maximal area of per triangle
    51 print project.harbour_polygon
    52                    
    53 m = cache(create_mesh_from_regions,
    54           project.polygon,
    55           {'boundary_tags': {'bottom': [0], 'top': [2],
    56                              'right': [1], 'left': [3]},
    57            'resolution': 100000,
    58            'filename': meshname,           
    59            'interior_regions': interior_regions},     
    60           verbose = True)
     49if mytest == 0:
     50    # for whole region
     51    south = project.south
     52    north = project.north
     53    west = project.west
     54    east = project.east
    6155
     56    interior_regions = [[project.harbour_polygon, 25000],
     57                        [project.botanybay_polygon, 25000]] # maximal area of per triangle
     58                       
     59    m = cache(create_mesh_from_regions,
     60              project.polygonall,
     61              {'boundary_tags': {'bottom': [0], 'top': [2],
     62                                 'right': [1], 'left': [3]},
     63               'resolution': 100000,
     64               'filename': meshname,           
     65               'interior_regions': interior_regions},     
     66              verbose = True)
    6267
     68if mytest == 1:
     69    # for harbour region
     70    south = project.hsouth
     71    north = project.hnorth
     72    west = project.hwest
     73    east = project.heast
     74
     75    interior_regions = [[project.harbour_polygon, 25000]] # maximal area of per triangle
     76                       
     77    m = cache(create_mesh_from_regions,
     78              project.polygon_h,
     79              {'boundary_tags': {'bottom': [0], 'top': [2],
     80                                 'right': [1], 'left': [3]},
     81               'resolution': 100000,
     82               'filename': meshname,           
     83               'interior_regions': interior_regions},     
     84              verbose = True)
     85
     86if mytest == 2:
     87    # for botany bay region
     88    south = project.bsouth
     89    north = project.bnorth
     90    west = project.bwest
     91    east = project.beast
     92
     93    interior_regions = [[project.botanybay_polygon, 25000]] # maximal area of per triangle
     94                       
     95    m = cache(create_mesh_from_regions,
     96              project.polygon_bb,
     97              {'boundary_tags': {'bottom': [0], 'top': [2],
     98                                 'right': [1], 'left': [3]},
     99               'resolution': 100000,
     100               'filename': meshname,           
     101               'interior_regions': interior_regions},     
     102              verbose = True)
     103   
    63104#Setup domain
    64105
     
    97138Bd = Dirichlet_boundary([0,0,0])
    98139Bw = Time_boundary(domain=domain,
    99                    f=lambda t: [4*sin(2*pi*t/100)+4, 0, 0])
     140                   f=lambda t: [(6<t<30)*5000, 0, 0])
    100141
    101142
    102 domain.set_boundary( {'top': Bd, 'bottom': Bd, 'right': Bd, 'left': Bd} )
     143domain.set_boundary( {'top': Br, 'bottom': Br, 'right': Bw, 'left': Br} )
    103144
    104145
     
    107148t0 = time.time()
    108149
    109 for t in domain.evolve(yieldstep = 1, finaltime = 4):
     150for t in domain.evolve(yieldstep = 1, finaltime = 50):
    110151    domain.write_time()
    111152    domain.write_boundary_statistics(tags = 'right') #quantities = 'stage')       
Note: See TracChangeset for help on using the changeset viewer.