|
[Sponsors] |
[snappyHexMesh] Struggling to achieve a smooth cylinder with snappyHexMesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 30, 2024, 12:54 |
Struggling to achieve a smooth cylinder with snappyHexMesh
|
#1 |
New Member
Ilyes SAYAD
Join Date: Jul 2021
Posts: 21
Rep Power: 5 |
Hi everyone,
I'm struggling to achieve a smooth cylinder using snappyHexMesh. I've also tried using surfaceFeatureExtract, but I haven't had any success. I’m unsure how to properly mesh the cylinder to get 90° edges and perfect surfaces with snappyHexMesh. I've attached a screenshot of the cylinder and the case file for reference. Any help would be greatly appreciated. Thank you in advance! |
|
May 31, 2024, 05:33 |
|
#2 |
Senior Member
Join Date: Dec 2021
Posts: 241
Rep Power: 5 |
Hey,
For your snap controls, try this: Code:
nSmoothPatch 2; tolerance 2; nSolveIter 4; nRelaxIter 5; nFeatureSnapIter 1; implicitFeatureSnap false; explicitFeatureSnap true; multiRegionFeatureSnap false; You could also try to use the implicitFeatureSnap but you would need to add resolveFeatureAngle to your castellatedControls. |
|
May 31, 2024, 11:10 |
|
#3 |
New Member
Ilyes SAYAD
Join Date: Jul 2021
Posts: 21
Rep Power: 5 |
Hello Alczem,
Thank you for your response. Unfortunately, I've tried both of your suggestions, but neither of them seems to be working. |
|
May 31, 2024, 11:13 |
|
#4 |
New Member
Ilyes SAYAD
Join Date: Jul 2021
Posts: 21
Rep Power: 5 |
I've also tried using the surfaceCheck command in OpenFOAM, and the log file indicates that the cylinder is not closed (see log file below). Could this be the problem?
Code:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2312 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : _e651d635-20240208 OPENFOAM=2312 patch=240220 version=2312 Arch : "LSB;label=32;scalar=64" Exec : surfaceCheck rotating.stl Date : May 31 2024 Time : 16:06:21 Host : Vostro-3420 PID : 16667 I/O : uncollated Case : /home/ilyes/OpenFOAM/ilyes-2312/run/Case_file_3D_AMI_updated/constant/triSurface nProcs : 1 trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 5, maxFileModificationPolls 20) allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Reading surface from "rotating.stl" ... Statistics: Triangles : 180 in 1 region(s) Vertices : 184 Bounding Box : (-1 -1.5 -1) (1 1.5 1) Region Size ------ ---- patch0 180 Surface has no illegal triangles. Triangle quality (equilateral=1, collapsed=0): 0 .. 0.05 : 0.266667 0.05 .. 0.1 : 0.622222 0.1 .. 0.15 : 0.0777778 0.15 .. 0.2 : 0.0166667 0.2 .. 0.25 : 0.0166667 0.25 .. 0.3 : 0 0.3 .. 0.35 : 0 0.35 .. 0.4 : 0 0.4 .. 0.45 : 0 0.45 .. 0.5 : 0 0.5 .. 0.55 : 0 0.55 .. 0.6 : 0 0.6 .. 0.65 : 0 0.65 .. 0.7 : 0 0.7 .. 0.75 : 0 0.75 .. 0.8 : 0 0.8 .. 0.85 : 0 0.85 .. 0.9 : 0 0.9 .. 0.95 : 0 0.95 .. 1 : 0 min 0.000976297 for triangle 130 max 0.234722 for triangle 177 Edges: min 0.136485 for edge 188 points (0.775711 -1.5 0.631088)(0.682553 -1.5 0.730836) max 3.0031 for edge 9 points (0.775711 1.5 0.631088)(0.854419 -1.5 0.519584) Checking for points less than 1e-6 of bounding box ((2 3 2) metre) apart. Found 0 nearby points. Surface is not closed since not all edges (362) connected to two faces: connected to one face : 184 connected to >2 faces : 0 Conflicting face labels:184 Number of unconnected parts : 3 Splitting surface into parts ... Wrote zoning to "./rotating.vtp" writing part 0 size 92 to "./rotating_0.obj" writing part 1 size 44 to "./rotating_1.obj" writing part 2 size 44 to "./rotating_2.obj" Number of zones (connected area with consistent normal) : 3 More than one normal orientation. Wrote zoning to "./rotating.vtp" writing part 0 size 92 to "./rotating_normal_0.obj" writing part 1 size 44 to "./rotating_normal_1.obj" writing part 2 size 44 to "./rotating_normal_2.obj" End |
|
June 3, 2024, 11:08 |
|
#5 |
New Member
Ilyes SAYAD
Join Date: Jul 2021
Posts: 21
Rep Power: 5 |
Any help ?
|
|
June 3, 2024, 11:53 |
|
#6 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,198
Rep Power: 27 |
Hello,
Yes, the surface not being closed may be the problem. (this reminds me of this: snappyHexMesh - 90° edges problem) You can use surfaceHookup and surfacePointMerge utilities to fix your stl file: Surface Check and Repair Utilities - Need Explanation |
|
June 3, 2024, 12:02 |
|
#7 |
Senior Member
Join Date: Dec 2021
Posts: 241
Rep Power: 5 |
Hey!
Too bad, but you are right, it probably comes from the STLs. Since the issue lies with the rotating.stl file, you could try to replace it by a searchableCylinder. That way, you don't have to care about the STL quality. SnappyHexMesh will see no difference. |
|
June 19, 2024, 10:36 |
|
#8 | |
New Member
Ilyes SAYAD
Join Date: Jul 2021
Posts: 21
Rep Power: 5 |
Quote:
Thank you for your answer ! |
||
June 19, 2024, 10:38 |
|
#9 | |
New Member
Ilyes SAYAD
Join Date: Jul 2021
Posts: 21
Rep Power: 5 |
Quote:
It finally works ! Thanks a lot for your help |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Cant manage to refine a cylinder with snappyhexmesh. | samwise14 | OpenFOAM Meshing & Mesh Conversion | 4 | October 3, 2022 09:08 |
Cylinder volume trace error | rmotwan | CONVERGE | 1 | May 13, 2021 19:29 |
Cfd simulation on a smooth cylinder (drag coefficient) | Simone94 | STAR-CCM+ | 21 | October 31, 2016 11:00 |
benchmark: flow over a circular cylinder | goodegg | Main CFD Forum | 12 | January 22, 2013 12:47 |
Turbulent steady flow around a circular cylinder | Mirek Kabacinski | FLUENT | 0 | July 23, 2003 19:40 |