Increasing the resolution for adaptivity results in segmentation fault

138 views
Skip to first unread message

Vignesh T G

unread,
Jan 7, 2019, 11:56:42 PM1/7/19
to basilisk-fr
Dear basilisk users,

I am simulating drop migration in Poiseuille flow. In the simulation, i set a minimum grid resolution (level 6) in the outer flow and  a max resolution (level 8) around the drop. The simulation runs eventhough the results are not physically correct.  However, increasing the resolution around the drop further (to level 9) results in segmentation fault as shown below.

/home/vigneshtg/basilisk/src/heights.h:330:error: Program received signal SIGSEGV, Segmentation fault.

Could someone suggest a solution to overcome this? I have attached the code with this email.

Thanks and regards
Vignesh
drop_poiseuille.c

Antoine Hoffmann

unread,
Jan 8, 2019, 3:48:42 AM1/8/19
to basilisk-fr
Hi Vignesh,

Have you tried to force refinement with the function refine(...) before calling fraction(...) in your event init(...) ? In any case I've learned that it is wise to call refine(...) every time you use fraction(...) to ensure that the created interface is the smoothest. In your code I would add :

event init(t=TDROP)
{
    refine (level < LVL_MAX && 
            sq(EPS - dR) - sq(x-X_CEN) - sq(y-Y_CEN) < 0.0 &&
            sq(EPS + dR) - sq(x-X_CEN) - sq(y-Y_CEN) > 0.0)
    fraction (f, sq(EPS) - sq(x-X_CEN) - sq(y-Y_CEN));    

}
where LVL_MAX is the maximal level refinement and dR a small thickness that I define usually with dR = (1 << LVL_MAX - 1) but you can also use a factor instead as 0.9*EPS and 1.1*EPS.

Vignesh TG

unread,
Jan 8, 2019, 5:41:56 AM1/8/19
to basilisk-fr
Hi Antoine Hoffmann,

Thank you very much, your suggestion works.  Do you know how to apply pressure drop to only one phase ? 

Presently in the simulation (drop in a poiseuille flow), i create a pressure drop for the flow using a source term as

event init_flow (t=0)
{
  const face vector g[] = {8./RE,0.};
  a = g;
}

I think this way of applying pressure drop results in stretching of the drop as shown in the pictures attached. Is there a way to apply pressure drop to only one phase ?

Regards
Vignesh
drop_t-003.png
Reply all
Reply to author
Forward
0 new messages