CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   pointZone to cellZone (https://www.cfd-online.com/Forums/openfoam/104666-pointzone-cellzone.html)

Peter_600 July 12, 2012 11:05

pointZone to cellZone
 
Hi Foamers,

how can I get from a pointZone a cellZone?

cheers Peter

bigphil July 15, 2012 07:58

Hi Peter,

I think you can use the setSet utility to do what you want.

Something like this:

start setSet in your case:
Code:

setSet
create a pointSet from your pointZone:
Code:

pointSet p0 new zoneToPoint yourPointZoneName
create a cellSet from the pointSet
Code:

cellSet c0 new pointToCell p0
quit setSet
Code:

quit
then create a cellZone from the cellSet:
Code:

setsToZones -noFlipMap
Now you will have a cellZone called c0 which contains the points from your pointZone yourPointZoneName.

I might have made a few mistakes with the syntax but it should do what you want with a bit of fiddling.

Best regards,
Philip

Peter_600 July 16, 2012 07:35

Thank you very much!
I ll give it a try!
cheers Peter

Peter_600 July 16, 2012 08:02

This works fine for a pointSet, which is in ./polyMesh/sets/.

In my case I have a pointZone in ./polyMesh and I like to have a cellZone out of it.

bigphil July 16, 2012 09:01

Quote:

Originally Posted by Peter_600 (Post 371613)
This works fine for a pointSet, which is in ./polyMesh/sets/.

In my case I have a pointZone in ./polyMesh and I like to have a cellZone out of it.

Hi Peter,

The above method should work fine to create a pointZone from a cellZone. As I explained above, you must create a pointSet from your pointZone, then create a cellSet from your pointSet, then create a cellZone from the cellSet
i.e.
pointZone -> pointSet -> cellSet -> cellZone

Philip

Peter_600 July 17, 2012 03:33

Sorry it was my fault!
It works :) I will try to adapt it within my mesh class.
Thank you very much!!


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