Changeset 7996
- Timestamp:
- Sep 2, 2010, 5:39:00 PM (14 years ago)
- Location:
- trunk/anuga_core/source/anuga/structures
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/structures/boyd_box_operator.py
r7995 r7996 28 28 use_momentum_jet=True, 29 29 use_velocity_head=True, 30 description=None, 30 31 verbose=False): 31 32 … … 39 40 manning, 40 41 enquiry_gap, 42 description, 41 43 verbose) 42 44 … … 120 122 121 123 # Stats 122 self.discharge = outflow_extra_height*self.outflow.get_area()/timestep123 self.velocity = self.discharge/outlet_depth/self.width124 self.discharge = Q#outflow_extra_height*self.outflow.get_area()/timestep 125 self.velocity = barrel_speed#self.discharge/outlet_depth/self.width 124 126 125 127 new_outflow_height = self.outflow.get_average_height() + outflow_extra_height … … 185 187 186 188 if self.use_velocity_head : 187 driving_energy = self.inflow.get_enquiry_specific_energy()189 self.driving_energy = self.inflow.get_enquiry_specific_energy() 188 190 else: 189 driving_energy = self.inflow.get_enquiry_height()191 self.driving_energy = self.inflow.get_enquiry_height() 190 192 191 193 height = self.culvert_height 192 194 width = self.culvert_width 193 195 flow_width = self.culvert_width 194 195 Q_inlet_unsubmerged = 0.540*g**0.5*width*driving_energy**1.50 # Flow based on Inlet Ctrl Inlet Unsubmerged 196 Q_inlet_submerged = 0.702*g**0.5*width*height**0.89*driving_energy**0.61 # Flow based on Inlet Ctrl Inlet Submerged 196 # intially assume the culvert flow is controlled by the inlet 197 # check unsubmerged and submerged condition and use Min Q 198 # but ensure the correct flow area and wetted perimeter are used 199 Q_inlet_unsubmerged = 0.544*g**0.5*width*self.driving_energy**1.50 # Flow based on Inlet Ctrl Inlet Unsubmerged 200 Q_inlet_submerged = 0.702*g**0.5*width*height**0.89*self.driving_energy**0.61 # Flow based on Inlet Ctrl Inlet Submerged 197 201 198 202 # FIXME(Ole): Are these functions really for inlet control? … … 202 206 if dcrit > height: 203 207 dcrit = height 204 flow_area = width*dcrit 208 flow_area = width*dcrit 209 perimeter= 2.0*(width+dcrit) 210 else: # dcrit < height 211 flow_area = width*dcrit 212 perimeter= 2.0*dcrit+width 205 213 outlet_culvert_depth = dcrit 206 214 case = 'Inlet unsubmerged Box Acts as Weir' 207 else: 215 else: # Inlet Submerged but check internal culvert flow depth 208 216 Q = Q_inlet_submerged 209 flow_area = width*height 210 outlet_culvert_depth = height 217 dcrit = (Q**2/g/width**2)**0.333333 218 if dcrit > height: 219 dcrit = height 220 flow_area = width*dcrit 221 perimeter= 2.0*(width+dcrit) 222 else: # dcrit < height 223 flow_area = width*dcrit 224 perimeter= 2.0*dcrit+width 225 outlet_culvert_depth = dcrit 211 226 case = 'Inlet submerged Box Acts as Orifice' 212 227 213 228 dcrit = (Q**2/g/width**2)**0.333333 214 229 # May not need this .... check if same is done above 215 230 outlet_culvert_depth = dcrit 216 231 if outlet_culvert_depth > height: … … 223 238 perimeter = width+2*outlet_culvert_depth 224 239 case = 'INLET CTRL Culvert is open channel flow we will for now assume critical depth' 225 226 if self.delta_total_energy < driving_energy: 240 # Initial Estimate of Flow for Outlet Control using energy slope 241 #( may need to include Culvert Bed Slope Comparison) 242 hyd_rad = flow_area/perimeter 243 culvert_velocity = math.sqrt(self.delta_total_energy/((self.sum_loss/2/g)+(self.manning**2*self.culvert_length)/hyd_rad**1.33333)) 244 Q_outlet_tailwater = flow_area * culvert_velocity 245 246 247 if self.delta_total_energy < self.driving_energy: 227 248 # Calculate flows for outlet control 228 249 … … 252 273 log_to_file(self.log_filename, s) 253 274 254 # Outlet control velocity using tail water275 # Final Outlet control velocity using tail water 255 276 culvert_velocity = math.sqrt(self.delta_total_energy/((self.sum_loss/2/g)+(self.manning**2*self.culvert_length)/hyd_rad**1.33333)) 256 277 Q_outlet_tailwater = flow_area * culvert_velocity -
trunk/anuga_core/source/anuga/structures/structure_operator.py
r7995 r7996 25 25 manning, 26 26 enquiry_gap, 27 description, 27 28 verbose): 28 29 … … 42 43 self.manning = manning 43 44 self.enquiry_gap = enquiry_gap 45 self.description = description 44 46 self.verbose = verbose 45 47 46 48 self.discharge = 0.0 47 49 self.velocity = 0.0 50 self.delta_total_energy = 0.0 51 self.driving_energy = 0.0 48 52 49 53 self.__create_exchange_polygons() … … 156 160 157 161 message = '---------------------------\n' 158 message += 'Structure report :\n'162 message += 'Structure report for structure %s:\n' % self.description 159 163 message += '--------------------------\n' 160 164 message += 'Discharge [m^3/s]: %.2f\n' % self.discharge 161 165 message += 'Velocity [m/s]: %.2f\n' % self.velocity 162 # message += 'Total boundary outflow [m^3/s]: %.2f\n' % total_boundary_outflow 166 message += 'Inlet Driving Energy %.2f\n' % self.driving_energy 167 message += 'delta total energy %.2f\n' % self.delta_total_energy 163 168 # message += 'Net boundary flow by tags [m^3/s]\n' 164 169 # for tag in boundary_flows:
Note: See TracChangeset
for help on using the changeset viewer.