Changeset 2186 for production/sydney_2006/run_sydney.py
- Timestamp:
- Jan 4, 2006, 4:33:02 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
production/sydney_2006/run_sydney.py
r2181 r2186 40 40 verbose = True) 41 41 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 44 mytest = 0 46 45 47 46 #Create Triangular Mesh 48 47 from pmesh.create_mesh import create_mesh_from_regions 49 48 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) 49 if mytest == 0: 50 # for whole region 51 south = project.south 52 north = project.north 53 west = project.west 54 east = project.east 61 55 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) 62 67 68 if 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 86 if 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 63 104 #Setup domain 64 105 … … 97 138 Bd = Dirichlet_boundary([0,0,0]) 98 139 Bw = 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]) 100 141 101 142 102 domain.set_boundary( {'top': B d, 'bottom': Bd, 'right': Bd, 'left': Bd} )143 domain.set_boundary( {'top': Br, 'bottom': Br, 'right': Bw, 'left': Br} ) 103 144 104 145 … … 107 148 t0 = time.time() 108 149 109 for t in domain.evolve(yieldstep = 1, finaltime = 4):150 for t in domain.evolve(yieldstep = 1, finaltime = 50): 110 151 domain.write_time() 111 152 domain.write_boundary_statistics(tags = 'right') #quantities = 'stage')
Note: See TracChangeset
for help on using the changeset viewer.