MeasureTool: customize mask value for intermittent regions

I am using MeasureTool v5.0.050 (26-02-2020) and have placed a measuring point at a height in the wave range. So this is occupied by fluid particle intermittently. Talking of the forward velocity as an example, I see zeros when there are no particles. But zero is a physically meaningful value for velocity, although of course precisely 0 is quite unlikely, except perhaps at the initial conditions, and it can be caught.

Nonetheless. Is there a possibility under the hood to choose another value for masking arrays, like -999 or NaN? I haven't spotted it in the help document. If not, would you mind this feature request?

Comments

  • I think this is a very relevant suggestion - perhaps you could file an issue on the Github?

    I know atleast I would really like that option too, perhaps I would prefer "NaN" when nothing is measured yet, but I will not lose sleep over "-999" or similar.

    I think that DualSPHysics being such a mature package with so much potential, should now also focus on increasing the post-processing options since that would make it stand-out as a full suite SPH simulation setup. Of course the time of the developers is limited, but perhaps the community could make the tools if some guidelines of how to interface with data was setup. A bit of a tangent, but I hope you file this on github!

    Kind regards

  • edited October 13

    @Asalih3d Done: https://github.com/DualSPHysics/DualSPHysics/issues/64

  • Thanks! I went and liked it to avoid spamming it with comments


    Kind regards

  • edited October 13

    Hi, @Asalih3d @sph_tudelft_nl

    That is a truly nice suggestion !

    I encountered the same "limitation" with water heigth measurements. When no water is detected, the output values is set to ymin. It would ease post-processing easier to have a NaN (or -999)

    Kind regards

  •   -kcdummy:<float>

    1) WIKI in https://github.com/DualSPHysics/DualSPHysics/wiki/5.-Running-DualSPHysics#563-analysis-of-numerical-measurements--measuretool-

    The interpolation is computed using the Wendland kernel. Kernel correction is also applied when the summation of the kernel values around the position is higher than a value (-kclimit:) defining a dummy value if the correction is not applied (-kcdummy:). 

    2) MeasureTool_Help.o in DualSPHysics_v5.0\doc\help

      -kclimit:<float>    Defines the minimum value of sum_wab_vol to apply the Kernel Correction (default value = 0.5)

      -kcdummy:<float>    Defines the dummy value for the interpolated quantity if Kernel Correction is not applied (default value = 0)

      -kcusedummy:<0/1>   Defines whether or not to use the dummy value (default value = 1)

  • edited October 14

    Thanks @Alex It was not quite clear to me that this is what applies/happens when there are no particles in the kernel.

  • Thanks @Alex !

    I never understood that ! it'll change thing on my side!

    However, I cannot make it work for elevation (ok for velocity and pressure). I tried:

    %measuretool% -dirin %simData% -points %ExecutionFolder%\{}.txt -onlytype:-all,+fluid -kcusedummy:1 -kcdummy:-10.0 -elevation -savecsv %dirout2%/{}.csv -first:{} -last:{}

    Did I miss something ?

    Kind regards

  • I forgot, for those wondering, it is possible to use "-kcdummy:NaN" !

    bye

  • Elevation with MeasureTool works different and it will not use -kclimit or -kcdummy or -kcusedummy.

    When computing elevation you need a list of points instead of only one position, therefore mass is evaluated in all those points and the first one (starting from top and going down) where the mass value is greater than 0.5*mfluid will be selected as surface.... If there are no fluid then the minimum Z position you have defined in your list of points will be used as elevation


    Regards

  • @Alex Thanks, that's what I experienced. Allowing, elevation to use kcdummy in case there is no fluid would be a nice option IMO.

Sign In or Register to comment.