Changeset 5585
- Timestamp:
- Jul 30, 2008, 4:06:55 PM (15 years ago)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/culvert_flows/culvert_class.py
r5584 r5585 4 4 from anuga.utilities.polygon import inside_polygon 5 5 from anuga.utilities.polygon import is_inside_polygon 6 from anuga.utilities.polygon import plot_polygons 7 6 8 7 9 … … 53 55 blockage_bottup=None, 54 56 culvert_routine=None, 57 number_of_barrels=1, 55 58 verbose=False): 56 59 … … 88 91 assert self.culvert_type in ['circle', 'square', 'rectangle'] 89 92 93 assert number_of_barrels >= 1 94 self.number_of_barrels = number_of_barrels 95 96 90 97 # Set defaults 91 98 if manning is None: manning = 0.012 # Set a Default Mannings Roughness for Pipe … … 118 125 end_point1, 119 126 width=width, 120 height=height) 127 height=height, 128 number_of_barrels=number_of_barrels) 121 129 122 130 if verbose is True: … … 128 136 # P['enquiry_polygon1']], 129 137 # figname='culvert_polygon_output') 138 #import sys; sys.exit() 130 139 131 140 … … 362 371 log_to_file(log_filename, s) 363 372 364 373 374 # Calculate discharge for one barrel 365 375 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 367 381 barrel_momentum = barrel_velocity*culvert_outlet_depth 368 382 -
anuga_core/source/anuga/culvert_flows/culvert_polygons.py
r5301 r5585 10 10 width, height=None, 11 11 enquiry_gap_factor=1.0, 12 enquiry_shape_factor=2.0): 12 enquiry_shape_factor=2.0, 13 number_of_barrels=1): 13 14 """Create polygons at the end of a culvert inlet and outlet. 14 15 At either end two polygons will be created; one for the actual flow to pass through and one a little further away … … 26 27 (large value widens polygon but reduces height 27 28 to preserve same area as exchange polygon) 29 number_of_barrels - number of identical pipes. 28 30 29 31 Output: … … 55 57 length = sqrt(sum(vector**2)) 56 58 59 # Adjust polygon width to number of barrels in this culvert 60 width *= number_of_barrels 61 62 57 63 # Unit direction vector and normal 58 64 vector /= length -
anuga_work/development/culvert_flow/culvert_boyd_channel.py
r5437 r5585 158 158 width=1.20,height=0.75, 159 159 culvert_routine=boyd_generalised_culvert_model, 160 number_of_barrels=2, 160 161 verbose=True) 161 162
Note: See TracChangeset
for help on using the changeset viewer.