MATLAB有限元分析与应用ppt课件.ppt
《MATLAB有限元分析与应用ppt课件.ppt》由会员分享,可在线阅读,更多相关《MATLAB有限元分析与应用ppt课件.ppt(55页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、2022-6-61第三章第三章 MATLABMATLAB有限元分析与应用有限元分析与应用3-1 3-1 弹簧元弹簧元3-2 3-2 线性杆元线性杆元3-3 3-3 二次杆元二次杆元3-4 3-4 平面桁架元平面桁架元3-5 3-5 空间桁架元空间桁架元3-6 3-6 梁元梁元2022-6-623-1 弹簧元弹簧元 1、有限元方法的步骤:离散化域形成单刚矩阵集成整体刚度矩阵引入边界条件求解方程后处理2022-6-632、基本方程3-1 弹簧元弹簧元 弹簧元是总体和局部坐标一致的一维有限单元每个弹簧元有两个节点(node)kkkkk单刚矩阵为:2 2总刚矩阵:nn KUF结构方程:单元节点力: f
2、ku2022-6-643、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)2022-6-653、MATLAB函数编写3-1 弹簧元弹簧元 %SpringAs
3、semble 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)
4、;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)2022-6-663、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 *
5、 u;function y = SpringElementForces(k,u)2022-6-674、实例计算分析应用3-1 弹簧元弹簧元 如图所示二弹簧元结构,假定k1=100kN/m,k2=200kN/m,P=15kN。求:系统的整体刚度矩阵; 节点2、3的位移; 节点1的支反力; 每个弹簧的内力解:步骤1:离散化域2022-6-684、实例计算分析应用3-1 弹簧元弹簧元 步骤2:形成单元刚度矩阵k1=SpringElementStiffness(100);k1 = 100 -100 -100 100k2=SpringElementStiffness(200);k2 = 200 -200
6、 -200 200调用 function y = SpringElementStiffness(k)函数2022-6-694、实例计算分析应用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 0K = SpringAssemble(K,k2,2,3)K = 100 -100 0 -100 100 0 0 0 0K = 100 -100 0 -100 300 -200 0 -200 2
7、002022-6-6104、实例计算分析应用3-1 弹簧元弹簧元 步骤4:引入边界条件11223310010001003002000200200UFUFUF已知边界条件:1230,0,15UFF123100100001003002000020020015FUU2022-6-6115、实例计算分析应用3-1 弹簧元弹簧元 步骤5:解方程23300200020020015UUU=zeros(2,1);F=0;15;K = K(2:3,2:3);U=KFU=inv(K)*FK(1,:)=;K(:,1)=;U = 0.1500 0.22502022-6-6125、实例计算分析应用2-1 弹簧元弹簧元
8、步骤6:后处理U=0;UU = 0 0.1500 0.2250F=K*UF = -15.0000 0.0000 15.0000u1=U(1:2);f1=SpringElementForces(k1,u1);f1 = -15.0000 15.0000u2=U(2:3);f2=SpringElementForces(k2,u2);f2 = -15.0000 15.00002022-6-6135、实例计算分析应用3-1 弹簧元弹簧元 k1=SpringElementStiffness(100);k2=SpringElementStiffness(200);n=3;K=zeros(n,n);K=Spr
9、ingAssemble(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=KFU=0;U;F=K*U;u1=U(1:2);f1=SpringElementForces(k1,u1)u2=U(2:3);f2=SpringElementForces(k2,u2)2022-6-6141、基本方程3-2 线性杆元线性杆元 线性杆元也是总体和局部坐标一致的一维有限单元,用线性函数描述每个线性杆元有两个节点(node)EAEALLkEAEALL 单刚矩阵为:2 2总刚矩阵:nn KUF结构方程:单元
10、节点力: fku2022-6-6152、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;func
11、tion y = LinearBarElementStiffness(E,A,L)3-2 线性杆元线性杆元 2022-6-6162、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 s
12、tiffness 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 线性杆元线性杆元 2022-6-6172、MATLAB函数编写%LinearBarElementForces This function returns the element nodal % force vec
13、tor 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 线性杆元线性杆元 2022-6-6182、MATLAB函数编写%LinearBarElementStresses This function returns the element nodal % stress vector given the element stiffness % matri
14、x 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 线性杆元线性杆元 2022-6-6193、实例计算分析应用如图所示二线性杆元结构,假定E=210MPa,A=0.003m2,P=10kN, 节点3的右位移为0.002m。求:系统的整体刚度矩阵; 节点2的位移; 节点1、3的支反力; 每个杆件的应力解:步骤1:离散化域3-2 线性杆元线性杆元 20
15、22-6-6203、实例计算分析应用步骤2:形成单元刚度矩阵k1=LinearBarElementStiffness(E,A,L1)k2=LinearBarElementStiffness(E,A,L2)调用 function y = LinearBarElementStiffness(E,A,L)函数3-2 线性杆元线性杆元 2022-6-6213、实例计算分析应用步骤3:集成整体刚度矩阵调用 function y = LinearBarAssemble(K,k,i,j)函数n=3; K = zeros(n,n)K = LinearBarAssemble (K,k1,1,2)K = 0 0
16、0 0 0 0 0 0 0K = LinearBarAssemble (K,k2,2,3)3-2 线性杆元线性杆元 2022-6-6223、实例计算分析应用步骤4:引入边界条件已知边界条件:1320,0.002,10UUF 3-2 线性杆元线性杆元 112233420000420000042000010500006300000630000630000UFUFUF1234200004200000042000010500006300001006300006300000.002FUF 2022-6-6233、实例计算分析应用步骤5:解方程 21050006300000.00210U U=zeros(
17、1,1);U3=0.002F=-10;K = K(2,2) 105000K0 = K(2,3); -630000U=K(F-K0*U3)U =0.00123-2 线性杆元线性杆元 2022-6-6243、实例计算分析应用步骤6:后处理U=0;U;0.002U = 0 0.0012 0.0002F=K*UF = -500.0000 -10.0000 510.0000u1=U(1:2);f1= LinearBarElementForces(k1,u1)sigma1=LinearBarElementStresses(k1, u1, A)u2=U(2:3);f2= LinearBarElementFo
18、rces(k2,u2)sigma2=LinearBarElementStresses(k2, u2, A)3-2 线性杆元线性杆元 2022-6-6253、实例计算分析应用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=
19、-10;3-2 线性杆元线性杆元 KK=K;K=K(2,2);K0=K(2,3);U=K(F-K0*U3);U=0;U;U3;F=KK*Uu1=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)2022-6-6261、基本方程3-3 二次杆元二次杆元 二次杆元也是总体和局部坐标一致的一维有限单元,用二次方程描述每个
20、线性杆元有三个节点(node)71817838816EAkL单刚矩阵为:3 3总刚矩阵:nn KUF结构方程:单元节点力: fku3 12022-6-6272、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
21、 % 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 二次杆元二次杆元 2022-6-6282、MATLAB函数编写%QuadraticBarAssemble This function assembles the element stiffness% matrix k of the quadratic bar with nodes i, j % and m into the global stiff
22、ness 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
23、,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;2022-6-6292、MATLAB函数编写%QuadraticBarElementForces This function returns the element nodal % force vector given the element stiffness % matrix k and the element nodal % displacemen
24、t vector u.2.3 节点载荷计算y = k * u;function y = QuadraticBarElementForces(k,u)3-3 二次杆元二次杆元 2022-6-6302、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-section
25、al area A.2.4 节点应力计算y = k * u/A;function y = QuadraticBarElementStresses(k, u, A)3-3 二次杆元二次杆元 2022-6-6313、实例计算分析应用如图所示双二次杆元结构,假定E=210MPa,A=0.003m2求:系统的整体刚度矩阵; 节点2、3、4、5的位移; 节点1的支反力; 每个杆件的应力解:3-3 二次杆元二次杆元 2022-6-6323、实例计算分析应用E=210E6;A=0.003;L=2;k1= QuadraticBarElementStiffness(E,A,L);k2= QuadraticBar
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- MATLAB 有限元分析 应用 ppt 课件
限制150内