PDF (legal size)

## On veriﬁcation of FEM solution to Poisson equation by comparing it to the analytical solution shown in Timoshenko MAE 207, Computational methods. UCI Spring 2006

May 28, 2006   Compiled on September 4, 2021 at 7:59pm

### 1 Introduction

A Matlab function was written which plots the analytical solution given by Timoshenko/Goodier on pages 310-311 in the Theory of Elasticity. The analytical solution was compared to the solution generated from the FEM solution. See this page for more information and background on the problem and the analytical solution.

The absolute and percentage diﬀerences between the solutions was obtained and compared.

The matlab code used was provided thanks to Qing Wang which solves the problem by FEM. It was called to obtain the FEM solution. Minor changes made in the code to allow one to call it as a function and to use the same contour levels. The appendix contains the Matlab code.

### 2 Conclusion

The solution by FEM agrees to a very good approximation with the analytical solution.

$$21$$ by $$41$$ nodes were used for FEM, we see that, in absolute value, the maximum diﬀerence was $$0.00009481788675562430$$ At nodes $$(11,10)$$ with symmetry at the other half of the cross section as shown in the plot below (The plot is here on a separate page)

By making the grid smaller, better approximation can be obtained. This analysis was done using $$21$$ by $$41$$ nodes nodes for the rectangular cross section. More elements should result in better approximation.

In terms of percentage diﬀerences, the maximum percentage diﬀerence occurred at the 4 corners.

Given the above grid size, we see from the plots that there is a maximum of $$1\%$$ diﬀerence between the analytical solution and the FEM solution. This occurred near the 4 corners of the cross section and was smallest in the middle. We need to better investigate why this is.

This below is a plot showing the percentage diﬀerence between both solutions.

Below shows a listing of the nodal values for the ﬁrst 4 columns in the solution matrix.

The plot below shows the absolute diﬀerence between the analytical and the FEM solutions in 3D mesh.

The plot below is the analytical solution (The wrapping function, i.e. the solution function $$\Phi (x,y)$$ shown using larger number of contours)

The plot below is a contour plot of the analytic solution.

The plot below is a contour plot of the FEM solution to compare with the above.

The plot below is the above 2 contour plots side-by-side.

This below is a mesh plot of the analytical solution and FEM solution side by side.

### 3 Appendix

#### 3.2 Code used for plotting

Here is the Matlab function used to plot the analytical solution. This function makes a call to the above FEM function.