New version of Basilisk View

2,036 views
Skip to first unread message

Stephane Popinet

unread,
Feb 1, 2021, 12:45:06 PM2/1/21
to basilisk-fr
Dear all,

I have just released a new javascript version of Basilisk view. If you
would like to test it, you need to update your Basilisk installation and
read the (short) documentation here:

http://basilisk.fr/src/jview/README

and feel free to explore.

If you want to test the interface in 3D, try:

cd $BASILISK/examples
CFLAGS=-DDISPLAY=-1 make tangaroa.tst

Please report any problems/successes either in reply to this message
and/or on the bugs page:

http://basilisk.fr/sandbox/bugs/README

I will try to make a video tutorial at some point.

Note also that the old (python) interface has been removed and that
there are a few changes in the view.h/draw.h interface. See here for
details:

http://basilisk.fr/src/?history

enjoy,

Stephane

moez...@gmail.com

unread,
Feb 3, 2021, 12:02:12 PM2/3/21
to basilisk-fr
Dear Dr. Popinet

Thank you very much for your time and efforts. I was working on 2D sessile drop case and everything was Ok, but when I updated to this new version, I get the following error:
Segmentation fault (core dumped)

I searched about this error and someone advised to update to gcc and I did so, but nothing changed. 
worth to say that I run the code with the following command: 

qcc -Wall -O2 sessile.c \ -L$BASILISK/gl -lglutils -lfb_osmesa -lGLU -lOSMesa -lm

Could you please help me? 

Kind regards,
Hamid




Stephane Popinet

unread,
Feb 3, 2021, 1:00:33 PM2/3/21
to basil...@googlegroups.com
Hi Hamid,

Have you done:

cd $BASILISK
make clean
make -k
make

What happens when you do

cd $BASILISK/test
make sessile.tst

cheers,

Stephane

moez...@gmail.com

unread,
Feb 3, 2021, 1:17:20 PM2/3/21
to basilisk-fr
Dear Dr. Popinet,
Thank you so much for your help. 
I did this : 
cd $BASILISK
make clean
make -k
make
and the previous error disappeared. However, I get the following errors when using tecplot.h with this new update. I know you are very busy, so I do not expect you to solve this problem. I do appreciate your time and try to figure out what the problem is. 

hamidmoezzi@HamiDMoezzI:~/basilisk/src/TestCases/sessile$ qcc -Wall -O2 sessile.c \ -L$BASILISK/gl -lglutils -lfb_osmesa -lGLU -lOSMesa -lm
/home/hamidmoezzi/basilisk/src/tecplot.h: In function ‘output_tecplot’:
/home/hamidmoezzi/basilisk/src/tecplot.h:18:17: error: ‘f’ undeclared (first use in this function)
   18 |  reconstruction(f, n, alpha);
      |                 ^
/home/hamidmoezzi/basilisk/src/tecplot.h:18:17: note: each undeclared identifier is reported only once for each function it appears in
/home/hamidmoezzi/basilisk/src/tecplot.h:53:18: error: expected expression before ‘]’ token
   53 |   fcell[iii] = f[];

Kind regards, 
Hamid

Stephane Popinet

unread,
Feb 3, 2021, 3:36:14 PM2/3/21
to basil...@googlegroups.com
> hamidmoezzi@HamiDMoezzI:~/basilisk/src/TestCases/sessile$ qcc -Wall -O2
> sessile.c \ -L$BASILISK/gl -lglutils -lfb_osmesa -lGLU -lOSMesa -lm
> /home/hamidmoezzi/basilisk/src/tecplot.h: In function ‘output_tecplot’:
> /home/hamidmoezzi/basilisk/src/tecplot.h:18:17: error: ‘f’ undeclared
> (first use in this function)
>    18 |  reconstruction(f, n, alpha);

I don't think this has anything to do with the new version. Note also
that tecplot.h is not part of Basilisk.

cheers,

Stephane

Wojciech Aniszewski

unread,
Feb 5, 2021, 8:43:35 PM2/5/21
to Stephane Popinet, basilisk-fr
Hey Stephane,
that's really cool. Three.js who would have guessed. So far so good, I tested it,
here's a screenshot of a 2D simulation. I used Firefox 78.7esr, zero issues with it.

One thing that bugged me is that bview2D was looking only for a file named exactly 'dump' and didn't want to take any arguments. So:

,----
| wojciech@orion:~/simulations/20210206_naca12(1)$ bview2D dump04700_t8.2151e-02s
| bview: could not restore from 'dump'
| wojciech@orion:~/simulations/20210206_naca12(1)$ cp dump04700_t8.2151e-02s dump
| 'dump04700_t8.2151e-02s' -> 'dump'
| wojciech@orion:~/simulations/20210206_naca12(0)$ bview2D
| # t = 0.0821509, fields = { f u.x u.y g.x g.y rhov d dsc fr surface vort pressure rateWater rateAir }
| # name: min avg stddev max
| # f: 0 0.00886885 0.0834196 1
| # u.x: -38.5877 30.8769 8.2133 98.464
| # u.y: -46.7102 -1.00303 3.436 48.9909
| # g.x: -450180 -242.052 6987.93 248853
| # g.y: -352352 33.9284 5738.44 278383
| # rhov: 1 9.86537 83.3368 1000
| # d: -0.73605 -0.4351 0.201083 0.0447569
| # dsc: 0 4.37269 2.97586 10
| # fr: 0 0.0207677 0.135374 1
| # surface: 0 2.39263e-312 0 4.66332e-310
| # vort: -11542.9 1.95009 442.217 13525.9
| # pressure: -63289.2 -35.8892 2079.71 300951
| # rateWater: 0 3.84444e-07 1.0127e-05 0.00124347
| # rateAir: 0 6.68577e-05 0.000397805 0.0279895
|
| http://basilisk.fr/three.js/editor/index.html?ws://localhost:7100
`----

But that's a minor issue. Congratulations for this new interface, looks great.
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 view this discussion on the web visit https://groups.google.com/d/msgid/basilisk-fr/9da06353-ddfe-0e5a-17a9-b3029aac8945%40basilisk.fr.

--
/^..^\
( (••) ) Wojciech (Wojtek) ANISZEWSKI
(|)_._(|)~
OrcId : https://orcid.org/0000-0002-4248-1194
Scholar: https://tinyurl.com/y28b8gfp
RG : https://www.researchgate.net/profile/Wojciech_Aniszewski
Twitter: @echo_dancers3
GPG ID : AC66485E
signature.asc

Wojciech Aniszewski

unread,
Feb 5, 2021, 8:44:24 PM2/5/21
to Stephane Popinet, basilisk-fr
Guess I forgot the attachment.
w

20210206023047.png
signature.asc

Stephane Popinet

unread,
Feb 6, 2021, 11:18:55 AM2/6/21
to anisz...@dalembert.upmc.fr, basilisk-fr
Hi Wojciech,

Thanks for the feedback.

> One thing that bugged me is that bview2D was looking only for a file named exactly 'dump' and didn't want to take any arguments. So:
>
> ,----
> | wojciech@orion:~/simulations/20210206_naca12(1)$ bview2D dump04700_t8.2151e-02s
> | bview: could not restore from 'dump'

Hmm, that's weird, it works fine for me. Are you sure that you are using
the correct version of bview2D? Otherwise try to add some debugging
output in bview.c

cheers,

Stephane

felixh...@hispeed.ch

unread,
Feb 11, 2021, 10:00:58 AM2/11/21
to basilisk-fr
Hi Stephane

I tried to vizualise one of my dump files using the new bview3D using 'bview3D mydumpfile'. I came to the list of the variables with their values, as with the old version and got a link which I opened with chromium and got the working interface. However, I did not find any way to see the fields. How do I set up a concentration field f to an isosurface or draw_vof? Does it require a parameter file as with the old version or can it be done interactively as in gfsview? 
Running karman.c as described in the mini-tutorial works fine, I see the fields and in the list of the items (square, isosurface etc) I see the variables assigned to the items. However trying to viz a saved dumpfile from the same run does not show any assignement as described above.
I also tried tangaroa.c and this time the simulation ran well, but in the bview-interface nothing was visible and the movies just black, as if it would look into the wrong direction...

So it looks that in general it works fine and I miss just one little thing :) and I think that there is a huge potential in the new version! Thanks a lot for your work!!

cheers,

Felix

Stephane Popinet

unread,
Feb 11, 2021, 10:14:51 AM2/11/21
to basil...@googlegroups.com
Hi Felix,

Did you look through the various menus? The important ones are:

- SETTINGS tab -> BASILISK section: to check that you are connected to
the server.

- Menubar -> Basilisk menu: only visible when the client is connected to
the server: use to add Basilisk 'drawing objects/commands' i.e.
'draw_vof', 'squares' etc..

- SCENE tab -> GEOMETRY tab : used to set the parameters of the drawing
objects/commands (i.e. 'color', 'f', 'min', 'max', 'spread' etc..)

I will try to do a video tutorial soon.

cheers,

Stephane

Stephane Popinet

unread,
Feb 11, 2021, 10:18:14 AM2/11/21
to basil...@googlegroups.com
I have also just published a new version which allows to visualise
interactively large (MPI) simulations running on remote clusters.
Upgrade and see:

http://basilisk.fr/src/jview/README#interactive-display-of-a-remote-simulation

cheers,

Stephane

felixh...@hispeed.ch

unread,
Feb 12, 2021, 12:00:33 PM2/12/21
to basilisk-fr
Hi Stephane

thanks a lot! that helped! I 'f' was the key, I suppose now that it means 'field' :). So I can try to explore all the possibilities :)

cheers,

Felix

Stephane Popinet

unread,
Feb 12, 2021, 1:19:04 PM2/12/21
to basil...@googlegroups.com
'f' means Focus.

You can see the other keyboard shortcuts in the SETTINGS tab.

felixh...@hispeed.ch

unread,
Feb 15, 2021, 3:19:44 AM2/15/21
to basilisk-fr
I also found that by IMPORTing old .bv files, which I produced earlier, I could vizualise these runs also with the new bview. Many thumbs up!

cheers, Felix

felixh...@hispeed.ch

unread,
Feb 19, 2021, 4:54:46 AM2/19/21
to basilisk-fr
I have3 another questions:

1) when using the bview server to look at a dumpfile, I can save the settings in a basilisk view file which I want to use for the production of
    movies. For this, I copy the contents of the view command in this .bv file into the view command within my .c file. However, these two are
   not fully compatible, e.g. tz does not exist. will this be fixed in the near future, or are better ways to deal with this?

2) it looks like that the new bview does no longer update when a new snapshot arrives. is there a possibility to have this?

3) how do I compile a program by hand in order to have the connection to the bview-server?
CFLAGS=-DDISPLAY=-1 qcc -Wall -O2 program.c -o program -L$BASILISK/gl -lglutils -lfb_osmesa -lGLU -lOSMesa -lm
does not work correctly, so I think I miss something.
using make program.tst works and also restarting the compiled program from the 'program' directory works fine.

any ideas?

cheers, Felix

felixh...@hispeed.ch

unread,
Feb 19, 2021, 5:55:36 AM2/19/21
to basilisk-fr
for 1) above: my actual run hints that missing tz is not that important :) at least the ongoing movie looks like that I was seeing in bview...

cheers, Felix

j.a.v...@gmail.com

unread,
Feb 19, 2021, 7:30:51 AM2/19/21
to basilisk-fr
Hallo Felix,

For 3) , you can add the flag to the compiler just like the other flags:

qcc -DDISPLAY=-1 -O2 .... etc

Antoon
Op vrijdag 19 februari 2021 om 11:55:36 UTC+1 schreef felixh...@hispeed.ch:

felixh...@hispeed.ch

unread,
Feb 23, 2021, 2:50:00 AM2/23/21
to basilisk-fr
Hallo Antoon

tnx a lot, that helped! I had to compile the wsServer and indicate its place in the command and since then it works flawless :)

cheers, Felix

Stephane Popinet

unread,
Mar 3, 2021, 12:14:50 PM3/3/21
to basil...@googlegroups.com
> 1) when using the bview server to look at a dumpfile, I can save the
> settings in a basilisk view file which I want to use for the production of
>     movies. For this, I copy the contents of the view command in this
> .bv file into the view command within my .c file. However, these two are
>    not fully compatible, e.g. tz does not exist. will this be fixed in
> the near future, or are better ways to deal with this?

Hi Felix,

This problem should be fixed in the version I just released. See

http://basilisk.fr/src/?changes=20210303164905

cheers,

Stephane


Saman

unread,
Apr 8, 2021, 2:34:28 AM4/8/21
to basilisk-fr
Dear Stephane,

I am want to display a remote simulation interactively. I used these commands:

qcc -source -grid=octree -D_MPI=1 ATM.c
mpicc -Wall -std=c99 -DDISPLAY=-1 -O2 _ATM.c -o ATM -I$BASILISK -L$BASILISK/gl -lglutils -lfb_osmesa -lOSMesa -lGLU -lm
mpiexec ./ATM 2>> log >> out

the simulation started but display.html file is not generated.

Thanks for your help in advance.

best,

Saman

Stephane Popinet

unread,
Apr 8, 2021, 2:44:05 AM4/8/21
to basil...@googlegroups.com
You need to do:

qcc -source -grid=octree -D_MPI=1 -DDISPLAY=-1 ATM.c

mpicc -Wall -std=c99 -O2 _ATM.c -o ATM -I$BASILISK -L$BASILISK/gl

Saman

unread,
Apr 8, 2021, 2:56:22 AM4/8/21
to basilisk-fr
Hello Stephane,

I did as you said:
qcc -source -grid=octree -D_MPI=1 -DDISPLAY=-1 ATM.c

mpicc -Wall -std=c99 -O2 _ATM.c -o ATM -I$BASILISK -L$BASILISK/gl -lglutils -lfb_osmesa -lOSMesa -lGLU -lm
 
and the simulation is running.
Again, I do not have display.html. Should it be generated in the running directory?

Cheers,

Saman

H LIU

unread,
Apr 20, 2021, 9:29:06 PM4/20/21
to basilisk-fr
Hi Stephane,

I tried the new version of Basilisk View and I have two questions:
1) How to output the image from the new version of Basilisk view?
2) is there a way to produce images from a series of snapshots, just like before: https://groups.google.com/g/basilisk-fr/c/IBwaZpBwyYA/m/C71rsJE5BgAJ

Thanks 

Hu LIU

atp...@gmail.com

unread,
Apr 27, 2021, 5:51:30 PM4/27/21
to basilisk-fr
Hello Stephane,

I am reading an individual dump file using the new Bview2D. I have a few of questions in that regard:

1. Does the new bview have a way to create a legend of the colors in a squares plot? I know that colormap_color function does returns colormap for a given val, min and max, but can this be called from within New Bview?
2. To plot velocity magnitude using squares, I tried directly entering: "sqrt(u.x*u.x+u.y*u.y)" in color field of squares function, and it did not give an error. Is this the correct way?
3. Can I query value of a field at a specific coordinate using Bview?

Thanks,
Aditya

atp...@gmail.com

unread,
May 5, 2021, 1:00:07 PM5/5/21
to basilisk-fr
Hello Hu Liu,

Did you find the answer to your 2nd question?

Thanks,
Aditya

gumu...@gmail.com

unread,
May 6, 2021, 9:54:01 PM5/6/21
to basilisk-fr
Hi Stephane,

I find the new image processing framework really cool! I'm not really familiar with javascript though, and I'm not sure how to export the image/scene. How do we do this?

Thanks
Monica

Jacob Maarek

unread,
Jun 21, 2021, 7:54:45 AM6/21/21
to basilisk-fr
Hello Aditya and all,

1) Did you ever find how to create a colorbar for the squares plot you discussed in question 1?
2) How do you change the colormap in the new Bview? In the old Bview you would include the option " map = blue_white_red" in the squares function call for example. Is it possible to do the same thing with the new Bview?

atp...@gmail.com

unread,
Jun 21, 2021, 10:06:20 PM6/21/21
to basilisk-fr
Hello Jacob,

Unfortunately I could not find anyway to draw a scale or legend for the colorscale used when plotting a field using squares.The most I could do was define the min and max explicitly and that allows an idea of the colors vs values. I think basilisk automatically plots using a Jet colorscale ( Blue-White-Yellow-Red). I did not find any variable in the new bview to define map variable.
There are two things that I have started doing to produce plots close to being useful:
a. Read the dump files through a basilisk script, and then output the png files as required through the usual methods we use when plotting videos or images during simulation runtime. I use this sometimes to plot vof interfaces, contours or velocity field when colorscale is not essential to know exactly.
b. Convert the dumpfiles to paraview .vtu files, and then use paraview to process them. This is not a flawless approach as Paraview does not draw contours well with Quadtree and octree data. But, I can at least have basic functions like a color legend for plot, changing vector plot density and scaling, mirror the dataset with its own scaling, etc.

regards,
Aditya

Stephane Zaleski

unread,
Feb 8, 2022, 6:09:47 AM2/8/22
to basil...@googlegroups.com
Hi

  I am trying to view the video at the bottom of the page


  but it does not show on my machines. Does anyone else have the same issue ? 

  Best

Stéphane

Youssef Saadeh

unread,
Feb 8, 2022, 6:15:18 AM2/8/22
to Stephane Zaleski, basil...@googlegroups.com
Dear Stéphane,

I am supposing your machine is a mac. In this case, which browser are you using? It doesn’t show for me when I use Safari (movies on the basilisk website seem to be incompatible with safari), but if I use Chrome for instance, I can view it with no problems.

Best,
Youssef

--
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.

"Pierre-Yves Lagrée (PYL)"

unread,
Feb 8, 2022, 6:17:03 AM2/8/22
to Youssef Saadeh, Stephane Zaleski, basil...@googlegroups.com
Dear All


 

Dear Stéphane,

I am supposing your machine is a mac. In this case, which browser are you using? It doesn’t show for me when I use Safari (movies on the basilisk website seem to be incompatible with safari), but if I use Chrome for instance, I can view it with no problems.


Opera Firefox and Chrome work as well, and same problem even for the last Safari 

@++



Best,
Youssef

On 8 Feb 2022, at 12:09 PM, Stephane Zaleski <stephane...@gmail.com> wrote:

Hi

  I am trying to view the video at the bottom of the page


  but it does not show on my machines. Does anyone else have the same issue ? 

  Best

Stéphane


--
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/86E189D4-01CC-4FB4-96C1-D373EAAFA11D%40gmail.com.


--
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.

----> ----> ----> ----> ----> ----> ----> ----> 
--->  ---> Pierre-Yves Lagrée (PYL) ----> ---->
//////////////////////////////////////////////

Stephane Zaleski

unread,
Feb 8, 2022, 6:43:18 AM2/8/22
to basil...@googlegroups.com
Thank you Pierre-Yves and Youssef

It has worked well for me on Chrome, but after a long waiting time (after I had sent the message) in the background. So it was a suprise when I was talking about something else in the class, and Stephane's voice suddenly popped up.

And yes I use a mac ;)
Reply all
Reply to author
Forward
0 new messages