Non-zero Dirichlet boundary conditions#
In Setting up global equations directly we defined how to handle Dirichlet boundary conditions which enforce a displacement of \(0\) by striking the corresponding row/column in the final system. However, this approach doesn’t work with nonzero displacements.
Static condensation#
To apply nonzero constraints we can partition the system:
With subscript \(_f\) for the free degrees of freedom and the subscript \(_c\) for the constraint degrees of freedom.
The unknown free displacements can now be solved for:
Furthermore, this allows us to solve for the support reactions, which are, among the other terms from nodal and equivalent loads, part of \(\mathbf{f}_\mrm{c}\):
However, this approach can be annoying to code because reordering the system costs computation time and the gains when inverting the stiffness matrix are very limited.
Size-preserving approach#
An alternative approach is to modify the equations such that the system is not reordered and the size is preserved. This can be done by replacing the line which includes the non-zero Dirichlet boundary condition with the boundary conditions itself, i.e. for a system of 3 equations:
The boundary condition \(u_2 = \Delta_2\) can be inserted:
Which can be further simplified to:
Example#
Let us use what we have just learned on a simple example:
This example has the same two-element bar model as in Setting up global equations directly and Element loads, so the stiffness matrix is unchanged, including the support reactions:
Static condensation#
Our constrained degrees of freedom are \(u_1\) and \(u_3\), while \(u_2\) is free:
\( \mathbf{u}_\mrm{f} = u_2\)
\( \mathbf{u}_\mrm{c} = \begin{bmatrix} u_1\\u_3\end{bmatrix}\)
This gives:
\( \mathbf{f}_\mrm{f} = \cA{\cfrac{q\ell_1}{2}} \cB{+ \cfrac{q\ell_2}{2}}\)
\( \mathbf{f}_\mrm{c} = \begin{bmatrix} H_1 \cA{ + \cfrac{q\ell_1}{2}}\\H_3 \cB{ + \cfrac{q\ell_2}{2}}\end{bmatrix}\)
Partitioning the stiffness matrix leads to:
with:
\(\mathbf{K}_\mrm{ff} = \cA{\cfrac{EA_1}{\ell_1}} + \cB{\cfrac{EA_2}{\ell_2}} \)
\(\mathbf{K}_\mrm{fc} = \begin{bmatrix} \cA{-\cfrac{EA_1}{\ell_1}} & \cB{-\cfrac{EA_2}{\ell_2}} \end{bmatrix}\)
\(\mathbf{K}_\mrm{cf} = \begin{bmatrix} \cA{-\cfrac{EA_1}{\ell_1}} \\ \cB{-\cfrac{EA_2}{\ell_2}} \end{bmatrix}\)
\(\mathbf{K}_\mrm{cc} = \begin{bmatrix}\cA{\cfrac{EA_1}{\ell_1}} & 0\\ 0 & \cB{\cfrac{EA_2}{\ell_2}}\\ \end{bmatrix}\)
Now, the unknown \(\mathbf{u}_\mrm{f}\) (including only \(u_2\)) can be solved for using the equations provided in Static condensation.
Size-preserving approach#
Now let’s apply the alternative approach. First, let’s set the \(u_1 = 0\):
No terms are added to the force vector as this enforced displacement is \(0\).
Let’s continue with the displacement \(u_3 = \bar u\):
Now, a term is added to the force vector, as \(\mathbf{K}_{23}\) wasn’t equal to 0 (and now it is).
This matrix equation can now be solved for \(\mathbf{u}\).