|
[Sponsors] |
[Other] How to delete cells in OF based on CheckMesh? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 10, 2009, 04:38 |
How to delete cells in OF based on CheckMesh?
|
#1 |
New Member
Anders
Join Date: Sep 2009
Location: Göteborg
Posts: 4
Rep Power: 17 |
I have a problem when trying to convert a mesh from starccm to OpenFOAM. The conversion script ccm26ToFoam seems to work fine, but the checkMesh utility is really hard on the mesh that starccm has created. Starccm has probably built-in stuff that deals with this, and the solution is probably good enough since bad cells typically appear in tight corners that will not greatly influence the engineering problem I am looking upon.
Now, the general recommendation is obviously to go back to the mesher and do a better job, but this is a bit tricky to do for each and every case when wrapped surfaces are used for the meshing. I have so far not found any general setting in starccm to remove cells so that the checkMesh error reports disappear (except removing VERY many cells...) The half-dirty, but in my opinion, good enough solution, would be to let checkMesh identify the problems, and then just delete the cells that are nasty. I have understood that the removeCells utility is primarily working on internal faces (and my problems almost always appear on the surface), so this does not work. So, has anyone here on the forum figured out how to use the checkMesh utility to remove the entire cells that are connected to the erroneous faces? I would appreciate any help on this! |
|
September 12, 2009, 11:07 |
Try subsetMesh
|
#2 |
Member
Michael Roth
Join Date: Mar 2009
Location: Guelph, Ontario, Canada
Posts: 50
Rep Power: 17 |
Take a look at subsetMesh. If you've got a cellSet called something like badCells, do a cellSet "invert" to point to all the cells not in badCells i.e.goodCells. Then run subSetMesh on goodCells.
Mike |
|
September 14, 2009, 02:49 |
|
#3 |
New Member
Anders
Join Date: Sep 2009
Location: Göteborg
Posts: 4
Rep Power: 17 |
Thanks Mike,
I suppose you mean that this command should operate on cells, i.e. not faces? What I've got after the checkMesh command in a bunch of face lists. In some way these will need to be converted to cell lists then, and after this use the cellSet command to select these, and after this the subsetMesh? Anders |
|
September 14, 2009, 08:18 |
|
#4 |
Member
Michael Roth
Join Date: Mar 2009
Location: Guelph, Ontario, Canada
Posts: 50
Rep Power: 17 |
Right. You can run cellSet on a faceSet of nasty faces to get your nasty cells.
Mike |
|
September 14, 2009, 08:22 |
|
#5 |
New Member
Anders
Join Date: Sep 2009
Location: Göteborg
Posts: 4
Rep Power: 17 |
Have you got an example of how to use this faceSet and cellSet command?
|
|
September 14, 2009, 08:47 |
|
#6 |
Member
Michael Roth
Join Date: Mar 2009
Location: Guelph, Ontario, Canada
Posts: 50
Rep Power: 17 |
One nice example is in a tutorial:
Code:
OpenFOAM/OpenFOAM-1.5.x/tutorials/interDyMFoam/damBreakWithObstacle Very close to what you want. Another source is to look at the source codes for faceSet & cellSet which have dictionary files. Take a look at cellSetDict. Code:
OpenFOAM/OpenFOAM-1.5.x/applications/utilities/mesh/manipulation/cellSet Mike |
|
September 14, 2009, 16:36 |
|
#7 |
Senior Member
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 334
Rep Power: 18 |
Hi, Mike,
I have a similar question and will highly appreciated if you can shed some light on this. I created a cellSet using setSet based on boxToCells. There are some external face cells (BC in boundary) that are parts of these cellSet. I would like to detelet this cells from the domain. OK, I can invert this cellSet to a get a new cellSet that contains all the cells I want. But, I read the description of subsetMesh, it does not preserve attached boundary types. Does it mean that I will no longer have the boundary faces in the constant/polyMesh/boundary? Is there a simple to simply delelte cells (and the assoicated points and faces) from the domain? Pei |
|
September 15, 2009, 13:02 |
|
#8 |
Senior Member
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 334
Rep Power: 18 |
Hi,
It turned out that I was wrong about subsetMesh. It does keep the original boundary patches in tact. pei |
|
September 23, 2009, 04:11 |
|
#9 |
New Member
Matthew Philpott
Join Date: Aug 2009
Location: Belgium
Posts: 24
Rep Power: 17 |
I'm having a similar problem. I get a few sets of bad faces (zeroFaces, non-orthofaces, etc). To get rid of them can I just use:
setSet faceSet zeroFaces delete or must I use: setSet faceSet zeroFaces invert subsetMesh or do I have to turn the face set into a cell set (faceToCell?) and then use one of the steps above, but with cellSet? Does cellSet and FaceSet have to work in conjunction with their dictionaries? None of these utilities have very useful help files, except perhaps setSet. Am I correct to get the help file of a utility to type the util followed by -help, e.g. cellSet -help when i do this all i get is a one line usage guide with the parameter possiblities ie. [-batch] [-help] etc. So many questions! I'm confused. It seems simple enough, but I'm not getting any results.
__________________
CAELinux 2009 + OF1.5 Ubuntu 9.04 x64 (jaunty jackalope) + OF1.6 |
|
March 22, 2011, 09:41 |
|
#10 |
New Member
Join Date: Mar 2011
Posts: 6
Rep Power: 15 |
Hi,
I have the same problem and the same question as bigred in a previous post. right now about the removing bad cells from the mesh, and I'm stacked how to do that. Would be very thankful for your help |
|
March 22, 2011, 18:34 |
|
#11 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings sakro and welcome to the forum!
Here is the best example I know for removing the faces/cells reported by checkMesh: http://openfoamwiki.net/index.php/SetSet Best regards and good luck! Bruno
__________________
|
|
March 23, 2011, 09:56 |
|
#12 | |
New Member
Join Date: Mar 2011
Posts: 6
Rep Power: 15 |
Quote:
this link is very helpful. I did it yesterday and it worked, at least I could get rid of bad cells. But then came another problem: subsetMesh created a new boundary (from the deleted cells) with the type 'empty', that is obviously inappropriate. I changed it to symmetryPlane (I also tried wall) but anyway I've lost the convergence with simpleFoam =( |
||
March 23, 2011, 18:21 |
|
#13 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi sakro,
Sadly my experience in this subject is very limited, but here are a few threads that might guide you in the right direction:
Best regards and good luck! Bruno
__________________
|
|
June 24, 2015, 05:09 |
|
#14 | |
Senior Member
Join Date: Mar 2015
Posts: 250
Rep Power: 12 |
Quote:
do you remember if you passed the checkMesh with your changed boundary types? How did you solve this problem? Best regards, Kate |
||
July 27, 2018, 07:05 |
|
#15 |
New Member
Join Date: Jan 2018
Posts: 12
Rep Power: 8 |
Dear FOAMers,
I was wondering whether it is possible to remove volume cells from a mesh without removing the attached faces? I am generating a mesh in gmsh and in order to have faces for all patches I need to define a physical volume for some parts of the mesh where I actually don't need a volume... So I was trying to find a way to remove the unwanted volume cells. Tried using setSet invert, but then the faces attached to the volume will also be removed.. |
|
July 27, 2018, 07:13 |
|
#16 |
New Member
Join Date: Jan 2018
Posts: 12
Rep Power: 8 |
I also used subsetMesh after invertion
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] SnappyHexMesh for internal Flow | vishwa | OpenFOAM Meshing & Mesh Conversion | 24 | June 27, 2016 09:54 |
[snappyHexMesh] No layers in a small gap | bobburnquist | OpenFOAM Meshing & Mesh Conversion | 6 | August 26, 2015 10:38 |
checkMesh Ok but bad cells still present | Hiroshiman | OpenFOAM | 4 | August 14, 2013 12:40 |
[Commercial meshers] failed checkMesh after converting from .msh: non closed cells | phsieh2005 | OpenFOAM Meshing & Mesh Conversion | 11 | September 20, 2012 09:51 |
[mesh manipulation] How to delete selected cells from mesh and update boundary patches | kaka | OpenFOAM Meshing & Mesh Conversion | 2 | November 26, 2009 05:17 |