Why having boundaries is essential

The Simulation Guy
6 min readFeb 22, 2022

In the last two weeks, I have been telling you how engineers take a complex physical differential equation and transform it into a tamed linear equation problem, like this one:

The matricial system

The solution of a system of linear equations has one of three possible outcomes: it has no solution, it has exactly one solution and it has an infinite number of solutions. Naturally, as we are interested in physical equations, we want the sort of system that has solutions, and preferably⁰ of the “exactly one” kind… and this has everything to do with the conditions we set at the boundary of the domain.

What I mean by having boundaries. Taken from Wikipedia

As you may remember from last week and the previous one, we were talking about physical equations that are differential equations. Remembering out from college, the solutions of differential equations are a set of linearly independent functions that make a basis of a vector space — the solution space. They are not specific to a particular problem but are of a more general nature: the solution to any problem using that kind of differential equation is a linear combination of these basis. But that is not what we want as practitioners of numerical analysis: we want solutions to very particular problems.

What we need to solve are not differential equations but boundary and initial value problems. These are the problems that happen when you specify conditions for a differential equation. Namely, if the domain of the problem Ω has a boundary Γ and in this boundary, the solution takes a particular value, we write the boundary value problem as:

A boundary value problem of Laplace’s equation

So far, during my work as a researcher in numerical analysis, I have encountered three main types of boundary conditions and two subtypes, which are: Dirichlet boundary conditions, Neumann boundary conditions, Robin boundary conditions, Cauchy boundary conditions, and Periodic boundary conditions. Instead of memorizing the names of mathematicians, we can also subdivide these boundary conditions as essential, natural, and mixed boundary conditions. Let’s talk about all of them in detail and what each of these terms means in a numerical analysis setting.

Dirichlet Boundary Conditions

Dirichlet boundary conditions are the ones that directly tell what the value of the solution should be on a given region of the boundary. They are of the type we wrote for problem P as u = u₀.

In a numerical analysis framework, they are called essential boundary conditions, because, without them, our system of equations would be of the infinite number of solutions kind. So if we want our system to be unique, we need Dirichlet boundary conditions.

When writing the weak form of a boundary value problem, these conditions don’t even appear in the integral form, because they are inputs directly on the solution space¹. Philosophically speaking, you can also consider initial conditions as a sort of Dirichlet boundary condition for the time. But don’t tell anyone I said that.

Neumann Boundary Conditions

Neumann boundary conditions are the ones that tell what values the derivative of the solution should have on the boundary. Applying to problem P, one would write a Neumann boundary condition as:

Laplace’s equation with a Neumann boundary condition

Now, unlike Dirichlet BCs, Neumann BCs appear in the numerical simulation integration. When we integrated by parts the problem in Article 1 of the series, we have done it in a 1D integral sense and since v was 0 on the boundary, no extra terms appeared. However, when our integral is done over a multi-spacial domain, we have to use Stokes’ theorem, and an integral over the boundary will appear:

Application of Stokes Theorem in the weakening step of the problem

So, because we have that the inner product ∇ u ⋅ n = g, the weak form with Neumann boundary conditions is:

Weak form of Laplace’s equation with Neumann boundary conditions

And this is the origin of the name natural boundary conditions: now only Neumann boundary conditions naturally appear in the mathematical formulation of the weak problem, if g = 0, the boundary integral goes to 0 and the problem goes back to the original formulation, so having a 0 derivative on the boundary is a natural condition².

If a boundary problem has only Neumann BCs³, the system of equations will have infinite solutions. Think of Newton’s laws: an inertial body is one that is either at rest or has constant velocity. If you only prescribe the velocity of the body, you have an infinite number of deformations that is consistent with Newton’s Laws. However, when you fix the boundary with a support (effectively making u = 0) or prescribe a movement (u = u₀), the system becomes unique.

Robin Boundary Conditions

Robin BCs are the third kind of boundary conditions, which give a linear combination of the solution with its derivative at the boundary, like:

Laplace’s equation with a Robin boundary condition

Similarly to Neumann BCs, they appear in the integration by parts when we substitute ∇ u ⋅ n in the boundary integral:

Weak form of Laplace’s equation with Robin BCs

Robin BCs are very common physical problems and have a myriad of names: impedance, convective, radiation, and insulating boundary conditions, to name a few. Like Neumann boundary conditions, Robin BCs are not enough to determine the system. They are the only acceptable BC besides homogeneous Dirichlet boundary conditions (u = 0) in eigenvalue problems.

Other Boundary Conditions

There are two boundary conditions that I still want to talk about, and they are Cauchy boundary conditions and periodic boundary conditions, which are also called mixed BCs.

Cauchy BCs are, basically, an imposition of a Dirichlet and a Neumann BC over the same boundary, so:

Laplace’s equation with Cauchy BCs

And lastly, but not least, are periodic BCs, which make your domain work as if it were infinite or a torus. They are used to simulate a very large system by a small part that is far away from its edges, so they generally work like:

Periodic boundary conditions for a hexaedrical system of dimensions Lₓ, L_y, L_z

Periodicity also means that their derivatives are the same, so something like this would also happen:

Periodic boundary conditions are common to study properties of periodic structures or very large systems.

Finishing up

And with this, we close the article for the week. If anything, I would like to remind you that whenever you’re working with numerical analysis, don’t forget to set up a healthy boundary! :)

⁰Systems with an infinite number of solutions are also interesting for engineering, but only those which are eigenvalue problems.

¹You can make Dirichlet boundary conditions appear on the integrals of a weak problem using an integration technique called Nitsche’s method. This means that the solution is weakly enforced and the values for the boundary may not be exactly the value that you want, but sufficiently approximated.

²People in numerical analysis use the term natural condition interchangeably between having Neumann BCs and having a 0 derivative on the boundary.

³In some formulations, it is the opposite: Neumann BCs are essential and Dirichlet are natural. They are the exception that make the rule.

--

--

The Simulation Guy

soon to be Dr. Eng. in Mechanical Engineering, specialized in multiphysics, numerical analysis, vibroacoustics and topological optimization.