Skip to content
Queensferry

Module 9 · Lesson 9.2

Assembly and boundary conditions

Adding element contributions into the global matrix, and what striking out a row physically means.

Why this matters

Two steps in the solver account for most of the confusion in modelling: how elements combine, and what a support does to the arithmetic. Both are simpler than their reputation. Assembly is addition. A restraint is a deleted row.

Getting these two clear is what makes the diagnostics in Module 12 read as obvious rather than as a list to memorise.

By the end of this lesson you should be able to

  • Assemble a global matrix by scattering element contributions into their degrees of freedom
  • Explain why the unreduced global matrix is always singular
  • Apply restraints by striking out rows and columns and say what that asserts
  • Recognise a mechanism as a failed factorisation rather than as a mysterious error

Assembly is addition

Number every degree of freedom in the model. Each element occupies a few of them — four, for a two-dimensional bar. Take that element's 4×4 matrix and add each entry into the global matrix at the row and column its degree of freedom owns.

That is the entire algorithm. There is no cleverness in it, and two consequences follow immediately:

A node shared by three elements receives three contributions on its diagonal. More elements meeting at a node makes it stiffer, which is why a heavily-connected node barely moves.

A node connected to nothing receives nothing. Its rows stay zero. The solve then fails — not because the software is fussy, but because a zero row is the equation 0 = f, which has no solution unless f is also zero. That is the whole story of a disconnected node, and it is why the diagnostic in lib/comp/bar.ts can catch it before the solve is even attempted.

The unreduced matrix is always singular

Assemble a model and, before applying any restraint, the global matrix has no inverse. Always. Every model, every time.

The reason is the row sums from the last lesson. Because every element's rows sum to zero, so do the global ones. Translate the whole structure and no force appears anywhere — so the matrix maps a non-zero displacement to a zero force, which is the definition of a singular matrix.

This is not a defect. It is the structure telling you, in arithmetic, that it does not yet know where it is.

Restraints strike out rows

A restraint says: this degree of freedom does not move. If it does not move, its displacement is known — it is zero — so it is not an unknown, and its equation is not needed to find the others.

So the solver deletes that row and that column. The reduced matrix that remains is smaller, and — if the model is adequately restrained — no longer singular.

Deleting the column is the part worth pausing on. It removes the contribution that degree of freedom would have made to the other equations. Since it is not moving, it contributes nothing to their force balance, and removing it is exactly correct.

A restraint is not a force. It is a statement that one unknown is already known, and the arithmetic that follows from it.

Why restraint is needed where there is no load

This is the question the module exists to answer properly.

A plane truss carrying only vertical load still needs a horizontal restraint. The structure does not need it — nothing pushes sideways. The matrix needs it, because without it the horizontal direction retains a zero-stiffness mode and the factorisation divides by zero.

There is a physical reading too, and it is the more satisfying one. A real structure sitting on a real foundation has friction. It is restrained horizontally whether or not the design relies on it. Modelling zero horizontal stiffness is not conservative; it is a statement about the world that is not true.

Try it

Boundary condition explorer

A three-bar triangle with a vertical load at the apex. Hold and release each support direction and watch what the factorisation does.

Node A restraints

Node B restraints

A plane structure needs at least three independent restraints. Fewer and the reduced matrix is still singular; more and the structure becomes externally indeterminate.

Restrained directions
3
Equations to solve
3
Factorisation
succeeded
Failed at
Condition number
6.7

15.2 of 16 digits survive

Exactly three restraints: statically determinate externally. The reactions follow from statics alone and do not depend on any member stiffness.

Force in AC
-100.0 kN

compression

Force in BC
-100.0 kN

compression

Force in AB
80.0 kN

tension

Try these

  • Release every restraint. The model is free to translate and rotate, and the factorisation fails on the first free degree of freedom.
  • Hold only Ax and Ay. Two restraints prevent translation and not rotation about A — the structure spins.
  • Hold Ax, Ay and By. Three restraints, determinate, and the member forces are what statics gives.
  • Add Bx as well. It still solves, the member forces change, and the change came from a restraint the real structure may not have.

What this shows: A mechanism is a failed factorisation with a name attached — the solver can tell you which direction has no stiffness, and that is more useful than adding restraint until it runs.

Check yourself

A model of a plane frame is fully restrained at both column bases and the solve still fails on a zero pivot. What is the most likely cause?

Practice

A plane truss has 9 nodes. Each node has 2 translational degrees of freedom. Three degrees of freedom are restrained. How many equations does the reduced system contain?

Practice

Three bars meet at a node. Their axial stiffnesses along the x direction contribute 40 000, 25 000 and 15 000 kN/m to that node's horizontal diagonal entry. What is the diagonal entry, in kN/m?

Check yourself

Why does striking out a row and column represent a support correctly?

Check yourself

A model has too few restraints and the solver reports a zero pivot. What has it found?

Summary

  • Assembly adds each element's entries into the rows and columns its degrees of freedom own
  • A disconnected node leaves a zero row, which is the equation 0 = f
  • The unreduced global matrix is singular in every model, always
  • A restraint deletes a row and a column: one unknown was already known
  • A failed factorisation names a direction — use it rather than restraining until it stops
Progress is kept in this browser only.

This is educational material. It uses simplified examples to teach principles, and must not be relied on for real design or safety-critical decisions. Module overview and checkpoint