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

  Package design

Package Design Brief: Assume you are the packaging engineer for a large consumer products company. In this company, the Packaging Design Briefs are initiated by the marketing group and forwarded to the Package Engineering group.

  Mechanical engineering questions

Define dynamic viscosity, Determine the centroid, Pressure due to the height of liquid, Advantage of changing the liquid, Calculate the total moment about the hinge of the seal gate.

  Automatic control

DOF system and Find the differential equation describing the system

  Write a paper on boyle''s law

Write a paper on Boyle's law and describe Compression and Combustion stroke . Also explain Charles's law and illustrate SI engine and CI engine.

  Verify the law for parallelogram of forces

To Verify the law for parallelogram of forces, law for triangle of forces and law of polygon of forces. These laws are very useful to calculate unknown forces in very short time.

  Discharge pressure of the compressor

What is the discharge revised discharge pressure of the compressor.

  The Case for Global Accounting Standards

The role of IFRS in both developing and developed capital markets.

  Wind turbine

Wind turbines are becoming more and more common as a method of energy production, wind turbines by their very nature are dynamic and are subject to and create their own internal and external kinematics and kinetics.

  Advanced design methodologies

8 x product engineering and design review (week 2 – 12), ~3 pages per item which must contain a brief description of the product then delve into concepts such as materials selection, manufacturing methods, life cycle analysis, recyclability and overa..

  Design of absorption column and the cooler

Design of absorption column and the cooler. Process design of other units should be completed along with pipe sizes.

  Determine the maximum total bending moment

Determine maximum total bending moment (static plus dynamic) of the beam under steady-state conditions.

  Force of the water on the gate

Determine the magnitude of the horizontal and vertical components of the force of the water on the gate.

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