# Vortex induced vibration (cylinder vibration)

**URL:** <https://fenicsproject.discourse.group/t/vortex-induced-vibration-cylinder-vibration/4181>\
**Category:** mesh\
**Created:** [September 27, 2020, 8:10am UTC](https://fenicsproject.discourse.group/t/vortex-induced-vibration-cylinder-vibration/4181 "2020-09-27T08:10:54Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Orangewang](https://avatars.discourse-cdn.com/v4/letter/o/eada6e/32.png) [@Orangewang](https://fenicsproject.discourse.group/u/Orangewang)\
**Post date:** [September 27, 2020, 8:10am UTC](https://fenicsproject.discourse.group/t/vortex-induced-vibration-cylinder-vibration/4181/1 "2020-09-27T08:10:54Z")

</div>

Hello,everyone,  
I am going to calculate the vibration of cylinder expericing the flow,Can anyone tell me how to achieve it using the FEnics.

---

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [September 27, 2020, 8:17am UTC](https://fenicsproject.discourse.group/t/vortex-induced-vibration-cylinder-vibration/4181/2 "2020-09-27T08:17:41Z")

</div>

Please be more specific with your question. First of all, what kind of fluid flow (Stokes or Navier-Stokes) and what kind of material (linear elasticity or non-linear elasticity).  
See for instance [TurtleFSI](https://github.com/KVSlab/turtleFSI) for fluid structure interaction using fenics.

---

<div class="post-metadata">

**Author:** ![Orangewang](https://avatars.discourse-cdn.com/v4/letter/o/eada6e/32.png) [@Orangewang](https://fenicsproject.discourse.group/u/Orangewang)\
**Post date:** [September 27, 2020, 8:29am UTC](https://fenicsproject.discourse.group/t/vortex-induced-vibration-cylinder-vibration/4181/3 "2020-09-27T08:29:04Z")

</div>

Thank you very much for your reply, I will study the link you gave me carefully.  
In addition, I recently study the two-dimensional cylindrical vortex-induced vibration, which belongs to the NS equation. I only consider the movement of a two-dimensional cylinder, not the deformation of the structure.  
At present, I don’t know how to apply the pressure of the flow field to the cylinder, and then make the cylinder produce lateral displacement. How to implement this model through fenics, are there any related similar tutorials?  
Thanks again for your reply！

---

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [September 27, 2020, 8:42am UTC](https://fenicsproject.discourse.group/t/vortex-induced-vibration-cylinder-vibration/4181/4 "2020-09-27T08:42:24Z")

</div>

You need to compute the displacement given the pressure field over the obstacle, and then use the `ALE.move` command to do so. See for instance: [https://bitbucket.org/fenics-project/dolfin/src/946dbd3e268dc20c64778eb5b734941ca5c343e5/python/demo/undocumented/submesh/demo\_submesh.py](https://bitbucket.org/fenics-project/dolfin/src/946dbd3e268dc20c64778eb5b734941ca5c343e5/python/demo/undocumented/submesh/demo_submesh.py) and [https://bitbucket.org/fenics-project/dolfin/src/master/python/demo/undocumented/ale/demo\_ale.py](https://bitbucket.org/fenics-project/dolfin/src/master/python/demo/undocumented/ale/demo_ale.py)

---

<div class="post-metadata">

**Author:** ![Orangewang](https://avatars.discourse-cdn.com/v4/letter/o/eada6e/32.png) [@Orangewang](https://fenicsproject.discourse.group/u/Orangewang)\
**Post date:** [September 27, 2020, 8:48am UTC](https://fenicsproject.discourse.group/t/vortex-induced-vibration-cylinder-vibration/4181/5 "2020-09-27T08:48:32Z")

</div>

Thank you very much for your guidance and reply, I will try to solve this problem according to the method you said. [https://github.com/jerabaul29/Cylinder2DFlowControlDRL](https://github.com/jerabaul29/Cylinder2DFlowControlDRL)  
Thank you very much again

---

<div class="post-metadata">

**Author:** ![Orangewang](https://avatars.discourse-cdn.com/v4/letter/o/eada6e/32.png) [@Orangewang](https://fenicsproject.discourse.group/u/Orangewang)\
**Post date:** [September 27, 2020, 9:22am UTC](https://fenicsproject.discourse.group/t/vortex-induced-vibration-cylinder-vibration/4181/6 "2020-09-27T09:22:49Z")

</div>

Hello , how should I integrate the pressure on the cylindrical surface to get the lift in the vertical direction?

If I get the lift, then the displacement of the cylinder can be calculated, and then the vibration of the cylinder can be realized according to the method you have mentioned above.

---

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [September 27, 2020, 9:34am UTC](https://fenicsproject.discourse.group/t/vortex-induced-vibration-cylinder-vibration/4181/7 "2020-09-27T09:34:51Z")

</div>

This is straightforward,  
`assemble(p*n[1]*ds(cylindermarker)`  
Where ds is a measure with subdomain markers marking the cylinder with a given tag.

I would suggest familiarizing yourself with dolfin, through the demos and for instance: [https://zenodo.org/record/3564206#.X3Bcdvd4UlQ](https://zenodo.org/record/3564206#.X3Bcdvd4UlQ) where I have code for computing drag and lift coefficients for the DFG benchmark.

---

<div class="post-metadata">

**Author:** ![Orangewang](https://avatars.discourse-cdn.com/v4/letter/o/eada6e/32.png) [@Orangewang](https://fenicsproject.discourse.group/u/Orangewang)\
**Post date:** [September 27, 2020, 9:38am UTC](https://fenicsproject.discourse.group/t/vortex-induced-vibration-cylinder-vibration/4181/8 "2020-09-27T09:38:38Z")

</div>

thank you very much for your guidence, i will try this method 😁

---

<div class="post-metadata">

**Author:** ![Orangewang](https://avatars.discourse-cdn.com/v4/letter/o/eada6e/32.png) [@Orangewang](https://fenicsproject.discourse.group/u/Orangewang)\
**Post date:** [September 29, 2020, 11:07am UTC](https://fenicsproject.discourse.group/t/vortex-induced-vibration-cylinder-vibration/4181/9 "2020-09-29T11:07:55Z")

</div>

Hello, Professor Dokken， I am sorry to bother you for solving problem for me again.

```python
            # Translate Solid's domain
            # dsf = Measure("ds", domain=front_mesh, subdomain_data=outfunc)
            Drag = t_s_hat[0] * dsf
            Lift = t_s_hat[1] * dsf

            drag = assemble(Drag)
            lift = assemble(Lift)
            print(type(Lift))
            front_mesh.translate(Point(0.0, Frequency * Amplitude * float(cos(Frequency * t)) * float(dt)))

```

Above, I have get the lift formulation, the type of the lift is “\<class ‘ufl.form.Form’\>”, how can I use this type to calculate the displacement of the cylinder.(using the second order differential equation of the cylinder to solve the displacement.)  
Could you tell me what is the usage of the “Lift”.  
Thank you so much for helping me!

---

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [September 29, 2020, 12:08pm UTC](https://fenicsproject.discourse.group/t/vortex-induced-vibration-cylinder-vibration/4181/10 "2020-09-29T12:08:27Z")

</div>

You can assemble the lift into a scalar value, ‘lift’.  
I do not know what kind of relation you would like to have between the lift and the displacement.

---

<div class="post-metadata">

**Author:** ![Orangewang](https://avatars.discourse-cdn.com/v4/letter/o/eada6e/32.png) [@Orangewang](https://fenicsproject.discourse.group/u/Orangewang)\
**Post date:** [September 29, 2020, 12:19pm UTC](https://fenicsproject.discourse.group/t/vortex-induced-vibration-cylinder-vibration/4181/11 "2020-09-29T12:19:21Z")

</div>

Thank you for your reply, here I explain my task for the problem.  
 ![image](https://global.discourse-cdn.com/free1/uploads/fenicsproject1/original/2X/6/69eb948b0b55e42eeacd5bbc6648fb1ddf76e3a7.png)  
In the above picture， the term in red line box represents the lift of the cylinder, so if I get the scalar value lift, I can use this value to take place the Ff. Then, I can calculate the displacement y.  
Professor Dokken,could you tell me how to convert the “Form” lift to a scalar value, I would really appreciate it, thank you!

---

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [September 29, 2020, 12:44pm UTC](https://fenicsproject.discourse.group/t/vortex-induced-vibration-cylinder-vibration/4181/12 "2020-09-29T12:44:47Z")

</div>

> [@Orangewang](#):
>
> ` lift = assemble(Lift)`

As I have already said, `lift` is a scalar value, while `Lift` is a ufl.form. Please read carefully through my answers before asking more questions.

---

<div class="post-metadata">

**Author:** ![Orangewang](https://avatars.discourse-cdn.com/v4/letter/o/eada6e/32.png) [@Orangewang](https://fenicsproject.discourse.group/u/Orangewang)\
**Post date:** [September 29, 2020, 1:00pm UTC](https://fenicsproject.discourse.group/t/vortex-induced-vibration-cylinder-vibration/4181/13 "2020-09-29T13:00:41Z")

</div>

Thank you for your help, your answ has given me a lot of help, and I will do it as you said. 😁thank you!

---

<div class="post-metadata">

**Author:** ![E\_P](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/e_p/32/1356_2.png) [@E\_P](https://fenicsproject.discourse.group/u/E_P)\
**Post date:** [October 5, 2020, 5:07am UTC](https://fenicsproject.discourse.group/t/vortex-induced-vibration-cylinder-vibration/4181/14 "2020-10-05T05:07:22Z")

</div>

Hello Orangewang,

Have you been able to complete this task? just wondering about the results.

Thanks,  
Evgeny.
