MSc Structural Analysis Andrew Phillips MEng PhD Lecturer in Structural Engineering and Structural Biomechanics Imperial College London Structural Biomechanics, Structures Section Department of Civil and Environmental Engineering www.imperial.ac.uk/structuralbiomechanics Implementing the Matrix Stiffness Method
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
MSc Structural Analysis
Andrew Phillips MEng PhD
Lecturer in Structural Engineering and Structural Biomechanics
Imperial College London
Structural Biomechanics, Structures SectionDepartment of Civil and Environmental Engineering
www.imperial.ac.uk/structuralbiomechanics
Implementing the Matrix Stiffness Method
Implementing the Matrix Stiffness Method
Previously it was stated that the matrix stiffness methodcould easily be implemented in a program such as Matlab.
Here we will look at the implementation for a beam and aframe example.
The approach can be used for any structure made up ofdistinct elements connected together at nodes or joints.
Implementing the Matrix Stiffness Method
Beam Example
Implementing the Matrix Stiffness Method
Node and Element Numbering
Implementing the Matrix Stiffness Method
Matlab Code: Setting Up
% Setting up a member stiffness matrix (bending)k = [4 2; 2 4];
% Setting up a matrix of distributed loadsw=[40 20 20 60];
% Setting up a matrix of lengthsL=[4 6 6 4];
% Setting up a matrix of EI valuesEI = [1 1.5 1.5 2];% Assuming use of UB402x140x42EI = EI. * (2.05 * 10ˆ8 * 0.0001569); % kN/mˆ2 * mˆ4
Implementing the Matrix Stiffness Method
Matlab Code: Moment Stiffness Matrix
% Setting up the combined structure stiffness matrix% Based on the degree of kinematic indeterminacy (5)ndof=5;K=zeros(ndof,ndof);for n=1:ndof-1
% Setting up a vertical stiffness matrix% These values can be taken from the 3D member stiffness matri xkvert = [6 6; -6 -6];Kvert = zeros(ndof,ndof);for n=1:ndof-1
%%%% Calculation to find values for the vertical support rea ctions (R2)R2 = FER2support+Kvert * theta;fprintf( 'Vertical Support Reactions (kN): \n' );fprintf( '%1.4e, ' ,R2); fprintf( '\n\n' );
Vertical Support Reactions (kN):6.1951e+001, 1.6154e+002, 1.1122e+002, 2.0602e+002, 9.9 268e+001,
Implementing the Matrix Stiffness Method
Conclusions
The script can be generalised for any continuous beam.
Results are found to match those obtained from Oasys GSAexcluding shear deformations.
% See the labelling on the diagramL = zeros(numelem,1); %number of elementsL(1:12,1)=4; %refer to diagramL(13,1)=4 * sqrt(2); %refer to diagram
Implementing the Matrix Stiffness Method
Matlab Code: Member Stiffness Matrices
% Setting up a reference member stiffness matrix for each mem berk=zeros(6,6,numelem);for n=1:numelemk(1:6,1:6,n) = [E * A/L(n) 0 0 -E * A/L(n) 0 0; ...
Alternative code to transform k to kdash for each element
%%%% The same transformation can be achieved using this code blockN=zeros(6,6,numelem);kdash=zeros(6,6,numelem);for n=1:numelem;
% setting up a transformation matrix for all four quadrants% top-left and bottom-right quadrants of N contain trigonom etric terms% top-right and bottom-left quadrants of N contain zero term sN(1:3,1:3,n)=[cos(alpha(n)) +sin(alpha(n)) 0; ...
% Setting up connectivity tables for the elements% Refer to the diagram% This will be used to shape the global stiffness matrixconnelem=[1 5; 2 6; 3 7; 4 8; 6 9; 7 10; 8 11; ...
5 6; 6 7; 7 8; 9 10; 10 11; ...5 9];
% As mentioned the k matrices can be broken into quadrants 3x3 in size% Deriving an initial global stiffness matrix, K% Note the final matrix must be symmetrical about the diagona l% Taking each of the nodes in turn and working out where the dif ferent% quadrant of the original kdash matrices should be placed in K
for m=1:length(b);FER2node(n,1)=FER2node(n,1)+FER2elem(b(m),2);
endend
end
Implementing the Matrix Stiffness Method
Assembling the Fixed End Reactions Matrix
%Setting up matrix of FE reactionsFERnode=zeros(3 * numnodes,1);FERnode(3:3:3 * numnodes,1)=FEMnode(1:1:numnodes,1);FERnode(2:3:3 * numnodes,1)=FER2node(1:1:numnodes,1);FERnode(Ksupportrefs,1)=0;
Implementing the Matrix Stiffness Method
Finding the Joint Displacements
∆˜= K
˜
−1(−R˜
FE )
%Finding the joint displacementsdisplacements=(Kˆ-1) * (-FERnode);reshapedisplacements=reshape(displacements,3,[]);fprintf( '\nDisplacements at the nodes (m,m,rad):\n\n' );disp(reshapedisplacements);
%Finding the support reactions%Isolating the elements that have restrained ends%This relies on supports being defined for single elementsa=size(supports);for n=1:a(1)