We have such a function:
We set the array d = [10:10:10000], d(i) is substituted in and equated to the constant C_2, i.e. we get the equation F(d(i), t)=C_2 (C_2 = 6.81), and we need to find this 't' for the corresponding d(i), that is, as a result, we should have a graph d(t). I think that most likely it will be a discontinuous fast-oscillating function. In essence, our task is reduced to solving the equation F(t, d) = C_2
My code:
%% initial conditions
global d k0 h_bar ksi m E C_2
Ef = 2.77*10^3;
Kb = physconst('boltzmann'); % 1.38*10^(-23)
T = 0.12:0.24:6.4;
m = 9.1093837*10^(-31);
Tc = 1.2;
D = 10^(-8); % толщина пленки
ksi = 10^(-9);
dd = [10:10:10000];
E = Ef/(pi*Kb*Tc);
h_bar = (1.0545726*10^(-34));
k0 = (ksi/h_bar)*sqrt(2.*m.*pi.*Kb.*Tc);
C_2 = 6.81;
t0 = 1.0;
for i = 1:numel(dd)
d = dd(i);
t(i) = fsolve(@f_calc,t0);
t0 = t(i);
end
plot(t,F)
function F = f_calc(t)
global d k0 h_bar ksi m C_2
nD = floor(375/(2*pi*t*1.2) - 0.5);
F = 0;
for k = 0:nD
F = F + 1/(2*k+1).*(k0.*real(((f_p1(k,t)-f_p2(k,t))./2))+(f_arg_2(k,t)-f_arg_1(k,t))./d);
end
F = F - C_2;
end
function p1 = f_p1(n,t)
p1 = ((1+1i)./sqrt(2)).*sqrt(t.*(2.*n+1));
end
function p2 = f_p2(n,t)
global E
p2 = sqrt(3601+1i.*t.*(2.*n+1));
end
function n_lg = f_lg(n,t)
global d k0
arg_of_lg = (1+exp(-1i*d*k0.*f_p1(n,t)))/(1+exp(-1i*d*k0.*f_p2(n,t)));
n_lg = log(abs(arg_of_lg));
end
function arg_1 = f_arg_1(n,t)
global d k0
arg_1 = angle(1+exp(-1i*d*k0.*f_p1(n,t)));
end
function arg_2 = f_arg_2(n,t)
global d k0
arg_2 = angle(1+exp(-1i*d*k0.*f_p2(n,t)));
end