NREL/WindSE

Defining correct inlfow angles

Josue9740 opened this issue · 4 comments

Description

I having a hard time to define the proper inflow angle. I have tried specifing the angles in radians and in deg, but I always get representations that do not correspond to the angle set.

In order to calculate wind speed values, I am using the object "point_data['velocity']" within the output file "velocity.vtu". I guess that "point_data['velocity']" contains the three wind speed coordinates (u,v,w), since it has three values for every single x,y,z coordinate. When I represent the results, the flow direction is not the one specified in the .yaml file.

Can anybody help?

Thank you in advance.

Hmm, I just double checked that setting "boundary_conditions:inflow_angle:float" in the yaml file changes the inflow angle, and it works for me. Could you send me your yaml file, and I'll try to see what's happening.

As a side note: changing the inflow angle is only tested on the rectangle and box domains, right now. Additionally, setting an inflow condition and custom boundary conditions is not currently supported. I'm sorry if either of those cause an issue. Hopefully we can get it working for you.

As a side side note: If you want to visualize the solution fields (or any of the .vtu/pvd/xdmf files) check out paraview. To test that the inflow angle was set properly, I loaded the initial velocity file (in output/functions/u0.pvd) and applied a "Glyphs" filter to visualized the velocity vector field.

Thank you so much for your prompt response. This is the .yaml file that I am using. This file provides me with a flow direction coming from around 20°. However, as you can see, in order to do that I have to use a direction of 4.38.

Yaml file:

General options

general:

name: wf1x1_3D      # Name of the output folder
output: ["mesh","initial_guess","height","turbine_force","solution"]
output_type: pvd

Wind Farm Parameters:

wind_farm:

####################### Imported Wind Farm #######################
type: imported                   #                          |
path: Input_Data/wind_farm1T.txt   # location of wind farm    | -
display: true
HH: 138
RD: 220
thickness: 12.0
axial: 0.25 #0.25
force: sine                      # radial force distribution| -
###################################################################

Domain Parameters: Uncomment a set to change domain shape

domain:

########################### Box Domain ############################
type: box              #                       |
x_range: [-1200, 1200] #[464149, 473692] # x-range of the domain | m
y_range: [-600, 600] #[3067440, 3074827] # y-range of the domain | m
z_range: [0.04, 400]   # z-range of the domain | m
nx: 20 #95   #20              # Number of x-nodes     | -
ny: 10 #74   #10           # Number of y-nodes     | -
nz: 10    #10             # Number of z-nodes      | -
###################################################################

######## Additionally, uncomment this for complex terrain #########
# interpolated: true 
# terrain_path: Input_Data/skew_terrain.txt
###################################################################

Refine

refine:

###################################################################
warp_type: split
warp_percent: 0.7     # percent of cells moved       | -
warp_height: 250       # move cell below this value   | m
refine_custom: [
    [box, [  [[-1000,1200],[-200,200],[ 0,200]]  ]]
]
#     [box, [  [[464149,473692],[3067440,3074827],[ 0,300]]  ]]
# ]
turbine_num: 1         # number of turbine refinements| -
#turbine_type: wake #Default=simple
turbine_factor: 1.25   # turbine radius multiplier    | -
###################################################################

Function space

function_space:

###################################################################
type: linear
###################################################################

Boundary conditions

boundary_conditions:

###################################################################
vel_profile: log
HH_vel: 10.04
vel_height: HH
power: 0.417 #0.25
k: 0.4
inflow_angle: 4.38 #225 #0.349066 #1.13
######### Uncomment to test out custom BCs for BoxDomain ##########
# boundary_types:
#     inflow: ["west"]
#     no_stress: ["east"]
#     free_slip: ["top","north","south"]
#     no_slip: ["bottom"]
###################################################################

Problem

problem:

###################################################################
type: stabilized
viscosity: 0.0000148 #0.1 #5
lmax: 50 #100 #15 #50
###################################################################

Solver

solver:

###################################################################
type: steady
save_power: true
###################################################################

The wind farm file

wind_farm1T.txt:

x y HH Yaw Diameter Thickness Axial_Induction

 0    0    138.0    0.0    220.0      12.0          0.25

Ah, I think I understand the problem! It's mostly just conventions.

First things first, the angle is in radians. Though, with the number of times I have to google "30 degrees to radians," I probably should just make it degrees and do the conversion within windse.

Second, the inflow direction is referenced from the positive x-axis. This means a positive 30 degrees (0.523 radians) would make the inflow velocity vector point northeast and negative 30 degrees (-0.523 radians) would be pointing southeast.

Based on your yaml file, I'm thinking you want the inflow direction to point 20 degrees from the negative y-axis. The equivalent angle with the positive x-axis reference is 250 degrees or 4.363 radians (close to your input of 4.38)

image

Hopefully that helps!

Definitively, it helps! Thank you so much for your answer. I think it could be of great interest to the users to make these points clearer in future updates. Perhaps the problem is that when working with other libraries from NREL, like Floris, we can find a very different convention: the reference is set to the north (positive y-axis), and positive angles follow clockwise.

In any case, your answer helps me a lot, thank you!!!!!