CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Paraview & paraFoam

Saving ParaFoam views and case

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

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   November 23, 2011, 11: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: 7
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, 15:22
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,172
Blog Entries: 32
Rep Power: 70
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
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
wyldckat is offline   Reply With Quote

Old   November 23, 2011, 21:48
Default
  #3
Senior Member
 
sail's Avatar
 
Vieri Abolaffio
Join Date: Jul 2010
Location: Always on the move.
Posts: 308
Rep Power: 7
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, 14:55
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,172
Blog Entries: 32
Rep Power: 70
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
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, 16:00
Default
  #5
Senior Member
 
sail's Avatar
 
Vieri Abolaffio
Join Date: Jul 2010
Location: Always on the move.
Posts: 308
Rep Power: 7
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 17:37.
sail is offline   Reply With Quote

Old   November 25, 2011, 03:07
Default
  #6
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,172
Blog Entries: 32
Rep Power: 70
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
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, 13:29
Default
  #7
Senior Member
 
sail's Avatar
 
Vieri Abolaffio
Join Date: Jul 2010
Location: Always on the move.
Posts: 308
Rep Power: 7
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 14:40.
sail is offline   Reply With Quote

Old   November 25, 2011, 15:01
Default
  #8
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,172
Blog Entries: 32
Rep Power: 70
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
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 15:01. Reason: typos...
wyldckat is offline   Reply With Quote

Old   November 25, 2011, 15:25
Default
  #9
Senior Member
 
sail's Avatar
 
Vieri Abolaffio
Join Date: Jul 2010
Location: Always on the move.
Posts: 308
Rep Power: 7
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, 15:46
Default
  #10
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,172
Blog Entries: 32
Rep Power: 70
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
I'm glad I could help you

Good luck!
Bruno
wyldckat 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
Case Comparison in CFD-Post Tristan CFX 0 June 16, 2009 20:25


All times are GMT -4. The time now is 13:46.