I am trying to solve numerically Equation number (29) with the help of Eq.(32) and (34) from this paper https://arxiv.org/pdf/1506.03283.pdf.
for
Subscript[N, at]=10000,a=100*Subscript[a, B]
Subscript[a, dd]=132.7*Subscript[a, B],Subscript[a, B]=5.29*10^-5,
Subscript[d, ρ]=1,λ=0.5
Subscript[a, dd] = 132.7*5.29*10^-5;
a0 = 100*5.29*10^-5;
λ = 0.5;
n = 20;
xg = N[Range[n]]/(n + 1);
Subscript[d, ρ] = 1;
Nat = 10000
Subscript[h, 1 D] =
Interpolation[
Table[{Subscript[k, z],
NIntegrate[
1/(2 π (Subscript[d, ρ])^2) ((
3 ((Subscript[k, z] Subscript[d, ρ])/Sqrt[2])^2)/(
u + ((Subscript[k, z] Subscript[d, ρ])/Sqrt[2])^2) -
1) Exp[-u], {u, 0, ∞}]}, {Subscript[k, z], 1, 2,
0.005}]]
uxx[u_?VectorQ] := Module[{n = Length[u]},
FourierDST[Subscript[h, 1 D] FourierDST[u, 1], 1]]
usol = NDSolveValue[{I D[ϕ[z, t],
t] = -1/2 D[ϕ[z, t], z, z] +
1/2 λ^2 z^2 ϕ[z, t] + (
2 a Nat)/(Subscript[d, ρ])^2 Abs[ϕ[z, t]]^2 ϕ[z,
t] + 3 Subscript[a, dd] Subscript[N, at]
uxx[ϕ[z, t]] ϕ[z, t] == 0, ϕ[z, 0] ==
E^(-λ (xg)^2/2)*(λ/Pi)^(1/4), ϕ[n,
t] = ϕ[-n, t]}, ϕ, {t, 0, 20}, {z, -n, n}]
Plot3D[Abs[usol[z,t]]^2, {t, 0, 1}, {z, -a/1.5, 0}, PlotPoints -> 50,
ColorFunction -> "Rainbow"]
This code is able to find the ground state of the equation without the Last Integral Term
m = ℏ = 1;
λ = 0.5;
L = 10;
aB = 5.29*10^-5;
a0 = 100*aB;
dρ = 1;
add = 132.7*aB;
Nat = 10000;
nmax = 1000;
Δ = L/(nmax + 1);
zgrid = Range[nmax]*Δ;
W[z_] = λ*z^2/2;
Wgrid = W /@ zgrid;
groundstate[δβ_?NumericQ, κ_?NumericQ,
tolerance_: 10^-10] :=
Module[{Ke, propKin, propPot2, prop, v0, ϕ},
(* compute the diagonal elements of exp[-δβ*T] *)
Ke = Exp[-δβ*Range[nmax]^2*(π^2 ℏ^2)/(
2 m L^2)] // N;
(* propagate by a full imaginary-time-step with T *)
propKin[v_] := Normalize[FourierDST[Ke*FourierDST[v, 1], 1]];
(* propagate by a half imaginary-time-step with V *)
propPot2[v_] :=
Normalize[
Exp[-(δβ/
2)*(Wgrid + κ*Abs[v]^2/Δ)]*v];
(* propagate by a full imaginary-time-step by *)
(* H=T+V using the Trotter approximation *)
prop[v_] := propPot2[propKin[propPot2[v]]];
(* random starting point *)
v0 = Normalize@RandomVariate[NormalDistribution[], nmax];
(* propagation to the ground state *)
ϕ =
FixedPoint[prop, v0,
SameTest -> Function[{v1, v2}, Norm[v1 - v2] < tolerance]];
{ϕ}];
With[{κ = (2*a0*Nat)/(dρ)^2, δβ = 10^-4},
{ϕ} = groundstate[δβ, κ];
ListLinePlot[
Join[{{0, 0}}, {zgrid,
Abs[ϕ]^2/Δ}\[Transpose], {{L, 0}}],
PlotRange -> All]]
I tried to include the last term in the module but failed. If Anyone can help me with this...
h1D = Interpolation[
Table[{kz,
NIntegrate[
1/(2 π (dρ)^2) ((3 ((kz dρ)/Sqrt[2])^2)/(
u + ((kz dρ)/Sqrt[2])^2) - 1) Exp[-u], {u,
0, ∞}]}, {kz, 1, 2, 0.005}]]
FourierDST[h1D FourierDST[v, 1], 1]]




NDSolveandNDSolveValue. Start small. Review the examples. Type NDSolve, hover over it, press the "I" and work through the examples. Do simple ones first, take some time, then attempt to code yours. Cut and paste your code for others to review. – josh Mar 30 '22 at 12:53