CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [mesh manipulation] Converting a 2Dmesh to axisymmetric (https://www.cfd-online.com/Forums/openfoam-meshing/61473-converting-2dmesh-axisymmetric.html)

gschaider January 14, 2009 07:07

Go to http://openfoam-extend.
 
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

mahendra January 15, 2009 06:14

Dear Bernhard, Thanks for t
 
Dear Bernhard,

Thanks for the makeAxialMesh Utility. I am now able to make a axial mesh in OpenFOAM-1.5.

mahendra January 17, 2009 08:54

Dear Bernhard ! One quick q
 
Dear Bernhard !

One quick question, how to specify axis to a grid?

mahendra January 19, 2009 00:50

Dear Bernhard, I am not abl
 
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 January 19, 2009 01:26

The error i am getting is like
 
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:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) 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

gschaider January 19, 2009 11:31

Hi Mahendra! The axis is de
 
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

mahendra January 20, 2009 01:53

Dear Bernhard, I am using a
 
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

gschaider January 20, 2009 12:12

Hi Mahendra! The first para
 
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

sega January 20, 2009 15:27

Hello! I have just learned
 
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.

gschaider January 21, 2009 15:33

Hi Sebastian! Have you chec
 
Hi Sebastian!

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

Bernhard

sega January 21, 2009 16:10

Yes I did. The mesh is just
 
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.

olwi January 21, 2009 16:34

Mahendra: Please have a look a
 
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

sega January 21, 2009 17:07

No, that is not the problem.
 
No, that is not the problem.
I was just too blind to see them correctly.
But thanks for your advice.!

mahendra January 21, 2009 23:48

Hi Bernhard, Still I am getti
 
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:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) 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

gschaider January 22, 2009 10:23

Hi Mahendra! Try skipping t
 
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

squadron February 6, 2009 05:35

Hi, I have created a 3D mes
 
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:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) 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.

elorriaux February 6, 2009 08:30

Hello, i suppose you have f
 
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.

gschaider February 6, 2009 08:35

Hi Age! No idea (havn't see
 
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

squadron February 6, 2009 09:49

@ Etienne: So you don't use m
 
@ 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

elorriaux February 6, 2009 10:52

It depends on the case, if my
 
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.


All times are GMT -4. The time now is 22:41.