Vortex shedding is a common phenomena when a fluid flow passes around a body. Here, the vortex shedding of viscoelastic fluid around oscillating cylinder is simulated. For simulation, dynamic mesh library is added to OpenFOAM solver *viscoelasticFluidFlow*. The solver is available only in foam-extended versions.

## DynamicMesh settings in OpenFOAM

In dynamicMesh library, there are different methods to handle grid after cylinder displacement. I used *displacementLaplacian* in this simulation which solve a Laplace equation to relocate cell’s vertices in grid.

laplacian(diffusivity,C)=0

where diffusivity and C are the diffusivity coefficient and the position of vertices, respectively. There are several ways to assign diffusivity, here *inversePointDistance *is chosen where diffusivity value has inverse relation with distance to the patch

diffusivity inversePointDistance 1(cylinder);

The cylinder displacement is considered via the *oscillatingDisplacement *boundary condition. This BC needs two entries: oscillating velocity (*omega*) and *amplitude*.

Drag and lift force calculation

Also, the *forces* library is modified to compute lift and drag on viscoelastic fluid flow. The implemented code for forces is available **here**. The lift and drag coefficient is shown in below.