Changeset 5314


Ignore:
Timestamp:
May 13, 2008, 5:17:03 PM (17 years ago)
Author:
ole
Message:

Work on culverts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/Rudy_vandrie_2007/culvert_development.py

    r5305 r5314  
    388388        if openings[0].depth < epsilon:
    389389            # Do nothing because No water over Opening  That is Set Flow to Zero!!
    390             self.openings[0].flow = 0
    391             self.openings[1].flow = 0
     390            self.openings[0].rate = 0
     391            self.openings[1].rate = 0
    392392 
    393393        elif openings[0].depth > 0:
     
    401401                # Flow will go from opening 0 to opening 1
    402402                #- that is abstract from [0] and add to [1]
    403                 self.openings[0].flow = -flow_rate_control
    404                 self.openings[1].flow = flow_rate_control
     403                self.openings[0].rate = -flow_rate_control
     404                self.openings[1].rate = flow_rate_control
    405405
    406406                # Add jet in the form of absolute momentum to opening 1
     
    456456                    s = 'T=%.2f, Culvert Discharge = %.3f  Culv. Vel. %0.3f'\
    457457                        %(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)                   
    459462                    fid.write(s)
    460463                    print s
    461                    
    462 
    463464            else:
    464465                # Opening 1 has the greatest depth. Therefore Reverse the Flow !!!
    465466                # 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_control
     467                self.openings[0].rate = flow_rate_control        # Else it will be Orifice Flow (Going US)
     468                self.openings[1].rate = -flow_rate_control
    468469
    469470        # Second Else.... if water at outlet before at inlet !!!
    470471
    471472
    472        
     473        self.openings[1].rate = 10
    473474        # Execute flow term for each opening
    474475        # This is where Inflow objects are evaluated and update the domain
     
    561562    #    domain.write_time()
    562563   
    563     #if domain.get_time() >= 4 and tap.flow != 0.0:
     564    #if domain.get_time() >= 4 and tap.rate != 0.0:
    564565    #    print 'Turning tap off'
    565     #    tap.flow = 0.0
     566    #    tap.rate = 0.0
    566567       
    567     #if domain.get_time() >= 3 and sink.flow < 0.0:
     568    #if domain.get_time() >= 3 and sink.rate < 0.0:
    568569    #    print 'Turning drain on'
    569     #    sink.flow = -0.8       
     570    #    sink.rate = -0.8       
    570571    # Close
    571572
Note: See TracChangeset for help on using the changeset viewer.