Skip to content

Conversation

@jaredthomas68
Copy link
Contributor

Working to improve the wisdem wrapping

@jaredthomas68 jaredthomas68 changed the base branch from main to develop June 12, 2025 23:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the wisdem wrapping by replacing deprecated components with updated ones and updating references across unit tests, system tests, and examples.

  • Updated subsystem calls from LandBOSSE to LandBOSSEArdComp (and similarly in glue/prototype.py)
  • Adjusted import paths in tests and examples to point to ard.cost.wisdem_wrap
  • Changed component naming (e.g. Orbit to ORBIT) and removed deprecated code in ard/cost/approximate_turbine_spacing.py

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/unit/ard/cost/test_wisdem_wrap.py Updated subsystem instantiation to use LandBOSSEArdComp
test/system/ard/cost/test_spacing_approximations_connections.py Updated import reference for spacing approximations
examples/onshore/optimization_demo.py Updated import, turbine spec, and latent setup adjustments
examples/offshore/optimization_demo.py Refactored control variable from inline constant to named flag
examples/offshore-fixed/optimization_demo.py Changed Orbit component instantiation to ORBIT for consistency
ard/glue/prototype.py Replaced LandBOSSE with LandBOSSEArdComp
ard/cost/approximate_turbine_spacing.py Removed deprecated LandBOSSEWithSpacingApproximations group
Comments suppressed due to low confidence (2)

examples/offshore-fixed/optimization_demo.py:173

  • [nitpick] The component is changed from 'Orbit' to 'ORBIT'. Verify that this naming convention is consistent with the rest of the codebase or consider aligning with a consistent naming style.
ard.cost.wisdem_wrap.ORBIT(floating=True),

ard/cost/approximate_turbine_spacing.py:1

  • The entire LandBOSSEWithSpacingApproximations component has been removed. Confirm that all usages have been migrated to the updated implementation in ard.cost.wisdem_wrap and that this removal is fully documented.
import openmdao.api as om

Comment on lines 22 to 125
# # Add new entries at the top
# import pdb; pdb.set_trace()
# if "N_turbines" in modeling_options["farm"]:
# self.set_input_defaults(
# "num_turbines",
# int(modeling_options["farm"]["N_turbines"]),
# )

# self.set_input_defaults(
# "turbine_rating_MW",
# modeling_options["turbine"]["nameplate"]["power_rated"] * 1.0e3,
# units="kW",
# )
# self.set_input_defaults(
# "hub_height_meters",
# modeling_options["turbine"]["geometry"]["height_hub"],
# units="m",
# )
# # self.set_input_defaults(
# # "wind_shear_exponent",
# # modeling_options["turbine"]["costs"]["wind_shear_exponent"],
# # )
# self.set_input_defaults(
# "rotor_diameter_m",
# modeling_options["turbine"]["geometry"]["diameter_rotor"],
# units="m",
# )
# # self.set_input_defaults(
# # "number_of_blades",
# # modeling_options["turbine"]["geometry"]["num_blades"],
# # )
# # self.set_input_defaults(
# # "rated_thrust_N",
# # modeling_options["turbine"]["costs"]["rated_thrust_N"],
# # units="N",
# # )
# # self.set_input_defaults(
# # "gust_velocity_m_per_s",
# # modeling_options["turbine"]["costs"]["gust_velocity_m_per_s"],
# # units="m/s",
# # )
# # self.set_input_defaults(
# # "blade_surface_area",
# # modeling_options["turbine"]["costs"]["blade_surface_area"],
# # units="m**2",
# # )
# self.set_input_defaults(
# "tower_mass",
# modeling_options["turbine"]["costs"]["tower_mass"],
# units="kg",
# )
# self.set_input_defaults(
# "nacelle_mass",
# modeling_options["turbine"]["costs"]["nacelle_mass"],
# units="kg",
# )
# # self.set_input_defaults(
# # "hub_mass",
# # modeling_options["turbine"]["costs"]["hub_mass"],
# # units="kg",
# # )
# self.set_input_defaults(
# "blade_mass",
# modeling_options["turbine"]["costs"]["blade_mass"],
# units="kg",
# )
# # self.set_input_defaults(
# # "foundation_height",
# # modeling_options["turbine"]["costs"]["foundation_height"],
# # units="m",
# # )
# self.set_input_defaults(
# "commissioning_cost_kW",
# modeling_options["turbine"]["costs"]["commissioning_cost_kW"],
# units="USD/kW",
# )
# self.set_input_defaults(
# "decommissioning_cost_kW",
# modeling_options["turbine"]["costs"]["decommissioning_cost_kW"],
# units="USD/kW",
# )
# self.set_input_defaults(
# "trench_len_to_substation_km",
# modeling_options["turbine"]["costs"]["trench_len_to_substation_km"],
# units="km",
# )
# self.set_input_defaults(
# "interconnect_voltage_kV",
# modeling_options["turbine"]["costs"]["interconnect_voltage_kV"],
# units="kV",
# )

# Existing entries
# self.set_input_defaults("tower_section_length_m", 30.0, units="m")
# self.set_input_defaults("blade_drag_coefficient", use_default_component_data) # Unitless
# self.set_input_defaults("blade_lever_arm", use_default_component_data, units="m")
# self.set_input_defaults("blade_install_cycle_time", use_default_component_data, units="h")
# self.set_input_defaults("blade_offload_hook_height", use_default_component_data, units="m")
# self.set_input_defaults("blade_offload_cycle_time", use_default_component_data, units="h")
# self.set_input_defaults("blade_drag_multiplier", use_default_component_data) # Unitless
# self.set_input_defaults("blade_surface_area", use_default_component_data, units="m**2")

# self.set_input_defaults("turbine_spacing_rotor_diameters", 4)
# self.set_input_defaults("row_spacing_rotor_diameters", 10)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just blow these comments away? Or are the serving a utility by sticking around?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes and done

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's put a few more comments in because this is going to be a little bit harder for an end user to pick up with the changes. They're really good changes and will reduce the median user's need to fiddle with stuff, but we should keep in mind people who will be digging for gold in the source.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Collaborator

@cfrontin cfrontin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks great- maybe a few more comments and we should be good to go.

@jaredthomas68 jaredthomas68 requested a review from cfrontin June 17, 2025 17:09
@jaredthomas68 jaredthomas68 merged commit f7db0a8 into NLRWindSystems:develop Jun 23, 2025
7 checks passed
@jaredthomas68 jaredthomas68 deleted the feature/wisdem branch June 23, 2025 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants