The Central Idea

Finite-element modeling replaces one difficult global approximation with many simpler local approximations.

The basic transition is

\[ \boxed{ \text{continuous domain} \longrightarrow \text{small elements} \longrightarrow \text{local approximations} \longrightarrow \text{assembled global solution} }. \]

The power of the method comes from combining geometric flexibility with systematic linear algebra.

What Is a Finite Element?

A finite element is one small subregion of a larger computational domain.

In one dimension, an element may be an interval:

\[ [x_i,x_{i+1}]. \]

In two dimensions, elements are often triangles or quadrilaterals. In three dimensions, they may be tetrahedra, hexahedra, or other polyhedra.

The Mesh

A mesh is the complete collection of finite elements used to partition the domain.

The mesh describes:

The mesh is the geometric foundation of the finite-element model.

Nodes

Nodes are selected points associated with the mesh.

Unknown values are often stored at nodes.

In a one-dimensional mesh,

\[ x_0 the nodal values may be written

\[ u_0,u_1,\ldots,u_N. \]

The finite-element approximation between nodes is built from these nodal values.

Elements Connect Nodes

In one dimension, element \(e\) may connect two neighboring nodes:

\[ x_i \longleftrightarrow x_{i+1}. \]

In two dimensions, a triangular element connects three nodes.

The connectivity pattern determines how local element equations contribute to the global system.

Why Use Elements?

A complicated function may be difficult to approximate accurately over an entire large domain with one simple formula.

The same function may be approximated well by simpler formulas on many small subregions.

This is the same broad numerical strategy used throughout approximation: simplify locally, then combine globally.

Piecewise Linear Approximation

The simplest one-dimensional finite element uses a linear function on each interval.

On element

\[ [x_i,x_{i+1}], \]

the approximate solution may be

\[ u_h(x)=a+bx. \]

The coefficients are chosen so that the local function matches the nodal values \(u_i\) and \(u_{i+1}\).

Local Interpolation

Let an element have endpoints \(x_1\) and \(x_2\), with nodal values

\[ u_1,\qquad u_2. \]

The local approximation can be written as

\[ \boxed{ u_h(x)=N_1(x)u_1+N_2(x)u_2 }. \]

The functions \(N_1\) and \(N_2\) are local basis functions, also called shape functions.

Linear Shape Functions

On the interval \([x_1,x_2]\), define

\[ N_1(x) = \frac{x_2-x}{x_2-x_1}, \] \[ N_2(x) = \frac{x-x_1}{x_2-x_1}. \]

These satisfy

\[ N_1(x_1)=1,\qquad N_1(x_2)=0, \] \[ N_2(x_1)=0,\qquad N_2(x_2)=1. \]

Therefore, the interpolation matches the nodal values exactly.

Partition of Unity

The linear shape functions satisfy

\[ \boxed{ N_1(x)+N_2(x)=1 }. \]

This property is called a partition of unity.

It helps ensure that constant fields are represented exactly on the element.

Example: Local Interpolation

Suppose an element spans

\[ x_1=0,\qquad x_2=2, \]

with

\[ u_1=4,\qquad u_2=10. \]

At \(x=1\),

\[ N_1(1)=\frac{2-1}{2}=\frac12, \] \[ N_2(1)=\frac{1-0}{2}=\frac12. \]

Therefore,

\[ u_h(1) = \frac12(4)+\frac12(10) = \boxed{7}. \]

Piecewise Functions

Across a full mesh, the finite-element approximation is piecewise defined.

One linear formula applies on the first element, another on the next, and so on.

The pieces are connected through shared nodal values so that the global approximation is usually continuous.

Local Support

A finite-element basis function is usually nonzero only near its associated node.

This is called local support.

Because each basis function interacts with only nearby elements, the resulting global matrices are often sparse.

Sparsity is one of the major computational advantages of finite-element systems.

Global Basis Functions

A finite-element approximation over the whole domain can be written

\[ \boxed{ u_h(x) = \sum_{j=1}^{M}U_j\phi_j(x) }. \]

Here:

Degrees of Freedom

A degree of freedom is an independent unknown used to represent the approximate solution.

In a simple scalar linear-element model, one degree of freedom may correspond to the value of \(u\) at one node.

More advanced elements may store:

Why Irregular Geometry Matters

Many physical domains are not rectangles.

Examples include:

Triangular and tetrahedral meshes can conform to such shapes more naturally than simple Cartesian grids.

Triangular Elements

In two dimensions, a common finite element is a triangle with three vertices.

A linear triangular element approximates the solution using three nodal values:

\[ u_1,\qquad u_2,\qquad u_3. \]

The approximation has the form

\[ u_h(x,y) = N_1(x,y)u_1 + N_2(x,y)u_2 + N_3(x,y)u_3. \]

Higher-Order Elements

Finite elements do not have to use linear approximations.

Higher-order elements may use:

Higher-order elements can represent smooth variation more accurately, but they increase the number of degrees of freedom and the complexity of local calculations.

Refinement

There are two broad ways to improve a finite-element approximation.

Mesh refinement uses smaller elements. Polynomial refinement uses higher-order basis functions.

These strategies are often described informally as:

\[ h\text{-refinement} \]

and

\[ p\text{-refinement}. \]

Adaptive Refinement

A mesh does not have to be refined uniformly.

Smaller elements can be placed where:

This is one of the major strengths of finite-element modeling.

From Differential Equation to Weak Form

Finite-element methods commonly begin by rewriting a differential equation in an integral form called a weak form.

The key idea is to multiply the differential equation by a test function and integrate over the domain.

This reduces the differentiability demanded of the approximate solution and naturally introduces boundary terms.

Why the Weak Form Helps

Suppose the original equation contains a second derivative such as

\[ -u''(x)=f(x). \]

The strong form requires the second derivative of \(u\).

After integration by parts, the weak form can involve only first derivatives of the approximate solution.

This is important because piecewise linear finite-element functions have simple first derivatives but may not possess ordinary second derivatives at element boundaries.

Integration by Parts

A one-dimensional weak-form derivation uses

\[ \int_a^b (-u'')v\,dx. \]

Integration by parts gives

\[ \int_a^b u'v'\,dx - \left[u'v\right]_a^b. \]

The second derivative has been transferred from \(u\) to a first-derivative product plus a boundary term.

Test Functions

A test function is used to probe whether the approximate solution satisfies the governing equation in an integral sense.

Instead of requiring the differential equation to hold exactly at every point, the weak form requires an integrated residual condition to hold for a family of test functions.

This is one reason finite-element methods fit naturally with basis-function approximations.

Galerkin Idea

In a common finite-element approach, the test functions are chosen from the same family as the basis functions used to represent the approximate solution.

This is the basic Galerkin idea.

If

\[ u_h(x) = \sum_jU_j\phi_j(x), \]

then test functions may also be selected from the \(\phi_j\).

Element Equations

After substituting local basis functions into the weak form, each element produces a small algebraic system.

Symbolically,

\[ \boxed{ K^{(e)}\mathbf{u}^{(e)} = \mathbf{f}^{(e)} }. \]

Here:

The Element Stiffness Matrix

In many diffusion, elasticity, and structural problems, the element matrix is called a stiffness matrix.

For a simple one-dimensional linear element of length \(L_e\), a common form is

\[ \boxed{ K^{(e)} = \frac{k}{L_e} \begin{bmatrix} 1 & -1\\ -1 & 1 \end{bmatrix} }. \]

The exact physical meaning of \(k\) depends on the model.

Local Matrices Are Small

Each element usually involves only a few local degrees of freedom.

A two-node one-dimensional element gives a \(2\times2\) matrix. A three-node triangular element often gives a \(3\times3\) matrix for a scalar field.

Large finite-element systems are built by combining many such small local contributions.

Assembly

Assembly is the process of combining element equations into one global system.

If two elements share a node, their contributions at that node are added together.

The global system has the form

\[ \boxed{ K\mathbf{U} = \mathbf{F} }. \]

The matrix \(K\) is assembled from all local element matrices.

Connectivity Controls Assembly

Element connectivity maps local node numbers to global node numbers.

For example, an element may use local nodes

\[ 1,\ 2 \]

that correspond globally to

\[ 5,\ 9. \]

The element matrix entries must therefore be inserted into the global matrix at rows and columns associated with nodes \(5\) and \(9\).

Sparse Global Matrices

Because each element connects only nearby nodes, most global node pairs do not interact directly.

Therefore, most entries in the global matrix are zero.

Such a matrix is called sparse.

Sparse storage and sparse linear-algebra methods are essential for large finite-element models.

Boundary Conditions

Boundary conditions must be incorporated into the global system.

Common types include:

The weak-form framework naturally accommodates many derivative-based boundary conditions.

Essential Boundary Conditions

Conditions that directly prescribe the value of the unknown are often called essential boundary conditions.

For example,

\[ u(0)=5. \]

If the boundary node is node \(0\), then

\[ \boxed{U_0=5}. \]

The global system must be modified to enforce this known degree of freedom.

Natural Boundary Conditions

Conditions involving fluxes, forces, or derivatives often arise naturally from the boundary term produced by integration by parts.

For example, a derivative condition may contribute directly to the global load vector.

This natural appearance of boundary terms is one reason weak formulations are so useful.

Solving the Global System

After assembly and boundary-condition enforcement, the model often reduces to

\[ K\mathbf{U} = \mathbf{F}. \]

Linear-algebra methods are then used to solve for the unknown coefficients

\[ \mathbf{U}. \]

These coefficients define the approximate finite-element solution throughout the mesh.

Recovering the Solution Inside Elements

Once nodal values are known, the solution at interior points of an element is reconstructed from the basis functions.

For a two-node linear element,

\[ u_h(x) = N_1(x)u_1+N_2(x)u_2. \]

The finite-element solution is therefore available throughout the domain, not only at nodes.

Derived Quantities

Many applications require derivatives or secondary fields.

From the approximate solution, one may compute quantities such as:

These derived quantities may be evaluated element by element.

Finite Elements Versus Finite Differences

Finite-difference methods usually approximate derivatives directly at grid points.

Finite-element methods usually:

Both methods discretize continuous models, but they organize the approximation differently.

Why Finite Elements Handle Geometry Well

Triangles and tetrahedra can fit irregular boundaries by varying their size and shape.

This allows the mesh to represent:

Geometric flexibility is one of the defining advantages of the finite-element framework.

Material Variation

Different elements may use different parameter values.

For example, a conductivity parameter may vary by element:

\[ k=k_e. \]

This makes it natural to represent domains containing several materials or spatially varying properties.

Numerical Integration

Element matrices and vectors often contain integrals.

These integrals may not always be evaluated symbolically.

Numerical quadrature can approximate expressions such as

\[ \int_{\Omega_e} N_i(x)N_j(x)\,dx. \]

Gaussian quadrature is a common technique in practical finite-element implementations.

Reference Elements

Instead of deriving formulas separately for every physical element, many methods map each element to a standard reference element.

For example, a one-dimensional interval may be mapped to

\[ -1\le \xi\le1. \]

Shape functions and quadrature rules can then be defined once on the reference element and transformed to each physical element.

Coordinate Mapping

A physical coordinate \(x\) may be represented in terms of a reference coordinate \(\xi\).

For a simple linear element,

\[ x(\xi) = N_1(\xi)x_1 + N_2(\xi)x_2. \]

This same interpolation idea can describe both the solution and the element geometry.

Jacobian of the Mapping

Transforming integrals from a reference element to a physical element introduces a geometric scaling factor called a Jacobian.

In one dimension,

\[ dx = J\,d\xi, \]

where

\[ J=\frac{dx}{d\xi}. \]

In multiple dimensions, the Jacobian becomes a matrix and its determinant scales area or volume.

Mesh Quality

Not all meshes are equally good.

Poorly shaped elements can reduce accuracy or create numerical difficulties.

Mesh quality may depend on:

Error and Convergence

A finite-element solution is an approximation.

Accuracy depends on:

Refinement studies help assess whether the numerical solution is converging.

Mesh-Convergence Study

Suppose a quantity of interest is computed on increasingly refined meshes:

\[ Q_1,\qquad Q_2,\qquad Q_3. \]

If the changes

\[ |Q_2-Q_1| \]

and

\[ |Q_3-Q_2| \]

become smaller, the result may be approaching a mesh-independent value.

Local Error Indicators

Some finite-element methods estimate where the numerical error is largest.

These estimates can guide adaptive refinement so that computational effort is concentrated where it is most valuable.

This creates an iterative workflow:

\[ \text{solve} \rightarrow \text{estimate error} \rightarrow \text{refine} \rightarrow \text{solve again}. \]

Static and Dynamic Problems

Finite elements can be used for both steady and time-dependent models.

A static problem may lead directly to

\[ K\mathbf{U}=\mathbf{F}. \]

A dynamic problem may involve additional matrices and time derivatives.

For example,

\[ M\ddot{\mathbf{U}} + C\dot{\mathbf{U}} + K\mathbf{U} = \mathbf{F}(t). \]

Mass and Damping Matrices

In dynamic finite-element models:

Time-stepping methods are then combined with the spatial finite-element discretization.

Nonlinear Finite-Element Models

Not every finite-element system is linear.

Nonlinearity may arise from:

Such problems may require iterative nonlinear solvers.

Common Error: Confusing the Mesh with the Solution

The mesh describes the computational geometry and connectivity.

The finite-element solution is the set of coefficients and basis functions defined on that mesh.

A fine-looking mesh does not by itself guarantee an accurate solution.

Common Error: Ignoring Element Connectivity

Assembly depends on knowing which local nodes correspond to which global nodes.

Incorrect connectivity can place element contributions into the wrong rows and columns of the global matrix.

This can produce a completely incorrect global system even when every local matrix is correct.

Common Error: Using Poorly Shaped Elements

Extremely stretched or distorted elements can degrade numerical accuracy.

Mesh generation should therefore consider element quality, not only element count.

Common Error: Refining Everywhere

Uniform refinement may dramatically increase computational cost even when only a small region requires additional resolution.

Adaptive refinement can often achieve better efficiency by targeting the regions that contribute most strongly to the error.

Common Error: Misapplying Boundary Conditions

Prescribed values, fluxes, forces, and interface conditions enter the finite-element equations in different ways.

Treating every boundary condition as if it were the same type can corrupt the global system.

Common Error: Assuming More Elements Always Means Better Results

More elements can reduce discretization error, but they do not correct:

Mesh refinement is a numerical improvement, not a replacement for model verification and validation.

A Reliable Finite-Element Workflow

  1. Define the physical or mathematical domain.
  2. State the governing differential equations.
  3. Specify material properties and model parameters.
  4. Define boundary and interface conditions.
  5. Create a mesh of nodes and elements.
  6. Choose local basis or shape functions.
  7. Form the weak or integral statement.
  8. Derive element matrices and vectors.
  9. Map local degrees of freedom to global degrees of freedom.
  10. Assemble the global system.
  11. Apply boundary conditions.
  12. Solve for the unknown coefficients.
  13. Recover derived quantities.
  14. Perform mesh-refinement and verification studies.
  15. Interpret results in the context of the model assumptions.

Practice 1: Count Elements

A one-dimensional mesh has nodes at

\[ x_0,\ x_1,\ x_2,\ x_3,\ x_4. \]

If each neighboring pair forms one element, how many elements are present?

Practice 2: Local Interpolation

A two-node element has nodal values

\[ u_1=2,\qquad u_2=8. \]

At the midpoint, the linear shape functions satisfy

\[ N_1=N_2=\frac12. \]

Find the interpolated value.

Practice 3: Partition of Unity

For linear shape functions on a two-node element, what is

\[ N_1(x)+N_2(x)? \]

Practice 4: Assembly Concept

Two elements share one global node.

What happens to the two local contributions associated with that shared node during global assembly?

Practice 5: Sparse Matrix

Why is the global finite-element matrix often sparse?

Practice 6: Boundary Condition

A model prescribes

\[ u=12 \]

at a boundary node.

Is this an unknown degree of freedom or a known value that must be enforced?

Practice 7: Refinement

A solution changes substantially when the mesh is refined.

What does this suggest about the coarser solution?

Practice 8: Geometry

Why are triangular elements often useful for irregular two-dimensional domains?

Practice Answers

Practice 1

Five nodes connected consecutively create four intervals, so there are

\[ \boxed{4} \]

elements.

Practice 2

\[ u_h = \frac12(2)+\frac12(8) = 1+4 = \boxed{5}. \]

Practice 3

\[ \boxed{ N_1(x)+N_2(x)=1 }. \]

Practice 4

The local contributions are added into the same global matrix or vector location associated with the shared node.

Practice 5

Each element interacts directly with only a small set of neighboring degrees of freedom. Most global node pairs are therefore uncoupled, so most matrix entries are zero.

Practice 6

It is a known prescribed value that must be enforced in the global system.

Practice 7

The coarser solution may not yet be mesh independent and may have significant discretization error.

Practice 8

Triangles can vary in size and orientation and can conform flexibly to curved, angled, and irregular boundaries.

What to Remember

Finite-element methods approximate a continuous problem by combining local element-level approximations into one global solution.

The central principle is: approximate locally on simple elements, then assemble those local pieces into a consistent global model.

Where We Go Next

Finite-element methods divide continuous geometric domains into connected local elements. Other computational models begin with systems that are already naturally organized into cells, nodes, links, or networks.

The next lesson, Cellular and Network Models, examines simulation frameworks in which local states evolve across grids, graphs, and connected structures through neighborhood and interaction rules.