Answered step by step
Verified Expert Solution
Question
1 Approved Answer
ASAP! POST USING VBA CODE!!! The head loss in a pipe is given by the formula: H l o s s = f L V
ASAP! POST USING VBA CODE!!!
The head loss in a pipe is given by the formula:
Where is the length of the pipe, is the velocity in the pipe, is the acceleration of gravity
is the diameter and is the friction factor. The friction factor for laminar flow Re
is given by:
The friction factor for turbulent flow is given by the following explicit
approximation Haaland equation:
Where is the Reynolds number, is the roughness and is the diameter of the pipe. Develop
a visual basic program, using a FUNCTION do not use Subroutines to calculate the
friction factor and total head loss for two pipes. The parameters for the two pipes are given
below.
a Pipe :;
b Pipe :
Set up your spreadsheet as follows:
Hint : In VBA, "log will compute natural log Refer to the following formula as you
develop your code that utilizes :
Application. WorksheetFunction. Log
Hint : Since the friction factor calculation is simple if you don't
need to make a function for it Therefore, you are only required to create a function to calculate
fif
Hint : To calculate both columns with one button, insert the calculations and printing codes
inside a for loop that starts after variables declarations You can use the following code as
a guideline.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started