Skip to article frontmatterSkip to article content

Nonlinear elliptic PDEs

Many nonlinear elliptic PDEs include references to the Laplacian operator.

More generally, we want to solve the nonlinear equation

ϕ(x,y,u,ux,uy,uxx,uyy)=0\phi(x,y,u,u_x,u_y,u_{xx},u_{yy}) = 0

in the interior of a rectangle RR, subject to the Dirichlet condition

u(x,y)=g(x,y)u(x,y) = g(x,y)

on the boundary of RR.

13.4.1Implementation

In order to solve for as few unknowns as possible, we use a Chebyshev discretization of the domain. The core idea is to formulate collocation equations at the grid points based on discrete approximations of (13.4.2) and (13.4.3). If the PDE is nonlinear, then these equations are also nonlinear and are to be solved by a quasi-Newton iteration. Function 13.4.1 is our implementation.

Function 13.4.1 first defines the discretization and then computes all the values of gg at the boundary nodes. It uses Function 4.6.3 as the nonlinear solver, and it translates back and forth between vector and grid shapes for the unknowns. After the discrete PDE is collocated at the grid points, the boundary terms are replaced by the boundary residual.

Lines 38–41, which produce the value returned by Function 13.4.1, provide a function that evaluates the numerical solution anywhere in the domain, as is explained next.

13.4.2Off-grid evaluation

A Chebyshev grid is clustered close to the boundary of the domain, and the grid values may be accurate even for modest grid sizes. As a result, simple piecewise interpolation to evaluate off the grid, as is done by plotting routines, may be unacceptably inaccurate. Instead, we should use the global polynomial interpolation that is foundational to the Chebyshev spectral method.

Let U\mathbf{U} be a matrix of solution values on the Chebyshev grid, defining a function u(x,y)u(x,y), and let (ξ,η)(\xi,\eta) be a point where we want to evaluate u(x,y)u(x,y). Column uj\mathbf{u}_j of the grid matrix represents values spanning all the xix_i while yy is fixed at yjy_j. Therefore, we can define an interpolating polynomial pj(x)p_j(x) based on the values in uj\mathbf{u}_j.

Now let vj=pj(ξ)v_j = p_j(\xi) for j=1,,nj=1,\ldots,n. The vector v\mathbf{v} is a discretization of u(ξ,y)u(\xi,y) at the Chebyshev nodes in yy. It defines an interpolating polynomial q(y)q(y), and finally we have u(ξ,η)=q(η)u(\xi,\eta)=q(\eta). You can think of the total process as reducing one dimension at a time through the action of evaluating a polynomial interpolant at a point.

The function returned by Function 13.4.1 performs interpolation as described above, using a helper function chebinterp (not shown). The helper performs the evaluation of a polynomial interpolant in one variable using a modified implementation of Function 9.2.1 that exploits the barycentric weights for Chebyshev nodes given in (9.3.3).[1]

13.4.3Exercises

  1. (a) Solve for the steady state of

    ut=uyx2+ϵ(uxx+uyy)u_t = - u_y - x - 2 + \epsilon ( u_{xx} + u_{yy} )

    for ϵ=1\epsilon=1 in [1,1]×[1,1][-1,1]\times[-1,1], subject to a homogeneous Dirichlet boundary condition. Use m=n=30m=n=30 points and plot the solution.

    (b) Repeat part (a) for ϵ=0.1\epsilon=0.1, which weakens the influence of diffusion relative to advection.

  2. ⌨ A soap film stretched on a wire frame above the (x,y)(x,y) plane assumes a shape u(x,y)u(x,y) of minimum area and is governed by

    div(gradu1+ux2+uy2)=0 in region R,u(x,y)=g(x,y) on the boundary of R.\begin{align*} \operatorname{div} \, \left( \frac{\operatorname{grad} u}{\sqrt{1 + u_x^2 + u_y^2}} \right) &= 0 \text{ in region $R$},\\ u(x,y) &= g(x,y) \text{ on the boundary of $R$}. \end{align*}

    Solve the equation on [1,1]2[-1,1]^2 with boundary value u(x,y)=tanh(y2x)u(x,y)=\tanh(y-2x), and make a surface plot of the result. (Hints: Don’t try to rewrite the PDE. Instead, modify Function 13.4.1 so that ϕ is called with arguments (U,Dx,Dy), and compute the PDE in the form given. Also, since convergence is difficult in this problem, use the boundary data over the whole domain as the initial value for levenberg.)

  3. Modify Function 13.4.1 to solve (13.4.2) on [a,b]×[c,d][a,b] \times [c,d] with the mixed boundary conditions

    u=0, if x=a or y=d,un=0, if x=b or y=c,u = 0, \text{ if } x=a \text{ or } y = d, \qquad \frac{\partial u}{\partial n} = 0, \text{ if } x=b \text{ or } y = c,

    where n\frac{\partial}{\partial n} is the derivative in the direction of the outward normal. Either condition can be used at a corner point. (Hint: Define index vectors for each side of the domain.) Apply your solver to the PDE Δu+sin(3πx)=0\Delta u + \sin(3\pi x) = 0 on [0,1]2[0,1]^2, and make a contour plot of the solution. Why do the level curves intersect two of the sides only at right angles?

Footnotes
  1. The interpolation algorithm in Function 13.4.1 is inefficient when uu is to be evaluated on a finer grid, as for plotting. A more careful version could re-use the same values vj=pj(ξ)v_j = p_j(\xi) for multiple values of η.

References
  1. Pelesko, J. A., & Driscoll, T. A. (2006). The Effect of the Small-Aspect-Ratio Approximation on Canonical Electrostatic MEMS Models. Journal of Engineering Mathematics, 53(3–4), 239–252. 10.1007/s10665-005-9013-2