I am trying to solve a simple linear differential equation for $f(x,y)$ on a square with area $L\times L =1$.
I consider $(\partial_x^2 + \partial_y^2)f + \partial_x \partial_y f = 0$ with the following boundary conditions: $\partial_x f(0,y) = 1$, $\partial_y f(x,0) = 0$, $\partial_y f(x,1) = 0$, $f(1,y) = 0$.
To solve this differential equation, I have used the NDSolveValue method as
sysf = { D[f[x, y], {x, 2}] + D[f[x, y], {y, 2}] +
D[f[x, y], x, y] ==
NeumannValue[1, x == 0] + NeumannValue[0, y == 0] +
NeumannValue[0, y == 1],
DirichletCondition[f[x, y] == 0, x == 1]};
solf = NDSolveValue[sysf,
f , {x, y} \[Element] Rectangle[{0, 0}, {1, 1}]];
fplot = ContourPlot[
Abs[solf[x, y]], {x, y} \[Element] Rectangle[{0, 0}, {1, 1}],
AxesLabel -> {x, y, Abs[f]}, PlotLabel -> "f",
ColorFunction -> "BlueGreenYellow", PlotRange -> All,
PlotLegends -> Automatic];
GraphicsRow[{fplot}]
I get no warnings or errors, but the result is clearly incorrect. The gradient normal on the boundaries $y=0$ and $y=1$ are finite, and in conflict with my enforced boundary conditions.
Apparently, NDSolveValue has ignored my NeumannValue boundary conditions, what could be the reason for this?
NeumannValue
belong to your pde-problem? $\endgroup$