|
[Sponsors] |
[snappyHexMesh] How to use displacementMotionSolver |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 19, 2018, 14:55 |
How to use displacementMotionSolver
|
#1 |
Member
Ed O'Malley
Join Date: Nov 2017
Posts: 30
Rep Power: 9 |
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 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; } 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); } // ************************************************************************* // 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; } // ************************************************************************* // |
|
November 30, 2018, 04:36 |
|
#2 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
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. |
|
Tags |
displacementmotionsolver, layer addition, mesh |
|
|