💥 💥 💞 💞 欢迎来到本博客 ❤️ ❤️ 💥 💥
🏆 博主优势: 🌞 🌞 🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳ 座右铭:行百里者,半于九十。
📋 📋 📋 本文目录如下: 🎁 🎁 🎁
目录
💥1 概述
📚2 运行结果
🎉3 参考文献
🌈4 Matlab代码实现
💥1 概述
本文包括基于伴随方法的有限元分析和 p 范数应力敏感性,并通过有限差分近似进行验证。该代码使用移动渐近线方法 (MMA) 优化器作为非线性优化器。针对不同的应力相关 3D 拓扑优化问题进行扩展,并用于教育目的。
📚2 运行结果
部分代码:
clc clear close('all'); warning('off','all') nelx=200; nely=60; nelz=1; x=0.3*ones(nely,nelx,nelz); [Hs,H]=prepare_filter(2.5,nelx,nely,nelz); m =1; epsimin = 0.0000001; n=length(x(:)); xval=x(:); xold1 = xval; xold2 = xval; xlb = 1e-3*ones(n,1); xub = 1*ones(n,1); xmin = xlb; xmax = xub; low = xlb; upp = xub; c = [1e4]'; d = [0]'; a0 = 0; a = [0]'; raa0 = 0.0001; raa = 0.0001; raa0eps = 0.0000001; raaeps = 0.0000001; outeriter = 0; maxoutit = 120; kkttol = 0; x_his=zeros(nelx*nely*nelz,maxoutit); if outeriter < 0.5 [f0val,df0dx,fval,dfdx]=stress_minimize(xval,Hs,H); innerit=0; outvector1 = [outeriter innerit xval']; outvector2 = [f0val fval']; end kktnorm = kkttol+1; outit = 0; while outit < maxoutit outit = outit+1; outeriter = outeriter+1; %%%% The parameters low, upp, raa0 and raa are calculated: [low,upp,raa0,raa] = ... asymp(outeriter,n,xval,xold1,xold2,xmin,xmax,low,upp, ... raa0,raa,raa0eps,raaeps,df0dx,dfdx); [xmma,ymma,zmma,lam,xsi,eta,mu,zet,s,f0app,fapp] = ... gcmmasub(m,n,outeriter,epsimin,xval,xmin,xmax,low,upp, ... raa0,raa,f0val,df0dx,fval,dfdx,a0,a,c,d); xold2 = xold1; xold1 = xval; xval = xmma; [f0val,df0dx,fval,dfdx]=stress_minimize(xval,Hs,H); % PRINT RESULTS fprintf(' It.:%5i P-norm Stress.:%11.4f Vol.:%7.3f \n',outit,f0val, ... mean(xval(:))); %%%% The residual vector of the KKT conditions is calculated: [residu,kktnorm,residumax] = ... kktcheck(m,n,xmma,ymma,zmma,lam,xsi,eta,mu,zet,s, ... xmin,xmax,df0dx,fval,dfdx,a0,a,c,d); outvector1 = [outeriter innerit xval']; outvector2 = [f0val fval']; x_his(:,outit)=xmma; end
🎉3 参考文献
部分理论来源于网络,如有侵权请联系删除。
[1]荣见华,姜节胜,胡德文,颜东煌,付俊庆.基于应力及其灵敏度的结构拓扑渐进优化方法[J].力学学报,2003(05):584-591.