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

Meshing a pipe

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 13, 2011, 11:39
Default Meshing a pipe
  #1
New Member
 
Mike
Join Date: May 2011
Posts: 19
Rep Power: 14
mikemech is on a distinguished road
Hello. I am trying to simulate the flow in a heat exchanger like the one that you can see here: https://docs.google.com/viewer?a=v&p...thkey=CNSL76UH

The problem is that i don't know how to create the corresponding mesh. I was trying to do that with the blockMesh tool but it's too complicated and I always get errors

If anybody has dealt with a problem like that, I would appreciate some advice!
mikemech is offline   Reply With Quote

Old   May 13, 2011, 15:29
Default
  #2
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 555
Rep Power: 27
linnemann will become famous soon enough
Hello

Take a look here.

http://www.salome-platform.org/user-...edf-exercise-4

That should solve your question.
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   May 13, 2011, 16:59
Default
  #3
New Member
 
Mike
Join Date: May 2011
Posts: 19
Rep Power: 14
mikemech is on a distinguished road
Well, salome is a program with gui, and tools that help you generate mesh automatically, while OenFoam uses geometry blocks. Is there a way I can import the geometry and
its corresponding mesh in openFoam, having created them in another program? Otherwise, i dont't understand how this tutorial would help me :S
mikemech is offline   Reply With Quote

Old   May 14, 2011, 01:49
Default
  #4
Senior Member
 
Elvis
Join Date: Mar 2009
Location: Sindelfingen, Germany
Posts: 620
Blog Entries: 6
Rep Power: 24
elvis will become famous soon enough
Hi,

ideasUnvToFoam will do the job for you.

have a look at http://www.caelinux.org/wiki/downloa...7/PipeMesh.htm video meshing with salome 3.2.6 and foamX is not in OF anymore ;-), it is a good start
syntax for ideasUnvToFoam little different today to what video shows


http://www.caelinux.org/wiki/index.p...ELinux_2007.29
elvis is offline   Reply With Quote

Old   May 14, 2011, 03:31
Default
  #5
bhh
Member
 
Bjorn H. Hjertager
Join Date: Mar 2009
Posts: 72
Rep Power: 17
bhh is on a distinguished road
Hi,

Discretizer migth be an option for you, see http://www.discretizer.org/

rgds
Bjorn
bhh is offline   Reply With Quote

Old   May 15, 2011, 11:24
Default
  #6
Member
 
Stephen
Join Date: Mar 2009
Posts: 40
Rep Power: 17
basilwatson is on a distinguished road
Just done the same thing, a nice fella called Martin helped

My work flow was:.... draw a solid pipe in CAD

export as STEP
import to salome and set up faces and mesh etc ( caelinux has a tutorial called pipe)

export to UNV

then in the openFOAM terminal

cd to your case directory

ideasUnvToFoam name.unv

checkMesh

Run case ( icoFoam etc)

foamToVTK

ParaView .....

my problem was with the courant number ( time) and a tweak to the FVsolutions card )

Least that worked for me

I use CAElinux 64 bit ubuntu based

Hope this was of some help

Stephen
basilwatson is offline   Reply With Quote

Old   May 15, 2011, 12:40
Default one more step
  #7
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17
wouter is on a distinguished road
hello All,

I use salome for the complete drawing and meshing. In my experience you need a step before running the case namely edit the boundary conditions
I mostly need to change patch to wall, for the wall patches.

Hope this adds something
Wouter
wouter is offline   Reply With Quote

Old   May 15, 2011, 12:57
Default
  #8
Member
 
Logan Page
Join Date: Sep 2010
Posts: 38
Rep Power: 15
Logan Page is on a distinguished road
Hi

I'm partial to gmsh. Very powerful little mesher.

see attached example for a pipe.

> gmsh -3 Pipe.geo
> gmshToFoam Pipe.msh

only down side is you have to manually edit the constant/polyMesh/boundary file with the patch types you assign for you boundary conditions.
Attached Files
File Type: gz Pipe.geo.gz (328 Bytes, 105 views)
Logan Page is offline   Reply With Quote

Old   March 1, 2012, 10:47
Default Drawing a Pipe problem
  #9
Senior Member
 
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 131
Rep Power: 14
Goutam is on a distinguished road
I am new user of openFOAM.

I want to draw a pipe of length of 1 meter with diameter 1 meter using blockMesh. How I will do it? Could you please share a blockMeshDict file?
Goutam is offline   Reply With Quote

Old   March 2, 2012, 03:12
Default
  #10
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 20
romant is on a distinguished road
Quote:
Originally Posted by Goutam View Post
I am new user of openFOAM.

I want to draw a pipe of length of 1 meter with diameter 1 meter using blockMesh. How I will do it? Could you please share a blockMeshDict file?
Hej,

I still had a mesh with double grading in my repository somewhere. It is attached. I hope it helps.
Attached Files
File Type: zip longPipe3D_velocityProfileGeneration.zip (45.3 KB, 69 views)
__________________
~roman
romant is offline   Reply With Quote

Old   March 4, 2012, 14:03
Default
  #11
Senior Member
 
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 131
Rep Power: 14
Goutam is on a distinguished road
Quote:
Originally Posted by romant View Post
Hej,

I still had a mesh with double grading in my repository somewhere. It is attached. I hope it helps.
Thanks Roman,

I saw this geometry. Its great. But I didn't understand how you wrote the blockMesh file. Could you please explain me, how you wrote this?

First of all, you wrote 8 points, it means length of x and y is 0.02 m respectively, and length of z is 0.18 m. Am I right?

Then next 8 points, what you did?

I am considering a simple pipe of 10 m with radius 1 m for inlet and outlet. Your one is ok for me but I want to understand the basic of the blockMesh file that you created.

Thanks for your help.
Goutam is offline   Reply With Quote

Old   March 5, 2012, 01:49
Default
  #12
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 20
romant is on a distinguished road
Quote:
Originally Posted by Goutam View Post
Thanks Roman,

I saw this geometry. Its great. But I didn't understand how you wrote the blockMesh file. Could you please explain me, how you wrote this?

First of all, you wrote 8 points, it means length of x and y is 0.02 m respectively, and length of z is 0.18 m. Am I right?

Then next 8 points, what you did?

I am considering a simple pipe of 10 m with radius 1 m for inlet and outlet. Your one is ok for me but I want to understand the basic of the blockMesh file that you created.

Thanks for your help.
Note: I made a mistake in the description, it is not double graded, but just a normal pipe with grading towards the outer wall.


If you take a look at the blocks part you can see that I desribe which parts I create in which ordere, where the point numbers correspond to the numbers in the vertices section.

At first a normal block is created in the center, and then block that sit around this one. The outer block have edged which are defined as arcs instead of straight lines, so that they create a round x-y plane.

if you run
Code:
paraFoam -block
you can see the points which i define in space. Switching from "outline" to for example "wireframe" or "surface with edges", will show you also the arcs which are defined between the outer rim points.
__________________
~roman
romant is offline   Reply With Quote

Old   March 5, 2012, 11:54
Default
  #13
Senior Member
 
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 131
Rep Power: 14
Goutam is on a distinguished road
Dear Romant,

Thanks for your details description.
I have another ques: How to calculate the points for arc boundary?

arc 8 9 (diagouter diagouter 0)

how you calculate that point?

You define diagOuter 21.213, diagOuterNeg -21.213. How?

I understood others settings.

Thanks again for your time.
Goutam is offline   Reply With Quote

Old   March 5, 2012, 11:57
Default
  #14
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 20
romant is on a distinguished road
Quote:
Originally Posted by Goutam View Post
Dear Romant,

Thanks for your details description.
I have another ques: How to calculate the points for arc boundary?

arc 8 9 (diagouter diagouter 0)

how you calculate that point?

You define diagOuter 21.213, diagOuterNeg -21.213. How?

I understood others settings.

Thanks again for your time.
They are just in a 45deg angle from the point with the radius that is used for the other points. I define the normal points to be exactly on the x and y axis and the arc points, which need to be defined between those points i define to be exactly in between.
__________________
~roman
romant is offline   Reply With Quote

Old   March 7, 2012, 06:56
Default
  #15
Senior Member
 
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 131
Rep Power: 14
Goutam is on a distinguished road
Quote:
Originally Posted by romant View Post
They are just in a 45deg angle from the point with the radius that is used for the other points. I define the normal points to be exactly on the x and y axis and the arc points, which need to be defined between those points i define to be exactly in between.
Thanks for your cordial help.

I understood the blockMesh file clearly. When I use checkMesh command:

Create polyMesh for time = 0

Time = 0

Mesh stats
points: 136161
faces: 400100
internal faces: 391900
cells: 132000
boundary patches: 3
point zones: 0
face zones: 0
cell zones: 1

Overall number of cells of each type:
hexahedra: 132000
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0

Checking topology...
Boundary definition OK.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
Walls 1600 1640 ok (non-closed singly connected)
inlet 3300 3321 ok (non-closed singly connected)
outlet 3300 3321 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (-0.02595 -0.02595 0) (0.02595 0.02595 1.2)
Mesh (non-empty, non-wedge) directions (1 1 1)
Mesh (non-empty) directions (1 1 1)
Boundary openness (-1.86565e-16 8.61985e-18 -7.27923e-17) OK.
***High aspect ratio cells found, Max aspect ratio: 4095.21, number of cells 33280
<<Writing 33280 cells with high aspect ratio to set highAspectRatioCells
Minumum face area = 2.9739e-08. Maximum face area = 0.000122163. Face area magnitudes OK.
Min volume = 8.92169e-10. Max volume = 1.52642e-07. Total volume = 0.00252834. Cell volumes OK.
Mesh non-orthogonality Max: 34.8018 average: 4.32731
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 2.33588 OK.
Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End

What I will do now? Do I ignore this and continue my work?

Last edited by Goutam; March 7, 2012 at 07:15.
Goutam is offline   Reply With Quote

Old   March 8, 2012, 03:12
Default
  #16
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 20
romant is on a distinguished road
Quote:
Originally Posted by Goutam View Post
Thanks for your cordial help.

I understood the blockMesh file clearly. When I use checkMesh command:

Create polyMesh for time = 0

Time = 0

Mesh stats
points: 136161
faces: 400100
internal faces: 391900
cells: 132000
boundary patches: 3
point zones: 0
face zones: 0
cell zones: 1

Overall number of cells of each type:
hexahedra: 132000
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0

Checking topology...
Boundary definition OK.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
Walls 1600 1640 ok (non-closed singly connected)
inlet 3300 3321 ok (non-closed singly connected)
outlet 3300 3321 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (-0.02595 -0.02595 0) (0.02595 0.02595 1.2)
Mesh (non-empty, non-wedge) directions (1 1 1)
Mesh (non-empty) directions (1 1 1)
Boundary openness (-1.86565e-16 8.61985e-18 -7.27923e-17) OK.
***High aspect ratio cells found, Max aspect ratio: 4095.21, number of cells 33280
<<Writing 33280 cells with high aspect ratio to set highAspectRatioCells
Minumum face area = 2.9739e-08. Maximum face area = 0.000122163. Face area magnitudes OK.
Min volume = 8.92169e-10. Max volume = 1.52642e-07. Total volume = 0.00252834. Cell volumes OK.
Mesh non-orthogonality Max: 34.8018 average: 4.32731
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 2.33588 OK.
Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End

What I will do now? Do I ignore this and continue my work?
It depends on the kind of computations that you want to perform. For RANS calculations you can have aspect ratios that are higher (I still wouldn't go higher than about 1000 in the direction of the flow direction). For LES calculations, I would not go higher than about 100 or 50.

You can get rid of these high aspect ratios by checking where they occur. Use paraFoam for this and enable to see sets, which will then give you the option to view this set of high aspect ratio cells. After identifying the cells, change the number of cells in the directions. For this check the file pipeDefinition.

Code:
// define the pipe geometry
// ----SIZING-------------------------------------------------------------------
// all measurement must be given in [mm]
lengthZ 180;


// ----MESHING------------------------------------------------------------------
radialCells 80; // cells in the radial direction from center piller
tangentialCells 7; // angular cell counter per quarter and square of central piller
verticalCells 40; // vertical cell count from inlet to outlet
meshGrad    1.25e-2; // mesh gradient towards the outer edge and outer edge of the piller
Play with the values and you will see that the high aspect ratio cells become less. Or change the gradients.
__________________
~roman
romant 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
[GAMBIT] meshing in GAMBIT, a flow through a pipe having complex inflow geometry mazhar1613 ANSYS Meshing & Geometry 1 January 11, 2012 23:18
[GAMBIT] Meshing a pipe vedravi ANSYS Meshing & Geometry 1 March 25, 2010 13:19
Meshing divergent nozzle entry of a long pipe Aly FLUENT 1 September 25, 2005 17:07
+ shape circular pipe - meshing possible? Selina Tracy Main CFD Forum 2 January 16, 2003 13:31
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 09:11


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