SnappyHexMesh - no layer added
Hi all,
I am trying to do a VAWT wind turbine simulation using GGI and turbDyMFoam. All is well except my y+ values. The domain is in 2D (using "empty" patches in the y-direction) and split into two zones (rotor and stator). I have tried to add a layer mesh at the airfoil surfaces ("wng"), but despite SHM writing writing a new mesh to a folder, the mesh remains the same. I have tried to tweak the parameters, but nothing seems to help. I have gone through the different fora, but nothing has helped me. I hope someone can offer an insight - Thank you in advance! My snappyHexMeshDict (essentially a copy of the motorbike case): Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
/*---------------------------------------------------------------------------*\ Thanks, /J |
Did you ever figure this out? I am doing the same and I just can't get the layers to grow. I too am using the motorbike tutorial file with the numbers essentially changed. I can get quite a nice surface/volume mesh, but unfortunately no layers :-(
|
Hi Robert
Have you figured out how to create the BL? I have just succesfully managed my model. Maybe you could try see this thread: http://www.cfd-online.com/Forums/ope...tml#post310953 Also, if you like, I could have a see in your sHMD file if you post it here. Regards, Ayu |
Thanks for your reply, I actually did figure it out. The problem was first naming issues, and then that SHM doesn't imprint onto boundaries, like the symmetry plane for example, so you can only see them by doing a volume mesh slice. Once I did that I saw that they had been grown!
|
1 Attachment(s)
I am trying to creat a surface layer in a simple cylinder combined of 2 radius (cone+ cylinder).This can be a reason or not, I don't know. But It's not working. If anybody can give any solution .....................
N.B- picture in problem region %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Which of the steps to run castellatedMesh true; // make basic mesh ? snap true; // decide to snap back to surface ? addLayers true;//false; // decide to add viscous layers ? geometry // Load in STL files here { inlet_1.stl {type triSurfaceMesh; name inlet_1;} outlet.stl {type triSurfaceMesh; name outlet;} inlet_2.stl {type triSurfaceMesh; name inlet_2;} inlet_3.stl {type triSurfaceMesh; name inlet_3;} wall.stl {type triSurfaceMesh; name wall;} //cylinder.stl {type triSurfaceMesh; name volume;} refineCylinder {type searchableCylinder; point1 (0 0 0); point2 (0 0 2); radius 0.13;} //refinementBox {type searchableBox; min (-0.5 -0.5 -0.5); max ( 0.5 0.5 0.5);} }; castellatedMeshControls { maxLocalCells 1000000; //max cells per CPU core maxGlobalCells 2000000; //max cells to use before mesh deletion step minRefinementCells 10; //was 0 - zero means no bad cells are allowed during refinement stages maxLoadUnbalance 0.10; nCellsBetweenLevels 1; // expansion factor between each high & low refinement zone // Explicit feature edge refinement // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ features // taken from STL from each .eMesh file created by "SurfaceFeatureExtract" command ( {file "inlet_1.eMesh"; level 2;} {file "outlet.eMesh"; level 2;} {file "wall.eMesh"; level 3;} {file "inlet_2.eMesh"; level 2;} {file "inlet_3.eMesh"; level 2;} ); // Surface based refinement // ~~~~~~~~~~~~~~~~~~~~~~~~ refinementSurfaces // Surface-wise min and max refinement level { inlet_1 {level (2 2);} outlet {level (2 2);} wall {level (5 5);} inlet_2 {level (2 2);} // was 4 4 inlet_3 {level (2 2);} // was 4 4 } resolveFeatureAngle 80; // Resolve sharp angles // Default 30 refinementRegions // In descending levels of fine-ness {refineCylinder {mode distance; levels ((1E15 2));}} // (0.002 3) (0.01 2));}} // was ((0.001 4) (0.003 3) (0.01 2)) locationInMesh (0.01 0.01 0.01); //to decide which side of mesh to keep ** allowFreeStandingZoneFaces true; } // Settings for the snapping. snapControls { nSmoothPatch 3; tolerance 4.0; nSolveIter 30; nRelaxIter 5; nFeatureSnapIter 15; // default is 10 // New settings from openfoam 2.2 onwards for SHMesh implicitFeatureSnap false; // default is false - detects without doing surfaceFeatureExtract explicitFeatureSnap true; // default is true multiRegionFeatureSnap false; // deafault is false - detects features between multiple surfaces } // Settings for the layer addition. addLayersControls //add the PATCH names from inside the STL file so STLpatchName_insideSTLName { relativeSizes false; // was true layers { wall {nSurfaceLayers 3;} // was 3 //visc_refine_1 // {nSurfaceLayers 3;} // was 3 //visc_refine_2 // {nSurfaceLayers 3;} // was 3 } expansionRatio 1.3; finalLayerThickness 0.00016; //was 0.00016 minThickness 0.00008; //was 0.00008 nGrow 0; // was 1 // Advanced settings featureAngle 80; // was 70 //- When not to extrude surface. 0 is flat, 90 is right angle. nRelaxIter 3; //- Max# of snapping relaxation iter. Should stop before upon reaching a correct mesh. nSmoothSurfaceNormals 1; // Number of smoothing iterations of surface normals nSmoothNormals 3; // Number of smoothing iterations of interior mesh movement direction nSmoothThickness 10; // Smooth layer thickness over surface patches maxFaceThicknessRatio 0.5; // Stop layer growth on highly warped cells maxThicknessToMedialRatio 0.3; // Reduce layer growth where ratio thickness to medial distance is large minMedianAxisAngle 130; // Angle used to pick up medial axis points nBufferCellsNoExtrude 0; // Create buffer region for new layer terminations nLayerIter 50; // Overall max number of layer addition iterations } // Generic mesh quality settings. At any undoable phase these determine // where to undo. meshQualityControls { maxNonOrtho 65; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; minFlatness 0.5; minVol 1e-13; minTetQuality 1e-9; minArea -1; minTwist 0.02; minDeterminant 0.001; minFaceWeight 0.02; minVolRatio 0.01; minTriangleTwist -1; // Advanced nSmoothScale 4; errorReduction 0.75; } // Advanced debug 0; // Merge tolerance. Is fraction of overall bounding box of initial mesh. // Note: the write tolerance needs to be higher than this. mergeTolerance 1E-6; // ************************************************** *********************** // |
SA7038 layers that worked for me
surfaceFeatureExtractDict:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object surfaceFeatureExtractDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // SA7038new.stl { // How to obtain raw features (extractFromFile || extractFromSurface) extractionMethod extractFromSurface; extractFromSurfaceCoeffs { // Mark edges whose adjacent surface normals are at an angle less // than includedAngle as features // - 0 : selects no edges // - 180: selects all edges includedAngle 160; } subsetFeatures { // Keep nonManifold edges (edges with >2 connected faces) nonManifoldEdges yes; // Keep open edges (edges with 1 connected face) openEdges yes; } // Write options // Write features to obj format for postprocessing writeObj yes; } // ************************************************** *********************** // snappyHexMeshDict (chord is 0.6 meters, leading edge is located at 0, 0, 0): /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // castellatedMesh on; snap on; addLayers on; geometry { wing { type triSurfaceMesh; file "SA7038new.stl"; } pod { type searchableBox; min (-0.1 -0.1 0.1); max (1.0 0.1 0.2); } pod2 { type searchableBox; min (-0.1 -0.350 0.1); max (3.5 0.350 0.2); } }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // castellatedMeshControls { maxLocalCells 9000000; maxGlobalCells 8000000; minRefinementCells 0; maxLoadUnbalance 0.1; resolveFeatureAngle 25; nCellsBetweenLevels 5; allowFreeStandingZoneFaces true; features ( { file "SA7038new.eMesh"; level 4; } ); refinementSurfaces { wing { level (4 5); } } refinementRegions { pod { mode inside; levels ((2 3)); } } refinementRegions { pod2 { mode inside; levels ((1 2)); } } locationInMesh (-0.5 0.1 0.150); } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // snapControls { nSmoothPatch 6; tolerance 2.0; nSolveIter 80; nRelaxIter 10; nFeatureSnapIter 10; implicitFeatureSnap false; explicitFeatureSnap true; multiRegionFeatureSnap false; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // addLayersControls { layers { wing { nSurfaceLayers 6; } } relativeSizes true; expansionRatio 1.2; finalLayerThickness 0.25; //firstLayerThickness 0.1; minThickness 0.001; nGrow 0; featureAngle 120; slipFeatureAngle 80; nLayerIter 65; nRelaxdIter 35; nRelaxIter 10; nSmoothSurfaceNormals 1; nSmoothNormals 3; nSmoothThickness 15; maxFaceThicknessRatio 0.55; maxThicknessToMedialRatio 0.35; minMedialAxisAngle 90; minMedianAxisAngle 120; nMedialAxisIter 10; nBufferCellsNoExtrude 0; additionalReporting true; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // meshQualityControls { maxNonOrtho 70; maxBoundarySkewness 10; maxInternalSkewness 5; maxConcave 80; minFlatness 0.5; minVol 1e-13; minTetQuality -1e30; minArea -1; minTwist 0.04; minDeterminant 0.001; minFaceWeight 0.05; minVolRatio 0.01; minTriangleTwist -1; nSmoothScale 4; errorReduction 0.75; } debugFlags ( //layerInfo // write information about layers ); /*writeFlags ( // scalarLevels layerSets layerFields ); */ mergeTolerance 1e-6; // ************************************************** *********************** // |
All times are GMT -4. The time now is 03:24. |