Skip to content
Snippets Groups Projects
Commit 51c6b9bc authored by sp89hili's avatar sp89hili
Browse files

Pu_Change default r2smallCriterion to r<R_RE+h_0 and make fzero for phi_0lr...

Pu_Change default r2smallCriterion to r<R_RE+h_0 and make fzero for phi_0lr more stable by using real()
parent fb794a87
No related branches found
No related tags found
No related merge requests found
......@@ -44,12 +44,12 @@ function C_out = calcCap_puchtler2025(s,R_RE,R_R,R_ZL,R_ZR,B,R_L,epsilon_r,alpha
if Theta_0l(phi_1) - (a/R_RE+phi_1) > Theta_1l(phi_1)
phi_1l = phi_1;
else
phi_1l = fzero(@(phi) Theta_0l(phi) - (a/R_RE+phi) - Theta_1l(phi),0);
phi_1l = fzero(@(phi) real(Theta_0l(phi) - (a/R_RE+phi) - Theta_1l(phi)),0); % True value is always real. But on iterations, imaginary solutions might occur, resulting in
end
if Theta_0r(phi_1) + (a/R_RE+phi_1) < Theta_1r(phi_1)
phi_1r = phi_1;
else
phi_1r = fzero(@(phi) Theta_0r(phi) + (a/R_RE+phi) - Theta_1r(phi),0);
phi_1r = fzero(@(phi) real(Theta_0r(phi) + (a/R_RE+phi) - Theta_1r(phi)),0);
end
% fprintf('phi_0 = %d | phi_1l = %d | phi_1r = %d \n',phi_0,phi_1l,phi_1r)
end
......@@ -67,11 +67,11 @@ function C_out = calcCap_puchtler2025(s,R_RE,R_R,R_ZL,R_ZR,B,R_L,epsilon_r,alpha
C_grooveL = 2 * 8.854187e-12 * epsilon_r * integral2(fun_groove,0,phi_1,Theta_1l,Theta_0l,'AbsTol',absTol);
case 'air'
absTol = 50e-4; % 50e-4 corresponds to 0.1 pF with a permittivity of 2.2
fun_grooveOut = @(phi,theta) R_RE^2.*1./(h_0./epsilon_r + (r_groove(phi,theta)-R_RE-h_0)) .* cos(theta);
fun_grooveOut = @(phi,theta) R_RE^2./(h_0./epsilon_r + (r_groove(phi,theta)-R_RE-h_0)) .* cos(theta);
C_grooveRIn = 8.854187e-12 * epsilon_r * integral2(fun_groove ,-phi_1,phi_1r,Theta_0rIn,Theta_1r ,'AbsTol',absTol);
C_grooveLIn = 8.854187e-12 * epsilon_r * integral2(fun_groove ,-phi_1,phi_1l,Theta_1l ,Theta_0lIn ,'AbsTol',absTol);
C_grooveROut = 8.854187e-12 * integral2(fun_grooveOut, phi_0,phi_1,Theta_0rOut,Theta_0rIn ,'AbsTol',absTol);
C_grooveLOut = 8.854187e-12 * integral2(fun_grooveOut, phi_0,phi_1,Theta_0lIn ,Theta_0lOut,'AbsTol',absTol);
C_grooveROut = 8.854187e-12 * integral2(fun_grooveOut, phi_0,phi_1,Theta_0rOut,Theta_0rIn ,'AbsTol',absTol*2);
C_grooveLOut = 8.854187e-12 * integral2(fun_grooveOut, phi_0,phi_1,Theta_0lIn ,Theta_0lOut,'AbsTol',absTol*2);
C_grooveR = C_grooveRIn + C_grooveROut;
C_grooveL = C_grooveLIn + C_grooveLOut;
end
......
......@@ -59,7 +59,7 @@ classdef BearImpOptions < handle & dynamicprops & matlab.mixin.CustomDisplay & m
defaultOption.C.outsideArea = 'semianalytisch3D';
defaultOption.C.deformedArea= 'neglect';
defaultOption.C.outlet = 'oil';
defaultOption.C.r2smallCriterion = 'r<1.00125*R_RE';
defaultOption.C.r2smallCriterion = 'r<h_0+R_RE';
defaultOption.C.k_vh_factor = 'off';
defaultOption.C.pressureDistribution = 'on';
defaultOption.C.roughnessCorrection = 'off';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment