I am new to solving PDE’s in Mathematica (so I think I’m making rudimentary mistakes here) and I am attempting to solve a 3-dimensional PDE with a particular initial condition.

The initial function takes the form

`f[0., x, y] == Exp[-(x^2. + y^2.) + 2*x*y] `

which looks like

whilst my PDE is of the form

`D[f[t, x, y], t] ==-I(D[f[t, x, y], {x, 2}]-D[f[t, x, y], {y, 2}])-(x-y)(D[f[t, x, y],{x, 1}]-D[f[t, x, y], {y, 1}])-((x-y)^2)f[t, x, y] `

and I’m having trouble working out how to solve this PDE with this particular initial function as I’d like to define the periodicity along the x=y line.

Thus far I have successfully solved this for the simpler initial condition of

`f[0., x, y] == Exp[-(x^2. + y^2.)] `

which looks like

and is far easier to solve

`L := 4 UX1 := D[f[t, x, y], {x, 1}] /. x -> L UX2 := D[f[t, x, y], {x, 1}] /. x -> -L UY1 := D[f[t, x, y], {y, 1}] /. y -> L UY2 := D[f[t, x, y], {y, 1}] /. y -> -L sol = f /. First@ NDSolve[{D[f[t, x, y],t] == -I (D[f[t, x, y], {x, 2}] - D[f[t, x, y], {y, 2}]) - (x - y)*(D[f[t, x, y], {x, 1}] - D[f[t, x, y], {y, 1}]) - ((x - y)^2)*f[t, x, y], f[0., x, y] == Exp[-(x^2. + y^2.)], UX1 == UX2, UY1 == UY2}, f, {t, 0., L}, {x, -L, L}, {y, -L, L}, Method -> {"MethodOfLines", "SpatialDiscretization" -> {"TensorProductGrid", "DifferenceOrder" -> "Pseudospectral"}}]; `

which can then be plotted etc. If I attempt a similar solution with my new initial function, and try to insert some of the desired periodicity, ie

`L := 4 UX1 := D[f[t, x, y], {x, 1}] /. x -> L UX2 := D[f[t, x, y], {x, 1}] /. x -> -L UY1 := D[f[t, x, y], {y, 1}] /. y -> L UY2 := D[f[t, x, y], {y, 1}] /. y -> -L sol = f /. First@ NDSolve[{D[f[t, x, y],t] == -I (D[f[t, x, y], {x, 2}] - D[f[t, x, y], {y, 2}]) - (x - y)*(D[f[t, x, y], {x, 1}] - D[f[t, x, y], {y, 1}]) - ((x - y)^2)*f[t, x, y], f[0., x, y] == Exp[-(x^2. + y^2.)+2*x*y], UX1 == UY1, UX2 == UY2}, f, {t, 0., L}, {x, -L, L}, {y, -L, L}, Method -> {"MethodOfLines", "SpatialDiscretization" -> {"TensorProductGrid", "DifferenceOrder" -> "Pseudospectral"}}]; `

I receive the error

`NDSolve::bcedge: Boundary condition (f^(0,1,0))[t,4,y]==(f^(0,0,1))[t,x,4] is not specified on a single edge of the boundary of the computational domain. >> `

Which seems to suggest that defining the boundary conditions in the manner that I am trying to solve this with isn’t possible. Is there any way to solve this PDE in Mathematica the way I’d like to without rotating the coordinates?