# Shape Functions

From KratosWiki

The **Shape Functions** or **basis fuctions**[1] are used to obtain an approach solution () to the exact solution () in the Finite Element Method as a lineal combination of some kind of well known functions .

Some typical shape functions are:

These functions can be defined:

- globally (to be applied over the whole domain of our problem); for example, using a polynomial function:
- note that the values can be obtained if a set of values are known, typically for each point position (, what is called the node);

- or locally (in subdomains of ); :
- are, in this case, the
defined for each subdomain or element, and is the value of the solution for each node**polynomial interpolation functions**;**i** - each in their corresponding node
, and for the rest of the nodes;**i**

Some important aspects to consider in the shape functions are:

- if they present continuity over the domain (or subdomain);
- if they respect the boundary conditions (for example, if , then );

## Contents |

## One-dimensional Shape Functions

- A one-dimensional bar to be analysed using the finite element method (FEM) can be divided in
**N-1**elements**(e)**limited by their**N**nodes**i**:

- The solution for each element can be approached by their corresponding to be expressed using the shape functions:

- If the shape functions are lineal polynomials, this expression becomes:

- Note that and are the first and second nodal coordinates of the element
**(e)**, where the solution and , respectively, has to be obtained.

- This expression can be written in terms of the nodal values for the unknown:

- Therefore, the shape forms can be expressed in terms of the nodal coordinates:

- Again, note that the shape function corresponding to each node takes the unity value in that node and the zero value in the other:

- More than two nodes can be used for each element. The following images show the shape functions for the quadratic (three nodes for each element) and cubic (four nodes for each element) case:

- A detailed description of
**how to obtain these shape functions**can help to understand the great importance of selecting the right order.

### One-dimensional Lagrangian Elements

- The shape functions based in this kind of polynomials, equivalents to the polynomial Lagrange[5], give the name to a particular set of finite elements called the
**Lagrangian elements**.

- For this case, the shape functions can be written:

- These expressions can be normalised using the
**natural coordinate system**, based in , a variable defined in terms of , the central coordinate of the element, as follows:

- Note that in the left node, in the central point of the element, and in the right node of the element.

- For the Linear case, this transformation can be illustrated:

- In this way, all the shape functions can be expressed and, therefore obtained, independently of the real geometry, and then easier to implement.

- The final specific expressions for the 1D Linear element are:

- Check
**other normalised shape functions**for higher order elements.