CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: blockMesh (http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/)
-   -   Help required Mesh generation for a pipe with bendbends using blockMesh (http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/61777-help-required-mesh-generation-pipe-bendbends-using-blockmesh.html)

jaswi May 4, 2007 23:06

Hello OpenFOAM users I am n
 
Hello OpenFOAM users

I am new to OpenFOAM. With the help of forum knowledgebase I have been able to install and create meshes for some simple geometries.

My interest is to simulate flow in a pipe with bend. Is it possible to generate geometry + mesh using the blockMesh tool.

Looking forward to suggestions
Kind Regards Jaswi

guido_adriaensen May 7, 2007 03:10

Hello Jaswi, You cannot gen
 
Hello Jaswi,

You cannot generate geometry, but you can ofcourse generate a mesh :-). Take a look at the various blockMeshDict files in the tutorial directories. That should get you started. The manual also contains some background info for the generation of meshes using blockMesh. If the geometry is not too complex it is no problem to generate it in blockMesh.
If you run into trouble, post your blockMeshDict and I (or someone else) will have a look at it.

kind regards

Guido

cedric_duprat May 7, 2007 05:54

Hi Jaswi and Guido I confir
 
Hi Jaswi and Guido

I confirm that's Guido could help you ;o)
In fact, I'm also a beguinner in mesh creation using blockMesh tool.
But, the most easy way is to take one blockMeshDict, to plot all the points on a shit of paper and then to see how it works...
because sometimes it works well
(hey, guido, I've got my mesh now !!) ;-)

If you are interested in pipe flow with bend, try to read the second Guido's mesh (in "Help, could anyone post a simple cylinder mesh?") which is easy and then adapte it to your case.

Good luck for it

Cedric

guido_adriaensen May 7, 2007 06:56

Hello Jaswi and Cedric, It
 
Hello Jaswi and Cedric,

It is indeed the most easy way to plot all the points on a sheet of paper as Cedric mentioned. That's what I usually do to keep an overview.
The first mesh might take some time, but after that it is very easy to change the number of cells and make small adjustments.
Perhaps you could start with an even more simple geometry without the arcs. Add block by block, check your mesh after each addition. This enables you to see where you make errors, or no errors ofcourse if you are really good at this :-).

kind regards
Guido

olesen May 7, 2007 07:21

If you intend to use blockMesh
 
If you intend to use blockMesh for any slightly non-trivial mesh, you should also consider writing the blockMeshDict with m4 macros (as mentioned in the wiki).

There are two such files included in the tutorials examples:
MRFSimpleFoam/mixerVessel2D/
rhoImplicitPorousSimpleFoam/angledDuctImplicit/

Here is another example for you http://www.cfd-online.com/OpenFOAM_D...s/mime_txt.gif blockMeshDict.m4

NB: In the m4 definition for 'calc', the Perl command should use 'print' and not 'printf', since there is no format given.

jaswi May 7, 2007 20:35

Thanks alot guys. I am working
 
Thanks alot guys. I am working on it with your inputs. will soon share the outcome.

Kind Regards
Jaswi

cedric_duprat July 6, 2007 11:45

Hello Open Foam .... what a g
 
Hello Open Foam ....
what a good friday evening, WE is coming fast. I made a pretty mesh with blockMesh today.
I start my run, after checking "every thing" (I hope) and then ....
Foam spoke to me:
FOAM FATAL ERROR : Case is not 3D or 2D, LES is not applicable
... I created my mesh, it is 3D in BlockMesh....
then, I used the check mesh avaiable in OF:

Domain bounding box: min = (-0.601278 -0.601278 -0.5) max = (0.601278 0.601278 0.81) meters.
so .... it's 3D !!
but at the end of checkMesh :
Face flatness (1 = flat, 0 = butterfly) : average = 1 min = 0.999999
All faces are flat in that the ratio between projected and actual area is > 0.8

..
well .. some one can help me ? and so my WE will re-start better ...
Thank you

Cedric

PS: this is my mesh: http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif blockMeshDictdyna_complet

hjasak July 6, 2007 11:56

Show me your constant/polyMesh
 
Show me your constant/polyMesh/boudnary file.

Even better, throw it away, run blockMesh again and tell me if it works.

Hrv

cedric_duprat July 6, 2007 12:08

Hi Hrvoje, Thanks for repling
 
Hi Hrvoje,
Thanks for repling so fast ...
I hope it's not a stupid mistake ....
this is my boundary file:

blabla
5
(
inlet
{
type patch;
physicalType inlet;
nFaces 3125;
startFace 1880025;
}

outlet
{
type empty;
physicalType empty;
nFaces 5625;
startFace 1883150;
}

walldyna
{
type empty;
physicalType empty;
nFaces 5000;
startFace 1888775;
}

wallstat
{
type wall;
physicalType wall;
nFaces 11200;
startFace 1893775;
}

entree_sec
{
type patch;
physicalType pressureInlet;
nFaces 2500;
startFace 1904975;
}
)

I run blockMesh after deleted it ...
then checkMesh again and :
# my bounding box is still the same
# I still have some Face flatness at the end ...
I convert my mesh in Fluent Format and I can see it in 3D ...
strange ...

hjasak July 6, 2007 12:14

You've got too many type empt
 
You've got too many type empty; on things that should be walls. Define your walls properly and the thing will work.

On the other hand, nothing works after 5 pm Friday http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

Enjoy,

Hrv

cedric_duprat July 6, 2007 12:21

yes ... you're right ... I wil
 
yes ... you're right ... I will check it on monday http://www.cfd-online.com/OpenFOAM_D...part/happy.gif
no, really, by running it again, my probleme left , ..... so I think it is ok, but I didn't change any thing ...
so let's see quickly for my walls and then ... WE
Thank you

Cedric

emilianyassenov November 5, 2008 06:36

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

jaswi November 6, 2008 03:24

Hi Emilian I tried your blo
 
Hi Emilian

I tried your blockMeshDict and here are some of my observations...

It seems you want to simulate a pipe flow. For this purpose your block topology is not suitable. Please try O-Grid. There are plenty of such grids lying on the forum. Your grid with topology looks like this:

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

Here is another picture with the problematic faces marked in white:

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

Next when I zoom in I see these faces in close.

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

Please try the O-grid as this topology is anyway not worth of any results. Here is a link where an example of O-grid lives....

http://www.cfd-online.com/OpenFOAM_D...es/1/3249.html


Hope that might help you to solve your problem

Kind Regards
Jaswi

nikwin April 30, 2009 04:09

Hi,

I'm trying to mesh a pipe with a 90 degree bend with blockmesh. However, I'm not getting the cross sectional area in the bend (cut through radius center) to be circular. Posting my runable but not complete blockMeshDict file below.

Any suggestions of what could be wrong, is the approach correct?

I've also tried snappyHexMesh with a stl-file generated with Solid Edge. Unfortunately the mesh does not follow the patches at e.g. the pipe in and outlet. SnappyHexMeshDict taken from the motorbike tutorial. Is there a trick to get a better patch fit with sHM?

Thanks,
/NW

convertToMeters 1;

vertices
(
(1 -1 0) //0
(3.535534 -3.535534 0) //1
(3.535534 3.535534 0) //2
(1 1 0) //3
(-1 1 0) //4
(-3.535534 3.535534 0) //5
(-3.535534 -3.535534 0) //6
(-1 -1 0) //7
(1 -1 60) //8
(3.535534 -3.535534 60) //9
(3.535534 3.535534 60) //10
(1 1 60) //11
(-1 1 60) //12
(-3.535534 3.535534 60) //13
(-3.535534 -3.535534 60) //14
(-1 -1 60) //15
(10 -1 69) //16
(10 -3.535534 66.4644661) //17
(10 3.535534 66.4644661) //18
(10 1 69) //19
(10 1 71) //20
(10 3.535534 73.535534) //21
(10 -3.535534 73.535534) //22
(10 -1 71) //23
(30 -1 69) //24
(30 -3.535534 66.4644661) //25
(30 3.535534 66.4644661) //26
(30 1 69) //27
(30 1 71) //28
(30 3.535534 73.535534) //29
(30 -3.535534 73.535534) //30
(30 -1 71) //31

);

blocks
(
hex (0 3 4 7 8 11 12 15) (30 30 30) simpleGrading (1 1 5)
hex (3 2 5 4 11 10 13 12) (30 30 30) simpleGrading (1 1 5)
hex (4 5 6 7 12 13 14 15) (30 30 30) simpleGrading (1 1 5)
hex (0 7 6 1 8 15 14 9) (30 30 30) simpleGrading (1 1 5)
hex (1 2 3 0 9 10 11 8) (30 30 30) simpleGrading (1 1 5)

hex (8 11 12 15 16 19 20 23) (30 30 30) simpleGrading (1 1 5)
hex (11 10 13 12 19 18 21 20) (30 30 30) simpleGrading (1 1 5)
hex (12 13 14 15 20 21 22 23) (30 30 30) simpleGrading (1 1 5)
hex (8 15 14 9 16 23 22 17) (30 30 30) simpleGrading (1 1 5)
hex (9 10 11 8 17 18 19 16) (30 30 30) simpleGrading (1 1 5)

hex (16 19 20 23 24 27 28 31) (30 30 30) simpleGrading (1 1 5)
hex (19 18 21 20 27 26 29 28) (30 30 30) simpleGrading (1 1 5)
hex (20 21 22 23 28 29 30 31) (30 30 30) simpleGrading (1 1 5)
hex (16 23 22 17 24 31 30 25) (30 30 30) simpleGrading (1 1 5)
hex (17 18 19 16 25 26 27 24) (30 30 30) simpleGrading (1 1 5)
);

edges
(

arc 2 5 (0 5 0)
arc 5 6 (-5 0 0)
arc 6 1 (0 -5 0)
arc 1 2 (5 0 0)

arc 10 13 (0 5 60)
arc 13 14 (-5 0 60)
arc 14 9 (0 -5 60)
arc 9 10 (5 0 60)

arc 8 16 (3.636039 -1 66.363961)
arc 11 19 (3.636039 1 66.363961)
arc 12 20 (2.221825 1 67.778175)
arc 15 23 (2.221825 -1 67.778175)

arc 14 22 (0.428932 -3.535534 69.571068)
arc 10 18 (5.428932 3.535534 64.571068)
arc 9 17 (5.428932 -3.535534 64.571068)
arc 13 21 (0.428932 3.535534 69.571068)

arc 17 22 (10 -5 70)
arc 22 21 (10 0 75)
arc 21 18 (10 5 70)
arc 18 17 (10 0 65)

arc 25 26 (30 0 65)
arc 25 30 (30 -5 70)
arc 26 29 (30 5 70)
arc 29 30 (30 0 75)

);

patches
(

patch inlet
(

(3 2 5 4)
(4 5 6 7)
(7 6 1 0)
(0 1 2 3)
(0 3 4 7)
)
patch outlet
(
)
patch wall
(
)

);

mergePatchPairs
(
);

xiyuqiu February 28, 2013 23:06

Hello Nike,

I am trying to do the same as you do. 90 degree bend pipe with blockMesh. Have you resolved your problem? Please let me know. Thanks

best,

yu


All times are GMT -4. The time now is 09:10.