本程序只支持静定结构的梁(左端悬臂梁、简支梁)
函数输入格式:beamsolver(L,EI,supports,loads,maxdx);
参量的输入格式:
L=10.0
EI=2e8
supports={{'f',0},{'v',10.0}} ----左端悬臂梁
supports={{'p',2.0},{'r',8.0}} ----简支梁
loads={{'f',[2.0,1000]},{'m',[4.0,500]},{'d',[7.0,9.0,3.0,20,100]}} maxdx=0.01
输出为V,M,vy,x的一维行向量和三张坐标图----图1:剪力V图,图2:弯矩M图,图3:挠度vy图.
范例:
悬臂梁:纯受集中力:
beamsolver(10.0,2e8,{{'f',0},{'v',10.0}},{{'f',[2.0,1000]}},0.01)
纯受集中矩:
beamsolver(10.0,2e8,{{'f',0},{'v',10.0}},{{'m',[4.0,500]}},0.01)
纯受分布力(格式一):
beamsolver(10.0,2e8,{{'f',0},{'v',10.0}},{{'d',[7.0,9.0,3.0,20,100]}},0.01) 纯受分布力(格式二):
beamsolver(10.0,2e8,{{'f',0},{'v',10.0}},{{'d',[(7.0:0.01:9.0);(0:0.01:2.0).^2]}},0.01)
受混合力:
beamsolver(10.0,2e8,{{'f',0},{'v',10.0}},{{'f',[2.0,1000]},{'m',[4.0,500]},{'d',
[7.0,9.0,3.0,20,100]}},0.01)
简支梁:纯受集中力:
beamsolver(10.0,2e8,{{'p',2.0},{'r',8.0}},{{'f',[5.0,1000]}},0.01)
纯受集中矩:
beamsolver(10.0,2e8,{{'p',2.0},{'r',8.0}},{{'m',[4.0,500]}},0.01)
纯受分布力(格式一):
beamsolver(10.0,2e8,{{'p',2.0},{'r',8.0}},{{'d',[7.0,9.0,3.0,20,100]}},0.01) 纯受分布力(格式二):
beamsolver(10.0,2e8,{{'p',2.0},{'r',8.0}},{{'d',[(7.0:0.01:9.0);(0:0.01:2.0).^2]}},0.01)
受混合力:
beamsolver(10.0,2e8,{{'p',2.0},{'r',8.0}},{{'f',[5.0,1000]},{'m',[4.0,500]},{'d',[7.0,9.0,3.0,20,100]}},0.01)
以上范例输出的剪力V图、弯矩M图都经过笔算检验完全正确。
悬臂梁的挠度经检验为正确的,简支梁的挠度有误(整个程序的唯一错误)。