CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Wall functions with symmetry (https://www.cfd-online.com/Forums/openfoam-solving/97474-wall-functions-symmetry.html)

moser_r February 17, 2012 16:09

Wall functions with symmetry
 
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.

m9819348 February 18, 2012 01:30

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

moser_r February 18, 2012 04:32

2 Attachment(s)
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.

Any help you can provide would be very gratefully received.

m9819348 February 19, 2012 13:15

1 Attachment(s)
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

moser_r February 20, 2012 03:07

1 Attachment(s)
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

moser_r February 20, 2012 05:18

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.

m9819348 February 22, 2012 14:09

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

moser_r March 6, 2012 02:28

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

atg July 19, 2012 14:23

Spehrical farfield?
 
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 (Post 347840)
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


hhh August 30, 2012 09:11

boundary condition (symmetry vs periodic doubt)
 
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.


All times are GMT -4. The time now is 04:39.