Ignore:
Timestamp:
Sep 16, 2010, 5:06:07 PM (14 years ago)
Author:
steve
Message:

Fixed bug with log_to_file on boyd_box_operator

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

Legend:

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

    r8018 r8020  
    8787            # Water has risen above inlet
    8888
    89             if self.log_filename is not None:
    90                 s = 'Specific energy  = %f m' % self.inflow.get_enquiry_specific_energy()
    91                 log_to_file(self.log_filename, s)
    9289
    9390            msg = 'Specific energy at inlet is negative'
     
    177174                hyd_rad = flow_area/perimeter
    178175
    179                 if self.log_filename is not None:
    180                     s = 'hydraulic radius at outlet = %f' % hyd_rad
    181                     log_to_file(self.log_filename, s)
     176
    182177
    183178                # Final Outlet control velocity using tail water
     
    185180                Q_outlet_tailwater = flow_area * culvert_velocity
    186181
    187                 if self.log_filename is not None:
    188                     s = 'Q_outlet_tailwater = %.6f' % Q_outlet_tailwater
    189                     log_to_file(self.log_filename, s)
    190182                Q = min(Q, Q_outlet_tailwater)
    191183            else:
  • trunk/anuga_core/source/anuga/structures/structure_operator.py

    r8019 r8020  
    303303        message += 'Velocity  [m/s]: %.2f\n' % self.velocity
    304304        message += 'Inlet Driving Energy %.2f\n' % self.driving_energy
    305         message += 'delta total energy %.2f\n' % self.delta_total_energy
     305        message += 'Delta Total Energy %.2f\n' % self.delta_total_energy
    306306
    307307        print message
  • trunk/anuga_core/source/anuga/structures/test_Outlet_Ctrl.py

    r8018 r8020  
    2626#from anuga.culvert_flows.culvert_class import Culvert_flow
    2727from anuga.structures.boyd_pipe_operator import Boyd_pipe_operator
     28from anuga.structures.boyd_box_operator import Boyd_box_operator
    2829#from anuga.culvert_flows.culvert_routines import weir_orifice_channel_culvert_model
    2930from math import pi,pow,sqrt
     
    140141# Setup CULVERT INLETS and OUTLETS in Current Topography
    141142#------------------------------------------------------------------------------
    142 print 'DEFINING any Structures if Required'
     143print 'Defining Structures'
    143144
    144145#  DEFINE CULVERT INLET AND OUTLETS
     
    166167    ep1 = [50.0, y]
    167168    losses = {'inlet':0.5, 'outlet':1, 'bend':0, 'grate':0, 'pier': 0, 'other': 0}
    168     culverts.append(Boyd_pipe_operator(domain,
     169#    culverts.append(Boyd_pipe_operator(domain,
     170#                            end_point0=ep0,
     171#                            end_point1=ep1,
     172#                            losses=losses,
     173#                            diameter=1.5, #culvert_width, #3.658,
     174#                            apron=6.0,
     175#                            use_momentum_jet=True,
     176#                            use_velocity_head=True,
     177#                            manning=0.013,
     178#                            logging=True,
     179#                            label='culvert',
     180#                            verbose=False))
     181
     182
     183#    Boyd_pipe_operator(domain,
     184#                            end_point0=ep0,
     185#                            end_point1=ep1,
     186#                            losses=losses,
     187#                            diameter=1.5, #culvert_width, #3.658,
     188#                            apron=6.0,
     189#                            use_momentum_jet=True,
     190#                            use_velocity_head=True,
     191#                            manning=0.013,
     192#                            logging=True,
     193#                            label='pipe_culvert',
     194#                            verbose=False)
     195
     196    Boyd_box_operator(domain,
    169197                            end_point0=ep0,
    170198                            end_point1=ep1,
    171199                            losses=losses,
    172                             diameter=1.5, #culvert_width, #3.658,
     200                            width=culvert_width,
     201                            height=10.0,
    173202                            apron=6.0,
    174203                            use_momentum_jet=True,
     
    176205                            manning=0.013,
    177206                            logging=True,
    178                             verbose=False))
     207                            label='box_culvert',
     208                            verbose=False)
    179209
    180210                       
Note: See TracChangeset for help on using the changeset viewer.