Changeset 5314
- Timestamp:
- May 13, 2008, 5:17:03 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/Rudy_vandrie_2007/culvert_development.py
r5305 r5314 388 388 if openings[0].depth < epsilon: 389 389 # Do nothing because No water over Opening That is Set Flow to Zero!! 390 self.openings[0]. flow= 0391 self.openings[1]. flow= 0390 self.openings[0].rate = 0 391 self.openings[1].rate = 0 392 392 393 393 elif openings[0].depth > 0: … … 401 401 # Flow will go from opening 0 to opening 1 402 402 #- that is abstract from [0] and add to [1] 403 self.openings[0]. flow= -flow_rate_control404 self.openings[1]. flow= flow_rate_control403 self.openings[0].rate = -flow_rate_control 404 self.openings[1].rate = flow_rate_control 405 405 406 406 # Add jet in the form of absolute momentum to opening 1 … … 456 456 s = 'T=%.2f, Culvert Discharge = %.3f Culv. Vel. %0.3f'\ 457 457 %(time, flow_rate_control, outlet_vel) 458 s += ' Depth= %0.3f Momentum = %0.3f' %(outlet_dep, outlet_mom) 458 s += ' Depth= %0.3f Momentum = (%0.3f, %0.3f)'\ 459 %(outlet_dep, outlet_mom_x,outlet_mom_y) 460 s += ' Momentum rate: (%.4f, %.4f)'\ 461 %(xmomentum_rate, ymomentum_rate) 459 462 fid.write(s) 460 463 print s 461 462 463 464 else: 464 465 # Opening 1 has the greatest depth. Therefore Reverse the Flow !!! 465 466 # Flow will go from opening 1 to opening 0, That is Abstract from [1] and add to [0] 466 self.openings[0]. flow= flow_rate_control # Else it will be Orifice Flow (Going US)467 self.openings[1]. flow= -flow_rate_control467 self.openings[0].rate = flow_rate_control # Else it will be Orifice Flow (Going US) 468 self.openings[1].rate = -flow_rate_control 468 469 469 470 # Second Else.... if water at outlet before at inlet !!! 470 471 471 472 472 473 self.openings[1].rate = 10 473 474 # Execute flow term for each opening 474 475 # This is where Inflow objects are evaluated and update the domain … … 561 562 # domain.write_time() 562 563 563 #if domain.get_time() >= 4 and tap. flow!= 0.0:564 #if domain.get_time() >= 4 and tap.rate != 0.0: 564 565 # print 'Turning tap off' 565 # tap. flow= 0.0566 # tap.rate = 0.0 566 567 567 #if domain.get_time() >= 3 and sink. flow< 0.0:568 #if domain.get_time() >= 3 and sink.rate < 0.0: 568 569 # print 'Turning drain on' 569 # sink. flow= -0.8570 # sink.rate = -0.8 570 571 # Close 571 572
Note: See TracChangeset
for help on using the changeset viewer.