Re: Problem in running axisymmetric annular flow simulations

706 views
Skip to first unread message

neilneiladri

unread,
Nov 3, 2017, 6:54:24 AM11/3/17
to basilisk-fr
Dear All

I am trying to run axisymmetric gas-liquid annular flow in a capillary
using Basilisk. I am new to Basilisk and have few questions:

1. How can I monitor the convergence history of my simulations.
2. I have made a set up file (attached) and tried to run it. However, it
gives an error with a message:

ann6: /home/dr/basilisk/src/grid/events.h:242: dtnext: Assertion `n < INT_MAX' failed.
Aborted (core dumped) I would be grateful if anybody could point out what is wrong in my set up. Thanks
Neiladri
annular_profile.c

Wojciech Aniszewski

unread,
Nov 3, 2017, 7:21:11 AM11/3/17
to neilneiladri, basilisk-fr
Dear Neiladri,

there is a number of issues with your setup.
First of all, there seems to be no provision for it to end, I see no condition for ending it, it could appear
in one of the event specifications.
Secondly your init() event is wrong in more than one way. You have the 'if' with two foreach() macros nested,
this is not the way it should be done. Instead, you should have ONE foreach() macro and if INSIDE it. Second
problem is that "x" and "y" coords would be understood INSIDE the foreach(). But due to the error I described
above your "if(y>Ri)" condition is not compilable. Thus you declared "double x,y" to circumvent it.
This x,y declaration should be removed, it will not be necessary after you move the if inside foreach.

Of course, you don't even need the "if" alltogether as a matter of fact. You could have constructs such as:

foreach()
{
f[]=(y>Ri ? 1:0)
}

and similar, which functionally replace it.

Until you've fixed all these issues, analysing the output doesn't make much sense.
Good luck

Wojtek
> --
> 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/5275a209-9732-4443-9eb6-810c0f61a6de%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Wojciech (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

neilneiladri

unread,
Nov 5, 2017, 11:41:19 PM11/5/17
to basilisk-fr
Dear Wojtek,

Thanks for your suggestions. I have made the suggested changes in my set-up file( modified file attached). But still, while trying to run it , I get the same error message:

ann8: /home/dr/basilisk/src/grid/events.h:242: dtnext: Assertion `n < INT_MAX' failed.
Aborted (core dumped)

I would be grateful if the probable reasons for this error message can be pointed out. Also, I would like to know how I can monitor the convergence history of my simulations.

Thanks,
Neiladri
annular_profile (copy).c

Wojciech Aniszewski

unread,
Nov 6, 2017, 7:36:10 AM11/6/17
to neilneiladri
Dear Neiladri.
Please find attached the modify version of your annular.c file.

First of all, if you want to see convergence statistics, a modest step in this direction
is to display multigrid iteration steps when Poisson eqn is solved. This can be done by printing
values of mgp.i, mgpf.i and mgu.i scalars, as you'll see in the file. You'll see my version has an event


event printout(i++; t<=tend){
fprintf(stdout,"i= %d t= %.4e mg[ %d %d %d ] max(u,v)= %.3e %.3e ",i, t, mgp.i, mgpf.i, mgu.i, statsf(u.x).max, statsf(u.y).max);
}

which also prints maximum velocity values, so that you can observe if your simulation is running in the matter you predicted.

I also added gfsoutput as I was debugging this briefly. So, it seems like your simulation sufferes from momentum conservation - or the lack of it - issue. You may read more about this in papers of Rudman (1998) (something newer here: https://doi.org/10.1016/j.compfluid.2017.04.023). At least, when running this at maxlevel 10 the way you do, you definitely get a velocity peak next to the inlet -> both u and v jump to 1e06, to which Basilisk responds with the n<int_max message.

There's no "simple" way around the issue in axisymmetric setup, some other group users please correct me if I'm wrong, but I think momentum-conserving version doesn't work with axi.h? Anyway. For now, a simple "workaround" would be to slightly decrease tolerance in Poisson solver (there are literally HUNDREDS of such trick people use, starting from solver tuning, through "artificial" dumping, flux limiters etc.). In your setup, I tuned TOLERANCE from its default value of 1e-03 to 1e-04 and as you should see, the case works in a stable manner.

Quick check with maxlevel = 9 is running stable (granted, that's probably not enough to resolve interface perturbations here). But I ran maxlevel 10 through 1240 iterations and no problems found.

Hope you'll find this useful.
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/007ac19c-67d9-4b5a-9881-ade4ece6797c%40googlegroups.com.

neilneiladri

unread,
Nov 6, 2017, 8:22:04 AM11/6/17
to basilisk-fr
Thanks a lot


On Friday, November 3, 2017 at 4:24:24 PM UTC+5:30, neilneiladri wrote:

neilneiladri

unread,
Nov 7, 2017, 8:49:32 AM11/7/17
to basilisk-fr

Dear Wojciech,

Thanks again for your help. While going through the modifications in the set-up file, I noticed that while providing boundary conditions, you have commented the line f[left]=y<Ri?0:1. The question that I have here is that if this line is commented, then how the volume fraction at the inlet is being specified?

Thanks again,
Neiladri


On Friday, November 3, 2017 at 4:24:24 PM UTC+5:30, neilneiladri wrote:

Taofiq Hasan

unread,
May 22, 2020, 1:50:08 AM5/22/20
to basilisk-fr
Hello Wojceich,

I am having similar issue as Neiladri had and I think your response in this thread has pretty much answered my question already. But Unfortunately I do not find the attachment as you mentioned here. So could you please make the file available for me so that I can have a look. Its going to be really helpful for me.

N.B: I am running an axisymmetric case for a liquid jet impinging a solid wall in its way. I have run planar case already which gives good results, but in axisymmetric case it shows an error message "/basilisk/src/grid/events.h:245: dtnext: Assertion `n < 2147483647' failed." and the code stops running.


thanks for your help.


Best ,
Taofiq




> To unsubscribe from this group and stop receiving emails from it, send an email to basil...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages