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   December 16, 2009, 21:19
Default checkmesh problem
  #61
Member
 
Eelco Gehring
Join Date: Mar 2009
Posts: 70
Rep Power: 17
feijooos is on a distinguished road
Dear Bernhard,

First, let me say that this is a great utility.
Second, I am having a slight problem with the mesh I created using makeAxialMesh and I'm hoping you can help me out.

I made my own 2D mesh which I refined in some places and then converted it to an axisymetric mesh using your utility. It works well, no problem up to this point. However, when I check the Mesh with checkMesh I get a floating point exception error:

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
top 360 722 ok (non-closed singly connected)
left 1280 2562 ok (non-closed singly connected)
right 122 246 ok (non-closed singly connected)
bottom 6400 12802 ok (non-closed singly connected)
frontAndBack 0 0 ok (empty)
frontAndBack_pos 847724 855405 ok (non-closed singly connected)
frontAndBack_neg 847724 855405 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (0 0 -5.23265e-05) (0.012 0.0024 0.000157047)
#0 Foam::error:rintStack(Foam::Ostream&) in "/usr/local/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/usr/local/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 __restore_rt at sigaction.c:0
#3 Foam:olyMesh::calcDirections() const in "/usr/local/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#4 Foam:olyMesh::directions() const in "/usr/local/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#5 Foam::checkGeometry(Foam:olyMesh const&, bool) in "/usr/local/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/checkMesh"
#6 main in "/usr/local/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/checkMesh"
#7 __libc_start_main in "/lib64/libc.so.6"
#8 Foam::regIOobject::readIfModified() in "/usr/local/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/checkMesh"
Floating point exception

I was wondering if you have encountered this problem before and if there is a way to fix this?

Thanks,

Eelco
feijooos is offline   Reply With Quote

Old   January 15, 2010, 05:46
Default
  #62
Senior Member
 
Ivan Flaminio Cozza
Join Date: Mar 2009
Location: Torino, Piemonte, Italia
Posts: 210
Rep Power: 18
ivan_cozza is on a distinguished road
Send a message via MSN to ivan_cozza
Hi Foamers!
Is there any issue in compiling makeAxialMesh in OF 1.6.x?
I tried yesterday, everything seemed ok, but when I try to convert my 2D jet mesh, the utility did not collapse the axis faces on a line, but just transformed them in a very tiny face near the x = 0 axis. So when I did collapseEdges, it did not find any edges to collapse. The rest of the mesh seems ok.
Could this axi mesh work correctly (the lateral boundaries are wedge)?
Any comments on it?

Thanks!
Ivan
ivan_cozza is offline   Reply With Quote

Old   March 5, 2010, 17:38
Default checkMesh problem
  #63
New Member
 
Alqayam Meghji
Join Date: Mar 2010
Posts: 5
Rep Power: 16
AlMeghji is on a distinguished road
Hi Bernhard,

Thanks a lot for making the makeAxialMesh utility, it has been really helpful for my work.

I have one question, I am getting the same FOAMerror that feijooos is getting. Is there a way to solve this?

I have specified my axis patch to be empty in the files in the 0 directory, could this be a source of the problem? should they be symmetryPlanes?

thanks

al
AlMeghji is offline   Reply With Quote

Old   March 6, 2010, 21:23
Default
  #64
Member
 
Eelco Gehring
Join Date: Mar 2009
Posts: 70
Rep Power: 17
feijooos is on a distinguished road
Alqayam,

the only way I was able to fix it, was by using the original example provided with the utility and modifying it to my needs. See if that works for you.

Good luck
feijooos is offline   Reply With Quote

Old   March 7, 2010, 11:17
Default
  #65
New Member
 
Alqayam Meghji
Join Date: Mar 2010
Posts: 5
Rep Power: 16
AlMeghji is on a distinguished road
Hi Eelco,

What I have done is that I have run the blockMesh, makeAxialMesh and collapseEdges without a problem.
I then take the new polymesh directory and replace the initial one in the constant directory. I then specify the bottom BCs in the 0dir to be empty.
Is there a problem with this method? or could it be the solver, I am using an altered version of icoFoam that includes temperature effects.

thanks
Al
AlMeghji is offline   Reply With Quote

Old   March 7, 2010, 11:54
Default
  #66
Member
 
Eelco Gehring
Join Date: Mar 2009
Posts: 70
Rep Power: 17
feijooos is on a distinguished road
Hi Al,

It does not seems like a solver issue when you get the same error. Just to check: you get the error when changing the bottom BC and after you run "checkMesh". And I assume that your bottom boundary is your axis?

Not sure what the problem could be. Are you positive that you apply the collapseEdges to the right directory? Is the collapseEdges utility actually collapsing edges, or doesn't it do anything? Is your axis of symmetry parallel to the XY-plan? I remember that I had some issues with that. Take a look at your mesh in paraview (or any other post-processing tool) and see if you BC are where they are supposed to be.

Eelco
feijooos is offline   Reply With Quote

Old   March 8, 2010, 05:10
Default
  #67
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
Quote:
Originally Posted by AlMeghji View Post
Hi Bernhard,

Thanks a lot for making the makeAxialMesh utility, it has been really helpful for my work.

I have one question, I am getting the same FOAMerror that feijooos is getting. Is there a way to solve this?

I have specified my axis patch to be empty in the files in the 0 directory, could this be a source of the problem? should they be symmetryPlanes?

thanks

al
No. No symmetryPlanes. It's hard to tell what might be the problem without a proper stack-trace from a debug-version (with line numbers). But one thing I noticed about feijoos checkMesh-output is:
Quote:
Overall domain bounding box (0 0 -5.23265e-05) (0.012 0.0024 0.000157047)
That means that the mesh is NOT symmetric around the xy-plane (and probably the original mesh wasn't too) which according to the UserGuide chapter 5.2.2 is necessary for wedge-BCs to work
Bernhard
gschaider is offline   Reply With Quote

Old   March 8, 2010, 17:45
Default
  #68
New Member
 
Alqayam Meghji
Join Date: Mar 2010
Posts: 5
Rep Power: 16
AlMeghji is on a distinguished road
Hi Guys, thanks for the quick replies. I had a look at your suggestions and i found something strange.
When i ran makeAxialMesh, it produced a new file, with a polymesh directory in. This is fine as I understand, however when I looked at the boundary file, it still showed the bottom patch (my axis patch) as having a number of faces. I realise that there should be 0 faces there, but how do I fix that? Once that is done then im sure that the mesh will be fine.

Another thing that could be leading to this problem is that when i tried to install makeAxialMesh again, once i had removed it, It said that it could not find repatch.H to add to the makeAxialMesh.dep file. Im guessing that this has a lot to do with redefining the patches.
Is there any way or anywhere i can get this file to put into the OpenFOAM-1.5/src/lnInlcude directory?

when i run collapseEdges I get this:

Collapsing 0 small edges
Collapsing 0 in line edges
Max face area:0.001
Collapse area factor:1e-09
Collapse area:1e-12
Collapsing 0 small high aspect ratio faces
End

When i run the solver i get this:

This mesh contains patches of type empty but is not 1D or 2D
by virtue of the fact that the number of faces of this
empty patch is not divisible by the number of cells.

From function emptyFvPatchField<Type>::updateCoeffs()
in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 148.


Any ideas??

thanks again for all the help, i really do appreciate it!

Al

Last edited by AlMeghji; March 8, 2010 at 19:42. Reason: spelling mistake
AlMeghji is offline   Reply With Quote

Old   March 9, 2010, 05:27
Default
  #69
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
Quote:
Originally Posted by AlMeghji View Post
Hi Guys, thanks for the quick replies. I had a look at your suggestions and i found something strange.
When i ran makeAxialMesh, it produced a new file, with a polymesh directory in. This is fine as I understand, however when I looked at the boundary file, it still showed the bottom patch (my axis patch) as having a number of faces. I realise that there should be 0 faces there, but how do I fix that? Once that is done then im sure that the mesh will be fine.
MAM doesn't remove any faces it only moves points around. Removing faces is what collapseEdges takes care of
Quote:
Originally Posted by AlMeghji View Post
Another thing that could be leading to this problem is that when i tried to install makeAxialMesh again, once i had removed it, It said that it could not find repatch.H to add to the makeAxialMesh.dep file. Im guessing that this has a lot to do with redefining the patches.
Is there any way or anywhere i can get this file to put into the OpenFOAM-1.5/src/lnInlcude directory?
You don't have to. If you look at the sources you'll see that this is a file/class whose name differs between 1.5(6) and 1.5-dev. The stage that makes the dependencies complains about it because it doesn't know about #ifdefs, but compilation will work without problems
Quote:
Originally Posted by AlMeghji View Post
when i run collapseEdges I get this:

Collapsing 0 small edges
Collapsing 0 in line edges
Max face area:0.001
Collapse area factor:1e-09
Collapse area:1e-12
Collapsing 0 small high aspect ratio faces
End

When i run the solver i get this:

This mesh contains patches of type empty but is not 1D or 2D
by virtue of the fact that the number of faces of this
empty patch is not divisible by the number of cells.

From function emptyFvPatchField<Type>::updateCoeffs()
in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 148.


Any ideas??

thanks again for all the help, i really do appreciate it!

Al
Make sure
- whether the axis patch really is on the rotation axis (if it isn't the faces won't get an area of 0 and therefor can't be removed - THIS IS A FEATURE)
- try laxer tolerances for collapseEdges
- set the axis patch to something that is NOT empty

Bernhard
gschaider is offline   Reply With Quote

Old   March 9, 2010, 16:17
Default
  #70
New Member
 
Alqayam Meghji
Join Date: Mar 2010
Posts: 5
Rep Power: 16
AlMeghji is on a distinguished road
Hi Bernhard and Eelco,

problem solved, it was a problem with new polyMesh files created and then running collapseEdges in the new folder created by makeAxialMesh.

One more question, I had a graded mesh before but upon running makeAxialMesh and then collapse edges, it seems that the grading has been replaced by a normal grading, is there a way to retain the graded mesh?
many thanks

al
AlMeghji is offline   Reply With Quote

Old   March 15, 2010, 06:10
Default
  #71
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
Quote:
Originally Posted by AlMeghji View Post
One more question, I had a graded mesh before but upon running makeAxialMesh and then collapse edges, it seems that the grading has been replaced by a normal grading, is there a way to retain the graded mesh?
many thanks
The grading shouldn't be touched by makeAxialMesh (it only manipulates one component of the point-coordinates). And I don't think that collapseEdges touches anything except the collapsed points. Could you check again (and have a look after which util the grading went away)?

Bernhard
gschaider is offline   Reply With Quote

Old   March 15, 2010, 11:44
Default
  #72
New Member
 
Alqayam Meghji
Join Date: Mar 2010
Posts: 5
Rep Power: 16
AlMeghji is on a distinguished road
Hi Bernhard,

All is fixed with the mesh now, thanks for helping on all the problems.

speak soon

Al
AlMeghji is offline   Reply With Quote

Old   March 30, 2010, 16:00
Default
  #73
New Member
 
Proulx
Join Date: Mar 2010
Location: quebec city
Posts: 2
Rep Power: 0
daniproulx is on a distinguished road
Dear Foamers,
Thanks for the nice makeAxialMesh Utility.
After the use of makeAxialMesh and collapseEdges I check the mesh and I found:

+++++++++++++++++++++++++++++++++++++++++++++++
Mesh stats
points: 74460
internal points: 0
faces: 147816
internal faces: 73357
cells: 36880
boundary patches: 8
point zones: 0
face zones: 0
cell zones: 0

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

Checking topology...
Boundary definition 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
Body 352 705 ok (non-closed singly connected)
OUT 107 216 ok (non-closed singly connected)
inlet 30 61 ok (non-closed singly connected)
upwall 210 422 ok (non-closed singly connected)
axis 0 0 ok (empty)
frontAndBackPlanes 0 0 ok (empty)
frontAndBackPlanes_pos36880 37284 ok (non-closed singly connected)
frontAndBackPlanes_neg36880 37284 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (-6e-09 -7.97787e-17 -0.00609363) (0.4675 0.139567 0.00609363)
Mesh (non-empty, non-wedge) directions (1 1 0)
Mesh (non-empty) directions (1 1 1)
***Number of edges not aligned with or perpendicular to non-empty directions: 96154
<<Writing 74460 points on non-aligned edges to set nonAlignedEdges
Boundary openness (1.60644e-18 1.25692e-15 -4.27586e-14) OK.
Max cell openness = 2.69266e-16 OK.
Max aspect ratio = 67.2073 OK.
Minumum face area = 4.29801e-10. Maximum face area = 8.25687e-05. Face area magnitudes OK.
Min volume = 2.16883e-14. Max volume = 2.61285e-07. Total volume = 0.000395393. Cell volumes OK.
Mesh non-orthogonality Max: 74.9294 average: 20.5823
*Number of severely non-orthogonal faces: 706.
Non-orthogonality check OK.
<<Writing 706 non-orthogonal faces to set nonOrthoFaces
Face pyramids OK.
Max skewness = 0.79991 OK.

Failed 1 mesh checks.

End
++++++++++++++++++++++++++++++++++++++++++++++++++ ++
What's the problem with the mesh ?
In my new boundary file I found the last frontAndBackPlanes with 0 face. Can I remove it from the file ?
The result with icoFoam are strange!!
Any help ?
daniproulx is offline   Reply With Quote

Old   March 30, 2010, 18:20
Default
  #74
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
Quote:
Originally Posted by daniproulx View Post
In my new boundary file I found the last frontAndBackPlanes with 0 face. Can I remove it from the file ?
The frontAndBackPlanes become the "new" wedge face.
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   March 31, 2010, 06:18
Default
  #75
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
Quote:
Originally Posted by sega View Post
The frontAndBackPlanes become the "new" wedge face.
Which means: "Yes. You can remove the empty patches from the boundary-file" (but don't forget to adapt the number that indicates the length of the list)
gschaider is offline   Reply With Quote

Old   March 31, 2010, 18:45
Default
  #76
New Member
 
Proulx
Join Date: Mar 2010
Location: quebec city
Posts: 2
Rep Power: 0
daniproulx is on a distinguished road
Quote:
Originally Posted by gschaider View Post
Which means: "Yes. You can remove the empty patches from the boundary-file" (but don't forget to adapt the number that indicates the length of the list)
Thanks ! But what about the Failed 1 mesh checks ??
daniproulx is offline   Reply With Quote

Old   April 1, 2010, 10:20
Unhappy
  #77
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Hello FOAMers,
I am having the same troubles as someone else on this thread. After importing a 3D axisymmetric mesh from Pointwise (5° angle, 1 cell thick), I have this error:

Code:
Checking geometry...
    Overall domain bounding box (0 -81.5683 0) (2700 81.5683 1868.22)
    Mesh (non-empty, non-wedge) directions (1 0 1)
    Mesh (non-empty) directions (1 1 1)
 ***Number of edges not aligned with or perpendicular to non-empty directions: 10914
  <<Writing 11207 points on non-aligned edges to set nonAlignedEdges
What is going wrong? Any suggestions?

mad
maddalena is offline   Reply With Quote

Old   April 12, 2010, 08:00
Default
  #78
Member
 
Javed
Join Date: Mar 2010
Location: Mumbai,India
Posts: 32
Rep Power: 16
Javed is on a distinguished road
Hi Bernhard,

I am trying to generate axisymmetric geom with the following blockMeshDict file:
convertToMeters 0.1;

vertices
(
(0 0 0)
(1 0 0)
(1 1 0)
(0 1 0)
(0 0 0.1)
(1 0 0.1)
(1 1 0.1)
(0 1 0.1)
);

blocks
(
hex (0 1 2 3 0 1 6 7) (20 20 1) simpleGrading (1 1 1)
);

edges
(
);

patches
(
wall fixed
(
(3 7 6 2)
)
patch inlet
(
(0 0 7 3)
)
patch outlet
(
(2 6 1 1)
)
empty center
(1 1 0 0)
)
wedge frontAndBack
(
(0 3 2 1)
(0 1 6 7)
)
);

mergePatchPairs
(
);


but not able to run blockMesh..getting following error..Please help
Create time


Creating block mesh from
"/home/javed/OpenFOAM/javed-1.6/run/wedge/constant/polyMesh/blockMeshDict"



ill defined primitiveEntry starting at keyword 'patches' on line 41 and ending at line 70

file: /home/javed/OpenFOAM/javed-1.6/run/wedge/constant/polyMesh/blockMeshDict at line 70.

From function primitiveEntry::readEntry(const dictionary&, Istream&)
in file db/dictionary/primitiveEntry/primitiveEntryIO.C at line 210.

FOAM exiting


PLEASE HELP.
Javed is offline   Reply With Quote

Old   April 12, 2010, 08:09
Default
  #79
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
Quote:
Originally Posted by Javed View Post

empty center
(1 1 0 0)
)
Try this.

Code:
empty center  
(
    (1 1 0 0)
)
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   April 12, 2010, 08:35
Default
  #80
Member
 
Javed
Join Date: Mar 2010
Location: Mumbai,India
Posts: 32
Rep Power: 16
Javed is on a distinguished road
Thanks, but after correcting it i m getting following error
Create time


Creating block mesh from
"/home/javed/OpenFOAM/javed-1.6/run/wedge/constant/polyMesh/blockMeshDict"


Creating blockCorners

Creating curved edges

Creating blocks

Creating patches

Creating block mesh topology

Default patch type set to empty
#0 Foam::error:rintStack(Foam::Ostream&) in "/home/javed/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/javed/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam::wedgePolyPatch::initTransforms() in "/home/javed/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#4 Foam::wedgePolyPatch::wedgePolyPatch(Foam::word const&, int, int, int, Foam:olyBoundaryMesh const&) in "/home/javed/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#5 Foam:olyPatch::addwordConstructorToTable<Foam::w edgePolyPatch>::New(Foam::word const&, int, int, int, Foam:olyBoundaryMesh const&) in "/home/javed/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#6 Foam:olyPatch::New(Foam::word const&, Foam::word const&, int, int, int, Foam:olyBoundaryMesh const&) in "/home/javed/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#7 Foam:olyMesh:olyMesh(Foam::IOobject const&, Foam::Xfer<Foam::Field<Foam::Vector<double> > > const&, Foam::List<Foam::cellShape> const&, Foam::List<Foam::List<Foam::face> > const&, Foam::List<Foam::word> const&, Foam::List<Foam::word> const&, Foam::word const&, Foam::word const&, Foam::List<Foam::word> const&, bool) in "/home/javed/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#8 Foam::blockMesh::createTopology(Foam::IOdictionary &) in "/home/javed/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/blockMesh"
#9 Foam::blockMesh::blockMesh(Foam::IOdictionary&) in "/home/javed/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/blockMesh"
#10 main in "/home/javed/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/blockMesh"
#11 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#12 _start at /usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/i386/elf/start.S:122
Floating point exception
Javed 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 14:53
Axisymmetric Boundary condition Mohit Singh SU2 3 July 15, 2015 09:19
[mesh manipulation] Converting axisymmetric mesh into fully 3D mesh tomloh OpenFOAM Meshing & Mesh Conversion 0 April 29, 2012 20:31
Difference of final temperature between a plane and an axisymmetric geometry douchka FLUENT 0 July 7, 2011 08:38
URGENT ! Need help on Axisymmetric Flow ! Suman Kumar Main CFD Forum 1 November 20, 2001 14:51


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