I am trying to solve Eq.(3) from (https://www.sciencedirect.com/science/article/pii/S0378437113002161 or https://sci-hub.se/https://doi.org/10.1016/j.physa.2013.03.013 ). $$ i\frac{\partial\phi}{\partial t}=(-\frac{\partial^2}{\partial x^2}+\frac{x^2}{4}-\frac{|\phi|^2}{x^2}-2i\xi\frac{|\phi|^4}{x^4}+i\frac{\Gamma}{2})\phi $$ $\phi(0)=\phi(\infty)=0$
By switching off the nonconservative terms, a stable solution is obtained. By turning on the nonconservative terms, they saw the dynamical collapse. They have used $\Gamma=0.15;\Delta x=0.004;\Delta t=0.001;l=(0:40);\xi=0.001$. My goal is to obtain the phase plot in fig.(1) between $X(t)=\int_0^\infty{x^2|\phi(x,t)|^2dx}$ vs $\frac{dX(t)}{dt}$.
I solved the equation using imaginary time propagation method without the nonconservative terms.
Needs["NDSolve`FEM`"]; l = 40; finalt = 1; dt = 1/1000; \[CapitalGamma] = 0.15; \[Zeta] = 0.001; g = 1; pse[x_, t_] := Exp[-((x - 0.3)/0.05)^2]; pnumber = NIntegrate[Abs[pse[x, 0]]^2, {x, 0, l}] pot[x_] := x^2/4; Psi[0][x_] := pse[x, 0]; k[0] = 1; Do[Psi[i] = Quiet@NDSolveValue[{(\[Psi][x] - k[i - 1] Psi[i - 1][x])/dt == Laplacian[\[Psi][x], {x}] + g Abs[k[i - 1] Psi[i - 1][x]]^2 \[Psi][x]/x^2 - pot[x] \[Psi][x], DirichletCondition[\[Psi][x] == 0, True]}, \[Psi], {x, 0, l}, Method -> {"FiniteElement", InterpolationOrder -> {\[Psi] -> 2}, "MeshOptions" -> {"MaxCellMeasure" -> 0.01}}]; num[i] = NIntegrate[Abs[Psi[i][x]]^2, {x, 0, l}]; k[i] = Sqrt[pnumber/num[i]], {i, 1, finalt/dt}] // AbsoluteTiming The solution
Plot[Evaluate[ Table[Abs[k[1000] Psi[1000][x]]^2, {i, 100, 200, 20}]], {x, 0, 5}, PlotRange -> All] Then using the solution and switching on the nonconservative terms The dynamics can be seen in Real time
Psi1[0][x_] := Abs[k[1000] Psi[1000][x]]; Do[Psi1[i] = Quiet@NDSolveValue[{I (\[Phi][x] - Psi1[i - 1][x])/ dt == -Laplacian[\[Phi][x], {x}] - g Abs[Psi1[i - 1][x]]^2 \[Phi][x]/x^2 + pot[x] \[Phi][x] - 2 I \[Zeta] Abs[Psi1[i - 1][x]]^4 \[Phi][x]/x^4 + I \[CapitalGamma] \[Phi][x]/2, DirichletCondition[\[Phi][x] == 0, True]}, \[Phi], {x, 0, l}, Method -> {"FiniteElement", InterpolationOrder -> {\[Phi] -> 2}, "MeshOptions" -> {"MaxCellMeasure" -> 0.01}}];, {i, 1, 1000}] // AbsoluteTiming The dynamics
data = Flatten[ Evaluate@Table[{i, x, Abs[Psi1[i][x]]^2}, {i, 1, 2000}, {x, 0, 40}], 1]; ListDensityPlot[data, ColorFunction -> "SolarColors", FrameLabel -> Automatic, AspectRatio -> 1/2, PlotLegends -> Automatic] The calculation for phase plot
Needs["NumericalDifferentialEquationAnalysis`"]; gg = GaussianQuadratureWeights[1000, 0, 40]; point = gg[[All, 1]]; weight = gg[[All, 2]]; rms = Table[{t, Sqrt[weight . Table[Evaluate[x^2 Abs[Psi1[t][x]]^2], {x, point}]]}, {t, 0, 1000}]; x\[Tau] = Interpolation[rms, InterpolationOrder -> 3]; dx\[Tau][t_] = D[x\[Tau][t], {t, 1}]; Variation of $X(t)$ and $\frac{dX}{dt}$ with $t$
Plot[{x\[Tau][t], dx\[Tau][t]}, {t, 0, 2000}, PlotRange -> All, PlotLegends -> "Expressions"] The phase plot
ParametricPlot[{x\[Tau][t], dx\[Tau][t]}, {t, 0, 2000}, PlotRange -> All] 





