def pressure_network(flow_rates, Qtot, k):
 P = (k * (flow_rates ** 2))
 F = np.hstack(((P[1:] - P[0]), (flow_rates.sum() - Qtot)))
 return F

def pressure_network ( flow_rates , Qtot , k ) : P = ( k * ( flow_rates ** 2 ) ) F = np . hstack ( ( ( P [ 1 : ] - P [ 0 ] ) , ( flow_rates . sum ( ) - Qtot ) ) ) return F
evaluate non-linear equation system representing the pressures and flows in a system of n parallel pipes:: f_i = p_i - p_0 .