pub struct Junction {
pub demands: Vec<DemandCategory>,
pub emitter_coeff: f64,
pub emitter_exp: f64,
}Expand description
An ordinary demand node whose head is solved at each hydraulic step (§2.4.2).
Fields§
§demands: Vec<DemandCategory>Demand categories attached to this junction (§2.5).
emitter_coeff: f64Emitter discharge coefficient Ke (m³/s per m^ne); 0 = no emitter.
emitter_exp: f64Emitter pressure exponent ne; default 0.5.
Implementations§
Source§impl Junction
impl Junction
Sourcepub fn total_demand(
&self,
t: f64,
opts: &SimulationOptions,
patterns: &[Pattern],
pattern_index: &HashMap<String, usize>,
) -> f64
pub fn total_demand( &self, t: f64, opts: &SimulationOptions, patterns: &[Pattern], pattern_index: &HashMap<String, usize>, ) -> f64
Total instantaneous demand at time t (§2.5).
$D_i(t) = \sum_k \text{base}k \times D{\text{mult}} \times F_{\text{pattern}}(t)$
The pattern lookup procedure:
- Use the demand category’s own pattern ID if set.
- Otherwise fall back to
default_patternfrom options (if set). - Otherwise use multiplier 1.0.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Junction
impl RefUnwindSafe for Junction
impl Send for Junction
impl Sync for Junction
impl Unpin for Junction
impl UnsafeUnpin for Junction
impl UnwindSafe for Junction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more