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.

2. forgetting that the spatial coordinates are denoted by a vector x,<br />

3. forgetting that the x, y, and z coordinates in space correspond to x[0],<br />

x[1], and x[2], respectively.<br />

Failure to initialize parameters in the expressions lead to a compilation error<br />

where this problem is explicitly pointed out.<br />

Problems in the Solve Step. Sometimes the problem lies in the solve step<br />

where a variational form is turned into a system of algebraic equations. The<br />

error message ”Unable to extract all indicies” points to a problem with the<br />

variational form. Common errors include<br />

1. missing either the TrialFunction or the TestFunction object,<br />

2. no terms without TrialFunction objects.<br />

3. mathematically invalid operations in the variational form.<br />

The first problem implies that one cannot make a matrix system or system of<br />

nonlinear algebraic equations out of the variational form. The second problem<br />

means that there is no ”right-hand side” terms in the PDE with known quantities.<br />

Sometimes this is seemingly the case mathematically because the ”righthandside”iszero.<br />

VariationalformsmustrepresentthiscaseasConstant(0)*v*dx<br />

where v is a TestFunction object. An example of the third problem is to take<br />

the inner product of a scalar and a vector (causing in this particular case the<br />

error message to be ”Shape mismatch”).<br />

All Programs Fail to Compile. On Ubuntu Linux unfinished updates of<br />

the system (run by Update Manager) may causes all compilations to fail. When<br />

previously working programs no longer can be compiled, reboot Ubuntu, run<br />

the Update Manager, and wait until it has finished. Try compiling a working<br />

program again.<br />

7.8 Books on the Finite Element Method<br />

There are a large number of books on the finite element method. The books<br />

typically fall in either of two categories: the abstract mathematical version<br />

of the method and the engineering ”structural analysis” formulation. <strong>FEniCS</strong><br />

builds heavily on concepts in the abstract mathematical exposition. An easyto-read<br />

book, which provides a good general background for using <strong>FEniCS</strong>,<br />

is Gockenbach [8]. The book by Donea and Huerta [5] has a similar style,<br />

but aims at readers with interest in fluid flow problems. Hughes [10] is also<br />

highly recommended, especially for those interested in solid mechanics and heat<br />

transfer applications.<br />

Readers with background in the engineering ”structural analysis” version of<br />

the finite element method may find Bickford [1] as an attractive bridge over to<br />

89

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

Saved successfully!

Ooh no, something went wrong!