wolfhece.lagrange_multiplier

Module Contents

wolfhece.lagrange_multiplier.junction_q_lagrangemult(q: numpy.ndarray)[source]

Compute the junction flow rate q_junction from the flow rates q of the branches.

Parameters:

q – np.ndarray, estimated signed flow rates of the branches

wolfhece.lagrange_multiplier.junction_wse_head_lagrangemult(q: numpy.ndarray, a: numpy.ndarray, h_width_froma, z: numpy.ndarray, epsilon: float = 1e-06, energy: bool = False)[source]

Compute the new area at the junction a_junction from the flow rates q of the branches and the area a.

We ensure a same water elevation (z+h) at the junction in each branch or a same head if energy is True.

Parameters:
  • q – np.ndarray, estimated signed flow rates of the branches

  • a – np.ndarray, estimated area of the branches

  • h_l_froma – function converting area to water height and width

  • z – np.ndarray, elevation of the branches

  • epsilon – float, tolerance of the method

  • energy – bool, if True, ensure the same energy at the junction

wolfhece.lagrange_multiplier.q[source]