disp(' ');
disp(' dry.m ver 1.0 June 25, 2010 ');
disp(' by Tom Irvine Email: tomirvine@aol.com ');
disp(' ');
disp(' This program calculates the response of a ');
disp(' single-degree-of-freedom system subjected to dry damping');
disp(' ');
%
clear all;
disp(' Enter mass (kg) ')
m=input(' ');
disp(' Enter stiffness (N/m) ')
k=input(' ');
disp(' Enter coefficient of friction ')
mu=input(' ');
disp(' Enter initial displacement (mm) ')
xo=input(' ');
xo=xo/1000.;
%
F=mu*m*(9.81);
fk=F/k;
%
omegan=sqrt(k/m);
fn=omegan/(2.*pi);
%
out1=sprintf('\n fn = %8.4g Hz\n',fn);
disp(out1);
%
out1=sprintf(' F/k = %8.4g mm\n',(F/k)*1000.);
disp(out1);
%
if( F/k > xo )
disp(' ');
disp(' No oscillation. ');
disp(' F/k > xo ');
end
%
T=1/fn;
%
dt = T/100.;
delta=2.*pi/100;
%
num=12.*T/dt;
%
j=1;
10
tdelay=0.;
arg=0.;
for(i=1:(num+1))
t(i)=(i-1)*dt;
%
arg=arg+delta;
if(arg>2.*pi)
arg=arg-2.*pi;
end
%
if(arg>=0 && arg<=pi)
if( (xo-fk) <=0)
x(i)=xo;
else
x(i)= fk +( xo - fk )*cos(arg);
end
x1=x(i);
else
if( abs(x1) < fk )
x(i)=x1;
else
x(i)= -fk +( x1 + fk )*cos(arg+pi);
end
xo=x(i);
end
%
end
x=x*1000.;
plot(t,x);
xlabel(' Time(sec) ');
ylabel(' Displacement(mm) ');
out1=sprintf(' SDOF Response Dry Friction fn=%8.4g Hz ',fn);
title(out1);
grid on;