最近做了个案例,具体描述参考《弹性流体动压润滑数值计算方法》,黄平著。以下为一个算例的matlab实现方法,与大家交流。
内容:给定一个圆柱线接触曲线h=x^2/2,接触区压力分布为抛物线,pi=ph*sqrt(1-xi^2),计算其弹性变形。
-
主程序:
clear
clc
N=200;
X1=1.4;
X0=-4.0;
DX=(X1-X0)/(N-1.0);
X(1:N)=0;
H0(1:N)=0;
H(1:N)=0;
P(1:N)=0;
for I=1:N
X(I)=-4.0+(I-1)*DX;
H0(I)=0.5*X(I)^2;
H(I)=H0(I);
if X(I)>=-1 && X(I)<=1
P(I)=sqrt(1-X(I)^2);
end
end
global AK
AK=SUBAK(N);
V=elastic_deformation(N,DX,P,0);
for I=1:N
H(I)=H(I)+V(I);
end
figure(1) %% 图片
plot(X,V,'-','LineWidth',1.5,'Color',[0 1 1])
hold on
plot(X,P,'-.','LineWidth',1.5,'Color',[0 0 1])
plot(X,H0,'--','LineWidth',1.5,'Color',[0 1 0])
plot(X,H,':','LineWidth',1.5,'Color',[1 0 0])
set(gca,'fontsize',18,'fontname','Times New Roman','fontweight','bold');
set(0,'defaultfigurecolor','w'); % backgroud color
set(gca,'XLim',[-2,1.5]);
set(gca,'YLim',[-0.5,2]);
str1='\fontsize{18}\fontname{Times New Roman}Contact width (mm)';
str2='\fontsize{18}\fontname{Times New Roman}Amplitude of P/H/V';
xlabel(str1);
ylabel(str2);
legend('\fontsize{18}elastic deformation','\fontsize{18}contact stress',...
'\fontsize{18}Initial contact surface ','\fontsize{18}Deformation contact surface')
legend('boxoff')
-
调用程序1:
function AK=SUBAK(MM)
AK(1:MM)=0;
for I=1:MM
AK(I)=(I+0.5)*(log(abs(I+0.5))-1)-(I-0.5)*(log(abs(I-0.5))-1);
end
-
调用程序2:
function V=elastic_deformation(N,DX,P,V)
PAI1=0.318309886;
C=log(DX);
global AK
for I=1:N
V(I)=0;
for J=1:N
IJ=abs(I-J);
V(I)=V(I)+(AK(IJ+1)+C)*DX*P(J);
end
V(I)=-PAI1*V(I);
end