Skip to main content

hydr_structures/structures/
heads.rs

1//! Explicit wet, known-dry, and unknown endpoint support.
2
3/// Original endpoint support without a fabricated physical dry water elevation.
4#[derive(Clone, Debug, PartialEq)]
5pub enum HeadSupport {
6    /// Finite quiescent water-surface stage on the common datum.
7    Wet {
8        /// Water-surface elevation in metres.
9        stage_m: f64,
10    },
11    /// Known dry bed, admitted for eligible weirs or explicitly isolated pumps.
12    Dry {
13        /// Bed elevation in metres. Influential weir support requires bed at or below crest.
14        bed_elevation_m: f64,
15    },
16    /// Unknown influential support rejects. Explicit isolated pump operation makes it uninfluential.
17    Unknown,
18}
19/// Explicit head convention. Energy-head packets remain unsupported.
20#[derive(Clone, Copy, Debug, PartialEq, Eq)]
21pub enum HeadConvention {
22    /// Quiescent water-surface stage, following the selected mechanism scope.
23    QuiescentStage,
24    /// Explicitly unsupported energy head, without silent convention conversion.
25    EnergyHead,
26}
27/// One exact endpoint identity and its original physical support.
28#[derive(Clone, Debug, PartialEq)]
29pub struct EndpointHead {
30    /// Exact declared endpoint identity.
31    pub id: String,
32    /// Original wet, dry, or unknown support.
33    pub support: HeadSupport,
34}
35/// Complete ordered original input packet for one structure.
36#[derive(Clone, Debug, PartialEq)]
37pub struct StructureHeads {
38    /// Exact declared structure identity.
39    pub structure_id: String,
40    /// Original endpoint A identity and support.
41    pub endpoint_a: EndpointHead,
42    /// Original endpoint B identity and support.
43    pub endpoint_b: EndpointHead,
44    /// Exact declared common vertical reference.
45    pub datum: String,
46    /// Explicit input head convention.
47    pub convention: HeadConvention,
48}