Newmark Beta Method problem
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
alpha=0.25;
delta=0.5;
%-------------------
delt=0.005;
% delt=28;
%-------------------
a0=1/(alpha*delt^2);
a1=delta/(alpha*delt);
a2=1/(alpha*delt);
a3=(1/(2*alpha))-1;
a4=(delta/alpha)-1;
a5=(delt/2)*((delta/alpha)-2);
a6=delt*(1-delta);
a7=delta*delt;
%------------------ Co-efficient of Damping--------------------------------
wn= 2*pi./T(1,1);
xeta=0.05;
R=nf*nodof;
u=zeros(R,1);
udot=zeros(R,1);
%-------------------
uddot=inv(MGf)*(F-(KGf*u));
% uddot=[0;10];
%-------------------
khat=KGf+a0*MGf;
for i=1:1:15
if(i==1)
ftdelt=F+(MGf*((a0*u(:,i))+(a2*udot(:,i))+(a3*uddot(:,i))))+(C*((a1*u(:,i))+(a4*udot(:,i))+(a5*uddot(:,i))));%Force
else
ftdelt=F+(MGf*((a0*utdelt(:,i))+(a2*udottdelt(:,i))+(a3*uddtdelt(:,i))))+(C*((a1*utdelt(:,i))+(a4*udottdelt(:,i))+(a5*uddtdelt(:,i))));%Force
end
utdelt(:,i+1)=inv(khat)*ftdelt;%Displacement
%Unable to perform assignment because the indices on the left side are not compatible with the size of the
right side.
if(i==1)
uddtdelt(:,i+1)=(a0*(utdelt(:,i+1)-u(:,i)))-(a2*udot(:,i))-(a3*uddot(:,i));%Acceleration
else
uddtdelt(:,i+1)=(a0*(utdelt(:,i+1)-utdelt(:,i)))-(a2*udottdelt(:,i))-(a3*uddtdelt(:,i));%Acceleration
end
if(i==1)
udottdelt(:,i+1)=udot(:,i)+(a6*uddot(:,i))+(a7*uddtdelt(:,i+1));%Velocity
else
udottdelt(:,i+1)=udottdelt(:,i)+(a6*uddtdelt(:,i))+(a7*uddtdelt(:,i+1));%Velocity
end
t=(i+1)*delt;
end
Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!