Hydraulica
With Hydraulica, you can simply calculate the headless or diameter, corresponding the pipe parameters you’ve entered. So you can calculate the headloss based a flow and diameter, or the other way: around calculate the diameter based on a flow and and headloss. Hydraulica is based on the Colebrook-W