+ All Categories
Home > Documents > FEM Presentation

FEM Presentation

Date post: 14-Apr-2017
Category:
Upload: katie-davis
View: 219 times
Download: 0 times
Share this document with a friend
31
The Finite Element Method for coupled diffusion-reaction equations Katie Davis Supervisor: N. Ellis
Transcript
Page 1: FEM Presentation

The Finite Element Method for coupled diffusion-reaction

equationsKatie Davis

Supervisor: N. Ellis

Page 2: FEM Presentation

Contents• Introduction

• Aims

• Project work and results

• Conclusions

Page 3: FEM Presentation

Introduction

The one-dimension diffusion reaction equation can be written in terms of a dependent variable, , as

Where is the coefficient of diffusion and are the reaction terms is gas concentration

Page 4: FEM Presentation

IntroductionThe finite element method cuts a structure into several elements then reconnects the elements at nodes that hold the elements back together resulting in sets of simultaneous algebraic equations. This project uses the finite element method to solve the diffusion - reaction equation and also to solve the coupled equations:

where and are separate gases or liquids.

Page 5: FEM Presentation

Aims of the projectThe aims of the project are:

• To solve the one-dimension diffusion-reaction equation analytically• To solve the same equation using the Finite Element method and

compare results with the analytical solutions• To use the Finite Element method to find the numerical solution of

coupled diffusion-reaction equations

Page 6: FEM Presentation

Analytical Solutions for the diffusion – reaction equationThe solution to the four differential equations associated with the one-dimension diffusion-reaction equation have been calculated using the boundary conditions and .

4 separate cases:

Page 7: FEM Presentation

The first equation to be solved was

Page 8: FEM Presentation

The general solution for this equation is

and when the boundary conditions are applied, the solutions are

Page 9: FEM Presentation
Page 10: FEM Presentation

The second equation to be solved was

The general solution for this equation is

When the boundary conditions were applied, these solutions were obtained

Page 11: FEM Presentation
Page 12: FEM Presentation

After solving the homogeneous equations, the inhomogeneous equation can now be solved, this is

for and

Page 13: FEM Presentation

For the case when the general solution is

When the boundary conditions are applied, the solutions are

Page 14: FEM Presentation

By varying the values of and we can see that gas removal takes place in this reaction, but this model only works for certain values. On the second graph the curve goes below the -axis, this would mean that there is a negative concentration, which is physically impossible.

Page 15: FEM Presentation

The final case to be solved was

Page 16: FEM Presentation

We can say that the general solution for this equation is

After applying the boundary conditions, the values of A and B are found to be

Page 17: FEM Presentation
Page 18: FEM Presentation

The Finite Element Method for the diffusion – reaction equationThe finite element method uses three element contribution matrices to form a global system equation. These matrices are:

1. The element mass matrix

where is the element number and is the element length.

Page 19: FEM Presentation

2. The element stiffness matrix

3. The right hand side vector

Page 20: FEM Presentation

These matrices form the global system equation

where is a vector of the same order as the total nodes in the system.

MATLAB can be used to solve this equation for

Page 21: FEM Presentation

No. of Elements Finite Element Method solution4 0.3294228 0.33002816 0.33017832 0.33021664 0.330225128 0.330228256 0.330228512 0.3302281024 0.3302282048 0.330228

This table shows values of using and using an increasing number of elements. These values can be compared with the analytical solutions and an error term can be calculated.

Page 22: FEM Presentation

No. of elements Exact Solution FEM Solution Error4 0.330228 0.329442 0.0008078 0.330228 0.330028 0.00020016 0.330228 0.330178 0.00005032 0.330228 0.330216 0.00001364 0.330228 0.330225 0.000003128 0.330228 0.330228 0.000001256 0.330228 0.330228 0.000000512 0.330228 0.330228 0.0000001024 0.330228 0.330228 0.0000002048 0.330228 0.330228 0.000000This table shows results for and . As the number of elements increases, the error decreases and the finite element method solution converges to the analytical solution.

Page 23: FEM Presentation

The Finite Element Method for the coupled diffusion – reaction equationsThe finite element method can now be used to to solve these coupled diffusion – reaction equations

where and are separate gases or liquids.

Page 24: FEM Presentation

As there are two equations in this system, extra terms need to be added to calculate values of and . The solution of is calculated using the previous solution of , and the solution of is found by using the previous value of . Alterations must be made to the element mass matrix to accommodate this change.

When solving for , the element mass matrix becomes

Page 25: FEM Presentation

When solving for , the element mass matrix becomes

where denotes the previous solution for and , and represents the current values of and .

Using MATLAB, solutions of and at each node for different numbers of elements can be found.

Page 26: FEM Presentation

Node1 0.000000 1.0000002 0.060542 0.8154273 0.138203 0.6472264 0.234214 0.4960135 0.349396 0.3621986 0.484065 0.2459397 0.637987 0.1471188 0.810385 0.0653499 1.000000 0.000000This table shows the finite element method solution using eight elements for .

Page 27: FEM Presentation

The results from the table can be displayed graphically. The graph shows that for these values, as the concentration of increases, the concentration of decreases at approximately the same rate. We can also see the finite element solutions for increasing numbers of elements, taking values from the middle node:

Page 28: FEM Presentation

This table shows the finite element solutions, using the same values for an increasing number of elements. Similar to the single equation, the solutions differ as the number of elements increases.

No. of Elements FEM Solution for FEM solution for 2 0.353536 0.3642684 0.350266 0.3626338 0.349396 0.36219816 0.349176 0.36208832 0.349121 0.36206064 0.349107 0.362053128 0.349103 0.362052256 0.349102 0.362051

Page 29: FEM Presentation

As there is no analytical solution for the coupled equations, a solution is calculated at a large number of elements and is taken as an exact value. This solution is then compared to the solution calculated at each number of elements.

Page 30: FEM Presentation

Elements exact FEM soln. Error in exact FEM soln. Error in 2 0.349102 0.349291 0.000189 0.362051 0.362145 0.0000944 0.349102 0.349149 0.000047 0.362051 0.362075 0.0000248 0.349102 0.349114 0.000012 0.362051 0.362057 0.00000616 0.349102 0.349105 0.000003 0.362051 0.362053 0.00000132 0.349102 0.349103 0.000001 0.362051 0.36051 0.00000064 0.349102 0.349102 0.000000 0.362051 0.362051 0.000000128 0.349102 0.349102 0.000000 0.362051 0.362051 0.000000256 0.349102 0.349102 0.000000 0.362051 0.362051 0.000000As the number of elements increases, the error term decreases and

the finite element solution converges to the ‘exact’ solution calculated.

Page 31: FEM Presentation

Conclusions• Gas removal and gas production depends on the signs of the reaction terms.

• The finite element method solutions for the diffusion – reaction equation always converges to the analytical solution.

• For both the single and coupled diffusion – reaction equations, as the number of elements doubles, the error term divides approximately by four, this is behaviour.


Recommended