Consider the 1D Poisson’s equation:

This describes the temperature in a rod with boundary conditions and where defines a heat source along the length of the rod (10cm).

Analytical Solution

We can solve this by considering the analytical solution form of a quadratic:

The boundary conditions Solving for using boundary conditions:

Boundary conditions:

Analytical solution:

FEM: Direct Method

If we assume , a direct method can be employed to generate the element equations.

The relationship between heat flux and temperature gradient can be represented by Fourier’s Law:

where and is the coefficient of thermal conductivity. If a linear approximation function is used to characterize the element’s temperature, the heat flow into the element through node 1 can be represented by:

where is heat flux at node 1. Similarly, for node 2:

These two equations express the relationship of the element’s internal temperature distribution (as reflected by the nodal temperatures) to the heat flux at its ends. As such, they constitute our desired element equations.

They can be simplified further by recognizing that Fourier’s law can be used to couch the end fluxes themselves in terms of the temperature gradients at the boundaries:

which can be substituted into the element equations to give

FEM: Method of Weighted Residuals

This is similar to the direct method but also includes external effects.

The differential equation can be re-expressed as:

The approximate solution is:

This can be substituted into this equation, which will result in a residual:

The method of weighted residuals consists of finding a minimum for the residual according to the general formula

where is the solution domain and are linearly independent weighting functions.

We need to decide on weighting functions. One common approach is to use the interpolation functions as the weighting functions (Galerkin’s method), such that:

For our one-dimensional rod, our previous residual can be substituted into this formulation to give:

which can be re-expressed as:

This solves to:

So, given our boundary conditions of:

Given and elements of length 2.5cm. We have:

  • Heat source term, first row:
  • Heat source term, second row:

For a single element:

Assembly of equations for the total system:

The boundary conditions are then:

Solution:

Comparison of Analytical vs. FEM

Comparing this analytical solution to our finite element solution:

More elements = smoother curve!