Changeset 7996


Ignore:
Timestamp:
Sep 2, 2010, 5:39:00 PM (14 years ago)
Author:
habili
Message:

Confirming if the correct Culvert Velocity is being used, that is the resultant of Delta_Total_Energy

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  
    2828                 use_momentum_jet=True,
    2929                 use_velocity_head=True,
     30                 description=None,
    3031                 verbose=False):
    3132                     
     
    3940                                                       manning,
    4041                                                       enquiry_gap,
     42                                                       description,
    4143                                                       verbose)           
    4244       
     
    120122
    121123        # Stats
    122         self.discharge  = outflow_extra_height*self.outflow.get_area()/timestep
    123         self.velocity = self.discharge/outlet_depth/self.width
     124        self.discharge  = Q#outflow_extra_height*self.outflow.get_area()/timestep
     125        self.velocity = barrel_speed#self.discharge/outlet_depth/self.width
    124126
    125127        new_outflow_height = self.outflow.get_average_height() + outflow_extra_height
     
    185187
    186188            if self.use_velocity_head :
    187                 driving_energy = self.inflow.get_enquiry_specific_energy()
     189                self.driving_energy = self.inflow.get_enquiry_specific_energy()
    188190            else:
    189                 driving_energy = self.inflow.get_enquiry_height()
     191                self.driving_energy = self.inflow.get_enquiry_height()
    190192
    191193            height = self.culvert_height
    192194            width = self.culvert_width
    193195            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
    197201
    198202            # FIXME(Ole): Are these functions really for inlet control?
     
    202206                if dcrit > height:
    203207                    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
    205213                outlet_culvert_depth = dcrit
    206214                case = 'Inlet unsubmerged Box Acts as Weir'
    207             else:
     215            else: # Inlet Submerged but check internal culvert flow depth
    208216                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
    211226                case = 'Inlet submerged Box Acts as Orifice'
    212227
    213228            dcrit = (Q**2/g/width**2)**0.333333
    214 
     229            # May not need this .... check if same is done above
    215230            outlet_culvert_depth = dcrit
    216231            if outlet_culvert_depth > height:
     
    223238                perimeter = width+2*outlet_culvert_depth
    224239                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:
    227248                # Calculate flows for outlet control
    228249
     
    252273                    log_to_file(self.log_filename, s)
    253274
    254                 # Outlet control velocity using tail water
     275                # Final Outlet control velocity using tail water
    255276                culvert_velocity = math.sqrt(self.delta_total_energy/((self.sum_loss/2/g)+(self.manning**2*self.culvert_length)/hyd_rad**1.33333))
    256277                Q_outlet_tailwater = flow_area * culvert_velocity
  • trunk/anuga_core/source/anuga/structures/structure_operator.py

    r7995 r7996  
    2525                 manning,
    2626                 enquiry_gap,
     27                 description,
    2728                 verbose):
    2829       
     
    4243        self.manning = manning
    4344        self.enquiry_gap = enquiry_gap
     45        self.description = description
    4446        self.verbose = verbose
    4547
    4648        self.discharge = 0.0
    4749        self.velocity = 0.0
     50        self.delta_total_energy = 0.0
     51        self.driving_energy = 0.0
    4852       
    4953        self.__create_exchange_polygons()
     
    156160
    157161        message = '---------------------------\n'
    158         message += 'Structure report:\n'
     162        message += 'Structure report for structure %s:\n' % self.description
    159163        message += '--------------------------\n'
    160164        message += 'Discharge [m^3/s]: %.2f\n' % self.discharge
    161165        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
    163168#        message += 'Net boundary flow by tags [m^3/s]\n'
    164169#        for tag in boundary_flows:
Note: See TracChangeset for help on using the changeset viewer.