Skip to content
Merged
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
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[run]
omit =
ard/glue/prototype.py
ard/utils/test_utils.py
ard/farm_aero/placeholder.py

1 change: 0 additions & 1 deletion .coveragerc_no_interarray
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[run]
omit =
ard/glue/prototype.py
ard/test_utils.py
ard/collection/optiwindnet_wrap.py

9 changes: 8 additions & 1 deletion ard/farm_aero/floris.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ def create_FLORIS_turbine_from_windIO(
rotor_diameter=windIOturbine["rotor_diameter"],
TSR=windIOturbine.get("TSR"),
generator_efficiency=windIOturbine.get("generator_efficiency", 1.0),
ref_air_density=modeling_options.get("floris", {}).get(
"ref_air_density", 1.225
),
)
)

Expand Down Expand Up @@ -200,8 +203,12 @@ def setup(self):
wind_shear=self.windIO["site"]["energy_resource"]["wind_resource"].get(
"shear"
),
reference_wind_height=(
self.wind_query.reference_height
if hasattr(self.wind_query, "reference_height")
else None
),
)
self.fmodel.assign_hub_height_to_ref_height()

self.case_title = self.options["case_title"]
self.dir_floris = Path("case_files", self.case_title, "floris_inputs")
Expand Down
15 changes: 5 additions & 10 deletions examples/02_offshore_fixed/optimization_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@
" \"OpEx_val\": float(prob.get_val(\"opex.opex\", units=\"MUSD/yr\")[0]),\n",
" \"LCOE_val\": float(prob.get_val(\"financese.lcoe\", units=\"USD/MW/h\")[0]),\n",
" \"area_tight\": float(prob.get_val(\"landuse.area_tight\", units=\"km**2\")[0]),\n",
" \"coll_length\": float(\n",
" prob.get_val(\"collection.total_length_cables\", units=\"km\")[0]\n",
" ),\n",
" \"coll_length\": float(prob.get_val(\"collection.total_length_cables\", units=\"km\")[0]),\n",
" \"turbine_spacing\": float(\n",
" np.min(prob.get_val(\"spacing_constraint.turbine_spacing\", units=\"km\"))\n",
" ),\n",
Expand Down Expand Up @@ -453,11 +451,10 @@
" print(\"\\n\\nRESULTS (opt):\\n\")\n",
" pp.pprint(test_data)\n",
" print(\"\\n\\n\")\n",
" # plot convergence\n",
" # plot convergence\n",
" ## read cases\n",
" cr = om.CaseReader(\n",
" prob.get_outputs_dir()\n",
" / input_dict[\"analysis_options\"][\"recorder\"][\"filepath\"]\n",
" prob.get_outputs_dir() / input_dict[\"analysis_options\"][\"recorder\"][\"filepath\"]\n",
" )\n",
"\n",
" # Extract the driver cases\n",
Expand All @@ -471,9 +468,7 @@
" for i, case in enumerate(cases):\n",
" iterations.append(i)\n",
" objective_values.append(\n",
" case.get_objectives()[\n",
" input_dict[\"analysis_options\"][\"objective\"][\"name\"]\n",
" ]\n",
" case.get_objectives()[input_dict[\"analysis_options\"][\"objective\"][\"name\"]]\n",
" )\n",
"\n",
" # Plot the convergence\n",
Expand All @@ -484,7 +479,7 @@
" plt.title(\"Convergence Plot\")\n",
" plt.legend()\n",
" plt.grid()\n",
" plt.show()\n"
" plt.show()"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,7 @@
" \"OpEx_val\": float(prob.get_val(\"opex.opex\", units=\"MUSD/yr\")[0]),\n",
" \"LCOE_val\": float(prob.get_val(\"financese.lcoe\", units=\"USD/MW/h\")[0]),\n",
" \"area_tight\": float(prob.get_val(\"landuse.area_tight\", units=\"km**2\")[0]),\n",
" \"coll_length\": float(\n",
" prob.get_val(\"collection.total_length_cables\", units=\"km\")[0]\n",
" ),\n",
" \"coll_length\": float(prob.get_val(\"collection.total_length_cables\", units=\"km\")[0]),\n",
" \"mooring_spacing\": float(\n",
" np.min(prob.get_val(\"mooring_constraint.mooring_spacing\", units=\"km\"))\n",
" ),\n",
Expand Down Expand Up @@ -765,8 +763,7 @@
" # plot convergence\n",
" ## read cases\n",
" cr = om.CaseReader(\n",
" prob.get_outputs_dir()\n",
" / input_dict[\"analysis_options\"][\"recorder\"][\"filepath\"]\n",
" prob.get_outputs_dir() / input_dict[\"analysis_options\"][\"recorder\"][\"filepath\"]\n",
" )\n",
"\n",
" # Extract the driver cases\n",
Expand All @@ -780,9 +777,7 @@
" for i, case in enumerate(cases):\n",
" iterations.append(i)\n",
" objective_values.append(\n",
" case.get_objectives()[\n",
" input_dict[\"analysis_options\"][\"objective\"][\"name\"]\n",
" ]\n",
" case.get_objectives()[input_dict[\"analysis_options\"][\"objective\"][\"name\"]]\n",
" )\n",
"\n",
" # Plot the convergence\n",
Expand Down Expand Up @@ -824,9 +819,7 @@
}
],
"source": [
"plot_layout(\n",
" prob, input_dict=input_dict, show_image=True, include_cable_routing=True\n",
")"
"plot_layout(prob, input_dict=input_dict, show_image=True, include_cable_routing=True)"
]
}
],
Expand Down
7 changes: 0 additions & 7 deletions examples/data/wrg_example.wrg

This file was deleted.

Binary file modified test/unit/ard/farm_aero/test_floris_batch_pyrite.npz
Binary file not shown.
Loading