Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
a3d992f
add comments to trigger merge conflicts to avoid deleting files
jaredthomas68 Jun 2, 2025
9aa07ea
backmerge develop into offshore-development
jaredthomas68 Jun 2, 2025
415b53f
Merge pull request #92 from jaredthomas68/offshore-development
jaredthomas68 Jun 2, 2025
ef8c5a9
Add soil material handler to geomorphology (#95)
cfrontin Jun 10, 2025
cb9cb3a
Reconcile cory's and main offshore-dev (#105)
cfrontin Jul 15, 2025
0beb28e
Mooring Offshore development (#93)
lsirkis Jul 21, 2025
c1d6d22
resolve merge conflicts
jaredthomas68 Jul 22, 2025
cba8218
prep for including detailed offshore example
jaredthomas68 Jul 22, 2025
0b52756
run black
jaredthomas68 Jul 22, 2025
2db9e1e
minor changes to work with new glue code/api, including replacing off…
jaredthomas68 Jul 22, 2025
0f2c1e1
run black
jaredthomas68 Jul 22, 2025
06d7f61
add system test for detailed mooring default system
jaredthomas68 Jul 22, 2025
431dcae
update tests for offshore detailed mooring
jaredthomas68 Jul 22, 2025
32386ca
include input files for offshore unit tests
jaredthomas68 Jul 22, 2025
eb5f4d3
comment out unused code that was causing errors in example tests
jaredthomas68 Jul 23, 2025
1bbe127
Update pyproject.toml to add optional dependency chunk
cfrontin Jul 23, 2025
913487a
have runners installl floating
jaredthomas68 Jul 28, 2025
0ce0112
switch deplot pages to python 3.12 and include doc and floating optio…
jaredthomas68 Jul 28, 2025
8f0d4d5
include doc and floating installation options to test build
jaredthomas68 Jul 28, 2025
b9c4dc5
use path instead of string, clarify commented param, and switch from …
jaredthomas68 Jul 30, 2025
48e48b7
Merge pull request #116 from jaredthomas68/offshore-merge
jaredthomas68 Jul 30, 2025
94644ff
Merge remote-tracking branch 'upstream/develop' into offshore-develop…
cfrontin Jul 30, 2025
b0a5a49
Merge branch 'develop' into offshore-development
cfrontin Jul 31, 2025
7f36436
Incorporate ORBIT BOS changes (#119)
cfrontin Jul 31, 2025
3790831
Merge branch 'WISDEM:offshore-development' into offshore-development
cfrontin Jul 31, 2025
f07b01b
update the mooring design to unleash costs
cfrontin Aug 1, 2025
bda16f5
update interface for DOEDriver, touch up mods to mooring design cost …
cfrontin Aug 1, 2025
baf77df
override ORBIT mooring cost by elimination
cfrontin Aug 4, 2025
8ce8494
improved detailed modeling stuff
cfrontin Aug 11, 2025
a00fd14
Merge branch 'develop' into offshore-development
cfrontin Aug 28, 2025
e77d174
some changes
cfrontin Aug 28, 2025
6b32547
update the offshore example to run
cfrontin Aug 28, 2025
46e3d53
tests passing
cfrontin Aug 28, 2025
c9f5a6f
add data
cfrontin Aug 28, 2025
5c281e0
incidental cleanup and some renaming
cfrontin Sep 2, 2025
c08d920
update to examples
cfrontin Sep 2, 2025
1ba5e3d
fix the floris issue
cfrontin Sep 2, 2025
3d73b85
Merge branch 'hotfix/floris_zeroed_prob' into offshore-development
cfrontin Sep 2, 2025
efd1191
actual fix
cfrontin Sep 3, 2025
09d3dc8
black config
cfrontin Sep 3, 2025
fc34bec
Merge branch 'hotfix/floris_zeroed_prob' into offshore-development
cfrontin Sep 3, 2025
0a04f27
Clarify thrust data unpacking process w/ git reference
cfrontin Sep 3, 2025
4d44de5
streamline based on copilot suggestion
cfrontin Sep 3, 2025
9c36b59
fix failing floris test
cfrontin Sep 3, 2025
7ea4722
Merge branch 'hotfix/floris_zeroed_prob' into offshore-development
cfrontin Sep 3, 2025
2f68d1c
Change optiwindnet version constraint to exact match
cfrontin Sep 3, 2025
0f7d8aa
Merge branch 'hotfix/floris_zeroed_prob' into offshore-development
cfrontin Sep 3, 2025
fc37bd2
adjust boundary to be in standard metric meters rather than km
cfrontin Sep 3, 2025
50cd8b4
updates
cfrontin Sep 3, 2025
f0ba753
Merge branch 'develop' into offshore-development
cfrontin Sep 3, 2025
264bac1
update example
cfrontin Sep 3, 2025
726c8bf
fix system tests for boundary adjustment
cfrontin Sep 3, 2025
1ac4536
Refactor boundary distance and validation assertions
cfrontin Sep 4, 2025
518e9ed
fix example 03, and add modified ard system
cfrontin Sep 4, 2025
d114658
Merge branch 'offshore-development' of github.com:cfrontin/Ard into o…
cfrontin Sep 4, 2025
52e6fa2
black reformat
cfrontin Sep 4, 2025
58d3faf
Offshore development pullahead (#126)
cfrontin Sep 4, 2025
be1e4b9
Merge branch 'WISDEM:offshore-development' into offshore-development
cfrontin Sep 4, 2025
586e3ea
update offshore problem
cfrontin Sep 8, 2025
f9c4dfc
Merge branch 'offshore-development' of github.com:cfrontin/Ard into o…
cfrontin Sep 8, 2025
ddd7cbc
WIP: adding flowers
bayc Sep 9, 2025
29f191b
Merge branch 'develop' into feature/flowers
cfrontin Sep 9, 2025
03cd371
working python interface when connected to cfrontin/flowers@4a798599e…
cfrontin Sep 9, 2025
4ba408b
add example
cfrontin Sep 9, 2025
70d1728
black reformat and gradients turned on for flowers
cfrontin Sep 9, 2025
d8f0b92
Merge branch 'feature/flowers' into offshore-development
cfrontin Sep 9, 2025
096dbbf
add flowers to system file in example
cfrontin Sep 9, 2025
3978fdb
use windIO parser
cfrontin Sep 9, 2025
46f9518
Merge branch 'feature/flowers' into offshore-development
cfrontin Sep 9, 2025
fa2e922
flowers enabled optimization problem turned on in offshore example
cfrontin Sep 10, 2025
5c4f8c9
brought an adjustment in
cfrontin Sep 10, 2025
0bfedd0
Merge branch 'feature/flowers' into offshore-development
cfrontin Sep 10, 2025
735f16c
cherrypick some improvements for beta out of offshore-development
cfrontin Sep 11, 2025
9fa8446
black update
cfrontin Sep 11, 2025
fe8c976
Merge branch 'develop' into feature/flowers
cfrontin Sep 11, 2025
24d5f62
Merge branch 'offshore-development' into develop
cfrontin Sep 11, 2025
98cc4d1
black reformat
cfrontin Sep 11, 2025
cfee272
Merge branch 'develop' into offshore-development
cfrontin Sep 11, 2025
a7e9d98
black reformat
cfrontin Sep 11, 2025
f18787a
Merge branch 'develop' into feature/flowers
cfrontin Sep 11, 2025
e272004
Merge branch 'develop' into offshore-development
cfrontin Sep 11, 2025
142495a
Merge branch 'develop' into offshore-development
cfrontin Sep 15, 2025
4223f1a
oops missed one
cfrontin Sep 15, 2025
199210d
Merge branch 'develop' into feature/flowers
cfrontin Sep 15, 2025
58855f6
remove funky merge stuff
cfrontin Sep 17, 2025
7efcbdc
Merge branch 'develop' into offshore-development
cfrontin Sep 17, 2025
f16effe
make sure wrg is deleted
cfrontin Sep 17, 2025
1f6f728
working on offshore problem updates
cfrontin Sep 19, 2025
1fddaa1
switched collection and orbit to pass terse_links w/ zero deriv
cfrontin Sep 23, 2025
5d8c1c7
update flowers stuff
cfrontin Sep 23, 2025
121a6f0
fix to floris reference height
cfrontin Sep 23, 2025
1b125b4
Merge remote-tracking branch 'upstream/develop' into develop
cfrontin Sep 23, 2025
59a1633
Merge branch 'develop' into feature/flowers
cfrontin Sep 23, 2025
3e318af
add test script
cfrontin Sep 23, 2025
8443e60
update after floris ref height and density fix
cfrontin Sep 23, 2025
4867e5f
Merge branch 'develop' into feature/flowers
cfrontin Sep 23, 2025
96a19ff
add resampling
cfrontin Sep 23, 2025
696e22c
remove extraneous wrg file
cfrontin Sep 23, 2025
d6064a1
Merge branch 'feature/flowers' into offshore-development
cfrontin Sep 23, 2025
ca400bb
black reformat
cfrontin Sep 23, 2025
c8c7f93
Merge branch 'develop' into feature/flowers
cfrontin Sep 23, 2025
fde45a7
equilibriate wind rose resampling
cfrontin Sep 23, 2025
bf825c7
update to resampler
cfrontin Sep 23, 2025
e0d0966
Merge branch 'feature/flowers' into offshore-development
cfrontin Sep 23, 2025
5954e68
fix lookup for resample
cfrontin Sep 23, 2025
713bb41
Merge branch 'feature/flowers' into offshore-development
cfrontin Sep 23, 2025
88d9815
add a little more
cfrontin Sep 23, 2025
2be6c26
Merge branch 'feature/flowers' into offshore-development
cfrontin Sep 23, 2025
3a7760b
updates for milestone claim
cfrontin Sep 30, 2025
6ee8702
black reformat
cfrontin Sep 30, 2025
77d9620
black reformat and add notebook
cfrontin Sep 30, 2025
3bd4483
black reformat
cfrontin Sep 30, 2025
766d5a2
restore to pre-hack values
cfrontin Oct 1, 2025
6f48d4a
add some testing files
cfrontin Oct 1, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/deploy-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"

- name: Install dependencies
run: |
pip install -e ".[docs]"
pip install -e ".[dev,docs,floating]"

# Build the book
- name: Build the book
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/python-tests-consolidated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
python -m pip install --upgrade pip
- name: Install Ard
run: |
pip install .[dev]
pip install .[dev,doc,floating]

test-unit:
name: Run unit tests
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
python -m pip install --upgrade pip
- name: Install Ard
run: |
pip install .[dev]
pip install .[dev,doc,floating]
- name: Run unit tests with coverage
run: |
pytest --cov=ard --cov-fail-under=80 test/unit
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
python -m pip install --upgrade pip
- name: Install Ard
run: |
pip install .[dev]
pip install .[dev,doc,floating]
- name: Run system tests with coverage
run: |
pytest --cov=ard --cov-fail-under=50 test/system
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
python -m pip install --upgrade pip
- name: Install Ard
run: |
pip install .[dev]
pip install .[dev,doc,floating]
- name: Run examples
shell: python
run: |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
type: group
systems:
layout2aep:
type: group
promotes: ["*"]
approx_totals:
method: "fd"
step: 1.0E-3
form: "central"
step_calc: "rel_avg"
systems:
layout:
type: component
module: ard.layout.gridfarm
object: GridFarmLayout
promotes: ["*"]
kwargs:
modeling_options:
aepFLORIS:
type: component
module: ard.farm_aero.floris
object: FLORISAEP
promotes: ["x_turbines", "y_turbines", "AEP_farm"]
kwargs:
modeling_options:
case_title: "offshore-floating"
data_path:
landuse:
type: component
module: ard.layout.gridfarm
object: GridFarmLanduse
promotes: ["*"]
kwargs:
modeling_options:
collection:
type: component
module: ard.collection
object: OptiwindnetCollection
promotes: ["x_turbines", "y_turbines"]
kwargs:
modeling_options:
mooring_design:
type: component
module: ard.offshore.mooring_design_detailed
object: DetailedMooringDesign
promotes: ["x_turbines", "y_turbines", "x_anchors", "y_anchors", "phi_platform"]
kwargs:
modeling_options:
wind_query:
data_path:
mooring_constraint:
type: component
module: ard.offshore.mooring_constraint
object: MooringConstraint
promotes: ["x_turbines", "y_turbines", "x_anchors", "y_anchors"]
kwargs:
modeling_options:
spacing_constraint:
type: component
module: ard.layout.spacing
object: TurbineSpacing
promotes: ["x_turbines", "y_turbines"]
kwargs:
modeling_options:
tcc:
type: component
module: ard.cost.wisdem_wrap
object: TurbineCapitalCosts
promotes: [
"turbine_number",
"machine_rating",
"tcc_per_kW",
"offset_tcc_per_kW",
]
orbit:
type: component
module: ard.cost.wisdem_wrap
object: ORBITGroup
promotes: [
["plant_turbine_spacing", "spacing_effective_primary"],
["plant_row_spacing", "spacing_effective_secondary"],
# "installation_capex",
]
kwargs:
modeling_options:
opex:
type: component
module: ard.cost.wisdem_wrap
object: OperatingExpenses
promotes: [
"turbine_number",
"machine_rating",
"opex_per_kW"
]
financese:
type: component
module: ard.cost.wisdem_wrap
object: FinanceSEGroup
promotes: [
"turbine_number",
"machine_rating",
"tcc_per_kW",
"offset_tcc_per_kW",
"opex_per_kW",
]
kwargs:
modeling_options:
connections:
- ["AEP_farm", "financese.plant_aep_in"]
- ["orbit.total_capex_kW", "financese.bos_per_kW"] # For offshore systems
5 changes: 3 additions & 2 deletions ard/api/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def set_up_ard_model(input_dict: Union[str, dict], root_data_path: str = None):
"offshore_monopile",
"offshore_monopile_no_cable_design",
"offshore_floating",
"offshore_floating_detailed_mooring",
"offshore_floating_no_cable_design",
]

Expand Down Expand Up @@ -106,6 +107,8 @@ def set_up_ard_model(input_dict: Union[str, dict], root_data_path: str = None):
analysis_options=input_dict["analysis_options"],
)

prob.setup()

return prob


Expand Down Expand Up @@ -278,6 +281,4 @@ def set_up_system_recursive(
units="m",
)

prob.setup()

return prob
15 changes: 11 additions & 4 deletions ard/collection/optiwindnet_wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ class OptiwindnetCollection(templates.CollectionTemplate):
-------
total_length_cables : float
the total length of cables used in the collection system network
terse_links : np.ndarray
a 1D numpy int array encoding the electrical connections of the collection
system (tree topology), with length `N_turbines`

Discrete Outputs
-------
Expand All @@ -81,9 +84,6 @@ class OptiwindnetCollection(templates.CollectionTemplate):
length `N_turbines`
max_load_cables : int
the maximum cable capacity required by the collection system
terse_links : np.ndarray
a 1D numpy int array encoding the electrical connections of the collection
system (tree topology), with length `N_turbines`
"""

def initialize(self):
Expand All @@ -103,6 +103,13 @@ def setup_partials(self):
["x_turbines", "y_turbines", "x_substations", "y_substations"],
method="exact",
)
self.declare_partials(
["terse_links"],
["x_turbines", "y_turbines", "x_substations", "y_substations"],
method="exact",
val=0.0,
dependent=False,
)

def compute(
self,
Expand Down Expand Up @@ -201,14 +208,14 @@ def compute(
# pack and ship
self.graph = G
discrete_outputs["graph"] = G # TODO: remove for terse links, below!
discrete_outputs["terse_links"] = terse_links
discrete_outputs["length_cables"] = length_cables
discrete_outputs["load_cables"] = load_cables
discrete_outputs["max_load_cables"] = S.graph["max_load"]
# TODO: remove this assert after enough testing
assert (
abs(length_cables.sum() - G.size(weight="length")) < 1e-7
), f"difference: {length_cables.sum() - G.size(weight='length')}"
outputs["terse_links"] = terse_links
outputs["total_length_cables"] = length_cables.sum()

def compute_partials(self, inputs, J, discrete_inputs=None):
Expand Down
2 changes: 1 addition & 1 deletion ard/collection/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ def setup(self):

# set up outputs for the collection system
self.add_output("total_length_cables", 0.0, units="m")
self.add_output("terse_links", np.full((self.N_turbines,), -1))
self.add_discrete_output("length_cables", np.zeros((self.N_turbines,)))
self.add_discrete_output("terse_links", np.full((self.N_turbines,), -1))
self.add_discrete_output("load_cables", np.zeros((self.N_turbines,)))
self.add_discrete_output("max_load_cables", 0.0)
self.add_discrete_output("graph", None)
Expand Down
76 changes: 71 additions & 5 deletions ard/cost/orbit_wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,25 @@
from ORBIT.core.library import default_library
from ORBIT.core.library import initialize_library

import networkx as nx
from optiwindnet.interarraylib import calcload
from ard.cost.wisdem_wrap import ORBIT_setup_latents

from ard.collection.optiwindnet_wrap import _own_L_from_inputs


def S_from_terse_links(terse_links, **kwargs):
T = terse_links.shape[0]
S = nx.Graph(T=T, R=abs(terse_links.min()), **kwargs)
S.add_edges_from(tuple(zip(range(T), terse_links)))
calcload(S)
if "capacity" not in kwargs:
S.graph["capacity"] = S.graph["max_load"]
return S


def generate_orbit_location_from_graph(
graph, # TODO: replace with a terse_links representation
terse_links, # TODO: replace with a terse_links representation
X_turbines,
Y_turbines,
X_substations,
Expand Down Expand Up @@ -57,6 +71,22 @@ def generate_orbit_location_from_graph(
if the recursive setup seems to be stuck in a loop
"""

# create graph from terse links
tlm = np.astype(terse_links, np.int_)
L = _own_L_from_inputs(
{
"x_turbines": X_turbines,
"y_turbines": Y_turbines,
"x_substations": X_substations,
"y_substations": Y_substations,
},
{
"x_border": None,
"y_border": None,
},
)
graph = S_from_terse_links(tlm)

# get all edges, sorted by the first node then the second node
edges_to_process = [edge for edge in graph.edges]
edges_to_process.sort(key=lambda x: (x[0], x[1]))
Expand Down Expand Up @@ -209,8 +239,11 @@ def initialize(self):
super().initialize()

self.options.declare("case_title", default="working")
self.options.declare("modeling_options")
self.options.declare(
"modeling_options", types=dict, desc="Ard modeling options"
)
self.options.declare("approximate_branches", default=False)
self.options.declare("override_mooring_lines", default=False)

def setup(self):
"""Define all input variables from all models."""
Expand Down Expand Up @@ -255,6 +288,14 @@ def setup(self):
modeling_options=self.modeling_options,
case_title=self.options["case_title"],
approximate_branches=self.options["approximate_branches"],
override_mooring_lines=self.modeling_options["costs"].get(
"override_mooring_lines",
False,
),
override_mooring_anchors=self.modeling_options["costs"].get(
"override_mooring_anchors",
False,
),
floating=self.modeling_options["floating"],
jacket=self.modeling_options.get("jacket"),
jacket_legs=self.modeling_options.get("jacket_legs"),
Expand All @@ -274,6 +315,8 @@ def initialize(self):
self.options.declare("case_title", default="working")
self.options.declare("modeling_options")
self.options.declare("approximate_branches", default=False)
self.options.declare("override_mooring_lines", default=False)
self.options.declare("override_mooring_anchors", default=False)

def setup(self):
"""Define all the inputs."""
Expand All @@ -287,7 +330,7 @@ def setup(self):
self.N_substations = self.modeling_options["layout"]["N_substations"]

# bring in collection system design
self.add_discrete_input("graph", None)
self.add_input("terse_links", np.full((self.N_turbines,), -1))

# add the detailed turbine and substation locations
self.add_input("x_turbines", np.zeros((self.N_turbines,)), units="km")
Expand Down Expand Up @@ -332,6 +375,14 @@ def compile_orbit_config_file(
"row_spacing": inputs["plant_row_spacing"],
}

# override the mooring line values
if self.options["override_mooring_lines"]:
# if mooring lines will be calculated in detail
# zero their ORBIT cost contributions
config["mooring_system"]["line_cost"] = 0.0
# the standard diameter and mass can still be used to approximate
# construction times and costs, etc.

# switch to the custom array system design
if not ("ArraySystemDesign" in config["design_phases"]):
raise KeyError(
Expand Down Expand Up @@ -359,7 +410,7 @@ def compile_orbit_config_file(

# generate the csv data needed to locate the farm elements
generate_orbit_location_from_graph(
discrete_inputs["graph"],
inputs["terse_links"],
inputs["x_turbines"],
inputs["y_turbines"],
inputs["x_substations"],
Expand Down Expand Up @@ -396,6 +447,7 @@ def initialize(self):
"modeling_options", types=dict, desc="Ard modeling options"
)
self.options.declare("approximate_branches", default=False)
self.options.declare("override_mooring_lines", default=False)

def setup(self):

Expand Down Expand Up @@ -430,7 +482,7 @@ def setup(self):
"total_capex_kW",
"bos_capex",
"installation_capex",
"graph",
"terse_links",
"x_turbines",
"y_turbines",
"x_substations",
Expand All @@ -443,3 +495,17 @@ def setup(self):
# connect
for key in variable_mapping.keys():
self.connect(key, f"orbit.{key}")

def setup_partials(self):

self.declare_partials(
"*",
"*",
method="fd",
step=1.0e-5,
form="central",
step_calc="rel_avg",
)
self.declare_partials(
"terse_links", "*", method="exact", val=0.0, dependent=False
)
Loading
Loading