CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Paraview & paraFoam (http://www.cfd-online.com/Forums/openfoam-paraview/)
-   -   Saving ParaFoam views and case (http://www.cfd-online.com/Forums/openfoam-paraview/94726-saving-parafoam-views-case.html)

sail November 23, 2011 12:27

Saving ParaFoam views and case
 
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.

wyldckat November 23, 2011 16:22

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

sail November 23, 2011 22:48

Quote:

Originally Posted by wyldckat (Post 333327)
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

wyldckat November 24, 2011 15:55

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

sail November 24, 2011 17:00

Quote:

Originally Posted by wyldckat (Post 333491)
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...

:rolleyes:

wyldckat November 25, 2011 04:07

Hi Sail,

Quote:

Originally Posted by sail (Post 333494)
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 (Post 333494)
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

sail November 25, 2011 14:29

Quote:

Originally Posted by wyldckat (Post 333523)
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.:o

disabling the 3d accelleration worked :D, 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.

wyldckat November 25, 2011 16:01

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 November 25, 2011 16:25

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. :D:D:D

thank you.

wyldckat November 25, 2011 16:46

I'm glad I could help you :)

Good luck!
Bruno


All times are GMT -4. The time now is 19:22.