Oscillating cylinder in free stream#
In this tutorial we will be investigating uniform flow around an oscillating cylinder. The setup is inspired by the novel study by Blackburn and Henderson [BH99], and is one of the fundamental problems in classical fluid dynamics as it demonstrates flow separation and vortex shedding.
Problem description#
The problem consists of a cylinder with diameter of \(D=10\) cm oscillaing in fluid flow subject to a free-stream velocity
\(U_{\infty} = 1\) m/s, as shown in Fig. 2. For this simulation we also require the domain mesh as a
separate file, which is located in the src/oasismove/mesh
folder named cylinder.xdmf
. A visualization of the
triangulated mesh, and a zoomed in view on the cylinder is shown in Fig. 3.
Furthermore, the simulation is run for a Reynolds number equal to 500, which is adjustable in the problem file MovingCylinder.py . This will define the kinematic viscosity accordingly. Moreover, the oscillating movement is controlled by the amplitude ratio \(A_{ratio}\), the Strouhal number \(St\), and the frequency ratio \(F\). Based on these parameters, the frequency of the oscillations are defined as:
Furthermore, the cylinder position followed a sinusoidal profile in the transverse direction to the flow:
where \(A = A_{ratio}D\) is the amplitude.
Simulation in OasisMove#
To run the oscillating cylinder problem for \(T=5\) seconds with default parameters in OasisMove you can run the following command:
$ oasismove NSfracStepMove problem=MovingCylinder Re=500 u_inf=1.0 F=1.0 T=5 mesh_path=src/oasismove/mesh/cylinder.xdmf
or without explicitly writing the default parameters:
$ oasismove NSfracStepMove problem=MovingCylinder mesh_path=src/oasismove/mesh/cylinder.xdmf
and the simulation will start. The default time step is relatively small, so the simulation might take some minutes before it is complete.
Results#
When the simulation is finished, there will be a folder named results_moving_cylinder
, which contains the velocity and
pressure solution in .xdmf
format, and the forces related to the simulation, including the drag (\(C_D\)) and lift (
\(C_L\)) coefficient defined as:
stored in the forces.txt
file. In Fig. 4 we display the resulting velocity field, where we have added
vectors scaled by the velocity magnitude. Furthermore, the values saved in the forces.txt
file can be plotted to
visualize the drag and lift coefficient over time, as visualized in Fig. 5.
Adjusting the Reynolds number#
The default Reynolds number (\(Re\)) for the oscillating cylinder problem is \(Re=500\). However, this can easily be adjusted by adding it as a command line argument. For instance, we can run a simulation with \(Re=100\) by running the following command:
$ oasismove NSfracStepMove problem=MovingCylinder Re=100 mesh_path=src/oasismove/mesh/cylinder.xdmf
As an example of adjusting the Reynolds number, we have run the simulation using \(Re=1, 20, 100,\) and \(500\). In Fig. 6, we have visualized the streamlines for the four velocity fields, with emphesis on the region in the wake of the cylinder.
Note that changing the Reynolds number will effectively adjust the kinematic viscosity \(\nu\), which is related to the Reynolds number by definition:
- BH99
Hugh M Blackburn and Ron D Henderson. A study of two-dimensional flow past an oscillating cylinder. Journal of Fluid Mechanics, 385:255–286, 1999.