Skip to content

Commit ef76429

Browse files
authored
Merge pull request #10 from NREL/develop
Merge develop master for version 1.1.0
2 parents 00fc160 + 84c6975 commit ef76429

23 files changed

+1221
-134
lines changed

README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ modeling and simulation tool for controls research are
4545
Citation
4646
========
4747

48+
.. image:: https://zenodo.org/badge/178914781.svg
49+
:target: https://zenodo.org/badge/latestdoi/178914781
50+
4851
If FLORIS played a role in your research, please cite it. This software can be
4952
cited as:
5053

37.9 KB
Loading

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
# "logo_name": True,
8989
"travis_button": True,
9090
"fixed_sidebar": True,
91-
"github_user": "WISDEM",
91+
"github_user": "NREL",
9292
"github_repo": "FLORIS",
9393
"sidebar_width": '375px',
9494
"page_width": '75%',

docs/index.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ modeling and simulation tool for controls research are
5555
Citation
5656
========
5757

58+
.. image:: https://zenodo.org/badge/178914781.svg
59+
:target: https://zenodo.org/badge/latestdoi/178914781
60+
5861
If FLORIS played a role in your research, please cite it. This software can be
5962
cited as:
6063

docs/source/changelog.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,35 @@ Change Log
44
For download and installation instructions, see the
55
:ref:`installation <installation>` section.
66

7+
v1.1.0
8+
======
9+
Released on 2019-05-31
10+
11+
Visualization:
12+
13+
- Add quiver plot function to show in-plane flows
14+
- Adds example 7 which visualizes curl in the wake
15+
16+
Energy Ratio
17+
18+
- Adds additional functions for computing energy ratio as a function of wind
19+
speed
20+
- Adds an example which uses FLORIS simulation to demonstrate the energy ratio
21+
methods
22+
23+
Wake Model changes
24+
25+
- Set deflection multiplier in gauss deflection to 1.2 (was 1.0) to better
26+
match SOWFA and field results
27+
- Update regression test to match
28+
29+
Small Changes
30+
31+
- Removal of unnecessary imports in some files
32+
- Update of the CP/CT tables for example NREL 5MW ref to better model above
33+
rated
34+
- Fix VEC3 print method to print ints without decimal values
35+
736
v1.0.0
837
======
938
Released on 2019-05-07

docs/source/examples.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ to provide instruction on the use of most of the underlying codes.
1212
examples/example_0000.rst
1313
examples/example_0005.rst
1414
examples/example_0006.rst
15+
examples/example_0007.rst
1516
examples/example_0010.rst
1617
examples/example_0015.rst
1718
examples/example_0020.rst
19+
examples/example_0030.rst
1820

1921
For questions not covered in the examples, or to request additional examples, please first search for or
2022
submit your questions to stackoverflow.com using the tag FLORIS. Additionally you can contact
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
example_0007_vis_curl.py
2+
========================
3+
4+
The code for this example can be found here: `example_0007_vis_curl.py
5+
<https://github.com/NREL/floris/blob/develop/examples/example_0007_vis_curl.py>`_
6+
7+
This example demonstrates visualizing in-plane flow using a quiver plot. Further, to facilitate
8+
more elaborate 3-dimensional visulizations with a program such as paraview or vapor, the flow data
9+
is exported to VTK.
10+
11+
First, to ensure the presense of in plane flows, the curl model is selected
12+
13+
::
14+
15+
# Initialize the FLORIS interface fi
16+
fi = wfct.floris_utilities.FlorisInterface("example_input.json")
17+
18+
# Change the model to curl
19+
fi.floris.farm.set_wake_model('curl')
20+
21+
22+
23+
This block of code shows the methods for visualizing in-plane flows on a cut plane 5D behind the turbine
24+
25+
::
26+
27+
# Get the vertical cut through and visualize
28+
cp = wfct.cut_plane.CrossPlane(fi.get_flow_data(),5*D)
29+
fig, ax = plt.subplots(figsize=(10,10))
30+
wfct.visualization.visualize_cut_plane(cp, ax=ax,minSpeed=6.0,maxSpeed=8)
31+
wfct.visualization.visualize_quiver(cp,ax=ax,downSamp=2)
32+
33+
The flow data itself is cropped for size and exported to vtk in the following block
34+
35+
::
36+
37+
#Save the flow data as vtk
38+
flow_data = fi.get_flow_data()
39+
flow_data = flow_data.crop(flow_data,[0,20*D],[-300,300],[50,300])
40+
flow_data.save_as_vtk('for_3d_viz.vtk')
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
example_0030_demo_energy_ratio.py
2+
======================================
3+
4+
The code for this example can be found here:
5+
`example_0030_demo_energy_ratio.py
6+
<https://github.com/NREL/floris/blob/develop/examples/example_0030_demo_energy_ratio.py>`_
7+
8+
This example uses FLORIS to demonstrate the energy ratio method used in analyzing field campagin data.
9+
A version of this code is used for example in the paper:
10+
`Initial results from a field campaign of wake steering applied at a commercial wind farm – Part 1
11+
<https://www.wind-energ-sci.net/4/273/2019/wes-4-273-2019.html>`_
12+
13+
The example sets up a FLORIS farm in which a simulated controller (which simply sets an upstream
14+
turbine to have a fixed 20 deg offset is tested). The farm consists of a control turbine which implements
15+
the strategy, a downstream turbine effect by this change, and a reference turbine not-impacted. The farm is shown here:
16+
17+
.. image:: ../../_static/images/EnergyRatioLayout.png
18+
19+
20+
After setting the farm, the farm is simulated using random wind speed directions with the upstream turbine aligned (Baseline)
21+
or set to 20 degrees offset in yaw (controlled). The power of the reference and test turbine are saved in arrays in this block
22+
for the baseline case:
23+
24+
::
25+
26+
# Initialize the arrays for baseline
27+
ref_pow_base = np.zeros(n_sim)
28+
test_pow_base = np.zeros(n_sim)
29+
ws_base = np.random.uniform(low=5,high=15.,size=n_sim)
30+
wd_base = wd_var_scale * (np.random.rand(n_sim) - 0.5) + 270.
31+
32+
# Run the baseline
33+
for i, (ws,wd) in enumerate(zip(ws_base,wd_base)):
34+
fi.reinitialize_flow_field(wind_speed=ws, wind_direction=wd)
35+
fi.calculate_wake()
36+
turb_powers = fi.get_turbine_power()
37+
ref_pow_base[i] = turb_powers[1] # The unaffacted second turbine
38+
test_pow_base[i] = turb_powers[2] # The downstream turbine
39+
40+
These saved arrays are then used to demonstrate the balanced energy ratio methods in the final block
41+
42+
::
43+
44+
fig, axarr = plt.subplots(3,1,sharex=True,figsize=(10,10))
45+
46+
plot_energy_ratio(ref_pow_base,test_pow_base,ws_base,wd_base,
47+
ref_pow_con,test_pow_con,ws_con,wd_con,
48+
wd_bins, plot_simple=False, axarr=axarr, label_array=['Field Baseline', 'Field Controlled'],
49+
label_pchange='Field Gain' )

examples/example_0000_open_and_vis_floris.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
import matplotlib.pyplot as plt
1515
import floris.tools as wfct
16-
from floris.utilities import Vec3
1716

1817
# Initialize the FLORIS interface fi
1918
fi = wfct.floris_utilities.FlorisInterface("example_input.json")

examples/example_0005_adjust_floris.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import floris.tools as wfct
1616
import floris.tools.visualization as vis
1717
import floris.tools.cut_plane as cp
18-
from floris.utilities import Vec3
1918
import numpy as np
2019
from mpl_toolkits.axes_grid1 import make_axes_locatable, axes_size
2120

0 commit comments

Comments
 (0)