Lesson 6 of 13 20 min

Boundary Conditions & Solution

We now have the assembled global system $[K]\{u\} = \{F\}$. But this system is singular — the stiffness matrix has no inverse because the structure can undergo rigid body motion. We must apply boundary conditions to constrain the structure before we can solve.

Types of Boundary Conditions

1. Displacement (Essential) Boundary Conditions

These specify known values of the primary variable:

  • Fixed support: $u = 0$ (zero displacement)
  • Prescribed displacement: $u = u_0$ (non-zero value)
  • Symmetry: $u_n = 0$ (no displacement normal to symmetry plane)

Also called Dirichlet or essential boundary conditions.

2. Force (Natural) Boundary Conditions

These specify known values of the secondary variable:

  • Applied force: $F = F_0$
  • Free surface: $F = 0$ (traction-free)
  • Pressure: Distributed normal force

Also called Neumann or natural boundary conditions.

Click on nodes to toggle boundary conditions. Watch how the system matrix changes and observe the solution update.

Why the System is Singular

Before applying boundary conditions, the assembled matrix is singular (determinant = 0). This means:

  • Infinite solutions exist (rigid body motion)
  • The matrix cannot be inverted
  • No unique displacement can be computed

Physical Interpretation

A structure with no constraints can:

  • Translate in any direction
  • Rotate about any axis (in 2D/3D)

These are rigid body modes. In 3D, there are 6 rigid body modes (3 translations + 3 rotations).

Mathematical View

For a singular matrix:

$$\det([K]) = 0$$

The null space of $[K]$ contains the rigid body mode vectors.

Method 1: Partitioning (Exact)

The most elegant approach is to partition the system into known and unknown DOFs.

Step 1: Reorder DOFs

Separate DOFs into:

  • Free DOFs ($u_f$): unknown displacements we solve for
  • Constrained DOFs ($u_c$): known (prescribed) displacements

Step 2: Partition the System

$$\begin{bmatrix} K_{ff} & K_{fc} \\ K_{cf} & K_{cc} \end{bmatrix} \begin{Bmatrix} u_f \\ u_c \end{Bmatrix} = \begin{Bmatrix} F_f \\ F_c \end{Bmatrix}$$

Where:

  • $K_{ff}$ = stiffness relating free DOFs to free DOFs
  • $K_{fc}$ = stiffness coupling free to constrained DOFs
  • $u_c$ = known prescribed displacements
  • $F_c$ = unknown reaction forces

Step 3: Solve for Free DOFs

From the first row:

$$[K_{ff}]\{u_f\} = \{F_f\} - [K_{fc}]\{u_c\}$$

If $u_c = 0$ (fixed supports):

$$[K_{ff}]\{u_f\} = \{F_f\}$$

Now $[K_{ff}]$ is non-singular and can be solved!

Step 4: Compute Reactions

From the second row:

$$\{F_c\} = [K_{cf}]\{u_f\} + [K_{cc}]\{u_c\}$$

Method 2: Penalty Method (Approximate)

A simpler but approximate approach — add a large stiffness to constrained DOFs.

Concept

To enforce $u_i = u_0$:

  • Add a large number $\alpha$ to $K_{ii}$
  • Add $\alpha \cdot u_0$ to $F_i$

$$K_{ii} \rightarrow K_{ii} + \alpha$$

$$F_i \rightarrow F_i + \alpha \cdot u_0$$

How It Works

The modified equation for DOF $i$ becomes:

$$(\text{original terms}) + \alpha(u_i - u_0) = 0$$

For large $\alpha$, this forces $u_i \approx u_0$.

Choosing α

  • Too small: constraint not satisfied accurately
  • Too large: numerical ill-conditioning
  • Rule of thumb: $\alpha = 10^6 \times \max(K_{ii})$

Pros and Cons

AspectPenalty Method
ImplementationVery simple
Matrix structurePreserved (no reordering)
AccuracyApproximate
Ill-conditioningRisk with very large α

Method 3: Lagrange Multipliers (Exact)

Introduces additional unknowns (the multipliers) to enforce constraints exactly.

Formulation

To enforce $u_i = u_0$, augment the system:

$$\begin{bmatrix} K & C^T \\ C & 0 \end{bmatrix} \begin{Bmatrix} u \\ \lambda \end{Bmatrix} = \begin{Bmatrix} F \\ u_0 \end{Bmatrix}$$

Where $C$ selects the constrained DOF and $\lambda$ is the Lagrange multiplier (= reaction force).

Pros and Cons

AspectLagrange Multipliers
AccuracyExact
Reaction forcesDirectly computed ($\lambda$)
Matrix sizeIncreases
Matrix propertiesLoses positive definiteness

Example: 3-Element Bar with BC

Consider our 4-node bar from the assembly lesson:

$$100\begin{bmatrix} 1 & -1 & 0 & 0 \\ -1 & 2 & -1 & 0 \\ 0 & -1 & 2 & -1 \\ 0 & 0 & -1 & 1 \end{bmatrix} \begin{Bmatrix} u_1 \\ u_2 \\ u_3 \\ u_4 \end{Bmatrix} = \begin{Bmatrix} F_1 \\ F_2 \\ F_3 \\ F_4 \end{Bmatrix}$$

Boundary conditions:
  • Node 1 fixed: $u_1 = 0$
  • Force at node 4: $F_4 = 100$ N
Using partitioning:

Free DOFs: $u_2, u_3, u_4$

Constrained DOF: $u_1 = 0$

$$100\begin{bmatrix} 2 & -1 & 0 \\ -1 & 2 & -1 \\ 0 & -1 & 1 \end{bmatrix} \begin{Bmatrix} u_2 \\ u_3 \\ u_4 \end{Bmatrix} = \begin{Bmatrix} 0 \\ 0 \\ 100 \end{Bmatrix}$$

Solution:

$$u_2 = 1 \text{ mm}, \quad u_3 = 2 \text{ mm}, \quad u_4 = 3 \text{ mm}$$

Reaction force:

$$F_1 = K_{11}u_1 + K_{12}u_2 = 0 + (-100)(1) = -100 \text{ N}$$

The reaction at the fixed support equals the applied load (equilibrium ✓).

Solving the System

Once boundary conditions are applied, we solve $[K]\{u\} = \{F\}$.

Compare direct and iterative solving approaches. Watch how Gaussian elimination and iterative methods converge to the solution.

Direct Solvers

Compute the exact solution (to machine precision):

Gaussian Elimination / LU Decomposition:
  • Factor $[K] = [L][U]$
  • Forward solve $[L]\{y\} = \{F\}$
  • Back solve $[U]\{u\} = \{y\}$
Complexity: $O(n^3)$ for dense, $O(nb^2)$ for banded (bandwidth $b$) When to use: Small to medium problems (<100,000 DOFs)

Iterative Solvers

Converge to the solution through successive approximations:

Common Methods:
  • Conjugate Gradient (CG) — for symmetric positive definite
  • GMRES — for general matrices
  • Multigrid — optimal $O(n)$ complexity
Complexity: $O(n \cdot k)$ where $k$ = iterations to converge When to use: Large problems (>100,000 DOFs), especially 3D

Preconditioners

Iterative solvers converge faster with preconditioning:

$$[M]^{-1}[K]\{u\} = [M]^{-1}\{F\}$$

Common preconditioners:

  • Incomplete LU (ILU)
  • Incomplete Cholesky (ICC)
  • Algebraic Multigrid (AMG)

Post-Processing: Computing Results

After solving for displacements, compute derived quantities:

1. Strains

$$\{\varepsilon\} = [B]\{u\}$$

For each element, use its nodal displacements and B-matrix.

2. Stresses

$$\{\sigma\} = [D]\{\varepsilon\} = [D][B]\{u\}$$

3. Reaction Forces

At constrained nodes:

$$\{F_{reaction}\} = [K]\{u\} - \{F_{applied}\}$$

4. Strain Energy

$$U = \frac{1}{2}\{u\}^T[K]\{u\}$$

Common Mistakes

  • Missing constraints: Forgetting to constrain enough DOFs leads to singular matrix
  • Overconstrained: Applying conflicting constraints (e.g., fixed + prescribed displacement at same DOF)
  • Wrong DOF constrained: Constraining rotation when translation should be fixed
  • Symmetry errors: Forgetting to constrain normal displacement at symmetry planes
  • Unit mismatch: Forces in N but stiffness in kN/mm

Verification Checklist

After solving, always check:

  • [ ] Equilibrium: Sum of reactions = sum of applied loads
  • [ ] Displacement sanity: Signs and magnitudes make physical sense
  • [ ] Stress continuity: Stresses don't jump wildly between elements (mesh refinement issue)
  • [ ] Energy balance: External work = internal strain energy

Key Takeaways

  • Boundary conditions remove rigid body modes and make the system solvable
  • Displacement BCs (essential) specify known $u$ values
  • Force BCs (natural) specify known $F$ values
  • Partitioning is exact — separates free and constrained DOFs
  • Penalty method is simple but approximate — adds large stiffness
  • Lagrange multipliers are exact — increase system size
  • Direct solvers ($O(n^3)$) for small problems; iterative for large
  • Post-processing computes strains, stresses, and reactions from $\{u\}$

What's Next

With the 1D formulation complete, we're ready to extend to 2D elements. We'll see how triangular and quadrilateral elements work and how shape functions generalize to two dimensions.