Skip to main content

hydr_structures/structures/pump/
operands.rs

1//! Immutable evaluated pump operands and reviewed normalization evidence.
2
3/// Complete evaluated running/shutoff pump operands. Isolated proposals expose no instance.
4#[derive(Clone, Debug, PartialEq)]
5pub struct PumpHydraulicOperands {
6    pub(crate) speed_ratio: f64,
7    pub(crate) receiving_minus_donor_head_m: f64,
8    pub(crate) receiving_minus_donor_head_low_m: f64,
9    pub(crate) reference_head_m: f64,
10    pub(crate) normalization_error_bound_m: f64,
11    pub(crate) reference_head_lower_m: f64,
12    pub(crate) reference_head_upper_m: f64,
13    pub(crate) reference_discharge_m3_per_s: f64,
14    pub(crate) division_exact: bool,
15}
16impl PumpHydraulicOperands {
17    /// Original positive speed ratio.
18    pub fn speed_ratio(&self) -> f64 {
19        self.speed_ratio
20    }
21    /// High component of the oriented lift, in metres.
22    ///
23    /// The lift is receiving stage minus donor stage. With a free outlet the receiving term is
24    /// `max(receiving stage, outlet)`, and a dry receiver's bed stands in for its stage.
25    pub fn receiving_minus_donor_head_m(&self) -> f64 {
26        self.receiving_minus_donor_head_m
27    }
28    /// Signed TwoSum subtraction witness, in metres.
29    pub fn receiving_minus_donor_head_low_m(&self) -> f64 {
30        self.receiving_minus_donor_head_low_m
31    }
32    /// Actual unchanged normalized Solvr query, in metres.
33    pub fn reference_head_m(&self) -> f64 {
34        self.reference_head_m
35    }
36    /// Conservative absolute normalized-head uncertainty, in metres.
37    pub fn normalization_error_bound_m(&self) -> f64 {
38        self.normalization_error_bound_m
39    }
40    /// Outward complete normalized-head lower endpoint, in metres.
41    pub fn reference_head_lower_m(&self) -> f64 {
42        self.reference_head_lower_m
43    }
44    /// Outward complete normalized-head upper endpoint, in metres.
45    pub fn reference_head_upper_m(&self) -> f64 {
46        self.reference_head_upper_m
47    }
48    /// Original reference-speed interpolated discharge magnitude.
49    pub fn reference_discharge_m3_per_s(&self) -> f64 {
50        self.reference_discharge_m3_per_s
51    }
52    /// Reference/zero/power-of-two certificate removes division rounding only, retaining head-low uncertainty.
53    pub fn division_exact(&self) -> bool {
54        self.division_exact
55    }
56}