View Issue Details

IDProjectCategoryView StatusLast Update
0002157OpenFOAMBugpublic2017-06-30 10:14
Reporterkodexys Assigned Tochris  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version14.10
Summary0002157: Rough Wall Functions do not work
DescriptionI am trying to figure out how to implement surface roughness in OpenFOAM. I looked at the airFoil2D tutorial as my project also involves foils, and changed the walls type in the nut file to nutkRoughWallFunction. I include the value, Ks, and Cs as I am supposed to, but the velocity profiles do not differ at all from a smooth foil. What's going on?
TagsNo tags attached.

Activities

wyldckat

2016-07-21 11:53

updater   ~0006546

We need more details in order to diagnose if there is a problem. Preferably a test case.

Specially there is one important detail missing in your description: rough wall functions usually can only operate in function of the thickness of the cell adjacent to the wall. Without the knowledge of any of these values, we cannot assess if there is anything wrong.

kodexys

2016-07-21 14:20

reporter  

airFoil2D.zip (662,636 bytes)

kodexys

2016-07-21 14:22

reporter   ~0006547

Whoops, uploaded an old case. I'll upload the correct one now.

kodexys

2016-07-21 14:31

reporter  

airFoil2Dcorrect.zip (662,994 bytes)

kodexys

2016-07-21 14:40

reporter  

NACA0021.zip (225,401 bytes)

kodexys

2016-07-21 14:41

reporter   ~0006549

The NACA0021 case is what I am trying to get surface roughness in, but haven't been able to succeed. I tried to use the Airfoil2D tutorial to figure things out but again nothing.

wyldckat

2016-07-25 11:28

updater   ~0006573

You sent me a PM via forum, but I won't be able to answer there anytime soon. But the quick reply to your question regarding if the issue is related to y+ value:

In the source code: https://github.com/OpenFOAM/OpenFOAM-3.0.x/blob/master/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C#L85
You should be able to see that there are 2 calculations: y+ and Ks+

If "KsPlus > 2.25", then the roughness function is used.

I'm not sure when I'll be able to look into this, but I'm guessing that the most likely reason for the wall function to not work as a rough wall, is because the Ks+ values are not within the acceptable working region, therefore only giving results in the smooth region.

kodexys

2016-07-25 15:04

reporter   ~0006574

No need to rush, you are already supplying me with great information.

One thing I did, however, was I increased my minimum y+ variable from 2 to 30. After doing so, I had noticeable changes in my plots of lift and drag. The rough foils had a higher drag and the smooth foils had higher lift. This might be what maddalena was talking about here:

http://www.cfd-online.com/Forums/openfoam-programming-development/71412-nutroughwallfunction-surface-roughness-documented-2.html

I will also look into the KsPlus.

wyldckat

2016-07-31 22:23

updater   ~0006584

OK, I didn't manage to investigate if the code is working as intended, but I was curious and I went first looking for preliminary information on this topic. Here are my findings:

- This wall function was first publicly available as of OpenFOAM 1.4.

- I was not able to find any reference in the release notes, nor in the source code, what was the original research data/paper or book on which this was based on. Either this was documented in an internal document at OpenCFD or only the original author of this code knows what this came from.

- https://en.wikipedia.org/wiki/Law_of_the_wall - Wikipedia has a lot of information and it also has a bit on this topic of rough wall functions. You'll begin to see what I was looking for (expecting from the description) when you reach the part about:
  - [...] hydraulically smooth flow,
  - [...] transitional flow,
  - [...] hydraulically rough flow.

  Which the source code I mentioned in the previous comment, essentially points out that:
  - KsPlus <= 2.25 is hydraulically smooth flow - i.e. it should give similar results to the smooth wall function
  - 2.25 < KsPlus < 90 is transitional flow,
  - KsPlus >= 90 is hydraulically rough flow.

- Further (re)searching, got me the following interesting documents:
  - http://ocw.mit.edu/courses/earth-atmospheric-and-planetary-sciences/12-110-sedimentary-geology-fall-2004/lecture-notes/l2_mass_mom_cons.pdf
    - Page 12 gives a pretty neat hand-drawn schematic representation of a rough wall, which should give you a pretty good perspective on what I was imagining and looking for (i.e. sizes and proportions).

  - http://personalpages.manchester.ac.uk/staff/david.d.apsley/summary_wallfn.pdf
    - Page 9 gives a pretty explicit "y+ vs Ks+" graph

  - http://www.homepages.ed.ac.uk/shs/Desalination/Launder%20Iacovides.pdf
    - An analytical wall-function for turbulent flows and heat transfer over rough walls, by K. Suga, T.J. Craft, H. Iacovides
      - This looks like a pretty hard-core study on rough wall functions, with some neat graphs that give a bit more insight; and the references they give are possibly related to the ones used on the implemented code in OpenFOAM.


@kodexys: I have no idea when I'll be able to look into this more closely, it might be 1 week, it might be 4. Therefore, if you can give us some feedback on this, it would be helpful.


@Henry: Is it necessary to ping someone at OpenCFD for more details about the origin of this implementation or do you know more details about this?

In the short term, I'm expecting that this is working as intended and that a bit more description is necessary to be added to the documentation, i.e. the Ks+ calculations and how they relate to each type of flow near the wall, so that people don't expect "magically add sand to the wall and it always works" ;)

henry

2016-07-31 22:41

manager   ~0006585

ISBN Number 1-928729-08-8
Turbulence Modeling for CFD
(Third Edition)
by David C. Wilcox

https://secure45.securewebsession.com/dcwindustries.com/books/1928729088.htm

kodexys

2016-07-31 23:10

reporter   ~0006586

@wyldcat: Will do. I'll be conducting experiments in a high speed water tunnel with rough foils, and I want to get a numerical model together that will accurately simulate experiments I conduct. I do have some clarifying questions though.

You were looking for the Ks plus values in my description, correct? Where do I specify them? Are they provided in the Ks parameter for the nutkRoughWallFunction? Because with a y+ of 30 and a Ks of a millimeter, I got lift and drag values that made sense. I thought that Ks was an average roughness height. I'm also curious about the roughness constant Cs, and how a value of 0.6 is different from 0.7.

http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2014/Jonatan%20Margalit/report.pdf

I also found this tutorial which models roughness in V2.2 without using rough wall functions, keeping a low minimum y+ value. It is my understanding that the lower that value, the better, but wall functions need a value of at least 30 to function.

"The tutorial is proposing a way to implement Stoesser’s [1] rough bed simulation, in OpenFOAM. The
idea is that, since wall functions have a somewhat limited success when applied in LES modelings, a
rough-bed geometry is better as the near-bed flow is resolved."

I had no luck implementing this in 3.0.1, and I'm thinking of contacting the author about it. I do think that this is a supposedly ideal way to implement surface roughness, though. A low y+ value is kept and there are multiple parameters used to set a roughness.

I apologize for troubling you with all of my questions, but I truly appreciate your assistance.

chris

2017-06-30 10:14

manager   ~0008286

This report highlights a general issue with rough wall functions when the near wall cell size is smaller than the roughness height. There is no issue with the implementation, it is an issue with the model itself.

Issue History

Date Modified Username Field Change
2016-07-20 19:33 kodexys New Issue
2016-07-21 11:53 wyldckat Note Added: 0006546
2016-07-21 14:20 kodexys File Added: airFoil2D.zip
2016-07-21 14:22 kodexys Note Added: 0006547
2016-07-21 14:31 kodexys File Added: airFoil2Dcorrect.zip
2016-07-21 14:40 kodexys File Added: NACA0021.zip
2016-07-21 14:41 kodexys Note Added: 0006549
2016-07-25 11:28 wyldckat Note Added: 0006573
2016-07-25 15:04 kodexys Note Added: 0006574
2016-07-31 22:23 wyldckat Note Added: 0006584
2016-07-31 22:41 henry Note Added: 0006585
2016-07-31 23:10 kodexys Note Added: 0006586
2017-06-30 10:14 chris Assigned To => chris
2017-06-30 10:14 chris Status new => closed
2017-06-30 10:14 chris Resolution open => fixed
2017-06-30 10:14 chris Note Added: 0008286