|
[Sponsors] |
[mesh manipulation] Extract exteral surface from cellZone |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 22, 2015, 16:06 |
Extract exteral surface from cellZone
|
#1 |
Member
daniel fernex
Join Date: Oct 2014
Location: Braunschweig, Germany
Posts: 36
Rep Power: 11 |
Dear all,
after spending a lot of time looking for this I couldn't find any answer, so I ask here. I have a body (cylinder) and I've got his cells defined in a cellZone. I'd like to create a faceZone of the lateral surface of the cylinder. It is the body shown on the picture attached. I've tried almost every option from topoSet, but I couldn't find an option to extract only the surface. Is it possible to extract the lateral surface on a faceZone ??? Thank you very much for any answer. |
|
January 23, 2015, 15:07 |
New formulation
|
#2 |
Member
daniel fernex
Join Date: Oct 2014
Location: Braunschweig, Germany
Posts: 36
Rep Power: 11 |
Hi,
I've thought I may explain my problem in another way. It can be easily understood with the attached picture.
I've tried creating a patch from the cylinder faceZone (with createBaffles) to see if it would also be kept after the extrusion, but it disappears... And I really need this faceZone... I'm a bit desperate with this, and I would really appreciate any suggestion ! here is my extrudeMesh : Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object extrudeMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // What to extrude: // patch : from patch of another case ('sourceCase') // mesh : as above but with original case included // surface : from externally read surface constructFrom patch; sourceCase "../patch/"; sourcePatches (back); // If construct from patch: patch to use for back (can be same as sourcePatch) exposedPatchName front; // Flip surface normals before usage. Valid only for extrude from surface or // patch. flipNormals true; //- Linear extrusion in point-normal direction extrudeModel linearNormal; nLayers 1; expansionRatio 1.0; linearNormalCoeffs { thickness 1; } // Do front and back need to be merged? Usually only makes sense for 360 // degree wedges. mergeFaces false; //true; // Merge small edges. Fraction of bounding box. mergeTol 0; |
|
January 24, 2015, 14:27 |
|
#3 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Greetings Daniel,
This might be a bug in OpenFOAM 2.3.0 and it might have already been solved in 2.3.1. The detail is that "faceZones" are not true patches, they are only reference lists of faces in the mesh, with some details on the normals for the zone; in other words, it contains only just enough information for some operations, it does not contain the full details needed for a proper patch. Nonetheless, if the "cellZone" is preserved after extruding, then you should be able to extract a "faceSet" and/or "faceZone" from it. Have a look at the main example file, whose path is given by the following command: Code:
echo $FOAM_UTILITIES/mesh/manipulation/topoSet/topoSetDict
Bruno
__________________
|
|
January 25, 2015, 04:57 |
|
#4 |
Member
daniel fernex
Join Date: Oct 2014
Location: Braunschweig, Germany
Posts: 36
Rep Power: 11 |
Hi Bruno, thanks for the answer.
I've tried the exact same procedure you suggested, but the problem comes from the command to extract the faceSet from the cellSet : Code:
source cellToFace; Code:
{ name slidingCircle; type faceSet; action new; source cellToFace; sourceInfo { option all;//both set slidingCircle; } } I'll try to update to OF231 and keep you posted. |
|
January 25, 2015, 05:31 |
|
#5 |
Member
daniel fernex
Join Date: Oct 2014
Location: Braunschweig, Germany
Posts: 36
Rep Power: 11 |
Hello again,
I've tried with OF231 with the same results... Even when I create two patches (with createBaffles) before the extrusion, they disappear after the extrusion. So extrudeMesh seems to delete faces from
|
|
January 25, 2015, 10:40 |
|
#6 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Hi Daniel,
Can you please provide a test case for testing this? Because setting one up takes quite a long time to do so. Best regards, Bruno
__________________
|
|
January 25, 2015, 14:00 |
|
#7 |
Member
daniel fernex
Join Date: Oct 2014
Location: Braunschweig, Germany
Posts: 36
Rep Power: 11 |
Hi Bruno,
thanks for taking the time. An example case can be found here (sorry it's rather big because of the stl geometry...) : https://cloud.utc.fr/public.php?serv...f5b53df8ececcc I'm using snappyHexMesh, but I'm having bad mesh quality, although I'm doing a 2D simulation. So to improve the mesh quality I've tried to used the idea from here : http://upcommons.upc.edu/pfc/bitstre...9/1/memory.pdf, which consist in the following process :
The main difference with the pdf above, is that I create a faceZone and a cellZone (slidingCircle) with snappyHexMesh. The problem is that after extruding (step 2), the faceZone from the slidingCircle disappears, and I think the snapping process (from step 3) requires this faceZone to run correctly. That why I was trying to recover that faceZone. In the end, the slidingCircle is supposed to rotate inside the background mesh. And the mesh quality is so great with snappyHexMesh that I would love finding a solution to this, instead of using unstructured mesh. Thank you for your advice. Regards, Daniel |
|
January 25, 2015, 16:21 |
|
#8 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Hi Daniel,
OK, now I have a clearer understanding of what's going on! I'm even surprised that extrudeMesh is able to preserve the "cellZone", based only in the "front" patch to create the new mesh. The solution is theoretically simple enough: you need in the second pass with snappyHexMesh to also include the castellation step, but in this pass, you should not use the refinement levels. In other words, try using: Code:
refinementSurfaces { slidingCircle { level (0 0); faceZone slidingCircle; faceType boundary; cellZone slidingCircle; cellZoneInside inside; } } The downside is that the primary "slidingCircle" faceZone looks a bit strange, but the second one, namely "slidingCircle_slave" looks fine. Best regards, Bruno |
|
January 26, 2015, 04:32 |
|
#9 |
Member
daniel fernex
Join Date: Oct 2014
Location: Braunschweig, Germany
Posts: 36
Rep Power: 11 |
Hi Bruno,
thank you SO MUCH for finding this solution !! I had lost hope to go any further in this mesh creation ! So now it works just fine except, as you said, the boundary of the slidingCircle that doesn't look good at all (see picture attached)... The outer mesh seems ok, but the inner mesh seems somehow to have snapping troubles... I've tried changing some parameters (meshQuality, snapping parameters, with explicit feature edges refinement) but I couldn't decrease this gap... Any idea on how to make it better ? Thanks again for spending so much time on this. Regards, Daniel |
|
January 26, 2015, 12:10 |
|
#10 |
Member
daniel fernex
Join Date: Oct 2014
Location: Braunschweig, Germany
Posts: 36
Rep Power: 11 |
Hi !
So the only parameter that seems to make a difference is refining the Code:
feature This is strange, because when I process in this order :
I'm losing faith in SHM... I wish there was a version for 2D meshes. But still, is there are any suggestions, I'd be delighted |
|
January 26, 2015, 15:47 |
|
#11 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Quick answer:
|
|
January 28, 2015, 08:21 |
|
#12 |
Member
daniel fernex
Join Date: Oct 2014
Location: Braunschweig, Germany
Posts: 36
Rep Power: 11 |
Hi,
I've tried what you suggested, but nothing worked... I'll try to figure something else then. And I wanted to thank you for the time you've spent on my case, it's such a pleasure to see how fast and efficiently we get answers on this forum |
|
January 28, 2015, 15:15 |
|
#13 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Quote:
Another suggestion is to try SwiftBlock and/or SwiftSnap: |
||
January 30, 2015, 11:34 |
|
#14 | |
Member
daniel fernex
Join Date: Oct 2014
Location: Braunschweig, Germany
Posts: 36
Rep Power: 11 |
Quote:
The thing is, snappying right after the castellation gave me very poor mesh quality, hence the extrusion in between. BUT the problem is that my background mesh only had 1 cell in the Z direction, and since the snappying process is 3D, it was having troubles to snap cells that are very small on x and y, but huge on z... So I've put cells in the Z direction of the background mesh, and the mesh resulting from castel+snap is perfect ! So I can extrude normally after this and I avoid the strange surface problem. I'm friend again with snappyHexMesh |
||
December 10, 2021, 04:16 |
|
#15 | |
Member
JuanMi
Join Date: Nov 2017
Posts: 41
Rep Power: 8 |
Quote:
With the procedure initially outlined by wyldckat, it is possible to get the faceZone using the delete action. We can select all the faces with the option all, and then substract the internal faces with option both. Here my proposal ( I hope it can be useful to someone) Code:
{ name slidingCircle; type faceSet; action new; source cellToFace; sourceInfo { option all; set slidingCircle; } } { name slidingCircle; type faceSet; action delete; source cellToFace; sourceInfo { option both; set slidingCircle; } } |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Surface triangulation using snappyHexMesh | shaileshbg | OpenFOAM Meshing & Mesh Conversion | 4 | October 17, 2019 04:42 |
cellZone not taking all the cells inside | rahulksoni | OpenFOAM | 0 | January 16, 2019 01:16 |
[Gmsh] Error : Self intersecting surface mesh, computing intersections & Error : Impossible | velan | OpenFOAM Meshing & Mesh Conversion | 3 | October 22, 2015 11:05 |
[snappyHexMesh] snappyHexMesh matches wrong cells to CellZone | Siegunn | OpenFOAM Meshing & Mesh Conversion | 4 | July 31, 2015 05:10 |
[waves2Foam] waveNGauges for extract surface elevation affected forces? | hchen | OpenFOAM Community Contributions | 6 | June 18, 2015 02:48 |