Declares all local variables using appropriate data types

Assignment Help Mechanical Engineering
Reference no: EM131116121

Centigrade to Fahrenheit Converter

Temperature can be converted from Celsius to Fahrenheit using the formula:

F=1.8C +32

Write a Function that takes the temperature in degrees Celsius as an input argument, calculates the equivalent temperature in degrees Fahrenheit using the above equation, and returns the result as the function value. Initially, name your function C2F.

Are you having any trouble using C2F as the name of your function? You should be, because of an idiosyncrasy of Excel. Excel thinks that you meant to type the address of worksheet cell CF2 (second row, 85th column), and wants to correct it for you. Worse yet, Excel won't take "No" for an answer. Frustrating, isn't it? There are many such idiosyncrasies in Excel. When having trouble, one of the things to try is changing the name of your procedure or variable; it may be conflicting with something reserved by Excel or VBA.

To get your function to work, rename it to something like Cent2F. Try your function in worksheet cells A1, A2, and A3 using C = -40°, C = 20°, and C = 100°, respectively.

Column Buckling

Consider a column with a square cross-section, loaded with a force as shown in the figure below.

The critical buckling load, F, which will cause the column to buckle, is given by the formula shown. The parameter E is the elastic modulus of the material, I is the area moment of inertia of the beam, and L is the length of the beam. Parameter K is known as the dimensionless effective length factor, which takes into account the type of column support condition at each end.

A. Create the following tables on the user interface worksheet to contain the values of the effective length factors and elastic modulus of the materials steel, aluminum, and wood. Use the Internet to find appropriate values for the elastic modulus. Note that most property tables list these values in units of GPA (gigapascals, or 10^9 N/m^2).

End fixtures K value
Pinned 1
Fixed 1
Fixed-Pinned 1
Fixed-Free 2

 

Material Elastic Modulus (GPa)
Steel (look up this value on the Internet)
Aluminum (look up this value on the Internet)
Wood (look up this value on the Internet)

B. Create two named input cells for the beam length, L (in meters), and square cross-section dimension, d (in millimeters), and properly label these input cells. Use L = 2 m and d=3 mm as initial inputs for these parameters.

C. Create the following results table on the user interface worksheet to contain the resulting critical buckling load (F) for each case of material and effective length factor.


Critical buckling load iF)
Material Pinned Fixed Fixed-Pinned Fixed-Free
steel 



aluminum



 wood



D. Write a VBA Function to calculate the critical buckling load for a column, with the four required inputs (K, E, L, and d) passed from the worksheet as function arguments. Research the equation for the area moment of inertia of a square cross-section beam, and use that equation in your function to calculate I.

E. Use your function in each of the critical buckling load table cells. Use relative vs. absolute cell referencing wisely, so that cell references passed to your function can be copied (Ctrl-C) and pasted (Ctrl-V) without having to manually correct them.

F. Add the correct units of the resulting critical buckling load to the results table header.

Incandescent Space Heating

When energy is added to a fluid (liquid or gas), the temperature of the fluid increases. An equation describing this phenomenon is:

Q = MCp ΔT

Q is the amount of energy added (joules)
M is the mass of the fluid (kg)
Cp is the heat capacity of the fluid (joules/kg-°C)
ΔT is the change in temperature (°C)

A garage (24 ft x 24 ft x 10 ft) is illuminated by six 60-W incandescent bulbs. It is estimated that 90% of the energy consumed by an incandescent bulb is dissipated as heat. Question: If the bulbs are on for 3 hours, how much would the temperature in the garage increase because of the light bulbs? Assume that no energy is lost through the walls, floor, or ceiling of the garage.

Create a User Interface Worksheet like the one shown below, using the input/output units shown.

Wisely name the input/output cells so they can be easily referenced using the Range() method in VBA.

Create a Sub procedure that does the following:

1. Declares all local variables using appropriate data types.

2. Reads the user inputs entered in the "Specified Information" input section of the worksheet, using the cell range names that you defined, and stores the values in local variables.

3. Performs all necessary calculations.

4. Writes out the results to the "Calculated Information" section of the worksheet. Mind your units!

Add user instructions and a printable "Run" button to the worksheet, for your user to use when running your Sub procedure

896_Untitled.png

Reference no: EM131116121

Questions Cloud

Monochlorination products : Consider the monochlorination of 2,2,4,4-tetramethyl pentane.write the possible monochlorination products and calculate the percentage of each isomer in the product mixture.
Prepare an absorption costing income statement : Compute the break-even point in (1) units and (2) dollars - compute the contribution margin ratio and the margin of safety ratio.
Prepare fairbanks journal entries to record : Use the information from BE17-5 but assume the stock was purchased as a trading security. Prepare Fairbanks's journal entries to record
Grams of hydrogen gas : If you begin with 10.0 grams of each reactant, how many grams of hydrogen gas should you expect to measure in your experiment? Enter only the number, rounded to the correct number of significant figures.
Declares all local variables using appropriate data types : Create two named input cells for the beam length, L (in meters), and square cross-section dimension, d (in millimeters), and properly label these input cells. Use L = 2 m and d=3 mm as initial inputs for these parameters.
Grams of the radioactive material : If the half-life of a given substance is 60 days, how long will it take for a 30 gram sample of the substance to decay until there is only 7.5 grams of the radioactive material remaining?
Formation of phosphorus pentachloride : The following reaction has achieved equilibrium. Predict the effect on the formation of phosphorus pentachloride (increase, decrease, or no effect) for the stated changes to the system:
Initial volume plus the volume : Calculate the pH at equivalence. The pKb of pyridine is 8.77 . Round your answer to 2 decimal places. Note for advanced students: you may assume the total volume of the solution equals the initial volume plus the volume of HNO3 solution added.
What you found most interesting about the research : Choose a restaurant, library, mall, dining hall, coffee shop, or similar public location. Plan to spend a minimum of two hours at the location. You will visit this location twice, for a minimum of four hours total. Keep in mind that if you should ..

Reviews

Write a Review

Mechanical Engineering Questions & Answers

  Determine the pressure drop across the contraction section

water flows at a rate of .04 m3s in a .12 meter diameter pipe that contains a sudden contraction to a .06 m pipe.

  Ewb project

write a reflective assessment of how you rate yourself against these competencies and Describe the main learning outcomes that this course and the EWB project have generated for you over the semester. Have any of these learning outcomes been a ..

  Question regarding the leaves the humidifying section

Air at 1 atm, 15°C, and 60 percent relative humidity is first heated to 20°C in a heating section and then humidified by introducing water vapor. The air leaves the humidifying section at 25°C and 65 percent relative humidity. Determine

  Determine the youngs modulus

A tensile test was conducted on a mild steel bar. The following data was obtain from the testi. Dia of the steel bar= 3 cmii. Gauge length of the bar = 20cmiii. Load at elastic limit=250kNiiii. Extension at a load of 150 kN= .21mmv. Minimum load =380..

  Two kilograms of carbon monoxide in piston-cylinder assembly

Two kilograms of carbon monoxide in a piston-cylinder assembly, initially at 1 bar and 27C, is heated at constant pressure with no internal irreversibilities to a final temperature of 227C.

  Determine the minimum theoretical value for TH in K

A power cycle operates between a reservoir at temperature TH and a lower-temperature reservoir at 280 K. At steady state, the cycle develops 40 kW of power while rejecting 1000 kJ/min of energy by heat transfer to the cold reservoir. Determine the mi..

  If the roller at b can sustain a maximum load of 3 kn

if the roller at b can sustain a maximum load of 3 kn determine the largest magnitude of each of the three forces f

  Determine the required diamter d of the shaft if the

a motor delivers 275 hp at 1000 rpm to the end of a shaft. the gears at b and c take out 125 and 150 hp

  State any two applications of jigs in the engineering

State any two applications of jigs in the engineering laboratory as stated in mechanical engineering

  After developing the velocity profile of this poiseuille

a viscous liquid density of 1180 kgm3 and dynamic viscosity of 0.0045 n sm2 flows at a volumetric rate of 12.6 mls

  An adiabatic and reversible steam turbine receives steam at

an adiabatic and reversible steam turbine receives steam at 1 mpa and 300 degrees c. the exit pressure is 100 kpa.

  Create a design table with displacement r1 r2 r3 r4

A good CMRR is required. Design the analog circuit using just the single +5 V supply mapping the bridge output (V2-V1) into the ADC input channel 3 (V3). You do not need to add an antialiasing analog low-pass filter. Show chip numbers, resistor va..

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