sandbox/bugs/marginal_embed.c
No flux across the embedded boundary for a marginal case.
Following this discussion, the embud_flux() function returns zero for marignal cases.
Howto Reproduce:
Modify the karman.c to use no slip everywhere;
The channel’s walls remain free slip:
Animation of the vorticity field.
Animation of the tracer field.
#include "embed.h"
#include "navier-stokes/centered.h"
#include "tracer.h"
.n[embed] = dirichlet(0.);
u.t[embed] = dirichlet(0.);
u
scalar f[];
scalar * tracers = {f};
face vector muv[];
int main() {
= 8.;
L0 (-0.5, -L0/2.);
origin = 512;
N = muv;
mu run();
}
event properties (i++)
{
foreach_face()
.x[] = fm.x[]*0.125/160.;
muv}
.n[left] = dirichlet(1.);
u[left] = neumann(0.);
p[left] = neumann(0.);
pf[left] = dirichlet(y < 0);
f
.n[right] = neumann(0.);
u[right] = dirichlet(0.);
p[right] = dirichlet(0.);
pf
event init (t = 0)
{
vertex scalar phi[];
foreach_vertex() {
[] = intersection (0.5 - y, 0.5 + y);
phi[] = intersection (phi[], sq(x) + sq(y) - sq(0.125/2.));
phi}
boundary ({phi});
fractions (phi, cs, fs);
foreach()
.x[] = cs[] ? 1. : 0.;
u}
event movies (i += 4; t <= 15.)
{
scalar omega[], m[];
vorticity (u, omega);
foreach()
[] = cs[] - 0.5;
mboundary ({m});
output_ppm (omega, file = "vort.mp4", box = {{-0.5,-0.5},{7.5,0.5}},
= -10, max = 10, linear = true, mask = m);
min output_ppm (f, file = "f.mp4", box = {{-0.5,-0.5},{7.5,0.5}},
= false, min = 0, max = 1, mask = m);
linear }
event adapt (i++) {
({cs,u,f}, (double[]){1e-2,3e-2,3e-2,3e-2}, 9, 4);
adapt_wavelet }