Can anyone explain "ToVTK4" and what is happening there?

Hey guys, so looking through the wiki on Github I see:

"Example code “ToVtk”

The release includes not only the source files of DualSPHysics v4.4 but also the source files of a code named “ToVtk”. This code is provided to show how to load and interpret particle data, how to read .bi4 files and how to create .vtk or .csv files."

So this is basically what I want, being able to upload my own particle distribution. When I look at the example I just don't understand how it is done? So first we have a .bat file called "run_win64.bat", which has the following code:

@echo off


@set dirout=out

if exist %dirout% del /Q %dirout%\*.*

if not exist %dirout% mkdir %dirout%

ToVTK4_win64.exe -dirin Piston2D -filexml Piston2D/Piston2D.xml -savevtk %dirout%/parts -savecsv %dirout%/data

So we are using the .exe, we move into the directory, "Piston2D" and load the xml file and this is where I get confused, since I cannot find in the xml file how to upload my own particle distribution?

Have I misunderstood the functionality completely - I thought it was possible to upload my own particle discretization?

Kind regards


  • I presume that the syntax they use for launching this tool is consistent with the one of PartVTK4. If that is true, have a look at the help page of it in <sphroot>/doc/help/PartVTK4_Help.out. There you find the explanation of the parts missing. The script you show suggests that you have to call this tool on a simulation that you have already run.

    Indeed I could not find a specific help page for the ToVtk tool. If there is none, it could be a suggestion to add it. Corrections welcome.

  • Okay I see, if that is the case, then it is not possible to upload our own particles yet :-) Good to know, thanks

Sign In or Register to comment.