|
[Sponsors] |
[snappyHexMesh] Multiregion mesh - issues at edges |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 29, 2020, 07:56 |
Multiregion mesh - issues at edges
|
#1 |
New Member
Thangasivam
Join Date: Sep 2012
Location: India
Posts: 5
Rep Power: 14 |
Hello all,
I am trying to create fluid and solid meshes (including interface) using snappyHexMesh v1912 for a CHT simulation. I want to study the Heat Transfer between fluid and solid pipe. I have issues at the highlighted locations in the attached images. Please give your suggestions to improve. I could not find where I am committing a mistake. Thanks a lot in advance. Cheers, Sivam I codes and values I am using. BlockMeshDict Code:
scale 1; // convertToMeters does nothing in this case, 0.1 would shrink it by 10x vertices // (x y z) ( ( -0.0150 -0.0130 -0.0130 ) // in metres // vertex : 0 ( 0.0550 -0.0130 -0.0130 ) // in metres // vertex : 1 ( 0.0550 0.0130 -0.0130 ) // in metres // vertex : 2 ( -0.0150 0.0130 -0.0130 ) // in metres // vertex : 3 ( -0.0150 -0.0130 0.0130 ) // in metres // vertex : 4 ( 0.0550 -0.0130 0.0130 ) // in metres // vertex : 5 ( 0.0550 0.0130 0.0130 ) // in metres // vertex : 6 ( -0.0150 0.0130 0.0130 ) // in metres // vertex : 7 ); blocks ( // Divisions hex (0 1 2 3 4 5 6 7) baseMesh (46 17 17) simpleGrading (1 1 1) ); edges ( ); patches // Boundaries or faces ( ); mergePatchPairs ( ); Code:
actions ( // outside Cylinder Cell set { name solidCellSet; type cellSet; action new; source surfaceToCell; sourceInfo { file "constant/triSurface/solid.stl"; // use closed surface inside/outside // test (ignores includeCut, outsidePoints) useSurfaceOrientation false; outsidePoints ((0.01 0 0)); // definition of outside includeCut true; // cells cut by surface includeInside false; // cells not on outside of surf includeOutside false; // cells on outside of surf nearDistance -1; // cells with centre near surf (set to -1 if not used) curvature 0.9; // cells within nearDistance and near surf curvature (set to -100 if not used) } } // outside Cylinder Zone set { name solidZone; type cellZoneSet; action new; source setToCellZone; sourceInfo { set solidCellSet; } } // inside Cylinder Cell set { name fluidCellSet; type cellSet; action new; source surfaceToCell; sourceInfo { file "./constant/triSurface/fluid.stl"; // use closed surface inside/outside // test (ignores includeCut, outsidePoints) useSurfaceOrientation false; outsidePoints ((0.01 0 0)); // definition of outside includeCut true; // cells cut by surface includeInside false; // cells not on outside of surf includeOutside false; // cells on outside of surf nearDistance -1; // cells with centre near surf (set to -1 if not used) curvature 0.9; // cells within nearDistance and near surf curvature (set to -100 if not used) } } // inside Cylinder Zone set { name fluidZone; type cellZoneSet; action new; source setToCellZone; sourceInfo { set fluidCellSet; } } // combine fluidCell + solidCell set { name fluidSolidSet; type cellSet; action new; source cellToCell; sourceInfo { set solidCellSet; set fluidCellSet; } } // invert to get the remaining Set { name fluidSolidSet; type cellSet; action invert; } // remaining set to remaining zone { name baseZone; type cellZoneSet; action new; source setToCellZone; sourceInfo { set fluidSolidSet; } } // remove the remaining zone { name baseZone; type cellZoneSet; action remove; } ); Code:
inlet.stl { extractionMethod extractFromSurface; extractFromSurfaceCoeffs {includedAngle 150;} writeObj no; } fluid.stl { extractionMethod extractFromSurface; extractFromSurfaceCoeffs {includedAngle 150;} writeObj no; } fluidOuter.stl { extractionMethod extractFromSurface; extractFromSurfaceCoeffs {includedAngle 150;} writeObj no; } outlet.stl { extractionMethod extractFromSurface; extractFromSurfaceCoeffs {includedAngle 150;} writeObj no; } solid.stl { extractionMethod extractFromSurface; extractFromSurfaceCoeffs {includedAngle 150;} writeObj no; } solidInner.stl { extractionMethod extractFromSurface; extractFromSurfaceCoeffs {includedAngle 150;} writeObj no; } solidOuter.stl { extractionMethod extractFromSurface; extractFromSurfaceCoeffs {includedAngle 150;} writeObj no; } inletPipe.stl { extractionMethod extractFromSurface; extractFromSurfaceCoeffs {includedAngle 150;} writeObj no; } writeFeatureEdgeMesh yes; Code:
castellatedMesh true; // make basic mesh ? snap true; // decide to snap back to surface ? addLayers true; // decide to add viscous layers ? // singleRegionName false; // Optional geometry { fluid.stl {type triSurfaceMesh; name fluid ; } // fluid.stl {type triSurfaceMesh; // regions {fluid {name fluid;}}} solid.stl {type triSurfaceMesh; name solid; } // solid.stl {type triSurfaceMesh; // regions {solid {name solid;}}} // inlet.stl {type triSurfaceMesh; // regions {inlet {name inlet;}}} // outlet.stl {type triSurfaceMesh; // regions {outlet {name outlet;}}} // inletPipe.stl {type triSurfaceMesh; // regions {inletPipe {name inletPipe;}}} inlet.stl {type triSurfaceMesh; name inlet ; } outlet.stl {type triSurfaceMesh; name outlet ; } inletPipe.stl {type triSurfaceMesh; name inletPipe ; } fluidOuter.stl {type triSurfaceMesh; name fluidOuter ; } solidInner.stl {type triSurfaceMesh; name solidInner ; } }; castellatedMeshControls { maxLocalCells 10000000; maxGlobalCells 20000000; minRefinementCells 10;//10; maxLoadUnbalance 0.10;//0.10; nCellsBetweenLevels 4;//4; features // taken from STL from each .eMesh file created by "SurfaceFeatureExtract" command ( {file "fluid.eMesh"; level 2;} {file "solid.eMesh"; level 2;} {file "outlet.eMesh"; level 2;} {file "inlet.eMesh"; level 2;} {file "inletPipe.eMesh"; level 2;} {file "fluidOuter.eMesh"; level 2;} {file "solidInner.eMesh"; level 2;} ); refinementSurfaces // Surface-wise min and max refinement level { fluid{ level (2 2); // (min max ) faceZone fluid; cellZone fluid; cellZoneInside inside; } solid{ level (2 2); faceZone solid; cellZone solid; cellZoneInside inside; } inlet { level ( 1 2 ) ; patchInfo { type patch; } } outlet { level ( 1 2 ) ; patchInfo { type patch; } } inletPipe { level ( 1 2 ) ; patchInfo { type wall; } } // fluidOuter { level ( 1 2 ) ; patchInfo { type wall; } } // solidInner { level ( 1 2 ) ; patchInfo { type wall; } } } resolveFeatureAngle 10;//20;//30;//80 refinementRegions // In descending levels of fine-ness { fluid {mode inside; levels ((2 1));} solid {mode inside; levels ((2 1));} } locationInMesh (0.01 0.0 0.0); // in metres // locationsInMesh // in metres // ( // (( 0.0 0.0 0.0) inside) // (( 3e-3 6.5e-3 0.0) outside) // ); allowFreeStandingZoneFaces true; } snapControls { nFaceSplitInterval 5; nSmoothPatch 5; tolerance 1.0;//4.0; nSolveIter 60;//300;//60; nRelaxIter 5;//10;//5; nFeatureSnapIter 10;//15; // default is 10 implicitFeatureSnap false; // default is false - detects without doing surfaceFeatureExtract explicitFeatureSnap true; // default is true multiRegionFeatureSnap true; // deafault is false - detects features between multiple surfaces } addLayersControls { relativeSizes true; layers { fluid_slave { nSurfaceLayers 3; // was 5 } } expansionRatio 1.5; finalLayerThickness 5e-3; minThickness 5e-4; nGrow 0;//was 1; featureAngle 110;//85;//30; nRelaxIter 5;//3; nSmoothSurfaceNormals 4;//1; nSmoothNormals 3; nSmoothThickness 10; maxFaceThicknessRatio 0.5; maxThicknessToMedialRatio 0.2;//0.3; minMedianAxisAngle 90;//130; nBufferCellsNoExtrude 0; nLayerIter 50; detectExtrusionIsland true; } meshQualityControls { maxNonOrtho 65; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; minFlatness 0.5; minVol 1e-13; minArea -1; minTwist 0.02; minDeterminant 0.001; minFaceWeight 0.02; minVolRatio 0.01; minTetQuality 1e-30; minTriangleTwist -1; nSmoothScale 4; errorReduction 0.75; } debug 0; writeFlags ( scalarLevels layerSets layerFields // write volScalarField for layer coverage ); mergeTolerance 1E-6; |
|
June 29, 2020, 11:53 |
|
#2 |
New Member
Join Date: Jun 2020
Location: UK
Posts: 22
Rep Power: 6 |
Hi,
Just a few observations that may help:
|
|
June 30, 2020, 02:32 |
Wow.. Partial Success
|
#3 |
New Member
Thangasivam
Join Date: Sep 2012
Location: India
Posts: 5
Rep Power: 14 |
Dear Rango,
Thanks for the values. Sharp edges are generated at inlet of fluid domain. Your query : Do you need to include "featureEdge (eMesh files)" for every single "stl" file that you have? I thought that "featureEdge (eMesh files)" might improve the meshes at the edges. Some more help needed. A. I have some issues at the edges on fluid and solid surfaces at interface starting location. I have highlighted on the attached images. B. I would like to get rid of the baseMesh interfaces with the solid and fluid surfaces. I have highlighted on the attached images. Thanks again. Cheers, Sivam I am sharing the codes and images. Code:
castellatedMesh true; // make basic mesh ? snap true; // decide to snap back to surface ? addLayers false; // decide to add viscous layers ? geometry { fluid.stl {type triSurfaceMesh; name fluid; } solid.stl {type triSurfaceMesh; name solid; } inlet.stl {type triSurfaceMesh; name inlet ; } outlet.stl {type triSurfaceMesh; name outlet ; } inletPipe.stl {type triSurfaceMesh; name inletPipe ; } }; castellatedMeshControls { maxLocalCells 10000000; maxGlobalCells 20000000; minRefinementCells 10; maxLoadUnbalance 0.10; nCellsBetweenLevels 4; features // taken from STL from each .eMesh file created by "SurfaceFeatureExtract" command ( {file "fluid.eMesh"; level 2;} {file "solid.eMesh"; level 2;} {file "outlet.eMesh"; level 2;} {file "inlet.eMesh"; level 2;} {file "inletPipe.eMesh"; level 2;} ); refinementSurfaces // Surface-wise min and max refinement level { fluid{ level (0 0); // (min max ) faceZone fluid; cellZone fluid; cellZoneInside inside; } solid{ level (0 0); faceZone solid; cellZone solid; cellZoneInside inside; } inlet { level ( 2 2 ) ; patchInfo { type patch; } } outlet { level ( 2 2 ) ; patchInfo { type patch; } } // inletPipe { level ( 1 2 ) ; patchInfo { type wall; } } } resolveFeatureAngle 60; refinementRegions // In descending levels of fine-ness { fluid {mode inside; levels ((2 2));} solid {mode inside; levels ((2 2));} } locationInMesh (0.01 0.0 0.0); // in metres allowFreeStandingZoneFaces true; } snapControls { nFaceSplitInterval 5; nSmoothPatch 5; tolerance 1.0; // 4.0; nSolveIter 60; // 300; nRelaxIter 5; // 10; nFeatureSnapIter 10; // default is 10 implicitFeatureSnap false; // default is false - detects without doing surfaceFeatureExtract explicitFeatureSnap true; // default is true multiRegionFeatureSnap false; } addLayersControls { relativeSizes true; layers { fluid_slave { nSurfaceLayers 3; } } expansionRatio 1.5; finalLayerThickness 5e-3; minThickness 5e-4; nGrow 0;//was 1; featureAngle 110;//85;//30; nRelaxIter 5;//3; nSmoothSurfaceNormals 4;//1; nSmoothNormals 3; nSmoothThickness 10; maxFaceThicknessRatio 0.5; maxThicknessToMedialRatio 0.2;//0.3; minMedianAxisAngle 90;//130; nBufferCellsNoExtrude 0; nLayerIter 50; detectExtrusionIsland true; } meshQualityControls { maxNonOrtho 65; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; minFlatness 0.5; minVol 1e-13; minArea -1; minTwist 0.02; minDeterminant 0.001; minFaceWeight 0.02; minVolRatio 0.01; minTetQuality 1e-30; minTriangleTwist -1; nSmoothScale 4; errorReduction 0.75; } debug 0; writeFlags ( scalarLevels layerSets layerFields // write volScalarField for layer coverage ); mergeTolerance 1E-6; Last edited by namsivag; June 30, 2020 at 02:37. Reason: forgot to attach |
|
July 16, 2020, 06:34 |
Circular edge is not proper
|
#4 |
New Member
Thangasivam
Join Date: Sep 2012
Location: India
Posts: 5
Rep Power: 14 |
Hallo,
I have two surfaces solidHeadBottom (surf-1) and interface2fluid (surf-2). Mesh at the circular edge is not proper. Please have a look at highlighted areas on the attached images. Could you please help me to cross this issue !! Thanks a lot in advance. regards, Sivam Code:
FoamFile{ version 2.0; format ascii; class dictionary; object snappyHexMeshDict;} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // castellatedMesh true; snap true; addLayers false; geometry { solidHead.stl {type triSurfaceMesh; name head; } outerSolidHead.stl {type triSurfaceMesh; name outerSolidHead;} solidHeadBottom.stl {type triSurfaceMesh; name solidHeadBottom;} interface2fluid.stl {type triSurfaceMesh; name interface2fluid;} }; castellatedMeshControls { maxLocalCells 10000000; maxGlobalCells 20000000; minRefinementCells 100; maxLoadUnbalance 0.10; nCellsBetweenLevels 4; //4; features ( // {file "solidHead.eMesh"; level 2;} //2 {file "outerSolidHead.eMesh"; level 2;} //2 {file "solidHeadBottom.eMesh"; level 2;} //2 {file "interface2fluid.eMesh"; level 2;} //2 ); refinementSurfaces // Surface-wise min and max refinement level { head{ level (0 1); //0 0 faceZone head; cellZone head; cellZoneInside inside; boundary internal; } // outerSolidHead {level (1 2); patchInfo { type wall;}} // 1 1 solidHeadBottom {level (1 2); patchInfo { type wall;}} // 1 2 interface2fluid {level (1 2); patchInfo { type wall;}} // 1 2 } resolveFeatureAngle 60; refinementRegions // In descending levels of fine-ness { head {mode inside; levels ((1 1));} } locationInMesh (0.0 0.0 0.071); // Inside point allowFreeStandingZoneFaces false; } snapControls { nFaceSplitInterval 5; nSmoothPatch 5; nSmoothInternal $nSmoothPatch; tolerance 4.0; nSolveIter 300;//60 nRelaxIter 10; nFeatureSnapIter 10; // default is 10 implicitFeatureSnap true; // default is false - detects without doing surfaceFeatureExtract explicitFeatureSnap false; // default is true multiRegionFeatureSnap false; // default is false - detects features between multiple surfaces } addLayersControls { relativeSizes false; layers {fluid_slave {nSurfaceLayers 3;}} expansionRatio 1.2; finalLayerThickness 5e-3; minThickness 3e-3; nGrow 1;//was 0; featureAngle 110;//85;//30; nRelaxIter 5;//3; nSmoothSurfaceNormals 4;//1; nSmoothNormals 3; nSmoothThickness 10; maxFaceThicknessRatio 0.5; maxThicknessToMedialRatio 0.2;//0.3; minMedianAxisAngle 90;//130; nBufferCellsNoExtrude 0; nLayerIter 50; layerTerminationAngle -180; detectExtrusionIsland true; } meshQualityControls { maxNonOrtho 180;//65; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; minFlatness 0.5; minVol 1e-13; minArea -1; minTwist 0.02; minDeterminant 0.001; minFaceWeight 0.02; minVolRatio 0.01; minTetQuality 1e-30; minTriangleTwist -1; nSmoothScale 4; errorReduction 0.75; } debug 0; writeFlags ( scalarLevels layerSets layerFields // write volScalarField for layer coverage ); mergeTolerance 1E-6; Last edited by namsivag; July 19, 2020 at 10:12. |
|
Tags |
cht, chtmultiregion, meshing, shm |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] snappyHexMesh sticking point | natty_king | OpenFOAM Meshing & Mesh Conversion | 11 | February 20, 2024 10:12 |
[snappyHexMesh] SnappyHexMesh/splitMeshRegion : region1 in zone "-1" | GuiMagyar | OpenFOAM Meshing & Mesh Conversion | 3 | August 4, 2023 13:38 |
[snappyHexMesh] Snappy Hex Mesh - issue with smoothness of the model edges | olek.warc | OpenFOAM Meshing & Mesh Conversion | 1 | August 31, 2018 12:31 |
Convergence moving mesh | lr103476 | OpenFOAM Running, Solving & CFD | 30 | November 19, 2007 15:09 |
ICEM clustering of mesh points and multiple edges | webhaw | CFX | 4 | July 25, 2007 17:29 |