动力学系统时域响应计算的六种方法Matlab源程序.docx

上传人:牧羊曲112 文档编号:3333399 上传时间:2023-03-12 格式:DOCX 页数:8 大小:37.26KB
返回 下载 相关 举报
动力学系统时域响应计算的六种方法Matlab源程序.docx_第1页
第1页 / 共8页
动力学系统时域响应计算的六种方法Matlab源程序.docx_第2页
第2页 / 共8页
动力学系统时域响应计算的六种方法Matlab源程序.docx_第3页
第3页 / 共8页
动力学系统时域响应计算的六种方法Matlab源程序.docx_第4页
第4页 / 共8页
动力学系统时域响应计算的六种方法Matlab源程序.docx_第5页
第5页 / 共8页
亲,该文档总共8页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

《动力学系统时域响应计算的六种方法Matlab源程序.docx》由会员分享,可在线阅读,更多相关《动力学系统时域响应计算的六种方法Matlab源程序.docx(8页珍藏版)》请在三一办公上搜索。

1、动力学系统时域响应计算的六种方法Matlab源程序Newmark法Matlab源程序function acc,vel,dsp=Newmark_2(kk,cc,mm,fd,nt,dt,q0,dq0)%输入参数% kk-刚度矩阵% mm-质量矩阵% cc-阻尼矩阵% q0-初始位移% dq0-初始速度% dt-时间步长% nt-总的计算步数,等于结束时间除以dt%返回值% dsp-位移% vel-速度% acc-加速度sdof,n2=size(kk);dsp=zeros(sdof,nt); % displacement matrixvel=zeros(sdof,nt); % velocity ma

2、trixacc=zeros(sdof,nt); % acceleration matrixdsp(:,1)=q0; % initial displacementvel(:,1)=dq0; % initial velocityalpha=0.5; beta=0.5; % select the parametersacc(:,1)=inv(mm)*(fd(:,1)-kk*dsp(:,1)-cc*vel(:,1); % compute the initial acceleration (t=0)ekk=kk+mm/(alpha*dt2)+cc*beta/(alpha*dt);for it=1:nt

3、% loop for each time stepcfm=dsp(:,it)/(alpha*dt2)+vel(:,it)/(alpha*dt)+acc(:,it)*(0.5/alpha-1);cfc=dsp(:,it)*beta/(alpha*dt)+vel(:,it)*(beta/alpha-1).+acc(:,it)*(0.5*beta/alpha-1)*dt;efd=fd(:,it)+mm*cfm+cc*cfc; % compute the effective force vectordsp(:,it+1)=inv(ekk)*efd; % find the displacement at

4、 time t+dtacc(:,it+1)=(dsp(:,it+1)-dsp(:,it)/(alpha*dt2)-vel(:,it)/(alpha*dt).-acc(:,it)*(0.5/alpha-1); % find the acceleration at time t+dtvel(:,it+1)=vel(:,it)+acc(:,it)*(1-beta)*dt+acc(:,it+1)*beta*dt;% find the velocity at time t+dtend中心差分法Matlab源程序function acc,vel,dsp=central_diff(kk,cc,mm,fd,n

5、t,dt,q0,dq0)%输入参数% kk-刚度矩阵% mm-质量矩阵% cc-阻尼矩阵% q0-初始位移% dq0-初始速度% dt-时间步长% nt-总的计算步数,等于结束时间除以dt%返回值% dsp-位移% vel-速度% acc-加速度sdof,n2=size(kk);dsp=zeros(sdof,nt); % displacement matrixvel=zeros(sdof,nt); % velocity matrixacc=zeros(sdof,nt); % acceleration matrixdsp(:,1)=q0; % initial displacementvel(:,

6、1)=dq0; % initial velocityacc(:,1)=inv(mm)*(fd(:,1)-kk*dsp(:,1)-cc*vel(:,1);dsp0=dsp(:,1)-vel(:,1)*dt+0.5*acc(:,1)*dt2;ekk=mm/dt2+cc/(2*dt);efd=fd(:,1)-(kk-2*mm/dt2)*dsp(:,1)-(mm/dt2-cc/(2*dt)*dsp0;dsp(:,1+1)=inv(ekk)*efd;for it=2:nt % loop for each time step after first stepefd=fd(:,it)-(kk-2*mm/dt

7、2)*dsp(:,it)-(mm/dt2-cc/(2*dt)*dsp(:,it-1);% compute the effective force vectordsp(:,it+1)=inv(ekk)*efd; % find the dsp at t+dtacc(:,it)=(dsp(:,it+1)-2*dsp(:,it)+dsp(:,it-1)/dt2; % find the acc at tvel(:,it)=(dsp(:,it+1)-dsp(:,it-1)/(2*dt); % find the vel at tacc(:,it+1)=acc(:,it); vel(:,it+1)=vel(:

8、,it);endHoubolt法Matlab源程序function acc,vel,dsp=Houbolt(kk,cc,mm,fd,nt,dt,q0,dq0)%输入参数% kk-刚度矩阵% mm-质量矩阵% cc-阻尼矩阵% q0-初始位移% dq0-初始速度% dt-时间步长% nt-总的计算步数,等于结束时间除以dt%返回值% dsp-位移% vel-速度% acc-加速度sdof,n2=size(kk);dsp=zeros(sdof,nt); % displacement matrixvel=zeros(sdof,nt); % velocity matrixacc=zeros(sdof,

9、nt); % acceleration matrixdsp(:,1)=q0; % initial displacementvel(:,1)=dq0; % initial velocityacc(:,1)=inv(mm)*(fd(:,1)-kk*dsp(:,1)-cc*vel(:,1);dsp0=dsp(:,1)-vel(:,1)*dt+0.5*acc(:,1)*dt2;ekk=mm/dt2+cc/(2*dt); % compute the effective stiffness matrixit=1;efd=fd(:,it)-(kk-2*mm/dt2)*dsp(:,it)-(mm/dt2-cc

10、/(2*dt)*dsp0;dsp(:,it+1)=inv(ekk)*efd; % find the dsp at t+dtfor it=2:3 % loop for two steps after first stepefd=fd(:,it)-(kk-2*mm/dt2)*dsp(:,it)-(mm/dt2-cc/(2*dt)*dsp(:,it-1);dsp(:,it+1)=inv(ekk)*efd; % find the dsp at t+dtacc(:,it)=(dsp(:,it+1)-2*dsp(:,it)+dsp(:,it-1)/dt2; % find the acc at tvel(:

11、,it)=(dsp(:,it+1)-dsp(:,it-1)/(2*dt); % find the vel at tendekk=kk+cc*11/(6*dt)+mm*2/(dt*dt);for it=3:nt-1 % loop for each time step after initial stepcfm=dsp(:,it)*5/dt2-dsp(:,it-1)*4/dt2+dsp(:,it-2)*1/dt2;cfc=dsp(:,it)*3/dt-dsp(:,it-1)*3/(2*dt)+dsp(:,it-2)*1/(3*dt);efd=fd(:,it+1)+mm*cfm+cc*cfc;dsp(:,it+1)=inv(ekk)*efd; % find the dsp at t+dtacc(:,it)=(2*dsp(:,it+1)-5*dsp(:,it)+4*dsp(:,it-1)+dsp(:,it-2)/dt2;vel(:,it)=(11*dsp(:,it+1)-18*dsp(:,it)+9&dsp(:,it-1)-2*dsp(:,it-2)/(6*dt);acc(:,it+1)=acc(:,it); vel(:,it+1)=vel(:,it);end

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号