Skip to content

Commit

Permalink
deploy: df73086
Browse files Browse the repository at this point in the history
  • Loading branch information
paulf81 committed Dec 5, 2024
1 parent 9bbe0f2 commit 1b34b4e
Show file tree
Hide file tree
Showing 107 changed files with 2,851 additions and 3,110 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: c0ee7a06f8b19523f2ca70e718c475d2
config: e4782f53890f02d546784a94d585b649
tags: 645f666f9bcd5a90fca523b33c5a78b7
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
# Example 05: FLORIS Wind Standin and Electrolyzer
# Example 05: FLORIS Standin and Electrolyzer

## Description

This example demonstrates how to use the FLORIS as the wind standin model combined with and electrolyzer plant in a simple case. This example also uses a WHOC controller to allow the user to give set points to the wind farm to control the wind farm power output, set in the 'wind_power_reference_data.csv' file. The wind speed and wind directions inputs are given in 'floris_standin_data.csv' and can be changed to vary the conditions of the wind simulation. The 'test_read_output.ipynb' file contains a jupyter notebook that allows the user to plot the wind turbine and farm power outputs and the electrolyzer plant hydrogen output.
This example demonstrates how to use the FLORIS as the wind standin model combined with and electrolyzer plant in a simple case. This example also uses a WHOC controller to allow the user to give set points to the wind farm to control the wind farm power output, set in the 'wind_power_reference_data.csv' file. The wind speed and wind directions inputs are given in 'floris_standin_data.csv' and can be changed to vary the conditions of the wind simulation. The 'plot_outputs.py' file contains a python script that allows the user to plot the wind turbine and farm power outputs and the electrolyzer plant hydrogen output.

## Running

To run the example, execute the following command in the terminal:
To run the example, execute the following command in the terminal from within the Example 05 folder:

```bash
bash bash_script.sh
bash run_script.sh
```

## Notes
## Checking outputs

Make sure hercules conda or venv is activated before running the example.
To check the outputs, execute the following command in the terminal:

```bash
python plot_outputs.py
```
10 changes: 7 additions & 3 deletions _sources/examples/06_amr_wind_standin_and_battery.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ called at the start of the bash process.
To run the example, execute the following command in the terminal:

```bash
bash sbatch_script.sh
bash run_script.sh
```

## Notes
## Checking outputs

Make sure hercules conda or venv is activated before running the example.
To check the outputs, execute the following command in the terminal:

```bash
python plot_outputs.py
```
25 changes: 8 additions & 17 deletions _sources/examples/07_floris_standin_and_solar_pysam.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,20 @@

## Description

This example demonstrates how to use the FLORIS Standin and a solar model using pysam.
This example demonstrates how to use the FLORIS Standin and a solar model using pysam. The simulation should run for 20 simulated seconds.


## Running

To run the example, execute the following command in the terminal:

```bash
bash batch_script.sh
```


To run `hercules` using the PV plant controller, which provides power setpoints and adjusts the PV power output accordingly, ensure the following line is uncommented in `batch_script.sh`:

```
python3 hercules_runscript.py hercules_controller_input_000.yaml >> outputs/loghercules.log 2>&1 &
bash run_script.sh
```
## Outputs

To run `hercules` without the PV plant controller, ensure the folling line is uncommented `batch_script.sh`:
To plot the outputs run the following command in the terminal:

```
python3 hercules_runscript.py hercules_input_000.yaml >> outputs/loghercules.log 2>&1 &
```

## Notes

Make sure hercules conda or venv is activated before running the example.
```bash
python plot_outputs.py
```
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Example 08: FLORIS Only
# Example 08: FLORIS Standin Only

## Description

Expand All @@ -9,9 +9,12 @@ This example demonstrates how to use the FLORIS as the AMR Wind Standin model. T
To run the example, execute the following command in the terminal:

```bash
bash sbash_script.sh
bash run_script.sh
```
## Outputs

## Notes
To plot the outputs run the following command in the terminal:

Make sure hercules conda or venv is activated before running the example.
```bash
python plot_outputs.py
```
27 changes: 0 additions & 27 deletions _sources/examples/09_amr_wind_openfast.md

This file was deleted.

23 changes: 23 additions & 0 deletions _sources/examples/09_heterogeneous_wind.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Example 09: Heterogeneous Wind

## Description

This example runs a wind farm level power tracking controller, using FLORIS as a simulation
testbed, with heterogeneous inflow. The control algorithm is based on the A2e2g project.
This will the closed loop power tracking controller.


## Running

To run the example, execute the following command in the terminal:

```bash
bash run_script.sh
```
## Outputs

To plot the outputs run the following command in the terminal:

```bash
python plot_outputs.py
```
104 changes: 89 additions & 15 deletions _sphinx_design_static/design-tabs.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,101 @@
var sd_labels_by_text = {};
// @ts-check

// Extra JS capability for selected tabs to be synced
// The selection is stored in local storage so that it persists across page loads.

/**
* @type {Record<string, HTMLElement[]>}
*/
let sd_id_to_elements = {};
const storageKeyPrefix = "sphinx-design-tab-id-";

/**
* Create a key for a tab element.
* @param {HTMLElement} el - The tab element.
* @returns {[string, string, string] | null} - The key.
*
*/
function create_key(el) {
let syncId = el.getAttribute("data-sync-id");
let syncGroup = el.getAttribute("data-sync-group");
if (!syncId || !syncGroup) return null;
return [syncGroup, syncId, syncGroup + "--" + syncId];
}

/**
* Initialize the tab selection.
*
*/
function ready() {
const li = document.getElementsByClassName("sd-tab-label");
for (const label of li) {
syncId = label.getAttribute("data-sync-id");
if (syncId) {
label.onclick = onLabelClick;
if (!sd_labels_by_text[syncId]) {
sd_labels_by_text[syncId] = [];
// Find all tabs with sync data

/** @type {string[]} */
let groups = [];

document.querySelectorAll(".sd-tab-label").forEach((label) => {
if (label instanceof HTMLElement) {
let data = create_key(label);
if (data) {
let [group, id, key] = data;

// add click event listener
// @ts-ignore
label.onclick = onSDLabelClick;

// store map of key to elements
if (!sd_id_to_elements[key]) {
sd_id_to_elements[key] = [];
}
sd_id_to_elements[key].push(label);

if (groups.indexOf(group) === -1) {
groups.push(group);
// Check if a specific tab has been selected via URL parameter
const tabParam = new URLSearchParams(window.location.search).get(
group
);
if (tabParam) {
console.log(
"sphinx-design: Selecting tab id for group '" +
group +
"' from URL parameter: " +
tabParam
);
window.sessionStorage.setItem(storageKeyPrefix + group, tabParam);
}
}

// Check is a specific tab has been selected previously
let previousId = window.sessionStorage.getItem(
storageKeyPrefix + group
);
if (previousId === id) {
// console.log(
// "sphinx-design: Selecting tab from session storage: " + id
// );
// @ts-ignore
label.previousElementSibling.checked = true;
}
}
sd_labels_by_text[syncId].push(label);
}
}
});
}

function onLabelClick() {
// Activate other inputs with the same sync id.
syncId = this.getAttribute("data-sync-id");
for (label of sd_labels_by_text[syncId]) {
/**
* Activate other tabs with the same sync id.
*
* @this {HTMLElement} - The element that was clicked.
*/
function onSDLabelClick() {
let data = create_key(this);
if (!data) return;
let [group, id, key] = data;
for (const label of sd_id_to_elements[key]) {
if (label === this) continue;
// @ts-ignore
label.previousElementSibling.checked = true;
}
window.localStorage.setItem("sphinx-design-last-tab", syncId);
window.sessionStorage.setItem(storageKeyPrefix + group, id);
}

document.addEventListener("DOMContentLoaded", ready, false);

Large diffs are not rendered by default.

Loading

0 comments on commit 1b34b4e

Please sign in to comment.