diff --git a/@BearImp/calcLub.m b/@BearImp/calcLub.m index 58c25ebbc36ae73892e7256c309c4a703ee8e0d8..5a99896a9dea7df14d3eb8813910941f9053b04c 100644 --- a/@BearImp/calcLub.m +++ b/@BearImp/calcLub.m @@ -10,18 +10,28 @@ assert(obj.up2date.S,'Schmierstoff nicht gesetzt') S = obj.S; T_Oil = obj.T_Oil; T = struct; +T.method = possibleMethods.addDefault(obj.method).T; + %% Berechnung -T.rho_40 = S.rho_15.*(1 - S.alpha_rho.*25); -T.rho_100 = S.rho_15.*(1 - S.alpha_rho.*85); -T.eta_040 = T.rho_40.*S.nu_40; -T.eta_0100 = T.rho_100.*S.nu_100; -T.alpha_eta = (T.eta_0100-T.eta_040)/60; -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.nu_38 = T.nu_0 + T.alpha_nu.*38; +T.rho = @(theta) S.rho_15.*(1 - S.alpha_rho.*(theta-15)); +T.eta_040 = T.rho(40).*S.nu_40; +T.eta_0100 = T.rho(100).*S.nu_100; T.alpha_etaT = log(T.eta_040/T.eta_0100)/60; +switch T.method + case 'linear' + T.alpha_eta = (T.eta_0100-T.eta_040)/60; + 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.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''') + T.eta_0 = S.K .* exp(S.B ./ (T_Oil + S.C)); + eta_38 = S.K .* exp(S.B ./ (40 + S.C)); + T.nu_38 = eta_38 ./ T.rho(38); +end + %% Attribute ändern obj.T = T; diff --git a/@BearImp/plot.m b/@BearImp/plot.m index d2bb392c1412fa5182a4b49aba26c4929df04cd5..38c5ac45eaccad0319960330ff5a300112f31e72 100644 --- a/@BearImp/plot.m +++ b/@BearImp/plot.m @@ -23,8 +23,10 @@ function plot(obj,name,options) if numel(obj) > 1 for ii = 1:numel(obj) % TODO: not working with matrices - obj(ii).plot(name); + obj(ii).plot(name,'plotStyle',options.plotStyle,'create',options.create); + hold on end + hold off return end diff --git a/InputData.xlsx b/InputData.xlsx index 3f1ad6f3b234485ea80aceed719aa137c8d7af56..40ea2b3f6e53523dfac281d97872c807849d40e8 100644 Binary files a/InputData.xlsx and b/InputData.xlsx differ diff --git a/possibleMethods.m b/possibleMethods.m index cd134a51f1c690993a6cbf31d4691d6e021ff608..18d4f07137efa63cf0804bb09288ffd25650c779 100644 --- a/possibleMethods.m +++ b/possibleMethods.m @@ -1,16 +1,14 @@ classdef possibleMethods % Gibt Auskunft über mögliche Berechnungsmethoden der einzelnen -% Berechnungsabschnitte (T, R, G, B, H, Z) und enthält eine Funktion zum +% Berechnungsabschnitte (T, R, G, B, H, C) und enthält eine Funktion zum % überprüfen des Methodenstructs % pmd Berechnungstool Lagerimpedanz -% Version: 2.0.0 -% Stand: 02.01.2022 % Autor: Steffen Puchtler, Julius van der Kuip methods (Static) % Diese Klasse enthält ausschließlich statische Methoden, sodass kein Objekt initialisiert werden muss function s = T - s = {}; + s = {'linear','Vogel'}; end function s = R s = {}; @@ -31,6 +29,7 @@ classdef possibleMethods function s = Default % Gibt ein Rechenmethoden-Struct mit den Default-Methoden aus + s.T = 'Vogel'; s.B = 'static'; s.H = 'Hamrock/Dowson'; s.C.unloadedRE = 'semianalytisch3D';