-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding solar controller and replacing AMR-Wind standin with FLORIS standin in example 07 #104
Changes from 79 commits
31705ee
471cb76
dead7ce
97f0a60
79f16e6
58ec136
0957591
19299db
14c4e38
46e161e
cc4ee8c
466bbd3
95618db
1c94d37
36e105a
44a7c6e
bc67bcf
4e43583
41e5a47
1b07044
c4289bb
f8f76c0
a2d73ce
68ab725
c575011
0be7f2a
74acc0a
1e38644
724112c
ad52112
3f8ff21
22a0051
83c84bf
829fd49
c9b6b38
6c546a2
6095ba3
1ad79a7
5fde32a
5e905d5
d2ab941
a914853
5fba773
f819252
b7adac6
9d37846
9731d41
6c07727
a2666da
2a62a40
b11abf8
7542eba
f05b8bc
e097b4b
1d86e56
13f1c53
6acadc3
34c972a
5ab9a6a
a6ed26b
ae47268
20c5f25
b45ae28
1d4660c
e4e2dc3
8cbecb9
42ebbd7
d6e4616
2dc720f
e50904e
d8aa1f2
908ca7a
43895cc
b018ada
757490d
67cbc22
10f36fa
67e6f94
6f9bed1
1972e79
b739314
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Example 07: FLORIS Standin and Solar PySAM | ||
|
||
## Description | ||
|
||
This example demonstrates how to use the FLORIS Standin and a solar model using pysam. | ||
|
||
## 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 & | ||
``` | ||
|
||
To run `hercules` without the PV plant controller, ensure the folling line is uncommented `batch_script.sh`: | ||
|
||
``` | ||
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. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import sys | ||
|
||
from hercules.floris_standin import launch_floris | ||
|
||
# Check that one command line argument was given | ||
if len(sys.argv) != 2: | ||
raise Exception("Usage: python floris_runscript.py <amr_input_file>") | ||
|
||
# # Get the first command line argument | ||
# This is the name of the file to read | ||
amr_input_file = sys.argv[1] | ||
print(f"Running FLORIS standin with input file: {amr_input_file}") | ||
|
||
|
||
launch_floris(amr_input_file) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Input YAML for emy_python | ||
|
||
# Name | ||
name: example_000 | ||
|
||
### | ||
# Describe this emulator setup | ||
description: Floris and Solar PV | ||
|
||
dt: 0.5 | ||
|
||
hercules_comms: | ||
|
||
amr_wind: | ||
|
||
wind_farm_0: | ||
type: amr_wind_local #options are amr_wind or amr_wind_local | ||
amr_wind_input_file: amr_input.inp | ||
|
||
helics: | ||
|
||
config: | ||
name: hercules # What is the purpose of this name | ||
use_dash_frontend: False | ||
KAFKA: False | ||
KAFKA_topics: EMUV1py | ||
helics: | ||
# deltat: 1 # This will be assigned in software | ||
subscription_topics: [status] | ||
publication_topics: [control] | ||
endpoints: [] | ||
helicsport: 32000 | ||
publication_interval: 1 | ||
endpoint_interval: 1 | ||
starttime: 0 | ||
stoptime: 100 # must be at least 2*dt smaller than last timestep in weather file | ||
Agent: ControlCenter | ||
|
||
py_sims: | ||
|
||
solar_farm_0: # The name of py_sim object 1 | ||
|
||
py_sim_type: SolarPySAM | ||
weather_file_name: NonAnnualSimulation-sample_data-interpolated-daytime.csv | ||
system_info_file_name: 100MW_1axis_pvsamv1.json | ||
lat: 39.7442 | ||
lon: -105.1778 | ||
elev: 1829 | ||
|
||
# capacity: 100 # MW | ||
|
||
initial_conditions: | ||
|
||
power: 25 # MW | ||
dni: 1000 | ||
|
||
controller: | ||
|
||
external_data_file: solar_power_reference.csv | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file is missing from the repo, I think There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added! |
||
|
||
|
||
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file is maybe not used? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. README updated to clarify these options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No big changes, just the path leading to the output file and a change in an output variable name