n = len(flow_rates)`` and *f_i* and *Q_i* are described in the doc for `pressure_network` r4