|
[Sponsors] |
Create dummy file (.OpenFoam) for paraView with touch |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 24, 2011, 18:43 |
Create dummy file (.OpenFoam) for paraView with touch
|
#1 |
New Member
Concordia_CFD
Join Date: Jul 2010
Location: Canada
Posts: 24
Rep Power: 16 |
Hello everyone,
I tried to create a dummy file for paraView by touch command and a file by .OpenFoam extension was created but it was empty! Has anybody experienced the same problem or any idea to solve it?! Thanks a lot in advance. |
|
September 24, 2011, 20:06 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 |
Greetings Marzbali,
Don't worry, it's meant to be empty ParaView only needs a reference as to what the file extension is; having content in said file depends on the reader plugin. In this case, the OpenFOAM plug-in will step in and load the case directly from the simulation files. Now, if you do want files to be open-able in any ParaView, without the need for the case itself, then you can use foamToVTK. Run: Code:
foamToVTK -help edit: Wait, if you already knew that it was a dummy file, then why did you find it odd to be empty? Best regards, Bruno
__________________
Last edited by wyldckat; September 24, 2011 at 20:07. Reason: see "edit:" |
|
September 27, 2011, 11:10 |
|
#3 |
New Member
Concordia_CFD
Join Date: Jul 2010
Location: Canada
Posts: 24
Rep Power: 16 |
Hi Bruno,
Thanks a lot for your reply. The dummy file that is created in empty as you mentioned but the thing is that when I run the python script in batch mode with pvbatch it is not able to load the case files. The error message that it gives is: "NameError: name 'PV3FoamReader' is not defined" What I did was the following: I postproccessed one case in GUI with paraView, saved the trace, edited the python script, modified it for another case in word editor, created the dummy file for the new case by touch, and executed the python script by pvbatch. I checked my OF 1.7 utilities directory and saw that PV3FoamReader was compiled, so I think the problem is not the reader since it works in GUI. Do you have any idea what might cause such a problem?! Thanks. |
|
September 27, 2011, 11:12 |
|
#4 |
New Member
Concordia_CFD
Join Date: Jul 2010
Location: Canada
Posts: 24
Rep Power: 16 |
I forgot to mention that I tried foamToVTK but it didn't work. So I guess the plug-in for VTK is not compiled with my paraView, right?
|
|
October 1, 2011, 11:44 |
|
#5 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 |
Hi Marzbali,
Sorry for taking so long to reply, but here goes:
Or in other words, run pvbatch only from the command line in a terminal window where the OpenFOAM environment is working. But if this is what you are already doing, then you can try another file extension as well (you'll need at least ParaView 3.8.0 for this to work): instead of using the file extension ".OpenFOAM", use ".foam". This will force the usage of the internal reader that has been updated in ParaView 3.8.0 and above. Best regards and good luck! Bruno
__________________
|
|
October 2, 2011, 13:11 |
|
#6 |
New Member
Concordia_CFD
Join Date: Jul 2010
Location: Canada
Posts: 24
Rep Power: 16 |
Thanks a lot Bruno for your thorough reply.
I recompiled the paraView plug-ins and tried foamToVTK agian, it created the VTK folder including the results. Regarding the PV3FoamReader, that was what I thought as well. This reader is meant to be used in GUI. However, in my case I want to postprocess my results in batch mode. So, which reader should I use instead in my python script? And if I use the right reader in batch mode can I execute the python script by pvbatch or pvpython without loading paraView graphics? Regards, Marzbali |
|
October 2, 2011, 15:11 |
|
#7 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 |
Hi Marzbali,
Quote:
Best regards, Bruno
__________________
|
||
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 16:02 |
Working directory via command line | Luiz | CFX | 4 | March 6, 2011 20:02 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 10:23 |
OpenFOAM Install Script | ljsh | OpenFOAM Installation | 82 | October 12, 2009 11:47 |
Results saving in CFD | hawk | Main CFD Forum | 16 | July 21, 2005 20:51 |