Wall functions with symmetry

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

 February 17, 2012, 17:09 Wall functions with symmetry #1 New Member   Richard Moser Join Date: Aug 2009 Posts: 24 Rep Power: 10 Sponsored Links I am wanting to run a case on a sphere, but to save computational effort my geometry is a hemisphere, and I am using symmetry. My outer boundary is also a hemisphere (there is a good reason why I want this outer boundary to also be a hemisphere). I have used the cylinder tutorial (potentialFoam) as an example for how to set my case up. this suggests that all of my patches (the actual symmetry plane, the surface of my hemisphere and the hemispherical outer boundary) all need to be set to 'symmetryPlane@ in my 'boundary' file, and also have 'symmetryPlane' set as the initial conditions. However, I then have no patches left to actually set any initial conditions on. The case does run if I leave the outer boundary hemisphere set to 'patch', and then set the freestream velocity, and zerogradient in pressure, for the initial conditions. However, I still can't set any particular surface condition on the sphere body itself (e.g. zero velocity, and Spalding wall function for turbulence). How do I set these boundary conditions as well as keeping the symmetry condition? I am sure that I am missing something very obvious with this, but cannot see what it is.

 February 18, 2012, 02:30 #2 New Member     Ries Bouwman Join Date: Mar 2009 Location: Graz, Austria Posts: 28 Rep Power: 10 Hi, I'm afraid I do not quite understand the question. If the hemisphere is a wall, why does it get the boundary condition symmetry? Should the symmetry not be applied to the air? Maybe you can send a sketch of the situation? Ries Bouwman

February 18, 2012, 05:32
#3
New Member

Richard Moser
Join Date: Aug 2009
Posts: 24
Rep Power: 10
Ries,

Many thanks for your response, and sorry that I have not explained myself clearly enough. I have attached two images of the problem; the first shows the symmetry plane with the (surface) hemisphere in it, and the second shows the hemispherical outer boundary. (Please ignore the fact that the boundary is too close to the body, and the mesh is quite coarse - I am only using this as an example to get my real case working, the geometry of which I cannot show).

I agree that I want to set the inner sphere to be a wall really. However, if you look at tutorials/basic/potentialFoam/cylinder, you can see that they set the surface of the cylinder to 'symmetryPlane' (in the boundary file and the initial conditions). If I run my case (using simpleFoam) with the inner sphere condition set to 'wall', the calculation very quickly blows up (values for U > 1.0e20 and time step continuity errors > 1.0e10). The mesh I am actually using is a Fluent mesh, for which a good solution was obtained, so I do not believe there is an issue with it.

Attached Images
 snapshot.png (4.8 KB, 19 views) snapshot2.png (28.6 KB, 12 views)

February 19, 2012, 14:15
#4
New Member

Ries Bouwman
Join Date: Mar 2009
Location: Graz, Austria
Posts: 28
Rep Power: 10
Hi,
sorry for the delay in replying.

I agree with your idea of how to set the boundary conditions. Attached my view of it:
- inner sphere = wall
- plate = symmetry plane
- outer sphere = outlet (of some sort).

I have no access to OpenFOAM the next week (am in hospital...) so I could not check the settings in the tutorial. But since you checked it, it must be correct.

I find it strange that they set the inner sphere to symmetry, because obviously it is not a symmetry plane.

My experience with tetrahedral FLUENT meshes is: they rarely function well in OpenFOAM! If it runs well in FLUENT, this is not a guarantee it works in FOAM!

Could you send me the dictionary files of the tutorial?
Did you do a mesh check in OpenFOAM? Of the FLUENT mesh?
Did you try a mesh with snappyHexmesh? Might not be so pretty/easy due to the spheres... but worth a shot I think.

Regards

Ries
Attached Files
 BC.doc (66.0 KB, 10 views)
__________________
Dr. Ries Bouwman
ESI Group

004369917171525
@riesbouwman

February 20, 2012, 04:07
#5
New Member

Richard Moser
Join Date: Aug 2009
Posts: 24
Rep Power: 10
I have attached a zip file containing the cylinder tutorial case dictionary files.

The Fluent mesh is structured close to the body, then tetrahedral in the remainder of the field. I did use checkMesh, and it does complain about some high aspect ratio cells. This is because (I believe) the mesh is designed to resolve the boundary layer, hence very small first cell height.

I am looking at creating my own mesh, either using snappyHexMesh or gmsh, but am currently struggling with both of them (in snappyHexMesh to get the stl file properly into the domain, and in gmsh to remesh the surface stl file of the body).

I hope your hospital visit is nothing serious - don't worry about replying to my query, as there are more important things than OpenFOAM!

Regards

Richard
Attached Files
 dicts.tar.gz (2.2 KB, 6 views)

 February 20, 2012, 06:18 #6 New Member   Richard Moser Join Date: Aug 2009 Posts: 24 Rep Power: 10 Further to my previous message, I have now tried running the cylinder tutorial using boundary conditions which I think are suitable (i.e. symmetry only on the flow, cylinder set to wall), and it runs fine. I will go back to my sphere case and investigate other reasons for it not running.

 February 22, 2012, 15:09 #7 New Member     Ries Bouwman Join Date: Mar 2009 Location: Graz, Austria Posts: 28 Rep Power: 10 Dear Richard, I am fine. It is my son I am in the hospital for, but he is doing extremely well! If check mesh complaints, I would leave the FLUENT mesh and focus on getting a snappyHexmesh. Snappy is a very good tool and will produce very usable meshes for OpenFOAM. What do you mean with "getting the STL file properly in the domain"? That should be not too difficult to resolve. You sure gMesh is the best way forward for a 3D simulation? After your last comment, I did not look at the dictionary files yet, as it seems that "normal" CFD boundary conditions do seem to turn around "normal" convergence. Keep me postd. Ries __________________ Dr. Ries Bouwman Business Development ESI Group 004369917171525 @riesbouwman

 March 6, 2012, 03:28 #8 New Member   Richard Moser Join Date: Aug 2009 Posts: 24 Rep Power: 10 Ries, Sorry I haven't replied earlier - I have been travelling for work. The issue with snappyHexMesh is that it does not seem able to resolve my surface properly. I can get it to import the stl file and mesh my volume, but when I look at the meshed surface the surface is not smooth (it looks a bit like the surface of the moon!). There are no issues with the stl file (at least as far as I can see in my CAD program). The effects change depending on the levels I set for refinement on the surfaces - but I cannot find any settings which give me a smooth surface and adequate resolution (the problem does not appear when I have very coarse refinement, but this will not be good enough for the flow solution). I have tried various settings of the other parameters (tolerance on snapping, resolve feature angle, etc.) but cannot find anything which works. I am far from sure that gmsh is the best solution! We have used it successfully to automatically generate meshes for 2D aerofoils, but are still investigating options for 3D. We have also started looking at enGrid in the past week, which looks to be quite useful. Regards Richard

July 19, 2012, 14:23
Spehrical farfield?
#9
Member

Karl
Join Date: Jan 2011
Posts: 36
Rep Power: 8
I am setting up a similar case with a half wing in incompressible flow with a hemi-spherical "farfield" and symmetry plane. I do not know whether to set the hemisphere as an outlet or something else. OpenFoam 1.6. Does anyone have a thought? Thanks in advance.

Quote:
 Originally Posted by moser_r Ries, Sorry I haven't replied earlier - I have been travelling for work. The issue with snappyHexMesh is that it does not seem able to resolve my surface properly. I can get it to import the stl file and mesh my volume, but when I look at the meshed surface the surface is not smooth (it looks a bit like the surface of the moon!). There are no issues with the stl file (at least as far as I can see in my CAD program). The effects change depending on the levels I set for refinement on the surfaces - but I cannot find any settings which give me a smooth surface and adequate resolution (the problem does not appear when I have very coarse refinement, but this will not be good enough for the flow solution). I have tried various settings of the other parameters (tolerance on snapping, resolve feature angle, etc.) but cannot find anything which works. I am far from sure that gmsh is the best solution! We have used it successfully to automatically generate meshes for 2D aerofoils, but are still investigating options for 3D. We have also started looking at enGrid in the past week, which looks to be quite useful. Regards Richard

 August 30, 2012, 09:11 boundary condition (symmetry vs periodic doubt) #10 Senior Member   kunar Join Date: Nov 2011 Posts: 117 Rep Power: 7 Dear friends, i am doing 3D wing analysis, i have doubt on boundary conditions in fluent ie both symmetry and periodic, anybody have the answer please let me know briefly,for what kind of purpose to use symmetry & periodic boundary conditions, please tell any example with problem.

 Thread Tools Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post AlmostSurelyRob OpenFOAM Programming & Development 38 August 12, 2017 16:36 victorwfreire CFX 11 January 14, 2015 16:48 syler3321 Fluent UDF and Scheme Programming 2 September 20, 2014 12:37 romekr ANSYS Meshing & Geometry 1 November 26, 2011 13:11 barrat Main CFD Forum 10 September 1, 2004 08:29