about .yam file #979
-
No matter how I configure the turbine radius and rotor diameter in the YAML file of the turbine library, it always defaults to 126m during application. How can I customize the turbine? |
Beta Was this translation helpful? Give feedback.
Replies: 15 comments
-
Hi @Qutianyuan0124 , Can you share an example of the code that you are running so that we can help you debug it? Ideally, this would be a minimal example including your turbine YAML file (or something that exhibits the behavior you're seeing, with a rotor diameter different to 126m), the main floris input yaml, and a short script demonstrating how you are running FLORIS and the issue you are running into? |
Beta Was this translation helpful? Give feedback.
-
***@***.***
Thank you very much for your reply. Below, I will provide a detailed introduction to the difficulties I have encountered and provide a script file for you to better understand my current situation.
Firstly, I noticed that the wind turbine type in the gch.yaml file is nrel_5MW. In order to facilitate my practical application, I directly modified the hub height to 160m and the impeller diameter to 200m in the turbininlibrary file. Next, I optimized the layout and visualized it, and found that the impeller diameter did not change and remained at 125.88m. The attached test. py is an example, where min-dist-D=5. During my execution, I found that 5D=629.4m. I'm wondering if my operating method is incorrect, why can't I modify the configuration of the fan. Besides, I am concerned that I may not be able to modify parameters such as power curve and thrust coefficient, which would prevent me from applying them.
As described in the picture, I am unable to apply the modified impeller diameter.In addition, in the visualization of the entire hub height section of the wind farm, the impeller diameter cannot be changed, and I feel that this seems to be a problem.
Thank you again for your reply. Looking forward to receiving good news.
***@***.***
From: misi9170
Date: 2024-09-09 21:03
To: NREL/floris
CC: Qutianyuan0124; Mention
Subject: Re: [NREL/floris] about .yam file (Discussion #979)
Hi @Qutianyuan0124 ,
Can you share an example of the code that you are running so that we can help you debug it? Ideally, this would be a minimal example including your turbine YAML file (or something that exhibits the behavior you're seeing, with a rotor diameter different to 126m), the main floris input yaml, and a short script demonstrating how you are running FLORIS and the issue you are running into?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi @Qutianyuan0124 , Unfortunately the files you attached did not come through. Rather than attaching them to an email, could you upload them directly to the discussion on github.com//discussions/979? In the meantime, I did run a quick check: I modified the from floris import FlorisModel
fmodel = FlorisModel("inputs/gch.yaml") # Relative path to gch.yaml from examples/ directory
fmodel.run()
print(fmodel.core.farm.rotor_diameters[0]) # Prints [160. 160. 160.] That seems to be working as expected, but perhaps there is an issue in the optimization code somehow. Thanks, |
Beta Was this translation helpful? Give feedback.
-
***@***.***,
I did the same operation as you, and the result still shows 125.88.
Below is the parameters I set.I modified this directly in the yaml file.Can you tell me how you set it up, or maybe I'm not doing it the right way.In addition,Did I have some bugs when installing floris?Looking forward to your reply.
Thanks,
Qutianyuan
***@***.***
From: misi9170
Date: 2024-09-10 22:08
To: NREL/floris
CC: Qutianyuan0124; Mention
Subject: Re: [NREL/floris] about .yam file (Discussion #979)
Hi @Qutianyuan0124 ,
Unfortunately the files you attached did not come through. Rather than attaching them to an email, could you upload them directly to the discussion on github.com//discussions/979?
In the meantime, I did run a quick check: I modified the rotor_diameter field of floris/turbine_library/NREL_5MW.yaml to 160.0, and then ran the following:
from floris import FlorisModel
fmodel = FlorisModel("inputs/gch.yaml") # Relative path to gch.yaml from examples/ directory
fmodel.run()
print(fmodel.core.farm.rotor_diameters[0]) # Prints [160. 160. 160.]
That seems to be working as expected, but perhaps there is an issue in the optimization code somehow.
Thanks,
Misha
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
***@***.***,
Could you please tell me in which path the yaml file called by the model is stored? I just deleted the Nrel_5Mwe. yaml file in turbine library and the program can still run, so I guess I changed the diameter of the fan impeller in the wrong place. In addition, how to customize a new fan and let the model be applied?
Thanks,
Qutianyuan
***@***.***
From: misi9170
Date: 2024-09-10 22:08
To: NREL/floris
CC: Qutianyuan0124; Mention
Subject: Re: [NREL/floris] about .yam file (Discussion #979)
Hi @Qutianyuan0124 ,
Unfortunately the files you attached did not come through. Rather than attaching them to an email, could you upload them directly to the discussion on github.com//discussions/979?
In the meantime, I did run a quick check: I modified the rotor_diameter field of floris/turbine_library/NREL_5MW.yaml to 160.0, and then ran the following:
from floris import FlorisModel
fmodel = FlorisModel("inputs/gch.yaml") # Relative path to gch.yaml from examples/ directory
fmodel.run()
print(fmodel.core.farm.rotor_diameters[0]) # Prints [160. 160. 160.]
That seems to be working as expected, but perhaps there is an issue in the optimization code somehow.
Thanks,
Misha
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi Qutianyuan, If you cloned the FLORIS repository and then installed using You can check this by running Cheers, |
Beta Was this translation helpful? Give feedback.
-
Hi Misha,
I have solved this problem according to your method, and I plan to reinstall it for better use. Thank you very much for your valuable tips.
Thanks,
Qutianyuan
***@***.***
From: misi9170
Date: 2024-09-11 10:20
To: NREL/floris
CC: Qutianyuan0124; Mention
Subject: Re: [NREL/floris] about .yam file (Discussion #979)
Hi Qutianyuan,
If you cloned the FLORIS repository and then installed using pip install -e floris, then the NREL_5MW.yaml model located in floris/floris/turbine_library/ is the one that will be used. However, if you've found that you can still run the code above after deleting NREL_5MW.yaml, then perhaps FLORIS is installed in a different location. For example, if you simply run pip install floris (without the -e flag), then FLORIS will be installed from PyPI to wherever your conda environment is stored, and the NREL_5MW.yaml that is installed with it will be used.
You can check this by running pip show floris from the terminal---does this print the path to your clone, or to somewhere else on your computer?
Cheers,
Misha
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hello Misha,
Recently, I have encountered some issues regarding Floris visualization that I would like to ask you about. For the "Visualize y cut plane," is this plane a horizontal plane passing through the hub center of the turbine? It seems more like a plane perpendicular to the Y-axis and parallel to the X-Z plane.
For the "Visualize cross plane," I feel that this plane passes through the hub center of the first row of turbines and reflects the wake situation. However, I want to check the second and third rows of turbines, but I don’t know how to proceed.
Attached are my turbine coordinate files and boundary points. How should I set it up to see the wake distribution for turbines T6 to T10?
Your sincerely,
Qutianyuan
***@***.***
From: misi9170
Date: 2024-09-11 10:20
To: NREL/floris
CC: Qutianyuan0124; Mention
Subject: Re: [NREL/floris] about .yam file (Discussion #979)
Hi Qutianyuan,
If you cloned the FLORIS repository and then installed using pip install -e floris, then the NREL_5MW.yaml model located in floris/floris/turbine_library/ is the one that will be used. However, if you've found that you can still run the code above after deleting NREL_5MW.yaml, then perhaps FLORIS is installed in a different location. For example, if you simply run pip install floris (without the -e flag), then FLORIS will be installed from PyPI to wherever your conda environment is stored, and the NREL_5MW.yaml that is installed with it will be used.
You can check this by running pip show floris from the terminal---does this print the path to your clone, or to somewhere else on your computer?
Cheers,
Misha
―
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi! You're right, a y-cross plane is perpendicular to the y-axis and so you only need to set it's position along the y axis, while the x-cross plane is perpendicular to x and you set the distance downstream (along x-axis), there are examples illustrating both here: https://nrel.github.io/floris/examples/examples_visualizations/002_visualize_y_cut_plane.html https://nrel.github.io/floris/examples/examples_visualizations/003_visualize_cross_plane.html |
Beta Was this translation helpful? Give feedback.
-
But what does downstream_dist=500.0 mean, how do I look at the second and third rows, and what should I set downstream_dist to
***@***.***
From: paulf81
Date: 2024-09-13 23:03
To: NREL/floris
CC: Qutianyuan0124; Mention
Subject: Re: [NREL/floris] about .yam file (Discussion #979)
Hi! You're right, a y-cross plane is perpendicular to the y-axis and so you only need to set it's position along the y axis, while the x-cross plane is perpendicular to x and you set the distance downstream (along x-axis), there are examples illustrating both here:
https://nrel.github.io/floris/examples/examples_visualizations/002_visualize_y_cut_plane.html
https://nrel.github.io/floris/examples/examples_visualizations/003_visualize_cross_plane.html
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
For example, I want to check the section of the four columns of 1, 2, 3 and 4 fans, how should I set it
***@***.***
From: paulf81
Date: 2024-09-13 23:03
To: NREL/floris
CC: Qutianyuan0124; Mention
Subject: Re: [NREL/floris] about .yam file (Discussion #979)
Hi! You're right, a y-cross plane is perpendicular to the y-axis and so you only need to set it's position along the y axis, while the x-cross plane is perpendicular to x and you set the distance downstream (along x-axis), there are examples illustrating both here:
https://nrel.github.io/floris/examples/examples_visualizations/002_visualize_y_cut_plane.html
https://nrel.github.io/floris/examples/examples_visualizations/003_visualize_cross_plane.html
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi @Qutianyuan0124, I don't quite understand your layout, but if you want to visualize the cross planes at the turbine locations, you can use import matplotlib.pyplot as plt
from floris import FlorisModel
from floris.flow_visualization import visualize_cut_plane
fmodel = FlorisModel("../inputs/gch.yaml")
x_locations = [0, 600, 1200, 1800, 0, 600, 1200, 1800]
y_locations = [0, 0, 0, 0, 500, 500, 500, 500]
fmodel.set(
layout_x=x_locations,
layout_y=y_locations,
wind_directions=[270],
wind_speeds=[8],
turbulence_intensities=[0.06],
)
# Collect the cross plane at the location of each downstream turbine
fig, ax = plt.subplots(4, 1, figsize=(3, 10))
for i, x in enumerate(x_locations[:4]):
cross_plane = fmodel.calculate_cross_plane(
y_resolution=100,
z_resolution=100,
downstream_dist=x,
)
# Plot the flow field
visualize_cut_plane(
cross_plane, ax=ax[i], min_speed=3, max_speed=9, label_contours=True,
title=f"Cross plane at x={x} m",
)
plt.show() Note that here, the |
Beta Was this translation helpful? Give feedback.
-
Hello,
Today is our country's Mid-Autumn Festival, also wish you a happy Mid-Autumn Festival, family reunion.
Also I would like to ask what downstream_dist should be set to in your example if the wind direction is 0 degrees
***@***.***
From: misi9170
Date: 2024-09-16 20:56
To: NREL/floris
CC: Qutianyuan0124; Mention
Subject: Re: [NREL/floris] about .yam file (Discussion #979)
Hi @Qutianyuan0124,
I don't quite understand your layout, but if you want to visualize the cross planes at the turbine locations, you can use calculate_cross_plane with downstream_dist set to the location of the turbines. You can use this code to get started:
import matplotlib.pyplot as plt
from floris import FlorisModel
from floris.flow_visualization import visualize_cut_plane
fmodel = FlorisModel("../inputs/gch.yaml")
x_locations = [0, 600, 1200, 1800, 0, 600, 1200, 1800]
y_locations = [0, 0, 0, 0, 500, 500, 500, 500]
fmodel.set(
layout_x=x_locations,
layout_y=y_locations,
wind_directions=[270],
wind_speeds=[8],
turbulence_intensities=[0.06],
)
# Collect the cross plane at the location of each downstream turbine
fig, ax = plt.subplots(4, 1, figsize=(3, 10))
for i, x in enumerate(x_locations[:4]):
cross_plane = fmodel.calculate_cross_plane(
y_resolution=100,
z_resolution=100,
downstream_dist=x,
)
# Plot the flow field
visualize_cut_plane(
cross_plane, ax=ax[i], min_speed=3, max_speed=9, label_contours=True,
title=f"Cross plane at x={x} m",
)
plt.show()
Note that here, the downstream_dist is simply the x-location of the turbines because the wind direction is 270 degrees and the wind farm is oriented with the x and y axes. For other wind directions or layouts, you'll need to do a little bit of geometry to get the correct downstream_dist.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I don't quite understand this geometric operation you said, can you demonstrate it?
Your sincerely,
qutianyuan
***@***.***
From: misi9170
Date: 2024-09-16 20:56
To: NREL/floris
CC: Qutianyuan0124; Mention
Subject: Re: [NREL/floris] about .yam file (Discussion #979)
Hi @Qutianyuan0124,
I don't quite understand your layout, but if you want to visualize the cross planes at the turbine locations, you can use calculate_cross_plane with downstream_dist set to the location of the turbines. You can use this code to get started:
import matplotlib.pyplot as plt
from floris import FlorisModel
from floris.flow_visualization import visualize_cut_plane
fmodel = FlorisModel("../inputs/gch.yaml")
x_locations = [0, 600, 1200, 1800, 0, 600, 1200, 1800]
y_locations = [0, 0, 0, 0, 500, 500, 500, 500]
fmodel.set(
layout_x=x_locations,
layout_y=y_locations,
wind_directions=[270],
wind_speeds=[8],
turbulence_intensities=[0.06],
)
# Collect the cross plane at the location of each downstream turbine
fig, ax = plt.subplots(4, 1, figsize=(3, 10))
for i, x in enumerate(x_locations[:4]):
cross_plane = fmodel.calculate_cross_plane(
y_resolution=100,
z_resolution=100,
downstream_dist=x,
)
# Plot the flow field
visualize_cut_plane(
cross_plane, ax=ax[i], min_speed=3, max_speed=9, label_contours=True,
title=f"Cross plane at x={x} m",
)
plt.show()
Note that here, the downstream_dist is simply the x-location of the turbines because the wind direction is 270 degrees and the wind farm is oriented with the x and y axes. For other wind directions or layouts, you'll need to do a little bit of geometry to get the correct downstream_dist.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi @Qutianyuan0124 , Happy Mid-Autumn Festival! After playing around with trying to compute downstream distances using the wind direction, I actually found it was easier to just reach down into the data stored on the import matplotlib.pyplot as plt
import numpy as np
from floris import FlorisModel
from floris.flow_visualization import visualize_cut_plane
fmodel = FlorisModel("../inputs/gch.yaml")
x_locations = [0, 600, 1200, 1800, 0, 600, 1200, 1800]
y_locations = [0, 0, 0, 0, 500, 500, 500, 500]
n_turbines = len(x_locations)
wind_direction = 45
fmodel.set(
layout_x=x_locations,
layout_y=y_locations,
wind_directions=[wind_direction],
wind_speeds=[8],
turbulence_intensities=[0.06],
)
fmodel.run()
print(fmodel.get_turbine_powers())
# Collect the cross plane at the location of each downstream turbine
fig, ax = plt.subplots(n_turbines, 1, figsize=(3, n_turbines))
for i in range(n_turbines):
dd = fmodel.core.grid.x_sorted.mean(axis=(2,3))[0,i]
cross_plane = fmodel.calculate_cross_plane(
y_resolution=100,
z_resolution=100,
downstream_dist=dd,
)
ii = fmodel.core.grid.sorted_coord_indices[0,i]
# Plot the flow field
visualize_cut_plane(
cross_plane, ax=ax[ii], min_speed=3, max_speed=9, label_contours=True,
title="Cross plane T{1:03d}".format(dd, ii),
)
fig.suptitle("Wind direction: {0:.1f} deg.".format(wind_direction))
plt.show() |
Beta Was this translation helpful? Give feedback.
Hi Qutianyuan,
If you cloned the FLORIS repository and then installed using
pip install -e floris
, then the NREL_5MW.yaml model located in floris/floris/turbine_library/ should be the one that will be used. However, if you've found that you can still run the code above after deleting NREL_5MW.yaml, then perhaps FLORIS is installed in a different location. For example, if you ranpip install floris
(without the-e
flag), then FLORIS will be installed from PyPI to wherever your conda environment is stored, and the NREL_5MW.yaml that is installed with it will be used.You can check this by running
pip show floris
from the terminal---does this print the path to your clone, or to somewhere els…