MATLAB有限元分析与应用.ppt

上传人:za****8 文档编号:15800783 上传时间:2020-09-07 格式:PPT 页数:55 大小:803.50KB
返回 下载 相关 举报
MATLAB有限元分析与应用.ppt_第1页
第1页 / 共55页
MATLAB有限元分析与应用.ppt_第2页
第2页 / 共55页
MATLAB有限元分析与应用.ppt_第3页
第3页 / 共55页
点击查看更多>>
资源描述
2020/9/7,1,第三章 MATLAB有限元分析与应用,3-1 弹簧元,结构分析编程及软件应用,3-2 线性杆元,3-3 二次杆元,3-4 平面桁架元,3-5 空间桁架元,3-6 梁元,2020/9/7,2,3-1 弹簧元,结构分析编程及软件应用,1、有限元方法的步骤:,离散化域,形成单刚矩阵,集成整体刚度矩阵,引入边界条件,求解方程,后处理,2020/9/7,3,结构分析编程及软件应用,2、基本方程,3-1 弹簧元,弹簧元是总体和局部坐标一致的一维有限单元,每个弹簧元有两个节点(node),单刚矩阵为:,总刚矩阵:,结构方程:,单元节点力:,2020/9/7,4,结构分析编程及软件应用,3、MATLAB函数编写,3-1 弹簧元,%SpringElementStiffness This function returns the element stiffness %matrix for a spring with stiffness k. %The size of the element stiffness matrix is 2 x 2.,3.1 单元刚度矩阵的形成,y = k -k ; -k k;,function y = SpringElementStiffness(k),2020/9/7,5,结构分析编程及软件应用,3、MATLAB函数编写,3-1 弹簧元,%SpringAssemble This function assembles the element stiffness % matrix k of the spring with nodes i and j into the % global stiffness matrix K. % This function returns the global stiffness matrix K % after the element stiffness matrix k is assembled.,3.2 整体刚度矩阵的形成,K(i,i) = K(i,i) + k(1,1); K(i,j) = K(i,j) + k(1,2); K(j,i) = K(j,i) + k(2,1); K(j,j) = K(j,j) + k(2,2); y = K;,function y = SpringAssemble(K,k,i,j),2020/9/7,6,结构分析编程及软件应用,3、MATLAB函数编写,3-1 弹簧元,%SpringElementForces This function returns the element nodal force % vector given the element stiffness matrix k % and the element nodal displacement vector u.,3.3 节点载荷计算,y = k * u;,function y = SpringElementForces(k,u),2020/9/7,7,结构分析编程及软件应用,4、实例计算分析应用,3-1 弹簧元,如图所示二弹簧元结构,假定k1=100kN/m,k2=200kN/m,P=15kN。 求:系统的整体刚度矩阵; 节点2、3的位移; 节点1的支反力; 每个弹簧的内力,解:,步骤1:离散化域,2020/9/7,8,结构分析编程及软件应用,4、实例计算分析应用,3-1 弹簧元,步骤2:形成单元刚度矩阵,k1=SpringElementStiffness(100);,k1 = 100 -100 -100 100,k2=SpringElementStiffness(200);,k2 = 200 -200 -200 200,调用 function y = SpringElementStiffness(k)函数,2020/9/7,9,结构分析编程及软件应用,4、实例计算分析应用,3-1 弹簧元,步骤3:集成整体刚度矩阵,调用 function y = SpringAssemble(K,k,i,j)函数,n=3; K = zeros(n,n);,K = SpringAssemble(K,k1,1,2),K = 0 0 0 0 0 0 0 0 0,K = SpringAssemble(K,k2,2,3),K = 100 -100 0 -100 100 0 0 0 0,K = 100 -100 0 -100 300 -200 0 -200 200,2020/9/7,10,结构分析编程及软件应用,4、实例计算分析应用,3-1 弹簧元,步骤4:引入边界条件,已知边界条件:,2020/9/7,11,结构分析编程及软件应用,5、实例计算分析应用,3-1 弹簧元,步骤5:解方程,U=zeros(2,1); F=0;15; K = K(2:3,2:3); U=KF,U=inv(K)*F,K(1,:)=; K(:,1)=;,U = 0.1500 0.2250,2020/9/7,12,结构分析编程及软件应用,5、实例计算分析应用,2-1 弹簧元,步骤6:后处理,U=0;U,U = 0 0.1500 0.2250,F=K*U,F = -15.0000 0.0000 15.0000,u1=U(1:2); f1=SpringElementForces(k1,u1);,f1 = -15.0000 15.0000,u2=U(2:3); f2=SpringElementForces(k2,u2);,f2 = -15.0000 15.0000,2020/9/7,13,结构分析编程及软件应用,5、实例计算分析应用,3-1 弹簧元,k1=SpringElementStiffness(100); k2=SpringElementStiffness(200); n=3; K=zeros(n,n); K=SpringAssemble(K,k1,1,2); K=SpringAssemble(K,k2,2,3); U=zeros(2,1); F=0;15; K = K(2:3,2:3); KK=K; U=KF U=0;U; F=K*U; u1=U(1:2); f1=SpringElementForces(k1,u1) u2=U(2:3); f2=SpringElementForces(k2,u2),2020/9/7,14,结构分析编程及软件应用,1、基本方程,3-2 线性杆元,线性杆元也是总体和局部坐标一致的一维有限单元,用线性函数描述,每个线性杆元有两个节点(node),单刚矩阵为:,总刚矩阵:,结构方程:,单元节点力:,2020/9/7,15,结构分析编程及软件应用,2、MATLAB函数编写,%LinearBarElementStiffness This function returns the element % stiffness matrix for a linear bar with % modulus of elasticity E, cross-sectional % area A, and length L. The size of the % element stiffness matrix is 2 x 2.,2.1 单元刚度矩阵的形成,y = E*A/L -E*A/L ; -E*A/L E*A/L;,function y = LinearBarElementStiffness(E,A,L),3-2 线性杆元,2020/9/7,16,结构分析编程及软件应用,2、MATLAB函数编写,%LinearBarAssemble This function assembles the element stiffness % matrix k of the linear bar with nodes i and j % into the global stiffness matrix K. % This function returns the global stiffness % matrix K after the element stiffness matrix % k is assembled.,2.2 整体刚度矩阵的形成,K(i,i) = K(i,i) + k(1,1); K(i,j) = K(i,j) + k(1,2); K(j,i) = K(j,i) + k(2,1); K(j,j) = K(j,j) + k(2,2); y = K;,function y =LinearBarAssemble(K,k,i,j),3-2 线性杆元,2020/9/7,17,结构分析编程及软件应用,2、MATLAB函数编写,%LinearBarElementForces This function returns the element nodal % force vector given the element stiffness % matrix k and the element nodal % displacement vector u.,2.3 节点载荷计算,y = k * u;,function y = LinearBarElementForces(k,u),3-2 线性杆元,2020/9/7,18,结构分析编程及软件应用,2、MATLAB函数编写,%LinearBarElementStresses This function returns the element nodal % stress vector given the element stiffness % matrix k, the element nodal displacement % vector u, and the cross-sectional area A.,2.4 节点应力计算,y = k * u/A;,function y = LinearBarElementStresses(k, u, A),3-2 线性杆元,2020/9/7,19,结构分析编程及软件应用,3、实例计算分析应用,如图所示二线性杆元结构,假定E=210MPa,A=0.003m2,P=10kN, 节点3的右位移为0.002m。 求:系统的整体刚度矩阵; 节点2的位移; 节点1、3的支反力; 每个杆件的应力,解:,步骤1:离散化域,3-2 线性杆元,2020/9/7,20,结构分析编程及软件应用,3、实例计算分析应用,步骤2:形成单元刚度矩阵,k1=LinearBarElementStiffness(E,A,L1),k2=LinearBarElementStiffness(E,A,L2),调用 function y = LinearBarElementStiffness(E,A,L)函数,3-2 线性杆元,2020/9/7,21,结构分析编程及软件应用,3、实例计算分析应用,步骤3:集成整体刚度矩阵,调用 function y = LinearBarAssemble(K,k,i,j)函数,n=3; K = zeros(n,n),K = LinearBarAssemble (K,k1,1,2),K = 0 0 0 0 0 0 0 0 0,K = LinearBarAssemble (K,k2,2,3),3-2 线性杆元,2020/9/7,22,结构分析编程及软件应用,3、实例计算分析应用,步骤4:引入边界条件,已知边界条件:,3-2 线性杆元,2020/9/7,23,结构分析编程及软件应用,3、实例计算分析应用,步骤5:解方程,U=zeros(1,1); U3=0.002 F=-10; K = K(2,2) 105000 K0 = K(2,3); -630000 U=K(F-K0*U3),U =0.0012,3-2 线性杆元,2020/9/7,24,结构分析编程及软件应用,3、实例计算分析应用,步骤6:后处理,U=0;U;0.002,U = 0 0.0012 0.0002,F=K*U,F = -500.0000 -10.0000 510.0000,u1=U(1:2); f1= LinearBarElementForces(k1,u1) sigma1=LinearBarElementStresses(k1, u1, A),u2=U(2:3); f2= LinearBarElementForces(k2,u2) sigma2=LinearBarElementStresses(k2, u2, A),3-2 线性杆元,2020/9/7,25,结构分析编程及软件应用,3、实例计算分析应用,E=210E6; A=0.003; L1=1.5; L2=1; k1= LinearBarElementStiffness(E,A,L1); k2= LinearBarElementStiffness(E,A,L2); n=3; K = zeros(n,n); K = LinearBarAssemble (K,k1,1,2); K = LinearBarAssemble (K,k2,2,3); U=zeros(1,1); U3=0.002; F=-10;,3-2 线性杆元,KK=K; K=K(2,2); K0=K(2,3); U=K(F-K0*U3); U=0;U;U3; F=KK*U u1=U(1:2); f1= LinearBarElementForces(k1,u1) sigma1=LinearBarElementStresses(k1, u1, A) u2=U(2:3); f2= LinearBarElementForces(k2,u2) sigma2=LinearBarElementStresses(k2, u2, A),2020/9/7,26,结构分析编程及软件应用,1、基本方程,3-3 二次杆元,二次杆元也是总体和局部坐标一致的一维有限单元,用二次方程描述,每个线性杆元有三个节点(node),单刚矩阵为:,总刚矩阵:,结构方程:,单元节点力:,2020/9/7,27,结构分析编程及软件应用,2、MATLAB函数编写,%QuadraticBarElementStiffness This function returns the element % stiffness matrix for a quadratic bar % with modulus of elasticity E, % cross-sectional area A, and length L. % The size of the element stiffness % matrix is 3 x 3.,2.1 单元刚度矩阵的形成,y = E*A/(3*L)*7 1 -8 ; 1 7 -8 ; -8 -8 16;,function y = QuadraticBarElementStiffness(E,A,L),3-3 二次杆元,2020/9/7,28,结构分析编程及软件应用,2、MATLAB函数编写,%QuadraticBarAssemble This function assembles the element stiffness % matrix k of the quadratic bar with nodes i, j % and m into the global stiffness matrix K. % This function returns the global stiffness % matrix K after the element stiffness matrix % k is assembled.,2.2 整体刚度矩阵的形成,K(i,i) = K(i,i) + k(1,1); K(i,j) = K(i,j) + k(1,2); K(i,m) = K(i,m) + k(1,3); K(j,i) = K(j,i) + k(2,1); K(j,j) = K(j,j) + k(2,2);,function y =QuadraticBarAssemble(K,k,i,j,m),3-3 二次杆元,K(j,m) = K(j,m) + k(2,3); K(m,i) = K(m,i) + k(3,1); K(m,j) = K(m,j) + k(3,2); K(m,m) = K(m,m) + k(3,3); y = K;,2020/9/7,29,结构分析编程及软件应用,2、MATLAB函数编写,%QuadraticBarElementForces This function returns the element nodal % force vector given the element stiffness % matrix k and the element nodal % displacement vector u.,2.3 节点载荷计算,y = k * u;,function y = QuadraticBarElementForces(k,u),3-3 二次杆元,2020/9/7,30,结构分析编程及软件应用,2、MATLAB函数编写,%QuadraticBarElementStresses This function returns the element % nodal stress vector given the element % stiffness matrix k, the element nodal % displacement vector u, and the % cross-sectional area A.,2.4 节点应力计算,y = k * u/A;,function y = QuadraticBarElementStresses(k, u, A),3-3 二次杆元,2020/9/7,31,结构分析编程及软件应用,3、实例计算分析应用,如图所示双二次杆元结构,假定E=210MPa,A=0.003m2 求:系统的整体刚度矩阵; 节点2、3、4、5的位移; 节点1的支反力; 每个杆件的应力,解:,3-3 二次杆元,2020/9/7,32,结构分析编程及软件应用,3、实例计算分析应用,E=210E6; A=0.003; L=2; k1= QuadraticBarElementStiffness(E,A,L); k2= QuadraticBarElementStiffness(E,A,L); n=5; K = zeros(n,n); K =QuadraticBarAssemble(K,k1,1,3,2); K =QuadraticBarAssemble(K,k2,3,5,4); U=zeros(4,1); F=5;-10;-7;10;,KK=K; K=K(2:n,2:n); U=KF; U=0;U; F=KK*U; u1=U(1);U(3);U(2); f1= QuadraticBarElementForces(k1,u1); sigma1=QuadraticBarElementStresses(k1, u1, A); u2=U(3);U(5);U(4); f2=QuadraticBarElementForces(k2,u2); sigma2=QuadraticBarElementStresses(k2, u2, A);,3-3 二次杆元,2020/9/7,33,结构分析编程及软件应用,1、基本方程,3-4 平面桁架元,平面桁架元是既有局部坐标又有总体坐标二维有限元,用线性函数描述,每个平面桁架元有二个节点(node),单刚矩阵为:,总刚矩阵:,结构方程:,单元节点力:,2020/9/7,34,结构分析编程及软件应用,2、MATLAB函数编写,%PlaneTrussElementLength This function returns the length of the % plane truss element whose first node has % coordinates (x1,y1) and second node has % coordinates (x2,y2).,2.1 计算单元长度,y = sqrt(x2-x1)*(x2-x1) + (y2-y1)*(y2-y1);,function y = PlaneTrussElementLength(x1,y1,x2,y2),3-4 平面桁架元,2020/9/7,35,结构分析编程及软件应用,2、MATLAB函数编写,%PlaneTrussElementStiffness This function returns the element % stiffness matrix for a plane truss % element with modulus of elasticity E, % cross-sectional area A, length L, and % angle theta (in degrees). % The size of the element stiffness % matrix is 4 x 4.,2.2 单元刚度矩阵的形成,x = theta*pi/180; C = cos(x); S = sin(x); y = E*A/L*C*C C*S -C*C -C*S ; C*S S*S -C*S -S*S ; -C*C -C*S C*C C*S ; -C*S -S*S C*S S*S;,function y = PlaneTrussElementStiffness(E,A,L, theta),3-4 平面桁架元,2020/9/7,36,结构分析编程及软件应用,2、MATLAB函数编写,%PlaneTrussAssemble This function assembles the element stiffness % matrix k of the plane truss element with nodes % i and j into the global stiffness matrix K. % This function returns the global stiffness % matrix K after the element stiffness matrix k is assembled.,2.3 整体刚度矩阵的形成,K(2*i-1,2*i-1) = K(2*i-1,2*i-1) + k(1,1); K(2*i-1,2*i) = K(2*i-1,2*i) + k(1,2); K(2*i-1,2*j-1) = K(2*i-1,2*j-1) + k(1,3); K(2*i-1,2*j) = K(2*i-1,2*j) + k(1,4); K(2*i,2*i-1) = K(2*i,2*i-1) + k(2,1); K(2*i,2*i) = K(2*i,2*i) + k(2,2); K(2*i,2*j-1) = K(2*i,2*j-1) + k(2,3); K(2*i,2*j) = K(2*i,2*j) + k(2,4);,function y =PlaneTrussAssemble(K,k,i,j),K(2*j-1,2*i-1) = K(2*j-1,2*i-1) + k(3,1); K(2*j-1,2*i) = K(2*j-1,2*i) + k(3,2); K(2*j-1,2*j-1) = K(2*j-1,2*j-1) + k(3,3); K(2*j-1,2*j) = K(2*j-1,2*j) + k(3,4); K(2*j,2*i-1) = K(2*j,2*i-1) + k(4,1); K(2*j,2*i) = K(2*j,2*i) + k(4,2); K(2*j,2*j-1) = K(2*j,2*j-1) + k(4,3); K(2*j,2*j) = K(2*j,2*j) + k(4,4); y = K;,3-4 平面桁架元,2020/9/7,37,结构分析编程及软件应用,2、MATLAB函数编写,%PlaneTrussElementForce This function returns the element force % given the modulus of elasticity E, the % cross-sectional area A, the length L, % the angle theta (in degrees), and the % element nodal displacement vector u.,2.4 节点载荷计算,x = theta * pi/180; C = cos(x); S = sin(x); y = E*A/L*-C -S C S* u;,function y = PlaneTrussElementForce(E,A,L,theta,u),3-4 平面桁架元,2020/9/7,38,结构分析编程及软件应用,2、MATLAB函数编写,%PlaneTrussElementStress This function returns the element stress % given the modulus of elasticity E, the % the length L, the angle theta (in % degrees), and the element nodal % displacement vector u.,2.5 节点应力计算,x = theta * pi/180; C = cos(x); S = sin(x); y = E/L*-C -S C S* u;,function y = PlaneTrussElementStress(E,L,theta,u),3-4 平面桁架元,2020/9/7,39,结构分析编程及软件应用,3、实例计算分析应用,如图所示平面桁架结构,假定E=210MPa,A=0.0004m2 求:系统的整体刚度矩阵; 节点2的水平位移; 节点3的水平竖向位移; 节点1、2的支反力; 每跟杆件的应力,3-4 平面桁架元,2020/9/7,40,结构分析编程及软件应用,1、基本方程,3-5 空间桁架元,空间桁架元是既有局部坐标又有总体坐标三维有限元,用线性函数描 述。各单元之间通过铰接系统连接,只能传递力,而不能传递弯矩,每个桁架元有二个节点(node),2020/9/7,41,结构分析编程及软件应用,1、基本方程,3-5 空间桁架元,总刚矩阵:,结构方程:,单元节点力:,单刚矩阵为:,2020/9/7,42,结构分析编程及软件应用,2、MATLAB函数编写,%SpaceTrussElementLength This function returns the length of the % space truss element whose first node has % coordinates (x1,y1,z1) and second node has % coordinates (x2,y2,z2).,2.1 计算单元长度,y = sqrt(x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) + (z2-z1)*(z2-z1);,function y = SpaceTrussElementLength(x1,y1,z1,x2,y2,z2),3-5 空间桁架元,2020/9/7,43,结构分析编程及软件应用,2、MATLAB函数编写,%SpaceTrussElementStiffness This function returns the element % stiffness matrix for a space truss % element with modulus of elasticity E, % cross-sectional area A, length L, and % angles thetax, thetay, thetaz % (in degrees). The size of the element % stiffness matrix is 6 x 6.,2.2 单元刚度矩阵的形成,x = thetax*pi/180; u = thetay*pi/180; v = thetaz*pi/180; Cx = cos(x); Cy = cos(u); Cz = cos(v); w = Cx*Cx Cx*Cy Cx*Cz ; Cy*Cx Cy*Cy Cy*Cz ; Cz*Cx Cz*Cy Cz*Cz; y = E*A/L*w -w ; -w w;,function y = SpaceTrussElementStiffness(E,A,L,thetax,thetay,thetaz),3-5 空间桁架元,2020/9/7,44,结构分析编程及软件应用,2、MATLAB函数编写,%SpaceTrussAssemble This function assembles the element stiffness % matrix k of the space truss element with nodes % i and j into the global stiffness matrix K. % This function returns the global stiffness % matrix K after the element stiffness matrix % k is assembled.,2.3 整体刚度矩阵的形成,K(3*i-2,3*i-2) = K(3*i-2,3*i-2) + k(1,1); K(3*i-2,3*i-1) = K(3*i-2,3*i-1) + k(1,2); K(3*i-2,3*i) = K(3*i-2,3*i) + k(1,3); K(3*i-2,3*j-2) = K(3*i-2,3*j-2) + k(1,4); K(3*i-2,3*j-1) = K(3*i-2,3*j-1) + k(1,5); K(3*i-2,3*j) = K(3*i-2,3*j) + k(1,6); K(3*i-1,3*i-2) = K(3*i-1,3*i-2) + k(2,1); K(3*i-1,3*i-1) = K(3*i-1,3*i-1) + k(2,2); K(3*i-1,3*i) = K(3*i-1,3*i) + k(2,3); K(3*i-1,3*j-2) = K(3*i-1,3*j-2) + k(2,4); K(3*i-1,3*j-1) = K(3*i-1,3*j-1) + k(2,5); K(3*i-1,3*j) = K(3*i-1,3*j) + k(2,6);,function y =SpaceTrussAssemble(K,k,i,j),3-5 空间桁架元,2020/9/7,45,结构分析编程及软件应用,2、MATLAB函数编写,2.3 整体刚度矩阵的形成,3-5 空间桁架元,K(3*j-1,3*i-2) = K(3*j-1,3*i-2) + k(5,1); K(3*j-1,3*i-1) = K(3*j-1,3*i-1) + k(5,2); K(3*j-1,3*i) = K(3*j-1,3*i) + k(5,3); K(3*j-1,3*j-2) = K(3*j-1,3*j-2) + k(5,4); K(3*j-1,3*j-1) = K(3*j-1,3*j-1) + k(5,5); K(3*j-1,3*j) = K(3*j-1,3*j) + k(5,6); K(3*j,3*i-2) = K(3*j,3*i-2) + k(6,1); K(3*j,3*i-1) = K(3*j,3*i-1) + k(6,2); K(3*j,3*i) = K(3*j,3*i) + k(6,3); K(3*j,3*j-2) = K(3*j,3*j-2) + k(6,4); K(3*j,3*j-1) = K(3*j,3*j-1) + k(6,5); K(3*j,3*j) = K(3*j,3*j) + k(6,6); y = K;,K(3*i,3*i-2) = K(3*i,3*i-2) + k(3,1); K(3*i,3*i-1) = K(3*i,3*i-1) + k(3,2); K(3*i,3*i) = K(3*i,3*i) + k(3,3); K(3*i,3*j-2) = K(3*i,3*j-2) + k(3,4); K(3*i,3*j-1) = K(3*i,3*j-1) + k(3,5); K(3*i,3*j) = K(3*i,3*j) + k(3,6); K(3*j-2,3*i-2) = K(3*j-2,3*i-2) + k(4,1); K(3*j-2,3*i-1) = K(3*j-2,3*i-1) + k(4,2); K(3*j-2,3*i) = K(3*j-2,3*i) + k(4,3); K(3*j-2,3*j-2) = K(3*j-2,3*j-2) + k(4,4); K(3*j-2,3*j-1) = K(3*j-2,3*j-1) + k(4,5); K(3*j-2,3*j) = K(3*j-2,3*j) + k(4,6);,2020/9/7,46,结构分析编程及软件应用,2、MATLAB函数编写,%SpaceTrussElementForce This function returns the element force % given the modulus of elasticity E, the % cross-sectional area A, the length L, % the angles thetax, thetay, thetaz % (in degrees), and the element nodal % displacement vector u.,2.4 节点载荷计算,x = thetax * pi/180; w = thetay * pi/180; v = thetaz * pi/180; Cx = cos(x); Cy = cos(w); Cz = cos(v); y = E*A/L*-Cx -Cy -Cz Cx Cy Cz*u;,function y = SpaceTrussElementForce(E,A,L,thetax,thetay,thetaz,u),3-5 空间桁架元,2020/9/7,47,结构分析编程及软件应用,2、MATLAB函数编写,%SpaceTrussElementStress This function returns the element stress % given the modulus of elasticity E, the % length L, the angles thetax, thetay, % thetaz (in degrees), and the element % nodal displacement vector u.,2.5 节点应力计算,x = thetax * pi/180; w = thetay * pi/180; v = thetaz * pi/180; Cx = cos(x); Cy = cos(w); Cz = cos(v); y = E/L*-Cx -Cy -Cz Cx Cy Cz*u;,function y = SpaceTrussElementStress(E,L,thetax,thetay,thetaz,u),3-5 空间桁架元,2020/9/7,48,结构分析编程及软件应用,3、实例计算分析应用,如图所示空间桁架结构,假定E=210MPa,A14=0.001m2 A24=0.002m2,A34=0.001m2,P=12kN 求:系统的整体刚度矩阵; 节点4的水平位移; 节点3的水平竖向位移; 节点1、2、3的支反力; 每跟杆件的应力,3-5 空间桁架元,2020/9/7,49,结构分析编程及软件应用,1、基本方程,3-6 梁元,梁元是总体坐标与局部坐标一致的二维有限元,用线性函数描 述。各单元之间通过铰接系统连接,只能传递力,而不能传递弯矩,每个梁元有二个节点(node),单刚矩阵为:,总刚矩阵:,结构方程:,单元节点力:,2020/9/7,50,结构分析编程及软件应用,2、MATLAB函数编写,%BeamElementStiffness This function returns the element % stiffness matrix for a beam % element with modulus of elasticity E, % moment of inertia I, and length L. % The size of the element stiffness % matrix is 4 x 4.,2.1单元刚度矩阵的形成,y = E*I/(L*L*L)*12 6*L -12 6*L ; 6*L 4*L*L -6*L 2*L*L ; -12 -6*L 12 -6*L ; 6*L 2*L*L -6*L 4*L*L;,function y = BeamElementStiffness(E,I,L),3-6 梁元,2020/9/7,51,结构分析编程及软件应用,2、MATLAB函数编写,%BeamAssemble This function assembles the element stiffness % matrix k of the beam element with nodes % i and j into the global stiffness matrix K. % This function returns the global stiffness % matrix K after the element stiffness matrix % k is assembled.,2.2 整体刚度矩阵的形成,K(2*i-1,2*i-1) = K(2*i-1,2*i-1) + k(1,1); K(2*i-1,2*i) = K(2*i-1,2*i) + k(1,2); K(2*i-1,2*j-1) = K(2*i-1,2*j-1) + k(1,3); K(2*i-1,2*j) = K(2*i-1,2*j) + k(1,4); K(2*i,2*i-1) = K(2*i,2*i-1) + k(2,1); K(2*i,2*i) = K(2*i,2*i) + k(2,2); K(2*i,2*j-1) = K(2*i,2*j-1) + k(2,3); K(2*i,2*j) = K(2*i,2*j) + k(2,4);,function y =BeamAssemble(K,k,i,j),3-6 梁元,K(2*j-1,2*i-1) = K(2*j-1,2*i-1) + k(3,1); K(2*j-1,2*i) = K(2*j-1,2*i) + k(3,2); K(2*j-1,2*j-1) = K(2*j-1,2*j-1) + k(3,3); K(2*j-1,2*j) = K(2*j-1,2*j) + k(3,4); K(2*j,2*i-1) = K(2*j,2*i-1) + k(4,1); K(2*j,2*i) = K(2*j,2*i) + k(4,2); K(2*j,2*j-1) = K(2*j,2*j-1) + k(4,3); K(2*j,2*j) = K(2*j,2*j) + k(4,4); y = K;,2020/9/7,52,结构分析编程及软件应用,2、MATLAB函数编写,%BeamElementForces This function returns the element nodal force % vector given the element stiffness matrix k % and the element nodal displacement vector u.,2.4 节点载荷计算,y = k * u;,function y = BeamElementForces(k,u),3-6 梁元,2020/9/7,53,结构分析编程及软件应用,2、MATLAB函数编写,%BeamElementShearDiagram This function plots the shear force % diagram for the beam element with nodal % force vector f and length L.,2.4 绘制剪力图,x = 0 ; L; z = f(1) ; -f(3); hold on; title(Shear Force Diagram); plot(x,z); y1 = 0 ; 0; plot(x,y1,k),function y = BeamElementShearDiagram(f, L),3-6 梁元,2020/9/7,54,结构分析编程及软件应用,2、MATLAB函数编写,%BeamElementMomentDiagram This function plots the bending moment % diagram for the beam element with nodal % force vector f and length L.,2.4 绘制弯矩图,x = 0 ; L; z = -f(2) ; f(4); hold on; title(Bending Moment Diagram); plot(x,z); y1 = 0 ; 0; plot(x,y1,k),function y = BeamElementMomentDiagram(f, L),3-6 梁元,2020/9/7,55,结构分析编程及软件应用,3、实例计算分析应用,3-6 梁元,
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 图纸专区 > 课件教案


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!