Search for question
Question

B D F F C E G 10 kips 10 kips 10 kips 10 ft 10 ft 10 ft 10 ft H/n(b) Knowing that the specific weight of the steel used is 0.284 lb/in³, modify the matlab program that can be used to calculate the weight of the truss and the cross-sectional area of each load- bearing member for values of ☺ from 20° to 80° using 5° increments. When you modify the code, think about how many equations will be generated? How many unknowns are there? Preparing an input file following the example shown in the pdf will help you solve the problem. You may want to modify the coordinates of each node based on ☺ values inside your program. (c) Using appropriate smaller increments, determine the optimum value of and the corresponding values of the weight of the truss and of the cross-sectional areas of the various members. Ignore the weight of any zero-force member in your computations./n1. modify the code to calcuate the weight a. How to calcuate weight m? m = PAL both density p = 0.284 lb/in³, length L can be calcuated based on the geometry, cross section A can be caculated as the internal force for each member divided by the maximum allowed stress b. how to do it in the code? we should define an array A and L for each member, and calcuate them. I can be calcuated easily based on the coordinates of the ending points connected for the element. We can loop over all the elements. c. what about area A? well, A = F/σ, so A should be calcuated after we find the internal force F. Again, we do it for each member. d. what about the zero force member? we can assume it takes the average area. e. It is a good idea to save the weight as we need it to find the optimal angle later, we can save it as output. The first line of the code can be function [weight]=trussWeight (file_name) 2. modify the code to calcuate the weight at different angle a. The most naive approach is to generate the different input files, each input file correspond to one angle 0, you can do it on your calcuator and save the coordinates for each node b. wait, why do we need a calculator again? don't we have matlab? we should be able to ask matlab to do it. Realizing that changing angle only changing the coordinates for node B, D, E? so we can use two inputs for the function: function [weight]=truss Weight Angle(file_name, theta); So to calcuate the weight for different theta would be as easy as creating a script file clear theta 20:5:50; = n_theta = length(theta); weights =zeros(n_theta, 1); for 1:n theta end weights (i)-trussWeight Angle(file_name, theta(i)) [minw, id ]=min (weights) % find the mininum weight and the index minAngle = theta (id) % the angle that reaches minimum weight

Fig: 1

Fig: 2

Fig: 3