logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(5/5)

The analysis of beams is an important topic in mechanical engineering. One type of beam considered is a cantilever beam in which one end of the beam is fixed and the other end of the beam is free

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

C++ Programming for Engineers
Programming Assignment: Beam Deflection
The analysis of beams is an important topic in mechanical engineering. One type of beam considered is a
cantilever beam in which one end of the beam is fixed and the other end of the beam is free.

When a weight, W, (or load) is applied the free end of the beam, the beam deflects or bends. The amount of
deflection, , on the free end of the beam depends on the beams loading conditions.
There are many types of loading conditions, but three types are considered here:
1) End load - A single load, W, is applied at the free end of the beam
2) Intermediate Load – A single load, W, is applied at point B (somewhere between the free end and the
fixed end)
3) Uniform Load – The load W is uniformly distributed along the length of the beam
The three types of loading are illustrated below:
W = total weight of load (N)
δ = deflection caused by the load (m)
x = distance from the free end of the beam (m)
l = L = length of the beam (m)
w = load density (N/m)
For a uniform load, W = wL [note: (N/m)(m)=N]
Page 2
The deflection for each beam can be calculated using the following relationships, assuming that the forces on
the beam are coplanar, the beam is in static equilibrium, and that the weight of the beam may be neglected.
1) End Load:
2) Intermediate Load:
3) Uniform Load:
where:
E = Young’s modulus of elasticity (N/m2)
I = moment of inertia (m4)
L = length of beam (m)
For the Intermediate Load, the following terms also apply:
a = distance from fixed end of beam to application of the load (m)
b = L – a
For the Uniform Load: Weight = (Weight Density)(Beam Length) or W = (w)(L)
Young’s modulus of elasticity varies with different types of materials. The following are typical values:
Material Young’s modulus (N/m2
)
Aluminum 6.90 x 10
10
Brass 11.7 x 10
10
Carbon Steel 20.5 x 10
10
Cast Iron 10.0 x 10
10
Oak 1.10 x 10
10
Stainless Steel 19.0 x 10
10
Titanium 11.4 x 10
10
Page 3
It will be assumed that the beam under consideration is an I-beam with the following dimensions:
H outer height of I - Beam (m)
h inner height of I - Beam (m)
B outer width of I - Beam (m)
b width of both flanges of I - Beam (m)
The moment of inertia, I,for the I - Beam can be calculated as follows :
Program Requirements:
Write a C++ program according to the following specifications
1. Display a brief description of the program.
2. Ask the user to specify the type of loading (end load, intermediate load, uniform load). Display sketches of
the beam configuration and I-Beam shape with variables labeled to be sure that the user understands what
you are asking for.
3. Ask the user to specify the type of material (give the user of menu of 7 material types listed above) and then
use the given value of E.
4. Ask the user for the beam dimensions (L, B, b, H, and h). Use a c++ function to find the moment of inertia.
5. If an end load or intermediate load is chosen, prompt the user to enter the weight of the load.
6. If a uniform load is selected, prompt the user to enter the weight density.
7. If an intermediate load is chosen, prompt the user to enter the value of b. (Note: This is the b on the
intermediate load diagram where a + b = L, not the b used in the beam dimension. You might want to
rename it.)
8. Create 3 c++functions to calculate δ for the three types of loading.
9. Prompt the user to specify the number of points, N (in addition to x = 0) to use in a table of x and values.
10. Neatly display the following:
 A brief description of the program.
 The type of loading and type of material.
 All input quantities (both variable and name) with units. Also display I.
 Display a table of values of x and δ with an appropriate table heading (with units) and with all values
nicely aligned. Add lines to the table.
 
Page 4
Other important notes:
 User prompts should include both symbol and name of variable and unit.
 Use scientific notation with 3 digits after the decimal point for most results.
 Check all inputs for errors. If any inputs are entered incorrectly, allow the user to correct them.
Error checks include:
o Incorrect menu choices
o All beam dimensions, weights, and weight density must be positive
o H > h, B > b, L > a, and a > 0.
 Give the user the option of re-running the program
Example: End Load, Carbon Steel I-Beam with B = 0.02 m, H = 0.04 m, b = 0.015 m, h = 0.03 m, W = 125 N,
L = 2 m, and N = 10. (Note: required formatting not used)
Test Cases
Run the program for the following test cases and turn in printouts of the results with your report.
Inbox your program to me.
Loading Material L (m) H (m) H (m) B (m) B (m) N W (N) W (N/m) a (m)
End Carbon
Steel
2 0.04 0.03 0.02 0.015 10 125
Intermediate Aluminum 10 0.05 0.04 0.025 0.02 20 500 5
Uniform Brass 0.5 0.06 0.04 0.03 0.024 15 300

(5/5)
Attachments:

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

847 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

781 Answers

Hire Me
expert
Husnain SaeedComputer science

720 Answers

Hire Me
expert
Atharva PatilComputer science

851 Answers

Hire Me
April
January
February
March
April
May
June
July
August
September
October
November
December
2025
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
SunMonTueWedThuFriSat
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
00:00
00:30
01:00
01:30
02:00
02:30
03:00
03:30
04:00
04:30
05:00
05:30
06:00
06:30
07:00
07:30
08:00
08:30
09:00
09:30
10:00
10:30
11:00
11:30
12:00
12:30
13:00
13:30
14:00
14:30
15:00
15:30
16:00
16:30
17:00
17:30
18:00
18:30
19:00
19:30
20:00
20:30
21:00
21:30
22:00
22:30
23:00
23:30