【物理應(yīng)用】Matlab實現(xiàn)兩端固支梁熱力耦合的有限元分析
【物理應(yīng)用】Matlab實現(xiàn)兩端固支梁熱力耦合的有限元分析
TT_Matlab
博主簡介:擅長智能優(yōu)化算法、神經(jīng)網(wǎng)絡(luò)預(yù)測、信號處理、元胞自動機、圖像處理、路徑規(guī)劃、無人機等多種領(lǐng)域的Matlab仿真,完整matlab代碼或者程序定制加qq1575304183。
1 簡介
Matlab實現(xiàn)兩端固支梁熱力耦合的有限元分析
2 部分代碼
% -------------------------------------------------------------------------
% BASIC PARAMETERS (BRIDGE-LIKE STRUCTURE)
% -------------------------------------------------------------------------
clear ; clc ;
HoriTotal = 100 ; % horizontal
VeriTotal = 70; % vertical
IniVolfrac = 0.5 ; % initial volume fraction
Volfrac = 0.25 ; % allowable volume fraction
varimin = 1e-3 ; % smallest value of design variable
ObjScale = 14e-3 ;
rmin = 2 ; % filter radius
F_uni = 35 ; % distributed load
qnVari = 0.3 ; % STM applied to design variables
RE = 28 ; % RAMP for stiffness
Rbt = 16 ; % RAMP for thermal stress coefficient
Talafa0 = 12.1e-6 ; % thermal expansion coefficient
TwoDeVec = [ 1 1 0 ];
% -------------------------------------------------------------------------
% DISCRETIZATION FEATURES
% -------------------------------------------------------------------------
%-ELEMENT STIFFNESS-
a = 0.5 ;
b = 0.5;
h = 1 ; % element thickness
v0 = (2*a) * (2*b) * h ; % volume of solid element
E0 = 2.1e5 ; % elastic modulus
Emin = 0 * E0 ;
NU = 0.3 ;
si = -1 ; ti = 1 ;
sj = 1 ; tj = 1 ;
sm = 1 ; tm = -1 ;
sp = -1 ; tp = -1 ;
ID = 1 ; % ID = 1: plane stress problem, ID = 2: plane strain problem
dce = zeros( Syselem ,1 ) ;
for loopi = 1 : Syselem
c = c + 0.5 * (xPhys(loopi)/(1 + RE * (1-xPhys(loopi)))) * nodes_d(loopi,:) * E0 * KE * nodes_d(loopi,:)’ ; % structural compliance
dce(loopi) = nodes_d(loopi,:) * (((1 + Rbt)/(1+Rbt*(1-xPhys(loopi)))^2 * E0 * Talafa0 ) * Feth0(:,loopi))...
- 0.5 * (1+RE)/(1 + RE * (1-xPhys(loopi)))^2 * nodes_d(loopi,:) * E0 * KE * nodes_d(loopi,:)’ ; % sensitivity of structural compliance
end
Compli = c ;
dce(:) = H * (dce(:)./Hs);
dve = ones(Syselem,1).* v0/(Syselem * v0 * Volfrac); % volume constraint
dve(:) = H * (dve(:)./Hs);
%-METHOD OF MOVING ASYMPTOTES-
m = 1; % number of constraint functions
a1 = zeros(m,1); % Column vector with the constants a_i in the terms a_i*z.
c_MMA = 10000*ones(m,1); % Column vector with the constants c_i in the terms c_i*y_i.
d = zeros(m,1); % Columns vector with the constants d_i in the terms 0.5*d_i*(y_i)^2.
xval = xDes;
f0val = c; % compliance minimization
df0dx = dce(:);
fval = sum(xPhys.*v0)/(Syselem * v0 * Volfrac)-1 ; % volume constraint
dfdx = dve’ ;
[xmma, ~, ~, ~, ~, ~, ~, ~, ~, low,upp] = ...
mmasub(m, n, loop, xval, xmin, xmax, xold1, xold2, ...
f0val,df0dx,fval,dfdx,low,upp,a0,a1,c_MMA,d); % Update MMA Variables
xnew = reshape(xmma , Syselem , 1 );
xold2 = xold1(:);
xold1 = xDes(:);
xDes = xnew ;
xDes = xold1 + qnVari * (xDes-xold1) ;
changeVari = max(abs(xDes-xold1)) ;
%-UPDATE MODEL DATA-
xPhys = (H * xDes(:))./Hs; % physical density
volfrac = 100 * mean(xPhys(:)) ; % volume fraction
v = sum(xPhys) * v0 * ObjScale ;
%-PRINT RESULTS AND PLOT DENSITIES-
disp([’ It.: ’ sprintf(’%-4i’,loop) ’ c.: ’ sprintf(’%-7.2f’,Compli)...
’ Volfrac.: ’ sprintf(’%-7.2f’,volfrac) ’Volume.: ’ sprintf(’%-7.2f’,v ) ...
’ chVari.: ’ sprintf(’%-7.3f’,changeVari ) ’MaxTdif.: ’ sprintf(’%-7.1f’,max(TEdiffe) ) ’Penal.: ’ sprintf(’%-7.0f’, RE )])
xPhysFig = reshape(xPhys ,nely,nelx) ;
colormap(gray); imagesc(1-xPhysFig); axis equal; axis tight; axis off;pause(1e-6);
end
3 仿真結(jié)果
4 參考文獻
[1]黃雅潔. 圓筒熱力耦合沖擊下熱應(yīng)力場的有限元分析及MATLAB編程[D]. 昆明理工大學(xué), 2015.
博主簡介:擅長智能優(yōu)化算法、神經(jīng)網(wǎng)絡(luò)預(yù)測、信號處理、元胞自動機、圖像處理、路徑規(guī)劃、無人機等多種領(lǐng)域的Matlab仿真,相關(guān)matlab代碼問題可私信交流。
部分理論引用網(wǎng)絡(luò)文獻,若有侵權(quán)聯(lián)系博主刪除。
-
2023年各省最新電價一覽!8省中午執(zhí)行谷段電價! 2023-01-03
-
PPT導(dǎo)出高分辨率圖片的四種方法 2022-09-22
-
2023年最新!國家電網(wǎng)27家省級電力公司負責(zé)人大盤點 2023-03-14
-
全國消防救援總隊主官及簡歷(2023.2) 2023-02-10
-
盤點 l 中國石油大慶油田現(xiàn)任領(lǐng)導(dǎo)班子 2023-02-28
-
我們的前輩!歷屆全國工程勘察設(shè)計大師完整名單! 2022-11-18
-
關(guān)于某送變電公司“4·22”人身死亡事故的快報 2022-04-26
