Skip to content

Commit

Permalink
Update Documentation Example to Configure Dynamically (#2)
Browse files Browse the repository at this point in the history
* turn off jupyter execute and use latest local build info

* update documentation to dynamically reconfigure floris turbine library
  • Loading branch information
RHammond2 authored Dec 16, 2023
1 parent c9415aa commit 333b065
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 69 deletions.
9 changes: 9 additions & 0 deletions docs/waves_example.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ turbine_library_path: <path_to_waves>/WAVES/library/base_2022/turbines/
library_path = Path("../library/base_2022/")
config_fixed = load_yaml(library_path / "project/config", "base_fixed_bottom_2022.yaml")
config_floating = load_yaml(library_path / "project/config", "base_floating_2022.yaml")
# This example was designed prior to the FLORIS 3.6 release, so the path to the turbine library in
# FLORIS must be manually updated, but this example must work for all users, so a dynamic method
# is used below, ensuring this works for all users.
config_fixed["floris_config"] = load_yaml(library_path / "project/config", config_fixed["floris_config"])
config_floating["floris_config"] = load_yaml(library_path / "project/config", config_floating["floris_config"])
config_fixed["floris_config"]["farm"]["turbine_library_path"] = library_path / "turbines"
config_floating["floris_config"]["farm"]["turbine_library_path"] = library_path / "turbines"
```

Now, we'll create a Project for each of the fixed bottom and floating offshore scenarios, showing
Expand Down
143 changes: 76 additions & 67 deletions examples/waves_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "b14a231b",
"id": "91ab3727",
"metadata": {},
"source": [
"(example_cower_2022)=\n",
Expand Down Expand Up @@ -39,7 +39,7 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "cb947864",
"id": "28940071",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -59,7 +59,7 @@
},
{
"cell_type": "markdown",
"id": "87961b6f",
"id": "0ebc5a9a",
"metadata": {},
"source": [
"## Configuration\n",
Expand Down Expand Up @@ -87,18 +87,27 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "45f5ef95",
"id": "7ad25750",
"metadata": {},
"outputs": [],
"source": [
"library_path = Path(\"../library/base_2022/\")\n",
"config_fixed = load_yaml(library_path / \"project/config\", \"base_fixed_bottom_2022.yaml\")\n",
"config_floating = load_yaml(library_path / \"project/config\", \"base_floating_2022.yaml\")"
"config_floating = load_yaml(library_path / \"project/config\", \"base_floating_2022.yaml\")\n",
"\n",
"# This example was designed prior to the FLORIS 3.6 release, so the path to the turbine library in\n",
"# FLORIS must be manually updated, but this example must work for all users, so a dynamic method\n",
"# is used below, ensuring this works for all users.\n",
"config_fixed[\"floris_config\"] = load_yaml(library_path / \"project/config\", config_fixed[\"floris_config\"])\n",
"config_floating[\"floris_config\"] = load_yaml(library_path / \"project/config\", config_floating[\"floris_config\"])\n",
"\n",
"config_fixed[\"floris_config\"][\"farm\"][\"turbine_library_path\"] = library_path / \"turbines\"\n",
"config_floating[\"floris_config\"][\"farm\"][\"turbine_library_path\"] = library_path / \"turbines\""
]
},
{
"cell_type": "markdown",
"id": "9a01c782",
"id": "ad755a8f",
"metadata": {},
"source": [
"Now, we'll create a Project for each of the fixed bottom and floating offshore scenarios, showing\n",
Expand All @@ -110,16 +119,16 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "0909b285",
"id": "270b9531",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ORBIT library intialized at '/Users/rhammond/GitHub_Public/WAVES/library/base_2022'\n",
"Fixed bottom loading time: 1.32 seconds\n",
"Floating loading time: 1.36 seconds\n"
"Fixed bottom loading time: 1.28 seconds\n",
"Floating loading time: 1.30 seconds\n"
]
},
{
Expand All @@ -135,8 +144,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Fixed bottom loading time: 1.32 seconds\n",
"Floating loading time: 1.36 seconds\n"
"Fixed bottom loading time: 1.28 seconds\n",
"Floating loading time: 1.30 seconds\n"
]
},
{
Expand Down Expand Up @@ -170,7 +179,7 @@
},
{
"cell_type": "markdown",
"id": "2dbf606c",
"id": "33cd9ea6",
"metadata": {},
"source": [
"### Visualize the wind farm\n",
Expand All @@ -181,7 +190,7 @@
{
"cell_type": "code",
"execution_count": 4,
"id": "7c4d9829",
"id": "4787d493",
"metadata": {},
"outputs": [
{
Expand All @@ -201,7 +210,7 @@
},
{
"cell_type": "markdown",
"id": "ae7c6248",
"id": "8a6352b3",
"metadata": {},
"source": [
"## Run the Projects\n",
Expand All @@ -221,7 +230,7 @@
{
"cell_type": "code",
"execution_count": 5,
"id": "4fd0b930",
"id": "ee0eefc4",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -264,8 +273,8 @@
"Correcting negative Overhang:-2.5\n",
"Correcting negative Overhang:-2.5\n",
"-----------------------------\n",
"Fixed run time: 53.81 seconds\n",
"Floating run time: 150.19 seconds\n"
"Fixed run time: 54.34 seconds\n",
"Floating run time: 140.73 seconds\n"
]
},
{
Expand Down Expand Up @@ -300,8 +309,8 @@
"output_type": "stream",
"text": [
"-----------------------------\n",
"Fixed run time: 53.81 seconds\n",
"Floating run time: 150.19 seconds\n"
"Fixed run time: 54.34 seconds\n",
"Floating run time: 140.73 seconds\n"
]
}
],
Expand Down Expand Up @@ -331,7 +340,7 @@
},
{
"cell_type": "markdown",
"id": "a0441d8b",
"id": "c762a8b9",
"metadata": {},
"source": [
"(example_cower_2022:results)=\n",
Expand Down Expand Up @@ -364,7 +373,7 @@
{
"cell_type": "code",
"execution_count": 6,
"id": "51d0cbb6",
"id": "cf27089d",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -459,7 +468,7 @@
},
{
"cell_type": "markdown",
"id": "d0fed0d9",
"id": "6afdc80c",
"metadata": {},
"source": [
"Before we generate the report, let's see a CapEx breakdown of each scenario. To do this, we'll\n",
Expand All @@ -474,7 +483,7 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "5e5b10da",
"id": "c528bfd6",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -719,7 +728,7 @@
},
{
"cell_type": "markdown",
"id": "24ce0305",
"id": "e6e4296f",
"metadata": {},
"source": [
"Now, let's generate the report, and then add in some additional reporting variables."
Expand All @@ -728,7 +737,7 @@
{
"cell_type": "code",
"execution_count": 8,
"id": "1052224a",
"id": "f3f77560",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -814,23 +823,23 @@
" </tr>\n",
" <tr>\n",
" <th>OpEx ($)</th>\n",
" <td>1,138,974,592.86</td>\n",
" <td>983,366,273.48</td>\n",
" <td>1,085,763,711.26</td>\n",
" <td>975,553,491.89</td>\n",
" </tr>\n",
" <tr>\n",
" <th>OpEx per kW ($/kW)</th>\n",
" <td>1,898.29</td>\n",
" <td>1,638.94</td>\n",
" <td>1,809.61</td>\n",
" <td>1,625.92</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Annual OpEx per kW ($/kW)</th>\n",
" <td>90.39</td>\n",
" <td>78.04</td>\n",
" <td>86.17</td>\n",
" <td>77.42</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Energy Availability (%)</th>\n",
" <td>0.95</td>\n",
" <td>0.90</td>\n",
" <td>0.91</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Gross Capacity Factor (%)</th>\n",
Expand All @@ -849,18 +858,18 @@
" </tr>\n",
" <tr>\n",
" <th>AEP (MWh)</th>\n",
" <td>2,176,737.87</td>\n",
" <td>2,366,197.80</td>\n",
" <td>2,181,789.77</td>\n",
" <td>2,370,603.04</td>\n",
" </tr>\n",
" <tr>\n",
" <th>AEP per kW (MWh/kW)</th>\n",
" <td>3.63</td>\n",
" <td>3.94</td>\n",
" <td>3.64</td>\n",
" <td>3.95</td>\n",
" </tr>\n",
" <tr>\n",
" <th>LCOE ($/MWh)</th>\n",
" <td>100.06</td>\n",
" <td>107.33</td>\n",
" <td>98.67</td>\n",
" <td>106.98</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
Expand All @@ -879,16 +888,16 @@
"Offtake Price ($/MWh) 83.30 \n",
"CapEx ($) 2,524,329,479.24 \n",
"CapEx per kW ($/kW) 4,207.22 \n",
"OpEx ($) 1,138,974,592.86 \n",
"OpEx per kW ($/kW) 1,898.29 \n",
"Annual OpEx per kW ($/kW) 90.39 \n",
"OpEx ($) 1,085,763,711.26 \n",
"OpEx per kW ($/kW) 1,809.61 \n",
"Annual OpEx per kW ($/kW) 86.17 \n",
"Energy Availability (%) 0.95 \n",
"Gross Capacity Factor (%) 0.53 \n",
"Net Capacity Factor With Wake Losses (%) 0.47 \n",
"Net Capacity Factor With All Losses (%) 0.41 \n",
"AEP (MWh) 2,176,737.87 \n",
"AEP per kW (MWh/kW) 3.63 \n",
"LCOE ($/MWh) 100.06 \n",
"AEP (MWh) 2,181,789.77 \n",
"AEP per kW (MWh/kW) 3.64 \n",
"LCOE ($/MWh) 98.67 \n",
"\n",
" COE 2022 - Floating \n",
"Metrics \n",
Expand All @@ -902,16 +911,16 @@
"Offtake Price ($/MWh) 83.30 \n",
"CapEx ($) 3,196,659,962.31 \n",
"CapEx per kW ($/kW) 5,327.77 \n",
"OpEx ($) 983,366,273.48 \n",
"OpEx per kW ($/kW) 1,638.94 \n",
"Annual OpEx per kW ($/kW) 78.04 \n",
"Energy Availability (%) 0.90 \n",
"OpEx ($) 975,553,491.89 \n",
"OpEx per kW ($/kW) 1,625.92 \n",
"Annual OpEx per kW ($/kW) 77.42 \n",
"Energy Availability (%) 0.91 \n",
"Gross Capacity Factor (%) 0.59 \n",
"Net Capacity Factor With Wake Losses (%) 0.51 \n",
"Net Capacity Factor With All Losses (%) 0.45 \n",
"AEP (MWh) 2,366,197.80 \n",
"AEP per kW (MWh/kW) 3.94 \n",
"LCOE ($/MWh) 107.33 "
"AEP (MWh) 2,370,603.04 \n",
"AEP per kW (MWh/kW) 3.95 \n",
"LCOE ($/MWh) 106.98 "
]
},
"execution_count": 8,
Expand Down Expand Up @@ -978,7 +987,7 @@
}
},
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -996,21 +1005,21 @@
},
"source_map": [
10,
39,
52,
75,
79,
86,
104,
110,
112,
127,
149,
177,
265,
275,
298,
302
42,
55,
78,
91,
98,
116,
122,
124,
139,
161,
189,
277,
287,
310,
314
]
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ farm:
- 0
- 0

turbine_library_path: /Users/rhammond/GitHub_Public/WAVES/library/base_2022/turbines
turbine_library_path: ../../turbines
turbine_type:
- 12MW_216m
- 12MW_216m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ farm:
- 0
- 0

turbine_library_path: /Users/rhammond/GitHub_Public/WAVES/library/base_2022/turbines
turbine_library_path: ../../turbines
turbine_type:
- 12MW_216m
- 12MW_216m
Expand Down

0 comments on commit 333b065

Please sign in to comment.