Skip to content
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

Update Hercules models to use uniform units #127

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: example_000

###
# Describe this emulator setup
description: AMR Wind Only
description: Wind stand-in and simple solar simulation

dt: 0.5

Expand Down Expand Up @@ -33,20 +33,20 @@ hercules_comms:
publication_interval: 1
endpoint_interval: 1
starttime: 0
stoptime: 36000
stoptime: 600
Agent: ControlCenter

py_sims:

solar_farm_0: # The name of py_sim object 1

py_sim_type: SimpleSolar
capacity: 50 # MW
capacity: 50000 # kW
efficiency: 0.5 #Fraction

initial_conditions:

power: 25 # MW
power: 25000 # kW
irradiance: 1000

controller:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -308,12 +308,26 @@
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
"source": [
"# Create solar reference signal\n",
"\n",
"# 1. Read solar reference signal (if available)\n",
"solar_ref_signal = pd.read_csv(\"solar_power_reference.csv\")\n",
"\n",
"# new_column = [x * 1000 for x in solar_ref_signal[\"solar_power_reference_mw\"]]\n",
"new_column = [x for x in solar_ref_signal[\"solar_power_reference_kw\"]]\n",
"new_solar_ref_signal = {}\n",
"new_solar_ref_signal[\"time\"] = solar_ref_signal[\"time\"]\n",
"new_solar_ref_signal[\"solar_power_reference_kw\"] = new_column\n",
"solar_ref_signal_df = pd.DataFrame(new_solar_ref_signal)\n",
"\n",
"solar_ref_signal_df.to_csv(\"solar_power_reference.csv\", index=False)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.10.4 64-bit",
"display_name": "hercules",
"language": "python",
"name": "python3"
},
Expand All @@ -328,11 +342,6 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
},
"vscode": {
"interpreter": {
"hash": "26de051ba29f2982a8de78e945f0abaf191376122a1563185a90213a26c5da77"
}
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ echo "Starting hercules"
# python3 hercules_runscript.py hercules_input_000.yaml >> outputs/loghercules.log 2>&1 &
# python3 hercules_runscript.py hercules_controller_input_000.yaml >> outputs/loghercules.log 2>&1 &
# python3 hercules_runscript.py hercules_input_OK_ARM.yaml >> outputs/loghercules.log 2>&1 &
python3 hercules_runscript.py hercules_input_Flatirons.yaml >> outputs/loghercules.log 2>&1 &
python hercules_runscript.py hercules_controller_input_000.yaml >> outputs/loghercules.log 2>&1 &

# Start the floris standin
echo "Starting floris"
python3 floris_runscript.py amr_input.inp >> outputs/logfloris.log 2>&1
python floris_runscript.py amr_input.inp >> outputs/logfloris.log 2>&1

# If everything is successful
echo "Finished running hercules"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ py_sims:

initial_conditions:

power: 25 # MW
power: 25000 # kW
dni: 1000

controller:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ py_sims:

initial_conditions:

power: 25 # MW
power: 25000 # kW
dni: 1000

controller:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ py_sims:

initial_conditions:

power: 25 # MW
power: 25000 # kW
dni: 1000

controller:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ py_sims:

initial_conditions:

power: 25 # MW
power: 25000 # kW
dni: 1000

controller:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -1000,7 +1000,7 @@
"# ax.plot(exportdf[col], \".-\")\n",
"# ax.set_ylabel(col[9:])\n",
"\n",
"# axs[3].plot(resultsdf[\"real_time\"], resultsdf[\"py_sims.solar_farm_0.outputs.power_mw\"], \".-\")\n",
"# axs[3].plot(resultsdf[\"real_time\"], resultsdf[\"py_sims.solar_farm_0.outputs.power_kw\"], \".-\")\n",
"# axs[3].set_ylabel(\"PV power output [MW]\")\n",
"\n",
"# axs[-1].set_xlabel(\"Date Time [UTC]\")\n",
Expand Down
Loading
Loading