CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

symmetry and symmetryPlane boundary condition difference in OpenFOAM

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 1 Post By student666
  • 1 Post By smodh
  • 1 Post By Tobi

Reply
 
LinkBack Thread Tools Display Modes
Old   May 9, 2017, 09:05
Default symmetry and symmetryPlane boundary condition difference in OpenFOAM
  #1
New Member
 
Sachin
Join Date: Sep 2016
Location: Poitiers,France
Posts: 17
Rep Power: 2
smodh is on a distinguished road
Hello,
I am working on a EHD problem. In a this problem I have to use symmetry Boundary condition. So should I use symmetry or symmetryPlane Boundary condition. In a both cases my result are diffferent.
So my question is any body know the difference between symmetry and symmetryPlane boundary condition?

Thank you.
smodh is offline   Reply With Quote

Old   May 9, 2017, 13:30
Default
  #2
Senior Member
 
M. C.
Join Date: May 2013
Location: Italy
Posts: 227
Rep Power: 10
student666 is on a distinguished road
This is an usage answer.
If you set symmetryPlane bc, you MUST have all normals of the symmetry patch perfectly aligned.
Symmetry is a more flexible bc.
For example, I got OF to complain as one normal was 1e15 not aligned or something similar....
By a calculation point of view, i think that symmetry generates errors as higher as the misalignment of the normals...I would say diffusion...but I would like to be corrected by someone else on this forum and I would like to have more informations too...
Regards
smodh likes this.
student666 is offline   Reply With Quote

Old   May 10, 2017, 08:32
Default
  #3
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,850
Blog Entries: 6
Rep Power: 32
Tobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
I cannot proof everything but I guess it is correct. However, I expect that symmetryPlane and symmetry should give the same results.

symmetry was introduced in 2.3.0 (I guess) and is exactly the same than symmetryPlane in all previous versions. However, the old symmetryPlane introduced numerical errors to pointFields (think about mesh motion) and that was the reason why they introduced the new symmetryPlane for 100% aligned patches. Even groups of patches are not allowed here anymore. More informations are here: https://openfoam.org/release/2-3-0/numerics/

The last weeks I checked it out in more detail. The symmetryPlane is more strict. As already mentioned, all normals has to be equal. For the meshes I generate with snappyHexMesh, I was never able to use symmetryPlane.

But again, I would expect that both should give the same results if the planes are 100% aligned and the normals are equal.

The only differences in both codes are the function named snGradTransformDiag. However, I did not check out what this function is doing. But again, I would expect both to be equal for really flat symmetry planes.

Could you please define what different results mean? Is is complete different or slighty. Some quantitive results would be nice to know
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   May 10, 2017, 09:20
Default
  #4
New Member
 
Sachin
Join Date: Sep 2016
Location: Poitiers,France
Posts: 17
Rep Power: 2
smodh is on a distinguished road
Hello Holzmann,
Thanks for your reply and openfoam youtube tutorial. I learn a lot from them.
I am working on a Electrohydrodynamic problem.
In my own solver I solved EHD equation. In a EHD channel problem, from top wall I am using as a symmetry boundary condition. For that I used symmetry and symmetryPlane BC. In a both cases my result were different. Here I am attaching the image of result. N_N is a negative charge density.

Symmetry: http://imgur.com/a/fiqhP
SymmetryPlane: http://imgur.com/a/tcbQG

Last edited by Tobi; May 10, 2017 at 10:28. Reason: Cleaned post | missing image
smodh is offline   Reply With Quote

Old   May 10, 2017, 10:56
Default
  #5
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,850
Blog Entries: 6
Rep Power: 32
Tobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Wow, that are complete different results. Based on the fact that you could using both boundaries, the plane is really planar. Hmmm. It seems that you have a yet coming out, right?

I just made a test case to check it out. The outcome, both are equal:

  • left and right (inletOutlet for U and fixed for p)
  • top is symmetry or symmetryPlane
  • bottom is wall + inlet
  • front and back are empty
  • Incompressible solver and steady state (simpleFoam)
  • Both converged after 367 iterations
See also the attachment.

I have no idea about the magnetic field and the calculation but you have your own solver, right. So please make sure that all fields will have the correct boundary conditions. In addition I know from my colleague that MHD is really not an easy task. However, good luck.
Attached Images
File Type: png quantitativCompare.png (18.0 KB, 33 views)
File Type: jpg symmetryVsSymmetryPlane.jpg (53.8 KB, 42 views)
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   May 11, 2017, 04:03
Default
  #6
New Member
 
Sachin
Join Date: Sep 2016
Location: Poitiers,France
Posts: 17
Rep Power: 2
smodh is on a distinguished road
Bonjour Holzmann,

you were correct....There is a no difference between symmetry and symmetryPlane boundary condition.
I made some stupid mistake in my physical parameter description.
Sorry for your convenience. Thanks for explaining boundary condition.
I also found explaining about snGradTransformDiag. please check following link.
http://xiaopingqiu.github.io/2016/04...-in-OpenFOAM3/
it is Chinese or japanise language but use google translator. it will help for understanding.

Thanks and have a nice day!!!!
shang likes this.
smodh is offline   Reply With Quote

Old   May 11, 2017, 04:10
Default
  #7
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,850
Blog Entries: 6
Rep Power: 32
Tobi 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,

there should be a difference, if the patches are not 100% aligned but then, you cannot use symmetryPlane I never checked the transform() function because I was too lazy. Good to know that there is something available. Maybe I will read it through or (what I prefer), read the code. But I guess your link would help other's too.

By the way, there are no stupid mistakes. I also make mistakes during programming. The important thing is that you can resolve it and thus you gain knowledge and you probably will not run into that mistake again. But everybody is doing mistakes. Yesterday I realzied a mistake in my latest contribution which was merged to OpenFOAM-dev. So at least I am not an expert and perfect. I make enough mistakes.

I would be interested which mistake you made.
However, good to know that you get the same results now.
shang likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
symmetryPlane boundary conditions UHGAR OpenFOAM Running, Solving & CFD 0 April 8, 2017 00:20
Boundary condition Youngmj OpenFOAM Pre-Processing 1 October 19, 2016 01:19
How to set uniform heating boundary condition? Sargam05 OpenFOAM 0 September 11, 2012 10:09
Import problem ARC Open Source Meshers: Gmsh, Netgen, CGNS, ... 0 February 27, 2010 11:56
Slip boundary condition what is inside normunds OpenFOAM Running, Solving & CFD 2 June 4, 2007 06:45


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