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

[snappyHexMesh] OpenFoam FATAL ERROR SnappyHexMesh search lines never written

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 16, 2016, 12:51
Default OpenFoam FATAL ERROR SnappyHexMesh search lines never written
  #1
Member
 
power
Join Date: Jun 2014
Posts: 86
Rep Power: 11
enginpower is on a distinguished road
Hi all,
I'm using SnappyHexMesh to mesh an stl model
I followed this procedure using the tutorial pitzDaily of SimpleFoam:
  1. I put the stl file inside the folder /constant/triSurface
  2. on the terminal I give this command
    Code:
    blockMesh
  3. then
    Code:
    surfaceFeatureextraction
  4. Code:
    decomposePar
  5. Code:
    mpirun -np 6 snappyHexMesh -overwrite -parallel
  6. Code:
    reconstructParMesh -constant
I got several meshes with this procedure. But now I have a very thin plates to mesh and I modified the snappyHexMeshDict file to improve that.


The problem is that the command
Code:
mpirun -np 6 snappyHexMesh-overwrite -parallel
returns this error (this is only the last part of all the output of the command no.5):
Code:
Doing final balancing
---------------------

Found 0 zoned faces to keep together.
Found 0 separated coupled faces to keep together.
Refined mesh : cells:16510838  faces:54133162  points:21181505
Cells per refinement level:
    0    1288630
    1    713574
    2    4272674
    3    655949
    4    2893868
    5    1957223
    6    4728920
Writing mesh to time constant
[2] [5] [0] [1] [3] [4] 
[2] 
[2] --> FOAM FATAL IO ERROR: 
[2] error in IOstream "/home/engine/OpenFoam/pitzDaily/processor2/constant/polyMesh/faces" for operation Ostream& operator<<(Ostream&, const int32_t)
[2] 
[2] file: /home/engine/OpenFoam/pitzDaily/processor2/constant/polyMesh/faces at line 8023627.
[2] 
[2]     From function virtual bool Foam::IOstream::check(const char*) const
[2]     in file db/IOstreams/IOstreams/IOstream.C at line 96.
[2] 
FOAM parallel run exiting
[2] 

[4] 
[4] --> FOAM FATAL IO ERROR: 
[4] error in IOstream "/home/engine/OpenFoam/pitzDaily/processor4/constant/polyMesh/faces" for operation Ostream& operator<<(Ostream&, const int32_t)
[4] 
[4] file: /home/engine/OpenFoam/pitzDaily/processor4/constant/polyMesh/faces at line 5843580.
[4] 
[4]     From function virtual bool Foam::IOstream::check(const char*) const
[4]     in file db/IOstreams/IOstreams/IOstream.C at line 96.
[4] 
FOAM parallel run exiting
[4] 

[5] 
[5] --> FOAM FATAL IO ERROR: 
[5] error in IOstream "/home/engine/OpenFoam/pitzDaily/processor5/constant/polyMesh/faces" for operation Ostream& operator<<(Ostream&, const int32_t)
[5] 
[5] file: /home/engine/OpenFoam/pitzDaily/processor5/constant/polyMesh/faces at line 6500420.
[5] 
[5]     From function virtual bool Foam::IOstream::check(const char*) const
[5]     in file db/IOstreams/IOstreams/IOstream.C at line 96.
[5] 
FOAM parallel run exiting
[5] 

[3] 
[3] --> FOAM FATAL IO ERROR: 
[3] error in IOstream "/home/engine/OpenFoam/pitzDaily/processor3/constant/polyMesh/faces" for operation Ostream& operator<<(Ostream&, const char)
[3] 
[3] file: /home/engine/OpenFoam/pitzDaily/processor3/constant/polyMesh/faces at line 6586554.
[3] 
[3]     From function virtual bool Foam::IOstream::check(const char*) const
[3]     in file db/IOstreams/IOstreams/IOstream.C at line 96.
[3] 
FOAM parallel run exiting
[3] 

[0] 
[0] --> FOAM FATAL IO ERROR: 
[0] error in IOstream "/home/engine/OpenFoam/pitzDaily/processor0/constant/polyMesh/faces" for operation Ostream& operator<<(Ostream&, const char)
[0] 
[0] file: /home/engine/OpenFoam/pitzDaily/processor0/constant/polyMesh/faces at line 6511026.
[0] 
[0]     From function virtual bool Foam::IOstream::check(const char*) const
[0]     in file db/IOstreams/IOstreams/IOstream.C at line 96.
[0] 
FOAM parallel run exiting
[0] 

[1] 
[1] --> FOAM FATAL IO ERROR: 
[1] error in IOstream "/home/engine/OpenFoam/pitzDaily/processor1/constant/polyMesh/faces" for operation Ostream& operator<<(Ostream&, const char)
[1] 
[1] file: /home/engine/OpenFoam/pitzDaily/processor1/constant/polyMesh/faces at line 7810480.
[1] 
[1]     From function virtual bool Foam::IOstream::check(const char*) const
[1]     in file db/IOstreams/IOstreams/IOstream.C at line 96.
[1] 
FOAM parallel run exiting
[1] 
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 3 in communicator MPI_COMM_WORLD 
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
Practically, after the mesh is almost ready, it needs to read lines that do not exist in the specified files. What'up? What does create this problem?


here is the SnappyHexMeshDict file:


How could I find a solution, please??
Let me know if you need other outputs to investigate better, or could indicate me a possible solution?

Thanks in advance
enginpower is offline   Reply With Quote

Old   December 19, 2016, 00:13
Default
  #2
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi,

By any chance is the mesh in your parallel snappy a lot finer than the one in the single processor case?

If so, do you have sufficient space to perform IO operations in the drive where your case is located?

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   December 19, 2016, 04:02
Default
  #3
Member
 
power
Join Date: Jun 2014
Posts: 86
Rep Power: 11
enginpower is on a distinguished road
Quote:
Originally Posted by Antimony View Post
is the mesh in your parallel snappy a lot finer than the one in the single processor case?

Sorry, but how to set that?

Quote:
Originally Posted by Antimony View Post
do you have sufficient space to perform IO operations in the drive where your case is located?
Yes, I do. Actually I've already checked this.

By the way, here is the file SnappyHexMeshDict: snappyHexMeshDict.txt

Thanks a lot
enginpower is offline   Reply With Quote

Old   December 19, 2016, 08:44
Default
  #4
Member
 
power
Join Date: Jun 2014
Posts: 86
Rep Power: 11
enginpower is on a distinguished road
Anyway, even if you cannot help me to get the solution,
could you provide me some papers where it is easy to find an explanation of all functions that could be found in a snappyHexMeshDict file?

The common documentation in OpenFOAM website is so bare of descriptions and examples, that is so difficult to understand, especially for more particular meshes.

Thanks a lot
enginpower is offline   Reply With Quote

Old   December 19, 2016, 19:30
Default
  #5
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi,

Perhaps I should have phrased my question better: You mentioned that snappy works when you mesh in serial correct? And it seems to not work (giving the error messages) when you run it in parallel. Correct? So why is it that you want to mesh in parallel? Is it because the mesh that you plan to generate in parallel is a lot finer than the one on serial? Taking a look at the log file though it doesn't seem to be the case, so this question might be moot.

I noticed that you are doing the addLayers part as well. Perhaps the issue comes from there? One thing you can try is to set castellatedMesh and snap to 'true' and addLayers to 'false' and then see if you face the same problem.

The second part, on the reference for snappy is here: http://openfoamwiki.net/images/f/f0/...SlidesOFW7.pdf

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   December 20, 2016, 11:24
Default
  #6
Member
 
power
Join Date: Jun 2014
Posts: 86
Rep Power: 11
enginpower is on a distinguished road
Thank you so much for your reply.
Trying and trying I think I'll get soon the solution.

Actually I'd already read that paper but not all was clear. Maybe you can clarify the more important doubts about that. Sorry if I'm long and boring.

Anyway, in the Castellated sub-dict they are:
  • maxGlobalCells: if I have a 30GB of RAM, what is the maximum I can set? What happens if my mesh need more cells?
  • minRefinemntCells: this is not clear! It is the min number of cell to use where? Surfaces? All those composing the solid? Even if it is complex?
  • nCellsBetweenLevels: which levels? how levels are defined?
  • features(): if I have a complex object, exported from a CAD in STL, how to find and specify a refinement option for a specific edge?
  • refinementSurfaces: the same question of the previous option. How to set a patch name on an STL model? I have to do that on the CAD I modelled the solid? Or how? This is very important to set the mesh resolution on a surface but it is not clear how. If you can specify a tutorial just for this, you'll be great!
  • allowFreeStandingZoneFace: if set to true, then is it possible to have separated and meshed part of the solid? If yes, it created problem for CFD cases? Right? When will be usefull?
About the snapping process:
  • tolerance: value to consider is ever in m? So if I have a model that is about 20mm maximum and a thickness of 0.001mm (=1micrometer), I should consider a very very low value? Which one?
  • nSolveIter, nRelaxIter, nFeatureSnapIter : which values to set for that if I have solid with small dimensions?Or big?
For my starting point they could be enough for now. Thanks in advance if you want to answer to these issues.

Actually I have a lot of other questions, but this will be future questions


Thanks again
enginpower is offline   Reply With Quote

Old   December 22, 2016, 04:24
Default
  #7
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi,

I am no expert in sHM but will try to answer some of your questions based on my understanding:

Quote:
maxGlobalCells: if I have a 30GB of RAM, what is the maximum I can set? What happens if my mesh need more cells?
I think, and I could be wrong here, the correspondence is roughly 1:1. Mesh of 1million cells needs 1GB of RAM or thereabouts. If you need more cells, but don't have access to a more powerful computer, you will need to look at creative ways to get the mesh with desired resolutions in certain areas by splitting into blocks, refining one of the blocks perhaps, then merging and stitching them together.

Quote:
minRefinemntCells: this is not clear! It is the min number of cell to use where? Surfaces? All those composing the solid? Even if it is complex?
This, to the best of my knowledge determines if sHM has to continue performing the refinement operation (surface and region). Set it too low and then you will spend way too much time refining a very small number of cells. Set it too high then you will probably not be able to get the desired level of refinement. If the number of cells is below minRefinementCells, then snappy will stop the refinement process and go to the next stage.

Quote:
nCellsBetweenLevels: which levels? how levels are defined?
If you have a region that has no refinement and then a region where you have specified a refinement level of say 3, then if nCellsBetweenLevels is 0, there will be a significant jump in the cell sizes suddenly. What this tries to do is to offer a kind of "buffer layer" if you like so that the transition is not as sudden. Levels, again to the best of my knowledge, are based on what you set. If you don't set any, should be 0.

Quote:
features(): if I have a complex object, exported from a CAD in STL, how to find and specify a refinement option for a specific edge?
Maybe you can play around with the includedAngle in the surfaceFeatureExtractDict and one of the values will let you separate out the edges the way you want it to?

Quote:
refinementSurfaces: the same question of the previous option. How to set a patch name on an STL model? I have to do that on the CAD I modelled the solid? Or how? This is very important to set the mesh resolution on a surface but it is not clear how. If you can specify a tutorial just for this, you'll be great!
I am not sure what exactly you mean: do you mean setting a name for the entire STL file? Or do you want have different parts in a single STL file and you want to name each part separately? If it is the first, then it should be straightforward, simply setting the name when you specify the STL file in the geometry block of the snappyHexMeshDict.

If it is the second, that too is doable. I have an exporter for OF that reads your STL file (ASCII format only!) and does this. Take a look at it here: https://github.com/venugopalansgr/OpenFOAM

That is about all the questions of yours on sHM that I can answer.

Hope it helps.

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   December 28, 2016, 09:51
Default
  #8
Member
 
power
Join Date: Jun 2014
Posts: 86
Rep Power: 11
enginpower is on a distinguished road
@Antimony,
thanks so much for your explanations

You answered to most of issues but not all it is clear.
You explained using what it is easy to find on OpenFOAM guide, and I appreciate you, but to be clearer we should use an example.
Let's watch this image:
Image.jpg
It has a cylindrical shape with the written dimensions.
Consider to create a finer mesh in the narrowing, to manage adequately the reduction of the diameter and to set the surface refinement for the inlet and outlet surfaces.
The walls with the red lines need the boundary layers, let's say starting from 0.3mm to 1mm with a growing power of 1.5.

So to do that, how do you define all parameters I asked? Do you create different STL files? One for constant diameter inlet and one for outlet? Two separate parts for the reductions and the narrowing? Or what? How do you manage all them in all files (snappyHexMesh, blockMeshDict, surfaceExtractionDict, etc...)?
I will appreciate a lot if you try to explain all the procedure to get that cylinder shape meshed

Thanks a lot
enginpower is offline   Reply With Quote

Old   December 30, 2016, 08:19
Default
  #9
Member
 
power
Join Date: Jun 2014
Posts: 86
Rep Power: 11
enginpower is on a distinguished road
Or more useful could be an explanaition for this case: https://www.cfd-online.com/Forums/me...pyhexmesh.html

Thanks again
enginpower is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM Training Beijing 22-26 Aug 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 May 3, 2016 04:57
[OpenFOAM.org] A Mac OS X of23x Development Environment Using Docker rt08 OpenFOAM Installation 1 February 28, 2016 19:00
OpenFOAM Training: Programming CFD Course 12-13 and 19-20 April 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 January 14, 2016 10:19
OpenFOAM Foundation releases OpenFOAM 2.2.2 opencfd OpenFOAM Announcements from ESI-OpenCFD 0 October 14, 2013 07:18
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 06:25


All times are GMT -4. The time now is 16:22.