CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   How to apply variabe roughness, e.g. to complex terrain? (

Fridolin November 29, 2010 17:23

How to apply variabe roughness, e.g. to complex terrain?

I'm new to OpenFOAM and am trying to run wind simulations over complex terrain. I'm just working my way through simpleWindFoam and the turbineSiting tutorial. I understand that in 0/nut a constant roughness is applied to the complex terrain surface:


        type            nutRoughWallFunction;
        Ks              0.2; //Ks = 20 Z0
        Cs              0.5;
        value          uniform 0.0;

Now I would like to apply non-uniform roughness to the terrain. I understand I could set up several patches and apply BC type nutRoughWallFunction to all of them but with varying Ks and Cs. But is it also possible to define variable roughness pointwise, i.e. defining the BC type nutRoughWallFunction as above but set a non-uniform list for Ks and Cs?

NB: I had a look into nut in a later time directory, e.g. 50/nut and there it says:


        type            nutRoughWallFunction;
        Cmu            0.09;
        kappa          0.41;
        E              9.8;
        Cs              uniform 0.5;
        Ks              uniform 0.2;
        value          nonuniform List<scalar>

Cs (and Ks) being set to uniform 0.5 (and 0.2 respectively) suggests that it could also be set to a non-uniform list, i.e. roughness could be defined point-wise. However, I am not sure that doing this in 0/nut would make the nutRoughWallFunction "understand" what I want.

Any help greatly appreciated!!!

Thanks, Fridolin

johnblund February 22, 2011 08:02


I am working on this issue now. My first thought was to apply different roughness to different patches, but this solution is not very flexible.

If anyone else have some info or hints on this issue, they will be appreciated

kind regards

hananfoam September 24, 2012 06:25

Did you ever reach a solution
Hello johnblund,
Have you ever reached a solution?
If so, can u share it?


p.s. - working on the same problem :)

All times are GMT -4. The time now is 15:44.