Dirichlet bc with embed.h

377 views
Skip to first unread message

Louis Steytler

unread,
Aug 14, 2019, 12:41:37 PM8/14/19
to basilisk-fr
Hi Everyone,

I would like to use embedded boundaries, and started experimenting with the "karman.c" example. Keeping all else the same, I removed the cylinder and the tracer, and changed the lines:

u.n[embed] = fabs(y) > 0.25 ? neumann(0.) : dirichlet(0.);
u.t[embed] = fabs(y) > 0.25 ? neumann(0.) : dirichlet(0.);

to

u.n[embed] = neumann(0.);
u.t[embed] = neumann(0.);

which correspond to a channel in -0.5 < y < 0.5 with free-slip wall. The expected flow is a uniform velocity in the channel -0.5 < y < 0.5, and that is what I get (see the attached image "neumann.png"). Next, I changed

u.n[embed] = neumann(0.);
u.t[embed] = neumann(0.);

to

u.n[embed] = dirichlet(0.);
u.t[embed] = dirichlet(0.);

In this case all the walls are no-slip. After some development length beyond the inlet, a plane Poiseuille flow is expected in the channel. The computed result is shown in the attached image "dirichlet.png", and surprisingly is the same as in "neumann.png".

I think I might be missing something, why does it seem the dirichlet condition is not enforced with the embedded boundary?

Any advice would be much appreciated.

Thanks very much,

Louis
dirichlet.png
neumann.png

Antoon van Hooft

unread,
Aug 14, 2019, 3:25:37 PM8/14/19
to basilisk-fr
Hallo Louis,

There seems to be a bug for marginal cases where the boundary lies on cell faces:
the `boundary_flux()` is not assigned to any cell, this is indeed the same as using `neumann(0)`.

You could shift the channel a bit or change the domain size.

Antoon

Louis Steytler

unread,
Aug 14, 2019, 5:03:43 PM8/14/19
to Antoon van Hooft, basilisk-fr
Hi Antoon,

That worked.

Thanks very much,
Louis

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/basilisk-fr/fb940506-d182-433f-8a4a-0fef7053f6de%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages