Changeset 5585


Ignore:
Timestamp:
Jul 30, 2008, 4:06:55 PM (11 years ago)
Author:
ole
Message:

Multibarrel culvert functionality.

Files:
3 edited

Legend:

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

    r5584 r5585  
    44from anuga.utilities.polygon import inside_polygon
    55from anuga.utilities.polygon import is_inside_polygon
     6from anuga.utilities.polygon import plot_polygons
     7
    68
    79
     
    5355                 blockage_bottup=None,
    5456                 culvert_routine=None,
     57                 number_of_barrels=1,
    5558                 verbose=False):
    5659       
     
    8891        assert self.culvert_type in ['circle', 'square', 'rectangle']
    8992       
     93        assert number_of_barrels >= 1
     94        self.number_of_barrels = number_of_barrels
     95       
     96       
    9097        # Set defaults
    9198        if manning is None: manning = 0.012   # Set a Default Mannings Roughness for Pipe
     
    118125                                    end_point1,
    119126                                    width=width,   
    120                                     height=height)
     127                                    height=height,
     128                                    number_of_barrels=number_of_barrels)
    121129       
    122130        if verbose is True:
     
    128136            #               P['enquiry_polygon1']],
    129137            #              figname='culvert_polygon_output')
     138            #import sys; sys.exit()                           
    130139
    131140
     
    362371        log_to_file(log_filename, s)
    363372
    364        
     373
     374        # Calculate discharge for one barrel
    365375        Q, barrel_velocity, culvert_outlet_depth = self.culvert_routine(self, inlet, outlet, delta_Et, g)
    366         #####################################################
     376       
     377        # Adjust discharge for multiple barrels
     378        Q *= self.number_of_barrels
     379
     380        # Compute barrel momentum
    367381        barrel_momentum = barrel_velocity*culvert_outlet_depth
    368382               
  • anuga_core/source/anuga/culvert_flows/culvert_polygons.py

    r5301 r5585  
    1010                            width, height=None,
    1111                            enquiry_gap_factor=1.0,
    12                             enquiry_shape_factor=2.0):
     12                            enquiry_shape_factor=2.0,
     13                            number_of_barrels=1):
    1314    """Create polygons at the end of a culvert inlet and outlet.
    1415    At either end two polygons will be created; one for the actual flow to pass through and one a little further away
     
    2627                               (large value widens polygon but reduces height
    2728                               to preserve same area as exchange polygon)
     29        number_of_barrels - number of identical pipes.
    2830       
    2931    Output:
     
    5557    length = sqrt(sum(vector**2))
    5658
     59    # Adjust polygon width to number of barrels in this culvert
     60    width *= number_of_barrels
     61   
     62   
    5763    # Unit direction vector and normal
    5864    vector /= length
  • anuga_work/development/culvert_flow/culvert_boyd_channel.py

    r5437 r5585  
    158158                       width=1.20,height=0.75,
    159159                       culvert_routine=boyd_generalised_culvert_model,       
     160                       number_of_barrels=2,
    160161                       verbose=True)
    161162
Note: See TracChangeset for help on using the changeset viewer.