CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Bugs

Bug in blockMesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 4, 2009, 09:47
Default Hi, The problem is describ
  #1
New Member
 
Andreas Feymark
Join Date: Mar 2009
Location: Gothenburg, Sweden
Posts: 18
Rep Power: 17
feymark is on a distinguished road
Hi,

The problem is described here: http://www.cfd-online.com/OpenFOAM_D...tml?1236010571 .
I traced it down to the "importance factors", computed in blockPoints.C, which gets too big. My solution to this was to, before the "importance factors" are used, add this piece of code:

scalar impxtot = impx1 + impx2 + impx3 + impx4;
impx1 /= impxtot;
impx2 /= impxtot;
impx3 /= impxtot;
impx4 /= impxtot;

scalar impytot = impy1 + impy2 + impy3 + impy4;
impy1 /= impytot;
impy2 /= impytot;
impy3 /= impytot;
impy4 /= impytot;

scalar impztot = impz1 + impz2 + impz3 + impz4;
impz1 /= impztot;
impz2 /= impztot;
impz3 /= impztot;
impz4 /= impztot;

This works well on the cases I have looked at. Is there a better solution?

/Andreas
feymark is offline   Reply With Quote

Old   March 4, 2009, 10:09
Default Heya, This is a long-standi
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Heya,

This is a long-standing bug (mine) and the code simply looked too complex to look at 15 years after it was written.

What you are saying is that the sum of weighting factors is not zero, right? Can you tel me by how much the factors are out and if you can tell why the sum of weights is not equal to one.

Please let me know, this has bothered me for a long time.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   March 4, 2009, 12:12
Default I pretty sure the error lies w
  #3
New Member
 
Andreas Feymark
Join Date: Mar 2009
Location: Gothenburg, Sweden
Posts: 18
Rep Power: 17
feymark is on a distinguished road
I pretty sure the error lies within the method. I have confirmed by doing calculations by hand that the code does what it's suppose to do. Using the blockMeshDict I posted in the other thread I get values of impx = 0.725, impx2 = 0.375, impx3 = impx4 = 0 for i = 1, j = 1, k = 0.

/Andreas
feymark is offline   Reply With Quote

Old   March 6, 2009, 05:54
Default I pushed a change to blockPoin
  #4
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
I pushed a change to blockPoints.C to 1.5.x. Seems to fix the case from http://www.cfd-online.com/cgi-bin/Op...2873#POST32873
mattijs is offline   Reply With Quote

Old   March 23, 2009, 22:49
Default blockMesh problem in interDyMFoam
  #5
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
In the 2D tank sloshing problem, I am modeling the tank as rectangular not the chamfered one in the tutorial. When I run blockMesh, it crashes. My question is blockMesh in interDyMFoam configured to run only the chamfered shape in the tutorial or can it accept any shape?

Musa
musahossein is offline   Reply With Quote

Old   March 24, 2009, 05:20
Default
  #6
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
It can accept any (multiblock structured) shape.
mattijs is offline   Reply With Quote

Old   March 24, 2009, 15:09
Default problem with Block mesh in the 2D tank sloshing tutorial
  #7
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
My input is included below. I have followed the input format in the 2d sloshing tank:

/*--------------------------------*- 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 1;

vertices
(
( -0.5 -0.5 0.05) // 0
( 0.5 -0.5 0.05) // 1
( 0.5 0.5 0.05) // 2
( -0.5 0.5 0.05) // 3
( -0.5 0.5 -0.05) // 4
( -0.5 -0.5 -0.05) // 5
( 0.5 -0.5 -0.05) // 6
( 0.5 0.5 -0.05) // 7
);

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

patches
(
patch walls
(
(0 1 6 5)
(1 2 7 6)
(2 3 4 7)
(3 0 5 4)
)
empty front
(
(0 1 2 3)
)

empty back
(
(5 4 7 6)
)

);

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

But when I run blockMesh, I get the following warnings. I have no clue as to why. The warning also states that I might have the surfaces inside out. However, I have followed the numbering scheme where the numbers run counterclockwise when looking at the surface from inside the block.

musa@linux-ip9p:~/OpenFOAM/musa-1.5/run/tutorials/interDyMFoam/sloshingTank2Dtest> blockMesh
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / 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 : Mar 24 2009
Time : 16:01:23
Host : linux-ip9p
PID : 4494
Case : /home/musa/OpenFOAM/musa-1.5/run/tutorials/interDyMFoam/sloshingTank2Dtest
nProcs : 1

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


Reading block mesh description dictionary

Creating block mesh

Creating blockCorners

There are no non-linear edges

Creating blocks

Creating patches

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.0166667 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.0166667 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.0166667 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.0166667 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.0166667 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.0166667 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

Default patch type set to empty

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

There are no merge patch pairs edges

Writing polyMesh

end

I apologise for the etremely long post. I hope the brevity of the problem will make it easier to review.

Musa
musahossein is offline   Reply With Quote

Old   March 24, 2009, 15:45
Default
  #8
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Your point ordering is wrong. See e.g. Userguide U-21.
mattijs is offline   Reply With Quote

Old   March 24, 2009, 23:11
Default blockmesh issues in interDyMFoam
  #9
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
Many thanks for your response.

The point numbering you are refering to on U-21 puts the origin at a corner. The origin in the sloshing tank is at the COG of the tank. I looked at both. In U-21, the number scheme goes counter clockwise on each face with the normal on the outer surface of each face. In the 2d tank sloshing tutorial, the numbering shceme (as well as the dam break problem), the surface normal points into the tank. So the numbering schemes appear to be opposite. I will look at this further..
musahossein 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
Possible bug in blockMesh benru OpenFOAM Bugs 16 August 17, 2013 20:54
[blockMesh] BlockMesh problem pratap OpenFOAM Meshing & Mesh Conversion 21 February 16, 2009 07:32
[blockMesh] BlockMesh checks msrinath80 OpenFOAM Meshing & Mesh Conversion 1 April 16, 2007 07:47
[blockMesh] BC with blockMesh ville OpenFOAM Meshing & Mesh Conversion 1 December 4, 2006 06:11
BlockMesh trouble r2d2 OpenFOAM Pre-Processing 2 January 16, 2006 10:51


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