Changeset 5577
- Timestamp:
- Jul 25, 2008, 4:36:05 PM (15 years ago)
- Location:
- anuga_work/development/Hinwood_2008
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/Hinwood_2008/create_mesh.py
r5370 r5577 9 9 10 10 11 def generate(mesh_filename, slope, maximum_triangle_area=0.01): 11 def generate(mesh_filename, slope, width, 12 maximum_triangle_area=0.01): 12 13 """ 13 14 Generate mesh for Monash University wave generation flume. … … 24 25 xbeach = slope['xbeach'][0] 25 26 xright = slope['xright'][0] 26 y bottom =027 y top = 1.0027 ytop = width/2.0 28 ybottom = -ytop 28 29 ###xslope = slope 29 30 -
anuga_work/development/Hinwood_2008/plot.py
r5494 r5577 83 83 for gauge_x in run_data['gauge_x']: 84 84 gauge_x = str(gauge_x) 85 location_sims.append(gauge_x + ':0. 5')85 location_sims.append(gauge_x + ':0.0') 86 86 location_exps.append(gauge_x) 87 87 save_as_list.append(pro_instance.plots_dir + sep + \ … … 134 134 """ 135 135 from scenarios import scenarios 136 outputdir_tag = "_good_tri_area_0.01_D" 136 outputdir_tag = "_good_tri_area_0.01_limiterE" 137 outputdir_tag = "_test_limiterE" 137 138 #outputdir_tag = "_test_C" 138 139 #scenarios = scenarios[1:] -
anuga_work/development/Hinwood_2008/project.py
r5410 r5577 15 15 class Project: 16 16 def __init__(self, 17 trunk ,17 trunk=['data','flumes','Hinwood_2008'], 18 18 outputdir_name = None, 19 19 home = None): … … 41 41 self.raw_data_dir = join(scenariodir, 'raw_data') 42 42 self.plots_dir = join(scenariodir, 'plots') 43 self.rmsd_dir = join(scenariodir, 'rmsd') 43 44 44 45 # creates copy of output dir structure, if it doesn't exist … … 51 52 if not access(self.plots_dir,F_OK): 52 53 mkdir (self.plots_dir) 54 if not access(self.rmsd_dir,F_OK): 55 mkdir (self.rmsd_dir) 53 56 54 57 self.codedir = getcwd()+sep -
anuga_work/development/Hinwood_2008/run_dam.py
r5503 r5577 62 62 outputdir_name=None, 63 63 run_type=0, 64 width=1.0, 65 use_limits=True, 64 66 end_tag = '_limiterD'): 65 67 … … 68 70 69 71 if run_type == 1: 70 outputdir_name += '_test' + end_tag71 72 yieldstep = 1.0 72 73 finaltime = 15. 73 74 maximum_triangle_area=0.1 75 outputdir_name += '_test' 74 76 75 77 elif run_type == 2: 76 outputdir_name += '_test_long_time' + end_tag77 78 yieldstep = 0.5 78 79 finaltime = None 79 80 maximum_triangle_area=0.01 81 outputdir_name += '_test_long_time' 80 82 81 83 elif run_type == 3: 82 outputdir_name += '_yieldstep_0.1_tri_area_0.01' + end_tag83 84 yieldstep = 0.1 84 85 finaltime = None 85 86 maximum_triangle_area=0.01 87 #outputdir_name += '_yieldstep_0.1' 88 86 89 elif run_type == 4: 87 outputdir_name += '_good_tri_area_0.01' + end_tag88 90 # this is not a test 89 91 # Output will go to a file … … 92 94 finaltime = None 93 95 maximum_triangle_area=0.01 96 #outputdir_name += '_good' 97 94 98 elif run_type == 5: 95 outputdir_name += '_good_tri_area_0.001' + end_tag96 99 # this is not a test 97 100 # Output will go to a file … … 100 103 finaltime = None 101 104 maximum_triangle_area=0.001 102 105 #outputdir_name += '_good' 106 107 elif run_type == 6: 108 # this is not a test 109 # Output will go to a file 110 # The sww file will be interpolated 111 yieldstep = 0.01 112 finaltime = None 113 maximum_triangle_area=0.0001 114 #outputdir_name += '_good' 115 116 if use_limits is True: 117 outputdir_name += '_lmts' 118 else: 119 outputdir_name += '_nolmts' 120 outputdir_name += '_wdth_' + str(width) 121 outputdir_name += '_z_' + str(friction) 122 outputdir_name += '_ys_' + str(yieldstep) 123 outputdir_name += '_mta_' + str(maximum_triangle_area) 124 outputdir_name += end_tag 125 103 126 metadata_dic = set_z_origin_to_water_depth(metadata_dic) 104 127 … … 150 173 # this creates the mesh 151 174 #gate_position = 12.0 152 create_mesh.generate(mesh_filename, metadata_dic, 175 create_mesh.generate(mesh_filename, metadata_dic, width=width, 153 176 maximum_triangle_area=maximum_triangle_area) 154 177 … … 172 195 domain.set_minimum_storable_height(0.0001) 173 196 174 domain.set_default_order(2) # Use second order spatial scheme 175 domain.set_timestepping_method('rk2') 176 domain.use_edge_limiter = True 177 domain.tight_slope_limiters = True 178 179 domain.beta_w = 0.6 180 domain.beta_uh = 0.6 181 domain.beta_vh = 0.6 197 if use_limits is True: 198 domain.set_default_order(2) # Use second order spatial scheme 199 domain.set_timestepping_method('rk2') 200 domain.use_edge_limiter = True 201 domain.tight_slope_limiters = True 202 203 domain.beta_w = 0.6 204 domain.beta_uh = 0.6 205 domain.beta_vh = 0.6 182 206 183 207 … … 223 247 print 'finished' 224 248 225 flume_y_middle = 0. 5249 flume_y_middle = 0.0 226 250 points = [] 227 251 for gauge_x in metadata_dic['gauge_x']: … … 259 283 #from plot import plot 260 284 261 285 # 1 is fast and dirty 262 286 # 4 is 0.01 263 287 # 5 is 0.001 288 # 6 is 0.0001 289 290 #run_type = 1 264 291 run_type = 5 265 292 #for run_data in [scenarios[5]]: 266 293 #scenarios = scenarios[2:] 267 294 #scenarios = [scenarios[0]] 295 width = 1.0 296 width = 0.1 268 297 for run_data in scenarios: 269 298 pro_instance = main( run_data['scenario_id'] + '_boundary.tsm' , 270 299 run_data, 271 run_type = run_type, 300 width=width, 301 run_type=run_type, 272 302 outputdir_name=run_data['scenario_id'], 273 end_tag='_limiterD') 303 use_limits=False, 304 friction=0.012, 305 end_tag='_G') 274 306 #gauges_for_slope(pro_instance.outputdir,[run_data]) -
anuga_work/development/Hinwood_2008/slope.py
r5532 r5577 43 43 quantity_locations = title.split(',') #(',') 44 44 quantity_locations.pop(0) # remove 'time' 45 45 46 # Doing j.split(':')[0] drops the y location 46 47 locations = [float(j.split(':')[0]) for j in quantity_locations] 47 48 … … 459 460 It also create's a frounde file. 460 461 """ 461 dx = 0.0 5462 dx = 0.005 462 463 for run_data in scenarios: 463 464 point_x = arange(run_data['start_slope_x'], 464 465 run_data['finish_slope_x'], 465 466 dx).tolist() 466 flume_y_middle = 0. 5467 flume_y_middle = 0.0 467 468 points = [] 468 469 for gauge_x in point_x: … … 673 674 #scenarios = [scenarios[0]] 674 675 outputdir_tag = "_good_tri_area_0.01_limiterD" 675 outputdir_tag = "_good_ tri_area_0.001_limiterD"676 outputdir_tag = "_good_lmts_wdth_0.1_z_0.012_ys_0.01_mta_0.01_F" 676 677 slope_tag = "" 677 678 #outputdir_tag = "_test_limiterC" … … 679 680 #scenarios = scenarios[4:] # !!!!!!!!!!!!!!!!!!!!!! 680 681 681 #gauges_for_slope(slope_tag, outputdir_tag, scenarios)682 gauges_for_slope(slope_tag, outputdir_tag, scenarios) 682 683 #auto_graph_slopes(outputdir_tag, scenarios) #, is_interactive=True) 683 #auto_find_min_slopes(slope_tag, outputdir_tag, scenarios)684 auto_find_min_slopes(slope_tag, outputdir_tag, scenarios) 684 685 #auto_graph_froudes(outputdir_tag, scenarios) 685 auto_plot_froude_slopes(slope_tag, outputdir_tag, scenarios)686 #auto_plot_froude_slopes(slope_tag, outputdir_tag, scenarios) 686 687 #g = Get_file_name(scenarios[0], outputdir_tag, slope_tag) 687 688 #for wave_file, save_as, wave_number in Get_file_name(
Note: See TracChangeset
for help on using the changeset viewer.