Home » Introduction to Dynamic Mesh in OpenFOAM

Introduction to Dynamic Mesh in OpenFOAM

by thawtar

Dynamic meshing is one of the areas OpenFOAM is popular for but many people (including me) struggle with dynamic mesh techniques for various reasons. In this article, we will introduce various dynamic meshing techniques available in OpenFOAM. After reading this article, we expect you to understand the strengths and weaknesses of each technique and decide the best approach for your workflow.

What are dynamic meshes?

A dynamic mesh example (Case files belong to Dr. Holzmann. You can see details in his website)

So what are the dynamic meshes? Dynamic meshes also called moving meshes are numerical techniques that allow the computational mesh to change during a simulation. The changes of the mesh can be due to prescribed motion, flow induced rigid body motion, fluid structure interaction or adaptive mesh refinement. Dynamic meshes can be relevant or even necessary for several applications in engineering simulations. For instance, you may want to use some sort of dynamic mesh if you want to simulate the rotary motion inside a turbo machinery such as turbines.

On the other hand, you can simulate the same behavior without using dynamic meshes by choosing some workarounds such as MRF based approaches. But for some applications, dynamic meshes are essential. For example, if you want to model the vortex induced vibrations of structure, you need to use dynamic meshing. Moreover, in OpenFOAM, you can use dynamic mesh with various flow phenomena such as incompressible flows, compressible flows, multiphase flows, etc.

Major dynamic mesh types

Mostly used dynamic mesh techniques can be categorized as the following:

  1. Deformed mesh (or Mesh morphing): Deforming the mesh according to the motion of the object of interest
  2. Layering: Add and remove cells in the motion direction
  3. Sliding mesh: One (or more) groups of cells move relative to the stationary domain while these groups are connected through a sliding interface (Cyclic arbitrary mesh interface or AMI)
  4. Overset mesh (Chimera grids): Cell-to-cell mappings between multiple, disconnected mesh regions are employed to generate a composite domain.
  5. Adaptive mesh refinement: Mesh is dynamically refined during simulation based on some refining/coarsening criteria
  6. Solid body motion: The whole computational domain moves in a prescribed motion

Let’s compare some of the most used approaches among the above list, namely: deformed mesh, sliding mesh and overset mesh.

Deformed mesh

When properly used, deformed meshes can give you very high accuracies

The main advantage of this approach is accuracy. Deformed meshes work on a single finite volume domain without any interpolation between groups of cells. Therefore, this type of dynamic meshes can give you the highest accuracy among the three contenders. Moreover, it is very easy to setup because no information interchange is required. You will not need to setup special faces or cell zones to couple between two regions. 

However, the main disadvantage is that it cannot handle very large motion amplitudes. If the body motion is too large, nearby cells deform so much that some get zero volume, leading to simulation blow ups. Therefore, you will need to choose robust numerical schemes and linear solvers as well as small simulation time-steps if you choose deformed mesh. It can be used for single body rigid body motion problems such as ship motion or vortex induced vibration (VIV).

Sliding mesh

2D vertical axis wind turbine rotation using sliding AMI interface

The main advantage of sliding meshes is that you can use this type of dynamic mesh for rotational motions. So, if you are planning to compute rotational motion, sliding mesh is probably the optimal choice. Also, arbitrary mesh interface (AMI) method provided by OpenFOAM for sliding meshes has decent accuracy. Therefore, you would not need to worry much about accuracy if you use this mesh motion.

The disadvantage of this method is it cannot be used for combined (rotational+translational) motions. So, if you want to model the flapping motion of your airfoil, sliding mesh may not be a good option. Also, you need to generate mesh for stationary and rotation regions and create AMI patches for data exchange. This is a lot of work compared to deformed mesh.

Nevertheless, if you are modeling turbo machinery, fans, wind turbines, impellers, propellers and so on, sliding mesh is probably the best choice.

Overset mesh

Vortex induced vibration of two cylinders using overset mesh

If you are interested in modeling complex motions (either prescribed motions or sixDofRigidBody responses or combined ones), overset mesh is probably the only choice for you. The main advantage of overset mesh is that it can be used for almost any type of motion. Moreover, you can use overset meshes to handle extremely large motion amplitudes because there is no problem of mesh deformation and numerical instabilities. Even if your bodies in motion are close to each other and oscillating, you do not need to worry if you use overset mesh while deformed meshes will struggle desperately and finally fail.

Another advantage is easier mesh generation (you can find tips for mesh generation here). Overset meshes are composed of several cell groups overlapping each other. Therefore, it is much easier to generate mesh for each group than to assemble all patches and mesh together.

However, there is nothing like a free lunch. The price you need to pay for this freedom of body motion is accuracy. Overset meshes have lowest accuracy due to the interpolation between overlapping cells (donors and acceptors). You need to be very careful with the numerical schemes or otherwise, you will have nearly useless results.

Summary

In this article, we explained the pros and cons of each of the most popular dynamic mesh techniques: deformed mesh, sliding mesh and overset mesh. You can use this knowledge when choosing the proper dynamic mesh technique for your own problems. We will provide more in-depth explanations for each of these methods in the later articles. Please stay in tune.

🌟 Elevate Your Cloud Experience with CloudHPC 🌟
CloudHPC

Related Posts

Leave a Comment

🌟 Elevate Your Cloud Experience with CloudHPC 🌟

Step into a world of limitless possibilities with CloudHPC. Our state-of-the-art cloud computing platform offers unparalleled performance and scalability for your projects.

🚀 Supercharge Your Workflows: Harness the power of high-performance computing to accelerate your simulations, modeling, and data analysis tasks. 💡 Seamless Integration: Integrate seamlessly with popular tools and frameworks, ensuring a smooth transition for your projects.

🔒 Robust Security: Rest easy knowing your data is protected by industry-leading security measures, keeping your work safe and secure.

Explore the future of computing with CloudHPC. Sign up today and elevate your cloud experience to new heights!