Changeset 5577


Ignore:
Timestamp:
Jul 25, 2008, 4:36:05 PM (16 years ago)
Author:
duncan
Message:

Current Hinwood scenario calculating RMSD's

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  
    99
    1010
    11 def generate(mesh_filename, slope, maximum_triangle_area=0.01):
     11def generate(mesh_filename, slope, width,
     12             maximum_triangle_area=0.01):
    1213    """
    1314    Generate mesh for Monash University wave generation flume.
     
    2425    xbeach = slope['xbeach'][0]
    2526    xright = slope['xright'][0]
    26     ybottom = 0
    27     ytop    = 1.00
     27    ytop    = width/2.0
     28    ybottom = -ytop
    2829    ###xslope = slope
    2930
  • anuga_work/development/Hinwood_2008/plot.py

    r5494 r5577  
    8383    for gauge_x in run_data['gauge_x']:
    8484        gauge_x = str(gauge_x)
    85         location_sims.append(gauge_x + ':0.5')
     85        location_sims.append(gauge_x + ':0.0')
    8686        location_exps.append(gauge_x)
    8787        save_as_list.append(pro_instance.plots_dir + sep + \
     
    134134    """
    135135    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"
    137138    #outputdir_tag = "_test_C"
    138139    #scenarios = scenarios[1:]
  • anuga_work/development/Hinwood_2008/project.py

    r5410 r5577  
    1515class Project:   
    1616    def __init__(self,
    17                  trunk,
     17                 trunk=['data','flumes','Hinwood_2008'],
    1818                 outputdir_name = None,
    1919                 home = None):
     
    4141        self.raw_data_dir = join(scenariodir, 'raw_data')
    4242        self.plots_dir = join(scenariodir, 'plots')
     43        self.rmsd_dir = join(scenariodir, 'rmsd')
    4344
    4445        # creates copy of output dir structure, if it doesn't exist
     
    5152        if not access(self.plots_dir,F_OK):
    5253            mkdir (self.plots_dir)
     54        if not access(self.rmsd_dir,F_OK):
     55            mkdir (self.rmsd_dir)
    5356
    5457        self.codedir = getcwd()+sep
  • anuga_work/development/Hinwood_2008/run_dam.py

    r5503 r5577  
    6262         outputdir_name=None,
    6363         run_type=0,
     64         width=1.0,
     65         use_limits=True,
    6466         end_tag = '_limiterD'):
    6567
     
    6870   
    6971    if run_type == 1:
    70         outputdir_name += '_test' + end_tag
    7172        yieldstep = 1.0
    7273        finaltime = 15.
    7374        maximum_triangle_area=0.1
     75        outputdir_name += '_test'
    7476       
    7577    elif run_type == 2:
    76         outputdir_name += '_test_long_time' + end_tag
    7778        yieldstep = 0.5
    7879        finaltime = None
    7980        maximum_triangle_area=0.01
     81        outputdir_name += '_test_long_time'
    8082       
    8183    elif run_type == 3:
    82         outputdir_name += '_yieldstep_0.1_tri_area_0.01' + end_tag
    8384        yieldstep = 0.1
    8485        finaltime = None       
    8586        maximum_triangle_area=0.01
     87        #outputdir_name += '_yieldstep_0.1'
     88       
    8689    elif run_type == 4:
    87         outputdir_name += '_good_tri_area_0.01' + end_tag
    8890        # this is not a test
    8991        # Output will go to a file
     
    9294        finaltime = None       
    9395        maximum_triangle_area=0.01
     96        #outputdir_name += '_good'
     97       
    9498    elif run_type == 5:
    95         outputdir_name += '_good_tri_area_0.001' + end_tag
    9699        # this is not a test
    97100        # Output will go to a file
     
    100103        finaltime = None       
    101104        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   
    103126    metadata_dic = set_z_origin_to_water_depth(metadata_dic)   
    104127       
     
    150173    # this creates the mesh
    151174    #gate_position = 12.0
    152     create_mesh.generate(mesh_filename, metadata_dic,
     175    create_mesh.generate(mesh_filename, metadata_dic, width=width,
    153176                         maximum_triangle_area=maximum_triangle_area)
    154177
     
    172195    domain.set_minimum_storable_height(0.0001)
    173196
    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
    182206   
    183207
     
    223247    print 'finished'
    224248
    225     flume_y_middle = 0.5
     249    flume_y_middle = 0.0
    226250    points = []
    227251    for gauge_x in metadata_dic['gauge_x']:
     
    259283    #from plot import plot
    260284
    261 
     285    # 1 is fast and dirty
    262286    # 4 is 0.01
    263287    # 5 is 0.001
     288    # 6 is 0.0001
     289   
     290    #run_type = 1
    264291    run_type = 5
    265292    #for run_data in [scenarios[5]]:
    266293    #scenarios = scenarios[2:]
    267294    #scenarios = [scenarios[0]]
     295    width = 1.0
     296    width = 0.1
    268297    for run_data in scenarios:
    269298        pro_instance = main( run_data['scenario_id'] + '_boundary.tsm'  ,
    270299                             run_data,
    271                              run_type = run_type,
     300                             width=width,
     301                             run_type=run_type,
    272302                             outputdir_name=run_data['scenario_id'],
    273                              end_tag='_limiterD')
     303                             use_limits=False,
     304                             friction=0.012,
     305                             end_tag='_G')
    274306        #gauges_for_slope(pro_instance.outputdir,[run_data])
  • anuga_work/development/Hinwood_2008/slope.py

    r5532 r5577  
    4343    quantity_locations = title.split(',') #(',')
    4444    quantity_locations.pop(0) # remove 'time'
    45    
     45
     46    # Doing j.split(':')[0] drops the y location
    4647    locations = [float(j.split(':')[0]) for j in quantity_locations]
    4748   
     
    459460    It also create's a frounde file.
    460461    """
    461     dx = 0.05
     462    dx = 0.005
    462463    for run_data in scenarios:
    463464        point_x = arange(run_data['start_slope_x'],
    464465                        run_data['finish_slope_x'],
    465466                        dx).tolist()
    466         flume_y_middle = 0.5
     467        flume_y_middle = 0.0
    467468        points = []
    468469        for gauge_x in point_x:
     
    673674    #scenarios = [scenarios[0]]
    674675    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"
    676677    slope_tag = ""
    677678    #outputdir_tag = "_test_limiterC"
     
    679680    #scenarios = scenarios[4:] # !!!!!!!!!!!!!!!!!!!!!!
    680681   
    681     #gauges_for_slope(slope_tag, outputdir_tag, scenarios)
     682    gauges_for_slope(slope_tag, outputdir_tag, scenarios)
    682683    #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)
    684685    #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)
    686687    #g = Get_file_name(scenarios[0], outputdir_tag, slope_tag)
    687688    #for wave_file, save_as, wave_number in Get_file_name(
Note: See TracChangeset for help on using the changeset viewer.