Changeset 9624


Ignore:
Timestamp:
Feb 6, 2015, 9:49:22 AM (10 years ago)
Author:
davies
Message:

bugfix

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/anuga/parallel/parallel_structure_operator.py

    r9620 r9624  
    278278                dt_Q_on_d = 0.0
    279279
    280             factor = 1.0/(1.0 + dt_Q_on_d/self.inflow.get_area())
     280            factor = 1.0/(1.0 + dt_Q_on_d/inflow_area)
    281281            new_inflow_depth = old_inflow_depth*factor
    282282
     
    306306                # replaced with old_inflow_mom
    307307                #
    308                 factor2 = 1.0/(1.0 + dt_Q_on_d*new_inflow_depth/self.inflow.get_area())
     308                factor2 = 1.0/(1.0 + dt_Q_on_d*new_inflow_depth/inflow_area)
    309309                new_inflow_xmom = old_inflow_xmom*factor2
    310310                new_inflow_ymom = old_inflow_ymom*factor2
     
    349349        if self.myid == self.master_proc:
    350350            loss = (old_inflow_depth - new_inflow_depth)*inflow_area
    351             xmom_loss = (old_inflow_xmom - new_inflow_xmom)*self.inflow.get_area()
    352             ymom_loss = (old_inflow_ymom - new_inflow_ymom)*self.inflow.get_area()
     351            xmom_loss = (old_inflow_xmom - new_inflow_xmom)*inflow_area
     352            ymom_loss = (old_inflow_ymom - new_inflow_ymom)*inflow_area
    353353
    354354            # set outflow
     
    404404                # structures where barrel_speed is unknown + direction doesn't
    405405                # change from inflow to outflow
    406                 new_outflow_xmom = self.outflow.get_average_xmom() + xmom_loss/self.outflow.get_area()
    407                 new_outflow_ymom = self.outflow.get_average_ymom() + ymom_loss/self.outflow.get_area()
     406                new_outflow_xmom = self.outflow.get_average_xmom() + xmom_loss/outflow_area
     407                new_outflow_ymom = self.outflow.get_average_ymom() + ymom_loss/outflow_area
    408408
    409409            # master proc of structure sends outflow attributes to all outflow procs
  • trunk/anuga_work/development/gareth/tests/ras_bridge/channel_floodplain1.py

    r9623 r9624  
    182182               [floodplain_width/2. + chan_width/2.-0.01, bridge_us+0.01] ]
    183183
    184 #hecras_discharge_function = hecras_internal_boundary_function(
    185 #    'hecras_bridge_table_high_deck.csv',
    186 #    allow_sign_reversal=True)
    187 
    188 #bridge = Internal_boundary_operator(
    189 #    domain,
    190 #    hecras_discharge_function,
    191 #    width=chan_width,
    192 #    height=1.3,
    193 #    end_points=None,
    194 #    exchange_lines=[bridge_in, bridge_out],
    195 #    invert_elevation=-3.5,
    196 #    enquiry_gap=0.01,
    197 #    use_velocity_head=False,
    198 #    smoothing_timescale=30.0,
    199 #    logging=True)
     184hecras_discharge_function = hecras_internal_boundary_function(
     185    'hecras_bridge_table_high_deck.csv',
     186    allow_sign_reversal=True)
     187
     188bridge = Internal_boundary_operator(
     189    domain,
     190    hecras_discharge_function,
     191    width=chan_width,
     192    height=1.3,
     193    end_points=None,
     194    exchange_lines=[bridge_in, bridge_out],
     195    invert_elevation=-3.5,
     196    enquiry_gap=0.01,
     197    use_velocity_head=False,
     198    smoothing_timescale=30.0,
     199    logging=True)
    200200   
    201201#------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.