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/)
-   -   Atmospheric Boundary Layer with k-w SST (https://www.cfd-online.com/Forums/openfoam-pre-processing/202535-atmospheric-boundary-layer-k-w-sst.html)

AlezXander June 3, 2018 12:10

Atmospheric Boundary Layer with k-w SST
 
I have no previous experience with OpenFOAM, so I have doubts with the case set up. I am trying to run an incompressible case, with an atmospheric boundary layer (ABL) for the velocity inlets and modelling turbulence with k-w SST (RAS).

Looking at the documentation for the ABL and the tutorials provided, I see that on the inlets I should use:
  • 0/U: type atmBoundaryLayerInletVelocity
  • 0/k: type atmBoundaryLayerInletK
  • 0/epsilon: type atmBoundaryLayerInletEpsilon

And each one with the values associated to the ABL (reference height, velocity...). However I am using k-w SST, so I don't have a file for epsilon, instead I have a file for omega in 0.

My question is: Since there is no "atmBoundaryLayerInletOmega", what type of boundary condition should I use on the inlet for the omega file? Would be necessary also to create an epsilon file to add the last boundary on the list?

Thank you for your time.

Bazinga June 7, 2018 08:59

I have not tried it myself but maybe these two options might be helpful:

1. You could try to automatically calculate omega based on k using
"turbulentMixingLengthFrequencyInlet"

https://cpp.openfoam.org/v5/classFoa...d.html#details


2. There is a relation between epsilon and omega. Maybe change the atmBoundaryLayerInletEpsilon to atmBoundaryLayerInletOmega, so that it works for omega using the equations here:
https://www.cfd-online.com/Wiki/Turb...ary_conditions

I am also interested in this subject, it would be nice if you keep us updated about your progress.

AlezXander June 11, 2018 12:57

Quote:

Originally Posted by Bazinga (Post 695072)
I have not tried it myself but maybe these two options might be helpful:

1. You could try to automatically calculate omega based on k using
"turbulentMixingLengthFrequencyInlet"

https://cpp.openfoam.org/v5/classFoa...d.html#details


2. There is a relation between epsilon and omega. Maybe change the atmBoundaryLayerInletEpsilon to atmBoundaryLayerInletOmega, so that it works for omega using the equations here:
https://www.cfd-online.com/Wiki/Turb...ary_conditions

I am also interested in this subject, it would be nice if you keep us updated about your progress.

Thank you for your answer! I haven't made any progress right now, however when I started this topic I thought that k and epsilon were defined as function of the height (z) for the ABL boundary types in OpenFOAM, the same way as the velocity, I didn't check the equations. But now I was looking at the equations of k and epsilon for ABL and only epsilon depends on height, being k constant.

So the problem is if I make any relationship with k to obtain omega at the boundary it will be a constant value at the end and it will not be afected by height, both k and omega will be the same for all z at the boundaries.

For now I will define omega as a fixed value using the typical approach to estimate turbulence free-stream boundary conditions, but I am not comfortable with this. I would expect to have omega as function of z, the same way as epsilon is defined on the ABL boundary type. So probably your second option will be the best option right now.

I will try to search on the literature to check if this issue has been already adressed.

Bazinga June 11, 2018 13:12

For your research, the BC implemented for kepsilon are the ones proposed by Richards and Hoxey in 93.

AlezXander June 14, 2018 12:06

I have some results and I am relatively happy with what I see, so I will comment what I did and what I would do if I had more time in case someone deal with the same problem in the future.

As stated in previous message, I decided to use a fixed uniform value for omega on the inlets (estimating turbulent intensity and eddy viscosity ratio) . I have compared the velocity profile on a vertical line obtained in simulations with the analytical one and results are correct. I have also compared some computational results with other validated simulations performed in Fluent with same boundary conditions (also same ABL profile using UDF) and the relative error is around 1%, so in general I consider this approach satisfactory for mi case.

However, if I had more time I would follow the approach stated in Yang et al. (2009). They derive boundary equations for SST k-w for ABL. In the third page an equation for omega (function of z, same as k-e models) is provided. It is a really simple equation and the implementation would be straightforward for anyone interested. On the paper they state that accuracy decrease with the increment of terrain roughness, but the results overall are good.

The equation (with k_{c} being the von Karman constant, u_{*} the friction velocity, C_{u} turbulent viscosity coefficient and z_{0} roughness length)
\omega= \frac{u_{*}}{k_{c} \sqrt{C_{u}}}\frac{1}{(z+z_{0})}:

Hope you find this useful.

crizpi21 July 14, 2018 13:53

3 Attachment(s)
Quote:

Originally Posted by AlezXander (Post 695992)
I have some results and I am relatively happy with what I see, so I will comment what I did and what I would do if I had more time in case someone deal with the same problem in the future.

Hi Alex,

I am also running an incompressible case using kwsst with an atmospheric boundary layer in the inlet using "type atmBoundaryLayerInletVelocity" and same for k. For now, I just have a domain with no obstacle and I want to verify the velocity and turbulence profiles across the domain.
So far, my velocity profile is OK Attachment 64557, but when I visualise k and omega (turbulence properties), the profile is very strange Attachment 64558, Attachment 64559.

I think the problem must be in the definition of the boundary conditions in the input files for omega and k. I adapated my case from tutorials/incompressible/simpleFoam/turbineSiting and also followed your advice setting fixedValue at the inlet for omega.

Could you take a look at my files? I have uploaded them here: https://drive.google.com/drive/folde...qx?usp=sharing

Or maybe you could share your case and explain a little bit the steps you followed (also for the calculation of the initial values).

Any help would be great,

Thanks in advance.

Cristina

crizpi21 July 15, 2018 13:19

Quote:

Originally Posted by crizpi21 (Post 699233)
So far, my velocity profile is OK, but when I visualise k and omega (turbulence properties), the profile is very strange Attachment 64558, Attachment 64559.

.

I would like to make a clarification about what I expect for the k profile.

The turbulence kinetic energy k is proportional to the turbulence intensity (https://www.cfd-online.com/Wiki/Turbulence_intensity), whose value I have specified in the inlet as 8%. However, looking at the k profile, you can see that k decays very quickly and drops to almost 0 inside the domain. This means that the turbulence intensity will also be zero, instead of having a similar value to the one specified at the inlet. The problem with this is that the obstacle inside the domain will not get the desired level of turbulence.

Another problem with the k profile is that at the bottom layer, (which models the sea surface) the value should be 0 (since the velocity is 0), but instead, it takes a value between 6 and 10. The definition I have used for this layer is
"type kqRWallFunction; value uniform 0.0" but clearly, the value 0 is not being considered. Does anyone have a clue about this?

Hope someone can help me or give any suggestions!

Thanks in advance,

Cristina


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