Workshops

Projects

Blogs

Careers

Hire from us

Corporate Training

All Courses

Choose a category

All Courses / undefined

All Courses / undefined / undefined

Corporate Upskilling

FOR Universities

More

29 Jun 2022

# All you need to know about Shape Functions

Skill-Lync

Engineering and mathematical problems that are space and time-dependent can be described by partial differential equations (PDE). For complex problems, it is very difficult to get the analytical solution for these partial differential equations. So, the approximate equations are constructed by using the appropriate discretization.

Generally, we assume some approximate solution to interpolate the dependent variable over an element and finite element analysis (FEA) is used to solve such approximate solutions. These assumed solutions are often in the form of a polynomial function. In this way, a continuous physical problem is transformed into a discretized finite element problem in which nodal values are calculated. Then the global system of equations is solved and the unknown nodal values are calculated. A step-by-step procedure followed in FEA is shown in the figure below.

## What is a Shape Function?

The basis/shape function is the function that interpolates the solution between the discrete evaluated nodal values. In FEA we often need to calculate the variable values/solution at other locations rather than the nodes. Basis functions are used for calculating these kinds of quantities by interpolation. With regards to shape functions in FEA, a finite number of basis functions (e.g. polynomial function) are chosen and an approximation to the unknown function (over the whole domain) is constructed as a linear combination of those basis functions.

For example, suppose we have a function that is a dependent variable in the partial differential equation and which is sought. So, this function is approximated by a function using a linear combination of basis functions.

`u≅ u_a`                                                                                                               (1)

`u_a= ∑_i u_i φ_i`                                                                                                 (2)

Equation (1) and (2) shows the approximated solution for the dependent variable. `u_i`  is the coefficient of the function which approximates `u` and `φ_i` is called the basis function. `u` can be any field variable in the PDE such as displacement, temperature, pressure, etc.

The shape function over a computational domain can be defined as e.g. power series, Fourier series, Lagrange polynomial, etc. The finite element method uses a local basis, that is, we define the shape functions only to be nonzero inside a particular element. `φ_i` is known as the expansion basis and its support is defined as the set of points where `φ_i≠0`. Figure 1.2 depicts different types of shape functions.

The shape function can be defined as a linear, quadratic, or higher-order polynomial and depends upon the degree of freedom of an element. Usually, in the simplest case, lower-order polynomials (linear) are chosen as shape functions.

An example of a 1D axially loaded bar element is considered to explain the concept of shape function. Figure 1.3 depicts the element with nodes 1 and node 2. It has a cross-section area `A^((e))`, Young’s modulus `E^((e))`, and length respectively `l^((e))`. Nodal forces and displacements in the element are depicted by `P_1^e P_2^e and u_1^e,u_2^e` at node 1 and node 2. A local coordinate system is defined along the axial direction by x as shown in the figure.

for element ‘e’

For the above element ‘e’, by approximating the unknown displacement through a linear function we can write,

`u(x)= a+bx`                                                                                       (3)

At first, we will evaluate the general form of linear shape function for the 1D element ‘e’. Here `a` and `b` are constants. These constants are obtained by using boundary conditions and equation (3).

Figure 1.3 depicts an element with a local coordinate system that has been denoted by `x`. At `x=x_1` the node 1 displacement is denoted as `u_1^e`. So, substituting these values in equation (3) we get,

At, `x= x_1 ,u(x_1 )=u_1^e`                                                      `u(x_1 )= a+b(x_1 ) =u_1^e`                                                      (4)

Similarly, at `x=x_2` the node 2 displacement is denoted as `u_2^e`. So, substituting these values in equation (3) we get,

At,  `x= x_2 ,u(x_2 )=u_2^e`                                                       `u(x_2 )= a+b(x_2 )=u_2^e`                                                      (5)

From equation (4) we can write `a` as,

`a=u_1^e-b(x_1 )`                                                                                                                                                                         (6)

By substituting this value of `a` in equation (5) we get,

`u_2^e = u_1^e-b(x_1 )+b(x_2 )`

`b(x_2 )-b(x_1 )= u_2^e- u_1^e`

`b(x_2-x_1)= u_2^e- u_1^e`

`b= - (u_1^e)/(x_2-x_1 ) + (u_2^e)/(x_2-x_1 )`                                                                                                                              (7)

Now the value of `a` can be evaluated by substituting the obtained value of `b` in equation (6)

`a=u_1^e-b(x_1 )`

`a=u_1^e-{- (u_1^e)/(x_2-x_1 ) + (u_2^e)/(x_2-x_1 )}(x_1 )`

`a= (u_1^e (x_2-x_1 )- (u_2^e- u_1^e )(x_1 ))/(x_2-x_1 )`

`a= (u_1^e x_2-u_1^e x_1- u_2^e x_1+ u_1^e x_1)/(x_2-x_1 )`

`a= (u_1^e x_2- u_2^e x_1)/(x_2-x_1 )`                                                                                                                                          (8)

The evaluated values of `a` and `b` from equations (7) and (8) can further be written as,

`a={x_2/(x_2-x_1 )} u_1^e- {x_1/(x_2-x_1 )} u_2^e`                                                                                                                      (9)

`b= {(-1)/(x_2-x_1 )} u_1^e+ {1/(x_2-x_1 )} u_2^e`                                                                                                                       (10)

By substituting the values of `a` and `b` in equation (3) and re-arranging it in terms of `u_1^e` and  `u_2^e` we get,

The terms `φ_1 (x)` and `φ_2 (x)` in equation (11) are called shape functions and `u_1^e,u_2^e` are the corresponding nodal displacements of an element.

element in 1D

In the more general form, the linear shape function for nodal point x_i`from figure 1.4 can be written as,

`x_(i-1),x_i,x_(i+1),…` are the nodal points in figure 1.4 and `φ_(i-1), φ_i, φ_(i+1),…`are the corresponding shape functions for the nodes. The shape functions in equation (12) are highlighted by a solid black line having the value 1 at the node `x_i`. The shape function for element A in equation (12) is depicted by a solid black line on the left side of the node `x_i`  and the shape function for element B in equation (12) is depicted by a solid black line on the right side of the node `x_i`. The node `x_i`is a common node for element A and element B and the linear shape function for that node can be described by equation (12). Similarly, the support of the adjacent shape functions is shown with the dotted lines. It can be seen that the shape function has a value of 1 at nodal points and a value of 0 at all other nodes.

The above expression is further used to obtain the shape functions for a 1D bar element shown in figure 1.3 above with boundary conditions, `x_1=0` and `x_2=l^e`. The displacement is approximated through a linear function as shown in equation (3). These constants `a` and `b` are obtained by using boundary conditions. The following equation can also be evaluated directly by substituting `x_1=0` and `x_2=l^e` in equations (4)-(10).

At,  `x=0 ,u(0)=u_1^e`                                                           `u(0)= a+b(0) =uϕ_1^e`                                                            (13)

At,  `x=l^e ,u(l^e )=u_2^e`                                                     `u(l^e )= a+b(l^e )=u_2^e`                                                      (14)

By solving equations (13) and (14) we get the value of constants `a` and `b`,

`a=u_1^e`                                                                                                                                                                                (15)

`b= ((u_2^e-u_1^e ))/l^e`                                                                                                                                                        (16)

Hence equation (3) can be written as,

So, `φ_1 (x)` and `φ_2 (x)`are the linear shape functions for the 1D bar element. The solution `u(x)` can be interpolated between the discrete nodal values `u_1^e` and `u_2^e` using these shape functions. Figure 1.5 depicts the shape functions for the 1D element at two nodes.

## Properties of Shape Functions

Below are some properties of shape functions you should be familiar with:

1, The shape function has a value of 1 at nodal points and a value of 0 at all other nodes. This is also called as Kronecker delta property. From figure 1.5 and equation (17), we know the value of `φ_1 (x)` and `φ_2 (x)`.

At node 1,

`φ_1 (x)= {1-(x/l^e ) }`,           at  `x=0 → φ_1 (0)= {1-(0/l^e ) }=1`

`φ_1 (x)= {1-(x/l^e ) }`,           at  `x=l^e → φ_1 (0)= {1-(l^e/l^e ) }=0`

Similarly, at node 2,

`φ_2 (x)= {(x/l^e ) }`,              at  `x=l^e → φ_1 (0)= {(l^e/l^e ) }=1`

`φ_2 (x)= {(x/l^e ) }`,              at   `x=0 → φ_1 (0)= {(0/l^e ) }=0`

2 The sum of shape functions is equal to zero.

`φ_1 (x)+ φ_2 (x)= 1 →{1-(x/l^e ) }+{(x/l^e ) }=1`

Author

Author

Skill-Lync

Related Blogs

A Guide to Help FEA Engineers Get Started With Vehicle Dynamics - Part 1

Explore the fundamentals of vehicle dynamics and ultimate trends in the field from design and modeling to control with Skill Lync's exclusive course on the subject. Read about how Skill-Lync's CAE courses can help you get employed.

29 Jul 2020

How Using GT-Power in CFD Can Benefit the Automation Industry

In this article, we will briefly discuss the working, applications, and features of the one-dimensional systematic simulation tool, GT-Power, in Emission Control Strategy, engine calibration, hybrid vehicle modeling. Read about how Skill-Lync's CAE courses can help you get employed.

29 Jul 2020

Design Basics of Geometric Dimensioning and Tolerancing

This article offers a brief introduction to the globally accepted standard of Geometric Dimensioning and Tolerancing, and its importance for the entire manufacturing process. Read about how Skill-Lync's CAE courses can help you get employed.

29 Jul 2020

Chapter 5 – Going a step into Biomechanics

10 May 2020

The Basics of the Powertrain NVH: Part 2

The powertrain is the most prominent source of vibrations that affects the driving experience for the people on board. This blog from Skill-Lync examines these vibrations to help enhance that experience.

22 Aug 2020

Author

Skill-Lync

Related Blogs

A Guide to Help FEA Engineers Get Started With Vehicle Dynamics - Part 1

Explore the fundamentals of vehicle dynamics and ultimate trends in the field from design and modeling to control with Skill Lync's exclusive course on the subject. Read about how Skill-Lync's CAE courses can help you get employed.

29 Jul 2020

How Using GT-Power in CFD Can Benefit the Automation Industry

In this article, we will briefly discuss the working, applications, and features of the one-dimensional systematic simulation tool, GT-Power, in Emission Control Strategy, engine calibration, hybrid vehicle modeling. Read about how Skill-Lync's CAE courses can help you get employed.

29 Jul 2020

Design Basics of Geometric Dimensioning and Tolerancing

This article offers a brief introduction to the globally accepted standard of Geometric Dimensioning and Tolerancing, and its importance for the entire manufacturing process. Read about how Skill-Lync's CAE courses can help you get employed.

29 Jul 2020

Chapter 5 – Going a step into Biomechanics

10 May 2020

The Basics of the Powertrain NVH: Part 2

The powertrain is the most prominent source of vibrations that affects the driving experience for the people on board. This blog from Skill-Lync examines these vibrations to help enhance that experience.

22 Aug 2020

Related Courses

LS-DYNA for Structural Mechanics/FEA
4.8
19 Hours of content
Cae Domain
4.8
35 Hours of content
Cfd Domain
4.9
18 Hours of content
Cfd Domain
Recently launched
23 Hours of content
Cfd Domain
Showing 1 of 19 courses
Try our top engineering courses, projects & workshops today!