|
[Sponsors] |
[snappyHexMesh] Multi-region mesh: improve mesh on interface fluid-solid |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 2, 2023, 12:43 |
Multi-region mesh: improve mesh on interface fluid-solid
|
#1 |
New Member
RT
Join Date: Mar 2020
Location: Germany
Posts: 16
Rep Power: 6 |
Dear all,
I am solving a heat transfer multi-region problem: a hot air flow in a pipe with thick walls. The geometry is created in FreeCAD, imported to STEP, exported to SALOME for triangulation, imported to STL. The resulted STL file is a closed surface and has a nice triangulation (see attached figure). The resulted mesh doesn't look good at the interface between air and pipe (see attached figures). I tried to adjust the parameters, following various guidelines (including those found on this forum), but couldn't improve the mesh at the interface. I would very appreciate if you could give me a hint on how I can improve my mesh. Which parameters should be variated? Should I try layers? Here is a link to the case if needed: case files Thanks! Last edited by Ryôzanpaku Tiger; November 2, 2023 at 14:30. Reason: wrong title |
|
November 3, 2023, 04:29 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29 |
Hello,
When meshing multiregion cases, non-orthogonality can be a problem when snapping on curved surface like your cylinder. You might try to increase the maxNonOrtho parameter in meshQualityControls and see if it improves snapping on the cylinder surface. Yann |
|
November 4, 2023, 11:09 |
|
#3 | |
New Member
RT
Join Date: Mar 2020
Location: Germany
Posts: 16
Rep Power: 6 |
Quote:
thank you very much! I increased maxNonOrtho and my mesh has improved! I will check mesh quality parameters more thoroughly. Thank you! |
||
November 4, 2023, 19:56 |
|
#4 | |
New Member
RT
Join Date: Mar 2020
Location: Germany
Posts: 16
Rep Power: 6 |
Quote:
I improved the mesh significantly, thank you very much! The interface is now very smooth, but there are few spots, where the outer edges are not resolved properly. These are the tiny bits which are “cut out” of the mesh. I read few topics here on the forum about 90 degrees edges and tried few things, but I couldn’t get read of these tiny bits. Could you please give a hint, what could it be? Here is snappyHexMeshDict: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2306 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // castellatedMesh true; snap true; addLayers false; geometry { pipe.stl { type triSurfaceMesh; name pipe; } inlet.stl { type triSurfaceMesh; name inlet; } outlet.stl { type triSurfaceMesh; name outlet; } } castellatedMeshControls { maxGlobalCells 10000000; maxLocalCells 5000000; minRefinementCells 10; nCellsBetweenLevels 1; features ( { file "pipe.extendedFeatureEdgeMesh"; level 3; } ); refinementSurfaces { pipe { level (2 3); } inlet { level (2 3); patchInfo { type patch; } } outlet { level (2 3); patchInfo { type patch; } } } resolveFeatureAngle 30; refinementRegions { } locationsInMesh ( ((0.0081 0.0001 0.0049) fluid ) ((0.0139 0.0001 0.0001) pipe ) ); allowFreeStandingZoneFaces false; } snapControls { nSmoothPatch 3; tolerance 1.0; nSolveIter 100; nRelaxIter 5; nFeatureSnapIter 5; implicitFeatureSnap false; explicitFeatureSnap true; multiRegionFeatureSnap false; } addLayersControls { relativeSizes false; layers { pipeInnerWall { nSurfaceLayers 8; } } expansionRatio 1.2; finalLayerThickness 0.001; minThickness 0.0005; nGrow 0; featureAngle 80; nRelaxIter 5; nSmoothSurfaceNormals 1; nSmoothNormals 3; nSmoothThickness 10; maxFaceThicknessRatio 0.5; maxThicknessToMedialRatio 0.3; minMedialAxisAngle 90; nBufferCellsNoExtrude 0; nLayerIter 50; nRelaxedIter 20; } meshQualityControls { maxNonOrtho 180; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; minFlatness 0.5; minVol 1e-13; minTetQuality 1e-30; minArea -1; minTwist 0.02; minDeterminant 0.001; minFaceWeight 0.02; minVolRatio 0.01; minTriangleTwist -1; nSmoothScale 4; errorReduction 0.75; } mergeTolerance 1e-6; // ************************************************************************* // Thank you very much for your help! |
||
November 6, 2023, 07:02 |
|
#5 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29 |
Hello,
Having a closed STL file might help with snapping. Nothing certain about that, but it might be worth trying. After concatenating your STL file, there are 2 utilities you can use to clean up the concatenated file : surfacePointMerge and surfaceHookUp. Have a look at this post: Surface Check and Repair Utilities - Need Explanation Another thing you can try is to activate this switch and see how it affects your mesh: Code:
multiRegionFeatureSnap false; Yann |
|
November 6, 2023, 08:00 |
|
#6 | |
New Member
RT
Join Date: Mar 2020
Location: Germany
Posts: 16
Rep Power: 6 |
Quote:
Thank you for the hints! I will check these utilities and try to repair the concatenated file. Before I read your answer, I have solved the problem with the edge resolution by using Code:
nFeatureSnapIter 10; (Here is a link to the updated case: case files) Thank you very much again for the help! |
||
November 10, 2023, 11:16 |
|
#7 |
New Member
RT
Join Date: Mar 2020
Location: Germany
Posts: 16
Rep Power: 6 |
Hello Yann,
May I bother you with another question? Now, when the mesh in the pipe is fine, I would like to add a thin plate with small holes inside the pipe. Here is snappyHexMeshDict: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2306 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Which of the steps to run castellatedMesh true; snap true; addLayers false; geometry { pipe.stl { type triSurfaceMesh; name pipe;} inlet.stl { type triSurfaceMesh; name inlet; } outlet.stl { type triSurfaceMesh; name outlet; } plane.stl { type triSurfaceMesh; name plane; regions { planeBackFace {name planeBackFace;} planeBottomFace {name planeBottomFace;} planeFrontFace {name planeFrontFace;} planeHole1 {name planeHole1;} planeHole2 {name planeHole2;} planeHole3 {name planeHole3;} planeHole4 {name planeHole4;} planeHole5 {name planeHole5;} planeHole6 {name planeHole6;} planeLeftFace {name planeLeftFace;} planeRightFace {name planeRightFace;} planeTopFace {name planeTopFace;} } } } // Settings for the castellatedMesh generation. castellatedMeshControls { maxGlobalCells 10000000; maxLocalCells 5000000; minRefinementCells 10; nCellsBetweenLevels 1; features ( { file "pipe.extendedFeatureEdgeMesh"; level 2; } { file "plane.extendedFeatureEdgeMesh"; level 2; } ); refinementSurfaces { pipe { level (2 2); } inlet { level (2 2); patchInfo { type patch; } } outlet { level (2 2); patchInfo { type patch; } } plane { level (2 2); patchInfo { type wall; } regions { planeHole1 { level (4 5); } planeHole2 { level (4 5); } planeHole3 { level (4 5); } planeHole4 { level (4 5); } planeHole5 { level (4 5); } planeHole6 { level (4 5); } } } } resolveFeatureAngle 30; refinementRegions { } locationsInMesh ( ((0.0081 0.0001 0.0049) fluid ) ((0.0139 0.0001 0.0001) pipe ) ((0.0001 0.0001 0.0001) plane) ); allowFreeStandingZoneFaces false; } // Settings for the snapping. snapControls { nSmoothPatch 3; tolerance 1.0; nSolveIter 100; nRelaxIter 5; nFeatureSnapIter 10; implicitFeatureSnap false; explicitFeatureSnap true; multiRegionFeatureSnap false; } addLayersControls { relativeSizes false; layers { pipeInnerWall { nSurfaceLayers 8; } } expansionRatio 1.2; finalLayerThickness 0.001; minThickness 0.0005; nGrow 0; featureAngle 80; nRelaxIter 5; nSmoothSurfaceNormals 1; nSmoothNormals 3; nSmoothThickness 10; maxFaceThicknessRatio 0.5; maxThicknessToMedialRatio 0.3; minMedialAxisAngle 90; nBufferCellsNoExtrude 0; nLayerIter 50; nRelaxedIter 20; } meshQualityControls { maxNonOrtho 180; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; minFlatness 0.5; minVol 1e-13; minTetQuality 1e-30; minArea -1; minTwist 0.02; minDeterminant 0.001; minFaceWeight 0.02; minVolRatio 0.01; minTriangleTwist -1; nSmoothScale 4; errorReduction 0.75; } mergeTolerance 1e-6; // ************************************************************************* // Code:
planeHole1 { level (5 6); } I tried changing snapping parameters, but it didn't give any improvement. I tried using refinementRegions (see figure 2), but it only made the mesh worse, and the edges were not resolved correctly. Could you please give a hint: what else could be adjusted here? And another problem with the current mesh: the mesh quality complains about Code:
Checking faces in error : faces with face pyramid volume < 1e-13 : 128128 Code:
minVol I would very appreciate any hints! Thank you! |
|
November 10, 2023, 11:41 |
|
#8 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29 |
Hello,
Hard to say, how does the holes look in your STL file ? |
|
November 10, 2023, 12:46 |
|
#9 |
New Member
RT
Join Date: Mar 2020
Location: Germany
Posts: 16
Rep Power: 6 |
Please see attached the part of the STL model with the hole. Thanks!
|
|
November 11, 2023, 08:50 |
|
#10 |
New Member
RT
Join Date: Mar 2020
Location: Germany
Posts: 16
Rep Power: 6 |
UPDATE: I refined the STL model in SALOME reducing the local length form 0.0003 to 0.0001. The STL model has now a very big size, but the resulted surface is smooth.
However, the mesh quality still complains about the faces: Code:
Checking faces in error : faces with face pyramid volume < 1e-13 : 268112 I would very appreciate any hints! Thank you! |
|
Tags |
multi-region mesh, snappyhexmesh |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can I use fvOptions to couple a solid region and a fluid region? | titanchao | OpenFOAM Running, Solving & CFD | 4 | January 14, 2022 08:55 |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 08:38 |
problem with Min/max rho | tH3f0rC3 | OpenFOAM | 8 | July 31, 2019 10:48 |
Question about adaptive timestepping | Guille1811 | CFX | 25 | November 12, 2017 18:38 |
Unstabil Simulation with chtMultiRegionFoam | mbay101 | OpenFOAM Running, Solving & CFD | 13 | December 28, 2013 14:12 |