CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] why can't i get streamlines in paraview? (https://www.cfd-online.com/Forums/paraview/103126-why-cant-i-get-streamlines-paraview.html)

mihaipruna June 11, 2012 17:25

why can't i get streamlines in paraview?
 
1 Attachment(s)
No matter what I do, most extend only for a short length.
I'm running ParaView under Windows.

wyldckat June 12, 2012 17:01

Hi Mihai,

Interesting... OK, let's try to get to the bottom of this:
  1. What version of ParaView are you using?
  2. What plugin or file format are you reading from?
  3. Are you trying to see the results from a single "processor*" folder or a standard case folder?
  4. Try doing these steps, assuming you're opening a file with extension ".foam":
    1. Open the same file twice.
    2. On the first one, load only the internal fields.
    3. On the second one, load only that patch that you have the stream seed close to.
    4. Now, use apply filter "Streamlines from custom source" (haven't confirmed the real name) to the first file and choose the second file as Input (or Source, haven't confirmed this either).
    5. You should be able to see stream lines starting with your patch and ending wherever they end.
  5. Last but not least, try downloading an older version of ParaView, such as 3.12.0, since this might be a recently introduced bug :(.
Best regards,
Bruno

mihaipruna June 12, 2012 17:55

Hi Bruno
I think I tried the custom source as well. I used the STL file and extracted only the inlet face. Same thing. I get streamlines close to the surface, of the duct in this case, but inside they stop quickly.
I was able to get extended streamlines with a line source over a wing, but they seem to cross the wing surface at one point, see attached.

mihaipruna June 12, 2012 17:58

1 Attachment(s)
here is the instance it actually worked. paraview version is 3.14.1 64 bit.

wyldckat June 12, 2012 18:08

OK, then try converting to VTK format, using polyhedrons for the mesh:
Code:

foamToVTK -poly
When you run checkMesh, is there any warning or error? I've got a feeling from this last image that the mesh might have some weird distortion that makes ParaView unable to calculate the streamlines.

Have you checked how the vectors look like in that break-off zone?

mihaipruna June 13, 2012 15:58

says mesh is OK.

I do have an area where the flow direction changes, not abruptly, where I see sharp gradients. The area of concern ,though, seems to be able to carry a streamline over the surface but not inside the duct.

wyldckat June 13, 2012 16:56

Hi Mihai,

Mmm... OK, have you tried the line streamline with both ends of the line right on top or very close to the duct? Because sometimes only when the seed point is in the right place, will it be able to generate the lines your looking for.

Another possibility that I can think of is that the flow might be reversed somehow or have a static point and pushes the fluid away from the duct on the side of the streamlines you have.

You can also try using the "Extract Cells" filter to try and isolate the duct, then generate the streamlines only in that area, possibly even flooding it with seed points, or vector glyphs, to figure out what is going on!

Additionally, you can export the extracted region to a single & smaller VTK file and then attach it to your next post, if you want me or someone else to take a look at it to help you figure out what's wrong.

Best regards,
Bruno

mihaipruna June 13, 2012 19:35

Thank you Bruno
it seems, for a point source, the larger I set the number of points value the longer the streamlines get. But I wish for more control, of course, as it also gets slow at updates.

mihaipruna June 14, 2012 09:11

It works now. I did it on another machine, under Linux, and enabled the "use VTK polyhedron" option on the internal mesh.
Dunno which made the difference, but they show up nicely :)

wyldckat June 14, 2012 09:14

OK, OpenFOAM's official plugin has that option very visible :)

This command should export the data to that same polyhedron structure:
Code:

foamToVTK -poly
I don't know how the polyhedron recognition is working on the internal plugin (*.foam)... but if there are new options, they should show up at the bottom of the options window where you can choose the fields to load.

mihaipruna June 14, 2012 19:28

Thanks for all your help Bruno. For ParaView in Windows the option Decompose Polyhedra has to be disabled

sharonyue May 8, 2013 23:44

1 Attachment(s)
Quote:

Originally Posted by wyldckat (Post 366082)
Hi Mihai,

Interesting... OK, let's try to get to the bottom of this:
  1. What version of ParaView are you using?
  2. What plugin or file format are you reading from?
  3. Are you trying to see the results from a single "processor*" folder or a standard case folder?
  4. Try doing these steps, assuming you're opening a file with extension ".foam":
    1. Open the same file twice.
    2. On the first one, load only the internal fields.
    3. On the second one, load only that patch that you have the stream seed close to.
    4. Now, use apply filter "Streamlines from custom source" (haven't confirmed the real name) to the first file and choose the second file as Input (or Source, haven't confirmed this either).
    5. You should be able to see stream lines starting with your patch and ending wherever they end.
  5. Last but not least, try downloading an older version of ParaView, such as 3.12.0, since this might be a recently introduced bug :(.
Best regards,
Bruno

Hi Bruno,

I use your method and succeed!!but there is a little problem. you can see there are too many tubes around my impeller,I think its because the cells around the impeller are small.But how can I cease the number of this tubes?There are too many.

And if I use wallboundedstreamline funtions in controlDict. Will I get the same stream line with using the filter in paraview?

Thanks in advance!

wyldckat May 10, 2013 18:32

Hi Forrest,

You can create a plane or circle from the "Sources" menu, then use the "Subdivide" filter to divide it in a more well distributed source.
You might need to apply the "Transform" filter in order to place the plane or circle in the right place.
Then use this final shape as the custom source for the streamlines.

The other possibility is to apply a "Decimate" filter to the patch you were using as a source for the streamlines.

As for "wallboundedstreamline", I've never used, so I don't know how it works.

Best regards,
Bruno

s.m December 30, 2013 10:19

1 Attachment(s)
Quote:

Originally Posted by sharonyue (Post 426251)
Hi Bruno,

I use your method and succeed!!but there is a little problem. you can see there are too many tubes around my impeller,I think its because the cells around the impeller are small.But how can I cease the number of this tubes?There are too many.

And if I use wallboundedstreamline funtions in controlDict. Will I get the same stream line with using the filter in paraview?

Thanks in advance!

Hi dear Dongyue and dear bruno
i didn't understand the steps that you explain, whould you please explain the steps more?
Thank you very much.
p.s. i want to have the streamline over an airfoil, paraview don't draw it completely, what should i do?

wyldckat January 5, 2014 16:41

2 Attachment(s)
Hi Saeideh,

Just a quick note - I'll be trying to answer your recent questions about streamlines in air-foils in the following thread: http://www.cfd-online.com/Forums/ope...over-line.html

------------------

edit: Well, I was planning on answering to your post on that other thread, but I guess that it's best to answer this one here:
Quote:

Originally Posted by s.m (Post 468109)
i didn't understand the steps that you explain, whould you please explain the steps more?
[...]
p.s. i want to have the streamline over an airfoil, paraview don't draw it completely, what should i do?

OK, from my other post http://www.cfd-online.com/Forums/ope...tml#post468753 post #7, I was using a circle pretending to be an airfoil. You can use the same line strategy you use for plotting at each station, where you had to calculate the position of each point. The steps should be:
  1. Apply the filter "Streamlines" to a "Slice" entry, as shown in the first image attached.
  2. Configure the location of the points, the same way as explained in the other post:
    Quote:

    The position of the 2 points was done with the help of the big "Y axis" button on the lower left corner of the image to set the line aligned, then with the help of the mouse (+ the Shift key) to move the two extremities of the line.
    Note: you might have to manually calculate the positions of these two points, since you need them to be located exactly in the right place.
  3. As shown in the first image, "Resolution" can be defined to "20".
  4. Now, as also shown in the first image, the stream-lines might seem to be incomplete. This is because I applied them to "Slice1" instead of the ".OpenFOAM" entry. To fix this, right-click on the entry "Streamlines1", choose "Change Input..." and choose the ".OpenFOAM" entry to be the new input.
  5. You should now see something like in the second image. Notice that the value "Maximum Streamline Length" is the value for the total maximum length for any of the stream-lines.

Best regards,
Bruno

s.m January 6, 2014 13:17

Quote:

Originally Posted by wyldckat (Post 468745)
Hi Saeideh,

Just a quick note - I'll be trying to answer your recent questions about streamlines in air-foils in the following thread: http://www.cfd-online.com/Forums/ope...over-line.html

------------------

edit: Well, I was planning on answering to your post on that other thread, but I guess that it's best to answer this one here:


OK, from my other post http://www.cfd-online.com/Forums/ope...tml#post468753 post #7, I was using a circle pretending to be an airfoil. You can use the same line strategy you use for plotting at each station, where you had to calculate the position of each point. The steps should be:
  1. Apply the filter "Streamlines" to a "Slice" entry, as shown in the first image attached.
  2. Configure the location of the points, the same way as explained in the other post:
  3. As shown in the first image, "Resolution" can be defined to "20".
  4. Now, as also shown in the first image, the stream-lines might seem to be incomplete. This is because I applied them to "Slice1" instead of the ".OpenFOAM" entry. To fix this, right-click on the entry "Streamlines1", choose "Change Input..." and choose the ".OpenFOAM" entry to be the new input.
  5. You should now see something like in the second image. Notice that the value "Maximum Streamline Length" is the value for the total maximum length for any of the stream-lines.

Best regards,
Bruno

Hi, Thank you
i want to draw the streamline up an down of the airfoil, but the paraview draw it just for the upper side, what should i do to have the stream line up and down the airfoil?
Thank you again.

wyldckat January 10, 2014 14:55

1 Attachment(s)
Hi Saeideh,

Quote:

Originally Posted by s.m (Post 468863)
i want to draw the streamline up an down of the airfoil, but the paraview draw it just for the upper side, what should i do to have the stream line up and down the airfoil?

You have at least 2 choices... actually 3:
  1. You can apply the "Streamlines" filter two times to the ".OpenFOAM" file. Then configure the first one to place the seed line on the top of the wing and another on the bottom of the wing.
  2. Or you can extend the first seed line to go beyond the top of the wing, right through the geometry, down to the other location where you need streamlines to go through.
  3. Or you can instead of all of this, place a single seed line in front of the wing.
Now, you might be wondering what I mean by "seed line". I'm referring to the one in the following image, where the important controls are outlined in red on the left and on the right there are 2 arrows pointing to the "seed line" ;)

http://www.cfd-online.com/Forums/att...1&d=1389383465

The idea is that along that line, there are 20 points, as requested in the "Resolution" entry. Those 20 points are the actual seeds for the calculation of the streamlines. Each seed point will use the flow velocity calculated for it, in order to figure out in which directions it should look at, in order to search for a streamline.

Therefore, if you're able to place the "seed line" in the right location, you should be able to see some of the streamlines you are looking for!

Best regards,
Bruno


All times are GMT -4. The time now is 10:03.