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] Inlet patch appears as part of wall boundary (https://www.cfd-online.com/Forums/openfoam-meshing/200967-inlet-patch-appears-part-wall-boundary.html)

robbedoes April 18, 2018 05:10

Inlet patch appears as part of wall boundary
 
1 Attachment(s)
Hi Foamers

I am currently trying to build a mesh for fuel injection in a cylinder using blockMesh and snappyHexMesh. The domain basically consists of 2 cylinders, 1 for the constant volume combustion chamber and 1 for the injector channel. I however encounter a problem when I try to assign different patch types to the 3 boundaries that I have (walls of the chamber, walls of the inlet pipe and inlet surface of the inlet pipe). The former two I specify as walls and everything goes fine. The inlet surface I specified as patch, but sHM keeps adding it to the chamber boundary, such that there are two isolated surfaces in the domain for that particular 'wall'. Consequently, the inlet boundary is empty (0 faces) and does not appear in paraview (I attached a picture for clarity).

Moreover, the menu on the left indicates that the to wall-type patches are recognized, but paraview reads them as patches. I'm very confused now as to which patch type I should use to make this work... Any help is much appreciated! :)

Finally, for clarity also my blockMeshDict and snappyHexMeshDict are attached. I should mention that combined.stl contains three separate solids, each given the same name as when I import them in sHM.

Robbe

Code:

/*--------------------------------*- 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      blockMeshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.001;

vertices
(
    (-100 -100 -100)
    (-100 100 -100)
    (-100 100 100)
    (-100 -100 100)
    (100 -100 -100)
    (100 100 -100)
    (100 100 100)
    (100 -100 100)
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (50 50 50) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
    blockInlet
    {
        type empty;
        faces
        (
            (0 1 2 3)
        );
    }
    blockOutlet
    {
        type empty;
        faces
        (
            (4 5 6 7)
        );
    }
    blockWalls
    {
        type empty;
        faces
        (
            (0 4 5 1)
        (1 2 6 5)
        (2 3 7 6)
        (3 7 4 0)
        );
    }
);

// ************************************************************************* //

Code:

/*--------------------------------*- 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      snappyHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

castellatedMesh true;
snap            true;
addLayers      true;

geometry
{
    combined.stl
    {
        type triSurfaceMesh;
    name fullGeometry;
    regions
    {
        inletWall {name inletWall;}
        injector {name injector;}
        walls {name walls;}
    }
    }
    refinementRegion.stl
    {
        type triSurfaceMesh;
    name jetRefinement;
    regions
    {
        refinementRegion {name refinementRegion;}
    }
    }
    refinementBox
    {
    type searchableCylinder;
    point1 (-0.02 0 0);
    point2 (0.003 0 0);
    radius 0.001;
    }
};



castellatedMeshControls
{

    maxLocalCells 100000;
    maxGlobalCells 2000000;
    minRefinementCells 10;
    maxLoadUnbalance 0.10;
    nCellsBetweenLevels 4;

    features
    (
    );

    refinementSurfaces
    {
        fullGeometry
    {
        level (0 0);
        regions
        {
        inletWall {level (1 2); patchInfo {type wall;}}
        injector {level (1 2); patchInfo {type patch;}}
        walls {level (1 2); patchInfo {type wall;}}
        }
    }
    }

    resolveFeatureAngle 30;

    refinementRegions
    {
        jetRefinement
    {
        mode inside;
        levels ((1.0 3));
        }
    refinementBox
    {
        mode inside;
        levels ((1.0 5));
    }
    }

    locationInMesh (0.002 0.002 0.002);
    allowFreeStandingZoneFaces true;
}


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


addLayersControls
{
    relativeSizes true;

    layers
    {
        walls
    {
        nSurfaceLayers 4;
    }
    inletWall
    {
        nSurfaceLayers 2;
    }
    injector
    {
        nSurfaceLayers 2;
    }
    }

    expansionRatio 1.3;
    firstLayerThickness 0.000125;
    minThickness 0.00005;
    nGrow 1;
    featureAngle 60;
    slipFeatureAngle 30;
    nRelaxIter 3;
    nSmoothSurfaceNormals 1;
    nSmoothNormals 3;
    nSmoothThickness 10;
    maxFaceThicknessRatio 0.5;
    maxThicknessToMedialRatio 0.3;
    minMedianAxisAngle 90;
    nBufferCellsNoExtrude 0;
    nLayerIter 50;
}

meshQualityControls
{
    #include "meshQualityDict"

    nSmoothScale 4;
    errorReduction 0.75;
}

mergeTolerance 1e-6;

// ************************************************************************* //



All times are GMT -4. The time now is 21:57.