diff --git a/@BearImp/BearImp.m b/@BearImp/BearImp.m index 25dbf68b8a36bfa9f12cf6d0e83d9fb2137bc488..fe3913a52bf52fffabe2497cb4763a26b2762d31 100644 --- a/@BearImp/BearImp.m +++ b/@BearImp/BearImp.m @@ -76,6 +76,7 @@ classdef BearImp < handle & matlab.mixin.Copyable obj.resolutionPerRotation = 360; end end + obj.method = BearImpOptions; addlistener(obj.method,'optionChanged',@(src,event) obj.methodChangedFcn(src,event)); end end @@ -408,7 +409,7 @@ classdef BearImp < handle & matlab.mixin.Copyable end function cp = copyElement(obj) cp = copyElement@matlab.mixin.Copyable(obj); - cp.method = obj.method.copy; % creat a deep copy of the method + cp.method = obj.method.copy; % creat a deep copy of the method end end end \ No newline at end of file diff --git a/@BearImp/calcFilm.m b/@BearImp/calcFilm.m index ed1de33d8f84a8d6f48d7e92a8215f3fc9670a40..f9f7deb1d0b3cd5e5aa0377923012bbf0c1130d5 100644 --- a/@BearImp/calcFilm.m +++ b/@BearImp/calcFilm.m @@ -1,4 +1,4 @@ -function varargout = calcFilm(obj, options) +function h_0 = calcFilm(obj, options) %2.5 Schmierfilmdicke H = H(S,T,G,B,T_Oil,n) %Berechnet die Hertz'schen Flächen sowie die Schmierfilmdicken aller %Einzelkontakt (innen und außen für alle belasteten Wälzkörper) @@ -71,23 +71,14 @@ H.W = Q_temp./(E_red_tmp .* R_x_temp.^2); H.L = H.G .* H.U.^0.25; H.M = H.W.*(2.*H.U).^(-3/4); -switch H.method - case {'Hamrock/Dowson','Hamrock/Dowson_withoutThermCorr'} +switch H.method.filmThicknessFormula + case 'Hamrock/Dowson' H.H_0 = 2.69 * H.G.^0.53 .* H.U.^0.67 .* H.W.^-0.067 .* (1-0.61*exp(-0.73.*G.k)); H.H_min = 3.63 * H.G.^0.49 .* H.U.^0.68 .* H.W.^-0.073 .* (1- exp(-0.68.*G.k)); - H.h_0raw = H.H_0 .*R_x_temp; % without correction factors + H.h_0 = H.H_0 .*R_x_temp; H.h_min = H.H_min.*R_x_temp; - H.L_therm = T.eta_0 .* T.alpha_etaT .* H.u.^2 ./ (4*S.lambda); - if H.method == 'Hamrock/Dowson' - H.C_korr = 3.94 ./ (3.94 + H.L_therm.^0.62); - else - H.C_korr = 1; - end - H.h_0 = H.h_0raw.*H.C_korr; - H.h_minth = H.h_min .*H.C_korr; case 'Moes' - H.lamda = R_x_temp./R_y_temp; H.N = H.W .* H.lamda.^0.5 .* H.U.^(-0.75); @@ -106,8 +97,29 @@ switch H.method H.h_0 = H.H_0 .*R_x_temp .* H.U.^(0.5); end +if H.method.thermalCorrection == 'on' + H.L_therm = T.eta_0 .* T.alpha_etaT .* H.u.^2 ./ (4*S.lambda); + H.C_thCorr = 3.94 ./ (3.94 + H.L_therm.^0.62); + H.h_0 = H.h_0.*H.C_thCorr; + if isfield(H,'h_min') + H.h_min = H.h_min .*H.C_thCorr; + end +end + +if H.method.starvationCorrection == 'on' % according to SKF according to Schneider 2021 !!! In my opinion a factor for the friction not for lubrication film thickness + H.K_rs = 3e-8; % 3e-8 for low level oil bath/oil jet lubrication, 6e−8 for grease/oil-air lubrication + H.K_Z = 3.1; % 3.1 for single row deep groove ball bearings, 5.1 for cylindrical roller bearings with cage + T.nu_0 = T.eta_0 ./ T.rho(T_Oil); %(kin. viskosity at ambient pressure at oil temperature) + n = omega/2/pi*60; % in rpm + H.C_rsCorr = 1./exp(H.K_rs*T.nu_0*1e6*n*(L.d+L.D)*1e3*sqrt(H.K_Z/(2*(L.D-L.d)*1e3))); + H.h_0 = H.h_0.*H.C_rsCorr; + if isfield(H,'h_min') + H.h_min = H.h_min .*H.C_rsCorr; + end +end + if isPreCalc - varargout{1} = H.h_0; + h_0 = H.h_0; return end @@ -123,17 +135,17 @@ end % Überprüfen, ob die Schmierfilmberechnung innerhalb des vorgegeben % Bereichs liegt -switch H.method -case {'Hamrock/Dowson','Hamrock/Dowson_withoutThermCorr'} - rangeLoadParM = [25,500]; % Quelle: Non-Dimensional Groups, Marian 2020, Fig7 - rangeViscParL = [5,15]; - - if B.method == 'dynamic' - warning('It is not recommended to use Hamrock/Dowson as lubricant film calculation when dynamic load calculation is selected, because the loads become very small outside the load range.') - end -case 'Moes' - rangeLoadParM = [5,1000]; - rangeViscParL = [1,25]; +switch H.method.filmThicknessFormula + case 'Hamrock/Dowson' + rangeLoadParM = [25,500]; % Quelle: Non-Dimensional Groups, Marian 2020, Fig7 + rangeViscParL = [5,15]; + + if B.method == 'dynamic' + warning('It is not recommended to use Hamrock/Dowson as lubricant film calculation when dynamic load calculation is selected, because the loads become very small outside the load range.') + end + case 'Moes' + rangeLoadParM = [5,1000]; + rangeViscParL = [1,25]; end if max(rangeLoadParM) < max(H.M,[],'all') || min(rangeLoadParM) > min(H.M,[],'all') diff --git a/@BearImp/calcLub.m b/@BearImp/calcLub.m index 53d45ac22874d8eb5704f13a977e4aaa6ad38709..27d1eab73390f80b4bdbe10060e7bd38e9b36702 100644 --- a/@BearImp/calcLub.m +++ b/@BearImp/calcLub.m @@ -23,7 +23,8 @@ switch T.method T.eta_00 = T.eta_040 - T.alpha_eta.*40; T.alpha_nu = (S.nu_100 - S.nu_40)/60; T.nu_0 = S.nu_40 - T.alpha_nu.*40; - T.eta_0 = T.eta_00 + T.alpha_eta.*T_Oil; + T.eta = @(T) T.eta_00 + T.alpha_eta.*T; + T.eta_0 = T.eta(T_Oil); T.nu_38 = T.nu_0 + T.alpha_nu.*38; case 'Vogel' assert(~any(isnan([S.B S.C S.K])),'Vogel-Parameters not given for the selected lubricant. Choose method.T = ''linear''') diff --git a/BearImpOptions.m b/BearImpOptions.m index 4e4558a504d40195593bb4b5d27d764570975a57..2201c9434bef63628eba97956a240c899667cdd8 100644 --- a/BearImpOptions.m +++ b/BearImpOptions.m @@ -30,7 +30,9 @@ classdef BearImpOptions < handle & dynamicprops & matlab.mixin.CustomDisplay & m function possibleOption = Possible possibleOption.T = {'linear','Vogel'}; possibleOption.B = {'static','dynamic'}; - possibleOption.H = {'Hamrock/Dowson','Hamrock/Dowson_withoutThermCorr','Moes'}; + possibleOption.H.filmThicknessFormula = {'Hamrock/Dowson','Moes'}; + possibleOption.H.thermalCorrection = {'on','off'}; + possibleOption.H.starvationCorrection = {'on','off'}; possibleOption.C.unloadedRE = { 'neglect','stateOfTheArt', 'Leander_Parallel','Leander_Radial','LeanderSteffen','TobiasSteffen_Kugelfläche','TobiasSteffen_Laufbahnfläche','semianalytisch3D'}; possibleOption.C.outsideArea = {'k-factor','neglect','stateOfTheArt','Schneider_k_c','Schneider_k_vh','Leander_Parallel','Leander_Radial','LeanderSteffen','TobiasSteffen_Kugelfläche','TobiasSteffen_Laufbahnfläche','semianalytisch3D'}; end @@ -39,11 +41,20 @@ classdef BearImpOptions < handle & dynamicprops & matlab.mixin.CustomDisplay & m % Gibt ein Rechenmethoden-Struct mit den Default-Methoden aus defaultOption.T = 'Vogel'; defaultOption.B = 'dynamic'; - defaultOption.H = 'Hamrock/Dowson'; + defaultOption.H.filmThicknessFormula = 'Hamrock/Dowson'; + defaultOption.H.thermalCorrection = 'on'; + defaultOption.H.starvationCorrection = 'off'; defaultOption.C.unloadedRE = 'semianalytisch3D'; defaultOption.C.outsideArea = 'semianalytisch3D'; end + function subOptionsCell = subOptionsSetWith + % Gibt an, welche suboptions geändert werden sollen, wenn versucht + % wird, eine Option mit Unteroptionen direkt zu setzen. + subOptionsCell.H = {'filmThicknessFormula'}; + subOptionsCell.C = {'unloadedRE','outsideArea'}; + end + function allCategories = AllCategories allCategories = [{'main'} fieldnames(BearImpOptions.Possible)']; mainNames = fieldnames(BearImpOptions.Possible); @@ -200,7 +211,16 @@ classdef BearImpOptions < handle & dynamicprops & matlab.mixin.CustomDisplay & m function set_optionChosen(obj,subOptionName,optionChoice) objBefore = obj.copy; if ischar(optionChoice) || isstring(optionChoice) - assert(~obj.(subOptionName).hasSubSubOptions || strcmp(optionChoice,'default'),[obj.(subOptionName).optionName ' has suboptions. Set suboptions individually or set to ''default''.']) + assert(~obj.(subOptionName).hasSubSubOptions || ... + isfield(BearImpOptions.subOptionsSetWith,subOptionName) || ... + strcmp(optionChoice,'default'),... + [obj.(subOptionName).optionName ' has suboptions. Set suboptions individually or set to ''default''.']) + if isfield(BearImpOptions.subOptionsSetWith,subOptionName) + for subsub = BearImpOptions.subOptionsSetWith.(subOptionName) + obj.(subOptionName).(subsub{:}) = optionChoice; + end + return + end mustBeMember(optionChoice,[obj.(subOptionName).possibleSubOptions {'default'}]) if ~obj.(subOptionName).hasSubSubOptions && strcmp(optionChoice,obj.(subOptionName).defaultOption) optionChoice = 'default'; @@ -209,7 +229,6 @@ classdef BearImpOptions < handle & dynamicprops & matlab.mixin.CustomDisplay & m if strcmp(optionChoice,'default') if obj.(subOptionName).hasSubSubOptions for sub = obj.(subOptionName).possibleSubOptions - disp(sub{:}) obj.(subOptionName).(sub{:}).optionChosen = 'default'; end end @@ -232,9 +251,9 @@ classdef BearImpOptions < handle & dynamicprops & matlab.mixin.CustomDisplay & m end [isEqual,optionsChanged] = eq(obj,objBefore); if ~isEqual - obj.optionsLastChanged = optionsChanged; - notify(obj,'optionChanged') - %disp(optionsChanged) + mainObj = obj.getMainObj; + mainObj.optionsLastChanged = optionsChanged; + notify(mainObj,'optionChanged') end end end @@ -278,5 +297,15 @@ classdef BearImpOptions < handle & dynamicprops & matlab.mixin.CustomDisplay & m end end end + function mainObj = getMainObj(obj) + switch obj.optionLevel + case 1 + mainObj = obj; + case 2 + mainObj = obj.parent; + case 3 + mainObj = obj.parent.parent; + end + end end end \ No newline at end of file