:py:mod:`wolfhece.lagrange_multiplier` ====================================== .. py:module:: wolfhece.lagrange_multiplier Module Contents --------------- .. py:function:: junction_q_lagrangemult(q: numpy.ndarray) Compute the junction flow rate q_junction from the flow rates q of the branches. :param q: np.ndarray, estimated signed flow rates of the branches .. py:function:: junction_wse_head_lagrangemult(q: numpy.ndarray, a: numpy.ndarray, h_width_froma, z: numpy.ndarray, epsilon: float = 1e-06, energy: bool = False) 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. :param q: np.ndarray, estimated signed flow rates of the branches :param a: np.ndarray, estimated area of the branches :param h_l_froma: function converting area to water height and width :param z: np.ndarray, elevation of the branches :param epsilon: float, tolerance of the method :param energy: bool, if True, ensure the same energy at the junction .. py:data:: q