On verification of FEM solution to poisson’s equation
by comparing it to the analytical solution shown in Timoshenko.

By Nasser Abbasi. Updated May
28.2006.

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 differences between the solutions was obtained and compared.

The matlab code by Qing Wang which solves the problem by FEM 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.

Here is the modified Qing Wang matlab function which was used. [MATLAB]

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

**CONCLUSION**:

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

Using 21x41 nodes used for FEM, we see that, in absolute values, the maximum difference 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 21x41 nodes for the rectangular cross section. More elements should result in better approximation. But this needs to be done to confirm.

In terms of percentage differences, **the maximum % difference occurred at the 4 corners**.

Given the above grid size, we see from the plots that there is a maximum of 1% difference 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 difference between both solutions.

(Here is the same plot on separate page)

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

Here is the plot below but on a separate page.

This plot below shows the absolute difference between the analytical and the FEM solutions in 3D mesh (This plot is here on separate plot)

**More PLOTS**

This plot below is the analytical solution (The wrapping function, i.e. the solution function PHI(x,y)) shown using larger number of contours) (here is the plot on a separate page.)

This plot below is a contour plot of the analytic solution A separate plot is
here

This plot below is a contour plot of the FEM solution A separate plot
is here

This below is the above 2 contour plots side-by-side.

This is the same plot on separate page. Analytic solution side-by-side with FEM solution .

**Mesh views**

This below is a mesh plot of the analytical solution

This plot below is a mesh plot of FEM solution

This plot below is the above 2 plots side-by-side