CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   shapetoCell in topoSet (https://www.cfd-online.com/Forums/openfoam-pre-processing/178792-shapetocell-toposet.html)

shengqiming October 16, 2016 11:40

shapetoCell in topoSet
 
Hi all,

i want to use topoSet to definte a triangular prism. There is a tool called shapeToCell. But there is no further information about how to use it. Can anyone show me how can i deinite this region? Or there are some other choices i can use? Thank you in forward.

Antimony October 16, 2016 21:06

Hi,

Have you looked at the "master" topoSetDict?

Quote:

// source shapeToCell;
// sourceInfo
// {
// type hex; // hex/wedge/prism/pyr/tet/tetWedge/splitHex
// }
https://github.com/OpenFOAM/OpenFOAM...et/topoSetDict

So I should think that for your prism cells, you simply choose the type as prism.

Cheers,
Antimony

shengqiming October 17, 2016 08:13

Quote:

Originally Posted by Antimony (Post 621712)
Hi,

Have you looked at the "master" topoSetDict?



https://github.com/OpenFOAM/OpenFOAM...et/topoSetDict

So I should think that for your prism cells, you simply choose the type as prism.

Cheers,
Antimony


Hi Antimony,

thanks for your reply. I have seen this. The problem is that how can i choose this region for a prism. I may need to give the vertex of the prism or something?

Best regards
Qiming

amuzeshi July 21, 2019 04:14

Quote:

Originally Posted by shengqiming (Post 621679)
Hi all,

i want to use topoSet to definte a triangular prism. There is a tool called shapeToCell. But there is no further information about how to use it. Can anyone show me how can i deinite this region? Or there are some other choices i can use? Thank you in forward.

shapeToCell Selects all cells of given cellShape and not all cells within the shape.

marxioxyz July 5, 2023 00:44

shapeToCell not working with proposed syntax
 
Hello,


I'm using OpenFoam 10 and trying to use shapeToCell.


This block on topoSetDict
{
name hexaedros;
type cellSet;
action new;
source shapeToCell;
shape hex;
}
returns this error:
=====================

Created cellSet hexaedros
Applying source shapeToCell
--> FOAM FATAL ERROR:
Illegal cell type cellSet
From function Foam::shapeToCell::shapeToCell(const Foam::polyMesh&, const Foam::dictionary&)
in file sets/cellSources/shapeToCell/shapeToCell.C at line 109.
=====================


If I use the syntax like this (type instead of shape, as suggested in tc/caseDicts/annotated/topoSetDict):
{
name hexaedros;
type cellSet;
action new;
source shapeToCell;
type hex;
}

I get this error:


===================

--> FOAM FATAL ERROR:
Unknown set type hex

Valid set types :

6
(
cellSet
cellZoneSet
faceSet
faceZoneSet
pointSet
pointZoneSet
)
===================

I also checked the shapeToCell.C file and suposedly I should use "type" .


Any clues on what I am doing wrong? Or could it be a bug in the source code?


Thank you!

amuzeshi July 5, 2023 03:42

Quote:

Originally Posted by marxioxyz (Post 852780)
Hello,


I'm using OpenFoam 10 and trying to use shapeToCell.
...

I could not figure it out in 30 minutes; both topoSet.C and shapeToCell.C ask for the keyword "type", that is why the confusion pops up.. I am curious about the solution..

marxioxyz July 5, 2023 10:27

Quote:

Originally Posted by amuzeshi (Post 852792)
I could not figure it out in 30 minutes; both topoSet.C and shapeToCell.C ask for the keyword "type", that is why the confusion pops up.. I am curious about the solution..

Thank you Ali Shayegh for the time spent.
I noticed that too and tried to embrace the "type" from shapeToCell.C inside brackets or parenthesis to "restrict its space", but no luck with that too.


All times are GMT -4. The time now is 12:01.