Ignore:
Timestamp:
Mar 26, 2009, 10:16:27 AM (15 years ago)
Author:
ole
Message:

Added culvert test info from Petar. One tests doesn't pass, but values are in the ballpark.

Also found error in calculations. Changed /2*g to /2/g


File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/culvert_flows/culvert_routines.py

    r6299 r6623  
    2828                                   manning=0.0,
    2929                                   sum_loss=0.0,
     30                                   max_velocity=10.0,
    3031                                   log_filename=None):
    3132
     
    4748
    4849
    49     if inlet_depth > 0.01:
     50    if inlet_depth > 0.1: #this value was 0.01:
    5051        # Water has risen above inlet
    5152       
     
    116117
    117118                # Outlet control velocity using tail water
    118                 culvert_velocity = sqrt(delta_total_energy/((sum_loss/2*g)+(manning**2*culvert_length)/hyd_rad**1.33333))
     119                culvert_velocity = sqrt(delta_total_energy/((sum_loss/2/g)+(manning**2*culvert_length)/hyd_rad**1.33333))
    119120                Q_outlet_tailwater = flow_area * culvert_velocity
    120121               
     
    183184
    184185                # Outlet control velocity using tail water
    185                 culvert_velocity = sqrt(delta_total_energy/((sum_loss/2*g)+(manning**2*culvert_length)/hyd_rad**1.33333))
     186                culvert_velocity = sqrt(delta_total_energy/((sum_loss/2/g)+(manning**2*culvert_length)/hyd_rad**1.33333))
    186187                Q_outlet_tailwater = flow_area * culvert_velocity
    187188
     
    216217    else: # inlet_depth < 0.01:
    217218        Q = barrel_velocity = outlet_culvert_depth = 0.0
     219
     220    # Temporary flow limit
     221    if barrel_velocity > max_velocity:
     222        if log_filename is not None:                           
     223            s = 'Barrel velocity was reduced from = %f m/s to %f m/s' % (barrel_velocity, max_velocity)
     224            log_to_file(log_filename, s)
     225       
     226        barrel_velocity = max_velocity
     227        Q = flow_area * barrel_velocity
     228       
     229       
     230
    218231       
    219232    return Q, barrel_velocity, outlet_culvert_depth
Note: See TracChangeset for help on using the changeset viewer.