Changeset 9624
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/anuga/parallel/parallel_structure_operator.py
r9620 r9624 278 278 dt_Q_on_d = 0.0 279 279 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) 281 281 new_inflow_depth = old_inflow_depth*factor 282 282 … … 306 306 # replaced with old_inflow_mom 307 307 # 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) 309 309 new_inflow_xmom = old_inflow_xmom*factor2 310 310 new_inflow_ymom = old_inflow_ymom*factor2 … … 349 349 if self.myid == self.master_proc: 350 350 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 353 353 354 354 # set outflow … … 404 404 # structures where barrel_speed is unknown + direction doesn't 405 405 # 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 408 408 409 409 # master proc of structure sends outflow attributes to all outflow procs -
trunk/anuga_work/development/gareth/tests/ras_bridge/channel_floodplain1.py
r9623 r9624 182 182 [floodplain_width/2. + chan_width/2.-0.01, bridge_us+0.01] ] 183 183 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)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) 200 200 201 201 #------------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.