I am trying to do this on the example with Periodicity in Main at location x = 0.2, y = 0 and z = 0.002, using this code:

`set dirout2=%dirout%\measuretool`

%measuretool% -dirin %diroutdata% -points points_cyl.txt -savecsv %dirout2%/VelPointBottom2 -vars:-all,+vel -onlytype:-all,+fluid

if not "%ERRORLEVEL%" == "0" goto fail

The result from the measuretool seems a bit weird when compared with my own code:

My own code is basically done in Julia as:

`h = convert(Float32,0.002449) #m, smoothing length for Periodicty, example 2 in Main`

x = convert(Float32,0.2) #y = 0 z = 0 in theory now

#\alphaD from Runout file

αD = 92833.429688 #7/(4*pi*(h/2)^2) #Wendland Quintic 2D

#Abs since a particle on both sides of x should be counted in bool later

q(ra::Float32,rb::Array{Float32,1},h::Float32) = abs.(ra.-rb)/h

#Wendland kernel as in Periodicity

W(q) = αD*(1 .- q/2).^4 .* (2 .* q .+ 1)

#Reading points data for particles and velocity

pos = readVtkArray("PartFluid_",PostSPH.Points)

vel = readVtkArray("PartFluid_",PostSPH.Vel)

#Initializing x-velocity array, Vab

Vab = []

for i = 1:length(pos)

qab = q(x,pos[i][:,1],h)

#Bool is to ensure on values between 0 and 2 are taken into account

bool = convert(Array{Int},0 .< qab .< 2)

qabF = q(x,pos[i][:,1],h).*bool

Wab = W(qabF)

push!(Vab,sum(Wab.*vel[i][:,1])/sum(Wab))

end

Maybe some one can help me out / show me an example of why I am wrong?

Kind regards

It looks like you're new here. If you want to get involved, click one of these buttons!

## Comments

Kind regards

And compute velocity far from boundary layer since maybe you are not considering GAP fluid-bound or other boundary effects

Regards

Kind regards

1) normalised the kernel

2) we only compute variables if the sum_wab is higher than a minimum value (0.5 for example)... this helps to avoid computing variables when we have only 2-3 particles in the kernel domain

dummy values are "0" for velocity, but can be -999999999 for pressure, etc

Alex

Will let you know if I couldn't find it, in the weekend.

Kind regards

"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:). "