声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1319|回复: 2

[编程技巧] 模態分析(取自有限元结构动力学分析与工程应用)

[复制链接]
发表于 2013-1-19 11:04 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
請問這有什麼問題呢,我用它計算模型的位移,發覺跟時域分析結果差一千倍function [eta,yim]=fediresp(M,K,F,u,t,C,q0,dq0,a,b);

%----------------------------------------------------------------------------------
%  Purpose:
%     The function subroutine fediresp.m calulates impulse response
%     for a damped structural system using modal analysis. It uses modal
%     coordinate equations to evaluate modal responses anaytically, then
%     convert modal coordinates into physical responses
%
%  Synopsis:
%     [eta,yim]=fediresp(M,K,F,u,t,C,q0,dq0,a,b)
%
%  Variable Description:
%     Input parameters - M, K - Mass and stiffness matrices
%                        F - Input or forcing influence matrix
%                        t - Time of evaluation
%                        u - Index for excitation
%                        C - Output matrix
%                        q0, dq0 - Initial conditions
%                        a, b - Parameters for proportional damping [C]=a[M]+b[K]
%      Outpur parameters - eta - modal coordinate response
%                          y - physical coordinate response
%---------------------------------------------------------------------------------

disp('  ')
disp('Please wait!! - The job is being performed.')
%---------------------------------------------------------------
%  Solve the eigenvalue problem and normalize the eigenvectors
% --------------------------------------------------------------

[n,n]=size(M);[n,m]=size(F);
nstep=size(t');

[V,D]=eig(K,M);

[lambda,k]=sort(diag(D));  % Sort the eigenvaules and eigenvectors

V=V(:,k);

Factor=diag(V'*M*V);

Vnorm=V*inv(sqrt(diag(Factor)));      %  Eigenvectors are normailzed

omega=diag(sqrt(Vnorm'*K*Vnorm));  % Natural frequencies
                  
Fnorm=Vnorm'*F;

%----------------------------------------------------------------------------
%  Compute modal damping matrix from the proportional damping matrix
%----------------------------------------------------------------------------
Modamp=Vnorm'*(a*M+b*K)*Vnorm;
zeta=diag((1/2)*Modamp*inv(diag(omega)))

if (max(zeta) >= 1),
disp('Warning - Your maximu damping ratio is grater than or equal to 1')
disp('You have to reselect a and b ')
else
pause
disp('If you want to continue, type return key')
end
%----------------------------------------------------------------------
%  Find out impulse response of each modal coordinate analytically
%-------------------------------------------------------------------

eta0=Vnorm'*M*q0;            % Initial conditions for modal coordinates
deta0=Vnorm'*M*dq0;          % - both displacement and velocity
eta=zeros(nstep,n);

for i=1:n               %  Responses are obtained for n modes
omegad=omega(i)*sqrt(1-zeta(i)^2);
phase=omegad*t;
tcons=zeta(i)*omega(i)*t;
eta(:,i)=exp(-tcons)'.*(eta0(i)*(cos(phase')+zeta(i)/sqrt(1-zeta(i)^2)*...
sin(phase'))+deta0(i)*sin(phase')/omegad+sin(phase')*Fnorm(i,u)/omegad);
end

%-----------------------------------------------------------------------
%  Convert modal coordinate responses to physical coordinate responses
%-----------------------------------------------------------------------

yim=C*Vnorm*eta';
%-----------------------------------------------------------------------

回复
分享到:

使用道具 举报

头像被屏蔽
发表于 2013-1-19 11:39 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2013-1-24 11:48 来自手机 | 显示全部楼层
我的第一感觉就是单位问题!

评分

1

查看全部评分

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-11-6 05:04 , Processed in 0.064178 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表