Skip to content
Snippets Groups Projects
Commit 39be7527 authored by van der Kuip, Julius's avatar van der Kuip, Julius Committed by Puchtler, Steffen
Browse files

JvdK_fix: calcLoad load angle considered in y/x reaction force 065b859d

fix_JvdK_clean up and small fixes for angle calc e4a8a4c8
JvdK_feat_add 'calcTo' as option to calculate, to ignore unnecessary calculations 8f380700
JvdK_feat_add load angle a2739e15
JvdK_feat_intersection in calcLoad dyn fix, calcFilm adjusted, Comp2Onl fix, PlotLabel fix 9bf0c026
JvdK_fix_changed delta_s(y,x,z) -> delta_s(x,y,z) 1283d9e5
JvdK_add_create->new_holdon fc594c71
JvdK_feat_combined Load 7a8f8377
JvdK_closed issues #47, #48, #49 0c154125
parent 350c07ab
No related branches found
No related tags found
No related merge requests found
Showing with 2538 additions and 2411 deletions
......@@ -106,23 +106,24 @@ switch isPreCalc
case 1
varargout{1} = H.h_0;
case 0
switch possibleMethods.addDefault(obj.method).B
case 'static'
B.s=zeros(2,B.numOfCagePositions,L.numberOfConductiveBalls);
B.s(1,B.noContactInd') = B.intersectionBall(B.noContactInd)';
B.s(2,B.noContactInd') = B.intersectionBall(B.noContactInd)';
B.s(1,B.noContactInd') = B.intersectionBall(1,B.noContactInd)';
B.s(2,B.noContactInd') = B.intersectionBall(2,B.noContactInd)';
switch possibleMethods.addDefault(obj.method).B
case 'static'
if length(size(H.h_0)) <= 2
B.s(1,B. contactInd') = B.intersectionBall(B.contactInd)' + H.h_0(1,B.contactInd)';
B.s(2,B. contactInd') = B.intersectionBall(B.contactInd)' + H.h_0(2,B.contactInd)'; % s beschreibt den Abstand von WK zu Laufbahnen, unter Berücksichtigung des Schmierfilms in der Lastzone
B.s(1,B. contactInd) = B.intersectionBall(1,B.contactInd) + H.h_0(1,B.contactInd);
B.s(2,B. contactInd) = B.intersectionBall(1,B.contactInd) + H.h_0(2,B.contactInd); % s beschreibt den Abstand von WK zu Laufbahnen, unter Berücksichtigung des Schmierfilms in der Lastzone
else
B.s(1,B. contactInd') = B.intersectionBall(B.contactInd)' + H.h_0(1,B.contactInd');
B.s(2,B. contactInd') = B.intersectionBall(B.contactInd)' + H.h_0(2,B.contactInd'); % s beschreibt den Abstand von WK zu Laufbahnen, unter Berücksichtigung des Schmierfilms in der Lastzone
B.s(1,B. contactInd') = B.intersectionBall(1,B.contactInd') + H.h_0(1,B.contactInd');
B.s(2,B. contactInd') = B.intersectionBall(1,B.contactInd') + H.h_0(2,B.contactInd'); % s beschreibt den Abstand von WK zu Laufbahnen, unter Berücksichtigung des Schmierfilms in der Lastzone
end
case 'dynamic'
B.s(1,B. contactInd') = B.intersectionBall(B.contactInd)';
B.s(2,B. contactInd') = B.intersectionBall(B.contactInd)';
end
% Überprüfen, ob die Schmierfilmberechnung innerhalb des vorgegeben
......@@ -148,10 +149,10 @@ switch isPreCalc
if max(rangeViscParL) < max(H.L,[],'all') || min(rangeViscParL) > min(H.L,[],'all')
warning('The viscosity parameter for the lubricant film thickness calculation is outside the permissible range, which means that the calculated lubricant film is no longer meaningful!')
end
end
%% Attribute ändern
obj.H = H;
obj.B = B;
obj.up2date.H = true;
end
end
\ No newline at end of file
......@@ -8,16 +8,18 @@ function calcLoad(obj)
%% Parameter prüfen
assert(obj.up2date.L,'Lager nicht gesetzt')
assert(obj.up2date.G,'Lagergeometrie in Abhängigkeit des Lagerspiels noch nicht berechnet')
L = obj.L; G = obj.G; F_r = obj.F_r; AddOn = obj.AddOn; psi=obj.psi;
L = obj.L; G = obj.G; F_r = obj.F_r; F_a = obj.F_a; AddOn = obj.AddOn; psi=obj.psi;
B = struct;
B.method = possibleMethods.addDefault(obj.method).B;
%% Berechnung
if ~isnan(obj.psi_calc)
psi = obj.psi_calc; % alle folgenden Rechnungen werden mit dem reduzierten Psi berechnet, um alle benötigten Werte zu berechnen
psi = obj.psi_calc; % all following calculations are done with the reduced Psi to calculate all needed values
end
% delta_intp1 (the distance between the raceways) needs to be calculated
% before delta_s in the dynamic case
if strcmp(B.method,'dynamic')
n_ir = obj.omega * 60 / (2*pi);
n_ar = 0;
......@@ -29,27 +31,37 @@ if strcmp(B.method,'dynamic')
B.rhoRE = L.RE_A.rho;
end
B.m_RE = 4./3.*pi.*(L.D_RE/2).^3.*B.rhoRE;
B.m_RE = 4./3.*pi.*(L.D_RE/2).^3.*B.rhoRE; % mass in kg
B.Q_centri = B.m_RE.*B.v_cage.^2./(G.d_m./2); % Zentripetalkraft
B.Q_intp1 = logspace(log10(1e-15),log10(1000*F_r),360);%15
B.Q_intp1 = logspace(log10(1e-31),log10(1000*sqrt(F_r^2+F_a^2)),360);%15
B.delta = nan(L.Z,length(B.Q_intp1));
B.delta_intp1 = nan(L.Z,length(B.Q_intp1));
for IndBall = 1 : L.Z
h_0_Film = obj.calcFilm('Q_inner_singleContact',B.Q_intp1,'Q_outer_singleContact',B.Q_intp1+B.Q_centri(L.RE_order_num(IndBall)),'BallMaterialInd',L.RE_order_num(IndBall));
delta_RE_contact =@(K_p_single,Q_psi,IndBall) ((Q_psi+B.Q_intp1)/K_p_single(L.RE_order_num(IndBall))).^(2/3);
B.delta(IndBall,:) = G.D_RE(L.RE_order_num(IndBall)) - delta_RE_contact(G.K_pa,B.Q_centri(L.RE_order_num(IndBall)),IndBall) - delta_RE_contact(G.K_pi,0,IndBall) + sum(h_0_Film,1);
delta_RE_contact =@(K_p_single,Q_psi,Q_intp1,IndBall) ((Q_psi+Q_intp1)/K_p_single(L.RE_order_num(IndBall))).^(2/3);
B.delta_intp1(IndBall,:) = G.D_RE(L.RE_order_num(IndBall)) - delta_RE_contact(G.K_pa,B.Q_centri(L.RE_order_num(IndBall)),B.Q_intp1,IndBall) - delta_RE_contact(G.K_pi,0,B.Q_intp1,IndBall) + sum(h_0_Film,1);
end
end
B.numOfCagePositions = length(psi);
% delta_s (shaft displacement) can be simplified in case the axial force = 0 (than only
% y- and x- dircetion are of interest)
if F_a == 0
B.delta_s=nan(B.numOfCagePositions,2);
B.delta_s=deltaShaft(psi,F_r,B,G,L,B.delta_s,AddOn)';
else
B.delta_s=nan(B.numOfCagePositions,3);
end
B.delta_s=deltaShaft(psi,F_r,F_a,B,G,L,B.delta_s,AddOn)';
% Q (reaction force) needs to be calculated seperatly because it is not saved
% while calculating delta_s
if L.allBallsSameMaterial
for IndPosBearing=1:B.numOfCagePositions
B.Q(IndPosBearing) = totalReactionForcePerBallForYandX(B,L,G,B.delta_s(:,IndPosBearing),L.IndBall_conductive,psi(IndPosBearing));
B.Q(IndPosBearing) = totalReactionForcePerBallForXYZ(B,L,G,B.delta_s(:,IndPosBearing),L.IndBall_conductive,psi(IndPosBearing));
end
else
......@@ -63,29 +75,50 @@ else
B.extendedTotalReactionForce=true;
for IndPosBearing=1:B.numOfCagePositions
B.Q(posBall_conductive,IndPosBearing)=totalReactionForcePerBallForYandX(B,L,G,B.delta_s(:,IndPosBearing),L.IndBall_conductive(posBall_conductive),B.psi_conductive(posBall_conductive,IndPosBearing));
B.Q(posBall_conductive,IndPosBearing)=totalReactionForcePerBallForXYZ(B,L,G,B.delta_s(:,IndPosBearing),L.IndBall_conductive(posBall_conductive),B.psi_conductive(posBall_conductive,IndPosBearing));
end
end
end
B. contactInd = B.Q~=0; % Indizes der Wälzkörper, die belastet sind (Q ungleich 0)
B.noContactInd = B.Q==0; % Indizes der Wälzkörper, die nicht belastet sind
if strcmp(B.method,'dynamic')
assert(any(max(B.Q_intp1) > max(B.Q) & min(B.Q_intp1) < min(B.Q)), 'The interpolated lubricant film thicknesses are extrapolated outside the calculated range! This leads to inaccurate results.')
end
B. contactInd = B.Q~=0; % Indices of rolling elements under load (Q not equal to 0)
B.noContactInd = B.Q==0; % Indices of rolling elements that are not loaded
B.Q_contInd=B.Q; %##um leichter B.Q_contInd anzupassen, falls doch nur ~=0 berechnet werden sollen
for posBall_conductive=1:L.numberOfConductiveBalls
B.psi_conductive(posBall_conductive,:)=[psi(1+round((L.IndBall_conductive(posBall_conductive)-1)*B.numOfCagePositions/L.Z):B.numOfCagePositions) psi(1: ...
(round((L.IndBall_conductive(posBall_conductive)-1)*B.numOfCagePositions/L.Z)))];
for IndPosBall=1:B.numOfCagePositions
B.intersectionBall(posBall_conductive,IndPosBall) = (deflectionForYandX(L,G,L.IndBall_conductive(posBall_conductive),B.delta_s(:,IndPosBall),B.psi_conductive(posBall_conductive,IndPosBall))-G.D_RE(L.RE_order_num(posBall_conductive)))./2;
end %Beschreibt die Überschneidung der WK mit den Laufbahnen (<0 -> Kraft wird übertragen; >0 -> keine Kraft wird übertragen)
end
if strcmp(B.method,'dynamic')
if max(B.Q_intp1) < max(B.Q) || min(B.Q_intp1) > min(B.Q)
error('The interpolated lubricant film thicknesses are extrapolated outside the calculated range! This leads to inaccurate results.')
% intersectionBall (intersection of Ball and inner/outer racerway)
if strcmp(B.method,'static') % static assumption: Ball in middle of gap
for IndPosBearing=1:B.numOfCagePositions
deltaXYZ = deflectionForXYZ(L,G,L.IndBall_conductive(posBall_conductive),B.delta_s(:,IndPosBearing),B.psi_conductive(posBall_conductive,IndPosBearing));
B.intersectionBall(1,IndPosBearing,posBall_conductive) = (deltaXYZ - G.D_RE(L.RE_order_num(posBall_conductive)))./2;
B.intersectionBall(2,IndPosBearing,posBall_conductive) = B.intersectionBall(1,IndPosBearing,posBall_conductive);
B.alpha(posBall_conductive,IndPosBearing) = deflectionAngleForXYZ(L,G,B.delta_s(:,IndPosBearing),deltaXYZ,posBall_conductive);
end % Describes the overlap of RE with raceways (<0 -> force is transmitted; >0 -> no force is transmitted).
else % dynamic: Q_centri changes position of ball between raceways
for IndPosBearing=1:B.numOfCagePositions
h_film = obj.calcFilm('Q_inner_singleContact',B.Q(posBall_conductive,IndPosBearing),'Q_outer_singleContact',B.Q(posBall_conductive,IndPosBearing)+B.Q_centri(L.RE_order_num(IndBall)),'BallMaterialInd',L.RE_order_num(IndBall));
B.intersectionBall(:,IndPosBearing,posBall_conductive) = h_film ...
- [delta_RE_contact(G.K_pa,B.Q_centri(L.RE_order_num(IndBall)),B.Q(posBall_conductive,IndPosBearing),IndBall); delta_RE_contact(G.K_pi,0,B.Q(posBall_conductive,IndPosBearing),IndBall)];
B.s(:,IndPosBearing,posBall_conductive) = h_film + B.intersectionBall(:,IndPosBearing,posBall_conductive);
deltaXYZ = deflectionForXYZ(L,G,L.IndBall_conductive(posBall_conductive),B.delta_s(:,IndPosBearing),B.psi_conductive(posBall_conductive,IndPosBearing));
B.alpha(posBall_conductive,IndPosBearing) = deflectionAngleForXYZ(L,G,B.delta_s(:,IndPosBearing),deltaXYZ,IndBall);
end
end
end
clear B.method
%% Attribute ändern
obj.B = B;
......@@ -94,50 +127,70 @@ obj.up2date.B = true;
end
function delta_s=deltaShaft(psi,F_r,B,G,L,delta_s,AddOn)
function delta_s=deltaShaft(psi,F_r,F_a,B,G,L,delta_s,AddOn)
for I=1:B.numOfCagePositions
B.psi_run=G.psi_+psi(I);
delta_s=solveEquilibrOfForces(I,F_r,B,G,L,delta_s,AddOn);
delta_s=solveEquilibrOfForces(I,F_r,F_a,B,G,L,delta_s,AddOn);
end
end
function delta_s=solveEquilibrOfForces(I,F_r,B,G,L,delta_s,AddOn)
function delta_s=solveEquilibrOfForces(I,F_r,F_a,B,G,L,delta_s,AddOn)
if size(delta_s,2) == 2 % 1d/2d shaft displacement
start= [0.001;0.0001]; % Achtung: die Werte dürfen nicht identisch sein, da im sonderfall atan(1)=psi,
%es zu Fehlern kommt! (in deflectionForYandX wird dann 0 durch 0 geteilt!
%es zu Fehlern kommt! (in deflectionForYX wird dann 0 durch 0 geteilt!
else % 3d shaft displacement
start= [0.0001;0.001;0.00001];
end
if AddOn.Optimization_Toolbox
options = optimoptions('fsolve', 'StepTolerance', 1e-10, 'FunctionTolerance', 1e-10, 'FunValCheck', 'on', 'OptimalityTolerance',1e-10,'Display','off');%, 'SpecifyObjectiveGradient', true );%,'Algorithm', 'levenberg-marquardt' );%,"PlotFcns",@optimplotfval);
delta_s(I,:) = fsolve(@(delta_s) EoF(delta_s,B,G,L,F_r,AddOn), start,options);
delta_s(I,:) = fsolve(@(delta_s) EoF(delta_s,B,G,L,F_r,F_a,AddOn), start,options);
else
options = optimset('MaxFunEvals',10000,"MaxIter", 10000,"TolFun", 1e-8,"TolX", 1e-8);%,"PlotFcns",@optimplotfval);
delta_s(I,:) = fminsearch(@(delta_s) EoF(delta_s,B,G,L,F_r,AddOn), start,options);
delta_s(I,:) = fminsearch(@(delta_s) EoF(delta_s,B,G,L,F_r,F_a,AddOn), start,options);
end
end
function EoF = EoF(delta_s,B,G,L,F_r,AddOn)
function EoF = EoF(delta_s,B,G,L,F_r,F_a,AddOn)
if delta_s(2) == 0
% 1d shaft displacement
if delta_s(1) == 0 && (size(delta_s,1) < 3 || delta_s(3) == 0)
delta_s = delta_s(1);
delta_s = delta_s(2);
EoF = abs(sum(yReactionForceOnlyY(B,G,L,delta_s))-F_r);
elseif AddOn.Optimization_Toolbox
EoF= [F_r-sum(yReactionForcePerBallForYandX(B,G,L,delta_s)); ...
sum(xReactionForcePerBallForYandX(B,G,L,delta_s))];
% 2d shaft displacement
elseif delta_s(1) ~= 0 && (size(delta_s,1) < 3 || delta_s(3) == 0)
if AddOn.Optimization_Toolbox
EoF = [ sum(xReactionForcePerBallForYandX(B,G,L,delta_s)); ...
F_r-sum(yReactionForcePerBallForYandX(B,G,L,delta_s))];
else
EoF = abs(F_r-sum(yReactionForcePerBallForYandX(B,G,L,delta_s)))+ ...
abs(sum(xReactionForcePerBallForYandX(B,G,L,delta_s)));
end
EoF = abs( sum(xReactionForcePerBallForYandX(B,G,L,delta_s)))+ ...
abs(F_r-sum(yReactionForcePerBallForYandX(B,G,L,delta_s)));
end
% 3d shaft displacement
else
if AddOn.Optimization_Toolbox
EoF = [ sum(xReactionForcePerBallForYandX(B,G,L,delta_s)); ...
F_r-sum(yReactionForcePerBallForYandX(B,G,L,delta_s)); ...
F_a-sum(zReactionForcePerBallForXYZ (B,G,L,delta_s))];
else
EoF = abs( sum(xReactionForcePerBallForYandX(B,G,L,delta_s)))+ ...
abs(F_r-sum(yReactionForcePerBallForYandX(B,G,L,delta_s)))+ ...
abs(F_a-sum(zReactionForcePerBallForXYZ (B,G,L,delta_s)));
end
end
end
% only shaft displacement in y-direction
function Q_y_y=yReactionForceOnlyY(B,G,L,delta_s)
Q_y_y=zeros(1,L.Z);
......@@ -158,64 +211,115 @@ function Q_total_y_perball_cont=totalReactionForcePerBallOnlyY(G,IndBall,delta_s
end
% shaft displacement in y- and x-direction
function Q_y_yandx_perball=yReactionForcePerBallForYandX(B,G,L,delta_s)
Q_y_yandx_perball=zeros(1,L.Z);
for IndBall=1:L.Z
Q_y_yandx_perball(IndBall)=totalReactionForcePerBallForYandX(B,L,G,delta_s,IndBall,B.psi_run)* ...
cos(deflectionAngleForYandX(B,L,G,IndBall,delta_s));
if size(delta_s) == 3 % 3d shaft displacement
alpha = deflectionAngleForXYZ(L,G,delta_s,deflectionForYX(L,G,IndBall,delta_s,B.psi_run(IndBall)),IndBall);
else % 1d/2d shaft displacement
alpha = 0;
end
Q_y_yandx_perball(IndBall)=totalReactionForcePerBallForXYZ(B,L,G,delta_s,IndBall,B.psi_run)* ...
cos(deflectionAngleForYandX(B,L,G,IndBall,delta_s))*cos(alpha);
end
end
function Q_x_yandx_perball=xReactionForcePerBallForYandX(B,G,L,delta_s)
Q_x_yandx_perball=zeros(1,L.Z);
for IndBall=1:L.Z
if size(delta_s) == 3 % 3d shaft displacement
alpha = deflectionAngleForXYZ(L,G,delta_s,deflectionForYX(L,G,IndBall,delta_s,B.psi_run(IndBall)),IndBall);
else % 1d/2d shaft displacement
alpha = 0;
end
Q_x_yandx_perball(IndBall)=totalReactionForcePerBallForXYZ(B,L,G,delta_s,IndBall,B.psi_run)*...
sin(deflectionAngleForYandX(B,L,G,IndBall,delta_s))*cos(alpha);
end
end
function Q_total_yandx_perball=totalReactionForcePerBallForYandX(B,L,G,delta_s,IndBall,psi_run)
function [Q_total_xyz_perball,varargout]=totalReactionForcePerBallForXYZ(B,L,G,delta_s,IndBall,psi_run)
if length(psi_run)==1
psi_run(IndBall)=psi_run;
end
if size(delta_s,1) == 2 % 2d shaft displacement
delta_exact = deflectionForYX(L,G,IndBall,delta_s,psi_run(IndBall)); % distance between inner and outer raceway
else % 3d shaft displacement
delta_exact = deflectionForXYZ (L,G,IndBall,delta_s,psi_run(IndBall));
end
switch B.method
case 'static'
delta_defl = deflectionForYandX(L,G,IndBall,delta_s,psi_run(IndBall))-G.D_RE(L.RE_order_num(IndBall));
if delta_defl < 0
Q_total_yandx_perball=abs(delta_defl).^(3/2).*G.K_p(L.RE_order_num(IndBall));
delta_RWRE_defl = delta_exact - G.D_RE(L.RE_order_num(IndBall)); % distance between raceway(RW) and RE
if delta_RWRE_defl < 0
Q_total_xyz_perball=abs(delta_RWRE_defl).^(3/2).*G.K_p(L.RE_order_num(IndBall));
else
Q_total_yandx_perball = 0;
Q_total_xyz_perball = 0;
end
case 'dynamic'
delta_exact = deflectionForYandX(L,G,IndBall,delta_s,psi_run(IndBall));
Q_total_yandx_perball = interp1(B.delta(IndBall,:),B.Q_intp1,delta_exact,'spline','extrap'); % 'spline' extrapoliert negative Werte für kleine delta
Q_total_xyz_perball = interp1(B.delta_intp1(IndBall,:),B.Q_intp1,delta_exact,'spline','extrap'); % 'spline' extrapoliert fälschlicher Weise negative Werte für kleine delta
end
if nargout == 2
varargout{1} = delta_exact;
end
end
function delta_yandx=deflectionForYandX(L,G,IndBall,delta_s,psi_run)
function delta_yandx=deflectionForYX(L,G,IndBall,delta_s,psi_run)
atanxy = atan(delta_s(2,:)./delta_s(1,:));
atanxy = atan(delta_s(1,:)./delta_s(2,:));
delta_yandx = sin(psi_run-atanxy).*delta_s(2,:)./(sin(atanxy).*(sin(atan(sin(psi_run-atanxy).*delta_s(2,:)./...
delta_yandx = sin(psi_run-atanxy).*delta_s(1,:)./(sin(atanxy).*(sin(atan(sin(psi_run-atanxy).*delta_s(1,:)./...
sin(atanxy)./(G.R_ba-G.R_RE(L.RE_order_num(IndBall))-cos(psi_run-atanxy) ...
./sin(atanxy).*delta_s(2,:))))))-G.R_bi+G.R_RE(L.RE_order_num(IndBall));
./sin(atanxy).*delta_s(1,:))))))-G.R_bi+G.R_RE(L.RE_order_num(IndBall));
end
function psi_k_yandx=deflectionAngleForYandX(B,L,G,IndBall,delta_s)
atanxy = atan(delta_s(2)/delta_s(1));
atanxy = atan(delta_s(1)/delta_s(2));
psi = B.psi_run(IndBall);
psi_k_yandx = psi+atan(sin(psi-atanxy)*delta_s(2)/...
psi_k_yandx = psi+atan(sin(psi-atanxy)*delta_s(1)/...
sin(atanxy)/(G.R_ba-G.R_RE(L.RE_order_num(IndBall))-cos(psi-atanxy)...
*delta_s(2)/sin(atanxy))); %(bei radialer und axialer Verschiebung)
*delta_s(1)/sin(atanxy))); %(bei radialer und axialer Verschiebung)
end
function Q_x_yandx_perball=xReactionForcePerBallForYandX(B,G,L,delta_s)
Q_x_yandx_perball=zeros(1,L.Z);
% shaft displacement in y-, x- and z-direction
function Q_z_xyz_perball=zReactionForcePerBallForXYZ(B,G,L,delta_s)
Q_z_xyz_perball=zeros(1,L.Z);
for IndBall=1:L.Z
Q_x_yandx_perball(IndBall)=totalReactionForcePerBallForYandX(B,L,G,delta_s,IndBall,B.psi_run)*sin(deflectionAngleForYandX(B,L,G,IndBall,delta_s));
Q_z_xyz_perball(IndBall)=totalReactionForcePerBallForXYZ(B,L,G,delta_s,IndBall,B.psi_run)* ...
sin(deflectionAngleForXYZ(L,G,delta_s,deflectionForYX(L,G,IndBall,delta_s,B.psi_run(IndBall)),IndBall));
end
end
function delta_XYZ=deflectionForXYZ(L,G,IndBall,delta_s,psi_run)
if size(delta_s,1) ~= 3
delta_s(3) = 0;
end
delta_XYZ = G.R_la(L.RE_order_num(IndBall)) + G.R_li(L.RE_order_num(IndBall))...
- sqrt(delta_s(3,:)^2 + (G.R_la(L.RE_order_num(IndBall)) + G.R_li(L.RE_order_num(IndBall))...
- deflectionForYX(L,G,IndBall,delta_s,psi_run))^2);
end
function alpha_xyz=deflectionAngleForXYZ(L,G,delta_s,delta,IndBall)
if size(delta_s,1) ~= 3
delta_s(3) = 0;
end
alpha_xyz = tan(delta_s(3,:) ./ (G.R_li(L.RE_order_num(IndBall)) + G.R_la(L.RE_order_num(IndBall)) - delta));
end
\ No newline at end of file
function calculate (obj, forceMode)
function calculate (obj, forceMode, options)
%Berechnet alle Rechnungsabschnitte, die noch nicht berechnet wurden,
%sofern alle Eingangsgrößen gesetzt sind.
%
%forcemode
% - 'nonForced' -> Bereits berechnete und noch aktuelle größen werden nicht erneut berechnet (default)
% - 'forced' -> Alle Größen werden erneut errechnet
%
%options: - 'calcTo' -> to leave out unnecessary calculations you can
% choose until which calc... the program should calculate
%
% pmd Berechnungstool Lagerimpedanz
% Autor: Steffen Puchtler
% Autor: Steffen Puchtler, Julius van der Kuip
arguments
obj
forceMode {mustBeMember(forceMode,{'nonForced','forced'})} = 'nonForced'
options.calcTo {mustBeMember(options.calcTo,{'calcLub','calcClear', 'calcGeo', 'calcLoad', 'calcFilm', 'calcCap', 'calcImp'})} = 'calcImp'
end
if ~isscalar(obj)
......@@ -35,25 +39,27 @@ function calculate (obj, forceMode)
obj.psi_calc = find_nessecary_psi(obj.psi,obj.L.Z,obj.L.allBallsSameMaterial);
[obj.psi_all,obj.ind_psi_all] = find_all_ind(obj.psi_calc,obj.L.allBallsSameMaterial);
if ~obj.up2date.T || force
allCalcList = {'calcLub','calcClear', 'calcGeo', 'calcLoad', 'calcFilm', 'calcCap', 'calcImp'};
if (~obj.up2date.T || force) && any(strcmp(options.calcTo, allCalcList(1:end)))
obj.calcLub
end
if ~obj.up2date.R || force
if (~obj.up2date.R || force) && any(strcmp(options.calcTo, allCalcList(2:end)))
obj.calcClear
end
if ~obj.up2date.G || force
if (~obj.up2date.G || force) && any(strcmp(options.calcTo, allCalcList(3:end)))
obj.calcGeo
end
if ~obj.up2date.B || force
if (~obj.up2date.B || force) && any(strcmp(options.calcTo, allCalcList(4:end)))
obj.calcLoad
end
if ~obj.up2date.H || force
if (~obj.up2date.H || force) && any(strcmp(options.calcTo, allCalcList(5:end)))
obj.calcFilm
end
if ~obj.up2date.C || force
if (~obj.up2date.C || force) && any(strcmp(options.calcTo, allCalcList(6:end)))
obj.calcCap
end
if ~obj.up2date.Z || force
if (~obj.up2date.Z || force) && any(strcmp(options.calcTo, allCalcList(end)))
obj.calcImp
end
......
......@@ -7,7 +7,7 @@ function plot(obj,name,options)
% options: - 'plotStyle' -> 'linear'/'polar'
% - 'figureName' -> name of figure window
% - 'frequency' -> frequency in HZ (to calculate the impedance a frequency is necessary!)
% - 'create' -> 'new'/'current' (choose between create new figure or take the already existing one)
% - 'create' -> 'new'/'current'/'new_holdon' (choose between create new figure / take the already existing one / when plotting BearImp Array: first plot creates new figure, all following take current)
%
% pmd Berechnungstool Lagerimpedanz
% Autor: Julius van der Kuip
......@@ -18,12 +18,24 @@ function plot(obj,name,options)
options.plotStyle char {mustBeMember(options.plotStyle,{'linear','polar'})} = 'linear'
options.frequency = 2e4
options.figureName char = 'Ergebnisse BearImp';
options.create char {mustBeMember(options.create,{'new','current'})} = 'new'
options.create char {mustBeMember(options.create,{'new','current','new_holdon'})} = 'new'
% if you add new option, please remember to insert it to following if-statement
end
if numel(obj) > 1
for ii = 1:numel(obj) % TODO: not working with matrices
obj(ii).plot(name,'plotStyle',options.plotStyle,'create',options.create);
if strcmp(options.create, 'new_holdon')
obj(1).plot(name,'plotStyle',options.plotStyle,'frequency',options.frequency,...
'figureName',options.figureName,'create','new');
hold on
startFor = 2;
else
startFor = 1;
end
for ii = startFor:numel(obj) % TODO: not working with matrices
obj(ii).plot(name,'plotStyle',options.plotStyle,'frequency',options.frequency,...
'figureName',options.figureName,'create','current');
hold on
end
hold off
......@@ -59,6 +71,8 @@ function plot(obj,name,options)
figure('name',options.figureName)
case 'current'
gcf;
case 'new_holdon'
error('You selected "new_holdon" while plotting only one graph. Create a BearImp Array to use this feature or consider "create" / "new" as option.')
end
for ii = 1:len_iter
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
var_name;var_label;var;full_name;unit;unit_factor;title_var
delta_sy;\delta_{sy};obj.B.delta_s(1,:);vertial shaft displacement;\mum;1.00E+06;Shaft displacement in vertical direction over cage angle
delta_sx;\delta_{sx};obj.B.delta_s(2,:);horizontal shaft displacement;\mum;1.00E+06;Shaft displacement in horizontal direction over cage angle
Q;Q;obj.B.Q;load of single RE;kN;1.00E-03;Load of single RE over cage angle
s;s;obj.B.s;intersection of ball and raceway;\mum;1.00E+06;Intersection of ball and raceway over cage angle
h_0;h_0;obj.H.h_0;central film thickness;\mum;1.00E+06;Central film thickness over cage angle
C_el_single;C_{el,single};obj.C.C_el_single;capacity of sinlge RE;pF;1.00E+12;Capacity of single RE over cage angle
R_el_single;R_{el,single};obj.C.R_el_single;resistance of sinlge RE;k\Omega;1.00E-03;Resistance of single RE over cage angle
C_el;C_{el};obj.C.C_el;total capacity of bearing;pF;1.00E+12;Total capacity of bearing over cage angle
R_el;R_{el};obj.C.R_el;total resistance of bearing;k\Omega;1.00E-03;Total resistance of bearing over cage angle
Z_el;|Z_{el}|;obj.Z.Z_el;total absolute impedance of bearing;k\Omega;1.00E-03;Total impedance of bearing over cage angle
p;p;obj.H.p;contact pressure;Gpa;1.00E-09;Contact pressure over cage angle
C_Hertz;C_{Hertz};obj.C.C_Hertz;capacity of Hertzian contact;pF;1.00E+12;Capacity of Hertzian contact over cage angle
C_out;C_{out};obj.C.C_out;capacity of outer RE area;pF;1.00E+12;Capacity of outer RE area over cage angle
intersection_RE;\delta_{inters};obj.B.intersectionBall;intersection of RE and raceway;\mum;1.00E+06;Intersection of ball and raceway over cage angle without film
delta_sy;\delta_{sy};obj.B.delta_s(2,:);Vertial shaft displacement;\mum;1.00E+06;Shaft displacement in vertical direction over cage angle
delta_sx;\delta_{sx};obj.B.delta_s(1,:);Horizontal shaft displacement;\mum;1.00E+06;Shaft displacement in horizontal direction over cage angle
delta_sz;\delta_{sz};obj.B.delta_s(3,:);Axial shaft displacement;\mum;1.00E+06;Shaft displacement in axial direction over cage angle
Q;Q;obj.B.Q;Load of single RE;kN;1.00E-03;Load of single RE over cage angle
s;s;obj.B.s;Gap between ball and raceway;\mum;1.00E+06;Gap between ball and raceway over cage angle
h_0;h_0;obj.H.h_0;Central film thickness;\mum;1.00E+06;Central film thickness over cage angle
C_el_single;C_{el,single};obj.C.C_el_single;Capacitance of sinlge RE;pF;1.00E+12;Capacitance of single RE over cage angle
R_el_single;R_{el,single};obj.C.R_el_single;Resistance of sinlge RE;k\Omega;1.00E-03;Resistance of single RE over cage angle
C_el;C_{el};obj.C.C_el;Total capacitance of bearing;pF;1.00E+12;Total capacitance of bearing over cage angle
R_el;R_{el};obj.C.R_el;Total resistance of bearing;k\Omega;1.00E-03;Total resistance of bearing over cage angle
Z_el;|Z_{el}|;obj.Z.Z_el;Total absolute impedance of bearing;k\Omega;1.00E-03;Total impedance of bearing over cage angle
p;p;obj.H.p;Contact pressure;Gpa;1.00E-09;Contact pressure over cage angle
C_Hertz;C_{Hertz};obj.C.C_Hertz;Capacitance of Hertzian contact;pF;1.00E+12;Capacitance of Hertzian contact over cage angle
C_out;C_{out};obj.C.C_out;Capacitance of outer RE area;pF;1.00E+12;Capacitance of outer RE area over cage angle
intersection_RE;\delta_{inters};obj.B.intersectionBall(:,:,1);Intersection of RE and raceway;\mum;1.00E+06;Intersection of ball and raceway over cage angle without film
alpha;\alpha;obj.B.alpha;Load angle;;57;Load angle over cage angle
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment