CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Rough boundary bottom at OpenFOAM (https://www.cfd-online.com/Forums/openfoam-pre-processing/176595-rough-boundary-bottom-openfoam.html)

burlyga August 22, 2016 07:42

Rough boundary bottom at OpenFOAM
 
Hello everyone!
I want create new boundary condition for OpenFOAM, which provides logarithmic velocity profile at atmospheric boundary layer. In this boundary condition U will depend from height. But I have a trouble with happening when inlet has rough bottom, because in this case I should be able to determine z0 at any point. Are there any tools at OpenFOAM to get z0 for any point at boundary?

burlyga August 22, 2016 11:07

For example, for such inlet boundary. You can see that the bottom of this boundary is rough. I want to consider this fact and make dependency from local height at any pointhttps://s14.postimg.org/o5l8f3tcx/20...2_17_55_34.png

kostnermo August 23, 2016 05:06

Hi,

if I understand your question correctly, there is a BC which does what you are looking for.

atmBoundaryLayerInletVelocity

Example:

Code:

ground
    {
        type            atmBoundaryLayerInletVelocity;
        n              (1 0 0);
        z              (0 0 1);
        Uref            10.0;
        Zref            20.0;
        z0              uniform 0.1;
        zGround        uniform 0.0;
    }

Best,

Patrick

burlyga August 23, 2016 05:55

Quote:

Originally Posted by kostnermo (Post 615098)
Hi,

if I understand your question correctly, there is a BC which does what you are looking for.

atmBoundaryLayerInletVelocity

Example:

Code:

ground
    {
        type            atmBoundaryLayerInletVelocity;
        n              (1 0 0);
        z              (0 0 1);
        Uref            10.0;
        Zref            20.0;
        z0              uniform 0.1;
        zGround        uniform 0.0;
    }

Best,

Patrick

Thank you for you reply, Patrick!

If I understand correctly, atmBoundaryLayerInletVelocity doesn't provide tools to consider rough inlet boundary conditions (look at the picture attached to 2 post). I need to make log U profile incipient from a bootom by z-coordinate at my red inlet boundary everywhere.

Best,

Yury

kostnermo August 23, 2016 07:10

Hi Yury,

I think I understood what you mean. You would like to specify U(z) at your inlet according to the height of the terrain?
You could use groovyBC to specify different equations along the x-axis in negative y-direction, which could be a work-around.

Quote:

But I have a trouble with happening when inlet has rough bottom, because in this case I should be able to determine z0 at any point.
Thinking about your problem again, do you need to specify/consider z_0 at all?
To my knowledge, z_0 is a constant to emulate the roughness imposed by a terrain one usually wouldn't consider in the model.
Why would you want to specify a z_0 to represent a rough terrain, which you use at the ground level of your domain anyway?

Best,

Patrick

burlyga August 23, 2016 07:45

Dear Patrick,

I should be able to work with such cases, as in this image.
https://s14.postimg.org/rvjl31wm9/20...3_14_36_41.png
In this image, red marked inlet. As you can see, height of the terrain here varies quite strongly, so z_0 can not be taken as a constant. Therefore, I would like to be able to identify height of the terrain as z_0 at each point.

Best,

Yury

clktp August 24, 2016 07:54

I've recently worked on something like that but as burlyga says atmBoundaryLayerInletVelocity
is not a proper solution for this kind of problem. Also z_0 is not that height if I'm not terribly wrong, it's something different, simulates ground effects but not huge differences like your case.

If I were, I would use a flat surface at the inlet region and put the terrain in the middle of the domain, so that I would able to use atmBoundaryLayerInletVelocity without any problem. Only thing you need to do is merge a flat surface with your terrain.

In ayn case if you wanna create a whole new boundary condition, which I think it's wrong, you can modify atmBoundaryLayerInletVelocity and calculate reference height not by location of z coordinates, but distance to the patch.

burlyga August 25, 2016 06:15

Thank you for your reply, clktp!

I have already written and compiled a new boundary condition. Now I want to modify it for the case, of which I am writing. Could you tell me more about how you can find the distance from the cell to the patch? I think this is what I need.

Best,

Yury

clktp August 25, 2016 09:41

I haven't done it before but I guess you can find a good example for it in the y+ calculation utility. It should be yPlusRANS and yPlusLES.

On the other hand I strongly recommend you to check the theory of ABL velocity profile if you don't know very well the subject. What you are doing doesn't sound correct to me, but of course I might be wrong. I haven't studied particularly ABL profile, but used many times. Anyways, just saying.

I would be grateful if you share your results. Good luck.

burlyga September 5, 2016 06:04

Hello everyone!
Unfortunately, I did not get to determine the distance to a patch to find out the current altitude. I tried using mesh.findCell() and meshSearch class for this, however, the boundary condition at me when it does not work. Maybe someone had to deal with such a task? As in OpenFOAM z_0 can be determined for the current point?


All times are GMT -4. The time now is 00:59.