Tangential Velocity extraction from Polyline

32 views
Skip to first unread message

Pravesh Bhandari

unread,
Jul 23, 2026, 10:12:36 AM (8 days ago) Jul 23
to PIVlab
Hi,

I want to extract the tangential velocity along an arc created using a set of 'polylines'. The velocity vectors are of the particles in an annulus between two differentially rotating cylinders. 

For a simple case, I have taken the vectors which are fairly circular and without any instabilities, and I have drawn the lines (polylines) in such a way that the vectors are parallel (or antiparallel based on the starting point of the arc). 

I was expecting that since the vectors are always aligned to the lines, the sign of the tangential velocity should stay constant but the signs are changing. To my surprise, the sign of the velocity (y-axis) is positive even when the vectors point in direction opposite (180 degrees) to the lines (see from x-axis~0 to x-axis ~0.15 and x-axis~ 0.3 to x-axis~0.4) and negative(as expected) only when the lines are fairly horizontal (x-axis~0.15 to x-axis~0.3) I do not understand what these signs indicate and why aren't they consistent. 
I look forward to your reply.

Thank you for your time,
Regards,
Pravesh 
plot.PNG
vectors.PNG

William

unread,
Jul 23, 2026, 1:14:16 PM (8 days ago) Jul 23
to PIVlab
Dear Pravesh, this is indeed not what you should see. I quickly tested this with the synthetic image generator of PIVlab, but I get the correct results. What exactly did you do?Screenshot 2026-07-23 191209.jpg

Pravesh Bhandari

unread,
Jul 24, 2026, 7:00:19 AM (7 days ago) Jul 24
to PIVlab
Dear William,

I tried using one of the synthetic image pairs too and now the tangential velocity is aligned in the correct direction. However, that is when I do not change the calibration settings. When I checked for the settings I figured that PIVlab is by default calibrated such that x increases towards the right and y increases towards the BOTTOM. So, if you check the 'v component' of the velocity in default settings, you might notice that the vectors will be shown positive if they are facing downwards. So, setting the coordinate frame such that x increases towards the right and y increases towards the top gives the accurate direction for 'v component' but reversed for the tangential velocity. Could you have a look on this please?

Thank you very much for your time.

Pravesh Bhandari

unread,
Jul 24, 2026, 7:05:25 AM (7 days ago) Jul 24
to PIVlab
Or this might have already been resolved in the new version? Just letting you know that I started my project in April and all my files are based on version 3.12. I updated to the latest version but the session files could not be loaded in them so I rolled back to the old version again. 

William

unread,
Jul 27, 2026, 4:30:15 PM (4 days ago) Jul 27
to PIVlab
You are right, this is a bug when one of the axes is flipped in calibration. I have fixed this here:
https://github.com/Shrediquette/PIVlab/commit/4d46f010ad59f5f6b31a387ec17a90653fb57d53
Reply all
Reply to author
Forward
0 new messages