?? contact_angle.m
字號:
% M-file name: contact_angle.m
% M-file type: Function file
% This function file computes the contact angles at the left and the right wheel-rail contact
% patches as a function of the relative lateral displacement between the left and the right wheels
% and rails. The inputs to the function are the relative lateral displacement between the left
% wheel and the left rail and the right wheel and the right rail. The outputs are the contact
% angles at the left and the right tread and flange contact patches.
% The outputs given by this function are called by the function file 'wheelset.m'.
function [calefttread,caleftflange,carighttread,carightflange]=contact_angle(y,yl,yr)
% Parameters used for simulation
% yfc: Flange clearance or flange width (m)
% yfctol: Lateral tolerance added to yfc in order to facilitate numerical simulation (m)
% Indicating the global nature of the variables This means that the value of the variables need
% not be specified in this function file. This value is automatically obtained from the main file
% 'single_wheelset.m'.
global yfc yfctol;
% Computing the rolling radii at the left and the right wheel-rail contact patches. These variables
% are passed to the function 'wheelset' .
if y>=0
% Wheelset displacement is in the positive (or left) direction from the centerline (Right
% wheel tread contact)
% Note that for a left movement of the wheelset from the centerline, the
% right wheel does not flange. Hence, the zero value for the right wheel
% flange angle is not real and is not used in calculations.
carighttread=atan(0.125);
carightflange=0.000;
if yl<=yfc
% Left wheel tread contact. Note that the zero value for the left wheel flange angle is not real % and is not used in calculations.
calefttread=atan(0.125);
caleftflange=0.000;
elseif yl<(yfc+yfctol)
% Left wheel flange contact
calefttread=atan(0.125);
caleftflange=atan(0.125+2648*(yl-0.008));
else
% Left wheel two-point contact
calefttread=atan(0.125);
caleftflange=atan(2.748);
end
else
% Wheelset displacement is in the negative (or right) direction from the centerline (Left
% wheel tread contact)
% Note that for a right movement of the wheelset from the centerline, the
% left wheel does not flange. Hence, the zero value for the left wheel
% flange angle is not real and is not used in calculations.
calefttread=atan(0.125);
caleftflange=0.000;
if yr<=yfc
% Right wheel tread contact. Note that the zero value for the right
% wheel flange angle is not real and is not used in calculations.
carighttread=atan(0.125);
carightflange=0.000;
elseif yr<(yfc+yfctol)
% Right wheel flange contact
carighttread=atan(0.125);
carightflange=atan(0.125+2648*(yr-0.008));
else
% Right wheel two-point contact carighttread=atan(0.125);
carightflange=atan(2.748);
end
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -