Ignore:
Timestamp:
Aug 20, 2010, 5:27:03 PM (14 years ago)
Author:
steve
Message:

Got a flow from one region to another.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/structures/testing_culvert.py

    r7960 r7962  
    3333width = 5.
    3434
    35 dx = dy = 1           # Resolution: Length of subdivisions on both axes
     35dx = dy = 0.5          # Resolution: Length of subdivisions on both axes
    3636
    3737points, vertices, boundary = rectangular_cross(int(length/dx),
     
    8585
    8686filename=os.path.join(path, 'example_rating_curve.csv')
    87 culvert = Generic_box_culvert(domain,
     87culvert1 = Generic_box_culvert(domain,
    8888                              end_point0=[9.0, 2.5],
    8989                              end_point1=[13.0, 2.5],
     
    9191                              verbose=False)
    9292
    93 #domain.forcing_terms.append(culvert)
    9493
     94#culvert2 = Generic_box_culvert(domain,
     95#                              end_point0=[19.0, 2.5],
     96#                              end_point1=[25.0, 2.5],
     97#                              width=1.00,
     98#                              verbose=False)
     99
     100
     101
     102
     103#print domain.fractional_step_operators
     104
     105#domain.apply_fractional_steps()
    95106
    96107##-----------------------------------------------------------------------
     
    99110
    100111## Inflow based on Flow Depth and Approaching Momentum
    101 #Bi = anuga.Dirichlet_boundary([0.0, 0.0, 0.0])
    102 #Br = anuga.Reflective_boundary(domain)              # Solid reflective wall
     112Bi = anuga.Dirichlet_boundary([1.0, 0.0, 0.0])
     113Br = anuga.Reflective_boundary(domain)              # Solid reflective wall
    103114#Bo = anuga.Dirichlet_boundary([-5, 0, 0])           # Outflow
    104115
     
    111122            #lambda t: [-5*(num.cos(2*pi*(t-4)/20)), 0.0, 0.0])
    112123#domain.set_boundary({'left': Btus, 'right': Btds, 'top': Br, 'bottom': Br})
     124domain.set_boundary({'left': Bi, 'right': Br, 'top': Br, 'bottom': Br})
    113125
    114126
     
    119131#min_delta_w = sys.maxint
    120132#max_delta_w = -min_delta_w
    121 #for t in domain.evolve(yieldstep = 1, finaltime = 25):
     133for t in domain.evolve(yieldstep = 1.0, finaltime = 300):
     134    domain.write_time()
    122135    #delta_w = culvert.inlet.stage - culvert.outlet.stage
    123136   
     
    125138    #if delta_w < min_delta_w: min_delta_w = delta_w           
    126139   
    127     #pass
     140    pass
    128141
    129142## Check that extreme values in rating curve have been exceeded
Note: See TracChangeset for help on using the changeset viewer.