How to plot vorticity from the OpenPIV text file?

38 views
Skip to first unread message

Ivan Nepomnyashchikh

unread,
Mar 28, 2023, 1:58:12 PM3/28/23
to openpiv-users
Hello dear OpenPIV community.

I have a question about PIVPY package (I'm not sure if this is the right place to inquire about PIVPY, but I couldn't find a separate PIVPY Google group).

I'm trying to plot vorticity contours. I couldn't find an OpenPIV method that can do that, so I took it to PIVPY.

When I was getting my velocity fields using OpenPIV, I obtained a text file with the results. Then I tried to calculate vorticity using the following set of commands: d=io.load_openpiv_txt --> d.piv.vectoscal('vorticity') --> graphics.contour_plot(d.isel(t=0)).

I've got the following error: ValueError: Axis limits cannot be NaN or Inf.

I've been playing with it and I have failed to resolve the issue. I'm wondering if anybody can help me to get vorticity from my text file, please.

My original text file is attached. It's called test.txt.

I saved the results of vorticity calculations to the file called df.csv (also attached).

Just for a case, I'm attaching a code snippet that shows the procedure I used to get the original text file and the vorticity.

Thank you in advance.
Ivan




test.txt
codeSnippet.txt
df.csv

Alex Liberzon

unread,
Mar 28, 2023, 4:23:03 PM3/28/23
to openpiv-users
hi, 

PIVPy is not yet fully developed, many rough edges. I’m not even sure I’d be able to get it widespread as there’s very little coding done recently on this code. I suggest you ask on the pivpy github page, raising an issue.

Meanwhile, see 

Your txt file is full of NANS and the missing line is d.fillna(0.) which replaces all the nans with zeros. Then graphics can work. 

nepo...@oregonstate.edu

unread,
Mar 28, 2023, 4:27:34 PM3/28/23
to Alex Liberzon, openpiv-users

Thank you very much, Dr. Liberzon!

Ivan

 

From: openpi...@googlegroups.com <openpi...@googlegroups.com> On Behalf Of Alex Liberzon
Sent: Tuesday, March 28, 2023 1:23 PM
To: openpiv-users <openpi...@googlegroups.com>
Subject: [openpiv-users] Re: How to plot vorticity from the OpenPIV text file?

 

[This email originated from outside of OSU. Use caution with links and attachments.]

--
You received this message because you are subscribed to the Google Groups "openpiv-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpiv-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openpiv-users/e5d1302d-a780-4233-b2ce-198aadc96640n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages