Record a VBA macro that will calculate the Reynold number

Assignment Help Mechanical Engineering
Reference no: EM131922380

Project: Calculation of the Flow Rate in a Pipeline

Statement: Figure 1 shows a pipeline (smooth) that delivers water in turbulent flow at a constant temperature (T) from point 1 where the pressure is p1 = 150 psig and the elevation is z1 = 0 ft to point 2 where the pressure is atmospheric (p2 = 0) and the elevation is z2 = 300 ft. The effective length of the pipeline is L and its diameter is D.

809_Pipe Line.png

Questions:

Part 1 -

1. Calculate the flow rate q (in gal/min) for the pipeline with various diameters (D) and length (L) for water at 60oF using the following equations (1-6)

Table 1

L (ft)

D = 4 ft

D = 5 ft

D = 6 ft

D = 8 ft

800

 

 

 

 

1000

 

 

 

 

2000

 

 

 

 

4000

 

 

 

 

8000

 

 

 

 

10000

 

 

 

 

20000

 

 

 

 

Equations (1-6):

(1) The density (ρ) of the water can be calculated from the following Eq.1:

ρ = 62.122 + 0.0122 * T - 1.54 x 10-4 * T2 + 2.65 x 10-7 * T3 - 2.24 x 10-10 * T4

where T is in oF, and ρ is in lbm/ft3

(2) The viscosity (μ) of the water can be calculated from the following Eq. 2:

Lnμ = -11.0318 + (1057.51/T+214.624)

where T is in oF, and μ is in lbm/ft.s

(3) The flow velocity (v) can be calculated from the following Eq. 3:

-½v2 + g * Δz + (gc*ΔP/ρ) + 2(fF*L*v2/D) = 0

where v is the flow velocity in ft/s,

g is the acceleration of gravity given by g = 32.174 ft/s2,

Δz = z2 - z1 is the difference in elevation (ft),

gc is a conversion factor (in English units gc = 32.174 ft.lbm/lbf.S2),

?P = (p2 - p1)*144 is the difference in pressure lbf/ft2,

fF is the Fanning friction factor,

L is the length of the pipe (ft),

D is the inside diameter of the pipe (ft).

Note: Pay attention to all units.

(4) The Reynold's number (Re) can be calculated from the following Eq. 4:

Re = v * ρ * D/μ

where v is the flow velocity in ft/s, ρ is the density of the water in lbm/ft3, D is the inside diameter of the pipe in feet, and μ is the viscosity of water in lbm/ft.s

(5) The Fanning friction factor (fF) can be calculated from the following Eq. 5:

fF = 0.316/Re¼  

(6) The flow rate (q) can be calculated by multiplying the flow velocity by the cross section of the pipe (Eq.6).

q = v * π * D2/4 * 7.481*60

where v is the flow velocity in ft/s, and D is the inside diameter of the pipe in feet.

2. Calculate the flow rate (q) under other temperature (40 oF and 100 oF) when the diameter D= 6 ft and length L= 1000 ft

Temperature (oF)

40

60

100

q (gal/min)

 

 

 

3. Prepare plots of flow rate (q) versus D and L.

4. Add Trend line, display Equation, and R-squared value on those plots.

5. Discuss effects of diameter, length, and temperature on the flow rate, and draw your conclusions.

Part 2 -

Use VBA to calculate the Reynold's number of the given flow (The diameter D= 6 ft, length L= 1000 ft, and Temperature T = 100 oF)

1. Record a VBA macro that will calculate the Reynold's number using the key stroke Control+R. Copy and paste the macro code in your excel spreadsheet.

2. Create a custom VBA function named as ReynoldNum performing the abovementioned calculation. Copy and paste the program code of this function into the spreadsheet.

3. Create a VBA form named as Reynold's Number Calculator that will allow you to input those parameters (velocity, density, pipeline diameter, and viscosity) and output the Reynold's number. You need to use the refEdit input variants. Copy and paste the command button code in the spreadsheet.

2396_figure.png

4. Test each of your macro, function, and form to calculate the Reynold's number of the given flow.

Reference no: EM131922380

Questions Cloud

What is the prevailing leadership style : What could an OD consultant have offered the leader of this organization? What is prevailing leadership style ( see Chapter 2) and its impact on organization?
Evaluate the dominant methods used in your workplace : Identify and evaluate the dominant methods used in your workplace, or one with which you are familiar, to select people for jobs.
Prepare a report for the board that recommends the changes : Prepare a report for the board that either recommends the proposed changes or does not recommend the changes.
Discuss the role of cultural choices in the rise and fall : Chapter 11 discusses the role of cultural choices in the rise and fall of civilizations on pages 336-337. What Does It Mean to be Human? 3rd edition.
Record a VBA macro that will calculate the Reynold number : Project: Calculation of the Flow Rate in a Pipeline. Record a VBA macro that will calculate the Reynold's number using the key stroke Control+R
Enhancing the effects of sexual orientation diversity : An overview or a summary of " Enhancing the Effects of Sexual Orientation Diversity Training:
How would the plant classify these items according to an abc : An investigation of the company's manufacturing facility in Charlotte yields the information presented in the table below.
What is the message or theme in the given play : What is the message / theme in this play? Write your argument supporting your claim with evidence from the play and historical events.
What was the legal issue in the case : What was the legal issue in this case? What did the appeals court decide? What factors does the EEOC use to determine whether a procedure constitutes.

Reviews

len1922380

3/31/2018 1:01:41 AM

I have attached the project questions. Everything is clear on the paper just make sure that you using Excel to solve the problems. Create a VBA form named as Reynold's Number Calculator that will allow you to input those parameters (velocity, density, pipeline diameter, and viscosity) and output the Reynold's number. You need to use the refEdit input variants. Copy and paste the command button code in the spreadsheet.

Write a Review

Mechanical Engineering Questions & Answers

  Find the energy transfer per unit mass of fluid

The absolute velocity leaving the rotor at section (2) is radial with a magnitude of 12 m/s. Determine the energy transfer per unit mass of fluid flowing through this turbine if the fluid is (a) air, (b) water.

  Find the frequencies of torsional vibrations

The moment of inertia of three rotors A,B and C are respectively 0.3, 0.6 and 0.18 kg-m2 . The distance between A and B is 1.5 m and B and C is 1 m. The shaft is 70 mm in diameter and the modulus of rigidity for the shaft material is 84 x 109 N/m..

  What is the rated current of the phase conductors

A 30 horsepower, two-phase motor is connected to a 230 volt AC line. What is the rated current of the phase conductors and the rated current of the neutral?

  Determine the inertia and stiffness matrices

The cantilever beam shown in Figure P5.76 has length L and a rectangular cross section with width a and height b. The rectangular thin plate mounted.

  Add appropriate valves and redesign the suction line

Ignore the specified sizes for the pipes and make your own decisions. Add appropriate valves and redesign the suction line.

  Determine the normal stress in section bc

The rod ABC is made of steel (E = 29 X 10^6 psi). Determine the normal stress in section BC. Determine the deflection at point B and C.

  Find the variation of vapor temperature and phase interface

a liquid-vapor phase change process in microgravity conditions is carried out sufficiently slowly so that a one

  Determine the speed and direction of rotation of gear

The mechanism train shown consists of an assortment of gears and pulleys to drive gear 9. Pulley2 rotates at 1200 rev/min in the direction shown. Determine the speed and direction of rotationof gear 9

  Find an expression for the torsional constant k in terms of

a thin metal disk of mass m2.00 x 10-3 kg and radius r2.20cm is attached at its center to a long fiber. when the disk

  What approach might you use to validate your code

The other half of the satellite is and tip temperature for GS = 0 and an extremely large value of the thermal conductivity. Compare coated with a diffuse gray material with a2 = 0.3.

  Heat is added to the air until its temperature reaches 290

air at 1 atm and 25 ordmc occupies an initial volume of 1200 cm3 in a cylinder. the air is confined by a piston which

  Determine first if an euler''s tour is possible

On the street map shown in Figure 3-28, determine first if an Euler's tour is possible. Show why or why not. Then show how you would route a truck so as to achieve the least number of deadheads. You are to collect on both sides of the street at on..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd