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

[blockMesh] Mesh generation for a pipe with bendbends using blockMesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 4, 2007, 23:06
Default Mesh generation for a pipe with bendbends using blockMesh
  #1
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
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
jaswi is offline   Reply With Quote

Old   May 7, 2007, 03:10
Default Hello Jaswi, You cannot gen
  #2
Member
 
Guido Adriaensen
Join Date: Mar 2009
Posts: 56
Rep Power: 17
guido_adriaensen is on a distinguished road
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
guido_adriaensen is offline   Reply With Quote

Old   May 7, 2007, 05:54
Default Hi Jaswi and Guido I confir
  #3
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
cedric_duprat is on a distinguished road
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
cedric_duprat is offline   Reply With Quote

Old   May 7, 2007, 06:56
Default Hello Jaswi and Cedric, It
  #4
Member
 
Guido Adriaensen
Join Date: Mar 2009
Posts: 56
Rep Power: 17
guido_adriaensen is on a distinguished road
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
guido_adriaensen is offline   Reply With Quote

Old   May 7, 2007, 07:21
Default If you intend to use blockMesh
  #5
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,684
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
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 blockMeshDict.m4

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

Old   May 7, 2007, 20:35
Default Thanks alot guys. I am working
  #6
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
Thanks alot guys. I am working on it with your inputs. will soon share the outcome.

Kind Regards
Jaswi
jaswi is offline   Reply With Quote

Old   July 6, 2007, 11:45
Default Hello Open Foam .... what a g
  #7
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
cedric_duprat is on a distinguished road
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: blockMeshDictdyna_complet
cedric_duprat is offline   Reply With Quote

Old   July 6, 2007, 11:56
Default Show me your constant/polyMesh
  #8
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
Show me your constant/polyMesh/boudnary file.

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

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

Old   July 6, 2007, 12:08
Default Hi Hrvoje, Thanks for repling
  #9
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
cedric_duprat is on a distinguished road
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 ...
cedric_duprat is offline   Reply With Quote

Old   July 6, 2007, 12:14
Default You've got too many type empt
  #10
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
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

Enjoy,

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

Old   July 6, 2007, 12:21
Default yes ... you're right ... I wil
  #11
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
cedric_duprat is on a distinguished road
yes ... you're right ... I will check it on monday
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
cedric_duprat is offline   Reply With Quote

Old   November 5, 2008, 05:36
Default convertToMeters 1; vertices
  #12
emilianyassenov
Guest
 
Posts: n/a
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
  Reply With Quote

Old   November 6, 2008, 02:24
Default Hi Emilian I tried your blo
  #13
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
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:



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



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



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
jaswi is offline   Reply With Quote

Old   April 30, 2009, 04:09
Default
  #14
Member
 
Niklas Winkler
Join Date: Mar 2009
Location: Stockholm, Stockholm, Sweden
Posts: 73
Rep Power: 17
nikwin is on a distinguished road
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
(
);
nikwin is offline   Reply With Quote

Old   February 28, 2013, 22:06
Default
  #15
Member
 
yu
Join Date: Nov 2010
Posts: 39
Rep Power: 15
xiyuqiu is on a distinguished road
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
xiyuqiu 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
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 07:38
Too diffusive result on Delaunay type mesh for pipe AlmostSurelyRob OpenFOAM Running, Solving & CFD 7 October 8, 2018 13:34
State of mesh generation Wandadars Main CFD Forum 3 January 5, 2017 12:51
[ICEM] Using a hybrid mesh for a simple pipe Udio_NT ANSYS Meshing & Geometry 17 October 18, 2012 14:42
[ANSYS Meshing] Question about mesh generation learning lnk ANSYS Meshing & Geometry 2 July 7, 2012 06:45


All times are GMT -4. The time now is 11:54.