Dynamic Mesh – Rigid Body Dynamics

Download mesh

Download simulation

Introduction

This is a simple example of Rigid Body Dynamics among the Dynamic Mesh functions. It is a 1-degree-of-freedom motion of a cylinder that considers only the y-axis direction, generated by the vortex shedding of a 2D cylinder.

The cylinder diameter was 0.2 m, the flow velocity was 0.1 m/s, and it was assumed to be laminar flow.

Start BaramFlow and load mesh

Run the program and select [New Case] from the launcher. In the launcher, select [Pressure-based] for [Solver Type] and [Volume of Fluid] for [None].

Use the given polyMesh folder. In the menu, click [File]-[Load Mesh]-[OpenFOAM] and select the polyMesh folder.

General

Change Time to Transient. Use default conditions for the rest.

Models

All use default conditions.

Materials

Use the default air as is.

Cell zone Conditions

Use the default conditions as they are.

Boundary Conditions

The inlet uses the Velocity Inlet condition, and the outlet uses the Pressure Outlet condition.

  • in : Velocity Inlet
  • out : Pressure Outlet
  • sym1, sym2 : Symmetry
  • back, front : Empty
  • Cylinder : Wall, Moving Wall – Mesh Motion

Dynamic Mesh

Specify the motion of the grid. Set the Motion Type to Rigid Body Dynamics.

Solver and Acceleration Factors use default values.

Press the Add button at the bottom to add an object and set it as follows.

  • Parent : None
  • Mesh Deformation Range
    • Offset from surface : 0.005
    • Outer Distance : 1.5
  • Inertia
    • Mass : 0.01
    • Center of Inertia : (0 0 0) – Center coordinates of the cylinder
  • Local Coordinate Frame uses the default.
  • Boundaries: Select cylinder.
  • Joints: Set to allow movement only in the y-direction.
    • Press the Add Joint button and select Prismatic.
    • Direction is entered as (0 1 0).

Numerical Conditions

Select the discretization schemes as follows.

  • Time : Second Order Implicit
  • Pressure : Momentum Weighted Reconstuct
  • Momentum : Second Order Upwind

The rest all use default values.

Initialization

Enter 0.1 in X-velocity and press the Initialize button.

Run

Click the [File]-[Save] button in the menu to save.

Enter the desired number of cores in [Parallel]-[Environment] of the menu.

Run the steady state calculation and use the result as initial condition of transient calculation. Proceed in the following order.

  1. Change Time to Steady in [General].
  2. In [Run Conditions], enter 1000 for Number of Iterations and 1000 for Save Interval.
  3. Press [Start Calculation] in [Run] to start the calculation.
  4. Once the calculation is complete, change Time to Transient in [General].
  5. In [Run Conditions], change [Time Stepping Method] to Adaptive, set Courant Number to 1, and End Time to 100. Set Save Interval to 0.2. (If you change Time to Transient and move to another location, a window will appear asking whether to use the last result as the initial value for the transient calculation; click Yes.)
  6. Press [Start Calculation] in [Run] to start the calculation.

Post-processing

Run ParaView by clicking the [External tools]-[ParaView] button in the menu.

If it is a parallel operation, change [Case Type] to [Decomposed Case].

Change Coloring to U.

Enable [Camera Parallel Projection].

If you press the Play icon, you can see the following results.