The finite element method distinguishes between natural and essential boundary conditions. As an introduction to these concepts, consider the weak form of the left-hand side of Laplace's equation:
![]()
On the other hand, an absolute specification
at some set
of boundary nodes is called an essential boundary condition. This
is enforced by including it in the set of equations, replacing the
equation which had been formed by using
as a test function.
To illustrate this point, suppose that node
is a boundary node
with value
. The third row of the matrix is independent
of other nodal values and is given by
![\begin{displaymath}
\left[
\begin{array}
{cccccc}
0 & 0 & 1 & 0 & \cdots & 0\...
...\ u_2 \\ u_3 \\ \vdots \\ u_N\end{array}
\right]
~~=~~U\end{displaymath}](img80.gif)
Incorporation of this boundary condition into the matrix system gives the new system
![\begin{displaymath}
\left[
\begin{array}
{ccccc}
A_{11} & A_{12} & A_{13} & A_...
...{c}
R_1 \\ R_2 \\ U \\ R_4 \\ \vdots\end{array}
\right]\end{displaymath}](img81.gif)
If the matrix
is symmetric it is necessary to do a further
elimination to regain symmetry:
![\begin{displaymath}
\left[
\begin{array}
{ccccc}
A_{11} & A_{12} & 0 & A_{14} ...
...-UA_{23} \\ U \\ R_4-UA_{43} \\ \vdots\end{array}
\right]\end{displaymath}](img82.gif)
To summarise the discussion so far, essential boundary conditions are implemented by modification of the global matrix and RHS vector, whilst natural boundary conditions are often accounted for in the RHS vector alone. These concepts are so important, however, that we now provide a more detailed commentary. Some of the language concepts will be defined more completely in later chapters.
In the Galerkin procedure, a term such as
(where
denotes partial differentiation with respect to
,
could be
or
, and
might or
might not involve suffices, an unknown or another differentiation)
is multiplied by a test function
over the region
with
boundary
. For all second-order terms and some
first-order terms, the integration is done by parts. This gives:
![]()
The application of boundary conditions in the finite element method
requires either that some information is used to replace the integrand
resulting from second-order terms, when
is non-zero there, or
that for such test functions the whole equation is replaced by an
essential condition. So when Fastflo implements such
terms, it adds only the second integral into the equations - either
to the sparse matrix or the right-hand side vector. The boundary
integral is left for the user to supply, using a b statement.
If no integral is supplied, the boundary condition enforced is that
the integral is zero - a common condition in practice.
The boundary integrals often have physical significance, and it is best
to try to formulate the equations to take advantage of this. In fact,
many second-order equations correspond to one of the following
patterns:
time rate of change of heat = div (flux)
time rate of change of momentum = div (stress)
For steady equations the rates would be zero. The divergences are integrated by parts, and the boundary integrands will be the normal components of either the flux or the stress. On interior boundaries, integrals are generated on each side, and the net integrand is the difference.
There are three possible specifications on any particular boundary.
There are some potential paradoxes here, typified by the Stokes equation. Here the divergence of stress may be written
![]()
![]()
![]()
![]()
It is also important that the pressure term be in a form which would be
integrated by parts, in order to appear in an implicit boundary
stress. To divide by the density
, for example, the
term should be written as
D_i {1/rho} U2 and not {1/rho} D_i U2
which by Fastflo's rules would not be integrated by parts.
In complicated systems of equations, care is needed to ensure that where Dirichlet conditions are specified on some components but not others, they do not have the effect of overwriting any unknown boundary integrals.