18.01.2013 Views

Chapter 8 Configuring Fluidity - The Applied Modelling and ...

Chapter 8 Configuring Fluidity - The Applied Modelling and ...

Chapter 8 Configuring Fluidity - The Applied Modelling and ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

26 Numerical discretisation<br />

3.2.1.1 Weak form<br />

Development of the finite element method begins by writing the equations in weak form. <strong>The</strong> weak<br />

form of the advection-diffusion equation is obtained by pre-multiplying it with a test function ϕ <strong>and</strong><br />

integrating over the domain Ω, such that<br />

� � �<br />

∂c<br />

ϕ + u · ∇c − ∇ · µ · ∇c = 0. (3.4)<br />

∂t<br />

Ω<br />

Integrating the advection <strong>and</strong> diffusion terms by parts yields<br />

�<br />

ϕ ∂c<br />

�<br />

− ∇ϕ · uc + ∇ϕ · µ · ∇c +<br />

∂t<br />

n · uc − n · µ · ∇c = 0. (3.5)<br />

Ω<br />

For simplicity sake let us first assume the boundaries are closed (u · n = 0) <strong>and</strong> we apply a homogeneous<br />

Neumann boundary condition everywhere, such that ∂c/∂n = 0, which gives<br />

�<br />

Ω<br />

∂Ω<br />

ϕ ∂c<br />

− ∇ϕ · uc + ∇ϕ · µ · ∇c = 0. (3.6)<br />

∂t<br />

Note that due to the Neumann boundary condition the boundary term has dropped out. <strong>The</strong> tracer<br />

field c is now called a weak solution of the equations if (3.6) holds true for all ϕ in some space of test<br />

functions V . <strong>The</strong> choice of a suitable test space V is dependent on the equation (for more details see<br />

Elman et al. [2005]).<br />

An important observation is that (3.5) only contains first derivatives of the field c, so that we can<br />

now include solutions that do not have a continuous second derivative. For these solutions the<br />

original equation (2.44c) would not be well-defined. <strong>The</strong>se solutions are termed weak as they do not<br />

have sufficient smoothness to be classical solutions to the problem. All that is required for the weak<br />

solution is that the first derivatives of c can be integrated along with the test function. A more precise<br />

definition of this space, the Sobolev space, can again be found Elman et al. [2005].<br />

3.2.1.2 Finite element discretisation<br />

Instead of looking for a solution in the entire function (Sobolev) space, in finite element methods<br />

discretisation is performed by restricting the solution to a finite-dimensional subspace. Thus the<br />

solution can be written as a linear combination of a finite number of functions, the trial functions ϕi<br />

that form a basis of the trial space, defined such that<br />

c(x) = �<br />

ciϕi((x)).<br />

i<br />

<strong>The</strong> coefficients ci can be written in vector format. <strong>The</strong> dimension of this vector equals the dimension<br />

of the trial space. In the sequel any function in this way represented as a vector will be denoted as c.<br />

Since the set of trial functions is now much smaller (or rather finite as opposed to infinitedimensional),<br />

we also need a much reduced set of test functions for the equation in weak form (3.6)<br />

in order to find a unique solution. A common choice is, in fact, to choose the same test <strong>and</strong> trial space.<br />

Finite element methods that make this choice are referred to as Galerkin methods — the discretisation<br />

can be seen as a so called Galerkin projection of the weak equation to a finite subspace.<br />

<strong>The</strong>re are many possibilities for choosing the finite-dimensional trial <strong>and</strong> test spaces. A straightforward<br />

choice is to restrict the functions to be polynomials of degree n � N within each element.<br />

<strong>The</strong>se are referred to as PN discretisations. As we generally need functions for which the first derivatives<br />

are integrable, a further restriction is needed. If we allow the functions to be any polynomial<br />

of degree n � N within the elements the function can be discontinuous in the boundary between<br />

elements. Continuous Galerkin methods therefore restrict the test <strong>and</strong> trial functions to arbitrary

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

Saved successfully!

Ooh no, something went wrong!