- Timestamp:
- Jul 22, 2009, 9:22:11 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/culvert_flows/culvert_routines.py
r7276 r7317 86 86 if inlet_depth > 0.1: #this value was 0.01: 87 87 if local_debug =='true': 88 print 'Specific E & Deltat Tot E = ',inlet_specific_energy,delta_total_energy 89 print 'culvert typ = ',culvert_type 88 log.critical('Specific E & Deltat Tot E = %s, %s' 89 % (str(inlet_specific_energy), 90 str(delta_total_energy))) 91 log.critical('culvert type = %s' % str(culvert_type)) 90 92 # Water has risen above inlet 91 93 … … 138 140 flow_width= diameter 139 141 case = 'Inlet CTRL Outlet submerged Circular PIPE FULL' 140 if local_debug =='true': 141 print 'Inlet CTRL Outlet submerged Circular PIPE FULL' 142 if local_debug == 'true': 143 log.critical('Inlet CTRL Outlet submerged Circular ' 144 'PIPE FULL') 142 145 else: 143 146 #alpha = acos(1 - outlet_culvert_depth/diameter) # Where did this Come From ????/ … … 149 152 case = 'INLET CTRL Culvert is open channel flow we will for now assume critical depth' 150 153 if local_debug =='true': 151 print 'INLET CTRL Culvert is open channel flow we will for now assume critical depth' 152 print 'Q Outlet Depth and ALPHA = ',Q,' ',outlet_culvert_depth,' ',alpha 154 log.critical('INLET CTRL Culvert is open channel flow ' 155 'we will for now assume critical depth') 156 log.critical('Q Outlet Depth and ALPHA = %s, %s, %s' 157 % (str(Q), str(outlet_culvert_depth), 158 str(alpha))) 153 159 if delta_total_energy < inlet_specific_energy: # OUTLET CONTROL !!!! 154 160 # Calculate flows for outlet control … … 162 168 case = 'Outlet submerged' 163 169 if local_debug =='true': 164 print 'Outlet submerged'170 log.critical('Outlet submerged') 165 171 else: # Culvert running PART FULL for PART OF ITS LENGTH Here really should use the Culvert Slope to calculate Actual Culvert Depth & Velocity 166 172 # IF outlet_depth < diameter … … 178 184 case = 'Outlet unsubmerged PIPE FULL' 179 185 if local_debug =='true': 180 print 'Outlet unsubmerged PIPE FULL'186 log.critical('Outlet unsubmerged PIPE FULL') 181 187 else: 182 188 alpha = acos(1-2*outlet_culvert_depth/diameter)*2 … … 185 191 perimeter = alpha*diameter/2.0 186 192 case = 'Outlet is open channel flow we will for now assume critical depth' 187 if local_debug =='true': 188 print 'Q Outlet Depth and ALPHA = ',Q,' ',outlet_culvert_depth,' ',alpha 189 print 'Outlet is open channel flow we will for now assume critical depth' 190 if local_debug =='true': 191 print 'FLOW AREA = ',flow_area 192 print 'PERIMETER = ',perimeter 193 print 'Q Interim = ',Q 193 if local_debug == 'true': 194 log.critical('Q Outlet Depth and ALPHA = %s, %s, %s' 195 % (str(Q), str(outlet_culvert_depth), 196 str(alpha))) 197 log.critical('Outlet is open channel flow we ' 198 'will for now assume critical depth') 199 if local_debug == 'true': 200 log.critical('FLOW AREA = %s' % str(flow_area)) 201 log.critical('PERIMETER = %s' % str(perimeter)) 202 log.critical('Q Interim = %s' % str(Q)) 194 203 hyd_rad = flow_area/perimeter 195 204 … … 200 209 # Outlet control velocity using tail water 201 210 if local_debug =='true': 202 print 'GOT IT ALL CALCULATING Velocity'203 print 'HydRad = ',hyd_rad211 log.critical('GOT IT ALL CALCULATING Velocity') 212 log.critical('HydRad = %s' % str(hyd_rad)) 204 213 culvert_velocity = sqrt(delta_total_energy/((sum_loss/2/g)+(manning**2*culvert_length)/hyd_rad**1.33333)) 205 214 Q_outlet_tailwater = flow_area * culvert_velocity 206 215 if local_debug =='true': 207 print 'VELOCITY = ',culvert_velocity208 print 'Outlet Ctrl Q = ',Q_outlet_tailwater216 log.critical('VELOCITY = %s' % str(culvert_velocity)) 217 log.critical('Outlet Ctrl Q = %s' % str(Q_outlet_tailwater)) 209 218 if log_filename is not None: 210 219 s = 'Q_outlet_tailwater = %.6f' %Q_outlet_tailwater … … 212 221 Q = min(Q, Q_outlet_tailwater) 213 222 if local_debug =='true': 214 print ('%s,%.3f,%.3f' %('dcrit 1 , dcit2 =',dcrit1,dcrit2)) 215 print ('%s,%.3f,%.3f,%.3f' %('Q and Velocity and Depth=',Q,culvert_velocity,outlet_culvert_depth)) 223 log.critical('%s,%.3f,%.3f' 224 % ('dcrit 1 , dcit2 =',dcrit1,dcrit2)) 225 log.critical('%s,%.3f,%.3f,%.3f' 226 % ('Q and Velocity and Depth=', Q, 227 culvert_velocity, outlet_culvert_depth)) 216 228 217 229 else: … … 221 233 222 234 #else.... 223 if culvert_type == 'box':224 if local_debug == 'true':225 print 'BOX CULVERT'235 if culvert_type == 'box': 236 if local_debug == 'true': 237 log.critical('BOX CULVERT') 226 238 # Box culvert (rectangle or square) ======================================================================================================================== 227 239 … … 318 330 culv_froude=sqrt(Q**2*flow_width/(g*flow_area**3)) 319 331 if local_debug =='true': 320 print 'FLOW AREA = ',flow_area321 print 'PERIMETER = ',perimeter322 print 'Q final = ',Q323 print 'FROUDE = ',culv_froude332 log.critical('FLOW AREA = %s' % str(flow_area)) 333 log.critical('PERIMETER = %s' % str(perimeter)) 334 log.critical('Q final = %s' % str(Q)) 335 log.critical('FROUDE = %s' % str(culv_froude)) 324 336 if log_filename is not None: 325 337 s = 'Froude in Culvert = %f' % culv_froude
Note: See TracChangeset
for help on using the changeset viewer.