code: def diam_pipeminor(FlowRate, HeadLossExpans, KMinor):
      
      #Checking input validity
      ut.check_range([FlowRate, ">0", "Flow rate"], [KMinor, ">=0", "K minor"],
                     [HeadLossExpans, ">0", "Headloss due to expansion"])
      return (np.sqrt(4 * FlowRate / np.pi)
              * (KMinor / (2 * gravity.magnitude * HeadLossExpans)) ** (1/4)
              )
docs: Return the pipe ID that would result in the given minor losses.
  
      This function applies to both laminar and turbulent flow.