CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Paraview & paraFoam (http://www.cfd-online.com/Forums/openfoam-paraview/)
-   -   Cell Types and Face Layout (http://www.cfd-online.com/Forums/openfoam-paraview/61279-cell-types-face-layout.html)

tj22 May 12, 2006 12:32

Since the file format has chan
 
Since the file format has changed to owner/neighbor format, does the face numbering for the cells still hold true? Seems not to. I am looking at a dataset with all hexahedrons. And if I grab the faces for the first cell (0) the order of the faces does not correspond to the face numbering in the documentation. Also does not seem to hold true for the next. Can anyone provide me some assistance with the ordering of the faces? I am trying reconstruct the cell in VTK.

hjasak May 12, 2006 13:11

Why don't you just the mesh to
 
Why don't you just the mesh to give you the shapes?

Hrv

OpenFOAM-1.3/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H


//- Calculate cell shapes
void calcCellShapes() const;


tj22 May 12, 2006 13:56

I have figured it out. Thanks
 
I have figured it out. Thanks anyways.

mattijs May 15, 2006 04:10

Also: foamToVTK/vtkTopo.C to s
 
Also: foamToVTK/vtkTopo.C to see how cellShapes are converted into VTK shapes.

tj22 May 15, 2006 14:15

Thanks but I still am not find
 
Thanks but I still am not finding how the faces from a faces file are layed out. I was using the bubbleColumn example. In the first row of hexes, the normal for the owner faces point into the cell while the faces from the neigbor cells point out.

when I move on to the next row it is the inverse.

In Vtk the points need to be in a certain order to look correct which seems to corresponds to the point layout for foam on the cell type doc.

But I cant seem to find the rhyme or reason of how foam lays out the faces.

Thanks.

hjasak May 15, 2006 14:21

Try this: ~/.OpenFOAM-1.3/c
 
Try this:

~/.OpenFOAM-1.3/cellModels

So, for a hex:


hex
{
index 3;
numberOfPoints 8;

faces
6
(
4(0 4 7 3) // x-min
4(1 2 6 5) // x-max
4(0 1 5 4) // y-min
4(3 7 6 2) // y-max
4(0 3 2 1) // z-min
4(4 5 6 7) // z-max
);

edges
12
(
(0 1) // x-direction
(3 2)
(7 6)
(4 5)
(0 3) // y-direction
(4 7)
(5 6)
(1 2)
(0 4) // z-direction
(1 5)
(2 6)
(3 7)
);

}

A tet is:

tet
{
index 7;
numberOfPoints 4;

faces
4
(
3(1 2 3)
3(0 3 2)
3(0 1 3)
3(0 2 1)
);

edges
6
(
(0 1)
(0 2)
(0 3)
(3 1)
(1 2)
(3 2)
);

}

I hope you can read this.

Hrv

tj22 May 17, 2006 13:05

I now have an algorithm that w
 
I now have an algorithm that works. Thanks anyways.


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