Question: Using Visual Basic application Procedure a Start Microsoft Excel. Open the Visual Basic Editor. Create a new module. You are going to create a moody
Procedure a Start Microsoft Excel. Open the Visual Basic Editor. Create a new module. You are going to create a moody friction factor function using the Haaland oqaation. Change the module name from modulel to Friction b. Create function haaland Re, eod). The function will determine the friction fatoe given the Reynolds Number and the relative roughness (D). Make sure you specify that variables Nr and cod are Double, and the function return vaue is Doble Laminar Flow Equation (Re 2000) 64 Re Turbulent Flow Equation (Re 4000) 691 3.7 Transition Flow Equation (2000Re 4000) aminar(4000- Re) +fTurbutene (Re-2000) 2000 N.B. I: n VBA. Log) is the matural log base e), nor bx Sppovides a log hase 10hon N.B.2: VBA does not anderstand brackets, owly parenthesis NB.3: VBd will not automatically solve an equation. The left side needs to be a ariable Function haaland f(Nr As Double, eod As Double) As Double skeleto code-you flesh out it statenent If (Nr ) Then Error condition haaland E- Elself (Nr2000) Then Laninar Flow haaland f-64./Nr Elself (N 4000) Then Turbulent Flow Your code here Else Transition Zone Your Code Heret Compute both Laminar and Turbulent herej then weighted avg End If End Function A standalone base 10 log function is strengly recommended Funetion log10_f(x As Double) As Double Compute the base 10 log of a number log10-1+ End Punetion log(X)/log(10#) d. Create a graph of Haaland friction factor. Format the table and the graph according to the class guidelines
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
