- Timestamp:
- Nov 19, 2010, 2:53:46 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/structures/boyd_pipe_operator.py
r8056 r8073 38 38 enquiry_points, 39 39 width=diameter, 40 height=None,40 depth=None, 41 41 apron=apron, 42 42 manning=manning, … … 73 73 self.case = 'N/A' 74 74 75 75 76 def __determine_inflow_outflow(self): 77 # Determine flow direction based on total energy difference 78 79 if self.use_velocity_head: 80 self.delta_total_energy = self.inlets[0].get_enquiry_total_energy() - self.inlets[1].get_enquiry_total_energy() 81 else: 82 self.delta_total_energy = self.inlets[0].get_enquiry_stage() - self.inlets[1].get_enquiry_stage() 83 84 self.inflow = self.inlets[0] 85 self.outflow = self.inlets[1] 86 87 if self.delta_total_energy < 0: 88 self.inflow = self.inlets[1] 89 self.outflow = self.inlets[0] 90 self.delta_total_energy = -self.delta_total_energy 91 76 92 def discharge_routine(self): 93 94 self.__determine_inflow_outflow() 77 95 78 96 local_debug ='false' … … 81 99 #pdb.set_trace() 82 100 83 if self.inflow.get_enquiry_ height() > 0.01: #this value was 0.01: Remember this needs to be compared to the Invert Lvl101 if self.inflow.get_enquiry_depth() > 0.01: #this value was 0.01: Remember this needs to be compared to the Invert Lvl 84 102 if local_debug =='true': 85 103 anuga.log.critical('Specific E & Deltat Tot E = %s, %s' … … 96 114 self.driving_energy = self.inflow.get_enquiry_specific_energy() 97 115 else: 98 self.driving_energy = self.inflow.get_enquiry_ height()116 self.driving_energy = self.inflow.get_enquiry_depth() 99 117 """ 100 118 For a circular pipe the Boyd method reviews 3 conditions … … 109 127 110 128 local_debug ='false' 111 if self.inflow.get_average_ height() > 0.01: #this should test against invert129 if self.inflow.get_average_depth() > 0.01: #this should test against invert 112 130 if local_debug =='true': 113 131 anuga.log.critical('Specific E & Deltat Tot E = %s, %s' … … 167 185 168 186 # Determine the depth at the outlet relative to the depth of flow in the Culvert 169 if self.outflow.get_average_ height() > diameter: # Outlet is submerged Assume the end of the Pipe is flowing FULL187 if self.outflow.get_average_depth() > diameter: # Outlet is submerged Assume the end of the Pipe is flowing FULL 170 188 outlet_culvert_depth=diameter 171 189 flow_area = (diameter/2)**2 * math.pi # Cross sectional area of flow in the culvert … … 176 194 anuga.log.critical('Outlet submerged') 177 195 else: # Culvert running PART FULL for PART OF ITS LENGTH Here really should use the Culvert Slope to calculate Actual Culvert Depth & Velocity 178 # IF self.outflow.get_average_ height() < diameter196 # IF self.outflow.get_average_depth() < diameter 179 197 dcrit1 = diameter/1.26*(Q/anuga.g**0.5*diameter**2.5)**(1/3.75) 180 198 dcrit2 = diameter/0.95*(Q/anuga.g**0.5*diameter**2.5)**(1/1.95) … … 243 261 barrel_velocity = Q/(flow_area + anuga.velocity_protection/flow_area) 244 262 245 else: # self.inflow.get_average_ height() < 0.01:263 else: # self.inflow.get_average_depth() < 0.01: 246 264 Q = barrel_velocity = outlet_culvert_depth = 0.0 247 265
Note: See TracChangeset
for help on using the changeset viewer.