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

[snappyHexMesh] How to use displacementMotionSolver

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By simrego

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 19, 2018, 14:55
Default How to use displacementMotionSolver
  #1
Member
 
Ed O'Malley
Join Date: Nov 2017
Posts: 30
Rep Power: 9
edomalley1 is on a distinguished road
I'm meshing a complex geometry in SnappyHexMesh with about 10 million cells in OpenFOAM 6. I'm getting boundary layer detachment always at the point where the layers are collapsing in the mesh. I'm trying to improve the layer addition by using the displacementMotionSolver, as explained here:

https://www.openfoam.com/documentati...sh-layers.html

But I get this error when SHM begins the layer process:

Code:
patch faces    layers avg thickness[m]
                      near-wall overall
----- -----    ------ --------- -------
Shoe1 275699   15     5.9e-05   0.00186 

[15] 
[15] 
[15] --> FOAM FATAL ERROR: 
[15] Unknown externalDisplacementMeshMover type displacementMotionSolver

Valid externalDisplacementMeshMover types:
1(displacementMedialAxis)
[15] 
[15]     From function static Foam::autoPtr<Foam::externalDisplacementMeshMover> Foam::externalDisplacementMeshMover::New(const Foam::word&, const Foam::dictionary&, const Foam::List<Foam::Pair<int> >&, Foam::pointVectorField&)
[15]     in file externalDisplacementMeshMover/externalDisplacementMeshMover.C at line 70.
[15] 
FOAM parallel run exiting
Here is the relevant section of my SHMdict file:

Code:
addLayersControls
{
    // Are the thickness parameters below relative to the undistorted
    // size of the refined cell outside layer (true) or absolute sizes (false).
    relativeSizes true;

    // Per final patch (so not geometry!) the layer information
    layers
    {
        "Shoe1.*"
        {
            nSurfaceLayers 15;
        }
    }
    meshShrinker    displacementMotionSolver;

    solver          displacementLaplacian;

    displacementLaplacianCoeffs
    {
        diffusivity     quadratic inverseDistance (Shoe1);
    }
    // Expansion factor for layer mesh
    expansionRatio 1.1;

    // Wanted thickness of final added cell layer. If multiple layers
    // is the thickness of the layer furthest away from the wall.
    // Relative to undistorted size of cell outside layer.
    // See relativeSizes parameter.
    finalLayerThickness 0.3;

    // Minimum thickness of cell layer. If for any reason layer
    // cannot be above minThickness do not add layer.
    // Relative to undistorted size of cell outside layer.
    minThickness 0.1;

    // If points get not extruded do nGrow layers of connected faces that are
    // also not grown. This helps convergence of the layer addition process
    // close to features.
    nGrow 0;


    // Advanced settings

    // When not to extrude surface. 0 is flat surface, 90 is when two faces
    // are perpendicular
    featureAngle 310;

    slipFeatureAngle 45;

    // Maximum number of snapping relaxation iterations. Should stop
    // before upon reaching a correct mesh.
    nRelaxIter 40;

    // Number of smoothing iterations of surface normals
    nSmoothSurfaceNormals 20;

    // Number of smoothing iterations of interior mesh movement direction
    nSmoothNormals 30;

    // Smooth layer thickness over surface patches
    nSmoothThickness 20;

    // Stop layer growth on highly warped cells
    maxFaceThicknessRatio 0.5;

    // Reduce layer growth where ratio thickness to medial
    // distance is large
    maxThicknessToMedialRatio 0.3;

    // Angle used to pick up medial axis points
    minMedialAxisAngle 90;

    // Create buffer region for new layer terminations
    nBufferCellsNoExtrude 0;

    // Overall max number of layer addition iterations
    nLayerIter 50;
}
I've tried removing the items that are specifically for displacementMedialAxis but it did not help.

For complete info, here's the FVSolution:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    p
    {
        solver          GAMG;
        tolerance       1e-07;
        relTol          0.1;
        smoother        GaussSeidel;
    }

    pFinal
    {
        $p;
        tolerance       1e-6;
        relTol          0;
    }

    Phi
    {
        $p;
    }

    "(U|nuTilda)"
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance       1e-08;
        relTol          0.1;
    }
    cellDisplacement
    {
        solver          GAMG;
        smoother        GaussSeidel;
        tolerance       1e-7;
        relTol          0.01;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 0;
}

potentialFlow
{
    nNonOrthogonalCorrectors 10;
}

relaxationFactors
{
    p               0.3;
    U               0.5;
    nuTilda         0.5;
}

cache
{
    grad(U);
}


// ************************************************************************* //
and FVSchemes

Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default         steadyState;
}

gradSchemes
{
    default         Gauss linear;
    grad(U)         cellLimited Gauss linear 1;
    grad(nuTilda)   cellLimited Gauss linear 1;
}

divSchemes
{
    default         none;
    div(phi,U)      bounded Gauss linearUpwindV grad(U);
    div(phi,k)      bounded Gauss upwind;
    div(phi,omega)  bounded Gauss upwind;
    div((nuEff*dev2(T(grad(U))))) Gauss linear;
    div(phi,nuTilda) bounded Gauss upwind;
}

laplacianSchemes
{
    //default         Gauss linear corrected;
    laplacian(diffusivity,cellDisplacement) Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

wallDist
{
    method meshWave;
}


// ************************************************************************* //
edomalley1 is offline   Reply With Quote

Old   November 30, 2018, 04:36
Default
  #2
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
Hi!


You are using OF6 but this feature is only avaliable in openFoam from ESI group.
openfoam.org -> original OF (what you are using, ie.: OF 4.x, OF 5.x, OF 6.x),
openfoam.com -> OpenFOAM plus by ESI group (ie.: v1706, v1712, v1806). This is a fork.
They are mostly the same, so if something is added in OF, it is usually added to OF plus too, but the opposite is not true. Based on my experience OF plus has much much more functionality.


So if you want to use that motion solver in snappy, you must use OF plus.
Gerhard likes this.
simrego is offline   Reply With Quote

Reply

Tags
displacementmotionsolver, layer addition, mesh


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



All times are GMT -4. The time now is 04:10.