anuga.Boyd_box_operator

class anuga.Boyd_box_operator(domain, losses=0.0, width=None, height=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.0, smoothing_timescale=0.0, use_momentum_jet=True, use_velocity_head=True, description=None, label=None, structure_type='boyd_box', logging=False, verbose=False, max_velocity=10.0)[source]

Culvert flow - transfer water from one rectangular box to another. 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: minimum arguments

domain, losses (scalar, list or dictionary of losses), width (= height if height not given)

__init__(domain, losses=0.0, width=None, height=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.0, smoothing_timescale=0.0, use_momentum_jet=True, use_velocity_head=True, description=None, label=None, structure_type='boyd_box', logging=False, verbose=False, max_velocity=10.0)[source]

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

Parameters

domainanuga.Domain

Shallow-water domain to which the culvert is attached.

lossesfloat 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.

widthfloat

Internal width (m) of the culvert barrel. If height is None the section is treated as square (width × width).

heightfloat or None, optional

Internal height (m) of the culvert barrel. Defaults to width when None. Default None.

barrelsfloat, optional

Number of parallel identical barrels. Total discharge is multiplied by this value. Default 1.0.

blockagefloat, 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.

z1float, 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.

z2float, optional

Batter slope (rise/run) of the embankment at the second culvert end. Default 0.0.

end_pointslist 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_lineslist 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_pointslist 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_elevationslist of float or None, optional

[e1, e2] — invert (floor) elevations (m AHD) at each culvert end. Read from the mesh when None. Default None.

apronfloat, 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.

manningfloat, 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_gapfloat, optional

Additional gap (m) beyond the apron edge for the head-enquiry point. Default 0.0.

smoothing_timescalefloat, optional

Timescale (s) for exponential smoothing of computed discharge to reduce numerical oscillations. Set to 0.0 to disable. Default 0.0.

use_momentum_jetbool, 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_headbool, optional

If True, the velocity head at the inlet is included in the total driving energy. Default True.

descriptionstr or None, optional

Human-readable description of the culvert, stored in statistics output. Default None.

labelstr or None, optional

Short label used as a filename prefix for the CSV log when logging=True. Default None.

structure_typestr, optional

Internal type identifier written to output files. Default 'boyd_box'.

loggingbool, optional

If True, write per-timestep flow statistics to a CSV file named <label>_<structure_type>.csv. Default False.

verbosebool, optional

If True, print diagnostic messages during construction and discharge calculations. Default False.

max_velocityfloat, optional

Maximum allowable mean velocity (m/s) in the culvert barrel; the discharge is capped so that this velocity is not exceeded. Default 10.0.

Methods

__init__(domain[, losses, width, height, ...])

Create a box 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