# Linear Combination Boundary Conditions

By linear combination boundary conditions (LCBCs) we mean conditions of the following type:

(1)\sum_{i = 1}^{L} a_i u_i(\ul{x}) = 0 \;, \quad \forall \ul{x} \in \omega \;,

where a_i are given coefficients, u_i(\ul{x}) are some components of unknown fields evaluated point-wise in points \ul{x} \in \omega, and \omega is a subset of the entire domain \Omega (e.g. a part of its boundary). Note that the coefficients a_i can also depend on \ul{x}.

A typical example is the no penetration condition \ul{u}(\ul{x}) \cdot \ul{n}(\ul{x}) = 0, where \ul{u} are the velocity (or displacement) components, and \ul{n} is the unit normal outward to the domain boundary.

## Enforcing LCBCs

There are several methods to enforce the conditions:

- penalty method

- substitution method

We use the substitution method, e.i. we choose j such that a_j \neq 0 and substitute

(2)u_j(\ul{x}) = - \frac{1}{a_j} \sum_{i = 1, i \neq j}^{L} a_i u_i(\ul{x}) \;, \quad \forall \ul{x} \in \omega \;,

into the equations. This is done, however, after the discretization by the finite element method, as explained below.

Let us denote c_i = \frac{a_i}{a_j} (j is fixed). Then

(3)u_j(\ul{x}) = - \sum_{i = 1, i \neq j}^{L} c_i u_i(\ul{x}) \;, \quad \forall \ul{x} \in \omega \;.

## Weak Formulation

We multiply (3) by a test function v_j and integrate the equation over \omega to obtain

(4)\int_{\omega} v_j u_j(\ul{x}) = - \int_{\omega} v_j \sum_{i = 1, i \neq j}^{L} c_i u_i(\ul{x}) \;, \quad \forall v_j \in H(\omega) \;,

where H(\omega) is some suitable function space (e.g. the same space which u_j belongs to).

## Finite Element Approximation

On a finite element T_K (facet or cell) we have u_i(\ul{x}) = \sum_{k=1}^{N} u_i^k \phi^k (\ul{x}), where \phi^k are the local (element) base functions. Using the more compact matrix notation \ub_i = [u_i^1, \dots, u_i^N], \vphib = [\vphib^1, \dots, \vphib^N]^T we have u_i(\ul{x}) = \vphib(\ul{x}) \ub_i and similarly v_i(\ul{x}) = \vphib(\ul{x}) \vb_i.

The relation (3), restricted to T_K, can be then written (we omit the \ul{x} arguments) as

(5)\int_{T_K} \vb_j^T \vphib^T \vphib \ub_j = - \int_{T_K} \vb_j^T \vphib^T\sum_{i = 1, i \neq j}^{L} c_i \vphib\ub_i \;, \quad \forall \vb_j

As (5) holds for any \vb_j, we have a linear system to solve. After denoting the “mass” matrices \Mb = \int_{T_K} \vphib^T \vphib, \Mb_i = \int_{T_K} c_i \vphib^T \vphib the linear system is

(6)\Mb \ub_j = - \sum_{i = 1, i \neq j}^{L} \Mb_i \ub_i \;.

Then the individual coefficients \ub_j can be expressed as

(7)\ub_j = - \Mb^{-1} \sum_{i = 1, i \neq j}^{L} \Mb_i \ub_i \;.

## Implementation

Above is the general treatment. The code uses its somewhat simplified version described here. If the coefficients c_i are constant in the element T_K, i.e. c_i(\ul{x}) = \bar c_i for x \in T_K, we can readily see that \Mb_i = \bar c_i \Mb. The relation (7) then reduces to

(8)\ub_j = - \Mb^{-1} \sum_{i = 1, i \neq j}^{L} \bar c_i \Mb \ub_i = \sum_{i = 1, i \neq j}^{L} \bar c_i \ub_i \;,

hence we can work with the individual components of the coefficient vectors (= degrees of freedom) only, as the above relation means, that u_j^k = \bar c_i u_i^k for k = 1, \dots, N.