CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] Usage of locationsInMesh (https://www.cfd-online.com/Forums/openfoam-meshing/218266-usage-locationsinmesh.html)

mzhang June 14, 2019 05:01

Usage of locationsInMesh
 
Hi, guys,
I am trying to solve an internal flow problem, and I wish to seperate the mesh for the flow channel into two regions with a surface to ease the post processing.

What I did is that I defined two points respectively located in the two regions with locationsInMesh, but snappyHexMesh returned with an error:

keyword locationInMesh is undefined in dictionary "/home/mzhang/openfoam6/pROJECTS/testlocationsinmesh/system/snappyHexMeshDict.castellatedMeshControls"

I wonder if any of you would please be able to identify where the problem is?

Thanks,
Mingzi

Code:


FoamFile
{
    version 2.0;
    format ascii;
    class dictionary;
    //location system;
    object snappyHexMeshDict;
}

    castellatedMesh true;
    snap true;
    addLayers true;


    geometry
    {
        inlet.stl
        {
            type triSurfaceMesh;
            name inlet;
            appendRegionName false;
        }

        necksurface.stl
        {
            type triSurfaceMesh;
            name necksurface;
            appendRegionName false;
        }

        outlet1.stl
        {
            type triSurfaceMesh;
            name outlet1;
            appendRegionName false;
        }

        outlet2.stl
        {
            type triSurfaceMesh;
            name outlet2;
            appendRegionName false;
        }

        wall.stl
        {
            type triSurfaceMesh;
            name wall;
            appendRegionName false;
        }

    };

    castellatedMeshControls
    {
        features
        (
       
        {
            file "inlet_line.eMesh";
            levels ((0.0 0));
            refineFeatureEdgesOnly false;
        }

       
        {
            file "necksurface_line.eMesh";
            levels ((0.0 0));
            refineFeatureEdgesOnly false;
        }

       
        {
            file "outlet1_line.eMesh";
            levels ((0.0 0));
            refineFeatureEdgesOnly false;
        }

       
        {
            file "outlet2_line.eMesh";
            levels ((0.0 0));
            refineFeatureEdgesOnly false;
        }

       
        {
            file "wall_line.eMesh";
            levels ((0.0 0));
            refineFeatureEdgesOnly false;
        }

        );

        refinementSurfaces
        {
            inlet
            {
                level ( 2 4 );
            }

            necksurface
            {
                level ( 2 4 );
            }

            outlet1
            {
                level ( 2 4 );
            }

            outlet2
            {
                level ( 2 4 );
            }

            wall
            {
                level ( 4 5 );
            }

        }

        refinementRegions
        {
        }

        //locationInMesh (0.0527 0.0482 0.0415);
        locationsInMesh       
        (
            (( 0.0527 0.0482 0.0415 ) intraIA)
            (( 0.0564 0.0558 0.0386 ) intraPA)
        );


        maxLocalCells 10000000;
        maxGlobalCells 20000000;
        minRefinementCells 0;
        nCellsBetweenLevels 1;
        resolveFeatureAngle 80.0;
        allowFreeStandingZoneFaces true;
        planarAngle 30.0;
        maxLoadUnbalance 0.1;
    }

    snapControls
    {
        nSolveIter 30;
        nSmoothPatch 3;
        tolerance 1.0;
        nRelaxIter 5;
        nFeatureSnapIter 10;
        implicitFeatureSnap false;
        explicitFeatureSnap true;
        multiRegionFeatureSnap false;
    }

    addLayersControls
    {
        layers
        {
        }

        relativeSizes true;
        expansionRatio 1.0;
        finalLayerThickness 0.3;
        minThickness 0.25;
        nGrow 0;
        featureAngle 130.0;
        slipFeatureAngle 30.0;
        nRelaxIter 5;
        nSmoothSurfaceNormals 1;
        nSmoothNormals 3;
        nSmoothThickness 10;
        maxFaceThicknessRatio 0.5;
        maxThicknessToMedialRatio 0.3;
        minMedialAxisAngle 90;
        nBufferCellsNoExtrude 0;
        nLayerIter 50;
        nRelaxedIter 20;
        writeVTK false;
        noErrors false;
        layerRecovery 1;
        growZoneLayers false;
        projectGrownUp 0.0;
    }

    meshQualityControls
    {
        maxNonOrtho 65.0;
        maxBoundarySkewness 20;
        maxInternalSkewness 4;
        maxConcave 80.0;
        minFlatness 0.5;
        minVol 1.0E-21;
        minTetQuality 1.0E-15;
        minArea -1.0;
        minTwist 0.02;
        minDeterminant 0.001;
        minFaceWeight 0.05;
        minVolRatio 0.01;
        minTriangleTwist -1.0;
        nSmoothScale 4;
        errorReduction 0.75;
        relaxed
        {
            maxNonOrtho 75;
        }

    }

    debug 0;
    mergeTolerance 1.0;
    autoBlockMesh false;


YannGuyot July 6, 2020 10:01

Hello,


Could you fix this problem?

GerhardHolzinger July 7, 2020 03:53

I think the keyword locationsInMesh in only available in the ESI releases of OpenFOAM, i.e. OpenFOAM-20.05 etc.

The foundation release, i.e. OpenFOAM-6 and others, does not support the locationsInMesh keyword.

omete April 14, 2021 11:44

Quote:

Originally Posted by GerhardHolzinger (Post 777046)
I think the keyword locationsInMesh in only available in the ESI releases of OpenFOAM, i.e. OpenFOAM-20.05 etc.

The foundation release, i.e. OpenFOAM-6 and others, does not support the locationsInMesh keyword.


-----
Is there a way to use ESI releases over Docker? I need to use locationsInMesh and hit the same problem. However, my docker provides OpenFOAM-6.

Thanks!

Yann April 14, 2021 12:41

Quote:

Originally Posted by omete (Post 801561)
-----
Is there a way to use ESI releases over Docker? I need to use locationsInMesh and hit the same problem. However, my docker provides OpenFOAM-6.

Thanks!

You should find all the information you need on their website: https://www.openfoam.com/download/current-release


All times are GMT -4. The time now is 01:46.