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

[OpenFOAM] PostProcessing of a tworegion mesh

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 15, 2006, 07:45
Default PostProcessing of a tworegion mesh
  #1
Member
 
cosimo bianchini
Join Date: Mar 2009
Location: Florence, Tuscany, Italy
Posts: 88
Rep Power: 17
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

Ergon Research s.r.l.
Via Panciatichi, 92
50127 Florence - ITALY
Tel: +39 055 0763716
Mob: +39 320 9460153
e-mail: cosimo.bianchini@ergonresearch.it
URL: www.ergonresearch.it
cosimobianchini is offline   Reply With Quote

Old   December 18, 2006, 04:14
Default There is not really a faster w
  #2
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
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, 04:59
Default Thank you Mattijs for your sug
  #3
Member
 
cosimo bianchini
Join Date: Mar 2009
Location: Florence, Tuscany, Italy
Posts: 88
Rep Power: 17
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

Ergon Research s.r.l.
Via Panciatichi, 92
50127 Florence - ITALY
Tel: +39 055 0763716
Mob: +39 320 9460153
e-mail: cosimo.bianchini@ergonresearch.it
URL: www.ergonresearch.it
cosimobianchini is offline   Reply With Quote

Old   December 18, 2006, 05:17
Default Hi cosimo! I think, there i
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
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, 16:39
Default I got around to verify it: It
  #5
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
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: 17
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.
María.
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: 18
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 María, this seems like a
  #8
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Hi María,

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: 17
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: 190
Rep Power: 17
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 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
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 06:09
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 05:38
[snappyHexMesh] Snappyhex mesh: poor inlet mesh Swagga5aur OpenFOAM Meshing & Mesh Conversion 1 December 3, 2016 16:59
3D Hybrid Mesh Errors DarrenC ANSYS Meshing & Geometry 11 August 5, 2013 06:42
[ICEM] Generating Mesh for STL Car in Windtunnel Simulation tommymoose ANSYS Meshing & Geometry 48 April 15, 2013 04:24


All times are GMT -4. The time now is 10:18.