Nonlinear elliptic PDEs

Generally:

ϕ(x,y,u,ux,uy,uxx,uyy)=0,(x,y)(a,b)×(c,d). with boundary condition u(x,y)=g(x,y).

  • core: formulate collocation equations at grid points based on discrete approx and solve by quasi-Newton method
  • read elliptic function
  • off-grid evaluation done by global polynomial interpolation:
    • U=mtx(u)
    • interpolate across column uj to get vj=pj(ξ)
    • then interpolate over vj and nodes in y

Demo: micromechanical deflector

λ = 1.5;
ϕ = (X,Y,U,Ux,Uxx,Uy,Uyy) -> @. Uxx + Uyy - λ/(U+1)^2;
g = (x,y) -> 0; 
u = FNC.elliptic(ϕ,g,15,[0,2.5],8,[0,1]);

x = range(0,2.5,length=100);
y = range(0,1,length=50);
U = [u(x,y) for x in x, y in y];
contourf(x,y,U',color=:viridis,aspect_ratio=1,
    xlabel=L"x",ylabel=L"y",zlabel=L"u(x,y)",
    title="Deflection of a MEMS membrane",
    right_margin=3Plots.mm)      

## check boundary is zero
x = range(0,2.5,length=100);
norm( [u(x,0) - g(x,0) for x in x], Inf )

## truncation error
[ u(x,y) for x in 0.5:0.5:2, y in 0.25:0.25:0.75 ]
u = FNC.elliptic(ϕ,g,25,[0,2.5],14,[0,1]);
[ u(x,y) for x in 0.5:0.5:2, y in 0.25:0.25:0.75 ]