Hi Wojciech,
Thank you for your insight!
Could you tell me up to which time step you have run the simulation?
It seems that the bview figure that you showed was only the beginning
of the computation, and I am not sure if the unrealistic bubble only
occurs after the spread becomes large. I would like to compute up to
the same time step as you did and check if the VTU outputs look fine.
Thank you,
Athena
On Tue, Oct 16, 2018 at 2:40 PM Wojciech Aniszewski
<
anisz...@dalembert.upmc.fr> wrote:
>
> Dear Athena,
>
> I've quickly repeated your simulation (decreasing LEVEL to 8 for the sake of speed),
> and visualized the result using Bview instead of VTU+Paraview. I can't help but think
> it's a visualization issue, once displayed with bview, no problem is visible.
>
> Take a look (the interface is colored with u.y, with a cutplane behind it colored by u.x.).
> This is taken while spreading only begins, however no artifacts are visible similar to your
> Paraview screenshot.
>
> The attached picture uses draw_vof("f",...), i.e. result of a VOF/PLIC type reconstruction of
> the interface. I also tried isosurface("f") and found nothing suspicious (pictured are f=0.5 and f=0.1).
> Hence, I suspect it's a VTU and/or Paraview issue.
>
> You will find a lot of info about bview and view.h functions in the Basilisk website.
>
> best 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/abd6fe56-6665-4e25-92f2-8868eb17e8f4%40googlegroups.com.
> > For more options, visit
https://groups.google.com/d/optout.
>
> > /**
> > # Impact of a 3D cylintrical jet on a moving wall - Dimensional Version
> >
> > This code is modified based on
http://basilisk.fr/sandbox/lopez/spread.c
> > (droplet impaction).
> >
> > Involves the Navier--Stokes equations with liquid/gas interfaces
> > and surface tension. */
> >
> > #include "grid/octree.h"
> > #include "navier-stokes/centered.h"
> > #include "vof.h"
> > #include "tension.h"
> > #include "tag.h"
> >
> > #include "athena/droplet_stat.h" /*taken from sandbox/lopez/droplet_stat.h, useful to remove small droplets. */
> > #include "athena/output/save_data.h" /* output data in vtu files. */
> >
> > /**
> > The following parameters are in the SI-units.*/
> >
> > # define Rj (6.5e-4/2.) // radius of the jet
> > # define L (25.6*Rj) // simulation domain length
> > # define SIGMA 0.0630 // surface tension 0.0630 N/m
> >
> > # define rho0 1.225 // air density
> > # define rho1 1.232e3 // liquid density
> > # define mu0 1.8e-5 // air viscosity
> > # define mu1 0.106 // liquid viscosity
> >
> > # define Vj (15.46) // jet speed
> > # define Uw (15.71) // wall speed
> >
> > # define t0 (Rj*2./Uw ) // unit time d/Uw
> > # define mydt (t0/50) // max time step
> >
> > int LEVEL = 9;
> >
> > /**
> > The interface between the two-phases will be tracked with the volume
> > fraction field *f*. */
> >
> > scalar f[];
> > scalar * interfaces = {f};
> > face vector alphav[];
> > scalar rhov[];
> > face vector muv[];
> > // face vector alphav[];
> >
> > /**
> > To impose boundary conditions of the injection of the jet
> > we use an auxilliary volume fraction field *f0* which is
> > one inside the jet and zero outside.
> > We then set a constant liquid inlet velocity on the right-hand-side */
> >
> > scalar f0[];
> > u.n[right] = dirichlet( f0[]*(-Vj));
> > u.t[right] = dirichlet(0);
> > p[right] = neumann(0);
> > f[right] = f0[];
> > u.r[right] = dirichlet(0);
> > p[right] = neumann(0);
> >
> > /**
> > The wall is located at the left and moves towards the -y
> > direction with speed Uw.
> > We consider a true wall. */
> >
> > u.t[left] = dirichlet(Uw);
> > u.r[left] = dirichlet(0);
> > u.n[left] = dirichlet(0);
> > uf.t[left] = dirichlet(Uw);
> > uf.r[left] = dirichlet(0);
> > uf.n[left] = dirichlet(0);
> >
> > /**
> > At bottom, the entrance of flow is allowed and the pressure is
> > uniform and equal to zero. */
> >
> > u.n[bottom] = neumann(0);
> > uf.n[bottom] = neumann(0);
> > p[bottom] = dirichlet(0);
> >
> > /**
> > At top, front : free flow conditions. */
> >
> > u.n[top] = neumann(0);
> > uf.n[top] = neumann(0);
> > /*
> > u.n[front] = neumann(0);
> > uf.n[front] = neumann(0);
> > */
> >
> > /**
> > This is an axis-symmetric problem.
> > The plane of symmetry is located at the back z=0. */
> > uf.n[back] = 0;
> >
> >
> > /**
> > The density and viscosity are defined using the arithmetic
> > average. */
> >
> > # define rho(f) (clamp((f), 0, 1)*(rho1-rho0) + rho0)
> > # define mu(f) (mu1*f + (1. - (f))*mu0)
> >
> >
> > double deltau;
> > scalar un[];
> >
> > int main() {
> >
> > /* setting time-step */
> > DT = mydt;
> > /**
> > The computational domain is a L*L square. */
> > size(L);
> > origin (0.0, -8.0*Rj, 0.0); /* shift the origin downstream so that we have the space to compute the upstream spread of the lamella sheet*/
> > init_grid (1 << 6);
> > alpha = alphav;
> > rho = rhov;
> > mu = muv;
> > f.sigma = SIGMA;
> >
> > /* Convergence criteria */
> > TOLERANCE = 1e-4;
> >
> > /* default is TOLERANCE = 1e-4 */
> >
> > run();
> > }
> >
> > /**
> > Initial conditions: a column of cylindrical liquid jet
> > is moving with speed Vj along the -x direction. */
> >
> > event init (t = 0) {
> >
> > if (!restore (file = "restart")) {
> >
> > /**
> > Refine the mesh near the column of jet and above the wall.*/
> >
> >
> > refine ( ( sq(y)+sq(z) < 1.1*sq(Rj)|| (x < Rj ) ) &&
> > level < LEVEL) ;
> >
> > /**
> > Initialize the fraction field for the jet column. */
> > fraction(f0, sq(Rj) - sq(y) - sq(z) );
> >
> > f0.refine = f0.prolongation = fraction_refine;
> > restriction ({f0}); // for boundary conditions on levels
> >
> >
> > /**
> > Set impingement speed as -Vj */
> > foreach() {
> > f[]=f0[];
> > u.x[] = -Vj*f[];
> > }
> > boundary ({f,u.x});
> > }
> > }
> >
> >
> >
> > event properties (i++) {
> >
> > #if TREE
> > f.prolongation = refine_bilinear;
> > boundary ({f});
> > #endif
> >
> > foreach_face() {
> > double T = (f[] + f[-1])/2.;
> > alphav.x[] = fm.x[]/rho(T);
> > muv.x[] = fm.x[]*mu(T);
> > }
> > foreach()
> > rhov[] = cm[]*rho(f[]);
> >
> > #if TREE
> > f.prolongation = fraction_refine;
> > boundary ({f});
> > #endif
> > boundary((scalar *){alphav, muv, rhov});
> > }
> >
> >
> >
> > /**
> > The grid will be adapted each step according to the errors of
> > the velocity and fraction field. */
> >
> > event adapt (i += 1) {
> > adapt_wavelet ({f, u.x,u.y,u.z}, (double[]){1e-3, 1e-2, 1e-2, 1e-2},
> > maxlevel = LEVEL);
> > }
> >
> > /**
> > See droplet_stat.h . This can remove small droplets
> > */
> > event drop_remove (i += 5) {
> > remove_droplets (f, 1, true);
> > }
> >
> >
> > /** Output log files*/
> > event logfile (i++) {
> > deltau = change (u.x, un);
> > fprintf (stderr, "log output %d %g %d %d %g %g %g\n", i, t/t0, mgp.i, mgu.i, mgp.resa, mgu.resa, deltau);
> >
> > norm n = normf (u.x);
> > fprintf (stderr, "%f %g %g %g\n", DT, n.avg, n.rms, n.max); // log
> >
> > if (n.rms > pow(10,4)) {
> > fprintf (stderr, "computation diverged \n");
> > char name[80] = "diverged-fields";
> > scalar * list = {p,f};
> > vector * vlist = {u};
> > save_data(list, vlist, i, t, name);
> > return 1;
> > }
> > }
> >
> >
> > /**
> > Output data to vtu files to view in Paraview.
> > Compute up to 50t0 should reach steady state.*/
> >
> > event output_data (t=10.0*t0; t +=5*t0; t <= 50.0*t0) {
> > char name[80] = "allfields";
> > scalar * list = {p,f};
> > vector * vlist = {u};
> > save_data(list, vlist, i, t, name);
> > }
>
>
>
> --
> /^..^\ Wojciech (Wojtek) ANISZEWSKI ► Post-doctoral Researcher
> ( (••) ) [Fr: vôitek anichévsky] ► Sorbonne University
> (|)_._(|)~ [Eng: voyteck aanishevsky] ► Institut ∂'Alembert
> GPG key ► Web [English]
https://tinyurl.com/y73t4xsg [old! 2015]
> ID:AC66485E ► [Polish ]
https://tinyurl.com/yckark7n [old! 2014]