Changeset 5575 for anuga_work/production/busselton/run_busselton.py
- Timestamp:
- Jul 25, 2008, 4:17:26 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/busselton/run_busselton.py
r5480 r5575 39 39 from anuga.damage_modelling.inundation_damage import add_depth_and_momentum2csv, inundation_damage 40 40 from anuga.fit_interpolate.benchmark_least_squares import mem_usage 41 from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon 41 42 42 43 # Application specific imports … … 71 72 print "Processor Name:",get_processor_name() 72 73 73 # filenames 74 # meshes_dir_name = project.meshes_dir_name+'.msh' 75 76 # creates copy of code in output dir 77 print 'min triangles', project.trigs_min, 78 print 'Note: This is generally about 20% less than the final amount' 79 74 #----------------------------------------------------------------------- 75 # Domain definitions 76 #----------------------------------------------------------------------- 77 78 # Read in boundary from ordered sts file 79 urs_bounding_polygon=create_sts_boundary(project.scenario_name) 80 81 # Reading the landward defined points, this incorporates the original clipping 82 # polygon minus the 100m contour 83 landward_bounding_polygon = read_polygon(project.polygons_dir+'landward_bounding_polygon.txt') 84 85 # Combine sts polyline with landward points 86 bounding_polygon = urs_bounding_polygon + landward_bounding_polygon 87 88 # counting segments 89 N = len(urs_bounding_polygon)-1 90 boundary_tags={'back': [N+1,N+2,N+3,N+4, N+5], 'side': [N,N+6],'ocean': range(N)} 91 92 80 93 #-------------------------------------------------------------------------- 81 94 # Create the triangular mesh based on overall clipping polygon with a … … 106 119 print 'Setup computational domain' 107 120 108 #domain = cache(Domain, (meshes_dir_name), {'use_cache':True, 'verbose':True}, verbose=True)109 #above don't work110 121 domain = Domain(project.meshes_dir_name+'.msh', use_cache=False, verbose=True) 111 122 print 'memory usage before del domain',mem_usage() … … 168 179 print 'Available boundary tags', domain.get_boundary_tags() 169 180 print 'domain id', id(domain) 170 #print 'Reading Boundary file',project.boundaries_dir_namea + '.sww' 171 181 172 182 print'set_boundary' 173 183 184 boundary_urs_out=project.boundaries_dir_name 185 186 print 'Available boundary tags', domain.get_boundary_tags() 187 Bf = File_boundary(boundary_urs_out+'.sts', 188 domain, time_thinning=1, 189 use_cache=True, 190 verbose = True, 191 boundary_polygon=bounding_polygon) 192 174 193 Br = Reflective_boundary(domain) 175 194 Bd = Dirichlet_boundary([kwargs['tide'],0,0]) 176 Bw = Dirichlet_boundary([kwargs['tide']+10.0,0,0]) # To be deleted for FESA runs 177 178 Bf = Field_boundary(kwargs['boundary_file'], 179 domain, time_thinning=kwargs['time_thinning'], mean_stage=kwargs['tide'], 180 use_cache=True, verbose=True) 195 #Bw = Dirichlet_boundary([kwargs['tide']+10.0,0,0]) # To be deleted for FESA runs 196 181 197 print 'finished reading boundary file' 198 182 199 domain.set_boundary({'back': Bd, 183 184 'ocean': Bd}) #changed from Bf to Bd for large wave200 'side': Bd, 201 'ocean': Bf}) #changed from Bf to Bd for large wave 185 202 186 203 kwargs['input_start_time']=domain.starttime … … 198 215 domain.write_boundary_statistics(tags = 'ocean') 199 216 200 # To be deleted for FESA runs201 if allclose(t, 240):202 domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bw})203 204 if allclose(t, 1440):205 domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bd})217 ## # To be deleted for FESA runs 218 ## if allclose(t, 240): 219 ## domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bw}) 220 ## 221 ## if allclose(t, 1440): 222 ## domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bd}) 206 223 207 224
Note: See TracChangeset
for help on using the changeset viewer.