Non-Reflecting Boundary Conditions in OpenFOAM

What we want to achieve

When we simulate fluid flow, we have to cut a finite computational domain out of an entire flow region. For accurate simulation, we need to let fluid and sound wave flow smoothly out of the domain through the boundary.

The reflection at the boundary has a larger effect on the solution especially when we perform a compressible flow simulation as can be seen in the following movie (Upper: With reflection, Lower: Without reflection of sound wave).

In OpenFOAM, we can use two approximate non-reflecting boundary conditions:

They determine the boundary value by solving the following equation

\frac{D \phi}{D t} = \frac{\partial \phi}{\partial t} + \boldsymbol{U} \cdot \nabla \phi = 0, \tag{1} \label{eq:advection}

where \(D/Dt\) is the material derivative and \(\boldsymbol{U}(\boldsymbol{x}, t)\) is the advection velocity.

We assume that the advection velocity \(\boldsymbol{U}\) is parallel to the boundary (face) normal direction and rewrite the eqn. \eqref{eq:advection} as

\frac{D \phi}{Dt} \approx \frac{\partial \phi}{\partial t} + U_{n} \cdot \frac{\partial \phi}{\partial \boldsymbol{n}}= 0, \tag{2} \label{eq:advection2}

where \(\boldsymbol{n}\) is the outward-pointing unit normal vector.

These boundary conditions are different in how the advection speed (scalar quantity) \(U_{n}\) is calculated and it is calculated in advectionSpeed() member function.

advective B.C.

The advection speed is the component of the velocity normal to the boundary

U_n = u_n. \tag{3} \label{eq:advectiveUn}

waveTransmissive B.C.

The advection speed is the sum of the component of the velocity normal to the boundary and the speed of sound \(c\)

U_n = u_n + c = u_n + \sqrt{\gamma/\psi}, \tag{4} \label{eq:waveTransmissiveUn}

where \(\gamma\) is the ratio of specific heats \(C_p/C_v\) and \(\psi\) is compressibility.

What do lInf and fieldInf mean?

Coming soon.

Author: fumiya

CFD engineer in Japan

7 thoughts on “Non-Reflecting Boundary Conditions in OpenFOAM”

  1. I think what you published was actually very reasonable.
    However, what about this? suppose you were to create a awesome post title?
    I ain’t suggesting your information is not solid, however what if
    you added something to maybe grab people’s attention? I mean Non-Reflecting Boundary Conditions
    in OpenFOAM | Fumiya Nozaki's CFD Blog is
    a little boring. You should peek at Yahoo’s home page and
    note how they create post headlines to grab viewers to click.

    You might try adding a video or a pic or two to get readers
    interested about everything’ve got to say. Just my opinion, it would bring your
    website a little livelier.

    1. Hi Betway88,

      Thanks for your valuable feedback!
      I’ll try to make my blog more visually understandable.

  2. I really like your website and it explain many useful topics
    do you have further explaination for lInf and fieldInf ?
    Also what is the connection between mixedFvPatchField and equation (1)?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.