Rectangular domain for the bubble.c example?

665 views
Skip to first unread message

Louis Steytler

unread,
Sep 2, 2017, 10:56:02 AM9/2/17
to basilisk-fr
Hi Everyone,

What would be the best way of changing from the cubic domain used in the bubble.c example to a long rectangular duct? I would like to study the effects of confinement on the bubble.

Because it is a 3D problem I need to use MPI. I looked at the tips on non-cubic domains on the Basilisk page and noticed that MPI would not work with tree grids and adaptive grid refinement.

I am unsure about the syntax used for doing a computation on a non-cubic domain when using MPI. Does anyone have an example I could look at? I looked at some of the examples online, but the ones using a non-cubic domain seemed to not be running MPI (or maybe I missed something)?

Thanks very much,

Louis

Wojciech Aniszewski

unread,
Sep 2, 2017, 11:05:48 AM9/2/17
to Louis Steytler, basilisk-fr
Okay, so you mix at least two problems here.
One is making the domain non-cubic.
Two is the syntax for the MPI (aka "not OpenMP").

For problem one, in your case, if you need an impermeable wall condition,
you have at least two choices. One is to use mask() function. This is the preferred
solution, and when conducting either single core or single-node (small-scale parallelism with OpenMP)
it is already implemented in Basilisk. However if you look at compatibility matrix, you'll see it's not
yet compatible with MPI (multi-node, large-scale parallelism).

Second option for problem one is to use a primitive version of the immersed boundary methods (IBM,
don't confuse with Big Blue...). It is implemented by defining fractions that are equal to one outside
of the desired domain (hint: you need at least four such fractions:)). Then, you put a condition
that if a said fraction is =1, the velocity should be 0. This is not modifying the data structure
and is not equivalent to mask. For example, projection will still project p^{n+1} into the fraction
area every timestep. But for all ends and purposes this will be a no-flow area. Reason I talk about
it is that it IS already compatible with MPI.

TL;DR: if large scale MPI-> IBM, if small scale-> mask().

Problem 2: look for flag "-D_MPI=1".

regards
w
> --
> You received this message because you are subscribed to the Google Groups "basilisk-fr" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to basilisk-fr...@googlegroups.com.
> To post to this group, send email to basil...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/basilisk-fr/d1b14576-11f4-4c8b-9125-18f80a6a7928%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


--
Wojtek Aniszewski
[Fr: vôitek anichévsky]
[Eng: voyteck aanishevsky]

Post-doctoral Resarcher,
Sorbonne University (UPMC Paris 6)
Institut ∂'Alembert

www:
[in English:] http://www.coria.fr/spip.php?auteur1606
[in Polish:] http://nauka-polska.pl/dhtml/raporty/ludzieNauki?rtype=opis&objectId=240452&lang=pl

/^..^\ ,-------------------------------------,
( (••) ) ►►►►| My public GPG key ID: AC66485E |
(|)_._(|)~ | please use email encryption! |
`-------------------------------------"
signature.asc

Louis Steytler

unread,
Sep 2, 2017, 11:32:49 AM9/2/17
to basilisk-fr, lste...@gmail.com, anisz...@dalembert.upmc.fr
Wojciech,

Thanks very much.

Just a clarification, I was referring to the syntax for creating the problem file (i.e. include header files and other function definitions in the problem.c file).

For the IBM method, I am not sure about the syntax used for defining the fractions and setting the velocities. I am assuming it would be something like what is discussed here: http://basilisk.fr/Basilisk%20C? Where do you recommended I add the definition of the fraction and the condition on the velocities? Would it be OK to define the fraction in the beginning of the main function and to set the velocities in the "init" event? Should I be using the "foreach()" iterator to set the fractions and velocities?

Thanks again,

Louis

Wojciech Aniszewski

unread,
Sep 2, 2017, 1:45:11 PM9/2/17
to Louis Steytler
Okay, pas de probleme:)

The way we've done it up to now, was to create a separate event defining the
ibm-type fraction. Something like this:

event my_wall(i++){
fraction(box1,0.5-(x));
foreach()
foreach_dimension(){
u.x[]=(1.-box1[]*u.x[];
uf.x[]=(1.-box1[]*u.x[];
}
boundary((scalar*){u});
}

of course in this example u is the velocity field, uf is the face value, my_wall is the event name.

If you only defined it in init, it would zero the velocities once, then nonzero values
would reappear.

best
w
> > an email to basilisk-fr...@googlegroups.com <javascript:>.
> > > To post to this group, send email to basil...@googlegroups.com
> > <javascript:>.

Louis Steytler

unread,
Sep 3, 2017, 9:45:24 AM9/3/17
to basilisk-fr, lste...@gmail.com, anisz...@dalembert.upmc.fr
Thanks very much!

Stephane Popinet

unread,
Sep 3, 2017, 11:07:51 AM9/3/17
to basil...@googlegroups.com

Louis Steytler

unread,
Sep 3, 2017, 4:03:10 PM9/3/17
to basilisk-fr, pop...@basilisk.fr
Stephane,

Thank you!

Louis
Reply all
Reply to author
Forward
0 new messages