anuga.Boyd_pipe_operator

class anuga.Boyd_pipe_operator(domain, losses=0.0, diameter=None, barrels=1.0, blockage=0.0, z1=0.0, z2=0.0, end_points=None, exchange_lines=None, enquiry_points=None, invert_elevations=None, apron=0.1, manning=0.013, enquiry_gap=0.2, smoothing_timescale=0.0, use_momentum_jet=True, use_velocity_head=True, description=None, label=None, structure_type='boyd_pipe', logging=False, verbose=False)[source]

Bases: Structure_operator

Culvert flow - transfer water from one location to another via a circular pipe culvert. Sets up the geometry of problem

This is the base class for culverts. Inherit from this class (and overwrite compute_discharge method for specific subclasses)

Input: Two points, pipe_size (diameter), mannings_rougness,

__init__(domain, losses=0.0, diameter=None, barrels=1.0, blockage=0.0, z1=0.0, z2=0.0, end_points=None, exchange_lines=None, enquiry_points=None, invert_elevations=None, apron=0.1, manning=0.013, enquiry_gap=0.2, smoothing_timescale=0.0, use_momentum_jet=True, use_velocity_head=True, description=None, label=None, structure_type='boyd_pipe', logging=False, verbose=False)[source]

Create a circular pipe culvert using the Boyd (1987) flow algorithm.

Parameters:
  • domain (anuga.Domain) – Shallow-water domain to which the culvert is attached.

  • losses (float or list of float or dict, optional) – Head-loss coefficients. A scalar is used directly; a list is summed; a dict maps loss names to coefficients and the values are summed. Typical values: 0.5 for a sharp-edged inlet, 1.0 for a re-entrant inlet. Default 0.0.

  • diameter (float) – Internal diameter (m) of the circular pipe barrel.

  • barrels (float, optional) – Number of parallel identical barrels. Total discharge is multiplied by this value. Default 1.0.

  • blockage (float, optional) – Fractional blockage of the culvert cross-section. Must be in [0, 1]; 0.0 is fully open, 1.0 is fully blocked. Default 0.0.

  • z1 (float, optional) – Batter slope (rise/run) of the embankment at the first culvert end, used when computing the invert elevation from the DEM. Default 0.0.

  • z2 (float, optional) – Batter slope (rise/run) of the embankment at the second culvert end. Default 0.0.

  • end_points (list of [float, float], optional) – [[x1, y1], [x2, y2]] — centre coordinates (m) of each culvert end face. Exactly one of end_points or exchange_lines must be provided.

  • exchange_lines (list of two 2-point lines, optional) – [[[x1,y1],[x2,y2]], [[x1,y1],[x2,y2]]] — line segments defining the inlet and outlet faces. Alternative to end_points.

  • enquiry_points (list of [float, float] or None, optional) – [[x1, y1], [x2, y2]] — explicit locations for the upstream and downstream head-enquiry points. Computed automatically from end_points and apron when None. Default None.

  • invert_elevations (list of float or None, optional) – [e1, e2] — invert (floor) elevations (m AHD) at each culvert end. Read from the mesh when None. Default None.

  • apron (float, optional) – Width (m) of the approach apron at each culvert end, used to offset the enquiry point from the inlet/outlet face. Default 0.1.

  • manning (float, optional) – Manning’s roughness coefficient for the culvert barrel (dimensionless). Typical values: 0.012 for smooth concrete, 0.024 for corrugated-steel pipe. Default 0.013.

  • enquiry_gap (float, optional) – Additional gap (m) beyond the apron edge for the head-enquiry point. Default 0.2.

  • smoothing_timescale (float, optional) – Timescale (s) for exponential smoothing of computed discharge to reduce numerical oscillations. Set to 0.0 to disable. Default 0.0.

  • use_momentum_jet (bool, optional) – If True, momentum is injected into the outflow cell along the culvert axis (momentum-jet model). If False, outflow momentum is zeroed. Default True.

  • use_velocity_head (bool, optional) – If True, the velocity head at the inlet is included in the total driving energy. Default True.

  • description (str or None, optional) – Human-readable description of the culvert, stored in statistics output. Default None.

  • label (str or None, optional) – Short label used as a filename prefix for the CSV log when logging=True. Default None.

  • structure_type (str, optional) – Internal type identifier written to output files. Default 'boyd_pipe'.

  • logging (bool, optional) – If True, write per-timestep flow statistics to a CSV file named <label>_<structure_type>.csv. Default False.

  • verbose (bool, optional) – If True, print diagnostic messages during construction and discharge calculations. Default False.

Methods

__init__(domain[, losses, diameter, ...])

Create a circular pipe culvert using the Boyd (1987) flow algorithm.

activate_logging()

discharge_routine()

Procedure to determine the inflow and outflow inlets.

get_culvert_apron()

get_culvert_barrels()

get_culvert_blockage()

get_culvert_diameter()

get_culvert_height()

get_culvert_length()

get_culvert_slope()

get_culvert_width()

get_culvert_z1()

get_culvert_z2()

get_enquiry_depths()

get_enquiry_elevations()

get_enquiry_invert_elevations()

get_enquiry_positions()

get_enquiry_specific_energys()

get_enquiry_speeds()

get_enquiry_stages()

get_enquiry_total_energys()

get_enquiry_velocity_heads()

get_enquiry_velocitys()

get_enquiry_water_depths()

get_enquiry_xmoms()

get_enquiry_xvelocitys()

get_enquiry_ymoms()

get_enquiry_yvelocitys()

get_inlets()

get_master_proc()

get_time()

get_timestep()

log_timestepping_statistics()

parallel_safe()

By default an operator is not parallel safe

print_statistics()

print_timestepping_statistics()

set_culvert_barrels(barrels)

set_culvert_blockage(blockage)

set_culvert_height(height)

set_culvert_width(width)

set_culvert_z1(z1)

set_culvert_z2(z2)

set_label([label])

set_logging([flag])

statistics()

timestepping_statistics()

Attributes

counter

discharge_routine()[source]

Procedure to determine the inflow and outflow inlets. Then use boyd_pipe_function to do the actual calculation