|
[Sponsors] |
February 11, 2010, 02:22 |
Mesh structure of Open Foam.
|
#1 |
New Member
Gopal Shinde
Join Date: Sep 2009
Location: Pune, India
Posts: 28
Rep Power: 17 |
Hi Foamers,
Can anybody explain me the underlying mesh connectivity of the mesh generated in OpenFoam by blockMesh. Or the reference where should I look for the same ? rgds, -Gopal |
|
February 11, 2010, 10:46 |
|
#2 |
Senior Member
|
Hello i do not know if this information is still valid (i mean using -blockTopology argument to dump out a blockTopology.obj file)http://openfoamwiki.net/index.php/BlockMesh
and can not try blockmesh right now. But try to visualise some blockmesh-examples with the help of VTK (for example visit http://www.llnl.gov/visit/ mayavi http://mayavi.sourceforge.net/ or paraview that comes with OF) just my 2 cents elvis |
|
February 12, 2010, 03:05 |
|
#3 |
Senior Member
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21 |
Check out the doxygen documentation: there you'll find the mesh classes. Doxygen is your friend.
The basic idea is that you have a global pointField that holds all the mesh points. The position of the points in this pointField is your connection to all the upper topologies: face, cell, even the patches, sets and zones... their core is in this idea.. because the upper sets are just lists of the lower ones. like this: Code:
pointField myLittleMeshPoints (3, point(0,0,0)); // let's make a triangle myLittleMeshPoints[0] = point (0,0,0); myLittleMeshPoints[1] = point (1,0,0); myLittleMeshPoints[2] = point (1,1,0); // create the label list for the face: // check out Foam::face constructor, and // you'll see that the constructor takes // a label list reference as an argument. // face (const labelList &) // NEVER PASS OBJECTS AS ARGUMENTS, // ALWAYS REFERENCES. // I'm just saying. :D labelList myLittleFaceLabels (3,0); // give the values of the label list // myLittleFaceLabels the position // of the points in the global mesh // pointField myLittleMesh forAll (myLittleFaceLabels, labelI) { myLittleFaceLabels[labelI] = labelI; } // call the constructor for the face. face myLittleFace (myLittleFaceLabels); // As the face is the list of point labels // in the global mesh pointField, so is // the cell a list of faces: a list of lists // of labels in the global mesh pointField. // This way you don't copy a bunch of // Foam::Vector<Cmpt> or Vector<scalar> // or point or vector (read: point) but instead // use the labels for the connectivity. |
|
March 25, 2010, 12:31 |
|
#4 |
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17 |
When defining a face from a list of point as per your example, does the ordering of the points matters ?
Will it matter when computing surface flux latter, for example ? EDIT Just found my answer in the user guide |
|
March 25, 2010, 12:37 |
|
#5 | |
Senior Member
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20 |
Quote:
"The order in which the vertices are given must be such that, looking from inside the block and starting with any vertex, the face must be traversed in a clockwise direction to define the other vertices."
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!" |
||
March 25, 2010, 13:26 |
|
#6 | |
Senior Member
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21 |
Quote:
I'm working on a 2D solver (gathering 3D cell centered data for the interpolation) so I just need to be careful to have the counter clockwise oriented polygons (that's what faces are) so that my area is calculated positively. Or, as the U-Guide states: Code:
if (inside and looking out) { clockwise orientation to get the outward pointing normal } Code:
Foam::face Foam::face::reverseFace() |
||
May 29, 2012, 17:33 |
|
#7 | |
New Member
Join Date: Feb 2012
Posts: 4
Rep Power: 14 |
Quote:
|
||
July 7, 2015, 10:18 |
|
#8 | |
Member
Join Date: Jun 2011
Posts: 80
Rep Power: 15 |
Quote:
Hi Tomislav! I'm trying to build a cylinder made of points by using pointField. If you have a look at the pointField class, you'll see that the write function is missing, so can I write and read this list of points in file? Up to the moment I've been able of writing them by using: OFstream cylinderPoints("cylinderPoints"); but I'm sure that something better can be done... Regards, -- Antonio |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Gambit problems | Althea | FLUENT | 22 | January 4, 2017 04:19 |
[Other] Cannot read a Spider mesh into Foam | evrikon | OpenFOAM Meshing & Mesh Conversion | 1 | March 14, 2012 11:13 |
gmsh2ToFoam | sarajags_89 | OpenFOAM | 0 | November 24, 2009 23:50 |
OpenFOAM with IBM AIX | matthias | OpenFOAM Installation | 20 | March 25, 2008 03:36 |
Icemcfd 11: Loss of mesh from surface mesh option? | Joe | CFX | 2 | March 26, 2007 19:10 |