Vorticity not showing up in Paraview - visualization

I have a snapshot of a 3D field whose domain is a cube. I need to visualize the vorticity associated with this field. I am following the approach described by this video in which the vorticity gets calculated by ParaView.
I followed the procedure but, inside the filter Compute derivatives / Coloring, I cannot find the vorticity but only the components of the starting field as you can see from the following picture:
I read that another method is to use the filter for unstructured data but I don't have such a filter.
How should I properly visualize the vorticity?
I am using ParaView 5.10.

In your screenshot, the value for Vectors property shows a (?), meaning that it is not a valid input. You should select an existing vector arrays here.

Related

Multiple plots to same chart in LabVIEW

I am doing a two-channel data acquisition to read out the voltages of two diodes. I am using LabVIEW to do this. Below you can see the part of the code relevant for my question.
The voltages are converted to temperatures by 1D interpolation, as shown in the above code. 0.9755 V corresponds to 2 degrees, 1.68786 V to 100 degrees. For this simple example, I expected the waveform chart to display two constant curves, one at 2 and one at 100. However, it plots only one curve that zigzags between the two values. How can I get two separate plots?
Add "Index Array" at the "yi" output of the "Interpolate 1D VI" function and expand it to two elements. Then put "Bundle" function with two inputs. Connect "Index Array" outputs to them. The resulting cluster connect to the chart.
That's it :)
Explanation: to display multiple plots in the chart, you need to feed it with a cluster, not an array. Your "Interpolate 1D VI" output gives you 2-element array (result of interpolation for 0.9755 and 1.68786), so you need to convert it to a cluster using Bundle function.
The general answer to this question is that if you open the context help and hover over the BD terminal of a graph or chart, you will see the various data types it supports:
This will help if you want to get it right every time, as the various charts and graphs can each take different types of data to display different types of graphs and remembering them can be tricky.

cubic spline interpolation in Modelica

I have a set of data which I have to interpolate. My first data set contains z1[:] values for every x1[:] and y1[:]. I have to interpolate my second data set x2[:], y2[:] w.r.t to my first set to get z2[:] values. The size of my first data set is different from second data set. Is there any algorithm already written in Modelica for this functionality?
Interpolation on irregular grids was already requested by https://trac.modelica.org/Modelica/ticket/1153#comment:15 but still is not part of the Modelica Standard Library (as of version 3.2.2 of today).

Label/Color Probability Plot Points by Group

I am plotting a data set consisting of the same kind of data from nominally the same source. I am using MATLAB's probplot command. I would like to do something along the lines of using findgroups to plot the points with a color corresponding to their source. I have attempted, for example,
probplot('lognormal', data, ~findgroups(category))
I am not sure how (or if) one could use the 'params' functionality to pass the findgroups and make this work. I'm interested in any other solutions as well.

RANSAC using SIFT in Computer Vision

Currently, I am doing a computer vision project. I used SIFT Matlab program using this: http://www.vlfeat.org/overview/sift.html codes. However, it gives me two matrices, one is matches and another is distances. I don't know how to convert these information to pixel values because in the next step I have to use RANSAC for getting the best matches. Would somebody please help me?
You have "matches", i.e. tentative correspondences, which means "feature with index I1 possibly corresponds to feature with index I2". So go the the list of the detected SIFT features and take coordinates of the I1 feature in image 1 and I2 in image 2.
The Computer Vision System Toolbox for MATLAB has various feature detectors and extractors, a function called matchFeatures to match the descriptors, and a function estimateGeometricTransform that uses RANSAC to do exactly what you need.
Please check out the following examples: Find Image Rotation and Scale Using Automated Feature Matching and Detect Objects in a Cluttered Scene Using Point Feature Matching

Using matlab to calculate the properties of a polygon defined as a list of points

Does MATLAB have a built-in function to find general properties like center of mass & moments of inertia for a polygon defined as a list of (non-integer valued) points?
regionprops performs this task for integer valued points, on the assumption that these represent indices of pixels in an image. But the only functions I can find that treat non integral point lists are polyarea and inpolygon.
My kludge for now is to create a bwconncomp structure with all the points multiplied by some large value (like 10,000), then feeding it in to regionprops, but wondered if there is a more elegant solution.
You should check out the submission POLYGEOM by H.J. Sommer on the MathWorks File Exchange. It looks like it has all the property measurements you want, and nice documentation describing the formulae used in the code.
I don't know of a function in MATLAB that would do this for you.
However, poly2mask might be of use for you to create the pixel masks to feed into regionprops. I also suggest that, should you decide to go this route, you carefully test how much the discretization affects the results, so that you don't create crazy large arrays (and waste time) for no real gain in accuracy.
One possibility is to farm out the calculations to the Java Topology Suite. I don't know about "moments of inertia", but it does at least have a centroid method.