I am trying to solve the coupled PDEs for functions u, v and w. The main problem I am facing is that I am unable to understand how to input boundary condition of this type in NDSolve: D[u[x, y], y] + D[v[x, y], x] == (-u[x, y]/constant) /. y -> ymax
I read about NeumannValue in the Mathematica Documentation, but still could not realize about implementing it in my context.
This is my code:
(*Equations: *)
eqn1 := D[u[x, y], x] + D[v[x, y], y] == 0
eqn2 := \[Alpha]*D[w[x, y], x] + \[Beta] Laplacian[u[x, y], {x, y}] ==
u[x, y]
eqn3 := \[Alpha]*D[w[x, y], y] + \[Beta] Laplacian[v[x, y], {x, y}] ==
v[x, y]
(* CONSTANTS: *)
xmin := -50
xmax := 50
ymin := -5
ymax := 5
(* \[CapitalOmega] is the area we are working on*)
\[CapitalOmega] = Rectangle[{xmin, ymin}, {xmax, ymax}];
(*Boundary Conditions: *)
bcnd1 := v[x, ymax] == 0
bcnd2 := v[x,
ymin] == \[Gamma] DiracDelta[x + x0] - \[Gamma] DiracDelta[
x - x0]
bcnd3 := D[u[x, y], y] + D[v[x, y], x] == -u[x, y]/\[Delta] /.
y -> ymax
bcnd4 := D[u[x, y], y] + D[v[x, y], x] == u[x, y]/\[Delta] /.
y -> ymin
(*other boundary condition to determine w*)
bcnd5 := w[xmax, y] == w0
bcnd6 := w[-xmax, y] == w0
solN = NDSolve[{eqn1, eqn2, eqn3, bcnd1, bcnd2, bcnd3, bcnd4, bcnd5,
bcnd6} /. {\[Alpha] -> 1, \[Beta] -> 1, \[Gamma] -> 1, \[Delta] ->
1, x0 -> 4, w0 -> 0.1}, {w, u,
v}, {x, y} \[Element] \[CapitalOmega]];
(*Output: *)
(*
NDSolve::fembdnl: The dependent variable in (u^(0,1))[x,5]+(v^(1,0))[x,5]==-u in the boundary condition DirichletCondition[(u^(0,1))[x,5]+(v^(1,0))[x,5]==-u,y==5.] needs to be linear.
NDSolve::fembdnl: The dependent variable in (u^(0,1))[x,5]+(v^(1,0))[x,5]==-u in the boundary condition DirichletCondition[(u^(0,1))[x,5]+(v^(1,0))[x,5]==-u,y==5.] needs to be linear.
*)
In the end, I have to obtain the vector {u[x,y],v[x,y]} and the function w[x,y] and plot it in the region [CapitalOmega] I have spent much time to try and do this, but could not. I will be very grateful, if somebody helps me to do so.
[x,ymin] == \[Gamma] DiracDelta[x + x0] - \[Gamma] DiracDelta[x - x0]
supposed to be physically? These are the BC NDSolve seems to complain about. seeref/message/NDSolve/fembdnl
$\endgroup$u
? $\endgroup$bcnd2 := v[x, ymin] == \[Gamma] 1/(Sqrt[2 Pi]*s) Exp[-(x + x0)^2/(2 s^2)] - \[Gamma] 1/(Sqrt[2 Pi]*s) Exp[-(x - x0)^2/(2 s^2)] /. s -> 0.01
$\endgroup$