code: def flow_pipemajor(Diam, HeadLossFric, Length, Nu, PipeRough):
      
      #Inputs do not need to be checked here because they are checked by
      #functions this function calls.
      FlowHagen = flow_hagen(Diam, HeadLossFric, Length, Nu).magnitude
      if FlowHagen < flow_transition(Diam, Nu).magnitude:
          return FlowHagen
      else:
          return flow_swamee(Diam, HeadLossFric, Length, Nu, PipeRough).magnitude
docs: Return the flow rate with only major losses.
  
      This function applies to both laminar and turbulent flows.