CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Star4ToFoam import boundaries in polyhedral mesh (

cosimobianchini April 5, 2007 03:15

Hi all, I would like to conve
Hi all,
I would like to convert into Foam a pro-Star4 format mesh. I have done this procedure many times without problems, the peculiarity is that this time the mesh is composed by polyhedral elements. Being a test the chosen mesh is very simple: a single cylinder with inlet, outlet and wall.

I found some errors in importing the boundary conditions set up with pro-Star4. The geometry is exactly converted but boundary polymesh fails to be created.
Two types of error come out:

There are 2554 faces to be patched and 237 specified - collect missed boundaries to final patch
meshReader::createPolyBoundary(): Problem with face: 6(11916 17960 17961 17962 17963 11917)
Probably trying to define a boundary face on a previously matched internal face.
Internal face: 6(11916 17960 17961 17962 17963 11917)


meshReader::createPolyBoundary() : problem with face 1278: addressed 1 times (should be 2!). Face: 6(2011 2012 2013 2014 2015 2016)

Is there anyone that already found this errors? How did you solve it?

Thanks a lot for the help


olesen April 5, 2007 04:03

Hi Cosimo, Assuming that yo
Hi Cosimo,

Assuming that you are using the last patch posted here (13 Nov 2006), the following mini-patch should help solve the problem. The culprit is the incorrect lookup in "mapToFoamCellId_" (typical cut/paste error) that is around line 461 of starMeshReader.C

else if (shapeId == 255)
// poly cell - create cell faces directly
label nFaces = starLabels[0] - 1;

// record original cell number and lookup
origCellId_[cellI] = starCellId;
mapToFoamCellId_[starCellId] = cellI;

The version that you have likely has the obviously wrong
mapToFoamCellId_[starCellId] = starCellId;

After OpenFOAM v1.4 is released, I'll be able to post a more recent version that also handles defined, but unused vertices and various other improvements.

cosimobianchini April 5, 2007 04:48

Thank you very much Mark for t
Thank you very much Mark for the quick and effective reply. Following your suggestion, everything works now.

Thanks a lot again


All times are GMT -4. The time now is 03:37.