- Timestamp:
- Sep 2, 2010, 11:12:53 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/structures/culvert_operator.py
r7985 r7989 25 25 manning=0.013, 26 26 enquiry_gap=0.2, 27 use_momentum_jet=True, 28 use_velocity_head=True, 27 29 verbose=False): 28 30 … … 43 45 self.enquiry_gap = enquiry_gap 44 46 self.verbose = verbose 47 48 self.use_momentum_jet = use_momentum_jet 49 self.use_velocity_head= use_velocity_head 45 50 46 51 self.culvert = Boyd_box_culvert(self.domain, … … 51 56 self.manning, 52 57 self.enquiry_gap, 58 self.use_velocity_head, 53 59 self.verbose) 54 60 … … 110 116 111 117 112 outflow_extra_height = Q*timestep_star/outflow.get_area() 113 outflow_direction = - outflow.outward_culvert_vector 114 outflow_extra_momentum = outflow_extra_height*barrel_speed*outflow_direction 115 116 117 gain = outflow_extra_height*outflow.get_area() 118 119 #print Q, Q*timestep, barrel_speed, outlet_depth, Qstar, factor, timestep_star 120 #print ' ', loss, gain 121 122 123 new_outflow_height = outflow.get_average_height() + outflow_extra_height 124 new_outflow_xmom = outflow.get_average_xmom() + outflow_extra_momentum[0] 125 new_outflow_ymom = outflow.get_average_ymom() + outflow_extra_momentum[1] 126 127 outflow.set_heights(new_outflow_height) 128 129 outflow.set_xmoms(barrel_speed*new_outflow_height*outflow_direction[0]) 130 outflow.set_ymoms(barrel_speed*new_outflow_height*outflow_direction[1]) 131 132 #outflow.set_xmoms(new_outflow_xmom) 133 #outflow.set_ymoms(new_outflow_ymom) 134 135 #print ' outflow volume ',outflow.get_total_water_volume() 118 outflow_extra_height = Q*timestep_star/outflow.get_area() 119 outflow_direction = - outflow.outward_culvert_vector 120 outflow_extra_momentum = outflow_extra_height*barrel_speed*outflow_direction 121 122 123 gain = outflow_extra_height*outflow.get_area() 124 125 #print Q, Q*timestep, barrel_speed, outlet_depth, Qstar, factor, timestep_star 126 #print ' ', loss, gain 127 128 129 130 new_outflow_height = outflow.get_average_height() + outflow_extra_height 131 132 133 if self.use_momentum_jet : 134 # FIXME (SR) Review momentum to account for possible hydraulic jumps at outlet 135 #new_outflow_xmom = outflow.get_average_xmom() + outflow_extra_momentum[0] 136 #new_outflow_ymom = outflow.get_average_ymom() + outflow_extra_momentum[1] 137 138 new_outflow_xmom = barrel_speed*new_outflow_height*outflow_direction[0] 139 new_outflow_ymom = barrel_speed*new_outflow_height*outflow_direction[1] 140 141 else: 142 #new_outflow_xmom = outflow.get_average_xmom() 143 #new_outflow_ymom = outflow.get_average_ymom() 144 145 new_outflow_xmom = 0.0 146 new_outflow_ymom = 0.0 147 148 149 outflow.set_heights(new_outflow_height) 150 outflow.set_xmoms(new_outflow_xmom) 151 outflow.set_ymoms(new_outflow_ymom) 152 153 154 155 #print ' outflow volume ',outflow.get_total_water_volume() 136 156 137 157 def print_stats(self):
Note: See TracChangeset
for help on using the changeset viewer.