Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write a Visual Basic code to solve the problem. I need the code with the Excel sheet Thansk 5. The head loss in a

Please write a Visual Basic code to solve the problem. I need the code with the Excel sheet
Thansk image text in transcribed
image text in transcribed
5. The head loss in a pipe is given by the formula: loss oss 2gD Where L is the length of the pipe, V is the velocity in the pipe, g is the gravitational constant, D is the diameter and f is the friction factor. The friction factor for laminar flow (Re-2300) is given by: 64 Re f= The friction factor for turbulent flow (Re>4000) is given by the following explicit approximation (Haaland equation): 6.9 .(/D 11 NT Re (3.7 Where Re is the Reynolds number, is the roughness and D is the diameter of the pipe a) Develop a visual basic program to calculate the friction factor and total head loss. The subroutine should calculate the friction factor. Note: In VB, log0 will compute b) Run your program for Re 500,000 and eD-0.004, D 1.2ft, g 32f/s. c) Run your program for Re 1200, D 0.5t, V-0.024 f/s, L-50ft, g-32/s natural log and you use the following formula: logio(x) 0.43429*In() V=4. 17n/s, L = 100ft. Your spreadsheet should be set up like the following: Parameter Pipel (part b)(part c) Re E/D Friction factor Head Loss

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions