Develop a computer program which could be used for internal flow analysis in SI units. The program must be able to:
• Get the required input data from the user
• Decide the flow type (laminar, turbulent or transient)
• Compute the friction factor, f using the corresponding correlations (for laminar flow f=64/Re, for turbulent and transient it can use either Colebrook or Haaland Equation)
• Determine the major and minor head losses and total pressure drop in the flow system
• Print and plot all the results
Describe how your code works by adding comments on each step and provide a nomenclature. Also demonstrate your computer code is actually working by applying it to following problems:
• A laminar flow case
• A turbulent flow case (must also include minor losses)
Plot a sample Moody Chart using your code.