Loading [MathJax]/jax/output/HTML-CSS/jax.js

Multi-dimensional PDE problems

Finite element discretization

The derivation of Fi and Ji,j in the 1D model problem is easily generalized to multi-dimensional problems. For example, Backward Euler discretization of the PDE

(1)ut=(α(u)u)+f(u),

gives the nonlinear time-discrete PDEs

unΔt(α(un)un)+f(un)=un1,

or with un simply as u and un1 as u1,

uΔt(α(un)u)Δtf(u)=u1.

The variational form, assuming homogeneous Neumann conditions for simplicity, becomes

(2)Ω(uv+Δtα(u)uvΔtf(u)vu1v)dx.

The nonlinear algebraic equations follow from setting v=ψi and using the representation u=kckψk, which we just write as

(3)Fi=Ω(uψi+Δtα(u)uψiΔtf(u)ψiu1ψi)dx.

Picard iteration needs a linearization where we use the most recent approximation u to u in α and f:

(4)FiˆFi=Ω(uψi+Δtα(u)uψiΔtf(u)ψiu1ψi)dx.

The equations ˆFi=0 are now linear and we can easily derive a linear system for the unknown coefficients {ci}iIs by inserting u=jcjψj.

In Newton’s method we need to evaluate Fi with the known value u for u:

(5)FiˆFi=Ω(uψi+Δtα(u)uψiΔtf(u)ψiu1ψi)dx.

The Jacobian is obtained by differentiating (3) and using u/cj=ψj:

Ji,j=Ficj=Ω(ψjψi+Δtα(u)ψjuψi+Δtα(u)ψjψi
(6) Δtf(u)ψjψi)dx.

The evaluation of Ji,j as the coefficient matrix in the linear system in Newton’s method applies the known approximation u for u:

Ji,j=Ω(ψjψi+Δtα(u)ψjuψi+Δtα(u)ψjψi
(7) Δtf(u)ψjψi)dx.

Hopefully, these example also show how convenient the notation with u and u is: the unknown to be computed is always u and linearization by inserting known (previously computed) values is a matter of adding an underscore. One can take great advantage of this quick notation in software [Ref2].

Non-homogeneous Neumann conditions

A natural physical flux condition for the PDE (1) takes the form of a non-homogeneous Neumann condition

(8)α(u)un=g,xΩN,

where g is a prescribed function and ΩN is a part of the boundary of the domain Ω. From integrating Ω(αu)dx by parts, we get a boundary term

(9)ΩNα(u)uuvds.

Inserting the condition (8) into this term results in an integral over prescribed values: ΩNgvds. The nonlinearity in the α(u) coefficient condition (8) therefore does not contribute with a nonlinearity in the variational form.

Robin conditions

Heat conduction problems often apply a kind of Newton’s cooling law, also known as a Robin condition, at the boundary:

(10)α(u)uu=hT(u)(uTs(t)),xΩR,

where hT(u) is a heat transfer coefficient between the body (Ω) and its surroundings, Ts is the temperature of the surroundings, and ΩR is a part of the boundary where this Robin condition applies. The boundary integral (9) now becomes

ΩRhT(u)(uTs(T))vds,

by replacing α(u)u/u by hT(uTs). Often, hT(u) can be taken as constant, and then the boundary term is linear in u, otherwise it is nonlinear and contributes to the Jacobian in a Newton method. Linearization in a Picard method will typically use a known value in hT, but keep the u in uTs as unknown: hT(u)(uTs(t)).

Finite difference discretization

A typical diffusion equation

ut=(α(u)u)+f(u),

can be discretized by (e.g.) a Backward Euler scheme, which in 2D can be written

[Dtu=Dx¯αxDxu+Dy¯αyDyu+f(u)]ni,j.

We do not dive into details of boundary conditions now. Dirichlet and Neumann conditions are handled as in linear diffusion problems.

Writing the scheme out, putting the unknown values on the left-hand side and known values on the right-hand side, and introducing Δx=Δy=h to save some writing, one gets

uni,jΔth2(12(α(uni,j)+α(uni+1,j))(uni+1,juni,j)12(α(uni1,j)+α(uni,j))(uni,juni1,j)+12(α(uni,j)+α(uni,j+1))(uni,j+1uni,j)12(α(uni,j1)+α(uni,j))(uni,juni1,j1))Δtf(uni,j)=un1i,j

This defines a nonlinear algebraic system A(u)u=b(u). A Picard iteration applies old values u in α and f, or equivalently, old values for u in A(u) and b(u). The result is a linear system of the same type as those arising from ut=(α(x)u)+f(x,t).

Newton’s method is as usual more involved. We first define the nonlinear algebraic equations to be solved, drop the superscript n, and introduce u1 for un1:

Fi,j=uni,jΔth2(12(α(uni,j)+α(uni+1,j))(uni+1,juni,j)12(α(uni1,j)+α(uni,j))(uni,juni1,j)+12(α(uni,j)+α(uni,j+1))(uni,j+1uni,j)12(α(uni,j1)+α(uni,j))(uni,juni1,j1))Δtf(uni,j)un1i,j=0.

It is convenient to work with two indices i and j in 2D finite difference discretizations, but it complicates the derivation of the Jacobian, which then gets four indices. The left-hand expression of an equation Fi,j=0 is to be differentiated with respect to each of the unknowns ur,s (short for unr,s), rIx, sIy,

Ji,j,r,s=Fi,jur,s.

Given i and j, only a few r and s indices give nonzero contribution since Fi,j contains ui±1,j, ui,j±1, and ui,j. Therefore, Ji,j,r,s is very sparse and we can set up the left-hand side of the Newton system as

Ji,j,r,sδur,s=Ji,j,i,jδui,j+Ji,j,i1,jδui1,j+Ji,j,i+1,jδui+1,j+Ji,j,i,j1δui,j1+Ji,j,i,j+1δui,j+1

The specific derivatives become

Ji,j,i1,j=Fi,jui1,j=Δth2(α(ui1,j)(ui,jui1,j)+α(ui1,j)(1))Ji,j,i+1,j=Fi,jui+1,j=Δth2(α(ui+1,j)(ui+1,jui,j)α(ui1,j))Ji,j,i,j1=Fi,jui,j1=Δth2(α(ui,j1)(ui,jui,j1)+α(ui,j1)(1))Ji,j,i,j+1=Fi,jui,j+1=Δth2(α(ui,j+1)(ui,j+1ui,j)α(ui,j1))

The Ji,j,i,j entry has a few more terms. Inserting u for u in the J formula and then forming Jδu=F gives the linear system to be solved in each Newton iteration.

Continuation methods

Picard iteration or Newton’s method may diverge when solving PDEs with severe nonlinearities. Relaxation with ω<1 may help, but in highly nonlinear problems it can be necessary to introduce a continuation parameter Λ in the problem: Λ=0 gives a version of the problem that is easy to solve, while Λ=1 is the target problem. The idea is then to increase Λ in steps, Λ0=0,Λ1<<Λn=1, and use the solution from the problem with Λi1 as initial guess for the iterations in the problem corresponding to Λi.

The continuation method is easiest to understand through an example. Suppose we intend to solve

(||u||qu)=f,

which is an equation modeling the flow of a non-Newtonian fluid through i channel or pipe. For q=0 we have the Poisson equation (corresponding to a Newtonian fluid) and the problem is linear. A typical value for pseudo-plastic fluids may be qn=0.8. We can introduce the continuation parameter Λ[0,1] such that q=qnΛ. Let {Λ}n=0 be the sequence of Λ values in [0,1], with corresponding q values {q}n=0. We can then solve a sequence of problems

(||u||qu)=f,=0,,n,

where the initial guess for iterating on u is the previously computed solution u1. If a particular Λ leads to convergence problems, one may try a smaller increase in Λ: Λ=12(Λ1+Λ), and repeat halving the step in Λ until convergence is reestablished.