cylindrical flow (metric + embedded + adaptivity)

295 views
Skip to first unread message

alexandr...@gmail.com

unread,
Aug 1, 2023, 12:47:43 PM8/1/23
to basilisk-fr
Hello,

I wanted to simulate Rayleigh-Bénard instabilities (RBI) in a cylinder with embedded boundaries.

I already have a code for RBI in a cylinder without embed :
(I will improve the video)

Now with embed.h :
For the moment I'm not sure at 100% that my conditions are respected at the embedded boundaries. I'm still working on it but my code runs.

So following the link below
It's said that metric are maybe compatible with Solid. For the moment in my case (radial.h) I'd say yes.

I then tried to use the adaptive mesh, but I immediately get an error:

/home/alexandre/basilisk/src/embed-tree.h:243: Assertion `nv > 0.' failed.
../sysdeps/unix/sysv/linux/raise.c:50:error: Program received signal SIGABRT, Aborted.

But the compatibility matrix said "yes"...
Do you have any idea why ?

(It would be interesting to have a small simulation of a flow in cylindrical coordinate).

Last question  : 

It's necessary to write boundaries conditions on "y" direction and "x" direction ?
because we have u.r :
for example :
u.n[top] = dirichlet(0.);
u.n[right] = dirichlet(0.);

Thanks,
Best regards,
Alexandre

jose.lopez...@gmail.com

unread,
Aug 2, 2023, 4:13:08 PM8/2/23
to basilisk-fr
Hi Alexandre,

The problem is described here...


The problem is in the adaption. The list of variables must be reordered before the adaption, 

Here I sent you a patch I think it should fix it.

Please, let's me know if it works for you.

Cheers
23-08-02_list_reordering_adapt.patch

alexandr...@gmail.com

unread,
Aug 3, 2023, 2:32:20 AM8/3/23
to basilisk-fr
Hello,

Thanks for your reply.

I apply this patch
(darcs apply 23-08......patch)


But :

/home/alexandre/basilisk/src/grid/tree-common.h: In function ‘adapt_wavelet’:
/home/alexandre/basilisk/src/grid/tree-common.h:180:27: error: ‘cs’ undeclared (first use in this function); did you mean ‘cm’?
/home/alexandre/basilisk/src/common.h:50:26: note: in definition of macro ‘is_constant’
/home/alexandre/basilisk/src/grid/tree-common.h:180:27: note: each undeclared identifier is reported only once for each function it appears in
/home/alexandre/basilisk/src/common.h:50:26: note: in definition of macro ‘is_constant’
/home/alexandre/basilisk/src/grid/tree-common.h:181:65: error: expected expression before ‘{’ token
make: *** [rbcyl2.s] Error 1

The first error say: ‘cs’ undeclared  but cs should be a global variable ?

Thanks
Best regards,
Alexandre

alexandr...@gmail.com

unread,
Aug 3, 2023, 2:50:21 AM8/3/23
to basilisk-fr

Yi Dai

unread,
Aug 3, 2023, 4:28:18 AM8/3/23
to basilisk-fr
Hi Alexandre,
do you use the latest version of basilisk, i treid this example rbcyl.c without any problem. 
Dai

alexandr...@gmail.com

unread,
Aug 3, 2023, 4:43:19 AM8/3/23
to basilisk-fr
Hello,

alexandre@alexandre-HP-EliteBook-x360-1030-G8-Notebook-PC:~/basilisk$ darcs pull
Pulling from "http://basilisk.fr/basilisk"...
patch dfa701bfa5976f6ddabf45d7c52b6628378f84f4
Author: Stephane Popinet <pop...@basilisk.fr>
Date:   Sun Jun 25 15:35:09 CEST 2023
  * Z-buffer is simply an array of floats
 
  This should fix the display when using libfb_tiny with MPI
Shall I pull this patch? (1/2)  [ynW...], or ? for more options: y
patch d6f41fa60b1444cf7dd17073b6b62ce09619a1da
Author: Stephane Popinet <pop...@basilisk.fr>
Date:   Wed Jun 28 15:46:24 CEST 2023
  * The normal is always the latest one
Shall I pull this patch? (2/2)  [ynW...], or ? for more options: y
Do you want to Pull these patches? [Yglqk...], or ? for more options: y
Finished pulling.

do you use the latest version of basilisk ? almost yes ...

My code : rbcyl.c works fine without the  jose's patch 23-08-02_list_reordering_adapt (see above)

The problem comes from this code with adapt_wavelet :
Have you tried ?

How can I temporarily remove your patch Jose ?

Thanks,
Alexandre

Yi Dai

unread,
Aug 3, 2023, 5:24:56 AM8/3/23
to basilisk-fr
I tried adding cs to adapt_wavelet and it run. (without the patch)
Dai

alexandr...@gmail.com

unread,
Aug 3, 2023, 5:37:26 AM8/3/23
to basilisk-fr
Yes ! you're right, it run.
First : I remove jose's patch (darcs rollback -p "embed default variables before metric ones reorderedin lists for adaption")

and add cs to adpt_wavelet !

Capture d’écran du 2023-08-03 11-33-48.png

That's good news ! So we can use radial.h + embed.h + adapt in 3D
Thanks,
Alexandre

Alexis Berny

unread,
Aug 3, 2023, 8:56:08 AM8/3/23
to basilisk-fr
By any chance, does your simulation works with adaptivity, embed boundary AND two phases?

alexandr...@gmail.com

unread,
Aug 3, 2023, 9:15:27 AM8/3/23
to basilisk-fr
Hi Alexis !

I think it can only work with two phases if one of them touches the embedded boundary (I'm not sure).
Best regards,
Alexandre

Alexis Berny

unread,
Aug 3, 2023, 9:37:22 AM8/3/23
to basilisk-fr
Which would explain why my code is not working. I made a small simulation that show the problem (in the bug report)

Interestingly, we can use two-phase and embed together if there is no adaptivity

Youssef Saadeh

unread,
Aug 3, 2023, 9:50:15 AM8/3/23
to basilisk-fr
Dear all,

Please check Pepe's mail in this same thread. It should work if you apply the patch in here.

Best,
Youssef
Reply all
Reply to author
Forward
0 new messages