Answered step by step
Verified Expert Solution
Question
1 Approved Answer
written in c 89/90 INTRODUCTION: Beam analysis is an important part of the structural analysis conducted before construction of a building begins. A frequently used
written in c 89/90
INTRODUCTION: Beam analysis is an important part of the structural analysis conducted before construction of a building begins. A frequently used type of beam is a cantilever beam, which is fixed on one end and free on the other. Cantilever beam The amount of deflection when a load is applied to this type of beam can be computed with the following equation: deflection=2EILa2(length3a) Where: L= applied load in pounds a= length from fixed end to applied load in feet E= elasticity of material (material-dependent constant) I= moment of inertia of the beam, which can be computed with the following equation: We have information on 9 different beams in a data file, beam.txt. The data for each beam is given in the following four real values, which are stored in one data line (space-delimited) in the proper units for the equations above: Beam length Beam base Elasticity constant Applied load ASSIGNMENT: Write a C program to read the information for each beam from the beam.txt data file (one point at a time) and print a report, both to the screen and to an output file (deflection.txt) that places the applied load at 1-foot intervals starting at one foot from the fixed end (i.e., at 1 foot) and moving down the length of the beam. Once this is working, modify the program so that the deflections for each beam are printed only as long as they are less than 2% of the beam length. When the beam deflection is greater than or equal to 2%, the program should stop computing values for that beam and go on to the next. If the deflection distance of 2% is never reached, the program should print an appropriate message. Your program output will look like the illustration shown below. Use your PC's cursor to determine the horizontal and vertical spacing for the output format. OUTPUT FORMAT: ************************************************* BEAM DEFLECTION BEAM NO. X Total length =xxxxft OUTPUT FORMAT: BEAM DEFLECTION Deflection of 2% of length not reached beam. txc 9 9.02.030000000000.07500000000.0 7.01.545000000000.03000000000.0 9.01.796000000000.01000000000.0 8.01.511000000000.04700000000.0 8.02.569000000000.06000000000.0 7.03.045000000000.05000000000.0 6.02.23000000000.01500000000.0 5.01.74000000000.02000000000.0 4.01.217200000000.02500000000.0
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started