Changeset 7995
- Timestamp:
- Sep 2, 2010, 4:01:03 PM (14 years ago)
- Location:
- trunk/anuga_core/source/anuga/structures
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/structures/boyd_box_operator.py
r7993 r7995 48 48 self.culvert_height = self.get_culvert_height() 49 49 50 50 51 self.sum_loss = 0.0 51 52 self.max_velocity = 10.0 52 53 self.log_filename = None 53 54 54 55 self.inlets = self.get_inlets() 56 57 58 # Stats 59 60 self.discharge = 0.0 61 self.velocity = 0.0 55 62 56 63 … … 111 118 #print Q, Q*timestep, barrel_speed, outlet_depth, Qstar, factor, timestep_star 112 119 #print ' ', loss, gain 120 121 # Stats 122 self.discharge = outflow_extra_height*self.outflow.get_area()/timestep 123 self.velocity = self.discharge/outlet_depth/self.width 113 124 114 125 new_outflow_height = self.outflow.get_average_height() + outflow_extra_height -
trunk/anuga_core/source/anuga/structures/structure_operator.py
r7993 r7995 6 6 7 7 class Structure_operator: 8 """ Culvert flow- transfer water from one rectangular box to another.8 """Structure Operator - transfer water from one rectangular box to another. 9 9 Sets up the geometry of problem 10 10 … … 43 43 self.enquiry_gap = enquiry_gap 44 44 self.verbose = verbose 45 46 self.discharge = 0.0 47 self.velocity = 0.0 45 48 46 49 self.__create_exchange_polygons() … … 149 152 print '=====================================' 150 153 151 154 155 def structure_statistics(self): 156 157 message = '---------------------------\n' 158 message += 'Structure report:\n' 159 message += '--------------------------\n' 160 message += 'Discharge [m^3/s]: %.2f\n' % self.discharge 161 message += 'Velocity [m/s]: %.2f\n' % self.velocity 162 # message += 'Total boundary outflow [m^3/s]: %.2f\n' % total_boundary_outflow 163 # message += 'Net boundary flow by tags [m^3/s]\n' 164 # for tag in boundary_flows: 165 # message += ' %s [m^3/s]: %.2f\n' % (tag, boundary_flows[tag]) 166 # 167 # message += 'Total net boundary flow [m^3/s]: %.2f\n' % \ 168 # (total_boundary_inflow + total_boundary_outflow) 169 # message += 'Total volume in domain [m^3]: %.2f\n' % \ 170 # self.compute_total_volume() 171 # 172 # # The go through explicit forcing update and record the rate of change 173 # # for stage and 174 # # record into forcing_inflow and forcing_outflow. Finally compute 175 # # integral of depth to obtain total volume of domain. 176 # 177 # FIXME(Ole): This part is not yet done. 178 179 return message 180 152 181 def get_inlets(self): 153 182 -
trunk/anuga_core/source/anuga/structures/testing_wide_bridge.py
r7994 r7995 256 256 print domain.timestepping_statistics() 257 257 print domain.volumetric_balance_statistics() 258 for culvert in culverts: 259 print culvert.structure_statistics() 258 260 259 261
Note: See TracChangeset
for help on using the changeset viewer.