Non-convergence for p in bubble simulation

201 views
Skip to first unread message

Boqiao HUANG

unread,
Jun 27, 2025, 3:04:40 AMJun 27
to basilisk-fr
Dear all,

I am currently working on a simulation where a bubble grows in a channel and will eventually touch the upper boundary of the channel. Then the bubble is expected to be elongated by the flow. The illustration is shown in bubble_elongated.png.

I took sandbox/ecipriano/run/bubblerisengrowth.c as a starting point, to which I made some modifications. Specificly, I added a solid region to construct the channel domain from the original square domain. At the moment I am facing some difficulties :

1. at the first step of the simulation, the error occurs : 

src/poisson.h:219: warning: convergence for pfext not reached after 100 iterations
src/poisson.h:219: warning: convergence for pf not reached after 100 iterations
src/poisson.h:219: warning: convergence for pext not reached after 100 iterations
src/poisson.h:219: warning: convergence for p not reached after 100 iterations

I think this is probably due to the wrong boundary conditions, but I do not really have a clue.

2. when I printed the value of cs[ ], it says min=0.6, max=1. But in my simulation there is both solid and fluide region, so the minimum value is supposed to be 0 ?

You may find the source code (channel_flow.c) in the attachment.

Any insights or suggestions would be greatly appreciated ! 

Best regards,
Boqiao
channel_flow.c
bubble_elongated.png

Edoardo Cipriano

unread,
Jun 27, 2025, 3:45:59 AMJun 27
to basilisk-fr
Hi Boqiao,

My codes are not compatible with embed yet. If you want, you can try to extend the phase change model including the embed metrics. Alternatively, maybe you can mimic the presence of the solid walls by imposing a zero velocity in those regions.

If you decide to add the embed metrics to the phase change codes, I suggest first simulating a case without phase change but with axi and embed. This is because the order in which the headers are included in your file might be incorrect, and you may need to make additional modifications to accommodate the double metrics (fm, cm, and fs, cs).

Here are two examples of axi + embed:



Hope this helps.

Best,
Edoardo

Boqiao HUANG

unread,
Jun 28, 2025, 11:07:15 AMJun 28
to basilisk-fr
Hello Edoardo,

Thank you very much for replying. Are your codes compatible with mask() ? I wonder if I could set an upper solid boundary with mask(y > H ? top : none). I tried this strategy (in channel_flow_mask.c) but it seems that the convergence problem always exists.

Any suggestions would be greatly appreciated !

Best regards,
Boqiao

channel_flow_mask.c

Boqiao HUANG

unread,
Jul 15, 2025, 6:29:11 AMJul 15
to basilisk-fr
Dear all,

Following the 2d bubble simulation that I posted previously in this discussion, I am trying to make it a 3D version. 

The condition is the same as the 2D version : left is inflow ; right is outflow ; top and front are non-slip walls ; bottom and back are symmetry planes, which means that I simulate only a quarter of the bubble. 

To mimic the solid, I impose at the end of every timestep that u=0 in the region where y > Hsol OR z > Hsol.

However, I am facing still at the first step an error : warning: convergence for pf not reached after 100 iterations
  res: 2.8219e+09 sum: -8.43277e+11 nrelax: 100 tolerance: 4.84e+08. 

Currently I don't really have a clue where the problem is, so any suggestions would be greatly appreciated.

The code of the 3D version is attached below.

Best regards,
Boqiao 

channel_flow3d.c
Reply all
Reply to author
Forward
0 new messages