Changeset 9248


Ignore:
Timestamp:
Jul 7, 2014, 12:07:24 PM (11 years ago)
Author:
steve
Message:

Playing with a new structure to run simulation

Location:
trunk/anuga_core/validation_tests/case_studies/towradgi
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/validation_tests/case_studies/towradgi/project.py

    r9247 r9248  
    33
    44model_output_dir='MODEL_OUTPUTS'
    5 partition_dir = 'Partitions'
     5partition_dir = 'PARTITIONS'
    66
    77basename = join('DEM_bridges', 'towradgi')
     
    1919S=6193140
    2020
    21 def read_polygon_list(poly_list):
    22     # Alternative to read_polygon_dir -- allows us to control order of polygons
    23     from anuga import read_polygon
    24    
    25     result = []
    26     for i in range(len(poly_list)):
    27         result.append((read_polygon(poly_list[i][0]) , poly_list[i][1]))
    28     return result
    2921
    3022
     23
  • trunk/anuga_core/validation_tests/case_studies/towradgi/run_parallel_evolve.py

    r9247 r9248  
    2121from project import *
    2222
     23useCheckpointing =True
     24
    2325#===============================================================================
    2426# Start Simulation
     
    2931alg = args.alg
    3032verbose = args.verbose
     33
     34
     35print args
    3136
    3237if myid == 0 and verbose: print 'STARTING PARALLEL SIMULATION'
     
    3944
    4045
    41    
     46 
    4247#===============================================================================
    4348# Create sequential domain and partition
     
    4752if myid == 0:
    4853    from setup_domain_and_partition import setup_domain, setup_partition
    49    
    50      
     54       
    5155    setup_domain(verbose=verbose)
    5256   
     
    7074#===============================================================================
    7175if myid == 0 and verbose: print 'CREATING STRUCTURES'
    72 execfile('setup_structures.py')
     76from setup_structures import setup_structures
     77
     78setup_structures(domain)
    7379
    7480   
     
    103109t0 = time.time()
    104110   
    105 for t in domain.evolve(yieldstep = 300., finaltime = 83700.):
     111for t in domain.evolve(yieldstep = 1., finaltime = 300):#= 83700.):
    106112    #if t == 37800.0: #time when bridge deck starts to get submerged, increase n to act as bridge deck, handrail and blockage effects
    107113    ## Try to block all culverts / bridges, as described in the flood study
  • trunk/anuga_core/validation_tests/case_studies/towradgi/setup_domain_and_partition.py

    r9247 r9248  
    3131from project import *
    3232
     33
     34
     35def read_polygon_list(poly_list):
     36    # Alternative to read_polygon_dir -- allows us to control order of polygons
     37    from anuga import read_polygon
     38   
     39    result = []
     40    for i in range(len(poly_list)):
     41        result.append((read_polygon(poly_list[i][0]) , poly_list[i][1]))
     42    return result
     43
     44
     45args = anuga.get_args()
     46alg = args.alg
     47verbose = args.verbose
     48
    3349#--------------------------------------------------------------------------
    3450# Setup Domain to be distributed
    3551#--------------------------------------------------------------------------
    3652def setup_domain(verbose=False):
     53   
     54    print args
    3755   
    3856    pickle_name = outname+'_P%g_%g.pickle'% (1,0)
  • trunk/anuga_core/validation_tests/case_studies/towradgi/setup_structures.py

    r9246 r9248  
    44from anuga import Boyd_box_operator
    55from os.path import join
     6from project import *
    67
    78
    8 """
    9 #FIXME: Include these again
    10 
    11 #------------------------------------------------------------------------------
    12 # ENTER CULVERT DATA
    13 #------------------------------------------------------------------------------
    14 # BrookerStCulvert branch 2
    15 losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
    16 el0 = numpy.array([[305772.982,6193988.557] , [305772.378,6193987.823]])
    17 el1 = numpy.array([[305794.592,6193983.907] , [305793.988,6193983.173]])
    18 
    19 ## Adjust el0, el1
    20 #elOffset=0.
    21 #el0M=0.5*(el0[0,:]+el0[1,:]) ; el1M=0.5*(el1[0,:]+el1[1,:]); n0=el0M-el1M; n0=n0/((n0*n0).sum())**0.5;
    22 #el0 = el0   
    23 culvert = Boyd_box_operator(domain,
    24                             losses=losses,
    25                             width=0.9,
    26                             exchange_lines=[el0, el1],
    27                             height=0.9,
    28                             apron=3.0,
    29                             enquiry_gap=10.0,
    30                             use_momentum_jet=True,
    31                             use_velocity_head=True,
    32                             manning=0.013,
    33                             logging=False,
    34                             label=join('Runs', '1H'), # this puts the culvert hydraulics output into the same dir as the sww's
    35                             verbose=False)   
    36 
    37 # MeadowStCulvert branch 2
    38 losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
    39 el0 = numpy.array([[305886.333,6193929.052] , [305883.172,6193922.986]])
    40 el1 = numpy.array([[305906.553,6193910.461] , [305903.393,6193904.395]])
    41    
    42 culvert = Boyd_box_operator(domain,
    43                             losses=losses,
    44                             width=5.4,
    45                             exchange_lines=[el0, el1],
    46                             height=0.6,
    47                             apron=3.0,
    48                             enquiry_gap=10.0,
    49                             use_momentum_jet=True,
    50                             use_velocity_head=True,
    51                             manning=0.013,
    52                             logging=False,
    53                             label=join('Runs', '2H'), # this puts the culvert hydraulics output into the same dir as the sww's
    54                             verbose=False)   
    55 
    56 # WilliamsStCulvert branch 2
    57 losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
    58 el0 = numpy.array([[305945.955,6193836.293] , [305945.125,6193835.387]])
    59 el1 = numpy.array([[306040.565,6193827.573] , [306039.735,6193826.667]])
    60    
    61 culvert = Boyd_box_operator(domain,
    62                             losses=losses,
    63                             width=1.2,
    64                             exchange_lines=[el0, el1],
    65                             height=1.2,
    66                             apron=3.0,
    67                             enquiry_gap=10.0,
    68                             use_momentum_jet=True,
    69                             use_velocity_head=True,
    70                             manning=0.013,
    71                             logging=False,
    72                             label=join('Runs', '3H'), # this puts the culvert hydraulics output into the same dir as the sww's
    73                             verbose=False)     
    74 
    75 # MeadowStCulvert Towradgi branch
    76 losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
    77 el0 = numpy.array([[305812.113,6193591.972] , [305809.390,6193588.820]])
    78 el1 = numpy.array([[305834.913,6193588.382] , [305832.190,6193585.230]])
    79    
    80 culvert = Boyd_box_operator(domain,
    81                             losses=losses,
    82                             width=4.0,
    83                             exchange_lines=[el0, el1],
    84                             height=2.2,
    85                             apron=3.0,
    86                             enquiry_gap=10.0,
    87                             use_momentum_jet=True,
    88                             use_velocity_head=True,
    89                             manning=0.013,
    90                             logging=False,
    91                             label=join('Runs', '4H'), # this puts the culvert hydraulics output into the same dir as the sww's
    92                             verbose=False) 
    93 
    94 # CollinsStCulverts tarra 5 branch
    95 losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
    96 el0 = numpy.array([[306330.608,6194817.116] , [306320.768,6194805.884]])
    97 el1 = numpy.array([[306369.483,6194811.616] , [306359.643,6194800.384]])
    98    
    99 culvert = Boyd_box_operator(domain,
    100                             losses=losses,
    101                             width=3.6,
    102                             exchange_lines=[el0, el1],
    103                             height=0.93,
    104                             apron=3.0,
    105                             enquiry_gap=10.0,
    106                             use_momentum_jet=True,
    107                             use_velocity_head=True,
    108                             manning=0.013,
    109                             logging=False,
    110                             label=join('Runs', '9H'), # this puts the culvert hydraulics output into the same dir as the sww's
    111                             verbose=False)                                     
    112                                    
    113 # Norther Distributor Culverts branch 5
    114 losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
    115 el0 = numpy.array([[306956.242,6194465.589] , [306950.446,6194457.411]])
    116 el1 = numpy.array([[307003.711,6194446.089] , [306997.916,6194437.911]])
    117    
    118 culvert = Boyd_box_operator(domain,
    119                             losses=losses,
    120                             width=9.0,
    121                             exchange_lines=[el0, el1],
    122                             height=0.85,
    123                             apron=3.0,
    124                             enquiry_gap=10.0,
    125                             use_momentum_jet=True,
    126                             use_velocity_head=True,
    127                             manning=0.013,
    128                             logging=False,
    129                             label=join('Runs', '10H'), # this puts the culvert hydraulics output into the same dir as the sww's
    130                             verbose=False)                                     
    131                                    
    132 #CokeWorksCulverts branch 5
    133 losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
    134 el0 = numpy.array([[307142.161,6194181.3065] , [307138.519,6194174.394]])
    135 el1 = numpy.array([[307160.521,6194164.8165] , [307156.879,6194157.904]])
    136    
    137 culvert = Boyd_box_operator(domain,
    138                             losses=losses,
    139                             width=6.2,
    140                             exchange_lines=[el0, el1],
    141                             height=3.0,
    142                             apron=3.1,
    143                             enquiry_gap=10.0,
    144                             use_momentum_jet=True,
    145                             use_velocity_head=True,
    146                             manning=0.013,
    147                             logging=False,
    148                             label=join('Runs', '11H'), # this puts the culvert hydraulics output into the same dir as the sww's
    149                             verbose=False)                                     
    150                                    
    151 #Northern Distributor Branch 6 Culverts
    152 losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
    153 el0 = numpy.array([[306950.758,6193454.717] , [306947.804,6193453.283]])
    154 el1 = numpy.array([[306988.633,6193474.217] , [306985.679,6193472.783]])
    155    
    156 culvert = Boyd_box_operator(domain,
    157                             losses=losses,
    158                             width=3.6,
    159                             exchange_lines=[el0, el1],
    160                             height=1.2,
    161                             apron=3.1,
    162                             enquiry_gap=10.0,
    163                             use_momentum_jet=True,
    164                             use_velocity_head=True,
    165                             manning=0.013,
    166                             logging=False,
    167                             label=join('Runs', '12H'), # this puts the culvert hydraulics output into the same dir as the sww's
    168                             verbose=False)                                     
    169                                    
    170 #Railway Branch 6 Culverts
    171 losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
    172 el0 = numpy.array([[307139.134,6193474.458] , [307138.492,6193473.542]])
    173 el1 = numpy.array([[307150.884,6193469.458] , [307150.242,6193468.542]])
    174    
    175 culvert = Boyd_box_operator(domain,
    176                             losses=losses,
    177                             width=3.6,
    178                             exchange_lines=[el0, el1],
    179                             height=1.2,
    180                             apron=3.1,
    181                             enquiry_gap=10.0,
    182                             use_momentum_jet=True,
    183                             use_velocity_head=True,
    184                             manning=0.013,
    185                             logging=False,
    186                             label=join('Runs', '13H'), # this puts the culvert hydraulics output into the same dir as the sww's
    187                             verbose=False)
    188 
    189 #Colgong Branch6 Culverts
    190 losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
    191 el0 = numpy.array([[307200.610,6193476.765] , [307199.140,6193475.235]])
    192 el1 = numpy.array([[307224.610,6193475.765] , [307223.140,6193474.235]])
    193    
    194 culvert = Boyd_box_operator(domain,
    195                             losses=losses,
    196                             width=2.1,
    197                             exchange_lines=[el0, el1],
    198                             height=1.0,
    199                             apron=3.1,
    200                             enquiry_gap=10.0,
    201                             use_momentum_jet=True,
    202                             use_velocity_head=True,
    203                             manning=0.013,
    204                             logging=False,
    205                             label=join('Runs', '14H'), # this puts the culvert hydraulics output into the same dir as the sww's
    206                             verbose=False)   
    207                                    
    208 #Basin Outlet Branch 3 Culverts
    209 losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
    210 el0 = numpy.array([[305629.639,6194408.883] , [305626.521,6194400.457]])
    211 el1 = numpy.array([[305665.889,6194347.183] , [305662.771,6194338.757]])
    212    
    213 culvert = Boyd_box_operator(domain,
    214                             losses=losses,
    215                             width=6.0,
    216                             exchange_lines=[el0, el1],
    217                             height=0.86,
    218                             apron=3.1,
    219                             enquiry_gap=10.0,
    220                             use_momentum_jet=True,
    221                             use_velocity_head=True,
    222                             manning=0.013,
    223                             logging=False,
    224                             label=join('Runs', '15H'), # this puts the culvert hydraulics output into the same dir as the sww's
    225                             verbose=False)                                     
    226                                    
    227 #BellambiRd Branch 3 Culverts
    228 losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
    229 el0 = numpy.array([[305777.182,6194305.377] , [305776.444,6194304.623]])
    230 el1 = numpy.array([[305873.807,6194303.377] , [305873.069,6194302.623]])
    231    
    232 culvert = Boyd_box_operator(domain,
    233                             losses=losses,
    234                             width=1.05,
    235                             exchange_lines=[el0, el1],
    236                             height=1.0,
    237                             apron=3.1,
    238                             enquiry_gap=10.0,
    239                             use_momentum_jet=True,
    240                             use_velocity_head=True,
    241                             manning=0.013,
    242                             logging=False,
    243                             label=join('Runs', '16H'), # this puts the culvert hydraulics output into the same dir as the sww's
    244                             verbose=False)   
    245 
    246 #MeadowSt Branch 3 Culverts
    247 losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
    248 el0 = numpy.array([[305914.649,6194322.375] , [305913.477,6194321.625]])
    249 el1 = numpy.array([[305950.711,6194335.375] , [305949.539,6194334.625]])
    250    
    251 culvert = Boyd_box_operator(domain,
    252                             losses=losses,
    253                             width=1.5,
    254                             exchange_lines=[el0, el1],
    255                             height=1.0,
    256                             apron=3.1,
    257                             enquiry_gap=10.0,
    258                             use_momentum_jet=True,
    259                             use_velocity_head=True,
    260                             manning=0.013,
    261                             logging=False,
    262                             label=join('Runs', '17H'), # this puts the culvert hydraulics output into the same dir as the sww's
    263                             verbose=False)     
    264 
    265 #13MeadowSt Branch 3 Culverts
    266 losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
    267 el0 = numpy.array([[305911.280,6194359.203] , [305910.260,6194358.017]])
    268 el1 = numpy.array([[305946.090,6194353.573] , [305945.070,6194352.387]])
    269    
    270 culvert = Boyd_box_operator(domain,
    271                             losses=losses,
    272                             width=1.5,
    273                             exchange_lines=[el0, el1],
    274                             height=1.0,
    275                             apron=3.1,
    276                             enquiry_gap=10.0,
    277                             use_momentum_jet=True,
    278                             use_velocity_head=True,
    279                             manning=0.013,
    280                             logging=False,
    281                             label=join('Runs', '18H'), # this puts the culvert hydraulics output into the same dir as the sww's
    282                             verbose=False)     
    283 
    284 #41AngelStBranch3Culverts
    285 losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
    286 el0 = numpy.array([[306196.779,6194028.193] , [306192.221,6194010.807]])
    287 el1 = numpy.array([[306200.154,6194018.693] , [306195.596,6194001.307]])
    288    
    289 culvert = Boyd_box_operator(domain,
    290                             losses=losses,
    291                             width=10.0,
    292                             exchange_lines=[el0, el1],
    293                             height=0.35,
    294                             apron=3.1,
    295                             enquiry_gap=10.0,
    296                             use_momentum_jet=True,
    297                             use_velocity_head=True,
    298                             manning=0.013,
    299                             logging=False,
    300                             label=join('Runs', '19H'), # this puts the culvert hydraulics output into the same dir as the sww's
    301                             verbose=False)       
    302 
    303 #CarrollSt Branch 7 Culverts
    304 losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
    305 el0 = numpy.array([[308002.045,6193820.163] , [308001.215,6193819.197]])
    306 el1 = numpy.array([[308021.965,6193816.883] , [308021.135,6193815.917]])
    307    
    308 culvert = Boyd_box_operator(domain,
    309                             losses=losses,
    310                             width=1.22,
    311                             exchange_lines=[el0, el1],
    312                             height=0.3,
    313                             apron=3.1,
    314                             enquiry_gap=10.0,
    315                             use_momentum_jet=True,
    316                             use_velocity_head=True,
    317                             manning=0.013,
    318                             logging=False,
    319                             label=join('Runs', '20H'), # this puts the culvert hydraulics output into the same dir as the sww's
    320                             verbose=False)           
    321 
    322 #ParkerRd Branch 7 Culverts
    323 losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
    324 el0 = numpy.array([[308105.832,6193803.622] , [308103.648,6193801.118]])
    325 el1 = numpy.array([[308126.782,6193800.552] , [308124.598,6193798.048]])
    326    
    327 culvert = Boyd_box_operator(domain,
    328                             losses=losses,
    329                             width=3.2,
    330                             exchange_lines=[el0, el1],
    331                             height=0.3,
    332                             apron=3.1,
    333                             enquiry_gap=10.0,
    334                             use_momentum_jet=True,
    335                             use_velocity_head=True,
    336                             manning=0.013,
    337                             logging=False,
    338                             label=join('Runs', '21H'), # this puts the culvert hydraulics output into the same dir as the sww's
    339                             verbose=False)     
    340 
    341 #LakePde Branch 7 Culverts
    342 losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
    343 el0 = numpy.array([[308251.257,6193614.658] , [308248.343,6193618.]])
    344 el1 = numpy.array([[308232.,6193593.] , [308225.,6193596.]])
    345    
    346 culvert = Boyd_box_operator(domain,
    347                             losses=losses,
    348                             width=3.0,
    349                             exchange_lines=[el0, el1],
    350                             height=0.75,
    351                             apron=3.1,
    352                             enquiry_gap=10.0,
    353                             use_momentum_jet=True,
    354                             use_velocity_head=True,
    355                             manning=0.013,
    356                             logging=False,
    357                             label=join('Runs', '22H'), # this puts the culvert hydraulics output into the same dir as the sww's
    358                             verbose=False)                                     
    359 """                                   
    360 
    361 
    362 smoothTS=30. # Smoothing timescale for bridges
    363 # PrincesHwyBridge Towradgi branch
    364 losses = {'inlet':0.0, 'outlet':0.0, 'bend':0.0, 'grate':0.0, 'pier': 1.0, 'other': 0.0}
    365 el0 = numpy.array([[306608.,6193703.] , [306607.,6193700.0]])
    366 el1 = numpy.array([[306624.,6193692.7] , [306623.,6193688.]])
    367 culvert = Boyd_box_operator(domain,
    368                             losses=losses,
    369                             width=12.0,
    370                             exchange_lines=[el0, el1],
    371                             height=3.0,
    372                             apron=0.0,
    373                             enquiry_gap=10.0,
    374                             smoothing_timescale=smoothTS,
    375                             use_momentum_jet=True,
    376                             use_velocity_head=True,
    377                             manning=channel_manning,
    378                             logging=False,
    379                             label=join('Runs', '5H'), # this puts the culvert hydraulics output into the same dir as the sww's
    380                             verbose=False) 
    381 
    382 # PioneerRdBridge Towradgi branch
    383 losses = {'inlet':0.0, 'outlet':0.0, 'bend':0.0, 'grate':0.0, 'pier': 1.0, 'other': 0.0}
    384 el0 = numpy.array([[307623.,6193610.] , [307622.,6193607.]])
    385 el1 = numpy.array([[307610.,6193619.] , [307609., 6193616.]]) 
    386 enq0 = numpy.array([[ 307637., 6193588. ]]) 
    387 enq1 = numpy.array([[ 307596., 6193623. ]]) 
    388 culvert = Boyd_box_operator(domain,
    389                             losses=losses,
    390                             width=20.0,
    391                             exchange_lines=[el0, el1],
    392                             #enquiry_points=[enq0, enq1], # This seemed to make stability worse
    393                             height=3.5,
    394                             apron=0.0,
    395                             enquiry_gap=10.0,
    396                             smoothing_timescale=smoothTS,
    397                             use_momentum_jet=True,
    398                             use_velocity_head=True,
    399                             manning=channel_manning,
    400                             logging=False,
    401                             label=join('Runs', '8H'), # this puts the culvert hydraulics output into the same dir as the sww's
    402                             verbose=False)                           
    403 
    404 # NorthernDistributorBridge Towradgi branch
    405 losses = {'inlet':0.0, 'outlet':0.0, 'bend':0.0, 'grate':0.0, 'pier': 1.0, 'other': 0.0}
    406 el0 = numpy.array([[306985.,6193749.] , [306985.,6193736.]])
    407 el1 = numpy.array([[306950.,6193745.] , [306950.,6193732.]])
    408 
    409 #enq0 = numpy.array([[ 306996., 6193750.]])
    410 #enq1 = numpy.array([[ 306931., 6193738.]])
    411 culvert = Boyd_box_operator(domain,
    412                             losses=losses,
    413                             width=45.0,
    414                             exchange_lines=[el0, el1],
    415                             #enquiry_points=[enq0, enq1],
    416                             height=6.0,
    417                             apron=0.0,
    418                             enquiry_gap=10., #None, #10.0,
    419                             smoothing_timescale=smoothTS,
    420                             use_momentum_jet=True,
    421                             use_velocity_head=True,
    422                             manning=channel_manning,
    423                             logging=False,
    424                             label=join('Runs', '6H'), # this puts the culvert hydraulics output into the same dir as the sww's
    425                             verbose=False)   
    426 
    427 # RailwayBridge Towradgi branch ? (THIS IS THE BRIDGE THAT BLOCKEDAND DAM BREAK OCCURRED) ?
    428 losses = {'inlet':0.0, 'outlet':0.0, 'bend':0.0, 'grate':0.0, 'pier': 1.0, 'other': 0.0}
    429 el0 = numpy.array([[307236.,6193737.] , [307235.,6193733.]])
    430 el1 = numpy.array([[307223.,6193738.] , [307222.,6193734.]])
    431 culvert = Boyd_box_operator(domain,
    432                             losses=losses,
    433                             width=20.0,
    434                             exchange_lines=[el0, el1],
    435                             height=8.0,
    436                             apron=0.0,
    437                             enquiry_gap=20.0,
    438                             smoothing_timescale=smoothTS,
    439                             use_momentum_jet=True,
    440                             use_velocity_head=True,
    441                             manning=channel_manning,
    442                             logging=False,
    443                             label=join('Runs', '7H'), # this puts the culvert hydraulics output into the same dir as the sww's
    444                             verbose=False)
     9def setup_structures(domain):
     10    """
     11    Setup Culvert Data
     12    """
     13   
     14    """
     15    #FIXME: Include these again
     16   
     17    #------------------------------------------------------------------------------
     18    # ENTER CULVERT DATA
     19    #------------------------------------------------------------------------------
     20    # BrookerStCulvert branch 2
     21    losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
     22    el0 = numpy.array([[305772.982,6193988.557] , [305772.378,6193987.823]])
     23    el1 = numpy.array([[305794.592,6193983.907] , [305793.988,6193983.173]])
     24   
     25    ## Adjust el0, el1
     26    #elOffset=0.
     27    #el0M=0.5*(el0[0,:]+el0[1,:]) ; el1M=0.5*(el1[0,:]+el1[1,:]); n0=el0M-el1M; n0=n0/((n0*n0).sum())**0.5;
     28    #el0 = el0   
     29    culvert = Boyd_box_operator(domain,
     30                                losses=losses,
     31                                width=0.9,
     32                                exchange_lines=[el0, el1],
     33                                height=0.9,
     34                                apron=3.0,
     35                                enquiry_gap=10.0,
     36                                use_momentum_jet=True,
     37                                use_velocity_head=True,
     38                                manning=0.013,
     39                                logging=False,
     40                                label=join('Runs', '1H'), # this puts the culvert hydraulics output into the same dir as the sww's
     41                                verbose=False)   
     42   
     43    # MeadowStCulvert branch 2
     44    losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
     45    el0 = numpy.array([[305886.333,6193929.052] , [305883.172,6193922.986]])
     46    el1 = numpy.array([[305906.553,6193910.461] , [305903.393,6193904.395]])
     47       
     48    culvert = Boyd_box_operator(domain,
     49                                losses=losses,
     50                                width=5.4,
     51                                exchange_lines=[el0, el1],
     52                                height=0.6,
     53                                apron=3.0,
     54                                enquiry_gap=10.0,
     55                                use_momentum_jet=True,
     56                                use_velocity_head=True,
     57                                manning=0.013,
     58                                logging=False,
     59                                label=join('Runs', '2H'), # this puts the culvert hydraulics output into the same dir as the sww's
     60                                verbose=False)   
     61   
     62    # WilliamsStCulvert branch 2
     63    losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
     64    el0 = numpy.array([[305945.955,6193836.293] , [305945.125,6193835.387]])
     65    el1 = numpy.array([[306040.565,6193827.573] , [306039.735,6193826.667]])
     66       
     67    culvert = Boyd_box_operator(domain,
     68                                losses=losses,
     69                                width=1.2,
     70                                exchange_lines=[el0, el1],
     71                                height=1.2,
     72                                apron=3.0,
     73                                enquiry_gap=10.0,
     74                                use_momentum_jet=True,
     75                                use_velocity_head=True,
     76                                manning=0.013,
     77                                logging=False,
     78                                label=join('Runs', '3H'), # this puts the culvert hydraulics output into the same dir as the sww's
     79                                verbose=False)     
     80   
     81    # MeadowStCulvert Towradgi branch
     82    losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
     83    el0 = numpy.array([[305812.113,6193591.972] , [305809.390,6193588.820]])
     84    el1 = numpy.array([[305834.913,6193588.382] , [305832.190,6193585.230]])
     85       
     86    culvert = Boyd_box_operator(domain,
     87                                losses=losses,
     88                                width=4.0,
     89                                exchange_lines=[el0, el1],
     90                                height=2.2,
     91                                apron=3.0,
     92                                enquiry_gap=10.0,
     93                                use_momentum_jet=True,
     94                                use_velocity_head=True,
     95                                manning=0.013,
     96                                logging=False,
     97                                label=join('Runs', '4H'), # this puts the culvert hydraulics output into the same dir as the sww's
     98                                verbose=False) 
     99   
     100    # CollinsStCulverts tarra 5 branch
     101    losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
     102    el0 = numpy.array([[306330.608,6194817.116] , [306320.768,6194805.884]])
     103    el1 = numpy.array([[306369.483,6194811.616] , [306359.643,6194800.384]])
     104       
     105    culvert = Boyd_box_operator(domain,
     106                                losses=losses,
     107                                width=3.6,
     108                                exchange_lines=[el0, el1],
     109                                height=0.93,
     110                                apron=3.0,
     111                                enquiry_gap=10.0,
     112                                use_momentum_jet=True,
     113                                use_velocity_head=True,
     114                                manning=0.013,
     115                                logging=False,
     116                                label=join('Runs', '9H'), # this puts the culvert hydraulics output into the same dir as the sww's
     117                                verbose=False)                                     
     118                                       
     119    # Norther Distributor Culverts branch 5
     120    losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
     121    el0 = numpy.array([[306956.242,6194465.589] , [306950.446,6194457.411]])
     122    el1 = numpy.array([[307003.711,6194446.089] , [306997.916,6194437.911]])
     123       
     124    culvert = Boyd_box_operator(domain,
     125                                losses=losses,
     126                                width=9.0,
     127                                exchange_lines=[el0, el1],
     128                                height=0.85,
     129                                apron=3.0,
     130                                enquiry_gap=10.0,
     131                                use_momentum_jet=True,
     132                                use_velocity_head=True,
     133                                manning=0.013,
     134                                logging=False,
     135                                label=join('Runs', '10H'), # this puts the culvert hydraulics output into the same dir as the sww's
     136                                verbose=False)                                     
     137                                       
     138    #CokeWorksCulverts branch 5
     139    losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
     140    el0 = numpy.array([[307142.161,6194181.3065] , [307138.519,6194174.394]])
     141    el1 = numpy.array([[307160.521,6194164.8165] , [307156.879,6194157.904]])
     142       
     143    culvert = Boyd_box_operator(domain,
     144                                losses=losses,
     145                                width=6.2,
     146                                exchange_lines=[el0, el1],
     147                                height=3.0,
     148                                apron=3.1,
     149                                enquiry_gap=10.0,
     150                                use_momentum_jet=True,
     151                                use_velocity_head=True,
     152                                manning=0.013,
     153                                logging=False,
     154                                label=join('Runs', '11H'), # this puts the culvert hydraulics output into the same dir as the sww's
     155                                verbose=False)                                     
     156                                       
     157    #Northern Distributor Branch 6 Culverts
     158    losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
     159    el0 = numpy.array([[306950.758,6193454.717] , [306947.804,6193453.283]])
     160    el1 = numpy.array([[306988.633,6193474.217] , [306985.679,6193472.783]])
     161       
     162    culvert = Boyd_box_operator(domain,
     163                                losses=losses,
     164                                width=3.6,
     165                                exchange_lines=[el0, el1],
     166                                height=1.2,
     167                                apron=3.1,
     168                                enquiry_gap=10.0,
     169                                use_momentum_jet=True,
     170                                use_velocity_head=True,
     171                                manning=0.013,
     172                                logging=False,
     173                                label=join('Runs', '12H'), # this puts the culvert hydraulics output into the same dir as the sww's
     174                                verbose=False)                                     
     175                                       
     176    #Railway Branch 6 Culverts
     177    losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
     178    el0 = numpy.array([[307139.134,6193474.458] , [307138.492,6193473.542]])
     179    el1 = numpy.array([[307150.884,6193469.458] , [307150.242,6193468.542]])
     180       
     181    culvert = Boyd_box_operator(domain,
     182                                losses=losses,
     183                                width=3.6,
     184                                exchange_lines=[el0, el1],
     185                                height=1.2,
     186                                apron=3.1,
     187                                enquiry_gap=10.0,
     188                                use_momentum_jet=True,
     189                                use_velocity_head=True,
     190                                manning=0.013,
     191                                logging=False,
     192                                label=join('Runs', '13H'), # this puts the culvert hydraulics output into the same dir as the sww's
     193                                verbose=False)
     194   
     195    #Colgong Branch6 Culverts
     196    losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
     197    el0 = numpy.array([[307200.610,6193476.765] , [307199.140,6193475.235]])
     198    el1 = numpy.array([[307224.610,6193475.765] , [307223.140,6193474.235]])
     199       
     200    culvert = Boyd_box_operator(domain,
     201                                losses=losses,
     202                                width=2.1,
     203                                exchange_lines=[el0, el1],
     204                                height=1.0,
     205                                apron=3.1,
     206                                enquiry_gap=10.0,
     207                                use_momentum_jet=True,
     208                                use_velocity_head=True,
     209                                manning=0.013,
     210                                logging=False,
     211                                label=join('Runs', '14H'), # this puts the culvert hydraulics output into the same dir as the sww's
     212                                verbose=False)   
     213                                       
     214    #Basin Outlet Branch 3 Culverts
     215    losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
     216    el0 = numpy.array([[305629.639,6194408.883] , [305626.521,6194400.457]])
     217    el1 = numpy.array([[305665.889,6194347.183] , [305662.771,6194338.757]])
     218       
     219    culvert = Boyd_box_operator(domain,
     220                                losses=losses,
     221                                width=6.0,
     222                                exchange_lines=[el0, el1],
     223                                height=0.86,
     224                                apron=3.1,
     225                                enquiry_gap=10.0,
     226                                use_momentum_jet=True,
     227                                use_velocity_head=True,
     228                                manning=0.013,
     229                                logging=False,
     230                                label=join('Runs', '15H'), # this puts the culvert hydraulics output into the same dir as the sww's
     231                                verbose=False)                                     
     232                                       
     233    #BellambiRd Branch 3 Culverts
     234    losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
     235    el0 = numpy.array([[305777.182,6194305.377] , [305776.444,6194304.623]])
     236    el1 = numpy.array([[305873.807,6194303.377] , [305873.069,6194302.623]])
     237       
     238    culvert = Boyd_box_operator(domain,
     239                                losses=losses,
     240                                width=1.05,
     241                                exchange_lines=[el0, el1],
     242                                height=1.0,
     243                                apron=3.1,
     244                                enquiry_gap=10.0,
     245                                use_momentum_jet=True,
     246                                use_velocity_head=True,
     247                                manning=0.013,
     248                                logging=False,
     249                                label=join('Runs', '16H'), # this puts the culvert hydraulics output into the same dir as the sww's
     250                                verbose=False)   
     251   
     252    #MeadowSt Branch 3 Culverts
     253    losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
     254    el0 = numpy.array([[305914.649,6194322.375] , [305913.477,6194321.625]])
     255    el1 = numpy.array([[305950.711,6194335.375] , [305949.539,6194334.625]])
     256       
     257    culvert = Boyd_box_operator(domain,
     258                                losses=losses,
     259                                width=1.5,
     260                                exchange_lines=[el0, el1],
     261                                height=1.0,
     262                                apron=3.1,
     263                                enquiry_gap=10.0,
     264                                use_momentum_jet=True,
     265                                use_velocity_head=True,
     266                                manning=0.013,
     267                                logging=False,
     268                                label=join('Runs', '17H'), # this puts the culvert hydraulics output into the same dir as the sww's
     269                                verbose=False)     
     270   
     271    #13MeadowSt Branch 3 Culverts
     272    losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
     273    el0 = numpy.array([[305911.280,6194359.203] , [305910.260,6194358.017]])
     274    el1 = numpy.array([[305946.090,6194353.573] , [305945.070,6194352.387]])
     275       
     276    culvert = Boyd_box_operator(domain,
     277                                losses=losses,
     278                                width=1.5,
     279                                exchange_lines=[el0, el1],
     280                                height=1.0,
     281                                apron=3.1,
     282                                enquiry_gap=10.0,
     283                                use_momentum_jet=True,
     284                                use_velocity_head=True,
     285                                manning=0.013,
     286                                logging=False,
     287                                label=join('Runs', '18H'), # this puts the culvert hydraulics output into the same dir as the sww's
     288                                verbose=False)     
     289   
     290    #41AngelStBranch3Culverts
     291    losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
     292    el0 = numpy.array([[306196.779,6194028.193] , [306192.221,6194010.807]])
     293    el1 = numpy.array([[306200.154,6194018.693] , [306195.596,6194001.307]])
     294       
     295    culvert = Boyd_box_operator(domain,
     296                                losses=losses,
     297                                width=10.0,
     298                                exchange_lines=[el0, el1],
     299                                height=0.35,
     300                                apron=3.1,
     301                                enquiry_gap=10.0,
     302                                use_momentum_jet=True,
     303                                use_velocity_head=True,
     304                                manning=0.013,
     305                                logging=False,
     306                                label=join('Runs', '19H'), # this puts the culvert hydraulics output into the same dir as the sww's
     307                                verbose=False)       
     308   
     309    #CarrollSt Branch 7 Culverts
     310    losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
     311    el0 = numpy.array([[308002.045,6193820.163] , [308001.215,6193819.197]])
     312    el1 = numpy.array([[308021.965,6193816.883] , [308021.135,6193815.917]])
     313       
     314    culvert = Boyd_box_operator(domain,
     315                                losses=losses,
     316                                width=1.22,
     317                                exchange_lines=[el0, el1],
     318                                height=0.3,
     319                                apron=3.1,
     320                                enquiry_gap=10.0,
     321                                use_momentum_jet=True,
     322                                use_velocity_head=True,
     323                                manning=0.013,
     324                                logging=False,
     325                                label=join('Runs', '20H'), # this puts the culvert hydraulics output into the same dir as the sww's
     326                                verbose=False)           
     327   
     328    #ParkerRd Branch 7 Culverts
     329    losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
     330    el0 = numpy.array([[308105.832,6193803.622] , [308103.648,6193801.118]])
     331    el1 = numpy.array([[308126.782,6193800.552] , [308124.598,6193798.048]])
     332       
     333    culvert = Boyd_box_operator(domain,
     334                                losses=losses,
     335                                width=3.2,
     336                                exchange_lines=[el0, el1],
     337                                height=0.3,
     338                                apron=3.1,
     339                                enquiry_gap=10.0,
     340                                use_momentum_jet=True,
     341                                use_velocity_head=True,
     342                                manning=0.013,
     343                                logging=False,
     344                                label=join('Runs', '21H'), # this puts the culvert hydraulics output into the same dir as the sww's
     345                                verbose=False)     
     346   
     347    #LakePde Branch 7 Culverts
     348    losses = {'inlet':0.5, 'outlet':1.0, 'bend':0.0, 'grate':0.0, 'pier': 0.0, 'other': 0.0}
     349    el0 = numpy.array([[308251.257,6193614.658] , [308248.343,6193618.]])
     350    el1 = numpy.array([[308232.,6193593.] , [308225.,6193596.]])
     351       
     352    culvert = Boyd_box_operator(domain,
     353                                losses=losses,
     354                                width=3.0,
     355                                exchange_lines=[el0, el1],
     356                                height=0.75,
     357                                apron=3.1,
     358                                enquiry_gap=10.0,
     359                                use_momentum_jet=True,
     360                                use_velocity_head=True,
     361                                manning=0.013,
     362                                logging=False,
     363                                label=join('Runs', '22H'), # this puts the culvert hydraulics output into the same dir as the sww's
     364                                verbose=False)                                     
     365    """                                   
     366   
     367   
     368    smoothTS=30. # Smoothing timescale for bridges
     369    # PrincesHwyBridge Towradgi branch
     370    losses = {'inlet':0.0, 'outlet':0.0, 'bend':0.0, 'grate':0.0, 'pier': 1.0, 'other': 0.0}
     371    el0 = numpy.array([[306608.,6193703.] , [306607.,6193700.0]])
     372    el1 = numpy.array([[306624.,6193692.7] , [306623.,6193688.]])
     373    culvert = Boyd_box_operator(domain,
     374                                losses=losses,
     375                                width=12.0,
     376                                exchange_lines=[el0, el1],
     377                                height=3.0,
     378                                apron=0.0,
     379                                enquiry_gap=10.0,
     380                                smoothing_timescale=smoothTS,
     381                                use_momentum_jet=True,
     382                                use_velocity_head=True,
     383                                manning=channel_manning,
     384                                logging=False,
     385                                label=join('Runs', '5H'), # this puts the culvert hydraulics output into the same dir as the sww's
     386                                verbose=False) 
     387   
     388    # PioneerRdBridge Towradgi branch
     389    losses = {'inlet':0.0, 'outlet':0.0, 'bend':0.0, 'grate':0.0, 'pier': 1.0, 'other': 0.0}
     390    el0 = numpy.array([[307623.,6193610.] , [307622.,6193607.]])
     391    el1 = numpy.array([[307610.,6193619.] , [307609., 6193616.]]) 
     392    enq0 = numpy.array([[ 307637., 6193588. ]]) 
     393    enq1 = numpy.array([[ 307596., 6193623. ]]) 
     394    culvert = Boyd_box_operator(domain,
     395                                losses=losses,
     396                                width=20.0,
     397                                exchange_lines=[el0, el1],
     398                                #enquiry_points=[enq0, enq1], # This seemed to make stability worse
     399                                height=3.5,
     400                                apron=0.0,
     401                                enquiry_gap=10.0,
     402                                smoothing_timescale=smoothTS,
     403                                use_momentum_jet=True,
     404                                use_velocity_head=True,
     405                                manning=channel_manning,
     406                                logging=False,
     407                                label=join('Runs', '8H'), # this puts the culvert hydraulics output into the same dir as the sww's
     408                                verbose=False)                           
     409   
     410    # NorthernDistributorBridge Towradgi branch
     411    losses = {'inlet':0.0, 'outlet':0.0, 'bend':0.0, 'grate':0.0, 'pier': 1.0, 'other': 0.0}
     412    el0 = numpy.array([[306985.,6193749.] , [306985.,6193736.]])
     413    el1 = numpy.array([[306950.,6193745.] , [306950.,6193732.]])
     414   
     415    #enq0 = numpy.array([[ 306996., 6193750.]])
     416    #enq1 = numpy.array([[ 306931., 6193738.]])
     417    culvert = Boyd_box_operator(domain,
     418                                losses=losses,
     419                                width=45.0,
     420                                exchange_lines=[el0, el1],
     421                                #enquiry_points=[enq0, enq1],
     422                                height=6.0,
     423                                apron=0.0,
     424                                enquiry_gap=10., #None, #10.0,
     425                                smoothing_timescale=smoothTS,
     426                                use_momentum_jet=True,
     427                                use_velocity_head=True,
     428                                manning=channel_manning,
     429                                logging=False,
     430                                label=join('Runs', '6H'), # this puts the culvert hydraulics output into the same dir as the sww's
     431                                verbose=False)   
     432   
     433    # RailwayBridge Towradgi branch ? (THIS IS THE BRIDGE THAT BLOCKEDAND DAM BREAK OCCURRED) ?
     434    losses = {'inlet':0.0, 'outlet':0.0, 'bend':0.0, 'grate':0.0, 'pier': 1.0, 'other': 0.0}
     435    el0 = numpy.array([[307236.,6193737.] , [307235.,6193733.]])
     436    el1 = numpy.array([[307223.,6193738.] , [307222.,6193734.]])
     437    culvert = Boyd_box_operator(domain,
     438                                losses=losses,
     439                                width=20.0,
     440                                exchange_lines=[el0, el1],
     441                                height=8.0,
     442                                apron=0.0,
     443                                enquiry_gap=20.0,
     444                                smoothing_timescale=smoothTS,
     445                                use_momentum_jet=True,
     446                                use_velocity_head=True,
     447                                manning=channel_manning,
     448                                logging=False,
     449                                label=join('Runs', '7H'), # this puts the culvert hydraulics output into the same dir as the sww's
     450                                verbose=False)
Note: See TracChangeset for help on using the changeset viewer.