Finite element method vs. Matrix Method#
Youâve seen the finite element method before, which could be used to solve similar problems. But what are the differences?
Equivalence with matrix method#
Although the two method can give the same results, the methods are different.
The matrix method solves the strong from of the differential equation, as derived in Force-displacement relations single extension element. The finite element method solves the weak form by multiplying the strong form by a test function [MUDETatSAfDUoTechnology24b]. In doing so, the choice for the shape function of the test-functions and approximate solution matters. The two methods end up with the same solution if the âapproximationâ assumed by FEM (linear shape functions for extension, cubic for bending) turn out to be the exact ODE solution.
In terms of global and local coordinate systems, thereâs an additional difference. Where the matrix method solves the nodal displacements and support reactions globally, using locally derived force-displacement relations. On the contrary, the finite element method solves the weak form globally with shape functions defined globally.
Finally, the matrix method has limitations. It turns out to be impossible to glue element through equilibrium for twodimensional elements. Furthermore, exact solution for the differential equations, required for defining the local stiffness matrix, generally do not exist for twodimensional elements.
Finite element method |
Matrix method |
---|---|
Solves weak form |
Solves the strong form |
Solves everything globally |
Solves discrete solution globally, with locally derived equations |
Generally applicable to differential equations |
Only applicable for 1D elements |
Example with finite element method#
Letâs consider the examples from Recap displacement method:
Fig. 15 Statically indeterminate extension bar#
Weâll apply the finite element method by using the matrix implementation from MUDE [MUDETatSAfDUoTechnology24a]. We use linear shape functions: \( N_a(x) = \cfrac{x_b-x}{x_b-x_a}=\cfrac{x_b-x}{\Delta x}\) and \(N_b(x)=\cfrac{x-x_a}{x_b-x_a}=\cfrac{x-x_a}{\Delta x}\). For this specific example, this matches the linear normal force distribution, leading to similar results:
x, u = simulate(2)
print(u[1])
0.01125
Example with matrix method#
Applying the matrix method (including implementations youâll implement during Workshop 2) yields the same result:
import matplotlib as plt
import numpy as np
sys.path.insert(1, '/matrixmethod_solution')
import matrixmethod_solution as mm
%config InlineBackend.figure_formats = ['svg']
print(u_free[0])
0.01125
Which is the same result (not true in general).