|
[Sponsors] |
[snappyHexMesh] Problem creating patches using snappyheymesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 5, 2014, 07:19 |
Problem creating patches using snappyheymesh
|
#1 |
New Member
Join Date: Mar 2014
Posts: 7
Rep Power: 12 |
Hi everyone,
i got a problem defining patches using SHM. I have a tube and a rotor in the tube. Both as STL. I end up having a "tube" and a "rotor" patch. What i need now is a separated inlet and an outlet patch (marked red in the image). And further i have to split the part of the mesh containing the rotor to let it rotate with cyclicAMI (marked yellow). Can anybody tell me how to realize this case? If you need any further info, just let me know. Thanks! Mario |
|
November 5, 2014, 09:21 |
|
#2 |
New Member
Join Date: Mar 2014
Posts: 7
Rep Power: 12 |
i add my snappyHexMeshDict:
Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Which of the steps to run; true/false to switch on/off castellatedMesh true; // make basic mesh? snap true; // decide to snap back to surface? addLayers false; // decide to add viscous layers? geometry //Load in STL files here and define patch names; refinement areas possible { rotor.stl { type triSurfaceMesh; //The standard type “triSurfaceMesh” reads a copy of each surface on to each processor when running in parallel. name rotor; //defines the patch name for further use in the file } ader.stl { type triSurfaceMesh; name ader; } stator_hohl.stl { type triSurfaceMesh; name stator_hohl; } } castellatedMeshControls //Prescribe feature, surface and volume mesh refinements { 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 "rotor.eMesh"; level 1;} {file "stator_hohl.eMesh"; level 1;} {file "ader.eMesh"; level 1;} ); //Surface based refinement refinementSurfaces //Surface-wise min and max refinement level { rotor {level (2 2);} stator_hohl {level (2 2);} ader {level (0 0);} } resolveFeatureAngle 80; //Resolve sharp angles; Default 30 refinementRegions //In descending levels of fine-ness { ader { mode distance; //mode distance means 0.0006 meters from surface it will refine to level 4; others possible: "inside", "outside" levels ((0.001 1)); } } locationInMesh (-0.0028 -0.0050 0.0035); //to decide which side of mesh to keep; very very important; pick a point in paraView inside the area you want to be meshed; vor rotor: (-0.0028 -0.0050 0.0035); innerhalb stator: (0.01 0.01 -0.007) allowFreeStandingZoneFaces true; //Whether to allow zone faces that share the same owner and neighbour cell zone. If kept these can cause quality issues when the zone faces are snapped to the surface } snapControls //Settings for the snapping; Control mesh surface snapping { nSmoothPatch 3; //Number of pre smoothing iterations of patch points before projection to the surface is performed tolerance 4.0; //Scaling of the maximum edge length for attraction to the surface nSolveIter 30; //Number of interior smoothing iterations applied to snapped displacement field nRelaxIter 5; //Controls number of scaling back iterations for error reduction stage nFeatureSnapIter 15; //default is 10; Number of feature snapping iterations to perform. // 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; //default is false - detects features between multiple surfaces } addLayersControls //Control boundary layer mesh growth. Add the PATCH names from inside the STL file so STLpatchName_insideSTLName { layers { rotor {nSurfaceLayers 1;} //Specification of the number of layers to be grown on each patch. } expansionRatio 1.3; //expansionRatio is the ratio of heights from one layer to the next consecutive layer in the direction away from the surface finalLayerThickness 0.00016; //finalLayerThickness is the ratio of the final layer height relative to the adjacent surface mesh size minThickness 0.00008; //Specification of a minimum layer thickness below which height layers will automatically be collapsed. relativeSizes false; //The final layer thickness and minimum thickness can be defined as either being relative (true) to the background spacing ΔS or defined as an absolute (false) length nGrow 0; //was 1 // Advanced settings featureAngle 80; //When not to extrude surface. 0 is flat, 90 is right angle. nRelaxIter 5; //Max# of snapping relaxation iter. Should stop before upon reaching a correct mesh. nSmoothSurfaceNormals 1; //Number of smoothing iterations of surface normals; default=1 nSmoothNormals 3; //Number of smoothing iterations of interior mesh movement direction; default=3 nSmoothThickness 10; //Smooth layer thickness over surface patches; default=10 maxThicknessToMedialRatio 0.3; //Reduce layer growth where ratio thickness to medial distance is large; default=0.3 minMedianAxisAngle 130; //Angle used to pick up medial axis points maxFaceThicknessRatio 0.5; //Stop layer growth on highly warped cells nBufferCellsNoExtrude 0; //Create buffer region for new layer terminations nLayerIter 50; //Overall max number of layer addition iterations } meshQualityControls //Generic mesh quality settings. At any undoable phase these determine where to undo. { maxNonOrtho 65; //default=65 maxBoundarySkewness 20; //default=20 maxInternalSkewness 4; //default=4 maxConcave 80; //default=80 minFlatness 0.5; minVol 1e-13; //default=1e-13 minTetQuality 1e-9; //This metric needs to be set to a small positive value to guarantee an inside cell check works correctly for tracking routines e.g. streamlines minArea -1e-13; //default=1e-30 minTwist 0.02; //default=0.05 minDeterminant 0.001; //default=0.001 minFaceWeight 0.02; //default=0.05 minVolRatio 0.01; //default=0.01 minTriangleTwist -1; //default=-1 // Advanced nSmoothScale 4; //default=4 errorReduction 0.75; //default=0.75 } // Advanced debug 0; //put to "1" if all meshes should be written, not only the final one mergeTolerance 1E-6; // Merge tolerance. Is fraction of overall bounding box of initial mesh. Note: the write tolerance needs to be higher than this. // ************************************************************************* // |
|
November 7, 2014, 12:19 |
|
#3 |
New Member
Join Date: Mar 2014
Posts: 7
Rep Power: 12 |
hi everyone,
okay now i figured how to get a inlet and outlet using "autoPatch". But now i am stuck trying to get faces inside the tube for the rotor part. I suppose it works somehow using "createPatch" ? But i am really not sure if this is the right way. Do i even need a boundary there for letting the inner part rotate. Or do i have to split the mesh? Some input would be nice, the tutorials aren't that clear to me :/ thanks! |
|
November 10, 2014, 05:48 |
|
#4 |
New Member
Join Date: Mar 2014
Posts: 7
Rep Power: 12 |
nobody at least a little hint?
|
|
Tags |
boundary condition, cyclic boundaries, patches, snappy hex mesh |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[foam-extend.org] Foam-extend-3.1 on RHEL: mesh problem | lxwd | OpenFOAM Installation | 4 | March 25, 2017 17:10 |
Creating the 3D Template Problem | Vaticannose | STAR-CD | 0 | March 7, 2017 06:21 |
[mesh manipulation] mirrorMesh and undoing the joining of patches | chegdan | OpenFOAM Meshing & Mesh Conversion | 3 | October 21, 2015 09:09 |
Problem with cyclic patches | sven | OpenFOAM Running, Solving & CFD | 0 | December 5, 2011 15:27 |
Courant number, patches, etc | oort | OpenFOAM | 1 | July 24, 2009 19:05 |