19.06.2015 Views

A FEniCS Tutorial - FEniCS Project

A FEniCS Tutorial - FEniCS Project

A FEniCS Tutorial - FEniCS Project

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The variational formulation of our model problem reads: Find u ∈ V such<br />

that<br />

F(u;v) = 0 ∀v ∈ ˆV, (40)<br />

where<br />

and<br />

∫<br />

F(u;v) =<br />

ˆV = {v ∈ H 1 (Ω) : v = 0 on x 0 = 0 and x 0 = 1},<br />

Ω<br />

q(u)∇u·∇vdx, (41)<br />

V = {v ∈ H 1 (Ω) : v = 0 on x 0 = 0 and v = 1 on x 0 = 1}.<br />

The discrete problem arises as usual by restricting V and ˆV to a pair of discrete<br />

spaces. As usual, we omit any subscript on discrete spaces and simply say V and<br />

ˆV arechosenfinitedimensionalaccordingtosomemeshwithsomeelementtype.<br />

Similarly, we let u be the discrete solution and use ue for the exact solution if<br />

it becomes necessary to distinguish between the two.<br />

The discrete nonlinear problem is then wirtten as: find u ∈ V such that<br />

F(u;v) = 0 ∀v ∈ ˆV, (42)<br />

with u = ∑ N<br />

j=1 U jφ j . Since F is a nonlinear function of u, the variational<br />

statement gives rise to a system of nonlinear algebraic equations. [[[ <strong>FEniCS</strong><br />

can be used in alternative ways for solving a nonlinear PDE problem. We shall<br />

in the following subsections go through four solution strategies:<br />

1. a simple Picard-type iteration,<br />

2. a Newton method at the algebraic level,<br />

3. a Newton method at the PDE level, and<br />

4. an automatic approach where <strong>FEniCS</strong> attacks the nonlinear variational<br />

problem directly.<br />

The ”black box” strategy 4 is definitely the simplest one from a programmer’s<br />

point of view, but the others give more manual control of the solution process<br />

for nonlinear equations (which also has some pedagogical advantages, especially<br />

for newcomers to nonlinear finite element problems).<br />

2.1 Picard Iteration<br />

Picard iteration is an easy way of handling nonlinear PDEs: we simply use<br />

a known, previous solution in the nonlinear terms so that these terms become<br />

linear in the unknown u. The strategy is also known as the method of successive<br />

substitutions. For our particular problem, we use a known, previous solution<br />

in the coefficient q(u). More precisely, given a solution u k from iteration k, we<br />

49

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!