|
[Sponsors] |
snappyHexMesh: cell lower corner instead of cell centre |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 5, 2013, 12:03 |
snappyHexMesh: cell lower corner instead of cell centre
|
#1 | ||
Senior Member
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 17 |
Hi all,
I would like to change the criterion that snappyHexMesh uses to keep cells into the domain during the refinement stage (cast). I would like to keep in the domain all the cells that have not the cell centre but the cell lower corner into the domain. I am trying to modify the code in the file "src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C". At line 75 there is the cell centres vector definition: Quote:
Quote:
I think I am not writing/initializing the vector correctly. Does anyone have any suggesstion? Thanks in advance Andrea
__________________
Andrea Pasquali |
|||
February 7, 2013, 09:07 |
|
#2 |
Senior Member
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 17 |
Hi All,
I solved the problem using a Dynamic Vector. This is fine and I have all the cell-lower-corner in a vector. If I am understanding correctly, OpenFOAM selects the cells that have to be deleted according to an index defined in cellRegion: Code:
regionSplit cellRegion(mesh_); DynamicList<label> cellsToRemove(mesh_.nCells()); forAll(cellRegion, cellI) { if (cellRegion[cellI] != regionI) { cellsToRemove.append(cellI); } } cellsToRemove.shrink(); I would like to change this: no cell-centre criterion but cell-lower-corner. Does anyone know which is the file I have to look for? Thanks for any help Andrea
__________________
Andrea Pasquali |
|
February 7, 2013, 11:53 |
|
#3 | |
Senior Member
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 17 |
Now I am able to change the vector:
Code:
cellsToRemove Code:
cellToRemoveLowerCorner Code:
labelList exposedFaces(cellRemover.getExposedFaces(cellsToRemoveLowerCorner)); if (exposedFaces.size()) { FatalErrorIn ( "meshRefinement::splitMeshRegions(const point&)" ) << "Removing non-reachable cells should only expose boundary faces" << nl << "ExposedFaces:" << exposedFaces << abort(FatalError); } Quote:
Thanks Andrea
__________________
Andrea Pasquali |
||
February 11, 2013, 07:21 |
|
#4 |
Senior Member
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 17 |
Hi All,
finally I have it. I changed the "edge" definition into meshRefinement.C file
__________________
Andrea Pasquali |
|
February 11, 2013, 07:22 |
|
#5 |
Senior Member
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 17 |
Hi All,
finally I have it. I changed the "edge" definition into the meshRefinement.C file Andrea
__________________
Andrea Pasquali |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
FvMatrix coefficients | shrina | OpenFOAM Running, Solving & CFD | 10 | October 3, 2013 15:38 |
Xcoordinate of cell centre in volScalarField | pda | OpenFOAM Running, Solving & CFD | 7 | July 18, 2007 10:01 |
Warning 097- | AB | Siemens | 6 | November 15, 2004 05:41 |
cell to cell relation | CMB | Siemens | 1 | December 4, 2003 05:05 |
CELL CENTRE OUTSIDE OF THE CELL | rogeha | Siemens | 0 | May 23, 2002 06:41 |