Open Educational Resources

FEA in One Dimension: One Dimensional Linear Elements

One Dimensional Linear Elements

To illustrate the finite element method, we will start by solving the same example that was solved before using the Galerkin method but employing a finite element approximation. Using a four-piecewise linear trial function, find the approximate displacement function of the shown bar. Assume that the bar is linear elastic with Young’s modulus E and cross-sectional area A and that the small strain tensor is the appropriate measure of strain. Ignore the effect of Poisson’s ratio.

The different aspects of the finite element analysis method will be presented through solving this example as follows.

Shape Functions

In this example, a piecewise C_0 linear trial function for the displacement that satisfies the essential boundary condition @X_1=0:u=0 is imposed. The displacement is interpolated between the four nodes and thus has the following form:

    \[u = u_1N_1 + u_2N_2 + u_3N_3 + u_4N_4\]

where \forall i\leq 4:u_i are multipliers that happen to be the displacements at the nodes 1, 2, 3, and 4 respectively, while N_i are the interpolation functions that have a value of 1 at node i and decrease linearly to zero at the neighbouring nodes (Figure 3). These functions are traditionally termed the “hat” functions, for obvious reasons. They are also referred to as the shape functions since they define the shape of the deformation of the model. Except when they vanish, the shape functions have the form:

    \[N_1 = \begin{cases} \frac{4X_1}{L} & 0 \le X_1 \le \frac{L}{4} \\ \frac{4}{L} (\frac{L}{2} - X_1) & \frac{L}{4} \le X_1 \le \frac{L}{2} \\ \end{cases}\]

    \[N_2 = \begin{cases} \frac{4}{L} (X_1 - \frac{L}{4}) & \frac{L}{4} \le X_1 \le \frac{L}{2} \\ \frac{4}{L} (\frac{3L}{4} - X_1) & \frac{L}{2} \le X_1 \le \frac{3L}{4} \\ \end{cases}\]

    \[N_3 = \begin{cases} \frac{4}{L} (X_1 - \frac{L}{2}) & \frac{L}{2} \le X_1 \le \frac{3L}{4} \\ \frac{4}{L} (L - X_1) & \frac{3L}{4} \le X_1 \le L \\ \end{cases}\]

    \[N_4 = \frac{4}{L} \Big(X_1 - \frac{3L}{4} \Big)\]

The derivatives of the shape functions are very simple and have the form:

    \[\frac{dN_1}{dX_1} = \begin{cases} \frac{4}{L} & 0 \le X_1 \le \frac{L}{4} \\ \frac{-4}{L} & \frac{L}{4} \le X_1 \le \frac{L}{2} \\ \end{cases}\]

    \[\frac{dN_2}{dX_1} = \begin{cases} \frac{4}{L} & \frac{L}{4} \le X_1 \le \frac{L}{2} \\ \frac{-4}{L} & \frac{L}{2} \le X_1 \le \frac{3L}{4} \\ \end{cases}\]

    \[\frac{dN_3}{dX_1} = \begin{cases} \frac{4}{L} & \frac{L}{2} \le X_1 \le \frac{3L}{4} \\ \frac{-4}{L} & \frac{3L}{4} \le X_1 \le L \\ \end{cases}\]

    \[\frac{dN_4}{dX_1} = \frac{4}{L}\]

Figure 3. One dimensional piecewise linear interpolation functions or “hat” functions

Solution Using the Galerkin Method

The Galerkin method, involves equating the integral of the weighted residuals to zero. The weight functions are chosen as the functions \phi_i(X_1) which happen to be equal to the shape functions N_i. After integration by parts as shown previously, the Galerkin method produces four equations of the form:

    \[\int_0^L EA \frac{dN_i}{dX_1} \Big(\frac{du}{dX_1} \Big) dX_1 = \int_0^L N_i c X_1 dX_1\]

There are four trial or shape functions N_i. Each appears only within a sub-interval and is equal to zero at the remaining part of the domain. Thus, the integration for each equation is only performed on the part where N_i does not vanish.

Equation 1: N_1 vanishes every where except for 0\leq X_1\leq \frac{L}{2}. In this part of the domain, N_3 and N_4 vanish. Therefore, for the first equation we have:

    \[u = u_1N_1 + u_2N_2\]

    \[\frac{du}{dX_1} = u_1 \frac{dN_1}{dX_1} + u_2 \frac{dN_2}{dX_1}\]

Therefore, the first equation has the form:

    \[u_1 \int_0^{\frac{L}{2}} EA \frac{dN_1}{dX_1} \frac{dN_1}{dX_1} dX_1 + u_2 \int_0^{\frac{L}{2}} EA \frac{dN_1}{dX_1} \frac{dN_2}{dX_1} dX_1 = \int_0^{\frac{L}{2}} N_1cX_1dX_1\]

The domain of integration can be updated to exclude the sub-domains when the integrand is equal to zero:

    \[u_1 \int_0^{\frac{L}{2}} EA \frac{dN_1}{dX_1} \frac{dN_1}{dX_1} dX_1 + u_2 \int_{\frac{L}{4}}^{\frac{L}{2}} EA \frac{dN_1}{dX_1} \frac{dN_2}{dX_1} dX_1 = \int_0^{\frac{L}{2}} N_1cX_1dX_1\]

Equation 2: N_2 vanishes every where except for \frac{L}{4}\leq X_1\leq \frac{3L}{4}. In this part of the domain, N_4 vanishes. Therefore, for the second equation we have:

    \[u = u_1N_1 + u_2N_2 + u_3N_3\]

    \[\frac{du}{dX_1} = u_1 \frac{dN_1}{dX_1} + u_2 \frac{dN_2}{dX_1} + u_3 \frac{dN_3}{dX_1}\]

Therefore, the second equation has the form:

    \[u_1 \int_{\frac{L}{4}}^{\frac{3L}{4}} EA \frac{dN_2}{dX_1} \frac{dN_1}{dX_1} dX_1 + u_2 \int_{\frac{L}{4}}^{\frac{3L}{4}} EA \frac{dN_2}{dX_1} \frac{dN_2}{dX_1} dX_1 + u_3 \int_{\frac{L}{4}}^{\frac{3L}{4}} EA \frac{dN_2}{dX_1} \frac{dN_3}{dX_1} dX_1\]

    \[= \int_{\frac{L}{4}}^{\frac{3L}{4}} N_2cX_1dX_1\]

The domain of integration can be updated to exclude the sub-domains when the integrand is equal to zero:

    \[u_1 \int_{\frac{L}{4}}^{\frac{L}{2}} EA \frac{dN_2}{dX_1} \frac{dN_1}{dX_1} dX_1 + u_2 \int_{\frac{L}{4}}^{\frac{3L}{4}} EA \frac{dN_2}{dX_1} \frac{dN_2}{dX_1} dX_1 + u_3 \int_{\frac{L}{2}}^{\frac{3L}{4}} EA \frac{dN_2}{dX_1} \frac{dN_3}{dX_1} dX_1  = \int_{\frac{L}{4}}^{\frac{3L}{4}} N_2cX_1dX_1\]

Equation 3: N_3 vanishes every where except for \frac{L}{2}\leq X_1\leq L. In this part of the domain, N_1 vanishes. Therefore, for the third equation we have:

    \[u = u_2N_2 + u_3N_3 + u_4N_4\]

    \[\frac{du}{dX_1} = u_2 \frac{dN_2}{dX_1} + u_3 \frac{dN_3}{dX_1} + u_4 \frac{dN_4}{dX_1}\]

Therefore, the third equation after excluding the sub-domains when the intgrand is equal to zero has the form:

    \[u_2 \int_{\frac{L}{2}}^{\frac{3L}{4}} EA \frac{dN_3}{dX_1} \frac{dN_2}{dX_1} dX_1 + u_3 \int_{\frac{L}{2}}^{L} EA \frac{dN_3}{dX_1} \frac{dN_3}{dX_1} dX_1 + u_4 \int_{\frac{3L}{4}}^{L} EA \frac{dN_3}{dX_1} \frac{dN_4}{dX_1} dX_1  =  \int_{\frac{L}{2}}^{L} N_3cX_1dX_1\]

Equation 4: N_4 vanishes every where except for \frac{3L}{4}\leq X_1\leq L. In this part of the domain, N_1 and N_2 vanish. Therefore, for the fourth equation we have:

    \[u = u_3N_3 + u_4N_4\]

    \[\frac{du}{dX_1} = u_3 \frac{dN_3}{dX_1} + u_4 \frac{dN_4}{dX_1}\]

Therefore, the fourth equation after excluding the sub-domains when the intgrand is equal to zero has the form:

    \[u_3 \int_{\frac{3L}{4}}^{L} EA \frac{dN_4}{dX_1} \frac{dN_3}{dX_1} dX_1 + u_4 \int_{\frac{3L}{4}}^{L} EA \frac{dN_4}{dX_1} \frac{dN_4}{dX_1} dX_1 = \int_{\frac{3L}{4}}^{L} N_4cX_1dX_1\]

The above four equations can be written in matrix form as follows:

    \[\begin{pmatrix} \int_0^{\frac{L}{2}} EA \frac{dN_1}{dX_1} \frac{dN_1}{dX_1} dX_1 & \int_{\frac{L}{4}}^{\frac{L}{2}} EA \frac{dN_1}{dX_1} \frac{dN_2}{dX_1} dX_1 & 0 & 0 \\ \int_{\frac{L}{4}}^{\frac{3L}{4}} EA \frac{dN_2}{dX_1} \frac{dN_1}{dX_1} dX_1 & \int_{\frac{L}{4}}^{\frac{3L}{4}} EA \frac{dN_2}{dX_1} \frac{dN_2}{dX_1} dX_1 & \int_{\frac{L}{4}}^{\frac{3L}{4}} EA \frac{dN_2}{dX_1} \frac{dN_3}{dX_1} dX_1 & 0 \\ 0 & \int_{\frac{L}{2}}^{\frac{3L}{4}} EA \frac{dN_3}{dX_1} \frac{dN_2}{dX_1} dX_1 & \int_{\frac{L}{2}}^L EA \frac{dN_3}{dX_1} \frac{dN_3}{dX_1} dX_1 & \int_{\frac{3L}{4}}^L EA \frac{dN_3}{dX_1} \frac{dN_4}{dX_1} dX_1 \\ 0 & 0 & \int_{\frac{3L}{4}}^L EA \frac{dN_4}{dX_1} \frac{dN_3}{dX_1} dX_1 & \int_{\frac{3L}{4}}^L EA \frac{dN_4}{dX_1} \frac{dN_4}{dX_1} dX_1 \\ \end{pmatrix} \begin{pmatrix} u_1 \\ u_2 \\ u_3 \\ u_4 \\ \end{pmatrix}\]

    \[= \begin{pmatrix} f_1 \\ f_2 \\ f_3 \\ f_4 \\ \end{pmatrix}\]

where \forall i\leq 4:f_i=\int_{0}^{L} \! N_icX_1 \,\mathrm{d}X_1. The integration on both sides is relatively simple to calculate. The final equations have the following form:

    \[\begin{pmatrix} \frac{8}{L} & \frac{-4}{L} & 0 & 0 \\ \frac{-4}{L} & \frac{8}{L} & \frac{-4}{L} & 0 \\ 0 & \frac{-4}{L} & \frac{8}{L} & \frac{-4}{L} \\ 0 & 0 & \frac{-4}{L} & \frac{4}{L} \\ \end{pmatrix} \begin{pmatrix} u_1 \\ u_2 \\ u_3 \\ u_4 \\ \end{pmatrix} = \frac{cL^2}{EA} \begin{pmatrix} \frac{1}{16} \\ \frac{1}{8} \\ \frac{3}{16} \\ \frac{11}{96} \\ \end{pmatrix}\]

which when solved gives the solution:

    \[\begin{pmatrix} u_1 \\ u_2 \\ u_3 \\ u_4 \\ \end{pmatrix} =  \frac{cL^3}{EA} \begin{pmatrix} \frac{47}{384} \\ \frac{11}{48} \\ \frac{39}{128} \\ \frac{1}{3} \\ \end{pmatrix}\]

Comparison with the Exact Solution

The exact solution as shown previously is known and is equal to:

    \[u_{exact} = \frac{cL^2}{2EA} X_1 - \frac{c}{6EA} X_1^3\]

The exact displacement at the points 1, 2, 3, and 4 are given by:

    \[u_{exact_1} = \frac{47cL^3}{384EA}\]

    \[u_{exact_2} = \frac{11cL^3}{48EA}\]

    \[u_{exact_3} = \frac{39cL^3}{128EA}\]

    \[u_{exact_4} = \frac{cL^3}{3EA}\]

The finite element analysis approximation gave exact solution for the displacements of the points 1, 2, 3, and 4. However, in between those points, the finite element analysis approximation following linear interpolation. As shown in the figure below when setting c=1, E=1, A=1, and L=1 units, the displacement values are almost accurate. However, the linear interpolation of the displacements means that the strain is constant in the area between points. Therefore, the stresses are constant between points and in fact, the stress distribution is discontinuous!

View Mathematica Code

uexact = c*L^2/2/EA*x - c/6/EA*x^3;
N1 = Piecewise[{{4 x/L, 0 <= x <= L/4}, {4/L (L/2 - x), L/4 <= x <= L/2}}, 0];
N2 = Piecewise[{{4/L (x - L/4), L/4 <= x <= L/2}, {4/L (3 L/4 - x), L/2 <= x <= 3 L/4}}, 0];
N3 = Piecewise[{{4/L (x - L/2), L/2 <= x <= 3 L/4}, {4/L (L - x), 3 L/4 <= x <= L}}, 0];
N4 = Piecewise[{{4/L (x - 3 L/4), 3 L/4 <= x <= L}}, 0];
u1 = c*L^3/EA*(47/384);
u2 = c*L^3/EA*(11/48);
u3 = c*L^3/EA*(39/128);
u4 = c*L^3/EA*(1/3);
u = u1*N1 + u2*N2 + u3*N3 + u4*N4;
uexactp = uexact /. {c -> 1, EA -> 1, L -> 1}
sigmaexact = D[uexactp, x]
up = u /. {c -> 1, EA -> 1, L -> 1}
(*Assuming Young’s modulus = 1 unit *)
sigmap = D[up, x]
Plot[{uexactp, up}, {x, 0, 1}, AxesLabel -> {"x", "displacement"}, PlotLegends -> {uexact, u_FEA}]
Plot[{sigmaexact, sigmap}, {x, 0, 1}, AxesLabel -> {"x", "sigma_11"}, PlotLegends -> {"sigma_exact", "sigma_FEA"}]

View Python Code

import sympy as sp
import numpy as np
from sympy import lambdify
from matplotlib import pyplot as plt
x = sp.symbols("x")
xL = np.arange(0,1,0.01)
c,L,EA = 1,1,1
# Exact Calculations
u_exact = c*L**2/2/EA*x - c/sp.Rational("6")/EA*x**3
s_exact = u_exact.diff(x)
display("u_exact(x) =",u_exact,"s_exact(x) =",s_exact)
F = lambdify(x,u_exact)
dF = lambdify(x,s_exact)
y_exact = F(xL)
sy_exact = dF(xL)
def PN1(x):
    conds = [(x>=0)&(x<=L/4),(x>=L/4)&(x<L/2)]
    functions = [lambda x:4*x/L,lambda x:4/L*(L/2-x)]
    Dfunctions = [lambda x:4/L,lambda x:-4]
    return np.piecewise(x,conds,functions), np.piecewise(x,conds,Dfunctions)
def PN2(x):
    conds = [(x>=L/4)&(x<=L/2),(x>=L/2)&(x<3*L/4)]
    functions = [lambda x:4/L*(-L/4+x),lambda x:4/L*(3*L/4-x)]
    Dfunctions = [lambda x:4/L,lambda x:-4]
    return np.piecewise(x,conds,functions), np.piecewise(x,conds,Dfunctions)
def PN3(x):
    conds = [(x>=L/2)&(x<=3*L/4),(x>=3*L/4)&(x<=L)]
    functions = [lambda x:4/L*(-L/2+x),lambda x:4/L*(L-x)]
    Dfunctions = [lambda x:4/L,lambda x:-4]
    return np.piecewise(x,conds,functions), np.piecewise(x,conds,Dfunctions)
def PN4(x):
    conds = [(x>=3*L/4)&(x<=L)]
    functions = [lambda x:4/L*(-3*L/4+x)]
    Dfunctions = [lambda x:4/L]
    return np.piecewise(x,conds,functions), np.piecewise(x,conds,Dfunctions)
N1, DN1 = PN1(xL)
N2, DN2 = PN2(xL)
N3, DN3 = PN3(xL)
N4, DN4 = PN4(xL)
u1 = c*L**3/EA*(47/384)
u2 = c*L**3/EA*(11/48)
u3 = c*L**3/EA*(39/128)
u4 = c*L**3/EA*(1/3)
u = u1*N1+u2*N2+u3*N3+u4*N4
up = u1*DN1+u2*DN2+u3*DN3+u4*DN4
fig, ax = plt.subplots(2, figsize=(6,8))
ax[0].set_title("")
ax[0].set_xlabel("x")
ax[0].set_ylabel("displacement")
ax[0].plot(xL,y_exact,label="(c*L^2*x)/(2*EA) - (c*x^3)/(6*EA)")
ax[0].plot(xL,u,label="u_FEA")
ax[1].plot(xL,sy_exact,label="sigma_exact")
ax[1].plot(xL,up,label="sigma_FEA")
ax[1].set_ylabel("sigma11")
for i in ax:
    i.grid(True, which='both')
    i.axhline(y = 0, color = 'k')
    i.axvline(x = 0, color = 'k')
    i.set_xlabel("x")
    i.legend()

Solution Using the Virtual Work Method

As stated previously, the Galerkin method and the virtual work method are equivalent. The principle of virtual work states that, from a state of equilibrium, when a virtual admissible (compatible) displacement is applied, the increment in the work done by the external and body forces during the application of the virtual displacement is equal to the increment in the deformation energy stored. We will adopt the traditional matrix multiplication convention with differentiation between row and column vectors. The displacement function has the form:

    \[u = u_1N_1 + u_2N_2 + u_3N_3 + u_4N_4 = \hspace{1mm} <\hspace{2mm} N_1 \hspace{2mm} N_2 \hspace{2mm} N_3 \hspace{2mm} N_4 \hspace{2mm}> \hspace{1mm} \begin{pmatrix} u_1 \\ u_2 \\ u_3 \\ u_4 \\ \end{pmatrix}\]

The stress component \sigma_{11} due to the assumed trial displacement function has the following form:

    \[\sigma_{11} = E\varepsilon_{1} = E \frac{du}{dX_1} = E \sum_{i=1}^4 u_i \frac{dN_i}{dX_1}\]

    \[= E \hspace{1mm} < \hspace{2mm} \frac{dN_1}{dX_1} \hspace{2mm} \frac{dN_2}{dX_1} \hspace{2mm} \frac{dN_3}{dX_1} \hspace{2mm} \frac{dN_4}{dX_1} \hspace{2mm} > \hspace{1mm} \begin{pmatrix} u_1 \\ u_2 \\ u_3 \\ u_4 \\ \end{pmatrix}\]

The virtual displacement can be set by choosing virtual parameters u_i^*:

    \[u^* = u_1^*N_1 + u_2^*N_2 + u_3^*N_3 + u_4^*N_4\]

Setting:

    \[N = \hspace{1mm} < \hspace{2mm} N_1 \hspace{2mm} N_2 \hspace{2mm} N_3 \hspace{2mm} N_4 \hspace{2mm} >\]

    \[B = \hspace{1mm} < \hspace{2mm} \frac{dN_1}{dX_1} \hspace{2mm} \frac{dN_2}{dX_1} \hspace{2mm} \frac{dN_3}{dX_1} \hspace{2mm} \frac{dN_4}{dX_1} \hspace{2mm} >\]

    \[u_e = \begin{pmatrix} u_1 \\ u_2 \\ u_3 \\ u_4 \\ \end{pmatrix}\]

    \[u_e^* = \hspace{1mm} < \hspace{2mm} u_1^* \hspace{2mm} u_2^* \hspace{2mm} u_3^* \hspace{2mm} u_4^* \hspace{2mm} >\]

then the equations can be rewritten as follows:

    \[u = Nu_e\]

    \[u^* = u_e^*N^T\]

    \[\varepsilon_{11} = Bu_e\]

    \[\varepsilon_{11}^* = u_e^* B^T\]

    \[\sigma_{11} =EBu_e\]

The internal virtual work has the form:

    \[IVW = \int_0^L A\varepsilon_{11}^* \sigma_{11} dX_1 = u_e^* \int_0^L EAB^T BdX_1 u_e\]

The external virtual work has the form:

    \[EVW = u_e^* \int_0^L cX_1N^TdX_1\]

Equating the internal and external virtual work, the following is obtained:

    \begin{equation*} \small < \hspace{2mm} u_1^* \hspace{2mm} u_2^* \hspace{2mm} u_3^* \hspace{2mm} u_4^* \hspace{2mm} >  \begin{pmatrix} \int_0^{\frac{L}{2}} \frac{dN_1}{dX_1} \frac{dN_1}{dX_1} dX_1 &  \int_{\frac{L}{4}}^{\frac{L}{2}} \frac{dN_1}{dX_1} \frac{dN_2}{dX_1} dX_1 & 0 & 0 \\ \int_{\frac{L}{4}}^{\frac{3L}{4}} \frac{dN_2}{dX_1} \frac{dN_1}{dX_1} dX_1 & \int_{\frac{L}{4}}^{\frac{3L}{4}} \frac{dN_2}{dX_1} \frac{dN_2}{dX_1} dX_1 & \int_{\frac{L}{4}}^{\frac{3L}{4}} \frac{dN_2}{dX_1} \frac{dN_3}{dX_1} dX_1 & 0 \\ 0 & \int_{\frac{L}{2}}^{\frac{3L}{4}} \frac{dN_3}{dX_1} \frac{dN_2}{dX_1} dX_1 &  \int_{\frac{L}{2}}^L \frac{dN_3}{dX_1} \frac{dN_3}{dX_1} dX_1 &  \int_{\frac{3L}{4}}^L \frac{dN_3}{dX_1} \frac{dN_4}{dX_1} dX_1 \\ 0 & 0 & \int_{\frac{3L}{4}}^L \frac{dN_4}{dX_1} \frac{dN_3}{dX_1} dX_1 & \int_{\frac{3L}{4}}^L \frac{dN_4}{dX_1} \frac{dN_4}{dX_1} dX_1 \\ \end{pmatrix} \begin{pmatrix} u_1 \\ u_2 \\ u_3 \\ u_4 \\ \end{pmatrix} \end{equation*}

    \[= \frac{1}{EA}  < \hspace{2mm} u_1^* \hspace{2mm} u_2^* \hspace{2mm} u_3^* \hspace{2mm} u_4^* \hspace{2mm} > \hspace{1mm} \begin{pmatrix} f_1 \\ f_2 \\ f_3 \\ f_4 \\ \end{pmatrix}\]

where \forall i\leq 4:f_i=\int_{0}^{L} \! N_icX_1 \,\mathrm{d}X_1. Note that the factor EA is constant in this problem and was pulled out as a common factor for simplicity. Since the coefficients u_i^* are arbitrary, the coefficients of each u_i^* on both sides of the equality are equal. Therefore, the same equations of the Galerkin method are retrieved.

Elements, Nodes and Degrees of Freedom

In the finite element method, the domain is discretized into points which are called nodes and the regions between the nodes are called elements. The approximate solution involves assuming a trial function for the displacements interpolated between the values of the displacements the nodes. The displacement function is formed by multiplying the displacements of the nodes by shape functions. The displacements of the nodes are termed the degrees of freedom of the system. The right-hand side of the matrix equation formed is equivalent to a nodal force vector and is formed by lumping the distributed load and forming equivalent concentrated loads at the nodes.

For this particular example the solution is exact at the selected nodes. However, the solution within the elements will be linearly interpolated between the two values on each side and thus is not exact. The value of the gradient of the displacement at each node does not exist, as the displacement function is not differentiable at the nodes. In the finite element analysis method, the stresses that are related to the strains (the gradients of the displacements) are usually averaged at the nodes, and the degree of variation of the stresses between the different elements could be an indication of the accuracy of the solution. The matrix multiplied by the degrees of freedom is, in conservative systems, symmetric and is termed the stiffness matrix.

When the virtual work method was applied, the integration was done on the whole domain. However, it is possible to perform the integration locally on the elements. The equations of the virtual work can be written as follows:

    \[\int_0^{\frac{L}{4}} A \varepsilon_{11}^* \sigma_{11} dX_1 + \int_{\frac{L}{4}}^{\frac{L}{2}} A \varepsilon_{11}^* \sigma_{11} dX_1 + \int_{\frac{L}{2}}^{\frac{3L}{4}} A \varepsilon_{11}^* \sigma_{11} dX_1 + \int_{\frac{3L}{4}}^L A \varepsilon_{11}^* \sigma_{11} dX_1\]

    \[= \int_0^{\frac{L}{4}} u^*cX_1 dX_1 + \int_{\frac{L}{4}}^{\frac{L}{2}} u^*cX_1 dX_1 + \int_{\frac{L}{2}}^{\frac{3L}{4}} u^*cX_1 dX_1 + \int_{\frac{3L}{4}}^L u^*cX_1 dX_1\]

Because the integration can be done locally on the elements, it is possible to isolate the elements and perform the integration on each element separately (Figure 4). On each element, the shape functions or interpolation functions are associated with the end nodes. For example, element e2 connects nodes 1 and 2 with two shape functions, N_1 and N_2. What is remarkable about the method is the similarity between all the elements shown in (Figure 4). Thus, a local stiffness matrix for each element can be developed, and then, the global stiffness matrix can be easily assembled by combining all the local stiffness matrices.

Element 1:

On element 1, the displacement is given by: u=u_1N_1 and the virtual displacement is given by u^*=u_1^*N_1. By considering the first element, the first term (denoted IVW_1) in the internal virtual work equation has the following form:

    \[IVW_1 = u_1^* \int_0^{\frac{L}{4}} EA \frac{dN_1}{dX_1} \frac{dN_1}{dX_1} dX_1 u_1 = u_1^* k_{11}^{e1} u_1\]

K^{e1}_{11} is the local stiffness entry for element 1 corresponding to the degree of freedom u_1. The first term in the external virtual work has the form:

    \[EVW_1 = u_1^* \int_0^{\frac{L}{4}} N_1 c X_1 dX_1 = u_1^* f_1^{e1}\]

where f^{e1}_1 is the nodal force to be applied at node 1 corresponding to lumping the distributed load acting on element 1.

Element 2:

On element 2, the displacement is given by: u=u_1N_1+u_2N_2 and the virtual displacement is given by u^*=u_1^*N_1+u_2^*N_2. By considering the second element, the second term in the internal virtual work equation has the following form:

    \[IVW_2 = \hspace{1mm} < \hspace{2mm} u_1^* \hspace{2mm} u_2^* \hspace{2mm} > \hspace{1mm} \begin{pmatrix} \int_{\frac{L}{4}}^{\frac{L}{2}} EA \frac{dN_1}{dX_1} \frac{dN_1}{dX_1} dX_1 & \int_{\frac{L}{4}}^{\frac{L}{2}} EA \frac{dN_1}{dX_1} \frac{dN_2}{dX_1} dX_1 \\ \int_{\frac{L}{4}}^{\frac{L}{2}} EA \frac{dN_2}{dX_1} \frac{dN_1}{dX_1} dX_1  &  \int_{\frac{L}{4}}^{\frac{L}{2}} EA \frac{dN_2}{dX_1} \frac{dN_2}{dX_1} dX_1  \\ \end{pmatrix} \begin{pmatrix} u_1 \\ u_2 \\ \end{pmatrix}\]

    \[= \hspace{1mm} < \hspace{2mm} u_1^* \hspace{2mm} u_2^* \hspace{2mm} > \hspace{1mm} \begin{pmatrix} K_{11}^{e2} & K_{12}^{e2} \\ K_{21}^{e2} & K_{22}^{e2} \\ \end{pmatrix} \begin{pmatrix} u_1 \\ u_2 \\ \end{pmatrix}\]

where K^{e2}_{ij} are the local stiffness matrix entries for element 2 corresponding to the degrees of freedom u_1 and u_2. The second term in the external virtual work has the form:

    \[EVW_2 = \hspace{1mm} < \hspace{2mm} u_1^* \hspace{2mm} u_2^* \hspace{2mm} > \hspace{1mm} \begin{pmatrix} \int_{\frac{L}{4}}^{\frac{L}{2}} N_1 cX_1dX_1 \\ \int_{\frac{L}{4}}^{\frac{L}{2}} N_2 cX_1dX_1 \\ \end{pmatrix}\]

    \[= \hspace{1mm} < \hspace{2mm} u_1^* \hspace{2mm} u_2^* \hspace{2mm} > \hspace{1mm} \begin{pmatrix} f_1^{e2} \\ f_2^{e2} \\ \end{pmatrix}\]

where f^{e2}_1 and f^{e2}_2 are the nodal forces to be applied at nodes 1 and 2 corresponding to lumping the distributed load acting on element 2.

Element 3:

On element 3, the displacement is given by: u=u_2N_2+u_3N_3 and the virtual displacement is given by u^*=u_2^*N_2+u_3^*N_3. By considering the third element, the third term in the internal virtual work equation has the following form:

    \[IVW_3 = \hspace{1mm} < \hspace{2mm} u_2^* \hspace{2mm} u_3^* \hspace{2mm} > \hspace{1mm} \begin{pmatrix} \int_{\frac{L}{2}}^{\frac{3L}{4}} EA \frac{dN_2}{dX_1} \frac{dN_2}{dX_1} dX_1 &  \int_{\frac{L}{2}}^{\frac{3L}{4}} EA \frac{dN_2}{dX_1} \frac{dN_3}{dX_1} dX_1 \\ \int_{\frac{L}{2}}^{\frac{3L}{4}} EA \frac{dN_3}{dX_1} \frac{dN_2}{dX_1} dX_1 & \int_{\frac{L}{2}}^{\frac{3L}{4}} EA \frac{dN_3}{dX_1} \frac{dN_3}{dX_1} dX_1 \\ \end{pmatrix} \begin{pmatrix} u_2 \\ u_3 \\ \end{pmatrix}\]

    \[= \hspace{1mm} < \hspace{2mm} u_2^* \hspace{2mm} u_3^* \hspace{2mm} > \hspace{1mm} \begin{pmatrix} K_{11}^{e3} & K_{12}^{e3} \\ K_{21}^{e3} & K_{22}^{e3} \\ \end{pmatrix} \begin{pmatrix} u_2 \\ u_3 \\ \end{pmatrix}\]

where K^{e3}_{ij} are the local stiffness matrix entries for element 3 corresponding to the degrees of freedom u_2 and u_3. The third term in the external virtual work has the form:

    \[EVW_3 = \hspace{1mm} < \hspace{2mm} u_2^* \hspace{2mm} u_3^* \hspace{2mm} > \hspace{1mm} \begin{pmatrix} \int_{\frac{L}{2}}^{\frac{3L}{4}} N_2 cX_1dX_1 \\ \int_{\frac{L}{2}}^{\frac{3L}{4}} N_3 cX_1dX_1 \\ \end{pmatrix}\]

    \[= \hspace{1mm} < \hspace{2mm} u_2^* \hspace{2mm} u_3^* \hspace{2mm} > \hspace{1mm} \begin{pmatrix} f_1^{e3} \\ f_2^{e3} \\ \end{pmatrix}\]

where f^{e3}_1 and f^{e3}_2 are the nodal forces to be applied at nodes 2 and 3 corresponding to lumping the distributed load acting on element 3.

Element 4:

On element 4, the displacement is given by: u=u_3N_3+u_4N_4 and the virtual displacement is given by u^*=u_3^*N_3+u_4^*N_4. By considering the fourth element, the fourth term in the internal virtual work equation has the following form:

    \[IVW_4 = \hspace{1mm} < \hspace{2mm} u_3^* \hspace{2mm} u_4^* \hspace{2mm} > \hspace{1mm} \begin{pmatrix} \int_{\frac{3L}{4}}^L EA \frac{dN_3}{dX_1} \frac{dN_3}{dX_1} dX_1 & \int_{\frac{3L}{4}}^L EA \frac{dN_3}{dX_1} \frac{dN_4}{dX_1} dX_1 \\ \int_{\frac{3L}{4}}^L EA \frac{dN_4}{dX_1} \frac{dN_3}{dX_1} dX_1 &  \int_{\frac{3L}{4}}^L EA \frac{dN_4}{dX_1} \frac{dN_4}{dX_1} dX_1 \\ \end{pmatrix} \begin{pmatrix} u_3 \\ u_4 \\ \end{pmatrix}\]

    \[= \hspace{1mm} < \hspace{2mm} u_3^* \hspace{2mm} u_4^* \hspace{2mm} > \hspace{1mm} \begin{pmatrix} K_{11}^{e4} & K_{12}^{e4} \\ K_{21}^{e4} & K_{22}^{e4} \\ \end{pmatrix} \begin{pmatrix} u_3 \\ u_4 \\ \end{pmatrix}\]

where K^{e4}_{ij} are the local stiffness matrix entries for element 4 corresponding to the degrees of freedom u_3 and u_4. The fourth term in the external virtual work has the form:

    \[EVW_4 = \hspace{1mm} < \hspace{2mm} u_3^* \hspace{2mm} u_4^* \hspace{2mm} > \hspace{1mm} \begin{pmatrix} \int_{\frac{3L}{4}}^L N_3cX_1dX_1 \\ \int_{\frac{3L}{4}}^L N_4cX_1dX_1 \\ \end{pmatrix}\]

    \[= \hspace{1mm} < \hspace{2mm} u_3^* \hspace{2mm} u_4^* \hspace{2mm} > \hspace{1mm} \begin{pmatrix} f_1^{e4} \\ f_2^{e4} \\ \end{pmatrix}\]

where f^{e4}_1 and f^{e4}_2 are the nodal forces to be applied at nodes 3 and 4 corresponding to lumping the distributed load acting on element 4.

Global Stiffness Matrix
The global stiffness matrix can be assembled by the equation:

    \[IVW_1 + IVW_2 + IVW_3 + IVW_4 = EVW_1 + EVW_2 + EVW_3 + EVW_4\]

The resulting equations (global stiffness matrix and global nodal forces vector) considering the arbitrariness of the multipliers u_i^*:

    \[\begin{pmatrix} K_{11}^{e1} + K_{11}^{e2} & K_{12}^{e2} & 0 & 0 \\ K_{21}^{e2} & K_{22}^{e2}+K_{11}^{e3} & K_{12}^{e3} & 0 \\ 0 & K_{21}^{e3} & K_{22}^{e3}+K_{11}^{e4} & K_{12}^{e4} \\ 0 & 0 & K_{21}^{e4} & K_{22}^{e4} \\ \end{pmatrix} \begin{pmatrix} u_1 \\ u_2 \\ u_3 \\ u_4 \\ \end{pmatrix} =  \begin{pmatrix} f_1^{e1} + f_1^{e2} \\ f_2^{e2} + f_1^{e3} \\ f_2^{e3} + f_1^{e4} \\ f_2^{e4} \\ \end{pmatrix}\]

It is important to note that because the assumed displacement function satisfies the essential boundary conditions, the structure is stable, and the equations can be solved directly. In general, the structure under consideration would have five degrees of freedom and would have a 5\times 5 global stiffness matrix and a 5\times 1 global nodal forces vector. The nodal forces vector corresponding to the displacement of the first node where the displacement is prescribed would have an unknown reaction. The stiffness matrix can then be reduced into a 4\times 4 matrix which can be solved.

Figure 4. Discretizing the domain into elements and nodes

Properties of the Stiffness Matrix

In the example above, the final equations had the following form:

    \[Ku = F\]

where K\in\mathbb{M}^n is the n\times n global stiffness matrix, u\in\mathbb{R}^n is the vector of degrees of freedom while F\in\mathbb{R}^n is the nodal forces vector. In general, the global stiffness matrix K of an elastic structure formed using the finite element analysis method whether the problems has one, two, or three dimensions has the following properties:

  • Sparsity: The stiffness matrix formed in the traditional finite element analysis is sparse, i.e., contains many zero entries. This property is due to the choice of piecewise-linear interpolation functions. The shape functions (or the interpolation functions) are chosen to be “Hat functions” that take values of 1 at each node and decrease linearly or in a parabolic fashion across the neighboring elements connected to that node. Nodes that are not connected together with any elements have a corresponding zero entry in the global stiffness matrix.

  • Invertibility: (See the section on Invertible linear maps) The stiffness matrix of a structure is a linear map between u\in\mathbb{R}^n and F \in\mathbb{R}^n. Such map is invertible if and only if the map is injective (one to one), which means that the only element in the kernel of the map is the zero vector. Otherwise, if the map is not injective, then there are two nonzero distinct displacement vectors v and w\in\mathbb{R}^n that can be produced by the same force vector F \in\mathbb{R}^n. I.e., K(v-w)=F-F=0, then the nonzero vector displacement v-w can be applied to the structure without any external forces! If no boundary conditions are applied to a structure, then naturally rigid body motions and rigid body rotations can be applied without any external forces. Therefore, a stiffness matrix of a structure that is not restrained is not invertible and its determinant is equal to zero. Once enough boundary conditions are applied to the structure, then the only element of the kernel of the linear map is the zero element, the stiffness matrix is invertible, and its determinant is not equal to zero. Notice, however, that when a structure is not well supported and does not have the correct boundary conditions, the stiffness matrix is termed “ill conditioned”. Some finite element analysis software will still be able to find a possible solution, depending on the solution method. A user should be cautious in such cases since the solution could involve very large numbers for the displacement that would render the solution inaccurate.

  • Symmetry: The stiffness matrix of an elastic structure is symmetric. The symmetry is a direct consequence of elasticity. Elasticity implies that there is an energy function such that F_i=\frac{\partial W}{\partial u_i}. Therefore, K_{ij}=\frac{\partial F_i}{\partial u_j}=\frac{\partial^2 W}{\partial u_i\partial u_j} implying that K is symmetric.

  • Positive and Semi-Positive Definiteness: (See the corresponding section in linear vector maps) A stable structure will deform in the direction of increasing external forces. Mathematically speaking, the dot product between the displacement and the force vectors has to be positive. If the structure is well restrained, i.e., K is invertible, then K is positive definite and any displacement field in the structure will produce positive energy. In mathematical terms, this imples: \forall u \in\mathbb{R}^n:F.u=Ku.u > 0. However, if the structure is not well restrained, then K is not invertible and \exists u\in\mathbb{R}^n such that Ku = O. If the material of the structure is elastic, then the global stiffness matrix of the structure is semi-positive definite. Most finite element analysis software will check the invertibility of the stiffness matrix by finding the smallest eigenvalue of the stiffness matrix. If one of the eigenvalues of the stiffness matrix is zero, then the stiffness matrix is not invertible. If one of the eigenvalues is negative, then the stiffness matrix is not positive definite, since positive definiteness ensures positive eigenvalues (See the corresponding section in linear vector maps). A direct consequence of the positive definiteness is that the diagonal entries of the stiffness matrix have to be positive; since a diagonal element represents the force applied at the corresponding degree of freedom to produce unit displacement at this particular degree of freedom, then the requirement that the energy is positive ensures that the force and the displacement are in the same direction.

  • Any vertical column of the stiffness matrix is equal to the vector of nodal forces required to move the corresponding degree of freedom by one unit displacement while keeping the remaining degrees of freedom equal to zero.

Video:

Page Comments

  1. The Galerkin solution for the final u, as in Ku = f, could also be computed through SymPy,

    “`
    from sympy import symbols
    from sympy.matrices import Matrix
    L, c, E, A = symbols(“L, c, E, A”)
    K = Matrix([[8/L, -4/L, 0, 0],
    [-4/L, 8/L, -4/L, 0],
    [0, -4/L, 8/L,-4/L],
    [0, 0, -4/L, 4/L]])
    b = (c*L**2)/(E*A) * Matrix([1/16., 1/8., 3/16., 11/96.])
    print (K.solve(b))

    “`

    This will output 0.12239 for u1 for instance which is 47/384 as shown in the lecture notes

Leave a Reply

Your email address will not be published.