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

Temporal Analysis

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

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   January 31, 2013, 03:46
Unhappy Temporal Analysis
  #1
Member
 
Mohammad Sarfaraz
Join Date: Feb 2010
Posts: 32
Rep Power: 7
mohammad.sarfaraz is on a distinguished road
Dear all
Hi
I have made an analysis of wave propagation (free surface flow). It is a temporal problem, which means that the wave height changes over the time at a specific section.
In my analysis each time step is saved on an individual file.
For example 01.vtk is the free surface profile of the wave at t=0.1 sec. for the whole channel.
02.vtk for t=0.2 sec. and so on.
I want to use ParaView to analyze wave height vs. time at a specific location.

Please help me.
mohammad.sarfaraz is offline   Reply With Quote

Old   February 2, 2013, 07:57
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Mohammad,

I finally managed to figure how this can be done. My test case was OpenFOAM's tutorial "multiphase/interFoam/laminar/damBreak". The steps I used were as follows:
  1. Applied the filter "Contour" and configured to use only the value "0.5" for the Isosurfaces, applied to the field "alpha1", which varies between 0 and 1, indicating where the water and air are present.
  2. Applied the filter "Extract Surface" to the previous filter. For some reason, this makes calculation of the height more stable.
  3. Applied the filter "Calculator" to the previous filter. The calculation is configured as:
    • Attribute mode: point data
    • Result Array Name: H
    • Expression: coordsY
      • This is because this case was pseudo-2D.
  4. Applied the filter "Slice" to the previous filter. With this I made a section cut of the surface, in order to have a line in which the probe will float on.
  5. Applied another filter "Slice" to the previous "Slice" filter. With this I isolated only the point that is going to be probed.
  6. Now, with the last slice selected on the "Pipeline browser", I used the window splitter (look at the 4 buttons on the upper right corner of the 3D model, it's the first or second button from the left).
  7. In the second side a list of possible views appears and I chose the "Spreadsheet" view.
  8. On this spreadsheet, select in "Showing" the last slice. Then click on the only line that appears. The point on the 3D model should appear in pink.
  9. Go back to the "Pipeline browser" and apply to the last slice the filter "Plot Selection over Time".
  10. Another view should appear, with several line plots. In the "Object inspector", select the Display tab and turn off all of the fields that don't matter and leave "H" turned on.
And that's it! You should now have a working plot over time of the height on that point.


Best regards,
Bruno
Tobi likes this.
wyldckat is offline   Reply With Quote

Old   February 2, 2013, 11:18
Red face
  #3
Member
 
Mohammad Sarfaraz
Join Date: Feb 2010
Posts: 32
Rep Power: 7
mohammad.sarfaraz is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Mohammad,

I finally managed to figure how this can be done. My test case was OpenFOAM's tutorial "multiphase/interFoam/laminar/damBreak". The steps I used were as follows:
  1. Applied the filter "Contour" and configured to use only the value "0.5" for the Isosurfaces, applied to the field "alpha1", which varies between 0 and 1, indicating where the water and air are present.
  2. Applied the filter "Extract Surface" to the previous filter. For some reason, this makes calculation of the height more stable.
  3. Applied the filter "Calculator" to the previous filter. The calculation is configured as:
    • Attribute mode: point data
    • Result Array Name: H
    • Expression: coordsY
      • This is because this case was pseudo-2D.
  4. Applied the filter "Slice" to the previous filter. With this I made a section cut of the surface, in order to have a line in which the probe will float on.
  5. Applied another filter "Slice" to the previous "Slice" filter. With this I isolated only the point that is going to be probed.
  6. Now, with the last slice selected on the "Pipeline browser", I used the window splitter (look at the 4 buttons on the upper right corner of the 3D model, it's the first or second button from the left).
  7. In the second side a list of possible views appears and I chose the "Spreadsheet" view.
  8. On this spreadsheet, select in "Showing" the last slice. Then click on the only line that appears. The point on the 3D model should appear in pink.
  9. Go back to the "Pipeline browser" and apply to the last slice the filter "Plot Selection over Time".
  10. Another view should appear, with several line plots. In the "Object inspector", select the Display tab and turn off all of the fields that don't matter and leave "H" turned on.
And that's it! You should now have a working plot over time of the height on that point.


Best regards,
Bruno
Too much thanksfor your answer.
It is agreat help.
But you should consider that:
I had about 100 files of .vtu, which each ofthem is for one time step,i.e. 0.vtk is for t=0,1.vtkis for t=0.1, ..., 100.vtk is for t=100 sec.
Should I open all of them with Paraview?

I would be thankful for your reply.

Best Regards
mohammad.sarfaraz is offline   Reply With Quote

Old   February 2, 2013, 15:13
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Mohammad,

I thought you already knew how ParaView handles multiple files...

There are two ways ParaView can handle them:
  1. You can open each file individually, for which you only have a single time snapshot.
  2. Or you can open the group handle. For example:
    1. If you have these files: "snap01.vtk", "snap02.vtk" and "snap03.vtk"
    2. Then "snap..vtk" will appear in the file browser, when called from within ParaView's menu "File -> Open" or from the "Open" button.
      If you pick this group handle "snap..vtk", then all 3 files will be accessible through the time controls on the top center/right part of the ParaView's window.
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   February 3, 2013, 02:13
Red face
  #5
Member
 
Mohammad Sarfaraz
Join Date: Feb 2010
Posts: 32
Rep Power: 7
mohammad.sarfaraz is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Mohammad,

I thought you already knew how ParaView handles multiple files...

There are two ways ParaView can handle them:
  1. You can open each file individually, for which you only have a single time snapshot.
  2. Or you can open the group handle. For example:
    1. If you have these files: "snap01.vtk", "snap02.vtk" and "snap03.vtk"
    2. Then "snap..vtk" will appear in the file browser, when called from within ParaView's menu "File -> Open" or from the "Open" button.
      If you pick this group handle "snap..vtk", then all 3 files will be accessible through the time controls on the top center/right part of the ParaView's window.
Best regards,
Bruno

Dear Bruno
Hi
Again too much thanks
I have about 100 files of .vtk, which they are not grouped,i.e. they are seperate.
How can I make them in a group and assign them time step?
mohammad.sarfaraz is offline   Reply With Quote

Old   February 3, 2013, 06:14
Default
  #6
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Mohammad,

Attached are some images to help show what I meant:
  1. "fileopen_group.png" - file grouping is automatic in ParaView. When you open the file browser, it will show as in the image. Like I wrote before, by picking "snap..vtk", ParaView will automatically open the whole group as time snapshots.
  2. "fileopen_multiple.png" - this is just to show that the group will associate all of those files. You can open a single or a couple of these files, if you don't want them as time snapshots.
  3. "focus_on_details.png" - On the left in the "Pipeline browser" is the item "snap0*", which represents the group. On the top right you have the time controls, where you can see the "Time: 1" and the controls further on the right.
  4. "anotatetime.png" - Apply the filter "Annotate Time" and apply a scale factor. In my case, it was "0.1".
Best regards,
Bruno
Attached Images
File Type: png fileopen_group.png (38.5 KB, 52 views)
File Type: png fileopen_multiple.png (52.7 KB, 47 views)
File Type: jpg focus_on_details.jpg (21.2 KB, 49 views)
File Type: png anotatetime.png (26.1 KB, 48 views)
wyldckat is offline   Reply With Quote

Old   February 5, 2013, 21:52
Unhappy
  #7
Member
 
Mohammad Sarfaraz
Join Date: Feb 2010
Posts: 32
Rep Power: 7
mohammad.sarfaraz is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Mohammad,

Attached are some images to help show what I meant:
  1. "fileopen_group.png" - file grouping is automatic in ParaView. When you open the file browser, it will show as in the image. Like I wrote before, by picking "snap..vtk", ParaView will automatically open the whole group as time snapshots.
  2. "fileopen_multiple.png" - this is just to show that the group will associate all of those files. You can open a single or a couple of these files, if you don't want them as time snapshots.
  3. "focus_on_details.png" - On the left in the "Pipeline browser" is the item "snap0*", which represents the group. On the top right you have the time controls, where you can see the "Time: 1" and the controls further on the right.
  4. "anotatetime.png" - Apply the filter "Annotate Time" and apply a scale factor. In my case, it was "0.1".
Best regards,
Bruno
Hi Bruno
Your helps are acknowledged. But when I want to open multiple files, I can NOT see "snap.vtk" as shown in the picture.
Paraview_Opening_FileS.jpg

Best Regards
mohammad.sarfaraz is offline   Reply With Quote

Old   February 6, 2013, 18:20
Default
  #8
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Mohammad,

I forgot to tell you that you will have to rename all of the files to have text before the number, for ParaView to identify the files. This is why my example files had "snap" before the numbers.

For example, you'll have to rename these files:
Code:
0.vtk
1.vtk
2.vtk
3.vtk
to something like this:
Code:
snap0.vtk
snap1.vtk
snap2.vtk
snap3.vtk
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   February 7, 2013, 11:04
Talking
  #9
Member
 
Mohammad Sarfaraz
Join Date: Feb 2010
Posts: 32
Rep Power: 7
mohammad.sarfaraz is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Mohammad,

I forgot to tell you that you will have to rename all of the files to have text before the number, for ParaView to identify the files. This is why my example files had "snap" before the numbers.

For example, you'll have to rename these files:
Code:
0.vtk
1.vtk
2.vtk
3.vtk
to something like this:
Code:
snap0.vtk
snap1.vtk
snap2.vtk
snap3.vtk
Best regards,
Bruno
Hello my friend
Now it works!!!
I do not know how to thank you.

All the Best
Mohammad
mohammad.sarfaraz is offline   Reply With Quote

Old   April 23, 2013, 13:21
Default
  #10
Member
 
Join Date: Mar 2013
Posts: 86
Rep Power: 4
giack is on a distinguished road
Hi to all,
I follow the method proposed by wyldckat to calculate the velocity of the front of a bubble. I have a question about it. It's possible change the point after a certain time step? the front of my bubble is not always at the same y. The front of the bubble is characterized by the minimum value of z, so after set the contour of alpha=0,5 I want insert a filter that give me the point of minimum z. Moreover the second slice must be able to choose the this point that change position in y and z.

Thanks to all
giack is offline   Reply With Quote

Old   April 26, 2013, 19:40
Default
  #11
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings giack,

Attached is an image demonstration the power of the "Python Calculator" filter and how to configure it.

Note: it will give some error/warning messages, but you can ignore those Basically it complains about the result not being of the same array size as of the original data, but we don't care about that since we just need one value.

Keep in mind that you'll need a ParaView version that has got Python built into it. I used "ParaView 3.14.1" that Ubuntu 12.04 has got.

Best regards,
Bruno
Attached Images
File Type: jpg Screenshot from 2013-04-27 00:34:52.jpg (39.6 KB, 54 views)
wyldckat is offline   Reply With Quote

Old   June 12, 2013, 05:43
Default
  #12
New Member
 
N7student
Join Date: Feb 2012
Posts: 9
Rep Power: 5
Neraste is on a distinguished road
I wanted to plot the position of an interface over time... Well, you've saved my day wyldckat!
Neraste 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
Acoutic fan analysis arunraj CFX 3 October 4, 2012 18:54
Acoutic fan analysis arunraj FLUENT 0 October 4, 2012 05:54
Eigenfrequencies static and modal analysis Laura_mecheng ANSYS 1 May 15, 2012 03:40
Short Course: Computational Thermal Analysis Dean S. Schrage Main CFD Forum 11 September 27, 2000 17:46


All times are GMT -4. The time now is 14:07.