Description: Terrain - Refinement/blocking file Version: 9.0.0 Updated: 27.11.13

Terrain - Refinement/blocking file

In the following the syntax in the .bws refinement/blocking file will be outlined. A .bws file is generated automatically if refinement type is set to Refinement area or if the forest type is set to Base on roughness height in the module Terrain. As a starting point the file simple_refinement.bws will be examined. This file is generated whenever refinement type is set to Refinement area. The file is found in the dtm (digital terrain model) folder of the current project. At the end of this section an obstacle is introduced by modifying the simple_refinement.bws file.

Simple refinement

Running the Utsira case (utsira.gws) with default setting except for refinement type which is set to Refinement area, will give a grid at ground level as shown in figure 1.

Figure 1. Grid at ground level in the physical space.

The underlying structure of the grid is easily revealed in a logical space (i,j) as shown in figure 2.

Figure 2. Grid at ground level in the logical space with junction points (i,j), k is omitted since at ground level k=1.

As can be seen in the logical space in figure 2 the grid at ground level is divided in three logical segments in each direction. Each segment has two attributes: the number of inner points along the segment and the distribution factor. In the simple_refinement.bws file, given below, the line segments are defined after the keywords "i-logical                    :" and "j-logical                    :". The number of points refers to inner points, hence the number of cells along a line segment will be the number of points plus one. The distribution is given as an arithmetic sequence where the value gives the fraction between the first and last cell. A distribution factor equal to one will give equally sized cells.

The grid in the physical z-direction is given in the same way after the keyword "k-logical                    :", except for a third attribute giving the physical extension in the z-direction.

The physical extension and structure of the horizontal plane is given by specifying physical coordinates to all the junction points in the logical space. This is done after the keyword "junctions                    :". The physical coordinates could be referred to the global coordinate system (3) or the local coordinate system (1), but also user defined systems could be used specified with the keyword "local_co-ordsys        :". The user defined coordinate system is useful for generation of more complex geometries.

The three last keywords are used to specify obstacles. First "junctions_obstacle  :" specify the physical grid structure at k-levels larger than 1. While "surfaces_obstacle    :" and "volumes_obstacle      :" gives the extension in logical coordinates for blocked 2D surfaces and 3D volumes. The final attribute "type" for these two keywords gives the porosity of the obstacle in the range from 0 to 1, where 0 will give a fully blocked solid.

A final word about the syntax used in the .bws file. The text strings from column 1 to 20 is used to identify a keyword, which is always ended by a colon in column 20. Therefore all keywords consists of 20 characters including blank characters, which should be used for the blank spaces. Some keywords have their corresponding input on the same line as the keywords, as for example the version number after "WindSim version        :". Other keywords have input on the following lines. In order to identify the end of the input an empty line should be given before a line with a new keyword or the end-of-file.

WindSim version    : 610

local_co-ordsys    :  type  x_trans  y_trans    angle

i-logical          :    line_i  points   distribution
                             1      14    4.3249
                             2      39    1.0000
                             3      14    0.2312

j-logical          :    line_j  points   distribution
                             1      13    4.2767
                             2      36    1.0000
                             3      13    0.2338

k-logical          :    line_k  points   distribution  z_upper
                             1      19    0.1000        387.0

junctions          :         i       j       k  co-ord       x         y         z
                             1       1       1       3  -76400.0 6616200.0       0.0
                             2       1       1       3  -75134.0 6616200.0       0.0
                             3       1       1       3  -73866.0 6616200.0       0.0
                             4       1       1       3  -72600.0 6616200.0       0.0
                             1       2       1       3  -76400.0 6617366.0       0.0
                             2       2       1       3  -75134.0 6617366.0       0.0
                             3       2       1       3  -73866.0 6617366.0       0.0
                             4       2       1       3  -72600.0 6617366.0       0.0
                             1       3       1       3  -76400.0 6618534.0       0.0
                             2       3       1       3  -75134.0 6618534.0       0.0
                             3       3       1       3  -73866.0 6618534.0       0.0
                             4       3       1       3  -72600.0 6618534.0       0.0
                             1       4       1       3  -76400.0 6619700.0       0.0
                             2       4       1       3  -75134.0 6619700.0       0.0
                             3       4       1       3  -73866.0 6619700.0       0.0
                             4       4       1       3  -72600.0 6619700.0       0.0

junctions_obstacle :         i       j       k  co-ord       x         y         z

surfaces_obstacle  :       i_s     i_e     j_s     j_e     k_s     k_e    type

volumes_obstacle   :       i_s     i_e     j_s     j_e     k_s     k_e    kind    type        c1        c2  turb_sources

    
Extract 1. simple_refinement.bws found in the dtm folder of the current project.

Simple refinement including obstacle

In this section an obstacle of dimension 100x100x30 meters will be generated in the centre of the Utsira demo by editing the file simple_refinement.bws. The new file will be called simple_obstacle.bws, and the refinement type will be set to Use refinement file in order to read this file.

An obstacle is identified by the lines in the logical space. To create an obstacle in the centre additional lines are needed. It is always recommended to make changes in a .bws file in steps, to detect possible mistyping's at an early stage. The first change in the simple_refinement.bws file is to add two new lines in north-south and east-west direction and then set the physical coordinates in accordance with where the obstacle should be located. Locating the obstacle in the centre with extension y_min=6617900, y_max=6618000 in north-south direction and x_min=-74570, x_max=-74470 in east-west direction will be achieved with changes in extract 2. The physical grid at ground plane is given in figure 3.

WindSim version    : 610

local_co-ordsys    :  type  x_trans  y_trans    angle

i-logical          :    line_i  points   distribution
                             1      14    4.0587
                             2      17    1.0000
                             3       3    1.0000
                             4      17    1.0000
                             5      14    0.2464

j-logical          :    line_j  points   distribution
                             1      13    3.9914
                             2      15    1.0000
                             3       3    1.0000
                             4      15    1.0000
                             5      13    0.2505

k-logical          :    line_k  points   distribution  z_upper
                             1      20    0.1000        387.0

junctions          :         i       j       k  co-ord       x         y         z
                             1       1       1       3  -76400.0 6616200.0       0.0
                             2       1       1       3  -75134.0 6616200.0       0.0
                             3       1       1       3  -74570.0 6616200.0       0.0
                             4       1       1       3  -74470.0 6616200.0       0.0
                             5       1       1       3  -73866.0 6616200.0       0.0
                             6       1       1       3  -72600.0 6616200.0       0.0
                             1       2       1       3  -76400.0 6617366.0       0.0
                             2       2       1       3  -75134.0 6617366.0       0.0
                             3       2       1       3  -74570.0 6617366.0       0.0
                             4       2       1       3  -74470.0 6617366.0       0.0
                             5       2       1       3  -73866.0 6617366.0       0.0
                             6       2       1       3  -72600.0 6617366.0       0.0
                             1       3       1       3  -76400.0 6617900.0       0.0
                             2       3       1       3  -75134.0 6617900.0       0.0
                             3       3       1       3  -74570.0 6617900.0       0.0
                             4       3       1       3  -74470.0 6617900.0       0.0
                             5       3       1       3  -73866.0 6617900.0       0.0
                             6       3       1       3  -72600.0 6617900.0       0.0
                             1       4       1       3  -76400.0 6618000.0       0.0
                             2       4       1       3  -75134.0 6618000.0       0.0
                             3       4       1       3  -74570.0 6618000.0       0.0
                             4       4       1       3  -74470.0 6618000.0       0.0
                             5       4       1       3  -73866.0 6618000.0       0.0
                             6       4       1       3  -72600.0 6618000.0       0.0
                             1       5       1       3  -76400.0 6618534.0       0.0
                             2       5       1       3  -75134.0 6618534.0       0.0
                             3       5       1       3  -74570.0 6618534.0       0.0
                             4       5       1       3  -74470.0 6618534.0       0.0
                             5       5       1       3  -73866.0 6618534.0       0.0
                             6       5       1       3  -72600.0 6618534.0       0.0
                             1       6       1       3  -76400.0 6619700.0       0.0
                             2       6       1       3  -75134.0 6619700.0       0.0
                             3       6       1       3  -74570.0 6619700.0       0.0
                             4       6       1       3  -74470.0 6619700.0       0.0
                             5       6       1       3  -73866.0 6619700.0       0.0
                             6       6       1       3  -72600.0 6619700.0       0.0

junctions_obstacle :         i       j       k  co-ord       x         y         z

surfaces_obstacle  :       i_s     i_e     j_s     j_e     k_s     k_e    type

volumes_obstacle   :       i_s     i_e     j_s     j_e     k_s     k_e    kind    type        c1        c2  turb_sources

Extract 2. Addition of two logical lines in north-south and east-west direction based on extract 1, changes marked with red.

Figure 3. Grid at ground level in the physical space after inclusion of two additional lines in north-south and ease-west direction.

In order to establish a 30 meters high obstacle the grid must be modified in z-direction. In the same way as additional logical lines were added in the horizontal plane, a new logical line is added in z-direction after the key word: "k-logical                    :". The physical coordinates at this new level might be changed compared with the physical coordinates at ground level, hence the line in z-direction might be skewed. However, the simple obstacle that will be created here, will only require the same grid as the grid at the ground level lifted up 30 meters, this is achieved by adding the physical coordinates of the ground plane after the key word "junctions_obstacle  :", and replacing the z-value from 0.0 to 30.0.

Finally the obstacle is defined after the key word: "volumes_obstacle      :". This key word takes ten attributes:

the first six is the extension defined by the logical coordinates of the junction points;

the 7th attribute, kind, is a text-attribute, it defines if the volume obstacle follows the terrain (forest) or is bounded by a horizontal plane (obstacle);

the 8th attribute, type (which has to be defined as a real), defines the porosity of the obstacle, 1.0 is fully open and 0.0 fully blocked. For a fully blocked obstacle the same boundary conditions as those used along the ground will be applied along all external walls without roughness;

the last two attributes, c1 (1/s) and c2 (1/m), are also real values, they respectively describe the drag coefficient that a porous obstacle offers against the flow, c1 generates drag forces proportional to the velocity while c2 generates drag forces proportional to the square of the velocity. C1 and c2 are the same constants used in the description of a forest.

The top level of an obstacle will be represented by a horizontal plane. The height of this plane is given by the height of the south-west corner. In situation with large terrain variations, this might place parts of the obstacle under the ground level, which will degenerate the grid, see next section.

WindSim version    : 610

local_co-ordsys    :  type  x_trans  y_trans    angle

i-logical          :    line_i  points   distribution
                             1      14    4.0587
                             2      17    1.0000
                             3       3    1.0000
                             4      17    1.0000
                             5      14    0.2464

j-logical          :    line_j  points   distribution
                             1      13    3.9914
                             2      15    1.0000
                             3       3    1.0000
                             4      15    1.0000
                             5      13    0.2505

k-logical          :    line_k  points   distribution  z_upper
                             1       2    1.0000          30.0
                             2      20    0.1000        387.0

junctions          :         i       j       k  co-ord       x         y         z
                             1       1       1       3  -76400.0 6616200.0       0.0
                             2       1       1       3  -75134.0 6616200.0       0.0
                             3       1       1       3  -74570.0 6616200.0       0.0
                             4       1       1       3  -74470.0 6616200.0       0.0
                             5       1       1       3  -73866.0 6616200.0       0.0
                             6       1       1       3  -72600.0 6616200.0       0.0
                             1       2       1       3  -76400.0 6617366.0       0.0
                             2       2       1       3  -75134.0 6617366.0       0.0
                             3       2       1       3  -74570.0 6617366.0       0.0
                             4       2       1       3  -74470.0 6617366.0       0.0
                             5       2       1       3  -73866.0 6617366.0       0.0
                             6       2       1       3  -72600.0 6617366.0       0.0
                             1       3       1       3  -76400.0 6617900.0       0.0
                             2       3       1       3  -75134.0 6617900.0       0.0
                             3       3       1       3  -74570.0 6617900.0       0.0
                             4       3       1       3  -74470.0 6617900.0       0.0
                             5       3       1       3  -73866.0 6617900.0       0.0
                             6       3       1       3  -72600.0 6617900.0       0.0
                             1       4       1       3  -76400.0 6618000.0       0.0
                             2       4       1       3  -75134.0 6618000.0       0.0
                             3       4       1       3  -74570.0 6618000.0       0.0
                             4       4       1       3  -74470.0 6618000.0       0.0
                             5       4       1       3  -73866.0 6618000.0       0.0
                             6       4       1       3  -72600.0 6618000.0       0.0
                             1       5       1       3  -76400.0 6618534.0       0.0
                             2       5       1       3  -75134.0 6618534.0       0.0
                             3       5       1       3  -74570.0 6618534.0       0.0
                             4       5       1       3  -74470.0 6618534.0       0.0
                             5       5       1       3  -73866.0 6618534.0       0.0
                             6       5       1       3  -72600.0 6618534.0       0.0
                             1       6       1       3  -76400.0 6619700.0       0.0
                             2       6       1       3  -75134.0 6619700.0       0.0
                             3       6       1       3  -74570.0 6619700.0       0.0
                             4       6       1       3  -74470.0 6619700.0       0.0
                             5       6       1       3  -73866.0 6619700.0       0.0
                             6       6       1       3  -72600.0 6619700.0       0.0

junctions_obstacle :         i       j       k  co-ord       x         y         z
                             1       1       2       3  -76400.0 6616200.0       30.0
                             2       1       2       3  -75134.0 6616200.0       30.0
                             3       1       2       3  -74570.0 6616200.0       30.0
                             4       1       2       3  -74470.0 6616200.0       30.0
                             5       1       2       3  -73866.0 6616200.0       30.0
                             6       1       2       3  -72600.0 6616200.0       30.0
                             1       2       2       3  -76400.0 6617366.0       30.0
                             2       2       2       3  -75134.0 6617366.0       30.0
                             3       2       2       3  -74570.0 6617366.0       30.0
                             4       2       2       3  -74470.0 6617366.0       30.0
                             5       2       2       3  -73866.0 6617366.0       30.0
                             6       2       2       3  -72600.0 6617366.0       30.0
                             1       3       2       3  -76400.0 6617900.0       30.0
                             2       3       2       3  -75134.0 6617900.0       30.0
                             3       3       2       3  -74570.0 6617900.0       30.0
                             4       3       2       3  -74470.0 6617900.0       30.0
                             5       3       2       3  -73866.0 6617900.0       30.0
                             6       3       2       3  -72600.0 6617900.0       30.0
                             1       4       2       3  -76400.0 6618000.0       30.0
                             2       4       2       3  -75134.0 6618000.0       30.0
                             3       4       2       3  -74570.0 6618000.0       30.0
                             4       4       2       3  -74470.0 6618000.0       30.0
                             5       4       2       3  -73866.0 6618000.0       30.0
                             6       4       2       3  -72600.0 6618000.0       30.0
                             1       5       2       3  -76400.0 6618534.0       30.0
                             2       5       2       3  -75134.0 6618534.0       30.0
                             3       5       2       3  -74570.0 6618534.0       30.0
                             4       5       2       3  -74470.0 6618534.0       30.0
                             5       5       2       3  -73866.0 6618534.0       30.0
                             6       5       2       3  -72600.0 6618534.0       30.0
                             1       6       2       3  -76400.0 6619700.0       30.0
                             2       6       2       3  -75134.0 6619700.0       30.0
                             3       6       2       3  -74570.0 6619700.0       30.0
                             4       6       2       3  -74470.0 6619700.0       30.0
                             5       6       2       3  -73866.0 6619700.0       30.0
                             6       6       2       3  -72600.0 6619700.0       30.0

surfaces_obstacle  :       i_s     i_e     j_s     j_e     k_s     k_e    type

volumes_obstacle   :       i_s     i_e     j_s     j_e     k_s     k_e    kind    type        c1        c2  turb_sources
                             3       4       3       4       1       2 obstacle     0.0   0.000   0.000  false
Extract 3. Addition of one extra z-level and the obstacle specification based on extract 2, changes marked with red.

Figure 4. Grid at ground level including obstacle, zoom in at centre. Simulated 3D velocity vectors at 10 meters height.

Special considerations

An ideal grid consists of equally sized orthogonal cells. The introduction of obstacles in a grid might aggravate these characteristics, which could lead to divergence in the module Wind Fields. This is in particular true if the height variations in the terrain are large. In figure 5, an obstacle is located in front of a hill. The height of the horizontal top plane is defined by the height at the south-west corner. The grid is modified in the dark grey area above the obstacle. In order to avoid excessive skewing of the neighbour cells to the obstacle, a transition zone of 5 cells is used where a linear interpolation is made to reduce the skewness, as indicated by the lighter grey area in the figure. Fewer cells will be used if there are less than 5 cells from the obstacle to the outer border of the computational domain or to another obstacle.

Figure 5. Modification of the grid due to the introduction of an obstacle. An interpolation zone of 5 cells is used to reduce abrupt changes of the cell skewness, as indicated in the light grey area.

If an obstacle would be placed partly under the ground, as indicated in figure 6, then the grid would degenerate. An error message about crossing lines would be given in this case.

Figure 6. Undefined situation with obstacle placed partly under the ground.

Figure 7 illustrates how obstacles could be the connected. Two obstacles with the same height are given at the top. When a third connecting obstacle is introduced then interpolation is introduced to avoid high skewness of the grid, the result is given in the middle. If the intention was to generate obstacles with discontinuous heights, then this could be achieved by introducing one more k-level and thereby avoid the interpolation, as shown at the bottom.

Figure 7. Connected obstacles.