Changeset 3043
- Timestamp:
- Jun 1, 2006, 5:07:35 PM (18 years ago)
- Location:
- production/wollongong_2006
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
production/wollongong_2006/project.py
r3040 r3043 14 14 15 15 # Parameters 16 base_resolution = 10 016 base_resolution = 10 #5 17 17 initial_sealevel = 0.0 18 18 … … 64 64 point6] 65 65 66 67 #bounding_tags = ['exterior',68 # 'exterior',69 # 'side',70 # 'ocean',71 # 'side',72 # 'exterior',73 # 'exterior']74 66 boundary_tags = {'exterior': [0,1,5,6], 'side': [2,4], 'ocean': [3]} 75 67 76 68 interior_regions = [] 77 69 78 # Make refined area around built-up area79 # FIXME: TODO80 81 # Now read building footprints from wgong.asc (in this directory) and82 # tag for reflective bdry83 # Segment.set_default_tag('wall') # this will be reflective84 # dict = importUngenerateFile('wgong.asc')85 # m.addVertsSegs(dict)86 87 -
production/wollongong_2006/run_flagstaff.py
r3040 r3043 24 24 # Related major packages 25 25 from pyvolution.shallow_water import Domain 26 from pyvolution.shallow_water import Dirichlet_boundary, Time_boundary, Reflective_boundary 26 from pyvolution.shallow_water import Dirichlet_boundary 27 from pyvolution.shallow_water import Time_boundary 28 from pyvolution.shallow_water import Reflective_boundary 27 29 from pyvolution.data_manager import convert_dem_from_ascii2netcdf, dem2pts 28 30 from pmesh.mesh_interface import create_mesh_from_regions 29 from pmesh.mesh import importUngenerateFile 31 from pmesh.mesh import importUngenerateFile, Segment 30 32 31 33 # Application specific imports … … 60 62 # Generate basic mesh 61 63 mesh = create_mesh_from_regions(project.bounding_polygon, 62 boundary_tags =project.boundary_tags,63 maximum_triangle_area =project.base_resolution,64 interior_regions =project.interior_regions)64 boundary_tags=project.boundary_tags, 65 maximum_triangle_area=project.base_resolution, 66 interior_regions=project.interior_regions) 65 67 66 68 # Add buildings 67 # FIXME (Ole): Duncan, can you do your magic again?68 69 dict = importUngenerateFile(project.buildings_filename) 69 #mesh.add_region_from_polygon( ??? ) 70 #mesh.generate_mesh(maximum_triangle_area=project.base_resolution)70 Segment.set_default_tag('wall') # This should bind to a Reflective boundary 71 mesh.addVertsSegs(dict) 71 72 72 # Write mesh to file 73 # Generate and write mesh to file 74 mesh.generate_mesh(maximum_triangle_area=project.base_resolution, 75 verbose=True) 76 73 77 mesh.export_mesh_file(project.mesh_filename) 78 74 79 75 80 #------------------------------------------------------------------------------ … … 101 106 #------------------------------------------------------------------------------ 102 107 103 print 'Available boundary tags', domain.get_boundary_tags()104 105 108 D = Dirichlet_boundary([project.initial_sealevel, 0, 0]) 106 109 R = Reflective_boundary(domain) 110 W = Time_boundary(domain = domain, 111 f=lambda t: [project.initial_sealevel + (10<t<480)*6, 0, 0]) 107 112 108 # 7 min square wave starting at 1 min, 6m high109 W = Time_boundary(domain = domain,110 f=lambda t: [project.initial_sealevel + (60<t<480)*6, 0, 0])111 112 print 'Available boundary tags are', domain.get_boundary_tags()113 113 domain.set_boundary({'exterior': D, 114 114 'side': D, 115 #'wall': R,115 'wall': R, 116 116 'ocean': W}) 117 117
Note: See TracChangeset
for help on using the changeset viewer.