Changeset 7991


Ignore:
Timestamp:
Sep 2, 2010, 11:19:06 AM (14 years ago)
Author:
steve
Message:

Finally resolved conflicts between nariman and steve

Location:
trunk/anuga_core/source/anuga/structures
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/structures/boyd_box_culvert.py

    r7986 r7991  
    2020                 manning,
    2121                 enquiry_gap,
     22                 use_velocity_head,
    2223                 verbose=False):
    2324
    24         culvert.Culvert.__init__(self, domain, end_points, width, height, apron, manning, enquiry_gap, verbose)
    25        
     25
     26        culvert.Culvert.__init__(self,
     27                                 domain,
     28                                 end_points,
     29                                 width,
     30                                 height,
     31                                 apron,
     32                                 manning,
     33                                 enquiry_gap,
     34                                 use_velocity_head,
     35                                 verbose)
     36
     37
    2638        self.routine = boyd_box_routine.Boyd_box_routine(self)
    2739
  • trunk/anuga_core/source/anuga/structures/boyd_box_routine.py

    r7988 r7991  
    8787            assert self.inflow.get_enquiry_specific_energy() >= 0.0, msg
    8888
     89            if self.use_velocity_head :
     90                driving_energy = self.inflow.get_enquiry_specific_energy()
     91            else:
     92                driving_energy = self.get_enquiry_height
     93
    8994            height = self.culvert_height
    9095            width = self.culvert_width
    9196            flow_width = self.culvert_width
    9297
    93             Q_inlet_unsubmerged = 0.540*g**0.5*width*self.inflow.get_enquiry_specific_energy()**1.50 # Flow based on Inlet Ctrl Inlet Unsubmerged
    94             Q_inlet_submerged = 0.702*g**0.5*width*height**0.89*self.inflow.get_enquiry_specific_energy()**0.61  # Flow based on Inlet Ctrl Inlet Submerged
     98            Q_inlet_unsubmerged = 0.540*g**0.5*width*driving_energy**1.50 # Flow based on Inlet Ctrl Inlet Unsubmerged
     99            Q_inlet_submerged = 0.702*g**0.5*width*height**0.89*driving_energy**0.61  # Flow based on Inlet Ctrl Inlet Submerged
    95100
    96101            # FIXME(Ole): Are these functions really for inlet control?
     
    122127                case = 'INLET CTRL Culvert is open channel flow we will for now assume critical depth'
    123128
    124             if self.delta_total_energy < self.inflow.get_enquiry_specific_energy():
     129            if self.delta_total_energy < driving_energy:
    125130                # Calculate flows for outlet control
    126131
  • trunk/anuga_core/source/anuga/structures/culvert.py

    r7986 r7991  
    2525                 manning,
    2626                 enquiry_gap,
     27                 use_velocity_head,
    2728                 verbose):
    2829       
     
    3738       
    3839        self.enquiry_gap = enquiry_gap
     40        self.use_velocity_head = use_velocity_head
    3941        self.verbose=verbose
    4042       
  • trunk/anuga_core/source/anuga/structures/culvert_routine.py

    r7984 r7991  
    3131        self.manning = manning
    3232        self.log_filename = None
     33
     34        self.use_velocity_head = True
     35       
     36
    3337       
    3438        self.determine_inflow()
     
    5054        # Determine flow direction based on total energy difference
    5155
    52         self.delta_total_energy = self.inlets[0].get_enquiry_total_energy() - self.inlets[1].get_enquiry_total_energy()
     56        if self.use_velocity_head:
     57            self.delta_total_energy = self.inlets[0].get_enquiry_total_energy() - self.inlets[1].get_enquiry_total_energy()
     58        else:
     59            self.delta_total_energy = self.inlets[0].get_enquiry_stage() - self.inlets[1].get_enquiry_stage()
     60
    5361
    5462        self.inflow  = self.inlets[0]
Note: See TracChangeset for help on using the changeset viewer.