Changeset 6104


Ignore:
Timestamp:
Dec 24, 2008, 1:39:10 PM (14 years ago)
Author:
ole
Message:

Tested that input to culvert rating curve are guaranteed to
exercise the out of bounds condition

Location:
anuga_core/source/anuga/culvert_flows
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/culvert_flows/culvert_class.py

    r6103 r6104  
    231231                                                   indices=[self.enquiry_indices[i]])           
    232232            opening.elevation = elevation
     233            opening.stage = elevation # Simple assumption that culvert is dry initially
    233234
    234235        # Assume two openings for now: Referred to as 0 and 1
  • anuga_core/source/anuga/culvert_flows/test_culvert_class.py

    r6103 r6104  
    44import unittest
    55import os.path
     6import sys
    67
    78from anuga.utilities.system_tools import get_pathname_from_package
     
    125126        #-----------------------------------------------------------------------
    126127
     128        min_delta_w = sys.maxint
     129        max_delta_w = -min_delta_w
    127130        for t in domain.evolve(yieldstep = 1, finaltime = 25):
     131            delta_w = culvert.inlet.stage - culvert.outlet.stage
     132           
     133            if delta_w > max_delta_w: max_delta_w = delta_w
     134            if delta_w < min_delta_w: min_delta_w = delta_w           
     135           
    128136            #print domain.timestepping_statistics()
    129137            pass
    130    
    131 
     138
     139        # Check that extreme values in rating curve have been exceeded
     140        # so that we know that condition has been exercised
     141        assert min_delta_w < 0
     142        assert max_delta_w > 10       
     143       
    132144
    133145    def test_that_culvert_dry_bed_rating(self):
Note: See TracChangeset for help on using the changeset viewer.