Changeset 5147


Ignore:
Timestamp:
Mar 10, 2008, 3:43:22 PM (17 years ago)
Author:
nick
Message:

update run_circular.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_validation/circular_island/run_circular.py

    r5131 r5147  
    3030time = strftime('%Y%m%d_%H%M%S',localtime())
    3131
    32 res=0.0025
     32res=0.05
    3333
    3434dir_comment = time+'_res_'+str(res)+'_'+str(user)
     
    113113center_y = 13.80
    114114
    115 #d=0.75
    116115#L=3.6 and therefore the gauges 1,2,3 and 4 are located 1.8 from the toe of the island
    117116# 13.8 - 3.6(radii of island) - 1.8 = 8.4
     
    126125    angle = ((angle-180)/180.0)*pi
    127126
    128     p = get_xy(center_x,center_y,4.0,angle)
     127    p = get_xy(center_x,center_y,4.5,angle)
    129128    poly1.append([p[0],p[1]])
    130129
     
    136135    #convert Degs to Rads
    137136    angle = ((angle-180)/180.0)*pi
    138     p = get_xy(center_x,center_y,2.6,angle)
     137    p = get_xy(center_x,center_y,3.2,angle)
    139138    poly2.append([p[0],p[1]])
    140139   
     
    179178
    180179#attribute_dic, title_index_dic = csv2dict('sqrt_table.csv')
    181 #print attribute_dic
    182 #print attribute_dic['number'][10]
    183180
    184181def circular_island_elevation(x,y):
    185182    water_depth = 0.32
    186 #    list_xy_square = (center_x-x)**2+(center_y-L-y)**2
    187183    list_xy = sqrt((center_x-x)**2+(center_y-L-y)**2)
    188184    print 'x',min(x),max(x)
     
    192188    for distance in list_xy:
    193189
    194 #        z = -distance*.25+0.9
    195 #        z = -distance*.25+0.578
     190#    The cone has a 1/4 slope and a 7.2 diameter this make the height 0.9m
     191#    to get the stage at 0 elevation + cone height and - water depth
    196192        z = -distance*.25+0.9-water_depth
    197 #        z = zz*.25+0.8975
    198193
    199194        if z <0-water_depth:
     
    201196        if z > .625-water_depth:
    202197            z=0.625-water_depth
    203 #        print 'hello',z
    204198        list_z.append(z)
    205199    return list_z
     
    286280#    print p1,p2,p3,p4,angle
    287281    poly_segment =[[p1[0],p1[1]],[p2[0],p2[1]],[p3[0],p3[1]],[p4[0],p4[1]]]
    288 #    print i, poly_segment, angle
    289     #print i,poly[i]
    290282   
    291283    run_up, location = get_maximum_inundation_data(filename=sww_file,polygon=poly_segment, verbose=False)
     
    297289sww2csv_gauges(sww_file=sww_file,
    298290                   gauge_file=anuga_dir+'gauges'+sep+'gauges.csv',
    299                    gauge_file='gauges.csv',
     291#                   gauge_file='gauges.csv',
    300292                   quantities = ['stage','depth', 'elevation', 'xmomentum', 'ymomentum'],
    301293                   verbose=True,
Note: See TracChangeset for help on using the changeset viewer.