|
[Sponsors] |
[snappyHexMesh] stl doesn't appear after snappy process |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 18, 2018, 03:50 |
stl doesn't appear after snappy process
|
#1 |
New Member
Join Date: Mar 2018
Posts: 16
Rep Power: 8 |
Hi all,
OF has just finished running the snappy but I can't see my stl file snapped in Paraview. Theese are the steps I've done: -copied the stl file in Trisurface folder; -copied SnappyHexMeshDict and surfaceFeatureExtractDict in the system directory and changed the name of the object; -started running with Allrun. Here are the dictionaries: FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // castellatedMesh true; snap true; addLayers false; geometry { butterflyValve.stl { type triSurfaceMesh; scale 0.00276; name butterflyValve; } castellatedMeshControls { maxLocalCells 10000; maxGlobalCells 200000; minRefinementCells 10; maxLoadUnbalance 0.10; nCellsBetweenLevels 3; features ( { file "butterflyValve.eMesh"; scale 0.00276; level 6; } ); snapControls { nSmoothPatch 3; tolerance 2.0; nSolveIter 30; nRelaxIter 5; nFeatureSnapIter 10; implicitFeatureSnap false; explicitFeatureSnap true; multiRegionFeatureSnap false; } addLayersControls { relativeSizes true; layers { "(lowerWall|butterflyValve).*" { nSurfaceLayers 1; } } expansionRatio 1.0; finalLayerThickness 0.3; minThickness 0.1; nGrow 0; featureAngle 60; slipFeatureAngle 30; nRelaxIter 3; nSmoothSurfaceNormals 1; nSmoothNormals 3; nSmoothThickness 10; maxFaceThicknessRatio 0.5; maxThicknessToMedialRatio 0.3; minMedianAxisAngle 90; nBufferCellsNoExtrude 0; nLayerIter 50; } writeFlags ( scalarLevels layerSets layerFields ); mergeTolerance 1e-6; FoamFile { version 2.0; format ascii; class dictionary; object surfaceFeatureExtractDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // butterflyValve.stl { extractionMethod extractFromSurface; extractFromSurfaceCoeffs { includedAngle 150; } subsetFeatures { nonManifoldEdges no; openEdges yes; } writeObj yes; } "Allrun" #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions runApplication surfaceFeatureExtract runApplication blockMesh runApplication decomposePar runParallel snappyHexMesh -overwrite #- For non-parallel running #cp -r 0.orig 0 > /dev/null 2>&1 #- For parallel running ls -d processor* | xargs -I {} rm -rf ./{}/0 ls -d processor* | xargs -I {} cp -r 0 ./{}/0 runParallel patchSummary runParallel potentialFoam runParallel $(getApplication) runApplication reconstructParMesh -constant runApplication reconstructPar -latestTime /////// Any ideas of where the mistakes are? Thanks |
|
May 18, 2018, 04:37 |
|
#2 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Hi!
You mean, you wanna see your mesh and stl files together? Btw I can't see your "locationInMesh" entry in your SHMDict. If you had any errors in your log files please post them. |
|
May 18, 2018, 06:15 |
|
#3 |
New Member
Join Date: Mar 2018
Posts: 16
Rep Power: 8 |
snappyHexMesh > log.snappyHexMesh
--> FOAM FATAL IO ERROR: keyword castellatedMeshControls is undefined in dictionary "D:/blueCFD-Core-2016/ofuser-of4/run/pipe/system/snappyHexMeshDict" file: D:/blueCFD-Core-2016/ofuser-of4/run/pipe/system/snappyHexMeshDict from line 17 to line 114. From function const Foam::dictionary& Foam::dictionary::subDict(const Foam::word&) const in file db/dictionary/dictionary.C at line 642. FOAM exiting decomposePar > log.decomposePar --> FOAM FATAL ERROR: Case is already decomposed with 4 domains, use the -force option or manually remove processor directories before decomposing. e.g., rm -rf D:/blueCFD-Core-2016/ofuser-of4/run/pipe/processor* From function int main(int, char**) in file decomposePar.C at line 393. FOAM exiting reconstructParMesh > log.reconstructParMesh --> FOAM FATAL ERROR: Your current settings specify ASCII writing with 6 digits precision. Your merging tolerance (1e-007) is finer than this. Please change your writeFormat to binary or increase the writePrecision or adjust the merge tolerance (-mergeTol). From function int main(int, char**) in file reconstructParMesh.C at line 516. FOAM exiting potentialFoam > log.potentialFoam --> FOAM FATAL IO ERROR: keyword potentialFlow is undefined in dictionary "D:/blueCFD-Core-2016/ofuser-of4/run/pipe/system/fvSolution" file: D:/blueCFD-Core-2016/ofuser-of4/run/pipe/system/fvSolution at line 22. From function const Foam::dictionary& Foam::dictionary::subDict(const Foam::word&) const in file db/dictionary/dictionary.C at line 642. That's all. The locationInMesh must be set to any specific coordinates? |
|
May 18, 2018, 06:30 |
|
#4 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
There are many errors. First of all i think you miss the closing bracket for the geometry entry in your SHMDict.
The locationInMesh tells shm which part of the mesh should be kept (the stl will cut the domain into 2 or more parts, and you have to mark which one do you want to use) Also use decomposePar -force, or delete the processor directories before you run decomposePar And in controlDict set 7 digits precision or decrease your merging tolerance in reconstructParMesh. But if you use reconstructPar -latestTime, you don't need reconstructParMesh before that. And there are also problems with potentialFoam. I think you should skip this part if you learning openFOAM, and when u understand the basics, you can do more fancy stuff. For the meshing just run these: blockMesh decomposePar -force # -force delete your processor directories if you have. mpirun -np numberOfProcessors snappyHexMesh -parallel -overwrite #replace numberOfProcessors with the number of processors you have (i mean how much you use) reconstructParMesh -constant if it's fine, you can go to the solving phase. |
|
May 18, 2018, 06:45 |
|
#5 |
New Member
Join Date: Mar 2018
Posts: 16
Rep Power: 8 |
Lovely simrego!
I'll go for this and then let's see what happens! Thanks |
|
May 18, 2018, 10:54 |
|
#6 |
New Member
Join Date: Mar 2018
Posts: 16
Rep Power: 8 |
Dear simrego,
this is what comes out after the snappy has been run: Exec : SnappyHexMesh -parallel -overwrite Date : May 18 2018 Time : 16:52:57 Host : "PANDI-PC" PID : 3996 Case : D:/blueCFD-Core-2016/ofuser-of4/run/pipe nProcs : 4 Slaves : 3 ( "PANDI-PC.1988" "PANDI-PC.6348" "PANDI-PC.3024" ) Pstream initialized with: floatTransfer : 0 nProcsSimpleSum : 0 commsType : nonBlocking polling iterations : 0 SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Read mesh in = 1.017 s Overall mesh bounding box : (-0.07 -0.07 0) (0.07 0.07 2) Relative tolerance : 1e-006 Absolute matching distance : 2.009776e-006 butterflyValve.stl : using scale 0.00276 Reading refinement surfaces. [1] [3] [0] [1] [3] [0] [2] [1] [3] [0] --> FOAM FATAL IO ERROR: [2] --> FOAM FATAL IO ERROR: --> FOAM FATAL IO ERROR: [1] [2] [3] [0] keyword refinementSurfaces is undefined in dictionary "IOstream.castellatedMeshControls" --> FOAM FATAL IO ERROR: keyword refinementSurfaces is undefined in dictionary "IOstream.castellatedMeshControls" keyword refinementSurfaces is undefined in dictionary "D:/blueCFD-Core-2016/ofuser-of4/run/pipe/system/snappyHexMeshDict.castellatedMeshControls" [1] [2] [0] [3] keyword refinementSurfaces is undefined in dictionary "IOstream.castellatedMeshControls" [1] file: [2] IOstream.castellatedMeshControls from line [2] [3] 0 file: file: to line IOstream.castellatedMeshControls 0 IOstream.castellatedMeshControls . from line [1] from line [1] 0 0 From function to line to line const Foam::dictionary& Foam::dictionary::subDict(const Foam::word&) const 0 0 . [1] . in file [2] db/dictionary/dictionary.C [3] at line [2] [0] 642 [3] From function file: . From function const Foam::dictionary& Foam::dictionary::subDict(const Foam::word&) const const Foam::dictionary& Foam::dictionary::subDict(const Foam::word&) const D:/blueCFD-Core-2016/ofuser-of4/run/pipe/system/snappyHexMeshDict.castellatedMeshControls [1] from line [3] FOAM parallel run exiting 33 in file [1] to line db/dictionary/dictionary.C 49 at line . 642 . [0] [3] FOAM parallel run exiting [0] [3] From function const Foam::dictionary& Foam::dictionary::subDict(const Foam::word&) const [0] in file [2] db/dictionary/dictionary.C in file at line db/dictionary/dictionary.C 642 at line job aborted: [ranks] message [0] terminated [1] application aborted aborting MPI_COMM_WORLD (comm=0x44000000), error 1, comm rank 1 [2] terminated [3] application aborted aborting MPI_COMM_WORLD (comm=0x44000000), error 1, comm rank 3 ---- error analysis ----- [1,3] on PANDI-PC SnappyHexMesh aborted the job. abort code 1 ---- error analysis ----- |
|
May 18, 2018, 12:52 |
|
#7 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
--> FOAM FATAL IO ERROR:
keyword refinementSurfaces is undefined in dictionary "IOstream.castellatedMeshControls" In the castellatedMeshControls you miss the refinementSurfaces entry You need something like this: Code:
refinementSurfaces { butterflyValve { // Surface-wise min and max refinement level level (5 6); // Optional specification of patch type (default is wall). No // constraint types (cyclic, symmetry) etc. are allowed. //patchInfo //{ // type wall; // inGroups (motorBikeGroup); //} } } https://cfd.direct/openfoam/user-guide/snappyhexmesh/ Then analize this code and try to understand the meaning of the lines. I think for the begining just replace your dict with this one, and only modify only the following: https://github.com/OpenFOAM/OpenFOAM...ppyHexMeshDict castellatedMesh true; // This will cut the cells (you can see in the prev link.), and then u can enable snap if you understand what's happening in the castellation phase, and then enable add layers. I think like this it's easier to understand what's going on in the different phases. Of course later you can do everything for the first time, but i'm not sure if you know what are you doing exactly yet. snap false; addLayers false; geometry { ... }; features { ... }; refinementSurfaces { ... }; refinementRegions { //You can leave it empty now. }; layers { ... }; Then you can play with the parameters and try to understand the meaning of them if they are not clear from the comments. For the first time snappyHexMesh is a mess for everyone I think. But if you understand the main parts once, it will be much easier. Sorry for this long post, i hope i wrote something useful for you. I could make the SHMDict for you, but it's better if you figure out yourself. If you feel that you totally lost, just ask me, and I'll try to help you (maybe it's better in private). Good luck! (And also sorry for my english. ) |
|
May 27, 2018, 13:01 |
|
#8 |
New Member
Join Date: Mar 2018
Posts: 16
Rep Power: 8 |
Dear simrego,
thank you very much for the time spent for me. Actually the snappy problem is almost solved. Now i'm trying to run icofoam in the snapped pipe, but at the end of the process Paraview outputs a message saying that the mesh points are much more than the fields (p and U) points/cells. I don't know if the problem is in my code or somewhere else. |
|
May 28, 2018, 06:51 |
|
#9 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
As i know it means that you have more (or less) cell data in your p or U files than the mesh has.
A guess: Before running the icoFoam try to open your case in paraView and load every field variables. If it'll drop the same error, probably you have problems with your initial conditions (ie. using nonuniform bc with more or less data then you need). Do you have any warnings or errors with icoFoam? If you have any error in any utility or application please share it. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[CAD formats] Creating waterproof STL using snappyHexMesh or salome | Tobi | OpenFOAM Meshing & Mesh Conversion | 58 | May 13, 2020 06:01 |
[snappyHexMesh] Scaling issues with STL file and snappy hex mesh . | pradyumnsingh | OpenFOAM Meshing & Mesh Conversion | 2 | July 18, 2018 16:17 |
[Gmsh] STL on Gmsh + Mesh on Snappy | adrieno | OpenFOAM Meshing & Mesh Conversion | 3 | May 20, 2016 12:22 |
The fl process could not be started because of UDF | majid_kamyab | Fluent UDF and Scheme Programming | 6 | December 15, 2015 08:42 |
[snappyHexMesh] Snappy mesh- stl file | Joanna Huang | OpenFOAM Meshing & Mesh Conversion | 1 | January 14, 2013 13:00 |