【机械】二维钢桁架分析与设计附matlab代码

发布于:2022-12-29 ⋅ 阅读:(474) ⋅ 点赞:(0)

1 内容介绍

主要介绍了某屋盖钢桁架结构的体系,分析条件,相关计算结果及支座节点的设计等​

2 部分代码

function Plot_Results(Node,Element,Mag_Factor,Result_type)

NNode=length(Node);

for i=1:1:NNode

X(i,1)=Node{i}.x;

Y(i,1)=Node{i}.y;

Ux(i,1)=Node{i}.Ux;

Uy(i,1)=Node{i}.Uy;

    

end

figure;

X=X+Ux*Mag_Factor;

Y=Y+Uy*Mag_Factor;

NElement=length(Element);

for i=1:1:NElement

if Result_type==1    

Result(i,1)=Element{i}.Strain;

end

if Result_type==2    

Result(i,1)=Element{i}.Stress;

end

if Result_type==3    

Result(i,1)=Element{i}.Axial_Force;

end

if Result_type==4    

Result(i,1)=Element{i}.Ratio;

end

Lines(i,:)=Element{i}.Nodes;

end

if Result_type==0

plot(X,Y,'o','MarkerFaceColor','m','MarkerEdgeColor','k');      

for j = 1:NElement

line(X(Lines(j,:)),Y(Lines(j,:)),'color','red','LineWidth',2);  

end

else

cmap = colormap;

c = round(1+(size(cmap,1)-1)*(Result - min(Result))/(max(Result)-min(Result)));

if isnan(c); c=round(1+(size(cmap,1)-1)/2)*ones(size(Result,1),1); end

plot(X,Y,'o','MarkerFaceColor','m','MarkerEdgeColor','k');  

for j = 1:NElement

line(X(Lines(j,:)),Y(Lines(j,:)),'color',cmap(c(j),:),'LineWidth',2);   

end

colorbar  

caxis([ min(Result) , max(Result)]);

if sum(abs(Result))==0; caxis([-1 1]); end

end

daspect([1 1 1]);

end

3 运行结果

4 参考文献

[1]李罡. "基于matlab的空间三维桁架结构受力分析通用程序设计." 喀什师范学院学报 26.3(2005):4.

博主简介:擅长智能优化算法神经网络预测信号处理元胞自动机图像处理路径规划无人机雷达通信无线传感器等多种领域的Matlab仿真,相关matlab代码问题可私信交流。

部分理论引用网络文献,若有侵权联系博主删除。


网站公告

今日签到

点亮在社区的每一天
去签到