Resolve "Boundary condition discretization failed" error in NDSolve?

Posted 12 days ago
89 Views
|
0 Replies
|
0 Total Likes
|
 Hi all, I'm trying to solve a system of PDEs with periodic boundary conditions using NDSolve. This works if I don't specify an initial condition (but is uninteresting, giving the trivial solution u(x,y,t)=0). I tried specifying random initial conditions (which I believe are the most physical for the system of interest), but I get these "Boundary condition discretization failed" errors.I haven't been able to find any reference to this error on a google search. What is causing it? I am enforcing this condition before feeding the initial condition into the solver. Any help is highly appreciated! (cross-posted to StackExchange to get some more eyes, as there doesn't seem to be much documentation of this problem anywhere) eps = 0.1 g1 = 1 random = Table[{x, y, RandomReal[]}, {x, 0, 2 \[Pi], 2 \[Pi]/10}, {y, 0, 2 \[Pi], 2 \[Pi]/10}]; random[[All, -1, -1]] = random[[All, 1, -1]]; random[[-1, All, -1]] = random[[1, All, -1]]; iniIF = Interpolation[Flatten[random, 1]]; ini[x_, y_] := 1 + iniIF[x, y] sols = NDSolve[{D[u[x, y, t], t] == (1 + eps)*u[x, y, t] + 2 (\[Psi][x, y, t] + \[Phi][x, y, t]) + Laplacian[\[Psi][x, y, t], {x, y}] + Laplacian[\[Phi][x, y, t], {x, y}] + g1*u[x, y, t]^2 - u[x, y, t]^3, \[Phi][x, y, t] == D[u, {y, 2}], \[Psi][x, y, t] == D[u, {x, 2}], u[x, y, 0] == ini[x, y], PeriodicBoundaryCondition[u[x, y, t], x == 2 \[Pi], Function[x, x - 2 \[Pi]]], PeriodicBoundaryCondition[u[x, y, t], y == 2 \[Pi], Function[y, y - 2 \[Pi]]]}, {u, \[Psi], \[Phi]}, {t, 0, 100}, {x, 0, 2 \[Pi]}, {y, 0, 2 \[Pi]} ] Answer