Changeset 8861


Ignore:
Timestamp:
May 9, 2013, 12:34:07 PM (12 years ago)
Author:
steve
Message:

Will take 0.0 as a height

Location:
trunk/anuga_core/source/anuga/structures
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/structures/boyd_box_operator.py

    r8832 r8861  
    9393        local_debug = False
    9494
     95        if self.culvert_height <= 0.0:
     96            Q = 0.0
     97            barrel_velocity = 0.0
     98            outlet_culvert_depth = 0.0
     99            self.case = "Culvert blocked"
     100            return Q, barrel_velocity, outlet_culvert_depth
     101
     102
     103
    95104        if self.use_velocity_head:
    96105            self.delta_total_energy = \
  • trunk/anuga_core/source/anuga/structures/run_gate_operator.py

    r8860 r8861  
    9393                            losses=1.5,
    9494                            width=1.5,
     95                            height = 10.0,
    9596                            apron=5.0,
    9697                            use_momentum_jet=True,
     
    9899                            manning=0.013,
    99100                            verbose=False)
    100 
    101 
    102 gate.set_culvert_height(10.0)
    103101
    104102line = [[0.0, 5.0], [0.0, 10.0]]
     
    128126    domain.write_time()
    129127
     128    if num.allclose(t, 10.0):
     129        gate.set_culvert_height(0.0)
    130130
    131     if num.allclose(t, 10.0):
    132         gate.set_culvert_height(0.000001)
     131    Q, velocity, depth = gate.discharge_routine()
    133132
    134133    print gate.inlets[0].get_enquiry_stage()
    135134    print gate.inlets[1].get_enquiry_stage()
     135    print gate.get_culvert_height()
    136136
    137     Q, velocity, depth = gate.discharge_routine()
    138 
    139     print gate.culvert_height
    140137    print Q
    141138    print velocity
    142139    print depth
    143140       
    144 
    145     #if domain.get_time() > 150.5 and domain.get_time() < 151.5 :
    146         #Bi = anuga.Dirichlet_boundary([0.0, 0.0, 0.0])
    147         #domain.set_boundary({'left': Bi, 'right': Br, 'top': Br, 'bottom': Br})
    148 
    149     #delta_w = culvert.inlet.stage - culvert.outlet.stage
     141    gate.print_timestepping_statistics()
    150142   
    151     #if delta_w > max_delta_w: max_delta_w = delta_w
    152     #if delta_w < min_delta_w: min_delta_w = delta_w
    153 
    154     #print domain.volumetric_balance_statistics()
    155    
    156     pass
    157 
    158 ## Check that extreme values in rating curve have been exceeded
    159 ## so that we know that condition has been exercised
    160 #assert min_delta_w < 0
    161 #assert max_delta_w > 10       
    162143
    163144
    164 #os.remove('Test_culvert.sww')
     145
     146
  • trunk/anuga_core/source/anuga/structures/structure_operator.py

    r8859 r8861  
    193193            #new_outflow_xmom = outflow.get_average_xmom() + outflow_extra_momentum[0]
    194194            #new_outflow_ymom = outflow.get_average_ymom() + outflow_extra_momentum[1]
    195 
    196195            new_outflow_xmom = barrel_speed*new_outflow_depth*outflow_direction[0]
    197196            new_outflow_ymom = barrel_speed*new_outflow_depth*outflow_direction[1]
Note: See TracChangeset for help on using the changeset viewer.