Changeset 8859
- Timestamp:
- May 9, 2013, 12:17:00 PM (12 years ago)
- Location:
- trunk/anuga_core/source/anuga/structures
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/structures/run_gate_operator.py
r8858 r8859 10 10 import anuga 11 11 12 from anuga.structures.boyd_ pipe_operator import Boyd_pipe_operator12 from anuga.structures.boyd_box_operator import Boyd_box_operator 13 13 from anuga.structures.inlet_operator import Inlet_operator 14 14 … … 41 41 len2=width) 42 42 domain = anuga.Domain(points, vertices, boundary) 43 domain.set_name('run_ culvert_inlet') # Output name43 domain.set_name('run_gate_operator') # Output name 44 44 domain.set_default_order(2) 45 45 #domain.set_beta(1.5) … … 89 89 90 90 91 92 Boyd_pipe_operator(domain, 91 gate = Boyd_box_operator(domain, 93 92 end_points=[[9.0, 2.5],[13.0, 2.5]], 94 93 losses=1.5, 95 diameter=1.5,94 width=1.5, 96 95 apron=5.0, 97 96 use_momentum_jet=True, … … 101 100 102 101 102 gate.set_culvert_height(10.0) 103 103 104 line = [[0.0, 5.0], [0.0, 10.0]] 104 Q = 5.0105 Q = 1.0 105 106 Inlet_operator(domain, line, Q) 106 107 … … 113 114 114 115 ## Inflow based on Flow Depth and Approaching Momentum 115 Bi = anuga.Dirichlet_boundary([2.0, 0.0, 0.0])116 116 Br = anuga.Reflective_boundary(domain) # Solid reflective wall 117 #Bo = anuga.Dirichlet_boundary([-5, 0, 0]) # Outflow118 117 119 ## Upstream and downstream conditions that will exceed the rating curve120 ## I.e produce delta_h outside the range [0, 10] specified in the the121 ## file example_rating_curve.csv122 #Btus = anuga.Time_boundary(domain, \123 #lambda t: [100*num.sin(2*pi*(t-4)/10), 0.0, 0.0])124 #Btds = anuga.Time_boundary(domain, \125 #lambda t: [-5*(num.cos(2*pi*(t-4)/20)), 0.0, 0.0])126 #domain.set_boundary({'left': Btus, 'right': Btds, 'top': Br, 'bottom': Br})127 118 domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br}) 128 119 … … 134 125 #min_delta_w = sys.maxint 135 126 #max_delta_w = -min_delta_w 136 for t in domain.evolve(yieldstep = 1.0, finaltime = 200):127 for t in domain.evolve(yieldstep = 1.0, finaltime = 50): 137 128 domain.write_time() 129 130 131 if num.allclose(t, 10.0): 132 gate.set_culvert_height(0.000001) 133 134 Q, velocity, depth = gate.discharge_routine() 135 136 print gate.culvert_height 137 print Q 138 print velocity 139 print depth 140 138 141 139 142 #if domain.get_time() > 150.5 and domain.get_time() < 151.5 : … … 146 149 #if delta_w < min_delta_w: min_delta_w = delta_w 147 150 148 print domain.volumetric_balance_statistics()151 #print domain.volumetric_balance_statistics() 149 152 150 153 pass -
trunk/anuga_core/source/anuga/structures/structure_operator.py
r8858 r8859 210 210 211 211 212 def set_ height(self, height):213 214 self. height = height215 216 def set_ width(self, width):217 218 self. width = width212 def set_culvert_height(self, height): 213 214 self.culvert_height = height 215 216 def set_culvert_width(self, width): 217 218 self.culvert_width = width 219 219 220 220
Note: See TracChangeset
for help on using the changeset viewer.