I tried to solve the Boltzmann equation in 2 spatial dimensions with NDSolve and the method of lines. In the first call of NDSolve in the attached Mathematica notebook the computation time jumps from 3 minutes for MinPoints -> 19 to more than 5 hours for MinPoints -> 20. What is the reason for this? What can I do to limit the computation time?
pde = D[f[t, x, y, kx, ky],
t] + (v.Grad[f[t, x, y, kx, ky], {x, y}]) +
1/hbar*(F.Grad[f[t, x, y, kx, ky], {kx, ky}]) == 0
ics = {f[0, x, y, kx, ky] ==
f0[hbar^2*((kx - kxShift)^2 + ky^2)/(2*m), mu, T],
f[t, -L/2, y, kx, ky] ==
f0[hbar^2*((kx - kxShift)^2 + ky^2)/(2*m), mu, T],
f[t, L/2, y, kx, ky] ==
f0[hbar^2*((kx - kxShift)^2 + ky^2)/(2*m), mu, T],
f[t, x, -L/2, kx, ky] ==
f0[hbar^2*((kx - kxShift)^2 + ky^2)/(2*m), mu, T],
f[t, x, L/2, kx, ky] ==
f0[hbar^2*((kx - kxShift)^2 + ky^2)/(2*m), mu, T]}
parameters = {hbar -> 1.054588664*10^-34, e -> 1.60218892*10^-19,
kB -> 1.380662*10^-23, T -> 300., mu -> 2.348*10^-18,
m -> 9.109383*10^-31, kxShift -> 8.0*10^9, xE -> 0, yE -> 0,
tau -> 0.3}
borders = {L -> 40.0, kmax -> 4.*10^10}
(sol1 = NDSolve[Union[{pde}, ics] /. parameters /. borders,
f, {t, 0, 1}, {x, -L/2, L/2} /. borders, {y, -L/2, L/2} /.
borders, {kx, -kmax, kmax} /. borders, {ky, -kmax, kmax} /.
borders,
Method -> {"MethodOfLines", "TemporalVariable" -> t,
"SpatialDiscretization" -> {"TensorProductGrid",
"MinPoints" -> 19}}, WorkingPrecision -> MachinePrecision,
PrecisionGoal -> 4, AccuracyGoal -> 12]) // AbsoluteTiming
Attachments: