Handling concavity in ListContourPlot

I have imported some CFD results (in csv format) into Mathematica to do some further processing of the data.

One of my 2D geometries is as:

Now, when I try to do the contour plot, I get the following:

Why is contour plot filling those areas above and below the narrow section with purplish color. Those regions are not even within my X and Y coordinates (see the image for geometry above)?

Any ideas?

Thanks

Cross-posted here.
I am attaching a sample of my data (a csv file for the above geometry). Note that I am only working with columns 1 and 2 (as x and y) and column 6, as my velocity in z direction.

tube_arbitrary.csv (762 KB)

Can you post the exact code you use to create your plots? It’s not obvious how to get from the CSV to your plots.

Looks very similar to this question.

Cross-posted here.

Which is also mentioned in the original post.

To import the csv file:

       tubeArbitrary = Import["tube_arbitrary.csv", "HeaderLines" -> 1];

To extract the x and y, each in a separate list:

       XtubeArbitrary = tubeArbitrary[[All, 1]];

       YtubeArbitrary = tubeArbitrary[[All, 2]];

To extract x and y and U velocity in z direction in a single data-set:

        XYUtubeArbitrary = tubeArbitrary[[All, {1, 2, 6}]];

To plot the geometry based on the (x,y) points:

   ListPlot[Thread[{XtubeArbitrary, YtubeArbitrary}], PlotRange -> Automatic, AspectRatio -> Automatic];

To contourplot it:

      ListContourPlot[XYUtubeArbitrary, Contours -> 500, ColorFunction -> "Rainbow", ContourStyle -> None, AspectRatio -> Automatic, PlotLegends -> Automatic];

Hello Mohammad,

a ‘quick and dirty’ method would be to just cutting off the bottom using PlotRange:

ListContourPlot[xyutubeArbitrary, Contours -> 500, 
 ColorFunction -> "Rainbow", ContourStyle -> None, 
 AspectRatio -> Automatic, PlotLegends -> Automatic, 
 PlotRange -> {.004, Automatic}]

Does that help? Regards – Henrik

I’ve suggested another hacky solution here Stack Exchange

Thanks. It is useful.