CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] Proper y+ in boundary layer on lowerWall - motorBike tutorial

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   November 11, 2014, 13:59
Default Proper y+ in boundary layer on lowerWall - motorBike tutorial
  #1
Member
 
Petr Furmanek
Join Date: Jan 2012
Location: Faenza, Italy
Posts: 66
Rep Power: 14
petr.f. is on a distinguished road
Nice Tuesday evening to all!

I'm trying to simulate external aerodynamics of a car. It's a pretty simple task, however, I'm a bit confused about snappyHexMesh. I've started with the motorBike tutorial. The problem are prism layers on the lowerWall.

If I want to model the lowerWall as a no-slip wall, I have to use the prism layers. But when the relativeSizes are set to true I'll get the same mesh that you can see on the picture. Then, when using wall functions, the y+ is OK (~ 30 - 50) on the motorBike, but totally off-limits (~ 3500) near the inlet and outlet from the computational domain.

Now If I try to set the relativeSizes to false and mesh my car case with layers satisfying y+ ~ 30 (then in my case delta y = 0.8 mm near the wall), snappyHexMesh fails with floating point exception. If I try to mesh the case with relativeSizes true, but set a different layers parameters for the car and different for lowerWall then the layers on the lowerWall are either not generated at all or they look like in the motorBike tutorial and I get bad y+ ...

I could consider the lowerWall patch as a slip wall, but that's not how it is in reality. What is your experience with this problem?

About the meshing proces I'm using - it's quite standard.
1) blockMesh -> surfaceFeatureExtract -> decompoePar -> renumberMesh (optional) -> snappyHexMesh for castellated and snap mesh.
2) checkMesh, if the snap mesh is OK (I only get skewness ~ 6 on boundaries errors, nothing serious) I proceed with the addLayer phase. I've taken the snappy configuration from the motorbike tutorial, only changed the mesh resolution around the model (my base size is 0.672 m, so the levels on the car body are 7 - 8)

I'm using these snap, addLayers and meshQuality controls (and latest OpenFOAM 2.3.x):

Code:
snapControls
{
        globalFeatureEdges      true;
        nSolveIter              30;
        nSmoothPatch            3; // default 3
        tolerance               2.0; // def. 2, 
        nRelaxIter              5; // def. 5
        nFeatureSnapIter        10; // def. 10
        implicitFeatureSnap     false;
        explicitFeatureSnap     true;
        multiRegionFeatureSnap    false;
}

addLayersControls
{
    layers
    {
        body                {nSurfaceLayers 5;}
        chassis             {nSurfaceLayers 5;}
        frontFender         {nSurfaceLayers 3;}
        frontSuspension     {nSurfaceLayers 3;}
        frontWheelContact   {nSurfaceLayers 3;}
        frontWheel          {nSurfaceLayers 5;}
        rearFender          {nSurfaceLayers 3;}
        rearSuspension      {nSurfaceLayers 3;}
        rearWheelContact    {nSurfaceLayers 3;}
        rearWheel           {nSurfaceLayers 5;}

        lowerWall
        {
            nSurfaceLayers 3;

            expansionRatio 1.5;
            firstLayerThickness 0.001;
            minThickness 0.01;
            
//             relativeSizes false;
//             expansionRatio 1.5;
//             firstLayerThickness 0.002;
//             minThickness 5e-4;
//             featureAngle 50;
        }
    }

    relativeSizes true;
    expansionRatio 1.2;
    firstLayerThickness 0.157; 
    minThickness 0.01; 

//     relativeSizes false;
//     expansionRatio 1.2;
//     firstLayerThickness 0.0008;
//     minThickness 1e-5;

    nGrow 0;
    featureAngle 150; 
    slipFeatureAngle 30;
    nRelaxIter 3; 
    nSmoothSurfaceNormals 1;
    nSmoothNormals 3;
    nSmoothThickness 10;
    maxFaceThicknessRatio 0.5;
    maxThicknessToMedialRatio 0.3;
    minMedianAxisAngle 90;
    nMedialAxisIter 10;
    nBufferCellsNoExtrude 0;
    nLayerIter 50;
}

meshQualityControls
{
    maxNonOrtho 75; //def. 65
    maxBoundarySkewness 20;
    maxInternalSkewness 4;
    maxConcave 80;
    minFlatness 0.5;
    minVol 1.0E-13;
    minTetQuality 1.0e-30;
    minArea -1.0;
    minTwist 0.02;
    minDeterminant 0.001; // def. 0.01
    minFaceWeight 0.02; // def. 0.05
    minVolRatio 1e-4; // def. 0.01
    minTriangleTwist -1.0;
    nSmoothScale 4;
    errorReduction 0.75;
}
snappyHexMesh errors - floating point exception
Code:
Layer addition iteration 0
--------------------------

Determining displacement for added points according to pointNormal ...
Detected 0 points with point normal pointing through faces.
Reset displacement at 0 points to average of surrounding points.

displacementMedialAxis : Smoothing using Medial Axis ...
displacementMedialAxis : Reducing layer thickness at 34025 nodes where thickness to medial axis distance is large
displacementMedialAxis : Removing isolated regions ...
displacementMedialAxis : Number of isolated points extrusion stopped : 214133
displacementMedialAxis : Smoothing field ...
    Iteration 0   residual 1.49626e-05
displacementMedialAxis : Moving mesh ...
displacementMedialAxis : Iteration 0
Moving mesh using displacement scaling : min:1  max:1
Checking faces in error :
    non-orthogonality > 65  degrees                        : 273
    faces with face pyramid volume < 1e-13                 : 34
    faces with face-decomposition tet quality < 1e-30      : 2439
    faces with concavity > 80  degrees                     : 41
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.05        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 88
    faces on cells with determinant < 0.01                 : 335
displacementMedialAxis : Iteration 1
Moving mesh using displacement scaling : min:0.75  max:1
[9] #0  Foam::error::printStack(Foam::Ostream&) in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libOpenFOAM.so"
[9] #1  Foam::sigFpe::sigHandler(int) in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libOpenFOAM.so"
[9] #2
[9]  at sigaction.c:0
[9] #3  Foam::face::centre(Foam::Field<Foam::Vector<double> > const&) const in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libOpenFOAM.so"
[9] #4  Foam::face::sweptVol(Foam::Field<Foam::Vector<double> > const&, Foam::Field<Foam::Vector<double> > const&) const in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libOpenFOAM.so"
[9] #5  Foam::primitiveMesh::movePoints(Foam::Field<Foam::Vector<double> > const&, Foam::Field<Foam::Vector<double> > const&) in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libOpenFOAM.so"
[9] #6  Foam::polyMesh::movePoints(Foam::Field<Foam::Vector<double> > const&) in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libOpenFOAM.so"
[9] #7  Foam::fvMesh::movePoints(Foam::Field<Foam::Vector<double> > const&) in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libfiniteVolume.so"
[9] #8  Foam::motionSmootherAlgo::scaleMesh(Foam::List<int>&, Foam::List<Foam::Pair<int> > const&, Foam::dictionary const&, Foam::dictionary const&, bool, int) in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libdynamicMesh.so"
[9] #9  Foam::medialAxisMeshMover::shrinkMesh(Foam::dictionary const&, int, Foam::List<int>&) in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libautoMesh.so"
[9] #10  Foam::medialAxisMeshMover::move(Foam::dictionary const&, int, Foam::List<int>&) in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libautoMesh.so"
[9] #11  Foam::autoLayerDriver::addLayers(Foam::layerParameters const&, Foam::dictionary const&, Foam::List<int> const&, int, Foam::decompositionMethod&, Foam::fvMeshDistribute&) in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libautoMesh.so"
[9] #12  Foam::autoLayerDriver::doLayers(Foam::dictionary const&, Foam::dictionary const&, Foam::layerParameters const&, bool, Foam::decompositionMethod&, Foam::fvMeshDistribute&) in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libautoMesh.so"
[9] #13
[9]  in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/bin/snappyHexMesh"
[9] #14  __libc_start_main in "/lib64/libc.so.6"
[9] #15
[9]  in "/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/bin/snappyHexMesh"
[ceprlx19:32502] *** Process received signal ***
[ceprlx19:32502] Signal: Floating point exception (8)
[ceprlx19:32502] Signal code:  (-6)
[ceprlx19:32502] Failing at address: 0x858800007ef6
[ceprlx19:32502] [ 0] /lib64/libc.so.6() [0x3548a32920]
[ceprlx19:32502] [ 1] /lib64/libc.so.6(gsignal+0x35) [0x3548a328a5]
[ceprlx19:32502] [ 2] /lib64/libc.so.6() [0x3548a32920]
[ceprlx19:32502] [ 3] /opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libOpenFOAM.so(_ZNK4Foam4face6centreERKNS_5FieldINS_6VectorIdEEEE+0x14f) [0x7f391720f40f]
[ceprlx19:32502] [ 4] /opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libOpenFOAM.so(_ZNK4Foam4face8sweptVolERKNS_5FieldINS_6VectorIdEEEES6_+0x3a) [0x7f391720fb0a]
[ceprlx19:32502] [ 5] /opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libOpenFOAM.so(_ZN4Foam13primitiveMesh10movePointsERKNS_5FieldINS_6VectorIdEEEES6_+0xdd) [0x7f39172c195d]
[ceprlx19:32502] [ 6] /opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libOpenFOAM.so(_ZN4Foam8polyMesh10movePointsERKNS_5FieldINS_6VectorIdEEEE+0x1f3) [0x7f39172a0e63]
[ceprlx19:32502] [ 7] /opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libfiniteVolume.so(_ZN4Foam6fvMesh10movePointsERKNS_5FieldINS_6VectorIdEEEE+0xbc) [0x7f391963d5ec]
[ceprlx19:32502] [ 8] /opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libdynamicMesh.so(_ZN4Foam18motionSmootherAlgo9scaleMeshERNS_4ListIiEERKNS1_INS_4PairIiEEEERKNS_10dictionaryESB_bi+0x201) [0x7f3917e114a1]
[ceprlx19:32502] [ 9] /opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libautoMesh.so(_ZN4Foam19medialAxisMeshMover10shrinkMeshERKNS_10dictionaryEiRNS_4ListIiEE+0x10c) [0x7f39178d379c]
[ceprlx19:32502] [10] /opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libautoMesh.so(_ZN4Foam19medialAxisMeshMover4moveERKNS_10dictionaryEiRNS_4ListIiEE+0x465) [0x7f39178e0e95]
[ceprlx19:32502] [11] /opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libautoMesh.so(_ZN4Foam15autoLayerDriver9addLayersERKNS_15layerParametersERKNS_10dictionaryERKNS_4ListIiEEiRNS_19decompositionMethodERNS_16fvMeshDistributeE+0xdc9) [0x7f39177b6de9]
[ceprlx19:32502] [12] /opt/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libautoMesh.so(_ZN4Foam15autoLayerDriver8doLayersERKNS_10dictionaryES3_RKNS_15layerParametersEbRNS_19decompositionMethodERNS_16fvMeshDistributeE+0x500) [0x7f39177ba0e0]
[ceprlx19:32502] [13] snappyHexMesh() [0x43951d]
[ceprlx19:32502] [14] /lib64/libc.so.6(__libc_start_main+0xfd) [0x3548a1ecdd]
[ceprlx19:32502] [15] snappyHexMesh() [0x4138a1]
[ceprlx19:32502] *** End of error message ***
--------------------------------------------------------------------------
Thanks a lot, Petr.
Attached Images
File Type: jpg motorBikeTut.jpg (53.8 KB, 74 views)
petr.f. is offline   Reply With Quote

 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Centrifugal fan-reverse flow in outlet lesds to a mass in flow field xiexing CFX 3 March 29, 2017 10:00
[ICEM] 3D Dynamic Mesh - Boundary layer mesh issues nathanricks ANSYS Meshing & Geometry 0 September 23, 2015 05:14
Low Mixing time Problem Mavier CFX 5 April 29, 2013 00:00
Questions about Boundary Layer Thickness and Turbulence Models famerfamer STAR-CCM+ 3 July 12, 2012 09:47
[snappyHexMesh] Boundary layer generation problems ivan_cozza OpenFOAM Meshing & Mesh Conversion 0 October 6, 2010 13:47


All times are GMT -4. The time now is 07:16.