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

[blockMesh] Errors during blockMesh meshing

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 8, 2011, 11:10
Default Errors during blockMesh meshing
  #1
New Member
 
Madeleine P. Vincent
Join Date: May 2011
Posts: 29
Rep Power: 15
Madeleine P. Vincent is on a distinguished road
Hi all,

I have a blockMeshDict file that I can't seem to get to mesh correctly. I have verified all the vertices, blocks, patches, etc.

Can someone help me track down the error in my ways?

The file is attached.

Thanks for your help,
Maddie.
Attached Files
File Type: txt blockMeshDict.txt (6.1 KB, 555 views)
Madeleine P. Vincent is offline   Reply With Quote

Old   September 8, 2011, 12:04
Default
  #2
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22
MartinB will become famous soon enough
Hi Madeleine,

the problem with mergePatchPairs is, that after merging the first two patches, no other patch to be merged should be adjacent to the already merged ones.

One solution is to define three blocks instead of one big block which must be merged. So all in all you should add six additional blocks. This would be my preferred solution.

A minor saving can be achieved by only adding two blocks in x-direction and two mergePatchPairs entries for the upper and the lower part of your geometry.

The rest of your definitions is fine...

Martin
MartinB is offline   Reply With Quote

Old   September 9, 2011, 10:27
Default
  #3
New Member
 
Madeleine P. Vincent
Join Date: May 2011
Posts: 29
Rep Power: 15
Madeleine P. Vincent is on a distinguished road
Martin,

thank you very much for your reply.

I am trying to make sure that I understand exactly what you are saying.

In the file that I uploaded, the problem is due to the fact the master_pole_right and master_pole_near patches (which are to be merged) touch at one point.

[The same problem exists for the master_pole_right and master_pole_far].

If there is a patch to be merged, it cannot touch any other merged patches, regardless of whether the two patches are parallel and touch at or point, or if they are perpendicular (or any other angle).

And your suggestion is to cut the 3 large blocks into 4 small blocks each, with each small block directly interfacing (1 to 1) with the blocks adjacent to it. In this way, there is no merging of patches needed.

Is that correct?

It seems like a fairly big drawback of the merge patches functionality. This limits the use of merging, and leads to a lot of extra blocks. I am sure there is a good reason...

Again, thanks for your help.

Maddy.
Madeleine P. Vincent is offline   Reply With Quote

Old   September 9, 2011, 13:43
Default
  #4
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22
MartinB will become famous soon enough
Hi Maddy,

yes, it is correct, a possible topology is shown in the attachment.

Martin
Attached Images
File Type: jpg maddyBlocks.jpg (19.5 KB, 691 views)
MartinB is offline   Reply With Quote

Old   September 14, 2011, 05:56
Default
  #5
New Member
 
Madeleine P. Vincent
Join Date: May 2011
Posts: 29
Rep Power: 15
Madeleine P. Vincent is on a distinguished road
Martin,

OK - I understand. Thanks again for your help.

Madeleine.
Madeleine P. Vincent is offline   Reply With Quote

Old   November 9, 2011, 12:30
Default
  #6
New Member
 
Elia Daniele
Join Date: Mar 2010
Location: Oldenburg
Posts: 21
Rep Power: 16
fakekarma is on a distinguished road
Hallo Martin,
I've experienced the same problem with my case, anyway I can't find a solution to avoid the usage of "mergePatchPairs" with my blockMeshDict that I've attached here.

Whene you say "the problem with mergePatchPairs is, that after merging the first two patches, no other patch to be merged should be adjacent to the already merged ones" do you mean that there is no solution at all with "mergePatchPairs"?

Hope that you can help me,

Best regards,

Elia
Attached Files
File Type: txt blockMeshDict.txt (23.9 KB, 145 views)
fakekarma is offline   Reply With Quote

Old   November 9, 2011, 14:22
Default
  #7
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22
MartinB will become famous soon enough
Hi Elia,

there is no mergePatchPairs necessary for your mesh. You must use the vertices "multiple" times, i.e. they belong to more than just one block.

The attached blockMeshDict contains the necessary changes and some comments... I left the redundant vertices in place, but you can drop them in your next blockMeshDict.

Oh, you must define the frontAndBack plane as "patch" with boundary condition slip if you want to have a 3D mesh. You can use the "empty" patch only if you define a pure 2D mesh, i.e. one cell in Y direction.

Martin
Attached Files
File Type: gz blockMeshDict.tar.gz (4.2 KB, 89 views)
MartinB is offline   Reply With Quote

Old   November 9, 2011, 14:30
Default
  #8
New Member
 
Elia Daniele
Join Date: Mar 2010
Location: Oldenburg
Posts: 21
Rep Power: 16
fakekarma is on a distinguished road
Dear Martin,

I've just thought the same thing during the last hour and I switch to a faceMathing approach as you have described, so at least I'm sure now that every possible try has been made. I've attached my modified blockMeshDict here.

Thanks again for your soon and precise answer,

Best regards,

Elia
Attached Files
File Type: txt blockMeshDict.txt (24.4 KB, 52 views)
fakekarma is offline   Reply With Quote

Old   November 17, 2011, 11:44
Default Help with an error
  #9
New Member
 
Robert Newsom
Join Date: Nov 2011
Posts: 3
Rep Power: 15
58alvareznew is on a distinguished road
Hi Martin,

I am currently a new user to openfoam. I am trying edit a blockMesh file the graded cavity example given with the package. Originally it was a 2x2 and I was trying to create a 3x3. When I run blockMesh from the terminal window I get this error:

FOAM Warning :
From function bool Foam::blockMesh::blockLabelsOK(...)
in file blockMesh/blockMeshCheck.C at line 179
out-of-range point label 16 (max = 15) in block 0

Your help would be much appreciated. Attached is the blockMesh file if this may help.

Thanks, Robert Newsom
Attached Files
File Type: txt blockMeshDict.txt (2.8 KB, 46 views)
58alvareznew is offline   Reply With Quote

Old   November 17, 2011, 12:07
Default
  #10
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22
MartinB will become famous soon enough
Hi Robert,

if you want to introduce more blocks, you must add appropriate vertices, too. In your blockMeshDict you have only 16 vertices defined in the "vertices" section, but you are using vertex numbers up to 31 in your block definitions.

You see the problem?

Martin
MartinB is offline   Reply With Quote

Old   November 17, 2011, 14:30
Default
  #11
New Member
 
Robert Newsom
Join Date: Nov 2011
Posts: 3
Rep Power: 15
58alvareznew is on a distinguished road
Thank You Martin. I guess I forget to add athe appropriate corresponding z values.
58alvareznew is offline   Reply With Quote

Old   November 17, 2011, 23:27
Default Project Help
  #12
New Member
 
Robert Newsom
Join Date: Nov 2011
Posts: 3
Rep Power: 15
58alvareznew is on a distinguished road
Hi Martin,

I am a student and college and I was asked to make CFD models for my senior design project. I have never done any modeling before this is my first time. I am trying to make a model and examine how the air flow through a diffuser changes. I have looked at the manuel on the openfoam website and it is not helping that much. I was wondering if you could give me any advice on how to approach it. I have the openfoam installed and I can run the first example program.

I found an additional example on the internet that looks very similar to what I am trying to do. It is also an example given from openfoam. The case is named cylinder. It is in the tutorials>basic>potentialFoam>cylinder.
I was able to get the blockMesh created but I get an error that says that file can not be found? I believe the it is because of the controlDict file. I have attached it. Also I attached a figure of that I am trying to model.

Martin I really appreciate your help.
Thank you very much, Robert Newsom
Attached Files
File Type: txt controlDict.txt (3.3 KB, 22 views)
File Type: doc diagramlens.doc (55.5 KB, 30 views)
58alvareznew is offline   Reply With Quote

Old   November 18, 2011, 05:51
Default blockMeshDict topology
  #13
afo
New Member
 
Paolo
Join Date: Nov 2011
Location: Taranto, Apulia, Italy
Posts: 26
Rep Power: 15
afo is on a distinguished road
Hi Martin,

I'm trying to compile a blockMeshDict file, in order to generate the geometry for a hopper. when I run blockMesh, the console returns this error

Creating block mesh from
"/home/afo/OpenFOAM/afo-2.0.1/run/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper_new/hopperInitialState/constant/polyMesh/blockMeshDict"
No non-linear edges defined
Creating topology blocks
Creating topology patches

Check topology
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam201/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigSegv::sigHandler(int) in "/opt/openfoam201/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam::blockMesh::checkBlockMesh(Foam:olyMesh const&) const in "/opt/openfoam201/platforms/linuxGccDPOpt/lib/libblockMesh.so"
#4 Foam::blockMesh::createTopology(Foam::IOdictionary const&, Foam::word const&) in "/opt/openfoam201/platforms/linuxGccDPOpt/lib/libblockMesh.so"
#5 Foam::blockMesh::blockMesh(Foam::IOdictionary const&, Foam::word const&) in "/opt/openfoam201/platforms/linuxGccDPOpt/lib/libblockMesh.so"
#6
in "/opt/openfoam201/platforms/linuxGccDPOpt/bin/blockMesh"
#7 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#8
in "/opt/openfoam201/platforms/linuxGccDPOpt/bin/blockMesh"
Segmentation fault

there must be something wrong with the topology, but I can't figure out what it is. I'm including the blockMeshDict file and the hopper plantform , I'd really appreciate your help.
Thank you in advance, Paolo
Attached Files
File Type: zip blockMeshDict.zip (839 Bytes, 15 views)
File Type: zip hopper.zip (19.1 KB, 10 views)
afo is offline   Reply With Quote

Old   November 18, 2011, 06:22
Default
  #14
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22
MartinB will become famous soon enough
Hi Robert,

your sketch in the Word document is not really readable in my Libre Office Writer... making a PDF or an .png might be a better way to communicate sketches.

The tutorial you mention is using the codeStream functionality for demonstration purposes. It runs fine within a pure Linux environment, but it may cause trouble in Windows.

If you just want to use the mesh itself you can use the blockMeshDict from the previous OpenFOAM-1.7 version, I attached the file. You have to unpack the archive and replace the blockMeshDict file in the /constant/polyMesh directory. In the system/controlDict you can remove the "functions { ... }" part.

Some information about a diffuser can be found in the openfoamwiki:
http://openfoamwiki.net/index.php/Si...nical_diffuser

Martin
Attached Files
File Type: gz blockMeshDict.tar.gz (1.0 KB, 8 views)
MartinB is offline   Reply With Quote

Old   November 18, 2011, 06:53
Default
  #15
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22
MartinB will become famous soon enough
Hi Paolo, (and Robert, this might be interesting for you, too...)

the numeration of the hexblocks is bad, as well as the definition of the frontAndBack patches.

To "debug" these kind of problems you can do this:

- Increase z-Coordinate from 6.2 to 996.2 or similar to get a better overview in the following steps.

- Create empty dummy entries for edges, boundary etc, just to have a complete blockMeshDict.

- Start "paraFoam -blocks", you can visualize the problems in Paraview with "Surface with Edges" or "Wireframe" option.

- Comment all blocks from the blockMeshDict and add them one by one again. Control the definition of the blocks in Paraview.

- After all blocks are fine add the patches one by one.

- After this is done, too, decrease the z-Coordinate again.

Some of the intermediate steps are shown in the attached files.

The corrected version of the blockMeshDict is attached, too.

Martin
Attached Images
File Type: jpg problem_blocks.jpg (16.1 KB, 123 views)
File Type: jpg problem_block3_is_bad.jpg (11.6 KB, 126 views)
File Type: jpg block3_and_block4_corrected.jpg (31.0 KB, 145 views)
Attached Files
File Type: gz blockMeshDict.tar.gz (860 Bytes, 26 views)
MartinB is offline   Reply With Quote

Old   November 18, 2011, 07:02
Default Many Thanks
  #16
afo
New Member
 
Paolo
Join Date: Nov 2011
Location: Taranto, Apulia, Italy
Posts: 26
Rep Power: 15
afo is on a distinguished road
Hi Martin,
I really thank you for your help, that was very kind of you! I'll let you know if everything worked fine.
afo is offline   Reply With Quote

Old   November 18, 2011, 07:47
Default yes it works
  #17
afo
New Member
 
Paolo
Join Date: Nov 2011
Location: Taranto, Apulia, Italy
Posts: 26
Rep Power: 15
afo is on a distinguished road
Thanks Martin everything works fine! You made my day!
afo is offline   Reply With Quote

Old   November 24, 2011, 10:52
Default default faces
  #18
afo
New Member
 
Paolo
Join Date: Nov 2011
Location: Taranto, Apulia, Italy
Posts: 26
Rep Power: 15
afo is on a distinguished road
Hi martin

sorry if I disturb you again, the mesh you corrected last week worked well. I made a little change in order to insert a smaller inlet, when i run it, blockMesh builds it, and paraview doesn't show anything wrong, I'am able to run simulations too, but console returns with a minor error and creates default faces in boundary:

reating block mesh topology
--> FOAM Warning :
From function polyMesh:olyMesh(... construct from shapes...)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 881
Found 1 undefined faces in mesh; adding to default patch.

Check topology

Basic statistics
Number of internal faces : 6
Number of boundary faces : 30
Number of defined boundary faces : 30
Number of undefined boundary faces : 0
Checking patch -> block consistency

Creating block offsets
Creating merge list .

Creating polyMesh from blockMesh
Creating patches
Creating cells
Creating points with scale 0.001

There are no merge patch pairs edges

Writing polyMesh
----------------
Mesh Information
----------------
boundingBox: (-4.073 0 0) (-0.134 7.093 0.0062)
nPoints: 3572
nCells: 1700
nFaces: 6885
nInternalFaces: 3295
----------------
Patches
----------------
patch 0 (start: 3295 size: 140) name: walls
patch 1 (start: 3435 size: 3400) name: frontAndBack
patch 2 (start: 6835 size: 20) name: inlet
patch 3 (start: 6855 size: 10) name: inletCentral
patch 4 (start: 6865 size: 20) name: outlet
patch 5 (start: 6885 size: 0) name: defaultFaces

End


how can i fix this? I include constant and 0 folders, if they might help you.

Thank you again Paolo
Attached Files
File Type: zip CFD_online.zip (84.6 KB, 15 views)
afo is offline   Reply With Quote

Old   November 24, 2011, 11:24
Default
  #19
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22
MartinB will become famous soon enough
Hi Paolo,

it's just a warning so generally you can try to ignore it.

The exact reason is the face (14 29 29 14), which is a face collapsed to a line, and which results from the wedge shaped block #6.

You can add these lines to your blockMeshDict and make the warning disappear:
dummy
{
type empty;
faces
(
(14 29 29 14)
);
}

But you must define BC's for the "dummy" patch again. Another idea is to add the face to your "walls" patch: the warning should disappear and it is treated like a wall...

Martin
MartinB is offline   Reply With Quote

Old   November 25, 2011, 03:23
Default
  #20
afo
New Member
 
Paolo
Join Date: Nov 2011
Location: Taranto, Apulia, Italy
Posts: 26
Rep Power: 15
afo is on a distinguished road
thanks again Martin
afo is offline   Reply With Quote

Reply

Tags
blockmeshdict block mesh


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
How to use PIMPLE properly? floquation OpenFOAM Running, Solving & CFD 27 August 12, 2024 11:15
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 14 December 17, 2019 00:12
pimpleDyMFoam computation randomly stops babapeti OpenFOAM Running, Solving & CFD 5 January 24, 2018 06:28
Stuck in a Rut- interDyMFoam! xoitx OpenFOAM Running, Solving & CFD 14 March 25, 2016 08:09
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 16:33


All times are GMT -4. The time now is 07:45.