필터 지우기
필터 지우기

Numerical solution of an EQM for dry friction

조회 수: 1 (최근 30일)
Alaa Hameed
Alaa Hameed 2017년 6월 4일
댓글: Walter Roberson 2017년 6월 4일
Hello,
I have the equation of motion for dry friction case, and I need a solution for it. I impliment Runge_Kutta method to do the solution and write the following .m files but it seems not working!any ideas?
%%Runge-Kutta method for solving equation of motion
% set the initial conditions and the time step
dt=.002;
u0=60/1000;d(1)=u0;
v0=0;v(1)=v0;
% a0=0;
m=2358.9;
k=107000;
zeta= .09;
wn=sqrt(k/m);
c=zeta*(2*m*wn);
wD=wn*sqrt(1-zeta^2);
t=0:dt:5;
a(1)=accel(v(1),d(1));
for i=1:length(t)-1
vel=v(i); dis=d(i);
dv1=dt*accel(vel,dis);
dx1=dt* vel;
vel=v(i)+dv1/2; dis=d(i)+dx1/2;
dv2=dt*accel(vel,dis);
dx2=dt* vel;
vel=v(i)+dv2/2; dis=d(i)+dx2/2;
dv3=dt*accel(vel,dis);
dx3=dt* vel;
vel=v(i)+dv3; dis=d(i)+dx3;
dv4=dt*accel(vel,dis);
dx4=dt* vel;
v(i+1)=v(i)+(1/6)*(dv1+2*dv2+2*dv3+dv4);
d(i+1)=d(i)+(1/6)*(dx1+2*dx2+2*dx3+dx4);
a(i+1)=accel(v(i+1),d(i+1));
end
%%For the function accel
function A = accel(V,D)
m=2358.9;k=107000;zeta= .09;
wn=sqrt(k/m);c=zeta*(2*m*wn);
mue=5;g=386.4;
A =(-1/m)*(mue*m*g*sign(V)+k*D);
end
Thanks
  댓글 수: 1
Walter Roberson
Walter Roberson 2017년 6월 4일
What difficulty do you observe? What do you observe that you think should be different?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by