Question: Background Comprehension Time: 10-15 min This problem will introduce you to an example of a simply supported beam subject to a load modeled as




Background Comprehension Time: 10-15 min This problem will introduce you to an example of a simply supported beam subject to a load modeled as a point force. The background provides all of the equations and variable definitions needed to achieve the tasks described. Below represents a simply supported beam of length L subject to a force F. F L The beam has a width w and height h. The beam also has a Young's modulus, E, which represents the ability of a material to withstand changes in length (sometimes referred to as modulus of elasticity). A data file (MaterialElasticity.mat) is provided that contains materials with associated Young's moduli. For a single force the deflection of the beam is determined using the derived equation -Ox + y(x) = Rx3 6EI Rx3 -Ox + 6EI - x a F 6EI (x - a), x > a Eq. 1 where I is the area moment of inertia of the cross section, R is the reaction force on the beam at the left end, and O is the clockwise rotational angle of the beam at the left end. These have already been derived for you and are given by the following equations: wh I = 12 F R = (L-a) L 0 = Fa 6EIL (2L - a) (La) Eq. 2 Eq. 3 Eq. 4 Following the tasks below, you will develop a program that will calculate the deflection of this simply supported beam with one or more loads for any beam material, dimensions and loading. You may assume that the given values will always be in SI units; this implies that the deflection equation above will calculate the deflection in meters. See MA5_SampleCalculations.pdf for examples of these beam deflection calculations. Tasks TASK 1: Material selection and data validation (3 - 5 min) Proficiency Time: 50 - 70 min Prompt the user to select a material from the Material string array. If user exits out of the menu, keep asking the user for a selection until one is made. You will use this selection to determine the Young's modulus value from the Elasticity vector. Each material has a corresponding Young's modulus [Pa]. TASK 2: Dimensional information and data validation (13 - 17 min) Write a user-defined function named Valid Input.m which validates a user's input. This function should use the same syntax as the built-in input() function with one input (the prompt) and one output (the stored variable). In the function, perform the following data validation: if the entered value is zero or negative, prompt the user for a new value. If after 3 attempts the user has not entered a positive value, produce a warning and take the absolute value of the most recently entered value. If the most recent value is zero, produce an error and terminate the program. Call this function 3 times in your main script to prompt the user for the length L [m], the width w [m], and the height h [m] of the beam. TASK 3: Calculate deflection for a single load on a simply supported beam (18-24 min) Prompt the user to enter a concentrated force F [N] and the location of the force on the beam a [m]. Include the length of the beam L in the statement requesting the location of the force. Using Eq. 1 through 4, determine the deflection curve across the entire beam and plot the deflection as a solid line. Your plot must include the following: X-axis label Y-axis label X-axis limit set to the length of the beam Deflection shown in millimeters Title with material name Gridlines HINT: See MA5_SampleCalculations.pdf for an example of using Eq. 1 through 4 to determine the deflection at a single point on the beam. This calculation can be generalized to apply to the entire beam. TASK 4: Calculate deflection for multiple loads on a simply supported beam (13 - 19 min) Prompt the user to enter multiple concentrated forces [N/m] and the locations of each of the forces on the beam [m] as vectors. Using Eq. 1 through Eq. 4, determine the total deflection of the beam caused by all of the forces across the entire beam and plot the deflection as a solid line in a new figure. Your plot should include the same formatting as the plot in Task 3. Then, output to the command window the maximum deflection of the beam in millimeters. HINT: The total deflection of the beam at any point is the sum of the deflections caused by each single force at that point. TASK 5: Programming controls (3 - 5 min) After Task 4, ask the user if they would like to repeat the multiple loads calculation with different forces and locations. If yes, repeat Task 4. If not, your program should end. 0 2 Case 1: Sample of warnings and errors from Task 2 Select a material: Rubber Wood (along grain) Aluminum Titanium Command Window Enter the length of the beam [m]: -8 Enter the length of the beam [m]: -8 Enter the length of the beam [m]: -8 Warning: Invalid value entered 3 times. Taking the absolute value of the entered value. > In ValidInput (line 10) In MA6 cougarnetID (line 16) Graphene Steel Enter the width of the beam [m]: 0 Enter the width of the beam [m]: -5 Enter the width of the beam [m]: 0 Error using ValidInput (line 13) Cobalt-Chrome Entered value is zero. Cannot solve problem, exiting program. Error in MA6 cougarnetID (line 17) w = ValidInput ('Enter the width of the beam [m]: '); Case 2: Sample of fully ran program, with Task 4 repeated once Select a material: Rubber Wood (along grain) Aluminum Titanium Graphene Steel Cobalt-Chrome Command Window Enter the length of the beam [m]: 10 Enter the width of the beam [m]: 0.1 Enter the height of the beam [m]: 0.1 Enter the magnitude of a concentrated force acting on the beam [N]: 1500 Enter the location of the force (0 - 10.00 meters): 7 Enter the magnitudes of multiple loads on the beam [N]: [800 350 200] Enter the locations of the forces, in order (0 - 10.00 meters): [3 5 8] The maximum deflection of the beam is 13.748 [mm]. Enter the magnitudes of multiple loads on the beam [N]: [800 350 200 1500] Enter the locations of the forces, in order (0 - 10.00 meters): [3 5 8 7] The maximum deflection of the beam is 28.597 [mm]. First figure displayed Second figure displayed Second figure re-displayed Deflection of Steel Beam Under a Concentrated Load -2 Deflection of Steel Beam Under Multiple Concentrated Loads T Deflection of Beam (y) [mm] -8 -10 -12 Q-14 Deflection of Beam (y) [mm] 4 6 -10 -12 -14 -16 -16 -18 0 1 2 3 4 5 6 7 B 9 10 0 1 2 3 4 5 6 Beam Location (x) [m] Beam Location (x) [m] 5 Deflection of Beam (y) [mm] -25 25 -15 10 -10 30 Deflection of Steel Beam Under Multiple Concentrated Loads 10 -35 0 1 2 3 4 6 6 Beam Location (x) [m] Would you like to repeat the calculation for a different set of loads? Would you like to repeat the calculation for a different set of loads? Yes No Yes No 10 %TASK 1 load ('MaterialElasticity.mat'); materials = Material; elasticity = Elasticity; MATERIALS = menu ('select a naterial', Material); while MATERIALS == 0 MATERIALS = menu ('select a naterial', Material); end = elasticity (MATERIALS); 9%TASK 2 = Valid Input('enter lenght') 2W = Valid Input('enter Width') 3 h = Valid Input('enter Height') 4 5 %Task 3 6 7 F = input('enter the force') 8 Y = 1:L 9a = input(['enter the location ' num2str(Y) 'in meteres' ]) ; 0 I = (wxh^3)/12; 31 R = (F/L)*(L-a) 32 | theta = (Fa)/(6*E*I*L).*(2*L-a).*(L-a); 33 x = 0:0.1:L 34 y = zeros(size(x)); 35 S 36 for K = 1:length(x) 37 38 39 40 41 42 end if x(K) Assessment: 4 of 7 Tests Passed (60%) TEST CASE #1: Task 1: Material selection is correctly validated. Task 2: Beam dimensions are correctly validated. TEST CASE #2: Task 3: The prompt for force location includes the beam length. Beam deflection for a single, concentrated load is plotted correctly. Plot is formatted correctly. Task 4: Beam deflection due to multiple loads is plotted correctly. Plot is formatted correctly. The maximum beam deflection is correct. Submit ? 0% (0%) 20% (20%) 20% (20%) 0% (0%) 20% (20%) 0% (20%) The plot for multiple loads is incorrect. The following plot formatting is incorrect/missing: title containing the material name, x- axis label, y-axis label, grid lines, x-axis set to the length of the beam. The maximum deflection of the beam is incorrect. Task 5: Program repeats correctly. The program does not repeat correctly. 0% (20%) Total: 60%
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
