acceleration implementation with periodic BC

266 views
Skip to first unread message

antoine

unread,
May 6, 2024, 6:01:00 AMMay 6
to basilisk-fr
Hello,

I am currently trying to simulate the fall of a drop on Basilisk. As the reduced gravity doesn't work when using periodic boundary conditions, I tried to implement my own gravitational acceleration. However, when I plot the droplet acceleration, it remains constant, meaning that there is no drag.

Does anyone have an idea of how i could implement drag with periodic boundary conditions?

Here is a plot of the expected acceleration and a simplified version of my code.
FreeFall_drop.c
Acceleration_plot.png

Haochen Huang

unread,
May 14, 2024, 2:45:37 AMMay 14
to basilisk-fr
Hi Antoine,
Since you have applied periodic BC vertically, an additional body force should be added to ensure the conservative of momentum through the boundary, see section 2.1 in this article for more details.
Best,
Haochen

antoine

unread,
May 14, 2024, 12:17:22 PMMay 14
to basilisk-fr
Hi Haochen,

Thank you for your help. In the article you mentionned, the additional force is defined as g(rho - rho_0), where rho_0 = rho_b*alpha + (1 - alpha)*rho_f. As I am studying a drop, rho_0 = rho_d*alpha + (1 - alpha)*rho_f.

In the Navier Stokes centered solver, the right hand side of the momentum equation is divided by rho http://basilisk.fr/src/navier-stokes/centered.h. Therefore, the additional force is g(1 - rho_0/rho)

When implementing this in my code, the acceleration obtained is overestimated. Do you have any clue where the issue is?
acceleration.png
FreeFall_drop.c

Haochen Huang

unread,
May 14, 2024, 9:24:03 PMMay 14
to basilisk-fr
Hi Antoine,
I find some flaw in your code:
The alpha in the article refers to the global volume fraction which therefore should be a constant instead of 'f[]' you used in event acceleration. If I understand it correctly, specific to your case the alpha reads V_{drop}/V_{domain}= \pi/900=0.0035.

antoine

unread,
May 15, 2024, 5:52:51 AMMay 15
to basilisk-fr
Hi Haochen,

The droplet acceleration remains constant when adding the body force g*rho_0, where rho_0 =  rho_d*alpha + (1 - alpha)*rho_f.
Additionally, rho_d, alpha, and rho_f are constant. Therefore, obtaining a constant acceleration is an expected behaviour.

Maybe another body force should be required to simulate drag.
acceleration.png
FreeFall_drop.c

Amin Soltani

unread,
May 22, 2024, 7:40:04 AMMay 22
to basilisk-fr
Hi Antoine,

I am currently working on simulating a rising bubble with periodic boundaries in the gravity direction. I tried the method regarding adding the body force (ρg) suggested in the above paper, but unfortunately, it did not work as expected. (my code is attached). I was wondering if you could fix this for your problem?

Besides, I just saw a paper titled "Direct numerical simulation of bubble-induced turbulence" (https://doi.org/10.1017/jfm.2021.288 ), where in the section 4, they implemented this body force (ρg) in the basilisk. Maybe it would be a good idea to reach out to them for help.

I also have another question. could you please explain me how you calculated the droplet acceleration in the basilisk? since I just want to calculate it for my bubble and show that after some time it reaches 0.

Thank you so much for your help.

Best regards,
Amin
main.c

Haochen Huang

unread,
May 22, 2024, 12:02:02 PMMay 22
to Amin Soltani, basilisk-fr

Hi Antoine,Since you have included “two-phase.h” (search "rho" in “two-phase-generic.h” for more information), the rho[] on each face has already been altered according to the f[] of adjacent cell. Therefore the drag is not a constant.

Besides there is still mistake in your event acceleration: the acceleration is as you mentioned $g(1 - rho_0/rho) = g(1 - (rho_d*alpha + (1 - alpha)*rho_f) /rho )$ instead of the form you write. 

To make it clear, I upload a case in my sandbox which successfully works for bubble rising in periodic BC. Hope this helps.

Best,

Haochen


Amin Soltani amin.so...@gmail.com 于2024年5月22日周三 19:40写道:

--
You received this message because you are subscribed to a topic in the Google Groups "basilisk-fr" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/basilisk-fr/D8DCNedfgq8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to basilisk-fr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/basilisk-fr/a83ef30d-f91d-4fb1-abfa-f9307372f46en%40googlegroups.com.

antoine

unread,
May 24, 2024, 3:29:17 AMMay 24
to basilisk-fr
Hi Hoachen,

Thank you for your answer. I tried the code you uploaded in your sandbox. The bubble has an expected behaviour as it acceleration decreases over time. A plot of the velocity is available here. 
However, even if the bubble is defined in the x, y and z axis, Basilisk is running a 2D simulation as the number of cells is 4096, which corresponds to a 64² cells domain.

Therefore, I tried running this simulation using the "grid/octree" include to make it 3D. I changed the parameters to simulate a drop. Unfortunately, the droplet has a constant acceleration, meaning that there is no drag (the plot is available).

Do you have an idea of how to tune the acceleration to obtain a physical behaviour in the 3D case?

I shared my code and 2 plots, the first one is a velocity plot of your 2D simulation and the seond one is a plot of the acceleration when I try to make the simulation 3D.

Best,
Antoine
droplet_3D.png
2D periodic haochen.png
periodic_drop.c
Reply all
Reply to author
Forward
0 new messages