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

PostProcessing of a tworegion mesh

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 15, 2006, 08:45
Default Hi all, I'm working with a
  #1
Member
 
cosimo bianchini
Join Date: Mar 2009
Location: Florence, Tuscany, Italy
Posts: 88
Rep Power: 8
cosimobianchini is on a distinguished road
Send a message via Skype™ to cosimobianchini
Hi all,

I'm working with a Conjugate solver that explicitly passes boundary conditions between solid and fluid interface.
The two meshes are stored in two different directories:

case/constant/region1/polyMesh
case/constant/region2/polyMesh

What I usually do to post-process is:
- convert my result to VTK format with:
foamToVTK . <casename> -mesh region1
foamToVTK . <casename> -mesh region2

- upload data in paraview for the two meshes separately

This method works fine but is a little bit too long.
In fact, as far as boundary data are not stored together with the internalField ones, it means that I have to load data for each boundary patch one by one (for each mesh) to obtain the complete field.
I was just wondering if there was a better (faster and smarter) way of doing it.
Thanks in advance for all your replies.
Cosimo
__________________
Cosimo Bianchini

Energy Engineering Department "S. Stecco"
University of Florence
Via di S.Marta, 3
50139 Florence - ITALY
Tel: +39 055 4796575
Fax: +39 055 4796342
Mob: +39 320 9460153
e-mail: cosimo.bianchini@htc.de.unifi.it
URL: www.htc.de.unifi.it
cosimobianchini is offline   Reply With Quote

Old   December 18, 2006, 05:14
Default There is not really a faster w
  #2
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
There is not really a faster way (without changing foamToVTK). The only thing that might help you is the -allPatches option which puts all patches into one file.

Just type foamToVTK without any arguments to see all the options.
mattijs is offline   Reply With Quote

Old   December 18, 2006, 05:59
Default Thank you Mattijs for your sug
  #3
Member
 
cosimo bianchini
Join Date: Mar 2009
Location: Florence, Tuscany, Italy
Posts: 88
Rep Power: 8
cosimobianchini is on a distinguished road
Send a message via Skype™ to cosimobianchini
Thank you Mattijs for your suggestion.
-allPatches option works fine and it helps saving some time but you loose the opportunity of accessing separately to the patches data. It would be interesting expecially for the solid-fluid interface patch.
Anyway thanks a lot again.
Cosimo
__________________
Cosimo Bianchini

Energy Engineering Department "S. Stecco"
University of Florence
Via di S.Marta, 3
50139 Florence - ITALY
Tel: +39 055 4796575
Fax: +39 055 4796342
Mob: +39 320 9460153
e-mail: cosimo.bianchini@htc.de.unifi.it
URL: www.htc.de.unifi.it
cosimobianchini is offline   Reply With Quote

Old   December 18, 2006, 06:17
Default Hi cosimo! I think, there i
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,905
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi cosimo!

I think, there is a way, but it would involve heavy symbolic linking (and I havn't tried it):

Basically what you do is create two cases that point to the real data.

Suppose you have your case in aTaleOfTwoMeshes. Create two directories meshCase1, meshCase2. For each directory create these links:

meshCaseX/system -> aTaleOfTwoMeshes/system
meshCaseX/constant/polyMesh -> aTaleOfTwoMeshes/constant/regionX/polyMesh
meshCaseX/0 -> aTaleOfTwoMeshes/0/regionX
(the last has to be done for every time-step)

Now create a stub in one case (touch meshCase2/meshCase2.foam), open the other case from the command line (paraFoam . meshCase1), in that paraFoam open the stub you created from the File->Open-dialog (I think that is possible).

As I said: havn't tried that yet, but from past experience I would say it might work. (If it works one might write a script to automatize all that linking)

Of course you'll have to adjust the time for both data-sources separatly.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   December 18, 2006, 17:39
Default I got around to verify it: It
  #5
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,905
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
I got around to verify it: It works the way I described it.
For my own entertainment I wrote a script (in Python) that does all the linking:
http://openfoamwiki.net/index.php/Ho...rocMultiregion
(you are welcome to rewrite it in the Scripting-language of your choice)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   July 30, 2007, 14:04
Default Hi everybody! I have ran a ca
  #6
New Member
 
María
Join Date: Mar 2009
Location: Zaragoza, Spain
Posts: 12
Rep Power: 8
maría is on a distinguished road
Hi everybody!
I have ran a case with two meshes, which are located in:
-case/constant/region1/polyMesh and
-case/constant/region2/polyMesh

I tried to postprocess the results using foamToVTK but a FATAL ERROR apears.
According to cosimo, I did:

- foamToVTK . <casename> -mesh region1
- foamToVTK . <casename> -mesh region2

And the error tells that OpenFoam cannot find the file called "points" in "constant/polyMesh".
The point, is that the file "points" exist but in "constant/region1/polyMesh" and"constant/region2/polyMesh".

What can I do to solve this error??

Thanks in advance.
Mara.
maría is offline   Reply With Quote

Old   July 31, 2007, 01:04
Default Dear Maria I know the troub
  #7
Member
 
sradl's Avatar
 
Stefan Radl
Join Date: Mar 2009
Location: Graz, Austria
Posts: 82
Rep Power: 9
sradl is on a distinguished road
Dear Maria

I know the trouble you are heading in and you will not get lucky with the conversion to VTK files.

May I suggest to use the python script posted by Bernhard in Dec 2006 on the wiki page. You have to install the pyFoam package, but then it is just one more command before "paraFoam . <case>" I can definitely recommend this python-approach and it works without trouble.

br
Stefan Radl
sradl is offline   Reply With Quote

Old   July 31, 2007, 04:04
Default Hi Mara, this seems like a
  #8
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
Hi Mara,

this seems like a bug. Can you please report it in the bug-reports section and we'll have a look at it.
mattijs is offline   Reply With Quote

Old   September 7, 2007, 06:53
Default Hi, Mattijs was right. It
  #9
New Member
 
María
Join Date: Mar 2009
Location: Zaragoza, Spain
Posts: 12
Rep Power: 8
maría is on a distinguished road
Hi,

Mattijs was right. It was just a bug, which has already been checked and now it's working.

See the following section for more details:

OpenFOAM Message Board: OpenFOAM-Bugs: FoamToVTK for cases with two meshes.

Thanks guys!
maría is offline   Reply With Quote

Old   October 10, 2008, 05:52
Default dear all!! i run the multiR
  #10
Senior Member
 
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 183
Rep Power: 8
mabinty is on a distinguished road
dear all!!

i run the multiRegionHeater tutorial case in OF 1.5 and would like to display the
results with paraView 3.3.0 dev. the case has 5 regions: left/rightSolid, heater, top/bottomAir where for each a <regionname>_1.vtk file is produced and stored in a VTK folder. i ve no problem to import the region meshes in paraview (file->open) but cannot display any quantity.
the inspector/properties menu of the different regions is empty (blank) so that non of the field variables can be chosen in the inspector/display/color by menu.

i ve no idea whats going wrong here. could anybody give me a hint? i would greatly appreciate any comments!

thx in advance!
aram
mabinty 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
DPM Postprocessing Fabio FLUENT 1 January 24, 2009 17:39
Can OpenFoam extract the surfaceinterface mesh for postprocessing paean OpenFOAM Post-Processing 1 December 9, 2008 16:49
Questions in mesh converstion and postprocessing BANNARI (Bannari) OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 0 March 3, 2005 08:23
HELP: moving mesh, postprocessing Sunlight007 CD-adapco 1 June 6, 2003 10:31
On postprocessing Hur Seok-Ju FLUENT 1 March 19, 2000 16:37


All times are GMT -4. The time now is 15:31.