CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

nutRoughWallFunction and Surface Roughness Documented

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

Like Tree23Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 15, 2011, 05:57
Default
  #41
New Member
 
David R. Fuhrman
Join Date: Jul 2011
Posts: 1
Rep Power: 0
davidfuhrman is on a distinguished road
I also initially experienced the problem that the same solution was returned, regardless of the roughness Ks, when using nutRoughWallFunction (OpenFoam version 1.6-ext, and a variant of kOmega for the turbulence model). However, after some inspection, the reason was that my first grid point was too small i.e. not in the log layer, hence the code was essentially treating the wall as smooth, as far as I could tell.

If you check in nutRoughWallFunctionFvPatchScalerField.C, there is an if statement that is only entered if yPlus is greater than yPlusLam, which seems to be taken as 11.5301 (I inserted a temporary Info statement, just to write it to my screen during simulations). Hence, if your first grid point is below this value, then the if statement is not entered, and nutw is not modified.

If you want to model roughness properly with these wall functions, as I see it, care must be taken such that the first cell center should be the order of the roughness length Ks. This will ensure that it is sufficiently large to lie in the log layer for a rough wall. Alternatively, this strategy will also (apparently) lead to a wall being treated as smooth, for sufficiently small Ks (and hence grid size).

Cheers,
David
davidfuhrman is offline   Reply With Quote

Old   July 15, 2011, 11:13
Default
  #42
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 118
Rep Power: 16
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
Hi David,

Yes, you are right regarding the Y+ distance when simulating roughness. It does not have physical sense to calculate the turbulent boundary layer profiles where there is a roughness elements.

Below the Y+ that corresponds to Ks, the OF considers/assumes a sub-layer is that viscous/laminar. Actually the presence of the roughness causes a shift in the U+ profile so increasing the laminar region. However, depending on shape and distribution of the roughness the profile may not follow that of laminar sub-layer.

The heat transfer is even more complicated because the increasing height of the roughness will degrate the heat flux due to effect of an additional thermal resistance. This is the reason why the direct Pr_t analogy does not work well. This is the assumption made by OpenFoam, however, there is a need to correct the analogy to take into account the effect of roughness sub-layer thermal resistance.

This fact becomes a real challenge when the roughness equivalent height Ks (or the Reynolds roughness number Re_k=u_tau \cdot Ks / \nu) is high.

See references:
http://papers.sae.org/2011-38-0023/
http://www.cfd-online.com/Forums/ope...tml#post307393

Regards,

Guilherme

Last edited by aerothermal; July 15, 2011 at 11:32. Reason: replaced body by elements
aerothermal is offline   Reply With Quote

Old   January 5, 2012, 01:04
Default
  #43
Member
 
张德胜
Join Date: Oct 2011
Posts: 71
Rep Power: 15
hei@ge is on a distinguished road
Hi,friend.I now use simplefoam to calculate windfarm. The ground condition of nut is nutroughwallfunction,but the profile of velocity from inlet to outlet are not fit very well,The max error is about 16%.So i guess it is the problem of Ks and Cs.My z0 is 0.03.Ks=(10/Cs)*z0.Can you give me some advice about my problem.
hei@ge is offline   Reply With Quote

Old   January 5, 2012, 14:19
Default
  #44
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 118
Rep Power: 16
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
Hi hei@ge,

take a look at Tapia thesis...you may find how to make a map of Cs to simulate your terrain.

http://hig.diva-portal.org/smash/get...936/FULLTEXT01

Regards,

Aerothermal
aerothermal is offline   Reply With Quote

Old   January 6, 2012, 22:52
Default
  #45
Member
 
张德胜
Join Date: Oct 2011
Posts: 71
Rep Power: 15
hei@ge is on a distinguished road
Hi,Aerothermal.I think it will be helpful.Now my epsilon's ground condition is epsilonwallfunction,and it works well.Thanks a lot.
hei@ge is offline   Reply With Quote

Old   January 8, 2012, 08:42
Default
  #46
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 118
Rep Power: 16
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
Hi hei@ge

After thinking about the problem, I also suggest to you to implemet your own Cs function inside the wallFunction by modifying the source code itself and making a new model customized for your case.

I implemented a new Cs based on Stanford group work (Kays and Crawford book on convective heat transfer) and wall function in the paper:
http://www.ats4i.com.br/en/publicati...11-38-0023.pdf

Several reasons led me to implement that model but the important point is that sometimes you will need to modify the source code in order to get the the code work for you purposes. Remember that eventually OpenFoam was not implemented to run your specific case.

Regards,

Aerothermal
aerothermal is offline   Reply With Quote

Old   January 18, 2012, 10:45
Default
  #47
pug
New Member
 
Tom
Join Date: Nov 2011
Posts: 1
Rep Power: 0
pug is on a distinguished road
Hello all,

Would somebody be able to confirm for me from where the equation underlying nutkRoughWallFunction is taken from? Is it the same implementation of rough walls as in Fluent? Or is there another paper/document which describes the derivation of the function used?

I'm trying to choose appropriate Ks for my atmospheric roughness length (r0) following Blocken et al. (2007), but without knowing the basic function used I can't be sure of the correct relationship between Ks and r0. My attempts at unravelling the source code haven't been enlightening so far..., but then I'm new to C++...

Any help much appreciated!

Cheers,

Tom
pug is offline   Reply With Quote

Old   February 21, 2015, 11:37
Default nutkRoughWallFunction
  #48
Jos
New Member
 
Joey
Join Date: Oct 2013
Posts: 4
Rep Power: 13
Jos is on a distinguished road
Quote:
Originally Posted by maddalena View Post
Well.. Since nutRoughWallFunction is defined in 0/nut file for every patch, I simply need to define a different Ks and Cs for the patch I want a different roughness... Yeah, that's sound obvious now!

mad
Dear Maddalena,

Do you know how to implement nutkRoughWallFunction in OpenFoam 2.3.0 version? the parameters Ks and Cs are the same, but it is necessary to add a vaule at 0/nut dict. Could you provide an example of the usage of this wall function?

Thank you very much.
cpjoung likes this.
Jos is offline   Reply With Quote

Old   July 31, 2015, 02:47
Default
  #49
Senior Member
 
harshawardhank
Join Date: Mar 2014
Posts: 209
Rep Power: 13
harsha_kulkarni is on a distinguished road
Quote:
Originally Posted by Jos View Post
Dear Maddalena,

Do you know how to implement nutkRoughWallFunction in OpenFoam 2.3.0 version? the parameters Ks and Cs are the same, but it is necessary to add a vaule at 0/nut dict. Could you provide an example of the usage of this wall function?

Thank you very much.
Dear Jos,

I am also stuck at this point. Have you figured out correct syntax to implement nutkRoughWallFunction in OpenFoam 2.3.0?

Harsha
harsha_kulkarni is offline   Reply With Quote

Old   August 30, 2015, 02:55
Default Surface roughness of seabed
  #50
Member
 
Divyaprakash
Join Date: Jun 2014
Posts: 70
Rep Power: 12
Divyaprakash is on a distinguished road
I need to solve a case where there is flow over a rough seabed with the roughness given as Zw =1E-6m where zw = d(50)/12, where d(50) is the median grain size diameter.

Where do I specify these values in OpenFoam. Is there a similar tutorial case?
Divyaprakash is offline   Reply With Quote

Old   September 1, 2015, 02:20
Default
  #51
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
You have to use a special nutWallFuction for rough walls. There you can specify the roughness:

Quote:
This boundary condition provides a turbulent kinematic viscosity condition when using wall functions for rough walls, based on turbulence kinetic energy. The condition manipulates the E parameter to account for roughness effects. Parameter ranges

roughness height = sand-grain roughness (0 for smooth walls)
roughness constant = 0.5-1.0

myPatch
{
type nutkRoughWallFunction;
Ks uniform 0;
Cs uniform 0.5;
}
fabian_roesler is offline   Reply With Quote

Old   September 5, 2015, 02:28
Default
  #52
Member
 
Divyaprakash
Join Date: Jun 2014
Posts: 70
Rep Power: 12
Divyaprakash is on a distinguished road
Thank You!
Divyaprakash is offline   Reply With Quote

Old   June 21, 2016, 11:45
Default
  #53
New Member
 
Kevin Cole
Join Date: Jun 2016
Location: Durham, NH
Posts: 11
Rep Power: 10
kodexys is on a distinguished road
Hello everyone,

I'm a beginner trying to find a rough wall flow simulation sample case. Does anyone know of any out there?

If not, then I would like some guidance on making one. I have done successful simulations for smooth foils, but now want to run simulations for rough foils. Any help would be greatly appreciated.

---

Hello everyone, I'm searching for some validation on my implementation of surface roughness. By that I mean the code works but I'm not sure if it's giving me the right results.

Here is my turbulenceProperties:
Code:
simulationType RAS;
RAS
{
     RASModel     kOmegaSST;
     turbulence    on;
     printCoeffs    on;
     kOmegaSSTCoeffs
     {
           F3     yes;
     }
}
This is the boundary condition for the foil I want to simulate roughness for in the nut file:
Code:
Foil
{
    type     nutURoughWallFunction;
    roughnessHeight 1e-5;
    roughnessConstant 0.5;
    roughnessFactor  1;
    value    0;
}
Does this seem legitimate to anyone who has ran any cases like this before? I'm a little confused over why I need the value parameter.

Any help would be appreciated!

---

Hi Jos and Harsha,

Have you folks figured out implementing nutkRoughWallFunction?

Kevin

---

Hi Divya,

Did you have any luck with that case? I'm trying to perform simulations of rough foils, but no matter what I do it doesn't seem to be performing any different from a smooth foil. The y+ values do vary, but lift, drag, and pressure only vary quite slightly if they do at all.

---

Hello everyone,

Does anyone know how nutURoughWallFunction and nutkRoughWallFunction work to account for roughness? I know that they both have roughness height and roughness constant parameters but I don't know how they are used. Is there some equation that they use? I couldn't find anything in the source code. Maybe I missed something.

I'm also having trouble figuring out what the E parameter is that nutkRoughWallFunction uses.

---

Hey everyone, I'm trying to use the nutkRoughWallFunction for rough foils but no matter how I vary the parameters, I get the same results for lift, drag, and inception cavitation number. Here is my nut file, and to my inexperience, which is where roughness is implemented. Am I missing anything? Any help would be greatly appreciated.

Code:
/*--------------------------------*- C++ -*-------------------------------------------------*\ 
|  =========                 |                                                                           | 
|  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox          | 
|   \\    /   O peration     | Version:  3.0.1                                                      | 
|    \\  /    A nd           | Web:      www.OpenFOAM.org                                | 
|     \\/     M anipulation  |                                                                            | 
\*----------------------------------- --------------------------------------------------------*/ 

FoamFile 
{ 
    version     2.0; 
    format      ascii; 
    class       volScalarField; 
    object      nut; 
} 
 
dimensions      [0 2 -1 0 0 0 0]; 
 
internalField   uniform 0; 
 
boundaryField 
{ 
    frontAndBack 
    { 
        type            empty; 
    } 
    Inlet 
    { 
        type            calculated; 
    } 
    Outlet 
    { 
        type            calculated; 
    } 
    Foil 
    { 
        type            nutkRoughWallFunction;
    value          uniform 0;
    Ks          uniform 0.005;
    Cs          uniform 0.5; 
    } 
    Walls 
    { 
        type            calculated; 
    } 
}
lourencosm likes this.

Last edited by wyldckat; September 9, 2016 at 18:53. Reason: merged posts done a few days apart, while moving several posts on the same topic to this thread
kodexys is offline   Reply With Quote

Old   August 10, 2016, 07:33
Default
  #54
Senior Member
 
Taher Chegini
Join Date: Nov 2014
Location: Houston, Texas
Posts: 125
Rep Power: 12
Taataa is on a distinguished road
All of the required information can be found here and here.
Taataa is offline   Reply With Quote

Old   September 9, 2016, 19:01
Default
  #55
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,980
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

@kodexys: I hope you don't mind, I've moved all of your posts on this topic into this thread and then I merged all of them.

To give a bit of context to my answer for everyone reading, I and kodexys have exchanged a few messages, most of which were through this bug report: http://bugs.openfoam.org/view.php?id=2157

kodexys asked me a few days ago if I had managed to investigate further into this and half-way through my answer, I figured I might as well finds related posts and answer here. The latest question was:

Quote:
Originally Posted by kodexys
Have you been able to investigate the roughness functions any further?
Sorry, no I haven't. Nonetheless, after what we discussed on the bug tracker, I'm expecting that the only problem is related to a misinterpretation of how this wall function can actually be used. On the bug report mentioned above, Henry provided information about the book from which the implementation was based on. I don't know if you've managed to get a hold of a copy of the book, but I expect that more complete details are provided there.

Either way, my suspicion is what your preliminary findings indicated and what I already wrote on the bug report: the cells near the wall have to be thick enough to justify using this wall function.
If the cells are too thin, it will make more sense if you simply use "fixedValue" for the "k" and/or "nut" fields, in order to define a fixed turbulence source on those walls. As to how you calculate those fixed values, I have no idea yet. I can only guess that the book will have details on that as well, or at least a few hints.

Worst case scenario, you will have to create a small scale simulation with an actual rough wall to get a realistic flow provide over actual bumps/needles coming out of the wall, in order to get a calculation of how it affects the flow profile. Nonetheless, I believe this work is already documented on the book that Henry mentioned, namely:
Quote:
ISBN Number 1-928729-08-8
Turbulence Modeling for CFD
(Third Edition)
by David C. Wilcox
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 24, 2016, 11:10
Default
  #56
Member
 
Lourenço SM
Join Date: Jul 2014
Location: Lisboa, Portugal
Posts: 41
Rep Power: 12
lourencosm is on a distinguished road
Hey!
Couldn't find that book.

Does anyone have found the definition of "roughness height" in the nutURoughWallFunction?
Is it equivalent sand roughness ou just average height?

By the way, which function do you prefer to use with InterFOAM?

Thank you,
Lourenço
lourencosm is offline   Reply With Quote

Old   March 1, 2018, 07:31
Default
  #57
Member
 
Join Date: Mar 2009
Posts: 90
Rep Power: 17
aerogt3 is on a distinguished road
This thread is really helpful. But just one question that I can't seem to get from the openfoam documentation: on what turbulence fields should the roughwall functions be applied?

only nut? what about k, epsilon, omega, etc.?
aerogt3 is offline   Reply With Quote

Old   March 2, 2018, 02:39
Default
  #58
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
Only for nut.
wyldckat and PC6823 like this.
fabian_roesler is offline   Reply With Quote

Old   March 2, 2018, 09:00
Default
  #59
Member
 
Join Date: Mar 2009
Posts: 90
Rep Power: 17
aerogt3 is on a distinguished road
Quote:
Originally Posted by fabian_roesler View Post
Only for nut.
And for nuTilda, in the case of a SA-DES run? Or still only nut?
aerogt3 is offline   Reply With Quote

Old   March 5, 2018, 02:02
Default
  #60
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
Still only nut.

nuTilda is fixedValue value 0 at the wall.

Cheers

Fabian
fabian_roesler is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Surface roughness in Flow-3d Marco FLOW-3D 3 June 3, 2018 02:15
[Gmsh] Error : Self intersecting surface mesh, computing intersections & Error : Impossible velan OpenFOAM Meshing & Mesh Conversion 3 October 22, 2015 11:05
[Gmsh] Problem with Gmsh nishant_hull OpenFOAM Meshing & Mesh Conversion 23 August 5, 2015 02:09
[Gmsh] boundaries with gmshToFoam‏ ouafa OpenFOAM Meshing & Mesh Conversion 7 May 21, 2010 12:43
CFX4.3 -build analysis form Chie Min CFX 5 July 12, 2001 23:19


All times are GMT -4. The time now is 01:12.