Follow from the discussion 2D+1 PDE problem
$\partial_t u(t,x,y)=-y\partial_{x}u+\partial_{y}\left[γ(1+sin(3x)) yu+A sin(3x)u+γkT(1+sin(3x))\partial_{y}u\right]$
with $u(0,x,y)=\frac{1}{2\pi}e^{-(x^2+y^2)/2}$
and periodic boundary condition:
$u(t,-\pi,y)=u(t,\pi,y)$
In $y$-direction, it is unbounded.
The code and result are shown below
a = 1;
T = 50;
ωb = -5; ωt = 5;
A = 1;
γ = .1;
kT = 0.1;
φ = 0;
mol[n_Integer, o_: "Pseudospectral"] := {"MethodOfLines",
"SpatialDiscretization" -> {"TensorProductGrid", "MaxPoints" -> n,
"MinPoints" -> n, "DifferenceOrder" -> o}}
With[{u = u[t,θ, ω]},
eq = D[u, t] == -D[ω u,θ] -
D[-A Sin[3θ] u, ω] + γ (1 +
Sin[3θ]) kT D[
u, {ω, 2}] + γ (1 +
Sin[3θ]) D[ω u, ω];
ic = u == E^(-((ω^2 +θ^2)/(2 a^2))) 1/(2 π a) /.
t -> 0];
ufun = NDSolveValue[{eq, ic,
u[t, -π, ω] == u[t, π, ω],
u[t,θ, ωb] == 0, u[t,θ, ωt] == 0},
u, {t, 0,
T}, {θ, -π, π}, {ω, ωb, ωt},
Method -> mol[35], MaxSteps -> Infinity]; // AbsoluteTiming
plots = Table[
Plot3D[Abs[
ufun[t,θ, ω]], {θ, -π, π}, {
ω, ωb, ωt}, AxesLabel -> Automatic,
PlotPoints -> 30, BoxRatios -> {Pi, ωb, 1},
ColorFunction -> "LakeColors", PlotRange -> All], {t, 0, T,
1}]; // AbsoluteTiming
ListAnimate[plots]
The problem is if we increase the coefficient $A$ then the program is no longer stable. Simply refine the grid points are still not able to solve the problem entirely. Perhaps there is a smarter way to sample the grid points and time step, or?
Result for $A=2$:
It's crazy..
Btw, since the x-direction is periodic but y is not, is it possible to use pseudospectral in x and keep the default setting for y?
Update (8/22)
Increasing A to 3 with MaxPoints=71 and MinPoints=51 still fails to converge. But my friend he can solve A=8 by Julia code with much fewer points less than a minute. There must be something wrong for my grids...
Note:
The function u should be localized in 3 minima of potential $-\cos{3\theta}$.
mol[n_Integer, o_: "Pseudospectral"] := {"MethodOfLines", "SpatialDiscretization" -> {"TensorProductGrid", "MaxPoints" -> 2*n, "MinPoints" -> n, "DifferenceOrder" -> o}}
$\endgroup$ – Alex Trounev Aug 22 '18 at 2:01