CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] Saving ParaFoam views and case

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

Like Tree2Likes
  • 1 Post By wyldckat
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 23, 2011, 12:27
Default Saving ParaFoam views and case
  #1
Senior Member
 
sail's Avatar
 
Vieri Abolaffio
Join Date: Jul 2010
Location: Always on the move.
Posts: 308
Rep Power: 16
sail is on a distinguished road
Dear Foamers.

I would like to know if it si possible to save a certain postprocessing in parafoam.

for example, one 'ive loaded the foam case, done all my cuts, contours, lines, planes etc, i would like to save the paraview case, so next time i open it (for showing to a client or modification, i don't have to start over. it would be perfect if this can be made indipendetly for the OF case, ie i'm able to move the saved paraview fiel at my pleasure.

how can this be made?

i googoled a bit, but was not able to find an answer.

thanks in advance.
sail is offline   Reply With Quote

Old   November 23, 2011, 16:22
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Sail,

You've got at least two options for file format:
  • VTK file format, which you can get by running foamToVTK (the exported results will be placed in the VTK folder).
    This means that you only have to transport the VTK folder.
  • The ".foam" file extension, which basically is an empty file which is placed on the base folder of the simulation case. You can create a file with said extension with one of the following commands:
    Code:
    touch case.foam
    paraFoam -touch -builtin
    This means that you have to transport the whole simulation case.
    AFAIK ParaView 3.12.0 is advisable to be used at both places (your office and your client's office).
Then in ParaView, choose on the menu "File -> Save State" to save the current state, which takes into account camera views, files loaded, filters applied. It does not create an independent package for transport! It's advisable to have the same version of ParaView at both places, because the saved state files might not be backwards compatible.

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

Old   November 23, 2011, 22:48
Default
  #3
Senior Member
 
sail's Avatar
 
Vieri Abolaffio
Join Date: Jul 2010
Location: Always on the move.
Posts: 308
Rep Power: 16
sail is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings Sail,

You've got at least two options for file format:
  • VTK file format, which you can get by running foamToVTK (the exported results will be placed in the VTK folder).
    This means that you only have to transport the VTK folder.
  • The ".foam" file extension, which basically is an empty file which is placed on the base folder of the simulation case. You can create a file with said extension with one of the following commands:
    Code:
    touch case.foam
    paraFoam -touch -builtin
    This means that you have to transport the whole simulation case.
    AFAIK ParaView 3.12.0 is advisable to be used at both places (your office and your client's office).
Then in ParaView, choose on the menu "File -> Save State" to save the current state, which takes into account camera views, files loaded, filters applied. It does not create an independent package for transport! It's advisable to have the same version of ParaView at both places, because the saved state files might not be backwards compatible.

Best regards,
Bruno
Thanks Bruno for your kind help.

unfortuantely i'm not still able to get it right, with nither of the strategies you suggested.

it must be noted that i'm using paraview 3.10.1 32bit on a ubuntu 10.4 LTS virtual machine.

after saving the state, if i load it back as "load state" from a blank project i got the following error:

Code:
ERROR: In /home/opencfd/OpenFOAM/ThirdParty-2.0.0/ParaView-3.10.1/VTK/IO/vtkXMLParser.cxx, line 483
vtkPVXMLParser (0x9960c18): Error parsing XML in stream at line 1, column 0, byte index 0: not well-formed (invalid token)


Root does not exist. Either state file could not be opened or it does not contain valid xml
ERROR: In /home/opencfd/OpenFOAM/ThirdParty-2.0.0/ParaView-3.10.1/VTK/IO/vtkXMLParser.cxx, line 483
vtkPVXMLParser (0x3eea33f8): Error parsing XML in stream at line 1, column 0, byte index 0: not well-formed (invalid token)


Root does not exist. Either state file could not be opened or it does not contain valid xml
if i try to open the state previously asved as a .pvsm file i still don't get the state where i was when saving. the contours, planes, even the time of the simulation is back at defaults.

am i doing something blatantly wrong? am i missing something?

thanks again
sail is offline   Reply With Quote

Old   November 24, 2011, 15:55
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Sail,

There is definitely something wrong somewhere... it looks like your save state file was 0 in size!

Try something simpler, like saving the state after the following steps:
  1. you open the case;
  2. hit the apply button;
  3. move the view point.
  4. Now save the state.
If that save state file is still zero, then try removing old configurations of ParaView... let's see if I can find where it is... ah, here you go:
Code:
rm ~/.config/ParaView/*.ini
That command should erase all ParaView configuration files.

Good luck!
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   November 24, 2011, 17:00
Default
  #5
Senior Member
 
sail's Avatar
 
Vieri Abolaffio
Join Date: Jul 2010
Location: Always on the move.
Posts: 308
Rep Power: 16
sail is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Sail,

There is definitely something wrong somewhere... it looks like your save state file was 0 in size!

Try something simpler, like saving the state after the following steps:
  1. you open the case;
  2. hit the apply button;
  3. move the view point.
  4. Now save the state.
If that save state file is still zero, then try removing old configurations of ParaView... let's see if I can find where it is... ah, here you go:
Code:
rm ~/.config/ParaView/*.ini
That command should erase all ParaView configuration files.

Good luck!
Bruno
I tried your reccomandations but still no luck.

on the other hands i've managed to make it almost work:

for future reference i was using a ubuntu vm and all my saves state where done on the windows shared directory (created following OpenCFD guidelines)

it was already known that gedit have some problems in writng to files placed in this mounted directory, and now it appears that paraview as well.

I tired to move everything to a "normal" position on the vm hard drive and now the state seems to be written correctly.

now all is left to do is try to understand why paraview 3.10.1 crashes bringing down the virtual machine with him when i try to load a saved state...


Last edited by sail; November 24, 2011 at 18:37.
sail is offline   Reply With Quote

Old   November 25, 2011, 04:07
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Sail,

Quote:
Originally Posted by sail View Post
for future reference i was using a ubuntu vm and all my saves state where done on the windows shared directory (created following OpenCFD guidelines)

it was already known that gedit have some problems in writng to files placed in this mounted directory, and now it appears that paraview as well.

I tired to move everything to a "normal" position on the vm hard drive and now the state seems to be written correctly.
Ah HA! You should have mentioned those conditions! I couldn't guess that you were using a mounted folder on a virtual machine directly to the real machine
The mounted drives in virtual machines that link directly to the real machine are only meant to be used when copying files from the real to virtual and vice-versa. Working directly can, sooner or later, lead to problems.

Quote:
Originally Posted by sail View Post
now all is left to do is try to understand why paraview 3.10.1 crashes bringing down the virtual machine with him when i try to load a saved state...
Disable 3D acceleration on the preferences of the virtual machine. It's another one of those features that only work in some scenarios...

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   November 25, 2011, 14:29
Default
  #7
Senior Member
 
sail's Avatar
 
Vieri Abolaffio
Join Date: Jul 2010
Location: Always on the move.
Posts: 308
Rep Power: 16
sail is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Sail,


Ah HA! You should have mentioned those conditions! I couldn't guess that you were using a mounted folder on a virtual machine directly to the real machine
The mounted drives in virtual machines that link directly to the real machine are only meant to be used when copying files from the real to virtual and vice-versa. Working directly can, sooner or later, lead to problems.


Disable 3D acceleration on the preferences of the virtual machine. It's another one of those features that only work in some scenarios...

Best regards,
Bruno
thruth, it was my fault. i've mentioned in the first post, but i've should have entered more in detail. as usually it's hard to know what is important to communicate and what is not, especially for a novice.

disabling the 3d accelleration worked , a new problem arised:

Code:
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 5 (Unknown request)
  Resource id:  0x48016bd
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 5 (Unknown request)
  Resource id:  0x48016c0
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 5 (Unknown request)
  Resource id:  0x48016c0
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 5 (Unknown request)
  Resource id:  0x48016c0
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 5 (Unknown request)
  Resource id:  0x48016c0
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 5 (Unknown request)
  Resource id:  0x48016c0
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 5 (Unknown request)
  Resource id:  0x48016c0
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 1 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 5 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 1 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 5 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 5 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 1 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 112 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 116 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 116 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 1 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 1 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 1 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 5 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 1 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 5 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 104 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 101 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 1 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 1 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 102 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 1 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 1 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 1 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 5 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 1 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 117 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 5 (Unknown request)
  Resource id:  0x1
X Error: GLXBadContextTag 172
  Extension:    154 (Uknown extension)
  Minor opcode: 145 (Unknown request)
  Resource id:  0x1
paraview: ../../src/xcb_io.c:549: _XRead: Assertion `dpy->xcb->reply_data != ((void *)0)' failed.
Aborted
and it is very wierd, because lauching normally paraview does not causes all this mess. it just works. it just happen when i try to load a saved case.

looks something wrong with the xserver or something related... maybe if i try a suse distro i would be more lucky? i would prefer keep using the pakaged distribution of OF and paraview to keep it simple and (almost) failproof, but if there is no other way i could resort to compile paraview from scratch.

thanks again for your time and insights, you're a life saver.

Last edited by sail; November 25, 2011 at 15:40.
sail is offline   Reply With Quote

Old   November 25, 2011, 16:01
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Sail,

The problem now is related to the following situation:
  • When you installed Ubuntu in the Virtual Machine, you had 3D acceleration turned on. Therefore, Ubuntu installed the respective drivers.
  • Now when you disabled the 3D acceleration, the drivers are no longer usable. This means that you'll need to change the installed drivers.
Try installing and switching to Unity 2D: http://www.liberiangeek.net/2011/04/...natty-narwhal/

Er, no, wait, you have Ubuntu 10.04. OK, I found a solution here:
Quote:
Originally Posted by http://ubuntuforums.org/showthread.php?t=1766613#post10858199
At the log in screen there is an option to login to -
"Classic (no effects)"
That is the easiest way, once you choose that will become your new default login
Or - in the power button drop down > system settings > login screen
Best regards,
Bruno
sail likes this.
__________________

Last edited by wyldckat; November 25, 2011 at 16:01. Reason: typos...
wyldckat is offline   Reply With Quote

Old   November 25, 2011, 16:25
Default
  #9
Senior Member
 
sail's Avatar
 
Vieri Abolaffio
Join Date: Jul 2010
Location: Always on the move.
Posts: 308
Rep Power: 16
sail is on a distinguished road
Great! it worked!

thank you really much, with your help not only i've managed to make it work, but also i learnt lots of dos and dont's in virtualization and linux in general.

thank you.
sail is offline   Reply With Quote

Old   November 25, 2011, 16:46
Default
  #10
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
I'm glad I could help you

Good luck!
Bruno
__________________
wyldckat is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CFX post-exprestion for reffrencing a case hmasenger CFX 18 February 11, 2021 21:05
[waves2Foam] Had some issues reconstructing the case for post-processing arieljeds OpenFOAM Community Contributions 4 May 5, 2016 19:44
Case Comparison in CFD-Post Tristan CFX 2 February 4, 2016 02:07
[General] paraview render multiple views - off-screen FerdiFuchs ParaView 1 September 25, 2015 11:26
Save views and load them in another case HHOS EnSight 4 June 16, 2015 03:37


All times are GMT -4. The time now is 02:55.