Changeset 2466


Ignore:
Timestamp:
Mar 2, 2006, 3:51:08 PM (18 years ago)
Author:
nicholas
Message:

Full set of friction values run through CCS.py for various building layouts. Report started for produced reports in Experiment 1.doc

Location:
development/momentum_sink
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • development/momentum_sink/CCS.py

    r2458 r2466  
    1515from numerical_tools import norm, corr, err 
    1616
    17 B_list=['buildings_Str_D=3_1714.sww',
    18         'buildings_Str_D=5_1578.sww',
    19         'buildings_Str_D=7_1067.sww',
    20         'buildings_Str_D=9_1052.sww',
    21         'buildings_Str_D=11_694.sww',
    22         'buildings_Str_D=13_693.sww',
    23         'buildings_Str_D=15_717.sww',
    24         'buildings_Str_D=17_749.sww',
    25         'buildings_Str_D=19_1008.sww',
    26         'buildings_Str_D=21_1581.sww',
    27         'buildings_Str_D=23_1798.sww']
     17B_list=['buildings_Orth(45)_D=3_1566.sww',
     18        'buildings_Orth(45)_D=5_1247.sww',
     19        'buildings_Orth(45)_D=7_1270.sww',
     20        'buildings_Orth(45)_D=9_804.sww',
     21        'buildings_Orth(45)_D=11_844.sww',
     22        'buildings_Orth(45)_D=13_918.sww',
     23        'buildings_Orth(45)_D=15_1250.sww',
     24        'buildings_Orth(45)_D=17_1735.sww']
    2825
    2926
    30 fd = open("Straight_log_report.csv", 'w')
    31 fd.write( 'Straight_log_report. Summary at bottom.' + '\n' )
     27fd = open("buildings_Orth(45)_report.csv", 'w')
     28fd.write( 'buildings_Orth(45)_report. Summary at bottom.' + '\n' )
    3229
    3330
     
    5956
    6057    #Read model output
    61     quantities = ['stage', 'elevation', 'xmomentum', 'ymomentum']
     58    quantities = ['stage', 'xmomentum', 'ymomentum']
    6259
    6360    f_B = file_function(swwfile_B,
     
    7067    least_norm=[100]
    7168    Normal=[]
    72     #Friction = Numeric.arrayrange(1,120,1)
    73     Friction = [0.025, 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000]
     69    Friction_large = list(Numeric.arange(1,120,1))
     70    Friction = list(Numeric.arange(0.025,1,0.025))
     71    #Friction_log = [0.025, 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000]
     72    Friction.extend(Friction_large)
    7473    for fric in Friction:
    7574        swwfile_F = project.outputdir + sep  + 'friction_n=' + str(fric) + '_3135.sww'
     
    8483        stages_B = []
    8584        stages_F = []
     85        vel_B=[]
     86        vel_F=[]
    8687        for i, GL in enumerate(gauge_depth):
    8788
     89            k = len(gauge_depth) # point of velocity comparision
    8890            # mines data from specified time values in sww file
    8991            # Building file
    9092            wB = f_B(t, point_id = i)[0]
    91             zB = f_B(t, point_id = i)[1]
    92             uhB = f_B(t, point_id = i)[2]
    93             vhB = f_B(t, point_id = i)[3]
     93            uhB = f_B(t, point_id = i)[1]
     94            vhB = f_B(t, point_id = i)[2]
    9495            # Friction file
    9596            wF = f_F(t, point_id = i)[0]       
    96             uhF = f_B(t, point_id = i)[2]
    97             vhF = f_B(t, point_id = i)[3]
     97            uhF = f_B(t, point_id = i)[1]
     98            vhF = f_B(t, point_id = i)[2]
    9899
    99100            #m = sqrt(uh*uh + vh*vh)   #Absolute momentum
     
    102103            stages_B.append(wB)
    103104            stages_F.append(wF)
    104            
    105            
     105
     106
     107        vel_B.append(velB)
     108        vel_F.append(velF)
    106109        Ar_B = Numeric.array(stages_B)
    107110        Ar_F = Numeric.array(stages_F)
     
    115118            least_norm = norm_F
    116119            fric_OK = fric
     120           
    117121        else:
    118122            print fric, " NOT OK"
     123
    119124   
    120125    print fric_OK, " <- This Manning's n is best fit from 2nd norm test"
     
    125130    Breadth.append(bre)
    126131   
    127     print len(Friction), "friction"
    128     print len(Normal), "normal"
     132    print vel_F, "friction"
     133    print vel_B, "Buildings"
    129134    fd.write('_______________________________________________________' + '\n' )
    130135    fd.write( '<<<< Mannings n for [' + B_file + '] >>>>' + '\n' )
     
    140145len_file=Numeric.arrayrange(0,len(B_list),1)
    141146fd.write('_______________________________________________________' + '\n' )
    142 fd.write( '<<<<< Straight_log_report Summary >>>>>' + '\n' )
     147fd.write( '<<<<< buildings_Orth(45)_report Summary >>>>>' + '\n' )
    143148fd.write( 'width, footprint ratio, mannings n, 2nd norm ' + '\n')
    144149for i in len_file:
  • development/momentum_sink/loop_friction.py

    r2458 r2466  
    2424from pmesh.mesh import importMeshFromFile
    2525
    26 #Friction = Numeric.arrayrange(0.025,1,0.025)
    27 Friction = [150,200,500,1000,2000,5000,10000]
     26Friction = Numeric.arrayrange(0.025,1,0.025)
     27#Friction = Numeric.arrayrange(1,120,1)
    2828for fric in Friction:
    2929    meshname = project_friction.meshname
  • development/momentum_sink/run_buildings.py

    r2458 r2466  
    5555domain.set_datadir(project.outputdir)
    5656domain.store = True
    57 domain.quantities_to_be_stored = ['stage']
     57domain.quantities_to_be_stored = ['stage', 'xmomentum', 'ymomentum']
    5858
    5959print 'Number of triangles = ', len(domain)
Note: See TracChangeset for help on using the changeset viewer.