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

[mesh manipulation] Converting a 2Dmesh to axisymmetric

Register Blogs Community New Posts Updated Threads Search

Like Tree20Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 14, 2009, 08:07
Default Go to http://openfoam-extend.
  #21
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Go to
http://openfoam-extend.svn.sourceforge.net/viewvc/openfoam-extend/trunk/Breeder_ 1.5/utilities/mesh/manipulation/MakeAxialMesh/
and click on "Download GNU Traball"

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   January 15, 2009, 07:14
Default Dear Bernhard, Thanks for t
  #22
Member
 
Mahendra
Join Date: Mar 2009
Location: Pune, Maharashtra, India
Posts: 65
Rep Power: 17
mahendra is on a distinguished road
Dear Bernhard,

Thanks for the makeAxialMesh Utility. I am now able to make a axial mesh in OpenFOAM-1.5.
mahendra is offline   Reply With Quote

Old   January 17, 2009, 09:54
Default Dear Bernhard ! One quick q
  #23
Member
 
Mahendra
Join Date: Mar 2009
Location: Pune, Maharashtra, India
Posts: 65
Rep Power: 17
mahendra is on a distinguished road
Dear Bernhard !

One quick question, how to specify axis to a grid?
mahendra is offline   Reply With Quote

Old   January 19, 2009, 01:50
Default Dear Bernhard, I am not abl
  #24
Member
 
Mahendra
Join Date: Mar 2009
Location: Pune, Maharashtra, India
Posts: 65
Rep Power: 17
mahendra is on a distinguished road
Dear Bernhard,

I am not able to use collapseEdges utility, It is giving me segmentation fault....

Can u shed some light on this?

Regards,
Mahendra
mahendra is offline   Reply With Quote

Old   January 19, 2009, 02:26
Default The error i am getting is like
  #25
Member
 
Mahendra
Join Date: Mar 2009
Location: Pune, Maharashtra, India
Posts: 65
Rep Power: 17
mahendra is on a distinguished road
The error i am getting is like this:

Cell:14998 uses faces:6(29649 30248 60346 60347 29349 29648) of which too many are marked for remov
al:
29649 30248 60346 60347 29349 29648
Cell:14999 uses faces:6(30249 30299 60348 60349 29350 29649) of which too many are marked for remov
al:
30249 30299 60348 60349 29350 29649
Morphing ...
--> FOAM Warning :
From function boundBox::boundBox(const pointField& points)
in file meshes/boundBox/boundBox.C at line 52
Cannot find bounding box for zero sized pointField, returning zero
--> FOAM Warning :
From function boundBox::boundBox(const pointField& points)
in file meshes/boundBox/boundBox.C at line 52
Cannot find bounding box for zero sized pointField, returning zero
Collapsing 0 small edges
Collapsing 0 in line edges
#0 Foam::error::printStack(Foam:stream&) in "/home/lcfd/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOp t/libOpenFOAM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/lcfd/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/lib OpenFOAM.so"
#2 ?? in "/lib64/libc.so.6"
#3 collapseHighAspectFaces(Foam::polyMesh const&, Foam::PackedList<1> const&, double, double, Foam ::edgeCollapser&) in "/home/lcfd/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/collapseEdg es"
#4 main in "/home/lcfd/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/collapseEdges "
#5 __libc_start_main in "/lib64/libc.so.6"
#6 __gxx_personality_v0 in "/home/lcfd/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/coll apseEdges"
Segmentation fault
lcfd@clust5:~/OpenFOAM/lcfd-1.5/Mahendra/Pipe_trial>

Regards,
Mahendra
mahendra is offline   Reply With Quote

Old   January 19, 2009, 12:31
Default Hi Mahendra! The axis is de
  #26
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Mahendra!

The axis is defined using the axis-option (it assumes that you have a planar patch of that name). With the offset-option you can move the axis away from that line. I'm not sure what happens if the patch is not planar

@the collapseEdge-crash: no idea. At first try to run checkMesh on your original (axial) mesh to see whether it is valid. It seems to me that the utilitiy is trying to remove too many edges. Decrease the tolerance parameter (what value are you using now?)

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   January 20, 2009, 02:53
Default Dear Bernhard, I am using a
  #27
Member
 
Mahendra
Join Date: Mar 2009
Location: Pune, Maharashtra, India
Posts: 65
Rep Power: 17
mahendra is on a distinguished road
Dear Bernhard,

I am using a edge length as 3m and angle as 5 degree, what i found was when I used edge length as 0.001m, the collapseEdges utility worked fine saying that 0 edges and 0 faces modified.

I assumed that since my pipe length is 3m and wedge angle is 5 degrees I should use them while specifying the arguments to collapseEdges utilty and it resulted in segmentation fault.

Was I correct in using it or not???

Regards,
Mahendra
mahendra is offline   Reply With Quote

Old   January 20, 2009, 13:12
Default Hi Mahendra! The first para
  #28
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Mahendra!

The first parameter means "all edges shorter that this will be removed". Which would mean almost all edges. Vary the feature angle

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   January 20, 2009, 16:27
Default Hello! I have just learned
  #29
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
Hello!

I have just learned that my meshes created with makeAxialMesh are not 1 cell but 5 cells thick (in the wedge direction).

Did I do something wrong?
Do you have any idea what may be the problem?

Greetings.
Sebastian.
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   January 21, 2009, 16:33
Default Hi Sebastian! Have you chec
  #30
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Sebastian!

Have you checked the original (2D planar) mesh? This shouldn't happen unless the original is that thick, too

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   January 21, 2009, 17:10
Default Yes I did. The mesh is just
  #31
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
Yes I did.

The mesh is just fine in both 2D and wedge.
Due to the big amount of cells and their small size this was just my mistake in seeing them correctly.

Sorry.
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   January 21, 2009, 17:34
Default Mahendra: Please have a look a
  #32
Member
 
Ola Widlund
Join Date: Mar 2009
Location: Sweden
Posts: 87
Rep Power: 17
olwi is on a distinguished road
Mahendra: Please have a look at my post of September 9, 2008: http://www.cfd-online.com/OpenFOAM_D.../126/9114.html

I think your problem is in large differences in sizes of cells/faces in your mesh. Try the modified "collapseEdgesBetter" in my post. Use the option -areaFactor to specify an "areafactor" smaller than the default 1e-9. Maybe 1e-11?

/Ola
olwi is offline   Reply With Quote

Old   January 21, 2009, 18:07
Default No, that is not the problem.
  #33
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
No, that is not the problem.
I was just too blind to see them correctly.
But thanks for your advice.!
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   January 22, 2009, 00:48
Default Hi Bernhard, Still I am getti
  #34
Member
 
Mahendra
Join Date: Mar 2009
Location: Pune, Maharashtra, India
Posts: 65
Rep Power: 17
mahendra is on a distinguished road
Hi Bernhard,
Still I am getting the segmentation fault error with using collapseEdgesBetter.

Cell:49999 uses faces:6(100949 100999 201048 201049 97950 98949) of which too many are marked for removal:
100949 100999 201048 201049 97950 98949
Morphing ...
--> FOAM Warning :
From function boundBox::boundBox(const pointField& points)
in file meshes/boundBox/boundBox.C at line 52
Cannot find bounding box for zero sized pointField, returning zero
--> FOAM Warning :
From function boundBox::boundBox(const pointField& points)
in file meshes/boundBox/boundBox.C at line 52
Cannot find bounding box for zero sized pointField, returning zero
Collapsing 0 small edges
Collapsing 0 in line edges
#0 Foam::error::printStack(Foam:stream&) in "/home/lcfd/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/lcfd/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 ?? in "/lib64/libc.so.6"
#3 collapseHighAspectFaces(Foam::polyMesh const&, Foam::PackedList<1> const&, double, double, Foam::edgeCollapser&) in "/home/lcfd/OpenFOAM/lcfd-1.5/applications/bin/linux64GccDPOpt/collapseEdgesBett er"
#4 main in "/home/lcfd/OpenFOAM/lcfd-1.5/applications/bin/linux64GccDPOpt/collapseEdgesBett er"
#5 __libc_start_main in "/lib64/libc.so.6"
#6 __gxx_personality_v0 in "/home/lcfd/OpenFOAM/lcfd-1.5/applications/bin/linux64GccDPOpt/collapseEdgesBett er"
Segmentation fault
lcfd@clust5:~/OpenFOAM/lcfd-1.5/Mahendra/Pipe_2D>

Regards,
Mahendra
mahendra is offline   Reply With Quote

Old   January 22, 2009, 11:23
Default Hi Mahendra! Try skipping t
  #35
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Mahendra!

Try skipping the collapseEdges-Stuff. Simply set all scalars to zeroGradient and the vectors to slip on the axis-patch (I think that are the settings that work) and try to use the mesh that way

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   February 6, 2009, 06:35
Default Hi, I have created a 3D mes
  #36
New Member
 
Age Nammensma
Join Date: Mar 2009
Posts: 10
Rep Power: 17
squadron is on a distinguished road
Hi,

I have created a 3D mesh with Gmsh, 1 element thick, and used gmshToFoam to convert it. checkMesh gave an "OK"

Now I want to use makeAxialMesh to convert my mesh into an axi-symmetrical one. This was the result:

Create time

Create mesh for time = 0

Plane of the grid: (0 0 1) (0.105253 0.0174027 0.0005)

The rotation-axis: ((-0.06 0 0.0005) (0.94 0 0.0005))

Creating wedge with an opening angel of 5 degrees

Radius to axis: min = 1.0842e-19 max 0.05
#0 Foam::error::printStack(Foam:stream&) in "/home/age/OpenFoam/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/age/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted: [0xb7ff3400]
#3 getDistance(Foam::polyPatch const&, Foam::line<foam::vector<double>, Foam::Vector<double> >&) in "/home/age/OpenFOAM/age-1.5/applications/bin/linuxGccDPOpt/makeAxialMesh"
#4 main in "/home/age/OpenFOAM/age-1.5/applications/bin/linuxGccDPOpt/makeAxialMesh"
#5 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#6 _start in "/home/age/OpenFOAM/age-1.5/applications/bin/linuxGccDPOpt/makeAxialMesh"
Segmentation fault

What did I do wrong?

FYI, I'm not only an OpenFoam newby, but also a Linux newby, so please explain the whole process step by step.
squadron is offline   Reply With Quote

Old   February 6, 2009, 09:30
Default Hello, i suppose you have f
  #37
Member
 
Etienne Lorriaux
Join Date: Mar 2009
Location: Compiegne, France
Posts: 45
Rep Power: 17
elorriaux is on a distinguished road
Hello,

i suppose you have followed the wiki instructions and checked the different constraints : http://openfoamwiki.net/index.php/Contrib_MakeAxialMesh

As you have already your model in gmsh, you can directly revolve your mesh in gmsh :

- rotate -2.5° your plane from your main 2D plane
- extrude (revolve) 5°
- save mesh
- gmshToFoam

I've already done that with gmsh, it works fine.

You can also have another solution by revolving your mesh in OpenFoam with the extrudeMesh tool, but it's not the easier way to do, i think.

Good luck.
Hisham likes this.
elorriaux is offline   Reply With Quote

Old   February 6, 2009, 09:35
Default Hi Age! No idea (havn't see
  #38
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Age!

No idea (havn't seen that stacktrace). How big is the mesh? Could you pass the mesh to me and I'll have a look

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   February 6, 2009, 10:49
Default @ Etienne: So you don't use m
  #39
New Member
 
Age Nammensma
Join Date: Mar 2009
Posts: 10
Rep Power: 17
squadron is on a distinguished road
@ Etienne:
So you don't use makeAxialMesh at all? Just extrude using rotation in Gmsh?

@ Bernhard:
The mesh-file is very large. I will try some other things first, like simple geo's etc.

Thanks guys
squadron is offline   Reply With Quote

Old   February 6, 2009, 11:52
Default It depends on the case, if my
  #40
Member
 
Etienne Lorriaux
Join Date: Mar 2009
Location: Compiegne, France
Posts: 45
Rep Power: 17
elorriaux is on a distinguished road
It depends on the case, if my geometry is done in gmsh, i revolve the mesh in gmsh. If i already have a mesh in gambit or a blockMeshDict, i use makeAxialMesh.

All those procedures should work, i've tried successfully many different ways to build axy cases in OpenFOAM.

If your msh file is too large, perhaps you can zip the .geo, it should be easier to transfer.
elorriaux 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
Simplest way of converting a 2d Navier Stokes code to a 2d axisymmetric one mseka Main CFD Forum 1 September 18, 2017 15:53
Axisymmetric Boundary condition Mohit Singh SU2 3 July 15, 2015 10:19
[mesh manipulation] Converting axisymmetric mesh into fully 3D mesh tomloh OpenFOAM Meshing & Mesh Conversion 0 April 29, 2012 21:31
Difference of final temperature between a plane and an axisymmetric geometry douchka FLUENT 0 July 7, 2011 09:38
URGENT ! Need help on Axisymmetric Flow ! Suman Kumar Main CFD Forum 1 November 20, 2001 15:51


All times are GMT -4. The time now is 14:55.