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

[mesh manipulation] 2D Axisymmetric Model in OpenFOAM 4.0

Register Blogs Community New Posts Updated Threads Search

Like Tree8Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 9, 2017, 09:21
Default 2D Axisymmetric Model in OpenFOAM 4.0
  #1
Member
 
Matt Ridzon
Join Date: Jun 2014
Posts: 91
Rep Power: 12
m_ridzon is on a distinguished road
I have two questions about modelling 2D axisymmetric flows in OpenFOAM 4.0 in Linux.

1) I recently learned about the following website which contains a utility to take a mesh and collapse it into a wedge thereby preparing it for an axisymmetric simulation. The header of the website states the valid versions, but stops at v2.0. Does anybody know if this utility works with v4.0?
http://openfoamwiki.net/index.php/Contrib_MakeAxialMesh

2) I understand that the aforementioned utility takes a mesh and collapses one side to form a wedge. But that web page, nor that OpenFOAM User Manual Sec 5.3.3 (https://cfd.direct/openfoam/user-gui...25-1830005.3.3) indicate what the starting size of the block should be before collapsing. In other words, using the lid-driven-cavity tutorial from the User Manual, its Z thickness is 0.1m. Collapsing this will produce a wedge of a certain angle. However, if the Z thickness instead started at some other arbitrary number (e.g., 2.0m), the resulting wedge angle will be different after collapsing. So presumably, the wedge angle will have an effect on the simulation, correct? If so, what should the wedge angle be?

Thanks,
M Ridzon
m_ridzon is offline   Reply With Quote

Old   April 12, 2017, 15:37
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Ridzon,

I checked the site you mentioned and I guess it is very out dated. For 2D mesh generation you can extrudeMesh utility that come with OpenFOAM. Tutorials for 2D meshes are given in my website.

The second question is related to - how the mesh is extruded. Normally we extrude from the x, y, or z axis (starting from origin). If the plane you want to extrude is not aligned with these corresponding planes (origin point and vector x, y, z), the resulting mesh is different. So if you want to make a 2D wedge mesh, you should put the patch that should be extruded to one of the origin's planes. However, maybe it is not necessary anymore and we can specify some alternative origin for extruding (just check the extrudeMeshDict).

Good luck and I hope I got your question right (especially the second one).
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   April 12, 2017, 17:46
Default
  #3
Member
 
Matt Ridzon
Join Date: Jun 2014
Posts: 91
Rep Power: 12
m_ridzon is on a distinguished road
Tobi,

Thanks for your response, but I'm not sure you understood my second question. Please see the attached thumbnail with my example. In it, I illustrated two examples where I'm collapsing in the XZ plane. In the first scenario, the Z dimension of the block is 0.4, while in the second scenario, the Z dimension is 0.6. After collapsing, this produces wedges of different angles; alpha = 21.8° in the first and 31.0° in the second. So by merely changing the Z dimension of the original block, the wedge changed shaped. How does the software know how to deal with this? Or is there a requirement that the wedge always collapse to a specified angle (e.g., 5 degrees) thus forcing the user to ensure the initial Z dimension is appropriate to achieve that specified angle upon collapsing? Or does the software not care what angle the wedge has?

Thanks again!
M Ridzon
Attached Images
File Type: jpg Wedge Profile.jpg (40.8 KB, 717 views)
m_ridzon is offline   Reply With Quote

Old   April 12, 2017, 18:12
Default
  #4
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 18
wouter is on a distinguished road
hello m_ridzon,
As far as I know the third dimension is ignored, so in your case only xy plane is used than a 5 deg wedge is made with this plane. But as Tobi describes the z plane will become the axis of the wedge.

Hope this helps
Wouter
wouter is offline   Reply With Quote

Old   April 13, 2017, 01:35
Default
  #5
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
The resulting angel may be configured in system.rotataionDict->wedgeAngle

The z coordinate will be ignored.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   April 13, 2017, 04:05
Default
  #6
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,

I just want to complete the not 100% correct things here and want to sum up:
  • The angle should be 5° (as Wouter said for 2D); checkMesh will tell you the angle
  • The angle can be adjusted in the extrudePatchDict (I am talking always about the latest Foundation FOAM version, maybe the extend version is different and Uwe refers to this version)
  • The z-direction will not be neglected in a way one expect while using the word neglected; only the treatment of the faces at the patches is different. FOAM uses FVM, so we need 3D volume elements. The empty or wedge patches are then treat the 3D case in a special manner to enable 2D and 1D analyzes (maybe you can say ignoring but I guess this expression is not the best choice; people might be confused why we even use a 3D mesh for 2D simulations); even in 1D simulations we need a 3D mesh based on the FVM
__________________
Keep foaming,
Tobias Holzmann

Last edited by Tobi; April 13, 2017 at 07:51. Reason: I mixed up two threads.
Tobi is offline   Reply With Quote

Old   April 13, 2017, 10:17
Default
  #7
Member
 
Matt Ridzon
Join Date: Jun 2014
Posts: 91
Rep Power: 12
m_ridzon is on a distinguished road
Thanks folks! Yes, I'm using the Foundation FOAM version 4.0. I haven't messed with the Extend version at all.


This is very interesting and I'm glad I asked. Unless I missed it, I was unable to find this tiny, but vital detail in the User Manual.
Quote:
The angle should be 5° (as Wouter said for 2D); checkMesh will tell you the angle
Suppose you didn't otherwise know and had a 10° wedge, then how would you know that the wedge must instead be 5°? I understand checkMesh will reveal the angle, but does it also alert you to it needing to be precisely 5°? Or does the solver alert you if it's not 5°?

Thanks again!
M Ridzon
m_ridzon is offline   Reply With Quote

Old   April 17, 2017, 03:51
Default
  #8
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
> Or does the solver alert you if it's not 5°?

I am not quite sure about this, but I assume that the wedge boundary condition is elaborated for this angle.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   April 21, 2017, 16:58
Default
  #9
Senior Member
 
tareqkh's Avatar
 
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 17
tareqkh is on a distinguished road
Hi,

Typical wedge angle would be according the CFD community <5 degrees. I used before different wedge angle i.e 10, 15, and 25 degrees to see how the angle would effect my solution and found that values below 5 would give better solution (You could try that too if you want a further investigation). Another question that of my interests about the wedge bc is in the following https://www.cfd-online.com/Forums/op...th-behind.html
tareqkh is offline   Reply With Quote

Old   April 21, 2017, 17:54
Default
  #10
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
The angle of 5 degree is mentioned in the user guide. So I would guess that this is the angle you should use and nothing else.

Sent from my HTC One mini using CFD Online Forum mobile app
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   April 21, 2017, 18:11
Default
  #11
Senior Member
 
tareqkh's Avatar
 
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 17
tareqkh is on a distinguished road
Quote:
Originally Posted by Tobi View Post
The angle of 5 degree is mentioned in the user guide. So I would guess that this is the angle you should use and nothing else.

Sent from my HTC One mini using CFD Online Forum mobile app
Well, as I mentioned earlier, I used values of the wedge angle up to 25 degrees and the results didn't vary so much but the stranded is below 5 degree (I can show you the results if you are interested). The question is what sort of trick do we use to the 3D Cartesian NS in order to make it axisymmetric? What is the math behind it?

Regards,
tareqkh is offline   Reply With Quote

Old   April 22, 2017, 02:22
Default
  #12
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
> What is the math behind it?

As far as I understand it: There is no special math. The geometry is warped into a real wedge. The only difference is the boundary condition, which changes from empty to wedge. I assume, that a slip b.c. would give similar results.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   April 22, 2017, 09:22
Default
  #13
Member
 
Matt Ridzon
Join Date: Jun 2014
Posts: 91
Rep Power: 12
m_ridzon is on a distinguished road
Quote:
The angle of 5 degree is mentioned in the user guide. So I would guess that this is the angle you should use and nothing else.
I couldn't previously find anything explicitly stated in the User Manual. But after digging again today, I see that Figure 5.2 therein indicates 5° wedge angle. But in the bullets below it, in the beginning of Section 5.2.1, they mention 1° as an example. So although it's not entirely clear about using nothing but 5°, I'm going to assume 5° is a standard convention and leave it at that. Thanks for the help!

Quote:
Well, as I mentioned earlier, I used values of the wedge angle up to 25 degrees and the results didn't vary so much but the stranded is below 5 degree (I can show you the results if you are interested). The question is what sort of trick do we use to the 3D Cartesian NS in order to make it axisymmetric? What is the math behind it?
I'm probably less experienced than many others here, but I might be able to add some small comment to this statement/question. The 3D Navier-Stokes equations are derived in many college textbooks in Cartesian coordinates. Usually in that same area of the book, they will go further to derive them in cylindrical coordinates. A classic, well known book that I know for sure has them, is Schlichting's "Boundary Layer Theory." I cannot say exactly how OpenFOAM uses them in its source code to complete the computations, since I'm not that well versed on the deeper inner workings of the code. But in terms of understanding the math that defines cylindrical NS equations, check out a fluids book; many have the cylindrical system derived therein. For completeness Tareqkh, I'll duplicate my response here over to your post (https://www.cfd-online.com/Forums/op...th-behind.html) since it's dedicated to your question about the math.
m_ridzon is offline   Reply With Quote

Old   January 11, 2018, 06:45
Default
  #14
New Member
 
karundev
Join Date: Jun 2017
Location: India
Posts: 25
Rep Power: 9
krndv is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Hi Ridzon,

I checked the site you mentioned and I guess it is very out dated. For 2D mesh generation you can extrudeMesh utility that come with OpenFOAM. Tutorials for 2D meshes are given in my website.

The second question is related to - how the mesh is extruded. Normally we extrude from the x, y, or z axis (starting from origin). If the plane you want to extrude is not aligned with these corresponding planes (origin point and vector x, y, z), the resulting mesh is different. So if you want to make a 2D wedge mesh, you should put the patch that should be extruded to one of the origin's planes. However, maybe it is not necessary anymore and we can specify some alternative origin for extruding (just check the extrudeMeshDict).

Good luck and I hope I got your question right (especially the second one).
hello Tobi,
I have gone through your tut on 2d axi-symmetric cases. The tutorial is well posted and really helpful.

I need clarification in some basic doubts.

1. In background mess, is it required to specify patch names?
2. After snappy how you are changing patch names like 'maxZ, minZ' to 'front or back'?
3. Suppose if I define multiple cellzones in snappyHexMesh and if I convert it to wedge , will the cellzone be still marked?


Thank You
Tobi and parthigcar like this.
krndv is offline   Reply With Quote

Old   January 11, 2018, 08:20
Default
  #15
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi and thanks for your positive feedback,

1. no it is not required; generally my patch names come from the STL`s (depend on your mesh strategy)
2. Either manual by changing the names in constant/polyMesh/boundary or using the changeDictionary application. However, generally point #1 generates my boundary names (in other words, snappyHexMesh is responsible for it)
3. Good question, never checked it out. Could be but it can happen that it is removed. However, regeneration of the cell zones should not be a big deal. I refer to topoSet and setSet.
parthigcar likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   January 15, 2018, 07:00
Default Cellzone in wedge
  #16
New Member
 
karundev
Join Date: Jun 2017
Location: India
Posts: 25
Rep Power: 9
krndv is on a distinguished road
Hello,

Cellzone will remain marked even after converting geometry to wedge.
checked cellZone file and observed the changes to make sure that its not the old file (befor extrudeMesh) still existing.

Regards
Karundv
Tobi likes this.
krndv is offline   Reply With Quote

Old   January 17, 2018, 00:59
Default extrudeMesh
  #17
New Member
 
karundev
Join Date: Jun 2017
Location: India
Posts: 25
Rep Power: 9
krndv is on a distinguished road
Hello,

After extrudeMesh getting 5 error in checkMesh.
How this can be controlled? snappyHexMeshDict?
Attached Images
File Type: png checkmesh.png (133.4 KB, 171 views)
krndv is offline   Reply With Quote

Old   January 17, 2018, 02:22
Default
  #18
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
You extruded in the wrong direction. (neg. volume)
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   January 17, 2018, 02:41
Default
  #19
New Member
 
karundev
Join Date: Jun 2017
Location: India
Posts: 25
Rep Power: 9
krndv is on a distinguished road
hi,

I guess exruded direction is correct because I got the expected shape.
But checkMesh is showing error and simulation stopes with 'core dumped' message.

My snappyHexMesh finishes with this warning 'Finished meshing with 31280 illegal faces', but checkMesh showed Ok.
Again got 5 error in checkMesh after forming wedge.
Attached Images
File Type: png Screenshot from 2018-01-17 12-06-49.png (19.0 KB, 255 views)
krndv is offline   Reply With Quote

Old   January 17, 2018, 02:47
Default
  #20
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
In my opinion, I can see wrong oriented faces. To proof my statement, check the surface normal vectors in ParaView.

Code:
My snappyHexMesh finishes with this warning 'Finished meshing with 31280 illegal faces', but checkMesh showed Ok. 
Again got 5 error in checkMesh after forming wedge.
Then snappy cannot snap to the according surface and undo the changes. I provided a bunch of tutorials regarding snappyHexMesh on my website. I suggest you to check them out. Good luck.
__________________
Keep foaming,
Tobias Holzmann
Tobi 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
(FW-H OpenFOAM) Ffowcs-Williams and Hawking Acoustic model for OpenFOAM Alhasan OpenFOAM Post-Processing 8 March 28, 2023 13:52
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology wyldckat OpenFOAM 17 November 10, 2017 16:54
OpenFOAM 4.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 2 October 6, 2017 06:40
Simulating an aether model of EM using OpenFoam? lamare Electromagnetics 2 September 15, 2016 06:08
axisymmetric model issue prc Siemens 4 February 7, 2007 07:42


All times are GMT -4. The time now is 23:42.