CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > ParaView

paraview streamline length

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   October 19, 2013, 07:55
Default paraview streamline length
  #1
New Member
 
Alessandro Ciani
Join Date: Oct 2013
Posts: 2
Rep Power: 0
sawyer89 is on a distinguished road
Hi,
does anybody know how to compute the length of a streamline in paraview?I need to compute tortuosity.
Thank you in advance.
sawyer89 is offline   Reply With Quote

Old   October 19, 2013, 11:58
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,748
Blog Entries: 39
Rep Power: 103
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Greetings Alessandro and welcome to the forum!If you only have a single streamline and you want to calculate the total length, then:
  1. Apply the "Integrate Variables" filter.
  2. A spreadsheet should appear on the right of the screen.
  3. On that spreadsheet, change the option "Attribute" to "Cell Data".
  4. One of the columns should be named "Length".
Best regards,
Bruno
EleCr likes this.
__________________
wyldckat is offline   Reply With Quote

Old   October 24, 2013, 10:37
Default
  #3
New Member
 
Alessandro Ciani
Join Date: Oct 2013
Posts: 2
Rep Power: 0
sawyer89 is on a distinguished road
Thanks a bunch Bruno! Finally I've succeded to compute tortuosity strting directly from the velocity field, without the aid of paraview. Anyway it will be useful in future!
Best regards
Alessandro
sawyer89 is offline   Reply With Quote

Old   February 25, 2016, 21:19
Default
  #4
New Member
 
Join Date: Feb 2016
Posts: 8
Rep Power: 2
Rosa Zhou is on a distinguished road
Quote:
Originally Posted by sawyer89 View Post
Hi,
does anybody know how to compute the length of a streamline in paraview?I need to compute tortuosity.
Thank you in advance.
Hello Alessandro,
Could you tell me how to calculate tortuosity by paraview step by step? I only know how to draw the streamlines. Thank you!

Best,
Rosa

Quote:
Originally Posted by wyldckat View Post
Greetings Alessandro and welcome to the forum!If you only have a single streamline and you want to calculate the total length, then:
  1. Apply the "Integrate Variables" filter.
  2. A spreadsheet should appear on the right of the screen.
  3. On that spreadsheet, change the option "Attribute" to "Cell Data".
  4. One of the columns should be named "Length".
Best regards,
Bruno
Hello Bruno,
If I got a bunch of streamlines, how to get the length of each one?

Best regards,
Rosa

Last edited by wyldckat; March 6, 2016 at 10:57. Reason: merged posts that were a few minutes apart
Rosa Zhou is offline   Reply With Quote

Old   March 28, 2016, 16:06
Default
  #5
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,748
Blog Entries: 39
Rep Power: 103
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Greetings Rosa,

Quote:
Originally Posted by Rosa Zhou View Post
If I got a bunch of streamlines, how to get the length of each one?
Sorry for the late reply, but only today did I finally manage to take a quick look into this.
The quickest solution I could figure out will only allow the calculation of each individual line length within ParaView:
  1. Apply the filter "Threshold" to the streamtracer entry on the Pipeline Browser.
  2. Choose in "Threshold" to use the scalar "SeedIds" and the values minimum and maximum should both be the same, for example both should be 0 for the first line.
  3. Then apply the filter "Integrate Variables".
  4. On the spreadsheet view that appeared, select the Cell Data mode and it will show the line length.
Attached is an image that shows this in practice.


As for doing this automatically for all lines, you will have to export the data from the streamtracer (menu File -> Save Data) to a CSV file and do the calculations with some other application, such as LibreOffice Calc.


Best regards,
Bruno
Attached Images
File Type: jpg ParaView example line length.jpg (92.4 KB, 19 views)
__________________
wyldckat is offline   Reply With Quote

Old   March 29, 2016, 21:39
Thumbs up
  #6
New Member
 
Join Date: Feb 2016
Posts: 8
Rep Power: 2
Rosa Zhou is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings Rosa,


Sorry for the late reply, but only today did I finally manage to take a quick look into this.
The quickest solution I could figure out will only allow the calculation of each individual line length within ParaView:
  1. Apply the filter "Threshold" to the streamtracer entry on the Pipeline Browser.
  2. Choose in "Threshold" to use the scalar "SeedIds" and the values minimum and maximum should both be the same, for example both should be 0 for the first line.
  3. Then apply the filter "Integrate Variables".
  4. On the spreadsheet view that appeared, select the Cell Data mode and it will show the line length.
Attached is an image that shows this in practice.


As for doing this automatically for all lines, you will have to export the data from the streamtracer (menu File -> Save Data) to a CSV file and do the calculations with some other application, such as LibreOffice Calc.


Best regards,
Bruno
cool, the step2 is really useful! can it show the straight-line distance for the NO.0 seed as well?
Thank you Bruno ^_^
Rosa Zhou is offline   Reply With Quote

Old   April 2, 2016, 18:34
Default
  #7
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,748
Blog Entries: 39
Rep Power: 103
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Quote:
Originally Posted by Rosa Zhou View Post
can it show the straight-line distance for the NO.0 seed as well?
Quick answer: AFAIK, to do that you will have to do with an external application, as I mentioned in the other post:
Quote:
Originally Posted by wyldckat View Post
you will have to export the data from the streamtracer (menu File -> Save Data) to a CSV file and do the calculations with some other application, such as LibreOffice Calc.
wyldckat is offline   Reply With Quote

Old   April 29, 2016, 11:13
Default Streamline Length
  #8
New Member
 
Zango
Join Date: Apr 2016
Posts: 3
Rep Power: 2
Zango Ankrios is on a distinguished road
Hello Bruno,

I found this discussion about streamline length. However, I do not manage to get it.

Here is my problem.
I imported a .vtk file of a streamline from star ccm+.
I applied the Integrate Variables Filter to it. On the spreadsheet you mentionned, I changed the option "Attribute" to "Cell Data".
Yet, I do not have the "Length" Column.

Do you know the reason ?

Than you in advance

Best regards,
Zango


Ps : pdf files are actually screenshots of paraview
Attached Files
File Type: pdf Paraview StreamLine 1.pdf (163.2 KB, 10 views)
File Type: pdf Paraview StreamLine 2.pdf (153.2 KB, 6 views)
Zango Ankrios is offline   Reply With Quote

Old   May 1, 2016, 19:00
Default
  #9
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,748
Blog Entries: 39
Rep Power: 103
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Quick question: Can you share an example VTK file with which this can be reproduced?
Because the problem seems to be that you applied the "Integrate Variables" filter to something that is not a polygonal line and is instead a mesh.

Perhaps you exported a tube-shaped streamline?
wyldckat is offline   Reply With Quote

Old   May 2, 2016, 03:31
Default
  #10
New Member
 
Zango
Join Date: Apr 2016
Posts: 3
Rep Power: 2
Zango Ankrios is on a distinguished road
Thank you for your quick answer.
I enclosed the vtk file for which I wanted to apply the "Integrate Variables" filter to.
I do not know whether it is a tube shaped streamline or a polygonal line.
Attached Files
File Type: zip Streamline.zip (43.2 KB, 1 views)
Zango Ankrios is offline   Reply With Quote

Old   May 8, 2016, 15:49
Default
  #11
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,748
Blog Entries: 39
Rep Power: 103
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Quote:
Originally Posted by Zango Ankrios View Post
Thank you for your quick answer.
I enclosed the vtk file for which I wanted to apply the "Integrate Variables" filter to.
I do not know whether it is a tube shaped streamline or a polygonal line.
Quick answer: It's a a polygonal surface, as shown in attachment, also known as a "ribbon".

You will need to change the way you created the streamlines. If you cannot, then I'm not even sure how we can extract only one of the long edges of the surface...
Attached Images
File Type: png polygonal_surface.png (14.9 KB, 11 views)
wyldckat is offline   Reply With Quote

Old   May 10, 2016, 04:40
Default
  #12
New Member
 
Zango
Join Date: Apr 2016
Posts: 3
Rep Power: 2
Zango Ankrios is on a distinguished road
Ok thank you for your answer
Zango Ankrios is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ParaView: Streamline Vectors FPF ParaView 4 September 13, 2011 05:45
points over streamline in paraView cedric_duprat OpenFOAM Paraview & paraFoam 0 January 12, 2010 04:04
paraFoam reader for OpenFOAM 1.6 smart OpenFOAM Installation 13 November 16, 2009 22:41
Streamline length Zurayk CFX 0 April 12, 2007 05:12
length integral on a streamline Gab CFX 2 October 3, 2005 14:25


All times are GMT -4. The time now is 01:15.