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] Trouble with blockMesh (https://www.cfd-online.com/Forums/openfoam-meshing/61763-trouble-blockmesh.html)

kupiainen April 14, 2005 16:30

Trouble with blockMesh
 
I have a good and kosher blockMeshDict, which describes my mesh. I have doubled the number of grid points in all directions, and blockMesh works fine. Now I wanted to make another doubling of grid points, and tried to run blockMesh, but got the following cryptic message and the program died:
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.0.2 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : /afs/nada.kth.se/home/nada/marcok/OpenFOAM/OpenFOAM-1.0.2/applications/
bin/linuxIA64I64Opt/blockMesh . base3
Date : Apr 14 2005
Time : 16:35:47
Host : h05n23.pdc.kth.se
PID : 869
Root : /afs/nada.kth.se/home/nada/marcok/prj00
Case : base3
Nprocs : 1
Create database


Reading block mesh description dictionary

Creating block mesh

Creating blockCorners

Creating curved edges

Creating blocks

Creating patches

Creating block mesh topology

Default patch type set to empty

Check block mesh topology

Basic statistics
Number of internal faces : 101
Number of boundary faces : 50
Number of defined boundary faces : 50
Number of undefined boundary faces : 0

Checking patch -> block consistency

Creating block offsets

Creating merge list .

Creating points

Creating cells

Creating patches

Creating mesh from block mesh

Default patch type set to empty



What can be the problem? Is there some limitation?
best regards

mattijs April 15, 2005 06:22

What is your cryptic message?
 
What is your cryptic message? All seems ok. Does it core dump and if so what if you compile blockMesh with debugging and traceback in a debugger?

kupiainen April 15, 2005 07:40

It does not core dump. In fact
 
It does not core dump. In fact the trouble is that there is no output i.e. no grid. It seems that everything is fine, but still no grid. By the way the gridsize will be something around 8 million cells, can this cause problems?

henry April 15, 2005 07:42

Are you running 32bit or 64bit
 
Are you running 32bit or 64bit? You can't generate 8e6 cells with only 32bit addressing, the maximum is about 2e6 but you can with 64bit.

kupiainen April 15, 2005 07:56

How do I check if I'm running
 
How do I check if I'm running 32bit or 64bit? The machine sure supports 64bit, but I'm not sure if I compiled the code with the right flags.

henry April 15, 2005 08:06

There is an optional environme
 
There is an optional environment variable to switch between 32bit and 64bit on machines that support both, $WM_64, which is documented in the README file. What do you have it set to? If you have it set and you are on an AMD64 machine $WM_OPTIONS will be linuxAMD64Opt otherwise it will be linuxOpt and you are running 32bit.

kupiainen April 15, 2005 09:51

I'm running 64bit, since sete
 
I'm running 64bit, since
setenv WM_64 yes
and
echo $WM_OPTIONS
linuxIA64I64Opt.

I have only one time directory 0.075 present, does this have to be named 0?

henry April 15, 2005 11:13

No there is nothing fundamenta
 
No there is nothing fundamental about the 0 directory unless you have specified in the controlDict that the code will start from time 0.

kupiainen April 18, 2005 05:40

Now I understand, why the prog
 
Now I understand, why the program crashes...
I have 8GB of memory available, and blockMesh requires more for 8million cells. Is there a parallell blockMesh?
This would mean that 1cell = 1000B, is this really reasonable?

eugene April 18, 2005 06:26

Does this include swap space?
 
Does this include swap space? If you have a 64-bit machine, simply increase your swap. Running blockMesh might take a bit longer, but you shouldn't have memory problems.

In any case, blockMesh uses less than 1kB per cell (~750 bytes when I last checked), so your problem might be elsewhere. Even if it was a memory issue, you would get an error message stating this. The fact that the code exits without any warnings or errors messages is HIGHLY unusual.

Make sure you execute "ulimit -c unlimited" in your login shell, run the code again and check whether it has generated a core dump. I dont even want to begin to speculate what could cause a crash with no error message or core dump.

For the record, I have generated 32 million cell blockMeshes without any problems.

There is no parallel blockMesh. As to why it uses so much memory, the source code is in OpenFOAM-1.1/applications/utilities/mesh/generation/blockMesh/
I'm sure you could significantly reduce the memory overhead if you were prepared to live without some of the built in checks.

hjasak September 1, 2005 13:53

Hi, I've seen and fixed thi
 
Hi,

I've seen and fixed this before - it is a silly error in mesh reference setup on creation of mesh modifiers. Not sure why it didn't make it into the release...

However, the fix (compared to the 1.2 release) is a bit spread out so I've no idea how to pass it over short of packing up several libraries that you would have to compile locally (I suspect this will turn up more often with multiple mesh modifiers).

By the way, is the mesh itself any use to you (that's easy to E-mail across) or were you after something more complex?

Hrv

hjasak September 1, 2005 14:01

Forgot to say: - Rolando, y
 
Forgot to say:

- Rolando, you should really define the outside patches, otherwise the complete outside surface endds up in a patch of type empty by default, which is no too healthy.

- for all those out there looking at the mesh using paraFoam, the wiggly lines at the block boundaries are not real. The cells are actually rpoper polyhedral but paraview cannot deal with them so they need to be decomposed into "allowed" shapes on the fly

- dxFoam does not have this problem = you only get the real mesh lines. Also, if I remember correctly, the version of dxFoam I've sent out for foam-1.1 works OK with the new version as well.

Enjoy,

Hrv

rolando September 1, 2005 14:14

Hi Hrvoje, I tried to create
 
Hi Hrvoje,
I tried to create a mesh, thatīs a little bit more complex and there I encountered the problem. The case above is just a simplification, that Iīve chosen to shortly place the problem in the discussion group.
Would it be possible to get the fix? And would it be possible for me to handle it?
Do you have any other ideas, how I can overcome that problem? I tried several things, as creating each mesh block separately and merging them by "mergeMeshes". But I didnīt meet with success.

Regards
Rolando

rolando September 1, 2005 14:19

I was to slow for your second
 
I was to slow for your second message.
Thanks for the hint.
I left the outside patches in the above example to keep it short. In my real (complexer) mesh I use them.

hjasak September 1, 2005 17:30

All I can offer is access to m
 
All I can offer is access to my development version, pending the inclusion of bug fixes into the release.

Apologies,

Hrv

ali September 1, 2005 19:11

I have made a variable mesh, t
 
I have made a variable mesh, two-patch cavity case, the left and right patches have different number of grids. It doesn't give acceptable results, even if I set the left and right grids the same resolution.

What I have done wrong? I appreciate any help.

http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif cavityVarMesh.tar.gz

mattijs September 1, 2005 23:29

Hi Rolando, I tried your bl
 
Hi Rolando,

I tried your blockMeshDict and it works fine in 1.2, also under valgrind. Are you running 1.2?

rolando September 2, 2005 02:56

Thanks Hrvoje, Iīd be gratefu
 
Thanks Hrvoje,
Iīd be grateful, if you can make me accessible your version.

Hi Mattijs,
Iīm still running 1.1, because I donīt get the 1.2 version running on my machine. My linux version doesnīt provide the proper glibc. I tried to compile OpenFOAM yesterday, but I didnīt succeed so far.

Rolando

hjasak September 2, 2005 08:50

Dear Ali, Ias I have suspec
 
Dear Ali,

Ias I have suspected, there is absolutely nothing wrong with the code (again!). Attached is the image of the solution from your case

http://www.cfd-online.com/OpenFOAM_D...ges/1/1060.jpg

Could you please have a careful look at it and tell me precisely why you think there is something strange about it. Also, please note that the case runs out of box exactly as you have provided it; the only difference is that it converges in about 10 s simulation time rather than the 0.5 s in the tutorial.

May I also suggest much more care if in the future you decide to report problems with the code - reporting issues that are not there or are a result of poor setup or understanding leaves a bad image of the code which it does not deserve (wastes my time as well!)

Regards,

Hrv

rolando September 2, 2005 13:00

Dear Hrvoje, dear Mattijs, th
 
Dear Hrvoje, dear Mattijs,
thanks for your help. I got version 1.2 running on my machine. Now the mesh generation seems to work fine.

Rolando

ali September 2, 2005 13:27

Dear Hrv, Thanks very much
 
Dear Hrv,

Thanks very much for your time. I didn't say there is something wrong with the code, I just wanted to know what I had done wrong in setting up the boundaries or patches etc. Now, I see my problem was that I expected the code to converge much sooner (the same oder of the basic case 0.5 sec).

So, the thing I learned here is that in cases that we have patch merging and stuff, it may result in run times much higher than the base case. Ok, now I got it, thank you again for teaching me this.

Best Regards.

arno March 10, 2006 09:52

Is blockMesh limited to 4 GB o
 
Is blockMesh limited to 4 GB of memory?

I ran into the same trouble, blockMesh simply crashes or is crashed by the OS, when I try to generate a mesh with 6 million cells. blockMesh works up to 3.7 Mcells, which translates into about 4 GB of memory required during the run. Beyond that, everything runs and then suddenly, there is just a message:

Killed

and no mesh nor error messages are generated.

The platform is LinuxAMD64Opt, i.e. 64-bit, so the memory limitation should not be in effect. However, is blockMesh maybe compiled as a 32-bit application nevertheless?


ArNO
2

PS: Could the list administrator check my account, since I get every message twice. This is probably due to my presence on this mailing list since the year 0 or 1. When I resubscribed in order to be able to send messages through this new web interface instead of e-mail, I get everything doubled since then.

mattijs March 11, 2006 03:19

There is no limit in blockMesh
 
There is no limit in blockMesh.

Do an ldd on the blockMesh executable. Check which libraries it uses. Are they all 64 bit? Check with the 'file; command.

arno March 11, 2006 09:50

Yes, they are all 64-bit. H
 
Yes, they are all 64-bit.

However, there _is_ a limitation nevertheless: the amount of RAM + virtual memory on the machine, that runs blockMesh ;).

When it was running, I only looked a the amount of RAM it needed, not how much swap it also consumes. It turned out the machine in question has only 2 GB of swap + 4 GB of RAM and this was not enough to create a mesh with more than 3,7 million cells. The operating system shoots down processes trying to go past its max. virtual memory space, that's where the "Killed" came from.

The solution was to find another machine with more memory. Then it worked just as it should have and I got a mesh created.

BTW, this is actually a bit problematic, since meshing the problem takes much more memory than actually running it. This is because the run can be broken up to several CPU-nodes distributing also the memory requirements, while blockMesh is a single threaded application, that needs all the memory in one machine.

ArNO
2

musahossein September 24, 2008 10:49

Gentlemen: I am running the
 
Gentlemen:

I am running the following block mesh file. It is a variation of the dambreak problem without the obstacle. However I get an error stating that 2 faces are missing.

Any suggestions will be appreciated.

The blockmesh output is:
*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.5 |
| \ / A nd | Web: http://www.OpenFOAM.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/
Exec : blockMesh
Date : Sep 24 2008
Time : 10:39:15
Host : linux-ip9p
PID : 3868
Case : /home/musa/OpenFOAM/musa-1.5/run/tutorials/interFoam/damBreaktest
nProcs : 1

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time


Reading block mesh description dictionary

Creating block mesh

Creating blockCorners

Creating curved edges

Creating blocks

Creating patches

Creating block mesh topology

Default patch type set to empty
--> FOAM Warning :
From function polyMesh::polyMesh(... construct from shapes...)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 576
Found 2 undefined faces in mesh; adding to default patch.

Check block mesh topology

Basic statistics
Number of internal faces : 0
Number of boundary faces : 6
Number of defined boundary faces : 6
Number of undefined boundary faces : 0

Checking patch -> block consistency

Creating block offsets

Creating merge list .

Creating points

Creating cells

Creating patches

Creating mesh from block mesh

Default patch type set to empty

Writing polyMesh

end

The input file is:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.5 |
| \ / A nd | Web: http://www.OpenFOAM.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.01;

vertices
(
(0 0 0)
(14 0 0)
(14 0 0.1)
(0 0 0.1)
(0 10 0)
(14 10 0)
(14 10 0.1)
(0 10 0.1)
);

blocks
(
hex (0 1 5 4 3 2 6 7) (140 100 1) simpleGrading (1 1 1)
);

edges
(
);

patches
(
wall leftWall
(
(0 3 7 4)
)
wall rightWall
(
(1 2 6 5)
)

wall lowerwall
(
(0 1 2 3)
)

patch atmosphere
(
(4 5 6 7)
)
);

mergePatchPairs
(
);

// ************************************************** *********************** //

alexm September 24, 2008 20:14

is seems that you have forgott
 
is seems that you have forgotten to define the patches of the type "empty" for the front and back side of a 2 dimensional mesh.

Furthermore the numbering of the vertices is a little confusing. How OpenFOAM handles this, is described in the user manual:
http://www.opencfd.co.uk/openfoam/doc/blockMesh.html

OpenFOAM is very strict with numbers and directions of the entities.

Hope that helps.

Good night, Axel

musahossein September 24, 2008 21:13

Axel: Got it. Many thanks f
 
Axel:

Got it. Many thanks for your help.

Musa

emilianyassenov November 4, 2008 11:18

I want to make simple model bu
 
I want to make simple model but I have some error in that


Creating block mesh topology
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 134
zero or negative pyramid volume: -0.000833333 for face 0
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 134
zero or negative pyramid volume: -0.000833333 for face 1
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 134
zero or negative pyramid volume: -0.000833333 for face 2
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 134
zero or negative pyramid volume: -0.000833333 for face 3
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 134
zero or negative pyramid volume: -0.000833333 for face 4
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 134
zero or negative pyramid volume: -0.000833333 for face 5
--> FOAM Warning :
From function blockMesh::createTopology(IOdictionary&)
in file createTopology.C at line 412
negative volume block : 0, probably defined inside-out


can someone help me?

thanks in advnace...

Emo

emilianyassenov November 4, 2008 11:20

and my blockMeshDict file look
 
and my blockMeshDict file looks like

convertToMeters 1;

vertices
(
(0 -0.05 0)
(0 0 0.05)
(0 0.05 0)
(0 0 -0.05)
(1 -0.05 0)
(1 0 0.05)
(1 0.05 0)
(1 0 -0.05)
);

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

);

edges
(
arc 0 1 (0 -0.03536 0.03536)
arc 1 2 (0 0.03536 0.03536)
arc 2 3 (0 0.03536 -0.03536)
arc 3 0 (0 -0.03536 -0.03536)
arc 4 5 (1 -0.03536 0.03536)
arc 5 6 (1 0.03536 0.03536)
arc 6 7 (1 0.03536 -0.03536)
arc 7 4 (1 -0.03536 -0.03536)
);
patches

(
wall fixedWalls
(
(0 4 5 1)
(1 5 6 2)
(2 6 7 3)
(3 7 4 0)
)

patch inlet

(
(0 1 2 3)
)

patch outlet

(
(4 5 6 7)
)
);

mergePatchPairs
(
);

thanks again

Emo

emilianyassenov November 5, 2008 02:16

can anybody help me? I m quit
 
can anybody help me?
I m quite new in OpenFoam

thanks

Emo

mattijs November 5, 2008 02:56

Your point ordering is probabl
 
Your point ordering is probably wrong. Have a look at the cavity tutorial and table 5.1 in the user guide.

emilianyassenov November 5, 2008 03:10

thanks Mattijs I have look
 
thanks Mattijs

I have looked several times and rearrange it but it does not work...http://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif

emilianyassenov November 5, 2008 03:46

Anyone can see the mistake...
 
Anyone can see the mistake...
I have to finish it till afternoon...
please help me

EMO

emilianyassenov November 5, 2008 05:09

convertToMeters 1; vertices
 
convertToMeters 1;

vertices
(
(-0.5 -0.05 0)
(-0.5 0 0.05)
(-0.5 0.05 0)
(-0.5 0 -0.05)
(0.5 -0.05 0)
(0.5 0 0.05)
(0.5 0.05 0)
(0.5 0 -0.05)
);

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

);

edges
(
arc 0 1 (-0.5 -0.03536 0.03536)
arc 1 2 (-0.5 0.03536 0.03536)
arc 2 3 (-0.5 0.03536 -0.03536)
arc 3 0 (-0.5 -0.03536 -0.03536)
arc 4 5 (0.5 -0.03536 0.03536)
arc 5 6 (0.5 0.03536 0.03536)
arc 6 7 (0.5 0.03536 -0.03536)
arc 7 4 (0.5 -0.03536 -0.03536)
);
patches

(
wall fixedWalls
(
(2 6 5 1)
(1 5 4 0)
(0 4 7 3)
(3 7 6 2)
)

patch inlet

(
(0 1 2 3)
)

patch outlet

(
(4 5 6 7)
)
);

mergePatchPairs
(
);
I have changed it like this but I had same warning like

Creating block mesh topology
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 134
zero or negative pyramid volume: -0.000833333 for face 0
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 134
zero or negative pyramid volume: -0.000833333 for face 1
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 134
zero or negative pyramid volume: -0.000833333 for face 2
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 134
zero or negative pyramid volume: -0.000833333 for face 3
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 134
zero or negative pyramid volume: -0.000833333 for face 4
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 134
zero or negative pyramid volume: -0.000833333 for face 5
--> FOAM Warning :
From function blockMesh::createTopology(IOdictionary&)
in file createTopology.C at line 412
negative volume block : 0, probably defined inside-out

please someone help me fixed this problem

thanks Emo

gschaider November 5, 2008 06:31

Hi Emo! I don't know for su
 
Hi Emo!

I don't know for sure (I only checked the blockMesh with pyFoamDisplayBlockmesh, it looks topological OK there), but the problem might be that you're trying to build a tube with a single block, which distorts the cells on the "corners" quite heavily.
Try commenting out the arcs and rerun blockMesh. If it doesn't complain then that is surly the problem. Another way of finding the problem might be looking at the mesh in paraFoam (blockMesh issued only warnings, so it should habe produced a polyMesh.

But the best guess would be to make a 5-blocks mesh like it is described in
http://www.cfd-online.com/OpenFOAM_D...es/1/3249.html
The mesh quality is superior to anything you could achieve with your approach

Bernhard

emilianyassenov November 5, 2008 07:26

thank you very much Bernhard..
 
thank you very much Bernhard...
I have change the fixed walls and it is OK now but after running parafoam I saw that only two blocks are meshed. the solver after a while stopping
what do you think I should do it with 4 blocks?

Thank you again

Emo

cedric_duprat November 5, 2008 08:52

Hi Emilian, Usually to mesh
 
Hi Emilian,

Usually to mesh a pipe, we use 5 blocks.
You can find some example (and blockMeshDict) in the turbomachinery SIG : http://openfoamwiki.net/index.php/Si...nical_diffuser
I hope it will help,

Cedric

emilianyassenov November 5, 2008 09:31

Thanks Cedic
 
Thanks Cedic

nandiganavishal January 10, 2009 17:37

http://www.cfd-online.com/Open
 
http://www.cfd-online.com/OpenFOAM_D...your_image.gif

nandiganavishal January 10, 2009 17:38

The shape is the same.. bu
 


The shape is the same.. but the dimensions are

2 Vertical blocks 1m * 1m and the horizontal block is 5m * 0.03 m


All times are GMT -4. The time now is 17:21.