Changeset 9130
- Timestamp:
- Jun 2, 2014, 12:50:04 PM (11 years ago)
- Location:
- trunk/anuga_core/source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/structures/riverwall.py
r9125 r9130 124 124 } 125 125 126 127 self.hydraulic_variable_names=['Qfactor', 's1', 's2', 'h1', 'h2'] 128 #self.hydraulic_variable_names=('Qfactor',) 126 # DO NOT CHANGE THE ORDER OF hydraulic_variable_names 127 # It needs to match hard-coded assumptions in C [compute_fluxes_central] 128 # If you add a variable, append it to the end of hydraulic_variable_names 129 self.hydraulic_variable_names=('Qfactor', 's1', 's2', 'h1', 'h2') 129 130 130 131 self.ncol_hydraulic_properties=len(self.hydraulic_variable_names) -
trunk/anuga_core/source/anuga/structures/structure_operator.py
r9013 r9130 212 212 new_inflow_xmom = old_inflow_xmom*factor 213 213 new_inflow_ymom = old_inflow_ymom*factor 214 214 215 215 self.inflow.set_depths(new_inflow_depth) 216 216 … … 251 251 new_inflow_xmom = old_inflow_xmom/old_inflow_depth*new_inflow_depth 252 252 new_inflow_ymom = old_inflow_ymom/old_inflow_depth*new_inflow_depth 253 254 253 self.inflow.set_depths(new_inflow_depth) 255 254 self.inflow.set_xmoms(new_inflow_xmom) -
trunk/anuga_core/source/anuga_parallel/parallel_boyd_box_operator.py
r9029 r9130 32 32 manning=0.013, 33 33 enquiry_gap=0.0, 34 smoothing_timescale=0.0, 34 35 use_momentum_jet=True, 35 36 use_velocity_head=True, … … 96 97 self.case = 'N/A' 97 98 99 self.domain=domain 100 # May/June 2014 -- allow 'smoothing ' of driving_energy, delta total energy, and outflow_enq_depth 101 self.smoothing_timescale=0. 102 self.smooth_driving_energy=0. 103 self.smooth_delta_total_energy=0. 104 self.smooth_outflow_enq_depth=0. 105 # Set them based on a call to the discharge routine with smoothing_timescale=0. 106 # [values of self.smooth_* are required in discharge_routine, hence dummy values above] 107 Qvd=self.discharge_routine() 108 self.smooth_driving_energy=1.0*self.driving_energy 109 self.smooth_delta_total_energy=1.0*self.delta_total_energy 110 self.smooth_outflow_enq_depth=Qvd[2] 111 # Finally, set the smoothing timescale we actually want 112 self.smoothing_timescale=smoothing_timescale 113 98 114 ''' 99 115 print "ATTRIBUTES OF PARALLEL BOYD BOX::" … … 235 251 self.driving_energy = inflow_enq_depth 236 252 253 # May/June 2014 -- change the driving forces gradually, with forward euler timestepping 254 ts=self.domain.timestep/max(self.domain.timestep, self.smoothing_timescale,1.0e-06) 255 self.smooth_driving_energy=self.smooth_driving_energy+\ 256 ts*(self.driving_energy-self.smooth_driving_energy) 257 self.smooth_delta_total_energy=self.smooth_delta_total_energy+\ 258 ts*(self.delta_total_energy-self.smooth_delta_total_energy) 259 self.smooth_outflow_enq_depth=self.smooth_outflow_enq_depth+\ 260 ts*(outflow_enq_depth-self.smooth_outflow_enq_depth) 261 237 262 238 263 Q, barrel_velocity, outlet_culvert_depth, flow_area, case = \ … … 241 266 flow_width =self.culvert_width, 242 267 length =self.culvert_length, 243 driving_energy =self.driving_energy, 244 delta_total_energy =self.delta_total_energy, 245 outlet_enquiry_depth=outflow_enq_depth, 268 #driving_energy =self.driving_energy, 269 #delta_total_energy =self.delta_total_energy, 270 #outlet_enquiry_depth=outflow_enq_depth, 271 # Allow smoothing of the driving energies 272 driving_energy =self.smooth_driving_energy, 273 delta_total_energy =self.smooth_delta_total_energy, 274 outlet_enquiry_depth=self.smooth_outflow_enq_depth, 246 275 sum_loss =self.sum_loss, 247 276 manning =self.manning) -
trunk/anuga_core/source/anuga_parallel/parallel_operator_factory.py
r9029 r9130 127 127 manning=0.013, 128 128 enquiry_gap=0.0, 129 smoothing_timescale=0.0, 129 130 use_momentum_jet=True, 130 131 use_velocity_head=True, … … 256 257 manning=manning, 257 258 enquiry_gap=enquiry_gap, 259 smoothing_timescale=smoothing_timescale, 258 260 use_momentum_jet=use_momentum_jet, 259 261 use_velocity_head=use_velocity_head,
Note: See TracChangeset
for help on using the changeset viewer.