I use the parameters to calculate the Φ in the final, but I don't know what happen, it shows a lot of information, but I can't understand. I am using this code to solve the problem. This code is borrowed by me. With the consent of others, then I have not changed anything, but I can't display the final result. The main problem is in the last calculation FindRoot
. Follow is my code.
Hope somebody can help me, thank you very much! Cause this problem is very important to me!
(* Physical Constants *)
k = 1.38 * 10^-23;
ϵ = 8.85 * 10^-12;
e = 1.6 *10^-19;
m0 = 9.11 * 10^-31;
h = 6.63 * 10^-34;
(* Basic information of Black Phosphorus *)
κ = 6.1;
me = 0.13 * m0;
mp = 0.28 * m0;
Eg = 0.33;
Δϕ = -0.1;
(* Δϕ = ϕTip - χ *)
ΔV = 0.04;
(* ΔV = EA - EV *)
(* Experimental conditions *)
T = 4.3;
ΔS = 0.4*10^-9;
(* Distance between tip and sample *)
ni = 2/h^3*(2*π*k*T)^(3/2)*(me*mp)^(3/4)*E^(-((Eg*e)/(2*k*T)));
uB = (e*ϕB)/(k*T);
NA = 10^22;
ND = 0;
X = FindRoot[-(NA/(
1 + 4*E^(((ΔV - 1/2 Eg - ϕB)*e)/(k*T)))) ==
2*ni*Sinh[uB], {ϕB, 1/2 Eg}]
ϕB = ϕB /. X;
uB = (e*ϕB)/(k*T);
LD = ((κ*ϵ*k*T)/(2*e^2*ni))^(1/2);
Result = FindRoot[(k*T)/e*1/
LD*(NA/ni*
Log[(1 +
1/2*E^((e*ϕS)/(k*T) - ((ΔV - 1/2*Eg)*e)/(
k*T)))/(
1 + 1/2*E^((e*ϕB)/(
k*T) - ((ΔV - 1/2*Eg)*e)/(k*T)))] - 1/\!\(
\*SubsuperscriptBox[\(∫\), \(0\), \(∞\)]\(
\*FractionBox[
SuperscriptBox[\(x\),
FractionBox[\(1\), \(2\)]], \(1 +
\*SuperscriptBox[\(E\), \(x -
\*FractionBox[\(\(-Eg\)*e\), \(2*k*
T\)]\)]\)] \[DifferentialD]x\)\)*(2/3*\!\(
\*SubsuperscriptBox[\(∫\), \(0\), \(∞\)]\(
\*FractionBox[
SuperscriptBox[\(x\),
FractionBox[\(3\), \(2\)]], \(1 +
\*SuperscriptBox[\(E\), \(x -
\*FractionBox[\(\(-Eg\)*e\), \(2*k*T\)] +
\*FractionBox[\(e*ϕB\), \(k*T\)]\)]\)] \[DifferentialD]x\)\) -
2/3*\!\(
\*SubsuperscriptBox[\(∫\), \(0\), \(∞\)]\(
\*FractionBox[
SuperscriptBox[\(x\),
FractionBox[\(3\), \(2\)]], \(1 +
\*SuperscriptBox[\(E\), \(x -
\*FractionBox[\(\(-Eg\)*e\), \(2*k*T\)] +
\*FractionBox[\(e*ϕS\), \(k*T\)]\)]\)] \[DifferentialD]x\)\)) +
1/\!\(
\*SubsuperscriptBox[\(∫\), \(0\), \(∞\)]\(
\*FractionBox[
SuperscriptBox[\(x\),
FractionBox[\(1\), \(2\)]], \(1 +
\*SuperscriptBox[\(E\), \(x -
\*FractionBox[\(\(-Eg\)*e\), \(2*k*
T\)]\)]\)] \[DifferentialD]x\)\)*(2/3*\!\(
\*SubsuperscriptBox[\(∫\), \(0\), \(∞\)]\(
\*FractionBox[
SuperscriptBox[\(x\),
FractionBox[\(3\), \(2\)]], \(1 +
\*SuperscriptBox[\(E\), \(x +
\*FractionBox[\(Eg*e\), \(2*k*T\)] -
\*FractionBox[\(e*ϕS\), \(k*T\)]\)]\)] \[DifferentialD]x\)\) -
2/3*\!\(
\*SubsuperscriptBox[\(∫\), \(0\), \(∞\)]\(
\*FractionBox[
SuperscriptBox[\(x\),
FractionBox[\(3\), \(2\)]], \(1 +
\*SuperscriptBox[\(E\), \(x +
\*FractionBox[\(Eg*e\), \(2*k*T\)] -
\*FractionBox[\(e*ϕB\), \(k*T\)]\)]\)] \[DifferentialD]x\)\)))^(
1/2)*(-ΔS) == Δϕ -
1/2*Eg + ϕB - (ϕS - ϕB), {ϕS, -(1/2) Eg}]
ϕ = (ϕS /. Result[[1]]) - ϕB
Try CAREFULLY scrape-n-pasting this into a new fresh empty notebook and evaluating it before anything else.