code: def headloss_exp_rect(FlowRate, Width, DistCenter, KMinor):
      
      #Checking input validity
      ut.check_range([FlowRate, ">0", "Flow rate"], [Width, ">0", "Width"],
                     [DistCenter, ">0", "DistCenter"], [KMinor, ">=0", "K minor"])
      return (KMinor * FlowRate**2
              / (2 * gravity.magnitude * (Width*DistCenter)**2)
              )
docs: Return the minor head loss due to expansion in a rectangular channel.
  
      This equation applies to both laminar and turbulent flows.