Individual Unit Classes#

This section summarises all the Flood Modeller unit types which are supported in the API. Being ‘supported’ means that the units can be read, updated and written via the API directly. Unit types which are ‘unsupported’ are still able to be within IED and DAT files accessed through the API but cannot be read or updated.

Boundary units#

QTBDY()#

class floodmodeller_api.units.QTBDY(unit_block=None, n=12, from_json: bool = False, **kwargs)#

Class to hold and process QTBDY boundary type

Parameters:
  • name (str, optional) – Unit name. Defaults to None.

  • comment (str, optional) – Comment included in unit. Defaults to None.

  • timeoffset (float, optional) – Defaults to None.

  • timeunit (str, optional) – Unit of time, e.g. ‘HOURS’, ‘MINUTES’ or ‘SECONDS’. See Flood Modeller documentation for all available options. Defaults to None.

  • extendmethod (str, optional) – Data extending method: ‘EXTEND’, ‘NOEXTEND’ or ‘REPEAT’. Defaults to None.

  • interpmethod (str, optional) – Data interpolation method: ‘LINEAR’ or ‘SPLINE’. Defaults to None.

  • flowmultiplier (float, optional) – Multiplier applied to all flow values at runtime. Defaults to None.

  • minflow (Float, optional) – Minimum flow value applied to the boundary at runtime. Defaults to None.

  • data (pandas.Series, optional) – Series object with variable 'Flow' and index 'Time'. Defaults to None.

  • allow_override (str) – Allow event parameters to be overridden from simulation file: ‘’/’OVERRIDE’ or ‘NOOVERRIDE’

Returns:

Flood Modeller QTBDY Unit class object

Return type:

QTBDY

HTBDY()#

class floodmodeller_api.units.HTBDY(unit_block=None, n=12, from_json: bool = False, **kwargs)#

Class to hold and process HTBDY boundary type

Parameters:
  • name (str, optional) – Unit name. Defaults to None.

  • comment (str, optional) – Comment included in unit. Defaults to None.

  • timeunit (str, optional) – Unit of time, e.g. ‘HOURS’, ‘MINUTES’ or ‘SECONDS’. See Flood Modeller documentation for all available options. Defaults to None.

  • extendmethod (str, optional) – Data extending method: ‘EXTEND’, ‘NOEXTEND’ or ‘REPEAT’. Defaults to None.

  • interpmethod (str, optional) – Data interpolation method: ‘LINEAR’ or ‘SPLINE’. Defaults to None.

  • data (pandas.Series, optional) – Series object with columns 'Time' and 'Stage'. Defaults to None.

Returns:

Flood Modeller HTBDY Unit class object

Return type:

HTBDY

QHBDY()#

class floodmodeller_api.units.QHBDY(unit_block=None, n=12, from_json: bool = False, **kwargs)#

Class to hold and process QHBDY boundary type

Parameters:
  • name (str, optional) – Unit name. Defaults to None.

  • comment (str, optional) – Comment included in unit. Defaults to None.

  • interpmethod (str, optional) – Data interpolation method: ‘LINEAR’ or ‘SPLINE’. Defaults to None.

  • data (pandas.Series, optional) – Series object with columns 'Flow' and 'Stage'. Defaults to None.

Returns:

Flood Modeller QHBDY Unit class object

Return type:

QHBDY

REFHBDY()#

class floodmodeller_api.units.REFHBDY(unit_block=None, n=12, from_json: bool = False, **kwargs)#

Class to hold and process REFHBDY boundary type

Currently REFHBDY Units are read/edit only and cannot be created from scratch, therefore the parameters below are only accessible upon instantiating a REFHBDY object from an existing unit.

Parameters:
  • name (str) – Unit name.

  • comment (str) – Comment included in unit.

  • easting (int) – Easting (m)

  • northing (int) – Northing (m)

  • return_period (float) – Flood return period (yrs)

  • time_delay (float) – Time delay before start of hydrograph (hrs)

  • timestep (float) – Time interval for unit hydrograph and rainfall profile

  • sim_type (str) – Simulation Type required: ‘FULL’ (full hydrograph), ‘PFONLY’ (peak flow) or ‘BFONLY’ (baseflow)

  • scale_method (str) – Hydrograph scaling method: ‘PEAKVALUE’ or ‘SCALEFACT’

  • scale_value (float) – Scaling value

  • boundary_type (str) – Boundary type: ‘HYDROGRAPH’ or ‘HYETOGRAPH’

  • scale_type (str) – Full generated hydrograph or quick runnof component only: ‘FULL’ or ‘RUNOFF’

  • minflow (float) – Minimum flow value

  • allow_override (str) – Allow event parameters to be overridden from simulation file: ‘’/’OVERRIDE’ or ‘NOOVERRIDE’

  • area (float) – Catchment area (sq km)

  • saar (int) – Seasonal average annual rainfall (mm)

  • urbext (float) – Fraction of urbanised catchment area

  • season (str) – Season for design rainfall profile: ‘DEFAULT’, ‘SUMMER’ or ‘WINTER’

  • calc_source (str) – ReFH calculation source: ‘DLL’ (recommended) or ‘REPORT’

  • storm_area (float) – Rainfall storm area (sq km)

  • storm_duration (float) – Rainfall storm duration (hrs)

  • rainfall_comment (str) – Comment added to rainfall section of unit

  • arf_method (str) – Method for defining ARF: ‘USER’ or ‘DESIGN’

  • arf (float) – Areal reduction factor (only used if arf_method set to ‘USER’)

  • ddf_c (float) – DDF Parameter c

  • ddf_d1 (float) – DDF Parameter d1

  • ddf_d2 (float) – DDF Parameter d2

  • ddf_d3 (float) – DDF Parameter d3

  • ddf_e (float) – DDF Parameter e

  • ddf_f (float) – DDF Parameter f

Returns:

Flood Modeller REFHBDY Unit class object

Return type:

REFHBDY

Section units#

RIVER()#

class floodmodeller_api.units.RIVER(unit_block=None, n=12, from_json: bool = False, **kwargs)#

Class to hold and process RIVER unit type. Currently only river units that are ‘SECTION’ types are supported. Other river unit types such as Muskingham will be included in a future release.

Parameters:
  • name (str, optional) – River section name

  • comment (str, optional) – Comment included in unit

  • data (pandas.Dataframe) – Dataframe object containing all the cross section data as well as all other relevant data. Columns are 'X', 'Y', 'Mannings n', 'Panel', 'RPL', 'Marker', 'Easting', 'Northing', 'Deactivation', 'SP. Marker'

  • spill1 (str, optional) – Spill label

  • spill2 (str, optional) – Spill label

  • lat1 (str, optional) – Lateral inflow label

  • lat2 (str, optional) – Lateral inflow label

  • lat3 (str, optional) – Lateral inflow label

  • lat4 (str, optional) – Lateral inflow label

  • dist_to_next (float, optional) – Distance to next section in metres

  • slope (float, optional) – Slope used in normal depth calculations

  • density (float, optional) – Density in kg/m3

Raises:

NotImplementedError – Raised if class is initialised without existing river block (i.e. if attempting to create new River unit). This will be an option for future releases

Returns:

Flood Modeller RIVER Unit class object

Return type:

RIVER

property data: DataFrame#

Data table for the river cross section.

Returns:

Pandas dataframe for the cross section data with columns: ‘X’, ‘Y’, ‘Mannings n’, ‘Panel’, ‘RPL’, ‘Marker’, ‘Easting’, ‘Northing’, ‘Deactivation’, ‘SP. Marker’

Return type:

pd.DataFrame

property active_data: DataFrame#

Data table for active subset of the river cross section, defined by deactivation markers.

Returns:

Pandas dataframe for the active cross section data with columns: ‘X’, ‘Y’, ‘Mannings n’, ‘Panel’, ‘RPL’, ‘Marker’, ‘Easting’, ‘Northing’, ‘Deactivation’, ‘SP. Marker’

Return type:

pd.DataFrame

Example

In this example we read in a river section that has deactivation markers

In [1]: from floodmodeller_api.units import RIVER

In [2]: river_unit = RIVER(
   ...:     [
   ...:         "RIVER normal case",
   ...:         "SECTION",
   ...:         "SomeUnit",
   ...:         "     0.000            0.000100  1000.000",
   ...:         "        5",
   ...:         "     0.000        10     0.030     0.000                 0.0       0.0          ",
   ...:         "     1.000         9     0.030     0.000                 0.0       0.0      LEFT",
   ...:         "     2.000         5     0.030     0.000                 0.0       0.0          ",
   ...:         "     3.000         6     0.030     0.000                 0.0       0.0     RIGHT",
   ...:         "     4.000        10     0.030     0.000                 0.0       0.0          ",
   ...:     ]
   ...: )
   ...: 

In [3]: river_unit.data
Out[3]: 
     X     Y  Mannings n  Panel  RPL Marker  Easting  Northing Deactivation  SP. Marker
0  0.0  10.0        0.03  False  0.0             0.0       0.0                        0
1  1.0   9.0        0.03  False  0.0             0.0       0.0         LEFT           0
2  2.0   5.0        0.03  False  0.0             0.0       0.0                        0
3  3.0   6.0        0.03  False  0.0             0.0       0.0        RIGHT           0
4  4.0  10.0        0.03  False  0.0             0.0       0.0                        0

In [4]: river_unit.active_data
Out[4]: 
     X    Y  Mannings n  Panel  RPL Marker  Easting  Northing Deactivation  SP. Marker
1  1.0  9.0        0.03  False  0.0             0.0       0.0         LEFT           0
2  2.0  5.0        0.03  False  0.0             0.0       0.0                        0
3  3.0  6.0        0.03  False  0.0             0.0       0.0        RIGHT           0
property conveyance: Series#

Calculate and return the conveyance curve of the cross-section.

Note

This uses the same method as applied in Flood Modeller so will be able to pick out any undesirable spikes in conveyance. The only difference compared with Flood Modeller may be the number of sampled points.

Returns:

A pandas Series containing the conveyance values indexed by water levels.

Return type:

pd.Series

INTERPOLATE()#

class floodmodeller_api.units.INTERPOLATE(unit_block=None, n=12, from_json: bool = False, **kwargs)#

Class to hold and process INTERPOLATE unit type

Parameters:
  • name (str, optional) – Unit name.

  • comment (str, optional) – Comment included in unit.

  • first_spill (str, optional) – Spill label if required.

  • second_spill (str, optional) – Spill label if required.

  • lat1 (str, optional) – First lateral inflow label.

  • lat2 (str, optional) – Second lateral inflow label.

  • lat3 (str, optional) – Third lateral inflow label.

  • lat4 (str, optional) – Fourth lateral inflow label.

  • dist_to_next (float, optional) – Chainage downstream to following section (m).

  • easting (float, optional) – Easting coordinate of interpolated section (not used in hydraulic calculations).

  • northing (float, optional) – Northing coordinate of interpolated section (not used in hydraulic calculations).

Returns:

Flood Modeller INTERPOLATE Unit class object

Return type:

INTERPOLATE

REPLICATE()#

class floodmodeller_api.units.REPLICATE(unit_block=None, n=12, from_json: bool = False, **kwargs)#

Class to hold and process REPLICATE unit type

Parameters:
  • name (str, optional) – Unit name.

  • comment (str, optional) – Comment included in unit.

  • first_spill (str, optional) – Spill label if required.

  • second_spill (str, optional) – Spill label if required.

  • lat1 (str, optional) – First lateral inflow label.

  • lat2 (str, optional) – Second lateral inflow label.

  • lat3 (str, optional) – Third lateral inflow label.

  • lat4 (str, optional) – Fourth lateral inflow label.

  • dist_to_next (float, optional) – Chainage downstream to following section (m).

  • easting (float, optional) – Easting coordinate of interpolated section (not used in hydraulic calculations).

  • northing (float, optional) – Northing coordinate of interpolated section (not used in hydraulic calculations).

  • bed_level_drop (float, optional) – Drop in bed level from previous section (m).

Returns:

Flood Modeller REPLICATE Unit class object

Return type:

REPLICATE

Conduit units#

CONDUIT()#

class floodmodeller_api.units.CONDUIT(unit_block=None, n=12, from_json: bool = False, **kwargs)#

The Conduit class supports two conduit sub-types in Flood Modeller: RECTANGULAR and CIRCULAR. Each of these sub-types forms a unique instance of the class which is differentiated by the CONDUIT.subtype attribute. All conduit types have the same common attributes:

Common Attributes

Parameters:
  • name (str) – Conduit section name

  • spill (str) – Spill label

  • comment (str) – Comment included in unit

  • dist_to_next (float) – Distance to next section in metres

  • subtype (str) – Defines the type of conduit unit (Should not be changed)

Rectangular Type (``CONDUIT.subtype == ‘RECTANGULAR’``)

Parameters:
  • friction_eq (str) – Friction equation to use ('MANNING' or 'COLEBROOK-WHITE')

  • invert (float) – Elevation of invert above datum (m)

  • width (float) – Width of conduit (m)

  • height (float) – Height of conduit (m)

  • use_bottom_slot (str) – Whether to include bottom slot ('ON', 'OFF' or 'GLOBAL'). Setting it to ‘GLOBAL’ will use the default option specified in IEF.

  • bottom_slot_dist (float) – Distance of slot top above invert (m)

  • bottom_slot_depth (float) – Total depth of bottom slot (m)

  • use_top_slot (str) – Whether to include top slot ('ON', 'OFF' or 'GLOBAL'). Setting it to ‘GLOBAL’ will use the default option specified in IEF.

  • top_slot_dist (float) – Distance of slot bottom below soffit (m)

  • top_slot_depth (float) – Total depth of top slot (m)

  • friction_on_invert (float) – Friction value for conduit invert

  • friction_on_walls (float) – Friction value for conduit walls

  • friction_on_soffit (float) – Friction value for conduit soffit

Circular Type (``CONDUIT.subtype == ‘CIRCULAR’``)

Parameters:
  • friction_eq (str) – Friction equation to use ('MANNING' or 'COLEBROOK-WHITE')

  • invert (float) – Elevation of invert above datum (m)

  • diameter (float) – Diameter of conduit (m)

  • use_bottom_slot (str) – Whether to include bottom slot ('ON', 'OFF' or 'GLOBAL'). Setting it to ‘GLOBAL’ will use the default option specified in IEF.

  • bottom_slot_dist (float) – Distance of slot top above invert (m)

  • bottom_slot_depth (float) – Total depth of bottom slot (m)

  • use_top_slot (str) – Whether to include top slot ('ON', 'OFF' or 'GLOBAL'). Setting it to ‘GLOBAL’ will use the default option specified in IEF.

  • top_slot_dist (float) – Distance of slot bottom below soffit (m)

  • top_slot_depth (float) – Total depth of top slot (m)

  • friction_below_axis (float) – Friction value for conduit below axis

  • friction_above_axis (float) – Friction value for conduit above axis

Sprung Type (``CONDUIT.subtype == ‘SPRUNG’``)

Parameters:
  • equation (str) – Choose between the Manning’s formulation and the Colbrook-White’s formulation

  • elevation_invert (float) – Height of the conduit above datum (m)

  • width (float) – Width of conduit (m)

  • height_springing (float) – Height of conduit’s springing (m)

  • height_crown (float) – Height of conduit’s crown (m)

  • use_bottom_slot (str) – Whether to include bottom slot ('ON', 'OFF' or 'GLOBAL'). Setting it to ‘GLOBAL’ will use the default option specified in IEF.

  • bottom_slot_dist (float) – Distance of slot top above invert (m)

  • bottom_slot_depth (float) – Total depth of bottom slot (m)

  • use_top_slot (str) – Whether to include top slot ('ON', 'OFF' or 'GLOBAL'). Setting it to ‘GLOBAL’ will use the default option specified in IEF.

  • top_slot_dist (float) – Distance of slot bottom below soffit (m)

  • top_slot_depth (float) – Total depth of top slot (m)

  • friction_on_invert (float) – Friction value for conduit invert

  • friction_on_walls (float) – Friction value for conduit walls

  • friction_on_soffit (float) – Friction value for conduit soffit

Sprungarch Type (``CONDUIT.subtype == ‘SPRUNGARCH’``)

Parameters:
  • equation (str) – Choose between the Manning’s formulation and the Colbrook-White’s formulation

  • elevation_invert (float) – Height of the conduit above datum (m)

  • width (float) – Width of conduit (m)

  • height_springing (float) – Height of conduit’s springing (m)

  • height_crown (float) – Height of conduit’s crown (m)

  • use_bottom_slot (str) – Whether to include bottom slot ('ON', 'OFF' or 'GLOBAL'). Setting it to ‘GLOBAL’ will use the default option specified in IEF.

  • bottom_slot_dist (float) – Distance of slot top above invert (m)

  • bottom_slot_depth (float) – Total depth of bottom slot (m)

  • use_top_slot (str) – Whether to include top slot ('ON', 'OFF' or 'GLOBAL'). Setting it to ‘GLOBAL’ will use the default option specified in IEF.

  • top_slot_dist (float) – Distance of slot bottom below soffit (m)

  • top_slot_depth (float) – Total depth of top slot (m)

  • friction_on_invert (float) – Friction value for conduit invert

  • friction_on_walls (float) – Friction value for conduit walls

  • friction_on_soffit (float) – Friction value for conduit soffit

Section Type (``CONDUIT.subtype == ‘SECTION’``)

Parameters:

only (None - common args attributes)

Raises:

NotImplementedError – Raised if class is initialised without existing Conduit block (i.e. if attempting to create new Conduit unit). This will be an option for future releases

Returns:

Flood Modeller CONDUIT Unit class object

Return type:

CONDUIT

Structure units#

BRIDGE()#

class floodmodeller_api.units.BRIDGE(unit_block=None, n=12, from_json: bool = False, **kwargs)#

Class to hold and process BRIDGE unit type. The Bridge class supports the three main bridge sub-types in Flood Modeller: Arch, USBPR1978 and Pierloss. Each of these sub-types forms a unique instance of the class which is differentiated by the BRIDGE.subtype attribute. All bridge types have the same common attributes:

Common Attributes

Parameters:
  • name (str) – Bridge section name

  • comment (str) – Comment included in unit

  • ds_label (str) – Downstream label

  • us_remote_label (str) – Remote labels

  • ds_remote_label (str) – Remote labels

  • subtype (str) – Defines the type of bridge unit (Should not be changed)

ARCH Type (``BRIDGE.subtype == ‘ARCH’``)

Parameters:
  • calibration_coefficient (float) – Calibration coefficient

  • skew (float) – Bridge skew

  • bridge_width_dual (float) – If modelled as dual bridge, the distance between upstream and downstream face of bridge (0.00 if not modelling as dual bridge):

  • bridge_dist_dual (float) – If modelled as dual bridge, the total distance between upstream and downstream faces of both bridges (0.00 if not modelling as dual bridge):

  • orifice_flow (bool) – Whether or not to model surcharged bridge as orifice flow

  • orifice_lower_transition_dist (float) – Upper and lower transition distances for when using orifice flow

  • orifice_upper_transition_dist (float) – Upper and lower transition distances for when using orifice flow

  • orifice_discharge_coefficient (float) – Orifice discharge coefficient for when using orifice flow

  • section_data (pandas.DataFrame) – Dataframe object representing the cross section. Columns are 'X', 'Y', 'Mannings n' and 'Embankments'

  • opening_data (pandas.DataFrame) – Dataframe object representing the openings in the bridge. Columns are 'Start', 'Finish', 'Springing Level' and 'Soffit Level'

USBPR Type (``BRIDGE.subtype == ‘USBPR1978’``)

Parameters:
  • calibration_coefficient (float) – Calibration coefficient

  • skew (float) – Bridge skew

  • bridge_width_dual (float) – If modelled as dual bridge, the distance between upstream and downstream face of bridge (0.00 if not modelling as dual bridge)

  • bridge_dist_dual (float) – If modelled as dual bridge, the total distance between upstream and downstream faces of both bridges (0.00 if not modelling as dual bridge)

  • orifice_flow (bool) – Whether or not to model surcharged bridge as orifice flow

  • orifice_lower_transition_dist (float) – Transition distances for when using orifice flow

  • orifice_upper_transition_dist (float) – Transition distances for when using orifice flow

  • orifice_discharge_coefficient (float) – Orifice discharge coefficient for when using orifice flow

  • abutment_type (str) – Type of abutment: '3' (default), '2' (30-degree wing wall abutment), '1' (span between abutments < 60 metres and either 90-degree wing or vertical wall abutment)

  • abutment_alignment (str) – Abutment alignment to normal direction of flow: 'ALIGNED' or 'SKEW'

  • specify_piers (bool) – Whether or not to explicity model piers

  • total_pier_width (float) – Total width of all piers at right ange to flow direction, only used if specify_piers == True

  • npiers (int) – Total number of piers in direction of flow, only used if specify_piers == True

  • pier_use_calibration_coeff (bool) – Whether to use a calibration coefficient to model piers. If set to False it would use the pier shape.

  • pier_calibration_coeff (float) – Calibration coefficient for modelling piers, only used if specify_piers == True AND pier_use_calibration_coeff == True

  • pier_shape (str) – Cross-sectional pier shape with options: 'RECTANGLE', 'CYLINDER', 'SQUARE', 'I-BEAM'. Only used if specify_piers == True AND pier_use_calibration_coeff == False

  • pier_faces (str) – Shape of pier faces with options: 'STREAMLINE', 'SEMICIRCLE', 'TRIANGLE', 'DIAPHRAGM'. Only used if specify_piers == True AND pier_use_calibration_coeff == False

  • soffit_shape (str) – Shape of soffit ('FLAT' or 'ARCH'), only used if specify_piers == False

  • section_data (pandas.Dataframe) – Dataframe object representing the cross section. Columns are 'X', 'Y', 'Mannings n' and 'Embankments'

  • opening_data (pandas.Dataframe) – Dataframe object representing the openings in the bridge. Columns are 'Start', 'Finish', 'Springing Level' and 'Soffit Level'

  • culvert_data (pandas.Dataframe) – Dataframe object representing any flood relief culverts in the bridge. Columns are 'Invert', 'Soffit', 'Section Area', 'Cd Part Full', 'Cd Full' and 'Drowning Coefficient'

PIERLOSS Type (``BRIDGE.subtype == ‘PIERLOSS’``)

Parameters:
  • calibration_coefficient (float) – Calibration coefficient

  • orifice_flow (bool) – Whether or not to model surcharged bridge as orifice flow

  • orifice_lower_transition_dist (float) – Transition distances for when using orifice flow

  • orifice_upper_transition_dist (float) – Transition distances for when using orifice flow

  • orifice_discharge_coefficient (float) – Orifice discharge coefficient for when using orifice flow

  • pier_coefficient (float) – Pier coefficient

  • bridge_width (float) – Distance in direction of flow from U/S to D/S cross section of bridge (for reference only)

  • us_section_data (pandas.Dataframe) – Dataframe object representing the upstream cross section. Columns are 'X', 'Y', 'Mannings n', 'Embankments' and 'Top Level'

  • ds_section_data (pandas.Dataframe) – Dataframe object representing the downstream cross section, if no downstream section is specified this will be an empty dataframe. Columns are 'X', 'Y', 'Mannings n', 'Embankments' and 'Top Level'

  • pier_locs_data (pandas.Dataframe) – Dataframe object representing the pier locations. Columns are 'Left X', 'Left Top Level', 'Right X', 'Right Top Level'

Raises:

NotImplementedError – Raised if class is initialised without existing Bridge block (i.e. if attempting to create new Bridge unit). This will be an option for future releases

Returns:

Flood Modeller BRIDGE Unit class object

Return type:

BRIDGE

RNWEIR()#

class floodmodeller_api.units.RNWEIR(unit_block=None, n=12, from_json: bool = False, **kwargs)#

Class to hold and process RNWEIR unit type

Parameters:
  • name (str, optional) – Upstream label name.

  • comment (str, optional) – Comment included in unit.

  • ds_label (str, optional) – Downstream label.

  • velocity_coefficient (float, optional) – Coefficient of approach velocity.

  • weir_length (float, optional) – Length of weir crest in the direction of flow (m).

  • weir_breadth (float, optional) – Breadth of weir at control section (normal to the flow direction)(m).

  • weir_elevation (float, optional) – Elevation of weir crest (m AD).

  • modular_limit (float, optional) – Ratio of upstream and downstream heads when switching between free and drowned mode.

  • upstream_crest_height (float, optional) – Height of crest above bed of upstream channnel (m).

  • downstream_crest_height (float, optional) – Height of crest above downstream channel (m).

Returns:

Flood Modeller RNWEIR Unit class object

Return type:

RNWEIR

SLUICE()#

class floodmodeller_api.units.SLUICE(unit_block=None, n=12, from_json: bool = False, **kwargs)#

The Sluice class supports two sluice sub-types in Flood Modeller: RADIAL and VERTICAL. Each of these sub-types forms a unique instance of the class which is differentiated by the SLUICE.subtype attribute. There are also several different attributes depending on the .control_method used. All sluice types have the same common attributes:

Common Attributes

Parameters:
  • name (str) – Sluice section name (upstream label)

  • ds_label (str) – Downstream label

  • remote_label (str) – Remote label

  • comment (str) – Comment included in unit

  • subtype (str) – Defines the type of sluice unit (Should not be changed)

  • weir_flow_coefficient (float) – Coefficient of approach velocity for weir flow (0.4 - 3.0)

  • under_gate_flow (float) – Coefficient of approach velocity for under gate flow

  • over_gate_flow (float) – Coefficient of approach velocity for over gate flow

  • weir_breadth (float) – breadth of weir (for single gate) perpendicular to flow direction

  • crest_elevation (float) – Elevation of weir crest

  • gate_height_or_chord (float) – Height of sluice gate (m) (if sluice subtype is VERTICAL or subtype is RADIAL and use_degrees == False). OR the cord made by the arc of sluice gate (m) if subtype is RADIAL and use_degrees == True.

  • weir_length (float) – Length of weir (m) in flow direction

  • us_weir_height (float) – Vertical distance from weir crest to upstream bed level

  • ds_weir_height (float) – Vertical distance from weir crest to downstream bed level

  • bias_factor (float) – Only used when control_method set to ‘REMOTE WATER LEVEL’

  • modular_limits (dict) – Dictionary of modular limit values. Keys: {‘weir_flow’, ‘under_gate_flow’, ‘over_gate_flow’}. If they are all set equal to zero, then a variable calculation method is used.

  • ngates (int) – number of gates

  • timeunit (str) – Unit of time, e.g. ‘HOURS’, ‘MINUTES’ or ‘SECONDS’. See Flood Modeller documentation for all available options.

  • extendmethod (str) – Data extending method: ‘EXTEND’, ‘NOEXTEND’ or ‘REPEAT’.

Attributes used when ``SLUICE.control_method == ‘TIME’``

Parameters:

gates (List[pandas.Series]) – List of Data series representing the gate control with ‘Time’ index and ‘Gate Opening’ (m) as the data

Attributes used when ``SLUICE.control_method == ‘LOGICAL’``

Parameters:
  • gates (List[pandas.DataFrame]) – List of Dataframes representing the gate control with ‘Time’ as index and ‘Mode’ and ‘Gate Opening’ (m) as the columns. The Mode is set to ‘AUTO’, ‘MANUAL’ or [blank] depending on the control mode at that time.

  • max_movement_rate (float) – Maximum movement rate of the structure

  • max_setting (float) – Maximum setting of the structure

  • min_setting (float) – Minimum setting of the structure

  • rules (List[dict]) – List of logical rules to use. Each rule is represented as a Dictionary with keys ‘name’ and ‘logic’.

  • time_rule_data (pandas.Series) – Series containing data on which operating rules to apply, with index of ‘Time’ and dataseries for ‘Operating Rules’

  • varrules (List[dict]) – List of logical variable rules to use. Each varrule is represented as a Dictionary with keys ‘name’ and ‘logic’.

  • time_varrule_data (pandas.Series) – Series containing data on which operating rules to apply, with index of ‘Time’ and dataseries for ‘Operating Rules’

Radial Type (``SLUICE.subtype == ‘RADIAL’``)

Parameters:
  • use_degrees (bool) – Whether to measure gate movement in degrees

  • allow_free_flow_under (bool) – Whether to allow free flow under gate

  • pivot_height (float) – Height of gate pivot (m) above sill

  • gate_radius (float) – Distance from gate pivot to surface (m)

Returns:

Flood Modeller SLUICE Unit class object

Return type:

SLUICE

ORIFICE()#

class floodmodeller_api.units.ORIFICE(unit_block=None, n=12, from_json: bool = False, **kwargs)#

Class to hold and process ORIFICE unit type

Parameters:
  • name (str, optional) – Unit name.

  • comment (str, optional) – Comment included in unit.

  • flapped (bool, optional) – True if orifice is flapped, False if orifice is open

  • ds_label (str, optional) – Downstream label

  • invert (float, optional) – Throat invert level

  • soffit (float, optional) – Throat soffit level

  • bore_area (float, optional) – Cross sectional area of throat opening

  • upstream_sill (float, optional) – Upstream sill level

  • downstream_sill (float, optional) – Downstream sill level

  • shape (str, optional) – Shape of orifice aperture (‘RECTANGLE’ or ‘CIRCULAR’)

  • weir_flow (float, optional) – Calibration factor for weir flow

  • surcharged_flow (float, optional) – Calibration factor for surcharged flow

  • modular_limit (float, optional) – Ratio of upstream and downstream heads when switching between free and drowned mode

Returns:

Flood Modeller ORIFICE Unit class object

Return type:

ORIFICE

SPILL()#

class floodmodeller_api.units.SPILL(unit_block=None, n=12, from_json: bool = False, **kwargs)#

Class to hold and process SPILL unit type

Parameters:
  • name (str, optional) – Unit name.

  • comment (str, optional) – Comment included in unit.

  • ds_label (str, optional) – Downstream label

  • weir_coefficient (float, optional) – Weir coefficient

  • modular_limit (float, optional) – Ratio of upstream and downstream heads when switching between free and drowned mode

  • data (pandas.DataFrame) – Dataframe object containing all the spill section data. Columns are 'X', 'Y', 'Easting', 'Northing'

Returns:

Flood Modeller SPILL Unit class object

Return type:

SPILL

CRUMP()#

class floodmodeller_api.units.CRUMP(unit_block=None, n=12, from_json: bool = False, **kwargs)#

Class to hold and process CRUMP unit type

Parameters:
  • name (str, optional) – Upstream label name.

  • comment (str,optional) – Comment included in unit.

  • calibration_coefficient (float, optional) – Calibration coefficient (should be set to unity for most cases).

  • weir_breadth (float, optional) – Breadth of weir at crest (m).

  • weir_elevation (float, optional) – Eleveation of weir crest (m above datum).

  • modular_limit (float, optional) – Ratio of upstream and downstream heads when switching between free and drowned mode.

  • upstream_crest_height (float, optional) – Height of crest above bed of upstream channel (m).

  • downstream_crest_height (float, optional) – Height oof crest above bed of downstream channel (m).

  • ds_label (str, optional) – Downstream node label.

  • us_remote_label (str, optional) – Upstream remote node label (must be a river or conduit section) - use if name is not a river or conduit section.

  • ds_remote_label (str, optional) – Downstream remote node label (must be a river or conduit section) - use if ds_label is not a river or conduit section.

Returns:

Flood Modeller CRUMP Unit class object

Return type:

CRUMP

FLAT_V_WEIR()#

class floodmodeller_api.units.FLAT_V_WEIR(unit_block=None, n=12, from_json: bool = False, **kwargs)#

Class to hold and process FLAT-V WEIR unit type

Args:

name (str, optional): Upstream label name. comment (str,optional): Comment included in unit. ds_label (str, optional): Downstream node label. us_remote_label (str, optional): Upstream remote node label (must be a river or conduit section) - use if name is not a river or conduit section. ds_remote_label (str, optional): Downstream remote node label (must be a river or conduit section) - use if ds_label is not a river or conduit section. weir_elevation (float, optional): Eleveation of weir crest (m above datum). weir_breadth (float, optional): Breadth of weir at crest (m). v_slope (float, optional): ‘V’ slope (horizontal distance/vertical distance). side_slope (float, optional): Channel side slope (horizontal distance/vertical distance). upstream_crest_height (float, optional): Weir crest height above upstream bed (m). downstream_crest_height (float, optional): Weir crest height above downstream bed (m). modular_limit (float, optional): Ratio of upstream and downstream heads when switching between free and drowned mode. calibration_coefficient (float, optional): Calibration coefficient (should be set to unity for most cases). ds_face_slope (int, optional): Flag to switch between 1:5 or 1:2 for d/s face. Can be set to 2 or 5 ONLY. coriolis_coefficient (float, optional): Coriolis energy coefficient. bank_top_elevation (float, optional): Elevation of channel bank top/ limit of extent of sloping channel walls (m AD).

Returns:

Flood Modeller FLAT-V WEIR Unit class object

Return type:

FLAT_V_WEIR

OUTFALL()#

class floodmodeller_api.units.OUTFALL(unit_block=None, n=12, from_json: bool = False, **kwargs)#

Class to hold and process OUTFALL unit type

Parameters:
  • name (str, optional) – Unit name.

  • comment (str, optional) – Comment included in unit.

  • flapped (bool, optional) – True if outfall is flapped, False if outfall is open

  • ds_label (str, optional) – Downstream label

  • invert (float, optional) – Throat invert level

  • soffit (float, optional) – Throat soffit level

  • bore_area (float, optional) – Cross sectional area of throat opening

  • upstream_sill (float, optional) – Upstream sill level

  • downstream_sill (float, optional) – Downstream sill level

  • shape (str, optional) – Shape of outfall aperture (‘RECTANGLE’ or ‘CIRCULAR’)

  • weir_flow (float, optional) – Calibration factor for weir flow

  • surcharged_flow (float, optional) – Calibration factor for surcharged flow

  • modular_limit (float, optional) – Ratio of upstream and downstream heads when switching between free and drowned mode

Returns:

Flood Modeller OUTFALL Unit class object

Return type:

OUTFALL

Loss units#

BLOCKAGE()#

class floodmodeller_api.units.BLOCKAGE(unit_block=None, n=12, from_json: bool = False, **kwargs)#

Class to hold and process BLOCKAGE unit type.

Parameters:
  • comment (str) – Comment included in unit.

  • name (str) – Upstream label name

  • ds_label (str) – Downstream label

  • us_reference_label (str) – Upstream reference label

  • ds_reference_label (str) – Downstream reference label

  • constriction_label (str) – Constriction reference label

  • inlet_loss (float) – Inlet loss coefficient

  • outlet_loss (float) – Outlet loss coefficient

  • timeoffset (float) – Time Datum Adjustment

  • timeunit_blockage (str) – Unit of time, e.g. ‘HOURS’, ‘MINUTES’ or ‘SECONDS’. See Flood Modeller documentation for all available options.

  • extendmethod (str) – Data extending method: ‘EXTEND’, ‘NOEXTEND’ or ‘REPEAT’. Defaults to None.

  • data (pandas.Series) – Series object with variable 'blockage' and index 'Time'. Defaults to None.

Returns:

Flood Modeller BLOCAKGE Unit class object

Return type:

BLOCKAGE

CULVERT()#

class floodmodeller_api.units.CULVERT(unit_block=None, n=12, from_json: bool = False, **kwargs)#

The CULVERT class supports two culvert sub-types in Flood Modeller: INLET and OUTLET. Each of these sub-types forms a unique instance of the class which is differentiated by the CULVERT.subtype attribute. Physical culvert types (e.g. rectangualr, circular etc) are provided under the CONDUIT class for consistency with Flood Modeller.

Common attributes

Parameters:
  • name (str) – Unit name and upstream node label

  • ds_label (str) – Downstream node label

  • us_remote_label (str) – Upstream remote node label

  • ds_remote_label (str) – Downstream remote node label

  • comment (str) – Comment

  • loss_coefficient (float) – Loss coefficient. Outlet (default = 1.0), INLET (Trash screen head loss coefficient, default = 1.5)

  • headloss_type (str) – Keyword TOTAL to denote headloss based on total head, otherwise (keyword STATIC or blank) headloss is based on static head

  • reverse_flow_mode (str) – Reverse Flow Mode; keyword ZERO (for zero headloss in reverse flow) or CALCULATED (for calculated head loss in reverse flow)

Inlet Loss Type (CULVERT.subtype == 'INLET')

Parameters:
  • type_code (str) – options are ‘Type A’, ‘Type B’,’Type C’

  • k (float) – Unsubmerged inlet control loss coefficient

  • m (float) – Exponent of Flow Intensity for inlet control

  • c (float) – Submerged inlet control loss coefficient

  • y (float) – Submerged inlet control adjustment factor

  • ki (float) – Outlet control loss coefficient

  • screen_width (float) – Trash screen width (m)

  • bar_proportion (float) – Proportion of trash screen area occupied by bars (0 to 1.0)

  • debris_proportion (float) – Blockage ratio (proportion of trash screen area occupied by debris) (0 to 1.0)

  • max_screen_height (float) – Max. Trash Screen Height (see Flood Modeller help for further information)

Outlet Loss Type (CULVERT.subtype == 'OUTLET')

No additional attributes required for OUTLET subtype

Returns:

Flood Modeller CULVERT unit class object

Return type:

CULVERT