CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [blockMesh] blockMesh breaks down when handling with huge grid numbers (https://www.cfd-online.com/Forums/openfoam-meshing/173436-blockmesh-breaks-down-when-handling-huge-grid-numbers.html)

Democritus June 19, 2016 23:08

blockMesh breaks down when handling with huge grid numbers
 
Hello Foamers~!

Here I met a serious problem: when i want to generate a mesh with grid number of 1e8, blockMesh just breaks down. Here is my mesh dict:
Code:

vertices
(
    (0    0    0)        //0
    ($Lx  0    0)        //1
    ($Lx  $Ly  0)        //2
    (0    $Ly  0)        //3
    (0    0    $Lz)      //4
    ($Lx  0    $Lz)      //5
    ($Lx  $Ly  $Lz)      //6
    (0    $Ly  $Lz)      //7
);

blocks
(
  hex ( 0 1 2 3 4 5 6 7 ) (10000 10000 1) simpleGrading (10 10 1)
);

Is there a way to deal with that problem? Thanks!

akidess June 20, 2016 09:15

"Breaks down" is a very unspecific description. I'd blame your memory.

jherb June 20, 2016 15:26

Just a complete shot in the dark: Did you compile OpenFOAM with 32 or 64 bit label size?

see e. g. http://openfoamwiki.net/index.php/Label and https://github.com/OpenFOAM/OpenFOAM...etc/bashrc#L81

Democritus June 20, 2016 22:32

Quote:

Originally Posted by akidess (Post 605714)
"Breaks down" is a very unspecific description. I'd blame your memory.

Thank you very much for your attention on my problem:)
I now describe my situation in more details:
As you predicted, the memory ran out quickly and the hard disk was busy. Then the program do not response any more and I have to shut it down forcely. I think blockMesh generates the mesh information all in memory and do not write to disk until finished computing. So the memory become the bottleneck of my system.

Here is my idea about how to solve it:
1. generate the coarse mesh
2. use multi-thread tool in order to decompose the mesh to different sub mesh
3. refine every sub meshes in parallel

Would you please give me some advices about how to make it?
Thanks very much!

Democritus June 20, 2016 22:38

Quote:

Originally Posted by jherb (Post 605767)
Just a complete shot in the dark: Did you compile OpenFOAM with 32 or 64 bit label size?

see e. g. http://openfoamwiki.net/index.php/Label and https://github.com/OpenFOAM/OpenFOAM...etc/bashrc#L81

Thank you very much for your attention on my problem:)
I work with ubuntu 16.04 and I installed OpenFOAM by the apt command. So I think my label set is the default value:(

Is there a way to install OpenFOAM with label value equaling to 64 by apt command?

Thank you very much!

akidess June 21, 2016 01:58

Yes, you can go that way. Some ideas here:
http://www.cfd-online.com/Forums/ope...eneration.html

Quote:

Originally Posted by Democritus (Post 605818)
Thank you very much for your attention on my problem:)
I now describe my situation in more details:
As you predicted, the memory ran out quickly and the hard disk was busy. Then the program do not response any more and I have to shut it down forcely. I think blockMesh generates the mesh information all in memory and do not write to disk until finished computing. So the memory become the bottleneck of my system.

Here is my idea about how to solve it:
1. generate the coarse mesh
2. use multi-thread tool in order to decompose the mesh to different sub mesh
3. refine every sub meshes in parallel

Would you please give me some advices about how to make it?
Thanks very much!


Democritus June 21, 2016 23:32

Quote:

Originally Posted by akidess (Post 605828)
Yes, you can go that way. Some ideas here:
http://www.cfd-online.com/Forums/ope...eneration.html

Dear akidess,
I have tried the 3-step-Meshing:
1. blockMesh a coarse mesh and topoSet a cellSet
2. decomposePar for making it ready for parallel processing
3. mpirun -np 8 refineMesh -overwrite -parallel
This works fine until the memory bottleneck was met:(
Now it comes to me a idea that if i can refineMesh one subMesh by one subMesh. I mean, if it is possible that i refine one subMesh once but still parallelly. I guess if the meshing domain could be limited to one subMesh and exploited all cpu cores' power, then the memory needed is affordable for me and the performance is ok.

akidess June 23, 2016 02:39

If you run on a single node, of course running in parallel will not gain you anything in terms of memory. If you don't have more than a single node, you are out of luck I think. Yeah, you can mesh subdomains separately and then stich, but you'll probably still dump once you stitch and get the large mesh, or finally when you attempt to solve.

Democritus July 4, 2016 21:09

Quote:

Originally Posted by akidess (Post 606188)
If you run on a single node, of course running in parallel will not gain you anything in terms of memory. If you don't have more than a single node, you are out of luck I think. Yeah, you can mesh subdomains separately and then stich, but you'll probably still dump once you stitch and get the large mesh, or finally when you attempt to solve.

Thank you~! I am trying to use other way like mesh grading to solve the problem.:D


All times are GMT -4. The time now is 08:57.