|
[Sponsors] |
[snappyHexMesh] snappyHexMesh and blockMesh for internal flow (leaking geometry?) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 14, 2014, 13:49 |
snappyHexMesh and blockMesh for internal flow (leaking geometry?)
|
#1 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
Hi all,
I'm trying to use snappyHexMesh - I'm a beginner - in order to simulate an internal flow with simpleFoam. I'd like to share my preliminary case (no care for the correct refinement or other) because I'm afraid that something is not correct. I'm not sure if something is wrong with dictionaries or tolerances, maybe the geometry model is not perfectly closed and the mesh 'leaks' out. This is my procedure: Code:
blockMesh decomposePar foamJob -parallel -screen snappyHexMesh -overwrite reconstructParMesh - constant This is the link to download my preliminary case and the 3D model (the STL file is too large fo the the forum limit). I hope that somone can show me the way to fix the problem. Last edited by vaina74; November 15, 2014 at 10:27. |
|
November 14, 2014, 17:05 |
|
#2 |
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 |
What does your snappyHexmeshDict look like? if you post your case i bet people will help debug it
|
|
November 15, 2014, 10:26 |
|
#3 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
Hi Dan, in my thread I included a link to my Dropbox account to download my preliminary case (also with geometry model, so the archive is too large for the forum attachment limit).
Anyway I attach my dictionaries again. If you can take a look, thank you :-) |
|
November 16, 2014, 18:54 |
|
#4 |
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 |
Had a look at the case and it seems as though the base mesh size was longer in one direction than the other two. This makes the base mesh not cubic, thus making the meshing process behave badly. Attached is a picture of the domain snapping (not refining near the edges) and the snappyHexMeshDict i used. You will need to do some more to capture those edges and use surfaceFeatureExtract to get the featureLines of domain.
testmesh.jpg snappyHexMeshDict.txt I also made the base mesh size 0.2 and did not insert any layers. I hope this helps. |
|
November 18, 2014, 06:04 |
snappyHexMesh and blockMesh for internal flow (improving tips?)
|
#5 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
Thanks for your remark, Daniel. I already knew that a 'cubic' background mesh is required, but I didn't realize that I didn't update the previous z-grading setting :-(
I made some tests yesterday and I encountered some problems, related to refining and snapping features. I think I'll also use Helyx and SwiftSnap in the future, but I want to learn snappyHexMesh first. Refining Outwardly, the refinement level in snappyHexMeshDict are not applied and I obtain only a 0 level (0.1 m). I can't understand why the refinementSurface settings for all STL surfaces don't work (level (2 3)). Snapping I made a first test with the implicitFeatureSnap option but the result was not so good. I enabled the explicitFeatureSnap, but I think that features are not detected. I also set a level 3 for features refinement in order to evidence the edges meshing - am I correct? - but nothing seems to happen. This leads to a bad resolution of openings shape because the fillets are not resolved (see img1). Moreover, the geometry shows a critical point where curved surfaces are tangent to plane surfaces (see img2). I can fix the problem with a more simplified 'chamfered' geometry, but I'd like to know a possible solution for a similar case. I already played a little with maxNonOrtho, maxBoundarySkewness, maxInternalSkewness and maxConcave parameters. Maybe could a different resolveFeatureAngle (I used 30) help? This is the link to my updated case (and geometry). UPDATE: maybe it's just a problem of maxGlobalCells? I'm going to check now. |
|
November 18, 2014, 09:41 |
|
#6 | |
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 |
Quote:
Your number of cells grows to a number larger than the a maxGlobalCell count so you may want to raise that a bit. Because those edges are collapsing, I would put a refinement region around that feature or refine according to an emesh file. The most common reason for snapping and underresolved regions is the base mesh is not small enough. Raise your maxGlobalCells (along with max local Cells too), lower your base mesh size, and try again.Furthermore you may want to try adding an emesh |
||
November 19, 2014, 13:26 |
|
#7 | |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
Hi everybody, just some feedbacks and questions - thank you, Daniel!
I made a lot of tests to improve the refinement and snapping quality of my preliminary case. I also must take account of the limits of my hardware configuration and seek a compromise about the global cells number. As i posted before, I create a (very little) chamfer between the surfaces with collapsing edges. I was able to obtain a good resolution in the critical area and other zones, but 15 M cells were too much (and almost 4 hours for meshing). So I create a larger chamfer (that doesn't affect the simulation) and bring down the number of cells (see img1). A background mesh spacing of 0.2 m is the minimum to resolve the internal structures (see img2) - the block is 30 m x 25 m x 30 m. About Quote:
Key values of my snappyHexMeshDict are: - maxLocalCells 1 000 000 - maxGlobalCells 5 000 000 - nCellsBetweenLevels 1 - refinementSurfaces level (1 2) for inlet and outlet openings and (2 3) for the domain walls - resolve feature angle 30 - refinementRegions levels (1E15 2) - more searchableBoxes close to inlet and outlet openings - explicitFeatureSnap true (includedAngle 150) - features refinement level 3 - maxNonOrtho 80 / maxBoundarySkewness 20 / maxInternalSkewness 5 / maxConcave 80 The checkMesh tool complains only about Code:
Max skewness = 5.061746, 1 highly skew faces detected which may impair the quality of the results 1. I define all boundaries in the snappyHexMesh dictionary and I set Code:
patchInfo { type patch; } Code:
patchInfo { type wall; } } 2. What does it mean planarAngle 30? I found this setting in the original dictionary I edited. 3. I set explicitFeatureSnap true and implicitFeatureSnap false because I used the explicit feature edge handling method. Is possible to activate both and improving the snapping? Does a method exclude the other one? 4. I set Code:
features ( { file "domain.eMesh"; level 3; } ); 5. What does it mean Code:
writeFlags ( layerFields // write volScalarField for layer coverage ); PS maybe this thread requires now a suited title, could a moderator change that? |
||
November 19, 2014, 14:06 |
|
#8 | |
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 |
Quote:
Code:
features ( { file "myFile.eMesh"; levels ( (0.0 3) (0.1 2) (0.7 1) ); } ) |
||
November 20, 2014, 08:06 |
|
#9 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
Thanks again, Daniel, now I got it. Anyway I didn't know that it's possibile to set a different feature refinement level for each carthesian direction. I hope that you or someone else can answer to the other questions in my previous post, I can't find anything in the forum.
Have a good day. |
|
November 20, 2014, 10:06 |
|
#10 | |
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 |
Quote:
Code:
features ( { file "myFile.eMesh"; levels ( (<distance1> <desiredlevel>) (<distance2> <desiredlevel2>) (<distance3> <desiredlevel3>) ); } ) |
||
November 20, 2014, 10:14 |
|
#11 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
Sorry, I'm an idiot. Too much enthusiasm
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Cylindrical blockmesh to Improve snappyHexMesh Results | nicholas.jones | OpenFOAM Meshing & Mesh Conversion | 3 | May 16, 2019 10:52 |
[snappyHexMesh] Problem and doubts with blockMesh, snappyHexMesh and multiple geometry | luca1992 | OpenFOAM Meshing & Mesh Conversion | 0 | August 23, 2017 12:40 |
snappyhexmesh remove blockmesh geometry | philipp1 | OpenFOAM Running, Solving & CFD | 2 | December 12, 2014 11:58 |
[snappyHexMesh] Internal geometry invisible and merely reflects on blockMesh | sgl | OpenFOAM Meshing & Mesh Conversion | 15 | July 5, 2012 21:25 |
[snappyHexMesh] Experimentally obtained STL file for internal Flow SnappyHexMesh | Irish09 | OpenFOAM Meshing & Mesh Conversion | 9 | April 7, 2012 09:50 |