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   July 1, 2011, 10:30
Default
  #101
Member
 
David P. Schmidt
Join Date: Mar 2009
Posts: 72
Rep Power: 17
schmidt_d is on a distinguished road
I am afraid that I cannot quite understand what you are asking. Do you mean "What other commands are involved in the process" ?

If you were starting from Gambit, for example, this is a three step process.
1) Convert your 2D Gambit mesh to OpenFOAM format
2) Convert the 2D mesh to a 1-cell deep axial mesh with makeAxialMesh
3) Use collapseEdges to remove the degenerate edges along the axis.

I'll quote from the wiki page about step #3.

"The collapseEdges utility should remove these degenerate edges (and the faces that go with it) and stitch the mesh together. For an application like this, you would want to use collapseEdges with a very small length scale argument and an angle argument near 180 degrees."

Regards,
DPS
schmidt_d is offline   Reply With Quote

Old   July 1, 2011, 14:11
Default
  #102
New Member
 
hameurlaine
Join Date: Jul 2009
Posts: 27
Rep Power: 17
louiza is on a distinguished road
Hi gschaider,

Thank you very much for the website, I can access to this one

Thank's a lot
louiza is offline   Reply With Quote

Old   September 24, 2011, 04:18
Default Hello Gschaider
  #103
Member
 
Gitesh
Join Date: Jan 2010
Location: Finland
Posts: 73
Rep Power: 16
Gitesh P is on a distinguished road
Hello Gschaider,

I am new at OpenFoam environment. I would like to ask you that...Is it possible to switch axisymmetric BC in OpenFoam ?

BR,
Gitesh
Gitesh P is offline   Reply With Quote

Old   April 22, 2012, 05:14
Smile Runing Test case step by step
  #104
Member
 
Amin Shariat KHah
Join Date: Apr 2011
Location: Shiraz
Posts: 86
Rep Power: 15
amin144 is on a distinguished road
Hello Dear Foamers
Especially Dear Bernhard

I want to run testCase and doing below steps:
(I think this thread need a post that describe process step by step like this)

(My OF version: openFoam 1.5-dev)
1-Download files of utility and after Compile makeAxilMesh using "wmake all"---> well done
2-Download "testCase" files
3-Go to testCase Directory
4-Run "blockMesh"----> well done
5-Run "makeAxialMesh -axis movingWall -wede frontAndBack -overwrite" --->well done
6-Run "paraFoam" and can see wedge shape grid
7-Run "collapseEdges 0.0001 175 -overwrite" shows below message:


Create time

Create polyMesh for time = 0

Merging:
edges with length less than 0.0001 meters
edges split by a point with edges in line to within 175 degrees

Collapsing 21 small edges
Morphing ...
Collapsing 0 small edges
Collapsing 0 in line edges
Max face area:4.36194e-05
Collapse area factor:1e-09
Collapse area:4.36194e-14
Collapsing 0 small high aspect ratio faces
Writing collapsed mesh to time 0
End


8-Run "icoFoam" and it runs without any problem!

-----------------------------------------------------
-----------------------------------------------------
Queations:

1))Is my Steps all True? Isn't anything wrong?

2))What does this Case physically show ? Only a full closed cylinder whitout any flow?

3))Any body can mail me a test case for Flow in a simple axisymmetric pipe?
I will appreciat if anybody upload a pipe case for using everyone for test beside this simple and maybe unused case

-------------------------------------------------------
-------------------------------------------------------
shariatkhah@gmail.com

Thanks
amin144 is offline   Reply With Quote

Old   April 23, 2012, 20:31
Default
  #105
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 amin144 View Post
Hello Dear Foamers
Especially Dear Bernhard

I want to run testCase and doing below steps:
(I think this thread need a post that describe process step by step like this)

(My OF version: openFoam 1.5-dev)
1-Download files of utility and after Compile makeAxilMesh using "wmake all"---> well done
2-Download "testCase" files
3-Go to testCase Directory
4-Run "blockMesh"----> well done
5-Run "makeAxialMesh -axis movingWall -wede frontAndBack -overwrite" --->well done
6-Run "paraFoam" and can see wedge shape grid
7-Run "collapseEdges 0.0001 175 -overwrite" shows below message:


Create time

Create polyMesh for time = 0

Merging:
edges with length less than 0.0001 meters
edges split by a point with edges in line to within 175 degrees

Collapsing 21 small edges
Morphing ...
Collapsing 0 small edges
Collapsing 0 in line edges
Max face area:4.36194e-05
Collapse area factor:1e-09
Collapse area:4.36194e-14
Collapsing 0 small high aspect ratio faces
Writing collapsed mesh to time 0
End


8-Run "icoFoam" and it runs without any problem!

-----------------------------------------------------
-----------------------------------------------------
Queations:

1))Is my Steps all True? Isn't anything wrong?

2))What does this Case physically show ? Only a full closed cylinder whitout any flow?

3))Any body can mail me a test case for Flow in a simple axisymmetric pipe?
I will appreciat if anybody upload a pipe case for using everyone for test beside this simple and maybe unused case

-------------------------------------------------------
-------------------------------------------------------
shariatkhah@gmail.com

Thanks
If we're talking about the same case (the one in the SVN) then it is basically a driven cavity where the axis does not go through the edge of the geometry. Therefor collapsing is not needed (for that case)
amin144 likes this.
gschaider is offline   Reply With Quote

Old   April 27, 2012, 01:37
Default
  #106
New Member
 
Join Date: Mar 2012
Posts: 27
Rep Power: 14
tomloh is on a distinguished road
Hello Foamers,

I am trying to use makeAxialMesh to convert mt 2D pipe into a 3D one. I'm using the steps listed below, I believe they are all correct?

01) Put rotationDict into the system
02) Run $ makeAxialMesh -axis center -wedge frontAndBack (This created a folder 1)
03) Backup constant/polyMesh into constant/polyMesh-2Dorg
04) $ mv 1/polyMesh constant/.
05) $ rm -rf 1
06) $ unset FOAM_SIGFPE
07) run $ collapseEdges 1e-8 180
08) Backup constant/polyMesh into constant/polyMesh-2DAxiorg
09) $ mv 1/polyMesh constant/.
10) $ rm -rf 1
11) checkMesh

When running checkMesh I get the following error and I'm not sure how to fix it.

Checking geometry...
Overall domain bounding box (0 0 0.47819) (25 0.5 0.52181)
Mesh (non-empty, non-wedge) directions (1 1 0)
Mesh (non-empty) directions (1 1 1)
Wedge frontAndBack_pos with angle 2.49748 degrees
***Wedge patch frontAndBack_pos not planar. Point (0.25 0.0717724 0.518679) is not in patch plane by 5.12279e-07 meter.
Boundary openness (1.66027e-20 0 -6.63727e-18) OK.
Max cell openness = 9.3096e-17 OK.
Max aspect ratio = 7.50424 OK.
Minumum face area = 0.00020772. Maximum face area = 0.0172689. Face area magnitudes OK.
Min volume = 5.193e-05. Max volume = 0.000363295. Total volume = 0.272622. Cell volumes OK.
Mesh non-orthogonality Max: 0 average: 0
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 0.330802 OK.
Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End

Any help or a push in the right direction would be helpful.

Thanks,
Tom
tomloh is offline   Reply With Quote

Old   April 27, 2012, 05:30
Default
  #107
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 tomloh View Post
Hello Foamers,

I am trying to use makeAxialMesh to convert mt 2D pipe into a 3D one. I'm using the steps listed below, I believe they are all correct?

01) Put rotationDict into the system
02) Run $ makeAxialMesh -axis center -wedge frontAndBack (This created a folder 1)
03) Backup constant/polyMesh into constant/polyMesh-2Dorg
04) $ mv 1/polyMesh constant/.
05) $ rm -rf 1
06) $ unset FOAM_SIGFPE
07) run $ collapseEdges 1e-8 180
08) Backup constant/polyMesh into constant/polyMesh-2DAxiorg
09) $ mv 1/polyMesh constant/.
10) $ rm -rf 1
11) checkMesh

When running checkMesh I get the following error and I'm not sure how to fix it.

Checking geometry...
Overall domain bounding box (0 0 0.47819) (25 0.5 0.52181)
Mesh (non-empty, non-wedge) directions (1 1 0)
Mesh (non-empty) directions (1 1 1)
Wedge frontAndBack_pos with angle 2.49748 degrees
***Wedge patch frontAndBack_pos not planar. Point (0.25 0.0717724 0.518679) is not in patch plane by 5.12279e-07 meter.
Boundary openness (1.66027e-20 0 -6.63727e-18) OK.
Max cell openness = 9.3096e-17 OK.
Max aspect ratio = 7.50424 OK.
Minumum face area = 0.00020772. Maximum face area = 0.0172689. Face area magnitudes OK.
Min volume = 5.193e-05. Max volume = 0.000363295. Total volume = 0.272622. Cell volumes OK.
Mesh non-orthogonality Max: 0 average: 0
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 0.330802 OK.
Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End

Any help or a push in the right direction would be helpful.

Thanks,
Tom
Have you tried checkMesh after MAM (makeAxialMesh) too? Just to make sure that the problem was not introduced by collapseEdges.

Also try this: if writeFormat in controlDict is set to ascii then try setting writePrecision to higher number (12 or so). Reset after the mesh manipulation
gschaider is offline   Reply With Quote

Old   April 27, 2012, 06:01
Default
  #108
New Member
 
Join Date: Mar 2012
Posts: 27
Rep Power: 14
tomloh is on a distinguished road
Hi Bernhard,

Thanks for your quick reply. I just ran checkMesh after MAM and I have the error as shown below. My writeFormat is ascii and I have tried changing the writePrecision from 6 up to 24.

Checking geometry...
Overall domain bounding box (0 0 0.478190306317332003427367) (25 0.5 0.521809693682668052083784)
Mesh (non-empty, non-wedge) directions (1 1 0)
Mesh (non-empty) directions (1 1 1)
Wedge frontAndBack_pos with angle 2.49762356858921519275896 degrees
Wedge frontAndBack_neg with angle 2.49762356858906953149813 degrees
All edges aligned with or perpendicular to non-empty directions.
Boundary openness (4.17361820446499761229836e-21 0 -6.63727839475413910092676e-18) OK.
Max cell openness = 9.63289024144322500065237e-17 OK.
Max aspect ratio = 7.50427090517739259212249 OK.
***Zero or negative face area detected. Minimum area: 0
<<Writing 100 zero area faces to set zeroAreaFaces
Min volume = 0.000140685850519272698721726. Max volume = 0.00080548557824244697029431. Total volume = 0.333707879182710054344341. Cell volumes OK.
Mesh non-orthogonality Max: 87.4369863522491215235277 average: 17.0098551033114944175395
*Number of severely non-orthogonal faces: 87.
Non-orthogonality check OK.
<<Writing 87 non-orthogonal faces to set nonOrthoFaces
***Error in face pyramids: 187 faces are incorrectly oriented.
<<Writing 187 faces with incorrect orientation to set wrongOrientedFaces
***Max skewness = 7.96818897130483527746492, 98 highly skew faces detected which may impair the quality of the results
<<Writing 98 skew faces to set skewFaces
Coupled point location match (average 0) OK.

Failed 3 mesh checks.

End

Increasing the writePrecisioin to 12 reduce the failed mesh checks from 4 to 3, but further increases did not change anything. Could this be a fundamental problem with my 2D mesh?

Tom
tomloh is offline   Reply With Quote

Old   April 27, 2012, 06:43
Default
  #109
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 tomloh View Post
Hi Bernhard,

Thanks for your quick reply. I just ran checkMesh after MAM and I have the error as shown below. My writeFormat is ascii and I have tried changing the writePrecision from 6 up to 24.

Checking geometry...
Overall domain bounding box (0 0 0.478190306317332003427367) (25 0.5 0.521809693682668052083784)
Mesh (non-empty, non-wedge) directions (1 1 0)
Mesh (non-empty) directions (1 1 1)
Wedge frontAndBack_pos with angle 2.49762356858921519275896 degrees
Wedge frontAndBack_neg with angle 2.49762356858906953149813 degrees
All edges aligned with or perpendicular to non-empty directions.
Boundary openness (4.17361820446499761229836e-21 0 -6.63727839475413910092676e-18) OK.
Max cell openness = 9.63289024144322500065237e-17 OK.
Max aspect ratio = 7.50427090517739259212249 OK.
***Zero or negative face area detected. Minimum area: 0
<<Writing 100 zero area faces to set zeroAreaFaces
Min volume = 0.000140685850519272698721726. Max volume = 0.00080548557824244697029431. Total volume = 0.333707879182710054344341. Cell volumes OK.
Mesh non-orthogonality Max: 87.4369863522491215235277 average: 17.0098551033114944175395
*Number of severely non-orthogonal faces: 87.
Non-orthogonality check OK.
<<Writing 87 non-orthogonal faces to set nonOrthoFaces
***Error in face pyramids: 187 faces are incorrectly oriented.
<<Writing 187 faces with incorrect orientation to set wrongOrientedFaces
***Max skewness = 7.96818897130483527746492, 98 highly skew faces detected which may impair the quality of the results
<<Writing 98 skew faces to set skewFaces
Coupled point location match (average 0) OK.

Failed 3 mesh checks.

End

Increasing the writePrecisioin to 12 reduce the failed mesh checks from 4 to 3, but further increases did not change anything. Could this be a fundamental problem with my 2D mesh?

Tom
15 digits is the maximum that makes sense (double-precision doesn't store more). The three "problems" are exactly what collapseEdges takes care of (the axis-patch "degenerated" to a collection of zero-area faces - that is the first error. The others are following from this)

The fourth error you're referring to is the "planar"-error in your original posting, right? And a subsequent collapseEdge should remove the other 3
davibarreira likes this.
gschaider is offline   Reply With Quote

Old   April 27, 2012, 20:17
Default
  #110
New Member
 
Join Date: Mar 2012
Posts: 27
Rep Power: 14
tomloh is on a distinguished road
Wooooooot!!! Everything works XD

Thanks Bernhard!

Tom
tomloh is offline   Reply With Quote

Old   May 1, 2012, 06:06
Default
  #111
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 tomloh View Post
Wooooooot!!! Everything works XD

Thanks Bernhard!

Tom
Great. Could you add a few words about this (write precision and errors to be ecpected in checkMesh) to the Wiki-page of makeAxialMesh so that the knowledge is preserved for future generations?
gschaider is offline   Reply With Quote

Old   June 15, 2012, 07:03
Default
  #112
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 16
lindstroem is on a distinguished road
Hello Tom,

To support Bernhards post, could you please give some words about your adjustments?

Did you get rid of the "Wedge patch frontAndBack_pos not planar"-error by increasing the writePrecision? I get this error too, after MAM with write precision to 15.. But for me, this is the only error..

I get the error (from MAM)
Quote:
--> FOAM Warning : End points of axis ((0 1e-05 0) (0 1.00001 0)) are 2.49999999999977e-05 and 2.49999999999977e-05 away from plane (0 0 1) (0.00357141451220821 0.00188587665408491 2.49999999999977e-05)
Radius to axis: min = 2.49999999999977e-05 max = 0.0100100312187325
Calculated Distance of left to axis is 2.6090484684131e-05
and then checkMesh reports
Quote:
***Wedge patch frontAndBack_pos not planar. Point (5e-05 0 2.74383978821424e-05) is not in patch plane by 9.27864137950134e-07 meter.
Thanks!
lindstroem is offline   Reply With Quote

Old   June 15, 2012, 09:48
Default
  #113
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 lindstroem View Post
Hello Tom,

To support Bernhards post, could you please give some words about your adjustments?

Did you get rid of the "Wedge patch frontAndBack_pos not planar"-error by increasing the writePrecision? I get this error too, after MAM with write precision to 15.. But for me, this is the only error..

I get the error (from MAM)
and then checkMesh reports
Thanks!
The problem here is that MAM assumes that the axis is centrally aligned to the original mesh in respect to the "ignored" coordinate (the one where only one cell layer eists). Otherwise you will get an asymetric wedge (faces are collapsed towards the axis) - have a look in paraview and you'll see what I mean. Either move the mesh (in your case preferable) or the axis so that this requirement is satisfied.
gschaider is offline   Reply With Quote

Old   June 15, 2012, 09:56
Default
  #114
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 16
lindstroem is on a distinguished road
Hi Bernhard,

thanks for your comment.
i tried that too, but then I am getting a floating Point Exception in checkMesh, although the mesh "looks good" in paraview.. I keep on digging where it comes from, but maybe it wont work for my mesh..
lindstroem is offline   Reply With Quote

Old   June 15, 2012, 18:12
Default
  #115
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 lindstroem View Post
Hi Bernhard,

thanks for your comment.
i tried that too, but then I am getting a floating Point Exception in checkMesh, although the mesh "looks good" in paraview.. I keep on digging where it comes from, but maybe it wont work for my mesh..
Have you removed the faces of size 0 with collapseEdges? But even then checkMesh shouldn't crash
gschaider is offline   Reply With Quote

Old   June 18, 2012, 06:29
Default
  #116
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 16
lindstroem is on a distinguished road
Hi Berhnhard,

I think the error came due to an inconsistency with the boundary definitions in the poly Mesh..
After some tries with the parameters for collapsEdges it seems that there is no error anymore.. can't believe it yet

Thanks!
lindstroem is offline   Reply With Quote

Old   August 3, 2012, 04:25
Default plz help me
  #117
Member
 
vahid
Join Date: Feb 2012
Location: Mashhad-Iran
Posts: 80
Rep Power: 13
vahid.najafi is an unknown quantity at this point
Hi dear Bernhard Gschaider!

I used 2Daxisymmetric for openFoam,and for this used makeAxialmesh and coolapseEdge to make wedge type for boundary.
I make it,
but my result after run is not correct and differrent with 3Dmodel.

if what i did in modelling 2DAxisymetric is not correct please tell me???
Thanks a lot.
vahid.najafi is offline   Reply With Quote

Old   August 6, 2012, 05:36
Default plz help me???
  #118
Member
 
vahid
Join Date: Feb 2012
Location: Mashhad-Iran
Posts: 80
Rep Power: 13
vahid.najafi is an unknown quantity at this point
dear Foamers.
I have used 2Daxisymmetric for openFoam.
for this reason used :
1)makeAxialMesh -axis axis.4 -wedge frontAndBackPlanes
2)collapseEdges 1e-8 180
to make wedge type for boundary.

after do above,added for me 2 files.(seen in pic 1)

I have copied polyMesh from file:2e-08 to polyMesh in constant(seen in pic 2),and then I have deleted files: 1e-08 and 2e-08 .(seen in pic 3)

and after those I have correct B.C in file:0.
Then run paraFoam and (seen pic 4)
Is it my way true???


but my result after run is not correct and differrent with 3Dmodel.
if my work in modelling 2DAxisymetric is not correct please tell me???

Thanks for your attention
Attached Images
File Type: jpg 1.jpg (20.9 KB, 30 views)
File Type: jpg 2.jpg (27.7 KB, 26 views)
File Type: jpg 3.jpg (23.3 KB, 28 views)
File Type: jpg 4.jpg (77.8 KB, 51 views)
vahid.najafi is offline   Reply With Quote

Old   August 6, 2012, 20:01
Default
  #119
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 vahid.najafi View Post
dear Foamers.
I have used 2Daxisymmetric for openFoam.
for this reason used :
1)makeAxialMesh -axis axis.4 -wedge frontAndBackPlanes
2)collapseEdges 1e-8 180
to make wedge type for boundary.

after do above,added for me 2 files.(seen in pic 1)

I have copied polyMesh from file:2e-08 to polyMesh in constant(seen in pic 2),and then I have deleted files: 1e-08 and 2e-08 .(seen in pic 3)

and after those I have correct B.C in file:0.
Then run paraFoam and (seen pic 4)
Is it my way true???


but my result after run is not correct and differrent with 3Dmodel.
if my work in modelling 2DAxisymetric is not correct please tell me???

Thanks for your attention
The way you do it looks alright and the geometry definitely looks wedgy. By using the -overwrite-option you can avoid the copying business.

In which way do the results differ?
gschaider is offline   Reply With Quote

Old   August 7, 2012, 03:44
Default Thanks.
  #120
Member
 
vahid
Join Date: Feb 2012
Location: Mashhad-Iran
Posts: 80
Rep Power: 13
vahid.najafi is an unknown quantity at this point
Hi Bernhard Gschaider.
Thanks for your answer Bernhard,My problem was solved.
thanks alot.
vahid.najafi 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 00:55.