- Timestamp:
- Jun 4, 2010, 10:03:48 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/culvert_flows/test_culvert_class.py
r7711 r7778 12 12 from anuga.abstract_2d_finite_volumes.quantity import Quantity 13 13 14 from anuga.shallow_water import Domain, Reflective_boundary,\ 15 Dirichlet_boundary,\ 16 Transmissive_boundary, Time_boundary 17 18 from anuga.culvert_flows.culvert_class import Culvert_flow, Culvert_flow_rating, Culvert_flow_energy 14 import anuga 15 16 from anuga.culvert_flows.culvert_class import Culvert_flow, \ 17 Culvert_flow_rating, Culvert_flow_energy 19 18 from anuga.culvert_flows.culvert_routines import boyd_generalised_culvert_model 20 19 21 from math import pi, pow,sqrt20 from math import pi, pow, sqrt 22 21 23 22 import numpy as num … … 38 37 len1=length, 39 38 len2=width) 40 domain = Domain(points, vertices, boundary)39 domain = anuga.Domain(points, vertices, boundary) 41 40 domain.set_name('Test_culvert_shallow') # Output name 42 41 domain.set_default_order(2) … … 105 104 # Inflow based on Flow Depth and Approaching Momentum 106 105 107 Br = Reflective_boundary(domain) # Solid reflective wall106 Br = anuga.Reflective_boundary(domain) # Solid reflective wall 108 107 domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br}) 109 108 … … 152 151 len1=length, 153 152 len2=width) 154 domain = Domain(points, vertices, boundary)153 domain = anuga.Domain(points, vertices, boundary) 155 154 domain.set_name('Test_culvert') # Output name 156 155 domain.set_default_order(2) … … 214 213 215 214 # Inflow based on Flow Depth and Approaching Momentum 216 Bi = Dirichlet_boundary([0.0, 0.0, 0.0])217 Br = Reflective_boundary(domain) # Solid reflective wall218 Bo = Dirichlet_boundary([-5, 0, 0]) # Outflow215 Bi = anuga.Dirichlet_boundary([0.0, 0.0, 0.0]) 216 Br = anuga.Reflective_boundary(domain) # Solid reflective wall 217 Bo = anuga.Dirichlet_boundary([-5, 0, 0]) # Outflow 219 218 220 219 # Upstream and downstream conditions that will exceed the rating curve 221 220 # I.e produce delta_h outside the range [0, 10] specified in the the 222 221 # file example_rating_curve.csv 223 Btus = Time_boundary(domain, lambda t: [100*num.sin(2*pi*(t-4)/10), 0.0, 0.0]) 224 Btds = Time_boundary(domain, lambda t: [-5*(num.cos(2*pi*(t-4)/20)), 0.0, 0.0]) 222 Btus = anuga.Time_boundary(domain, \ 223 lambda t: [100*num.sin(2*pi*(t-4)/10), 0.0, 0.0]) 224 Btds = anuga.Time_boundary(domain, \ 225 lambda t: [-5*(num.cos(2*pi*(t-4)/20)), 0.0, 0.0]) 225 226 domain.set_boundary({'left': Btus, 'right': Btds, 'top': Br, 'bottom': Br}) 226 227 … … 268 269 len1=length, 269 270 len2=width) 270 domain = Domain(points, vertices, boundary)271 domain = anuga.Domain(points, vertices, boundary) 271 272 domain.set_name('Test_culvert_dry') # Output name 272 273 domain.set_default_order(2) … … 331 332 # Inflow based on Flow Depth and Approaching Momentum 332 333 333 Br = Reflective_boundary(domain) # Solid reflective wall334 Br = anuga.Reflective_boundary(domain) # Solid reflective wall 334 335 domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br}) 335 336 … … 388 389 len1=length, 389 390 len2=width) 390 domain = Domain(points, vertices, boundary)391 domain = anuga.Domain(points, vertices, boundary) 391 392 domain.set_name('Test_culvert_shallow') # Output name 392 393 domain.set_default_order(2) … … 463 464 # Inflow based on Flow Depth and Approaching Momentum 464 465 465 Br = Reflective_boundary(domain) # Solid reflective wall466 Br = anuga.Reflective_boundary(domain) # Solid reflective wall 466 467 domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br}) 467 468 … … 525 526 len1=length, 526 527 len2=width) 527 domain = Domain(points, vertices, boundary)528 domain = anuga.Domain(points, vertices, boundary) 528 529 domain.set_name('Test_culvert_dry') # Output name 529 530 domain.set_default_order(2) … … 594 595 # Inflow based on Flow Depth and Approaching Momentum 595 596 596 Br = Reflective_boundary(domain) # Solid reflective wall597 Br = anuga.Reflective_boundary(domain) # Solid reflective wall 597 598 domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br}) 598 599 … … 635 636 len1=length, 636 637 len2=width) 637 domain = Domain(points, vertices, boundary)638 domain = anuga.Domain(points, vertices, boundary) 638 639 639 640 domain.set_name('test_culvert') # Output name … … 711 712 len1=length, 712 713 len2=width) 713 domain = Domain(points, vertices, boundary)714 domain = anuga.Domain(points, vertices, boundary) 714 715 domain.set_name('Test_culvert_shallow') # Output name 715 716 domain.set_default_order(2) … … 782 783 783 784 784 Br = Reflective_boundary(domain) # Solid reflective wall785 Br = anuga.Reflective_boundary(domain) # Solid reflective wall 785 786 domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br}) 786 787
Note: See TracChangeset
for help on using the changeset viewer.