Difference between revisions of "Sig WindE/Validation Cases"

From OpenFOAMWiki
m
Line 9: Line 9:
 
The wall function boundary condition implemented in OF is the Nikuradse's grain of sand roughness. It produces an anomaly in the k profile in the first cell above the ground which propagates upwards and down-flow. This is discussed extensively in the literature, and alternative wall functions have been suggested such as Richards and Hoexy 1993 (RH). There has lately been a very good documentation of testing this anomaly by Martinez in his Ms.C. thesis [http://windenergyresearch.org/2011/09/wind-resource-in-complex-terrain-with-openfoam/].
 
The wall function boundary condition implemented in OF is the Nikuradse's grain of sand roughness. It produces an anomaly in the k profile in the first cell above the ground which propagates upwards and down-flow. This is discussed extensively in the literature, and alternative wall functions have been suggested such as Richards and Hoexy 1993 (RH). There has lately been a very good documentation of testing this anomaly by Martinez in his Ms.C. thesis [http://windenergyresearch.org/2011/09/wind-resource-in-complex-terrain-with-openfoam/].
  
  [[File:HomogenousTerrain.tar.gz]] checked on OF 2.1
+
  [[File:BL2D.tar]] checked on OF 2.1
  
Attached is a case ("_BL2Dtemplate") and two python scripts using the pyFoam library to run different z0 values. To reproduce these graphs (p. 24 [http://windenergyresearch.org/2011/09/wind-resource-in-complex-terrain-with-openfoam/]) use "runZ0.py _BL2Dtemplate BL2Dvalidation_ 1 0.001 0.005 0.01 0.03 0.05 0.1"
+
Attached case ("BL2Dtemplate") has python scripts using the pyFoam library to run different z0 values. run with ./Allrun .
  
  
Line 18: Line 18:
 
The 2D simple hill from Martinez 2011 whose shape is given by  
 
The 2D simple hill from Martinez 2011 whose shape is given by  
  
<math>y\left(x\right) = -\frac{H}{6.04844}\left[J_0(\Lambda)I_0(\Lambda\frac{x}{a})-I_0(\Lambda)J_0(\Lambda\frac{x}{a})\right] @ |x-x_0| \leq a</math>
+
<math>y\left(x\right) = -\frac{H}{6.04844}\left[J_0(\Lambda)I_0(\Lambda\frac{x}{a})-I_0(\Lambda)J_0(\Lambda\frac{x}{a})\right] for |x-x_0| \leq a</math>
  
<math>y\left(x\right) = 0 @ |x-x_0| > a </math>
+
<math>y\left(x\right) = 0 for |x-x_0| > a </math>
  
 
The mesh is created with blockMesh, and a template file, and also a python script that writes the hill shape as a polyline object in the blockMeshDict. The mesh grading was done by breaking the control box into 3 segments - upwind, hill area and downwind (unlike the Martinez mesh grading tanh scheme).
 
The mesh is created with blockMesh, and a template file, and also a python script that writes the hill shape as a polyline object in the blockMeshDict. The mesh grading was done by breaking the control box into 3 segments - upwind, hill area and downwind (unlike the Martinez mesh grading tanh scheme).

Revision as of 12:21, 21 February 2012

The aim of this page is to hold validation cases for ABL (Atmospheric Boundary Layer) flows that are of interest to anybody starting to model in OF. The page will hold links to databases and articles describing experiments, and also instructions on how to make meshes and set boundary conditions that give fair results, hopefully the end result will be complete cases. The simulations I perform, and refer to mainly in this text are RANS with k-epsilon turbulence closure models, using simpleFoam. Most of the simulations were done according to the excellent Martinez 2011 Ms.C. thesis [1]


(0) Maintaining a logarithmic inlet profile over a 2D domain

The wall function boundary condition implemented in OF is the Nikuradse's grain of sand roughness. It produces an anomaly in the k profile in the first cell above the ground which propagates upwards and down-flow. This is discussed extensively in the literature, and alternative wall functions have been suggested such as Richards and Hoexy 1993 (RH). There has lately been a very good documentation of testing this anomaly by Martinez in his Ms.C. thesis [2].

File:BL2D.tar checked on OF 2.1

Attached case ("BL2Dtemplate") has python scripts using the pyFoam library to run different z0 values. run with ./Allrun .


(1) Flow over Isolated 2D Hill checked on OF 2.1

The 2D simple hill from Martinez 2011 whose shape is given by

y\left(x\right) = -\frac{H}{6.04844}\left[J_0(\Lambda)I_0(\Lambda\frac{x}{a})-I_0(\Lambda)J_0(\Lambda\frac{x}{a})\right] for |x-x_0| \leq a

y\left(x\right) = 0 for |x-x_0| > a

The mesh is created with blockMesh, and a template file, and also a python script that writes the hill shape as a polyline object in the blockMeshDict. The mesh grading was done by breaking the control box into 3 segments - upwind, hill area and downwind (unlike the Martinez mesh grading tanh scheme). The case with the python script, ready to run (./Allrun) is attached here

File:2DBump.tar checked on OF 2.1

It compares the results with figures 21a,21b and 21c from Martinez 2011.

I have tried simulating the experiment by Khurshudyan et al.[3], which is a wind tunnel experiment with a 2D hill of several aspect ratios, named also RUSHIL experiment. The latest comparison to it was published by Kasmi and Mason 2010 [4]. Because the top boundary condition is not regular, I had considerable differences with the experiment and have given up for the meanwhile (since it is not similar to real ABL - which is more in my interest - and so not in my focus). Below is what I did for creating a STL surface for the case, just for reference.

Creating the STL surface

The shape of the 2D hill is an analytical function described in [5] as:

x = \frac{1}{2} \xi \left[ 1+\frac{a^2}{\xi^2+m^2(a^2- \xi^2)} \right]   for  |x| \leq a

z = \frac{1}{2} m \sqrt{a^2-\xi^2} \cdot \left[ 1- \frac{a^2}{\xi^2+m^2(a^2- \xi^2)} \right]

where  m = \frac{h}{a}+\sqrt{\frac{h}{a}+1} and h is the height of the hill (h = 0.117 [m]) and a is the length of the hill. \xi is a parameter that changes from 0 to a. The aspect ratio of the hill is 3, 5 and 8.

The experimental setting was:

logarithmic inlet profile with z_0=0.157 \cdot 10^-3 [m], u_{*} = 0.178 \left[ \frac{m}{s}\right] which gives for instance U_\infty = 3.9 \left[ \frac{m}{s} \right]  at  z = 1 [m]

1 The Profile was created with the desired discretization in a spreadsheet program. Column x (1st column) was the width of the hill (arbitrary width), 2nd column is x and the third z. Finally the 3 columns where exported as a csv file File:RUSHIL 8.csv (This should be according to the .xyz format).

Next, paraview is used to transform the csv into a STL surface, as explained in this thread, an reiterated here:

2 The profile is uploaded in paraview.

3 Open the csv in paraview using the csv reader, choose 1 column for each coordinate.

4 Use the "TableToPoints' filter to obtain an array of points. The columns choice here is important so that the result will be a right hand side coordinate system. For the file above the order is y - x - z

5 Use the delaunay tool to "map" a suface from the point (The Delaunay 2D filter)

6 Save the data, you 'll be able to save it as an stl

Creating the mesh