|
[Sponsors] |
[snappyHexMesh] Running Snappyhexmesh in Parallel missing trisurface |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 7, 2019, 06:09 |
Running Snappyhexmesh in Parallel missing trisurface
|
#1 |
New Member
Florian
Join Date: Dec 2018
Posts: 20
Rep Power: 7 |
Hello there,
im trying to Mesh a Hydrofoil in a Square domain using Snappy Hex Mesh. So far i've gotten along fine but when i try to run SnappyHexMesh in parallel i run into issues. According to all Tutorials i've read it should work like this: 1. blockMesh 2. surfaceFeatureExtract 3. decomposePar 4. mpirun -np n snappyHexMesh -parallel However when i start the snappyHexMesh run it immediately quits out on me with this error message from each of the 16 processors: Code:
[0] --> FOAM FATAL ERROR: [0] Cannot find triSurfaceMesh starting from "/home/rieth/Snappyhex/processor0/constant/triSurface/Fluegel.stl" [0] [0] From function triSurfaceMesh::checkFile(const fileName&, const fileName&) [0] in file searchableSurface/triSurfaceMesh.C at line 116. [0] FOAM parallel run exiting Looking at the processor directories individually only the polymesh folder gets split. It doesn't even create a trisurface folder in the processor directories. I'm using OpenFOAM 2.3.1 Any help would be appreciated |
|
June 10, 2019, 22:08 |
|
#2 |
New Member
Yehezkiel Wiliardy
Join Date: Feb 2018
Location: Singapore
Posts: 9
Rep Power: 8 |
can you post your snappyHexMesh dict and the items inside polyMesh/triSurface?
see if you set it up correctly also, since you do SFE, have you put the obj in the features? mpirun -np n snappyHexMesh -overwrite -parallel cheers, yewi |
|
June 11, 2019, 05:27 |
|
#3 |
New Member
Florian
Join Date: Dec 2018
Posts: 20
Rep Power: 7 |
Hello there!
Here's my snappyhex: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: plus | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Which of the steps to run castellatedMesh true; snap true; addLayers true; // Geometry. Definition of all surfaces. All surfaces are of class // searchableSurface. // Surfaces are used // - to specify refinement for any mesh cell intersecting it // - to specify refinement for any mesh cell inside/outside/near // - to 'snap' the mesh boundary to the surface geometry { Fluegel.stl { type triSurfaceMesh; name part1; patchInfo { type wall; } } water { type searchableBox; min (-153.6 -24 -0.80); max (14.4 24 -0.7); } box1 { type searchableBox; min (-153.6 -24 -1); max (14.4 24 -0.5); } box2 { type searchableBox; min (-153.6 -24 -1.3); max (14.4 24 -0.2); } box3 { type searchableBox; min (-153.6 -24 -1.6); max (14.4 24 0.1); } box4 { type searchableBox; min (-2 -2 -1.7); max (2 2 1.2); } }; // Settings for the castellatedMesh generation. castellatedMeshControls { // Refinement parameters // ~~~~~~~~~~~~~~~~~~~~~ // If local number of cells is >= maxLocalCells on any processor // switches from from refinement followed by balancing // (current method) to (weighted) balancing before refinement. maxLocalCells 1000000; // Overall cell limit (approximately). Refinement will stop immediately // upon reaching this number so a refinement level might not complete. // Note that this is the number of cells before removing the part which // is not 'visible' from the keepPoint. The final number of cells might // actually be a lot less. maxGlobalCells 200000000; // The surface refinement loop might spend lots of iterations refining just a // few cells. This setting will cause refinement to stop if <= minimumRefine // are selected for refinement. Note: it will at least do one iteration // (unless the number of cells to refine is 0) minRefinementCells 1; // Number of buffer layers between different levels. // 1 means normal 2:1 refinement restriction, larger means slower // refinement. nCellsBetweenLevels 1; // Explicit feature edge refinement // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Specifies a level for any cell intersected by its edges. // This is a featureEdgeMesh, read from constant/triSurface for now. features ( { file "Fluegel.eMesh"; level 7; } ); // Surface based refinement // ~~~~~~~~~~~~~~~~~~~~~~~~ // Specifies two levels for every surface. The first is the minimum level, // every cell intersecting a surface gets refined up to the minimum level. // The second level is the maximum level. Cells that 'see' multiple // intersections where the intersections make an // angle > resolveFeatureAngle get refined up to the maximum level. refinementSurfaces { part1 { // Surface-wise min and max refinement level level (5 7); } } resolveFeatureAngle 15; // Region-wise refinement // ~~~~~~~~~~~~~~~~~~~~~~ // Specifies refinement level for cells in relation to a surface. One of // three modes // - distance. 'levels' specifies per distance to the surface the // wanted refinement level. The distances need to be specified in // descending order. // - inside. 'levels' is only one entry and only the level is used. All // cells inside the surface get refined up to the level. The surface // needs to be closed for this to be possible. // - outside. Same but cells outside. refinementRegions { water { mode inside; levels ((1e30 4)); } box1 { mode inside; levels ((1e30 3)); } box2 { mode inside; levels ((1e30 2)); } box3 { mode inside; levels ((1e30 1)); } box4 { mode inside; levels ((1e30 6)); } } // Mesh selection // ~~~~~~~~~~~~~~ // After refinement patches get added for all refinementSurfaces and // all cells intersecting the surfaces get put into these patches. The // section reachable from the locationInMesh is kept. // NOTE: This point should never be on a face, always inside a cell, even // after refinement. locationInMesh (0 0 0.1); // Whether any faceZones (as specified in the refinementSurfaces) // are only on the boundary of corresponding cellZones or also allow // free-standing zone faces. Not used if there are no faceZones. allowFreeStandingZoneFaces true; } // Settings for the snapping. snapControls { //- Number of patch smoothing iterations before finding correspondence // to surface nSmoothPatch 3; //- Relative distance for points to be attracted by surface feature point // or edge. True distance is this factor times local // maximum edge length. // tolerance 4.0; tolerance 1.0; //- Number of mesh displacement relaxation iterations. nSolveIter 500; //- Maximum number of snapping relaxation iterations. Should stop // before upon reaching a correct mesh. nRelaxIter 15; nFeatureSnapIter 20; } // Settings for the layer addition. 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 { part1 { nSurfaceLayers 5; } } // Expansion factor for layer mesh expansionRatio 1.25; // 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.003; // Minimum thickness of cell layer. If for any reason layer // cannot be above minThickness do not add layer. // See relativeSizes parameter. minThickness 0.0009; // 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. // Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x) nGrow 0; // Advanced settings // When not to extrude surface. 0 is flat surface, 90 is when two faces // are perpendicular featureAngle 60; // Maximum number of snapping relaxation iterations. Should stop // before upon reaching a correct mesh. nRelaxIter 5; // Number of smoothing iterations of surface normals nSmoothSurfaceNormals 1; // Number of smoothing iterations of interior mesh movement direction nSmoothNormals 3; // Smooth layer thickness over surface patches nSmoothThickness 10; // 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 // Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x. minMedianAxisAngle 90; // Create buffer region for new layer terminations nBufferCellsNoExtrude 0; // Overall max number of layer addition iterations. The mesher will exit // if it reaches this number of iterations; possibly with an illegal // mesh. nLayerIter 50; // Max number of iterations after which relaxed meshQuality controls // get used. Up to nRelaxIter it uses the settings in meshQualityControls, // after nRelaxIter it uses the values in meshQualityControls::relaxed. nRelaxedIter 20; } // Generic mesh quality settings. At any undoable phase these determine // where to undo. meshQualityControls { #include "meshQualityDict" } // Advanced // Flags for optional output // 0 : only write final meshes // 1 : write intermediate meshes // 2 : write volScalarField with cellLevel for postprocessing // 4 : write current intersections as .obj files debug 0; // Merge tolerance. Is fraction of overall bounding box of initial mesh. // Note: the write tolerance needs to be higher than this. mergeTolerance 1E-6; // ************************************************************************* // What do you mean by "putting in the features"? I'm a bit confused by this comment. |
|
June 11, 2019, 07:07 |
|
#4 |
New Member
Yehezkiel Wiliardy
Join Date: Feb 2018
Location: Singapore
Posts: 9
Rep Power: 8 |
Hi i cant seem to reproduce the error. My first guess is the stl has problem (maybe bad faces or corrupted).
Secondly, This is how i normally put my geometry setting in my snappy dict Code:
Fluegel.stl { type triSurfaceMesh; name part1; regions { part1{ name part1; } } } if you open the stl file there should be part1 at the start and end region block for example, for Fluegel.stl should be formatted like this Code:
solid part1 facet normal 0 -0 -1 outer loop vertex -4.302980899810791 21.648529052734375 5.3000001907348633 vertex -4.302980899810791 20.148529052734375 5.3000001907348633 vertex -4.9029808044433594 20.148529052734375 5.3000001907348633 endloop endfacet facet normal 0 -0 -1 outer loop vertex -4.302980899810791 21.648529052734375 5.3000001907348633 vertex -4.9029808044433594 20.148529052734375 5.3000001907348633 vertex -4.9029808044433594 21.648529052734375 5.3000001907348633 endloop endfacet endsolid part1 The features is this line: Code:
features ( { file "Fluegel.eMesh"; level 7; } ); you might want to specify this inside the snap control, which currently missing in your snappy dict Code:
snapControls { implicitFeatureSnap false; explicitFeatureSnap true; //snaps to manually generated feature edges, reads the features block } |
|
June 11, 2019, 07:13 |
|
#5 |
New Member
Florian
Join Date: Dec 2018
Posts: 20
Rep Power: 7 |
Hm the thing is if i just run the snappy hex mesh on one core it works fine and produces a Mesh that at least in paraview seems to function correctly. However that takes something like 58000 seconds to generate so it's not all that feasible for comparing different angles of attack etc.
However when i try to cut that time down by running snappy in parallel i get the issue described in my initial post. It seems to want to use a trisurface file in the decomposed processor files but the decompose method doesn't produce those. It seems to only decompose the backround blockMesh but not the trisurface folder. |
|
June 11, 2019, 07:32 |
|
#6 |
New Member
Yehezkiel Wiliardy
Join Date: Feb 2018
Location: Singapore
Posts: 9
Rep Power: 8 |
I see. Hmm this might sound stupid, but what if you manually copy the triSurface folder into each proc folder. Because Ultimately thats what the error seems to demand. Start with small number of procs like 4 and not 16, just to see whether it would work
|
|
June 11, 2019, 07:43 |
|
#7 |
New Member
Florian
Join Date: Dec 2018
Posts: 20
Rep Power: 7 |
I'll try that but i think it has something to do with the computer cluster not reading the file correctly. Just now i got it to run in parallel on my laptop. Sadly that's only 2 cores.
Trying it on the universities cluster even surfaceextract gives me an error of not being able to read the STL file. You wouldn't happen to have an idea on how to fix that? Btw thanks for the answers so far! |
|
June 25, 2020, 01:05 |
try this
|
#8 |
New Member
Chaewoong Ban
Join Date: Jun 2013
Posts: 18
Rep Power: 13 |
decomposePar -copyZero
(I use of5 or fe41) |
|
September 12, 2024, 03:26 |
|
#9 |
New Member
Join Date: May 2024
Posts: 1
Rep Power: 0 |
Hi Archoncomando, I'm also having the same issue, it works well on one core but fails in parallel. Have you found a solution to this problem? I really need to run snappyHexMesh in parallel to improve the efficiency.
BTW I'm using ofv1706 |
|
Tags |
decomposepar, missing, snappyhexmesh, trisurface |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error running simpleFoam in parallel | Yuby | OpenFOAM Running, Solving & CFD | 14 | October 7, 2021 04:38 |
Error running openfoam in parallel | fede32 | OpenFOAM Programming & Development | 5 | October 4, 2018 16:38 |
simpleFoam parallel | AndrewMortimer | OpenFOAM Running, Solving & CFD | 12 | August 7, 2015 18:45 |
Fluent 14.0 file not running in parallel mode in cluster | tejakalva | FLUENT | 0 | February 4, 2015 07:02 |
Running CFX parallel distributed Under linux system with loadleveler queuing system | ahmadbakri | CFX | 1 | December 21, 2014 04:19 |