ladybug-tools / butterfly

:butterfly: A light python API for creating and running OpenFoam cases for CFD simulation.
http://ladybug-tools.github.io/butterfly.html
GNU General Public License v3.0
243 stars 69 forks source link

Boundary Conditions for external flows #55

Open kastnerp opened 7 years ago

kastnerp commented 7 years ago

Hello everyone,

I recently came across the proposed BCs for external flows mentioned in the repository.

  1. Is there a reason why you are using zeroGradient for k and epsilon/omega on the ground instead of wallFunctions?
  2. What is the benefit of having a slip condition over a symmetry condition on the side/sky? Here it is mentioned that it should be treated identically, the results however seem to be different.

Are those BCs a best practice from other proprietary software or is this based on validation against some measured data?

Best,

Patrick

TheodoreGalanos commented 7 years ago

Hi @kostnermo

Thanks for your input and for going over BF!

These boundary conditions were BF's way of making CFD studies available to all users, even those with little experience. They have been tested mainly through personal experience and are known to work in a satisfactory manner (for validation studies I think cfd-online might be the resource). Of course, theyin no way represent the ideal set up for any or all cases that a user can simulate.

Concerning wallFunctions for ground surface there is quite a lot of research to suggest that they are more accurate in ABL simulations of outdoor flows (I believe you can find a few papers by Blocken et al. on this that are interesting). However, to my knowledge at least, they do require much more complex meshing strategies in which the user has to ensure certain values remain within requirements (like surface roughness height Ks and first cell height, which research suggests sometimes is almost impossible to do) . For this reason they aren't chosen as default.

Ofc the very idea of BF is to allow experienced users to provide their take and create better alternatives for all others. For this reason you can find components that allow for custom boundary conditions.

Concerning the slip vs symmetry question, I believe that when it comes to OpenFOAM they are numerically exactly the same. They are a bit different in the way results can be post-processed (e.g. by paraFoam) after the simulation. slip can be applied to wall-type boundaries and allows post processing applications like wallGradU to be calculated. Although, that shouldn't be important in case like these.

Once again thanks for contributing! I hope BF gives you access to experimentation! And I personally hope the community around it it makes a 'rough' field like CFD more accessible.

mostaphaRoudsari commented 7 years ago

Hi @kostnermo. Do you have a different source for boundary conditions?

@kostnermo @TheodoreGalanos I'm looking forward to more discussions like this. Thank you both.

kastnerp commented 7 years ago

@TheodoreGalanos Thank you for your input on this!

@mostaphaRoudsari I read a couple of papers by Blocken which are, indeed, quite sophisticatedly investigating the atmospheric boundary layer. Most of the research is done with Fluent though.

In addition, I found this paper by DE Dwyer, which in essence uses the same approach as posted above.

The official tutorial windAroundBuildings uses a wallFunction for k and epsilon, although, unlike other tutorials, it merely seems to show what is possible with OpenFOAM.

Currently, I am doing some validation of different boundary conditions as well as turbulence models (kOmegaSST) against measured data. I am happy to share the results once I finished that.

mostaphaRoudsari commented 7 years ago

@kostnermo thanks. Very interested to see the results once it's ready. Will be greatly helpful for us.

TheodoreGalanos commented 7 years ago

@kostnermo Yes I remember reading that thesis a while back. I am not sure when I started drifting from wallFunctions. It might be that you are definitely right and they offer greater accuracy for external flows. We would love to see your results when you have them! Thank you so much for the discussion and the ideas!

P.S.: The menter model will probably require much higher refinement esepcially near walls for the wall functions to work properly. That's one of the reasons I personally haven't used it in external flows. I did have good results with RNGkEpsilon though.

Kind regards, Theodore.

mostaphaRoudsari commented 6 years ago

This will be addressed once we give access to overwriting boundary conditions for outdoor cases: https://github.com/ladybug-tools/butterfly/issues/126

AntoineDao commented 4 years ago

@mostaphaRoudsari if this is a duplicate can we close this issue?

mostaphaRoudsari commented 4 years ago

I think before closing this we have to identify the other duplicate issue. I see that there are some very useful information in this thread.