0% found this document useful (0 votes)
46 views1 page

Mat Lab Code

The function 'feframe2' calculates the stiffness and mass matrices for a 2-D frame element based on various input parameters such as elastic modulus, second moment of inertia, area, mass density, and angle between axes. It outputs a 6x6 element stiffness matrix and mass matrix, with options for different types of mass matrices. The function includes calculations for local and global axes transformations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views1 page

Mat Lab Code

The function 'feframe2' calculates the stiffness and mass matrices for a 2-D frame element based on various input parameters such as elastic modulus, second moment of inertia, area, mass density, and angle between axes. It outputs a 6x6 element stiffness matrix and mass matrix, with options for different types of mass matrices. The function includes calculations for local and global axes transformations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

%-------------------.. . .

--------
function [lc,m]=feframe2(el,xi,leng,area,rho,beta,ipt)
%----------------------------
% Purpose:
% Stiffness and mass matrices for the 2-D frame element
% nodal dof u1 v1 theta1 u2 v2 theta2
%
% Synopsis:
% [k,m]=feframe2{el,xi,leng,area,rho,beta,ipt)
%
% Variable Description:
% k - element stiffness matrix (size of 6x6)
% m - element mass matrix (size of 6x6)
% el - elastic modulus
% xi - second moment of inertia of cross-section
% Ieng - element length
% area - area of beam cross-section
% rho - mass density (mass per unit volume)
% beta - angle between the local and global axes
% is positive if the local axis is in the ccw direction from
% the global axis
% ipt = 1 - consistent mass matrix
% = 2 - lumped mass matrix
% = 3 - diagonal mass matrix
%----------------------------
%
% stiffness matrix at the local axis
%
a=el*area/leng;
c=el*xi/(leng·3);
kl=[a O O -a O O;...
0 12*c 6*leng*c O -12* c 6*leng*c;...
0 6*leng*c 4*leng"2*c O -6*leng*c 2*leng"2*c; ...
-a O O a O O;...
0 -12*c -6*leng*c O 12*c -6*leng*c;...
0 6*leng*c 2*leng"2*c O -6*leng*c 4*leng"2*c];
%
% rotation matrix
%
r=[ cos(beta) sin(beta) 0 0 0 O;.. .
-sin(beta) cos(beta) 0 0 0 O;.. .
0 0 1 0 0 O;...
0 0 0 cos(beta) sin(beta) O;.. .
0 0 0 -sin(beta) cos(beta) O;.. .
0 0 0 0 0 1];
%
% stiffness matrix at the global axis

You might also like