Question

In: Civil Engineering

Develop a general computer program using MATLAB for the analysis of plane (2D) frames. You can...

Develop a general computer program using MATLAB for the analysis of plane
(2D) frames. You can use Chapter 6 as a reference. The program should be able
to:
a. Analyze a frame subjected to different load types, such as joint load,
member load, and support displacement;
b. Analyze frames with different boundary conditions: pin, roller, and fixed
support;
c. Generate the results including joint displacements, member axial, shear and
moment forces, and reactions

Solutions

Expert Solution

hello student

Answer to satisfy all your questions mentioned above, i am clearing your question by taking an example mentioned in picture below

clear all

clc

format short

E=210e6;

I=9*10^-5;

A=1*10^-2;

L1=[sqrt(13),5,sqrt(13)];

theta=[atand(3/2) 0 360-atand(3/2)];

ndcon=[1 2;2 3;3 4];

rsdof=[1 2 3 10 11 12];

nelem = size(ndcon,1);

nodes = 4;

ndofn = 3;

nnode = 2;

tdofs = 12;

K=zeros(tdofs);

gstif=zeros(12,12);

for ielem = 1:nelem

    gbdof=[];

    a=A*E/L1(ielem);

    b=12*E*I/(L1(ielem))^3;

    c=b*L1(ielem)/2;

    d=(b*L1(ielem)^2)/3;

    e=d/2;

    C=cosd(theta(ielem));

    S=sind(theta(ielem));

    estif=[a 0 0 -a 0 0;

           0 b c 0 -b c;

           0 c d 0 -c e;

          -a 0 0 a 0 0;

           0 -b -c 0 b -c;

           0 c e 0 -c d];

       T=[C S 0 0 0 0;

           -S C 0 0 0 0;

           0 0 1 0 0 0;

           0 0 0 C S 0;

           0 0 0 -S C 0;

           0 0 0 0 0 1];

    elcon=ndcon(ielem,:);

for inode = 1:nnode

for idofn = 1:ndofn

            eldof = (elcon(inode)-1)*ndofn+idofn;

            gbdof= [gbdof, eldof];

end

end

    gstif(gbdof,gbdof) = gstif(gbdof,gbdof)+T'*estif*T;

end

gstif

w=5;

Ft=[20 (-w*5/2) -(w*25/12) 0 (-w*5/2) (w*25/12)];

force=[0 0 0 20 (-w*5/2) -(w*25/12) 0 (-w*5/2) (w*25/12) 0 0 0]';

activ = setdiff(1:tdofs,rsdof);

u=gstif(activ,activ)\force(activ);

U=[0;0;0;u;0;0;0]

F=gstif*U-[0 0 0 Ft 0 0 0]';

f=zeros(6,3);

for ielem = 1:nelem

    gbdof=[]; %global DOF

    a=A*E/L1(ielem);

    b=12*E*I/(L1(ielem))^3;

    c=b*L1(ielem)/2;

    d=(b*L1(ielem)^2)/3;

    e=d/2;

    C=cosd(theta(ielem));

    S=sind(theta(ielem));

    elcon=ndcon(ielem,:);

    estif=[a 0 0 -a 0 0;

           0 b c 0 -b c;

           0 c d 0 -c e;

          -a 0 0 a 0 0;

           0 -b -c 0 b -c;

           0 c e 0 -c d];

       T=[C S 0 0 0 0;

           -S C 0 0 0 0;

           0 0 1 0 0 0;

           0 0 0 C S 0;

           0 0 0 -S C 0;

           0 0 0 0 0 1];

for inode = 1:nnode

for idofn = 1:ndofn

            eldof = (elcon(inode)-1)*ndofn+idofn;

            gbdof= [gbdof, eldof];

end

end

       f(:,ielem)=estif*T*U(gbdof);

end

for ielem=1:nelem

x=[0,L1(ielem)];

y1=[-f(3,ielem),f(6,ielem)];

y2=[f(2,ielem),-f(5,ielem)];

y3=[-f(1,ielem),f(4,ielem)];

figure

plot(x,y1,x,y2,x,y3)

legend('BM','SF','AF')

title('member')

end

%OUTPUT

% gstif =

%

%    1.0e+05 *

%

%     1.8256    2.6658   -0.0726   -1.8256   -2.6658   -0.0726         0         0         0         0         0         0

%     2.6658    4.0471    0.0484   -2.6658   -4.0471    0.0484         0         0         0         0         0         0

%    -0.0726    0.0484    0.2097    0.0726   -0.0484    0.1048         0         0         0         0         0         0

%    -1.8256   -2.6658    0.0726    6.0256    2.6658    0.0726   -4.2000         0         0         0         0         0

%    -2.6658   -4.0471   -0.0484    2.6658    4.0653   -0.0030         0   -0.0181    0.0454         0         0         0

%    -0.0726    0.0484    0.1048    0.0726   -0.0030    0.3609         0   -0.0454    0.0756         0         0         0

%          0         0         0   -4.2000         0         0    6.0256   -2.6658    0.0726   -1.8256    2.6658   0.0726

%          0         0         0         0   -0.0181   -0.0454   -2.6658    4.0653    0.0030    2.6658   -4.0471    0.0484

%          0         0         0         0    0.0454    0.0756    0.0726    0.0030    0.3609   -0.0726   -0.0484    0.1048

%          0         0         0         0         0         0   -1.8256    2.6658   -0.0726    1.8256   -2.6658   -0.0726

%          0         0         0         0         0         0    2.6658   -4.0471   -0.0484   -2.6658    4.0471   -0.0484

%          0         0         0         0         0         0    0.0726    0.0484    0.1048   -0.0726   -0.0484    0.2097

%

% U =

%          0

%          0

%          0

%     0.0013

%    -0.0009

%    -0.0005

%     0.0012

%     0.0008

%     0.0003

%          0

%          0

%          0


Related Solutions

Can you provide a sample programming for 2D plane frame in MATLAB ?
Can you provide a sample programming for 2D plane frame in MATLAB ?
Develop an onboarding program for an organization. This program can be general to the organization, or...
Develop an onboarding program for an organization. This program can be general to the organization, or can be for a specific area, and for brand new employees or those transferring/promoted who are new to an area of the organization Brief explanation, and identify the intended recipients of the program Identify the components of a socialization program that will be ideal for your onboarding program. Be sure to keep in mind the following items: Stage Models of Socialization The Information Newcomers...
Write a Matlab program to create specialized plot animation with 16 frames by using fast Fourier...
Write a Matlab program to create specialized plot animation with 16 frames by using fast Fourier transforms of complex matrices
I want the code for the 2D Ising model using Matlab
I want the code for the 2D Ising model using Matlab
Develop a python program to - Create a 2D 10x10 numpy array and fill it with...
Develop a python program to - Create a 2D 10x10 numpy array and fill it with the random numbers between 1 and 9 (including 0 and 9). - Assume that you are located at (0,0) (upper-left corner) and want to move to (9,9) (lower-right corner) step by step. In each step, you can only move right or down in the array. - Develop a function to simulate random movement from (0,0) to (9,9) and return sum of all cell values...
Can you create a player vs computer Hangman game on MATLAB using nested loops, for loops,...
Can you create a player vs computer Hangman game on MATLAB using nested loops, for loops, if loops, while loops, arrays and conditional execution, as well as creating an image of the game board. The list below must be considered in the code. - Selecting a word from a dictionary (a text file) - Reading a single letter from the user - Building a character array showing the letters matched so far - Keeping count of the number of guessed...
SS Inc. begins to develop a computer software program that can be sold to the public....
SS Inc. begins to develop a computer software program that can be sold to the public. During the current year, costs of $270,000 are incurred to arrive at the point of technological feasibility (a working model is available). Another $130,000 is then spent to turn that working model into a product that can be sold. Which of the following statements is true? A)$400,000 should be recorded as an expense in this year. B)$400,000 should be recorded as an asset to...
**Program needs to be in matlab format** A bowling match consists of ten frames. Each frame...
**Program needs to be in matlab format** A bowling match consists of ten frames. Each frame except for the tenth consists of one or two balls, or attempts to knock down the ten pins at the end of the alley. Doing so on the first ball of the frame is called a strike, and the second ball of the frame is not rolled. Knocking down all ten pins with both balls (having left some up with the first ball) is...
By using MATLAB 1. Divide a speech signal or music signal into frames of size N...
By using MATLAB 1. Divide a speech signal or music signal into frames of size N = 64. 2. Compute the N?point DFT of each frame. 3. Save only first L = 20 DFT coefficients. 4. Reconstruct the frame from these L coefficients. (Do not disturb the symmetry of DFT during inverse DFT computation. X[k] = X[N ?k] for real signals, N = 64 here. Pad zeros for missing DFT coefficients.) 5. Comment on the quality of reconstructed and the...
You are required to develop a computer code that that can solve systems of ODE. The...
You are required to develop a computer code that that can solve systems of ODE. The code should request the user to choose one of the following methods for solving the system: ? Euler ? 4th Order Runge Kutta  
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT