anuga.Weir_orifice_trapezoid_operator
- class anuga.Weir_orifice_trapezoid_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='weir_orifice_trapezoid', logging=False, verbose=False)[source]
Culvert flow - transfer water from one trapezoidal section 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='weir_orifice_trapezoid', logging=False, verbose=False)[source]
Create a weir/orifice culvert with a trapezoidal cross-section.
Computes discharge using combined weir and orifice flow formulae, transitioning smoothly between flow regimes based on the headwater-to- height ratio.
Parameters
- domainanuga.Domain
Shallow-water domain to which the structure 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. Default 0.0.
- widthfloat
Bottom width (m) of the trapezoidal cross-section.
- heightfloat or None, optional
Height (m) of the trapezoidal cross-section. If None, defaults to
width. 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
Side slope (horizontal/vertical) of the left trapezoidal wall. 0.0 gives a rectangular section. Default 0.0.
- z2float, optional
Side slope (horizontal/vertical) of the right trapezoidal wall. Default 0.0.
- end_pointslist of [float, float], optional
[[x1, y1], [x2, y2]]— centre coordinates (m) of each culvert end face. Exactly one ofend_pointsorexchange_linesmust 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 toend_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 fromend_pointsandapronwhen None. Default None.- invert_elevationslist of float or None, optional
[e1, e2]— invert (floor) elevations (m AHD) at each structure end. Read from the mesh when None. Default None.- apronfloat, optional
Width (m) of the approach apron at each structure end, used to offset the enquiry point from the face. Default 0.1.
- manningfloat, optional
Manning’s roughness coefficient for the culvert barrel (dimensionless). 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 structure axis. 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 structure, 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
'weir_orifice_trapezoid'.- 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.
Methods
__init__(domain[, losses, width, height, ...])Create a weir/orifice culvert with a trapezoidal cross-section.
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