【力学】基于matlab立铣刀力模拟仿真【含Matlab源码 193期】

举报
海神之光 发表于 2022/05/28 23:19:24 2022/05/28
【摘要】 一、获取代码方式 获取代码方式1: 完整代码已上传我的资源:【力学】基于matlab立铣刀力模拟仿真【含Matlab源码 193期】 获取代码方式2: 通过订阅紫极神光博客付费专栏,凭支付凭证,私信博...

一、获取代码方式

获取代码方式1:
完整代码已上传我的资源:【力学】基于matlab立铣刀力模拟仿真【含Matlab源码 193期】

获取代码方式2:
通过订阅紫极神光博客付费专栏,凭支付凭证,私信博主,可获得此代码。

备注:
订阅紫极神光博客付费专栏,可免费获得1份代码(有效期为订阅日起,三天内有效);

二、部分源代码


% m file to simulate helical end milling forces %
clear;

% Angle conversions
d2r = pi/180; % degree to radian
r2d = 180/pi; % radian to degree

% Workpeice data %
% AL 6061 %
tau_s = 209.24; % shear strength [N/mm2]
phi_c = 27.67*d2r; % shear angle [rad]
B_a = 32.27*d2r; % Friction angle [rad]
kte = 23.66; % tangential edge force coefficent [N/mm]
kfe = 5.57; % normal edge force coefficent [N/mm]

% 4 flute HSS cylindrical endmill %
D = 25.4; % diameter [mm]
r = D/2; % radius [mm]
B = d2r*30.0; % helix angle [rad]
a_n = d2r*5.0; % normal rake angle [rad]
Nf = 2; % number of flutes []

% Machining conditions %
n = 1200; % spindle speed [rpm]
a = 4.0; % axis depth of cut [mm]
f = 1200; % feedrate [mm/min]
calib_factor = 200; % force calibration factor [N/V]

% Assumptions %
i = B; % oblique angle = helix angle [rad]
eta = i; % chip flow angle = oblique angle [rad] [Stabler's chip flow rule]
B_n=atan(tan(B_a)*cos(eta)); %[rad] Friction Coefficient Ba and Shear Stress, Ts, are the same in both orthogonal & Oblique Cutting
phi_n = phi_c; %[rad] Orthogonal Shear Angle = Normal Shear Angle in Oblique
a_r = a_n; %[rad] Orthogonal Normal Rake Angle = Rake Angle in Oblique 
kre = kfe; %[N/mm] Normal Edge Force Coefficient in Orthogonal Cutting is Equivalent to Radial Edge Force in Milling
% Feed Per Tooth
c = f/(Nf*n); % feed per tooth [mm]

% Cutting coefficents
den = sqrt(cos(phi_n+B_n-a_n)^2 + tan(eta)^2*sin(B_n)^2); % Denominator
ktc = (tau_s/sin(phi_c))*(cos(B_n-a_n)+tan(i)*tan(eta)*sin(B_n))/(den);
krc = (tau_s/sin(phi_c))*(cos(B_n-a_n)*tan(i)-tan(eta)*sin(B_n))/(den);
kfc = (tau_s/(sin(phi_c)*cos(i)))*((sin(B_n-a_n))/(den));

% Discritization %
Ts = 0.0001; % Sampling period [sec]
Trev = (n/60); % period of one revolution [sec]
rot_number = 4; % number of revolutions to consider []
dphi = Trev*2*pi*Ts; % angular increment
phi = (0:dphi:rot_number*2*pi); % rotation array for bottom of flute 1 [rad]
Nt = length(phi); % number of time (or rotation) samples to consider
t = (0:Ts:rot_number/Trev); % time array
%t_meas = (0:ts:(N_meas-1)*Ts)' % time array for measured forces [sec]

phi_p = (2*pi)/Nf; % Angle between teeth [rad]

% Vertical Integration %
dz = 0.1; % vertical integration increment [mm]
Nz = a/dz; % number of vertical segments
z = (dz:dz:a); % [mm] vertical integration array

% Immersion %
im = [0.25,0.5,0.75,1]*D; %[mm] Downmilling 1/4,1/2,3/4,1 

% allocate array; columns are each immersion%
Fx = zeros(length(im),Nt); % x axis force history [N]
Fy = zeros(length(im),Nt); % y axis force history [N]
Ft = zeros(length(im),Nt); % t axis force history [N]
F = zeros(length(im),Nt); % resultant force history (in x-y plane) [N] 
T = zeros(length(im),Nt); % torque history [N*m]
P = zeros(length(im),Nt); % Power history

% Main Loop for Simulation %
for count=1:length(im)
    phi_st = pi - (acos((r-im(count))/r)); % [rad] start angle
    phi_ex = pi; %[rad] exit angle
    for kt=1:Nt % Rotation counter
        for kz=1:Nz
            for kf=1:Nf
                phi_bottom = phi(kt) + phi_p*(kz-1); % Immersion angle for tooth
                si = ((2*tan(B)*z(kf))/D); % Correction factor for helx
                phi_cur = phi_bottom-si; % Current phi

                % Ensure current angle between 0 and 2pi
                if phi_cur>=0
                    phi_cur2=phi_cur-2*pi*floor(phi_cur/(2*pi));
                else
                    phi_cur2=phi_cur+2*pi*floor(-phi_cur/(2*pi)+1);
                end

                if (phi_cur2>=phi_st) && (phi_cur2 <=phi_ex)
                    h = c*sin(phi_cur2);

                    dFt = dz * (ktc * h + kte); % tangential force contribution [N]
                    dFr = dz * (krc * h + kre); % radial force contribution [N]
                    dFx = -dFt*cos(phi_cur2) - dFr*sin(phi_cur2); % x axis force contribution [N]
                    dFy = dFt*sin(phi_cur2) - dFr*cos(phi_cur2); % y axis force contribution [N]
                    % (dF dFR dFx dFy)

                    Ft(count,kt) = Ft(count,kt) + dFt; % Intregrate tangential force contribution
                    Fx(count,kt) = Fx(count,kt) + dFx; % Intregrate x axis force contribution
                    Fy(count,kt) = Fy(count,kt) + dFy; % Intregrate y axis force contribution
                end
            end
        end
        F(count,kt) = sqrt(Fx(count,kt)^2 + Fy(count,kt)^2); % resultant Cutting forces history [N]
        T(count,kt) = 1e-3*(D/2)*Ft(count,kt); % cutting torque history [N*m]
        P(count,kt) = T(count,kt)*n*2*pi/60; % Power [W]
    end
end


  
 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112

三、运行结果

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

四、matlab版本及参考文献

1 matlab版本
2014a

2 参考文献
[1] 门云阁.MATLAB物理计算与可视化[M].清华大学出版社,2013.

文章来源: qq912100926.blog.csdn.net,作者:海神之光,版权归原作者所有,如需转载,请联系作者。

原文链接:qq912100926.blog.csdn.net/article/details/122219728

【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。