diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index c61c9415..ff0d2f36 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -1,25 +1,35 @@ -name: Upload to PyPi +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries -on: push +name: Deploy to PyPI + +on: + release: + types: [published] jobs: - deploy: + release-pypi: + environment: release + # Upload to PyPI on every published release + if: github.event.action == 'published' runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v4 - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - if: startsWith(github.ref, 'refs/tags/v') - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} - run: | - python setup.py sdist bdist_wheel - twine upload dist/* + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Build package + run: | + python -m pip install --upgrade pip + pip install setuptools build wheel twine + python -m build + twine check --strict dist/* + + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + verbose: True diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml new file mode 100644 index 00000000..d7407ab8 --- /dev/null +++ b/.github/workflows/publish-to-test-pypi.yml @@ -0,0 +1,37 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + +name: Deploy to Test PyPI + +on: + push: + tags: + - 'v*' + +jobs: + release-test-pypi: + # Upload to Test PyPI on every pushed tag. + environment: release + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Build package + run: | + python -m pip install --upgrade pip + pip install setuptools build wheel twine + python -m build + twine check --strict dist/* + + - name: Publish package to Test PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + verbose: True + repository-url: https://test.pypi.org/legacy/ diff --git a/ORBIT/__init__.py b/ORBIT/__init__.py index 422ce24f..32d2fff6 100644 --- a/ORBIT/__init__.py +++ b/ORBIT/__init__.py @@ -1,9 +1,14 @@ """Initializes ORBIT and provides the top-level import objects.""" -__author__ = ["Jake Nunemaker", "Matt Shields", "Rob Hammond"] +__author__ = [ + "Jake Nunemaker", + "Matt Shields", + "Rob Hammond", + "Nick Riccobono", +] __copyright__ = "Copyright 2020, National Renewable Energy Laboratory" -__maintainer__ = "Jake Nunemaker" -__email__ = ["jake.nunemaker@nrel.gov", "robert.hammond@nrel.gov"] +__maintainer__ = "Nick Riccobono" +__email__ = ["nicholas.riccobono@nrel.gov", "rob.hammond@nrel.gov"] __status__ = "Development" @@ -12,4 +17,4 @@ from ORBIT.parametric import ParametricManager from ORBIT.supply_chain import SupplyChainManager -__version__ = "1.0.8" +__version__ = "1.1" diff --git a/ORBIT/core/library.py b/ORBIT/core/library.py index bf678dcf..3fcb588e 100644 --- a/ORBIT/core/library.py +++ b/ORBIT/core/library.py @@ -27,7 +27,7 @@ __author__ = "Rob Hammond" __copyright__ = "Copyright 2020, National Renewable Energy Laboratory" __maintainer__ = "Rob Hammond" -__email__ = "robert.hammond@nrel.gov" +__email__ = "rob.hammond@nrel.gov" import os diff --git a/ORBIT/manager.py b/ORBIT/manager.py index 84232f63..1ad6eaee 100644 --- a/ORBIT/manager.py +++ b/ORBIT/manager.py @@ -40,7 +40,6 @@ SemiSubmersibleDesign, CustomArraySystemDesign, OffshoreSubstationDesign, - SemiTautMooringSystemDesign, OffshoreFloatingSubstationDesign, ) from ORBIT.phases.install import ( @@ -78,7 +77,6 @@ class ProjectManager: OffshoreSubstationDesign, OffshoreFloatingSubstationDesign, MooringSystemDesign, - SemiTautMooringSystemDesign, SemiSubmersibleDesign, SparDesign, ElectricalDesign, diff --git a/ORBIT/phases/__init__.py b/ORBIT/phases/__init__.py index e03cbe6b..324fe7ad 100644 --- a/ORBIT/phases/__init__.py +++ b/ORBIT/phases/__init__.py @@ -6,7 +6,7 @@ __author__ = ["Jake Nunemaker", "Rob Hammond"] __copyright__ = "Copyright 2020, National Renewable Energy Laboratory" __maintainer__ = ["Jake Nunemaker", "Rob Hammond"] -__email__ = ["jake.nunemaker@nrel.gov" "robert.hammond@nrel.gov"] +__email__ = ["jake.nunemaker@nrel.gov" "rob.hammond@nrel.gov"] from .base import BasePhase diff --git a/ORBIT/phases/design/SemiTaut_mooring_system_design.py b/ORBIT/phases/design/SemiTaut_mooring_system_design.py deleted file mode 100644 index 11c0edcc..00000000 --- a/ORBIT/phases/design/SemiTaut_mooring_system_design.py +++ /dev/null @@ -1,189 +0,0 @@ -"""`MooringSystemDesign` and related functionality.""" - -__author__ = "Jake Nunemaker, modified by Becca F." -__copyright__ = "Copyright 2020, National Renewable Energy Laboratory" -__maintainer__ = "Jake Nunemaker" -__email__ = "jake.nunemaker@nrel.gov & rebecca.fuchs@nrel.gov" - -import numpy as np -from scipy.interpolate import interp1d - -from ORBIT.phases.design import DesignPhase - - -class SemiTautMooringSystemDesign(DesignPhase): - """SemiTaut Mooring System and Anchor Design.""" - - expected_config = { - "site": {"depth": "float"}, - "turbine": {"turbine_rating": "int | float"}, - "plant": {"num_turbines": "int"}, - "mooring_system_design": { - "num_lines": "int | float (optional, default: 4)", - "anchor_type": "str (optional, default: 'Drag Embedment')", - "mooring_line_cost_rate": "int | float (optional)", - "drag_embedment_fixed_length": "int | float (optional, default: .5km)", - }, - } - - output_config = { - "mooring_system": { - "num_lines": "int", - # "line_diam": "m, float", # this is not needed for mooring.py - "line_mass": "t", # you need this for mooring.py (mooring installation module) - "line_cost": "USD", # you can calculate this based on each rope&chain length & diameter. - "line_length": "m", # this can be calculated from rope length and chain length (which you get from an empirical eqn as function of depth) - "anchor_mass": "t", # you need this for mooring.py (mooring installation module) - "anchor_type": "str", # keep, changed default to drag embedment. - "anchor_cost": "USD", # this can be calculated also as a function of (depth?) from the empirical data you have. - }, - } - - def __init__(self, config, **kwargs): - """ - Creates an instance of SemiTautMooringSystemDesign. - - Parameters - ---------- - config : dict - """ - - config = self.initialize_library(config, **kwargs) - self.config = self.validate_config(config) - self.num_turbines = self.config["plant"]["num_turbines"] - - self._design = self.config.get("mooring_system_design", {}) - self.num_lines = self._design.get("num_lines", 4) - self.anchor_type = self._design.get("anchor_type", "Drag Embedment") - - self._outputs = {} - - def run(self): - """Main run function.""" - - self.calculate_line_length_mass() - self.determine_mooring_line_cost() - self.calculate_anchor_mass_cost() - - self._outputs["mooring_system"] = {**self.design_result} - - def calculate_line_length_mass(self): - """Returns the mooring line length and mass.""" - - depth = self.config["site"]["depth"] - - # Input hybrid mooring system design from Cooperman et al. (2022), - # https://www.nrel.gov/docs/fy22osti/82341.pdf 'Assessment of Offshore - # Wind Energy Leasing Areas for Humboldt and Moorow Bay Wind Energy - # Areas, California - depths = np.array([500, 750, 1000, 1250, 1500]) - rope_lengths = np.array([478.41, 830.34, 1229.98, 1183.93, 1079.62]) - rope_diameters = np.array( - [0.2, 0.2, 0.2, 0.2, 0.2] - ) # you need the diameter for the cost data - chain_lengths = np.array([917.11, 800.36, 609.07, 896.42, 1280.57]) - chain_diameters = np.array([0.13, 0.17, 0.22, 0.22, 0.22]) - - # Interpolate - finterp_rope = interp1d(depths, rope_lengths) - finterp_chain = interp1d(depths, chain_lengths) - finterp_rope_diam = interp1d(depths, rope_diameters) - finterp_chain_diam = interp1d(depths, chain_diameters) - - # Rope and chain length at project depth - self.chain_length = finterp_chain(depth) - self.rope_length = finterp_rope(depth) - # Rope and chain diameter at project depth - self.rope_diameter = finterp_rope_diam(depth) - self.chain_diameter = finterp_chain_diam(depth) - - self.line_length = self.rope_length + self.chain_length - - chain_kg_per_m = 19900 * ( - self.chain_diameter**2 - ) # 19,900 kg/m^2 (diameter)/m (length) - rope_kg_per_m = 797.8 * ( - self.rope_diameter**2 - ) # 797.8 kg/ m^2 (diameter) / m (length) - self.line_mass = (self.chain_length * chain_kg_per_m) + ( - self.rope_length * rope_kg_per_m - ) # kg - # print('total hybrid line mass is ' + str(self.line_mass) + 'kg') - # convert kg to metric tonnes - self.line_mass = self.line_mass / 1e3 - - def calculate_anchor_mass_cost(self): - """ - Returns the mass and cost of anchors. - - TODO: Anchor masses are rough estimates based on initial literature - review. Should be revised when this module is overhauled in the future. - """ - - if self.anchor_type == "Drag Embedment": - - # TODO: Update this when data is available - self.anchor_mass = 20 # t - - # Input hybrid mooring system design from Cooperman et al. (2022), - # https://www.nrel.gov/docs/fy22osti/82341.pdf 'Assessment of - # Offshore Wind Energy Leasing Areas for Humboldt and Moorow Bay - # Wind Energy Areas, California - depths = np.array([500, 750, 1000, 1250, 1500]) - anchor_costs = np.array( - [112766, 125511, 148703, 204988, 246655] - ) # [USD] - - # interpolate anchor cost to project depth - depth = self.config["site"]["depth"] - finterp_anchor_cost = interp1d(depths, anchor_costs) - self.anchor_cost = finterp_anchor_cost( - depth - ) # TODO: replace with interp. function based on depth of hybrid mooring line # noqa: E501 - - def determine_mooring_line_cost(self): - """Returns cost of one line mooring line.""" - # Input hybrid mooring system design from Cooperman et al. (2022), - # https://www.nrel.gov/docs/fy22osti/82341.pdf 'Assessment of Offshore - # Wind Energy Leasing Areas for Humboldt and Moorow Bay Wind Energy - # Areas, California - depths = np.array([500, 750, 1000, 1250, 1500]) # [m] - total_line_costs = np.array( - [826598, 1221471, 1682208, 2380035, 3229700] - ) # [USD] - finterp_total_line_cost = interp1d(depths, total_line_costs) - depth = self.config["site"]["depth"] - self.line_cost = finterp_total_line_cost(depth) - return self.line_cost - - @property - def total_cost(self): - """Returns the total cost of the mooring system.""" - - return ( - self.num_lines - * self.num_turbines - * (self.anchor_cost + self.line_cost) - ) - - @property - def detailed_output(self): - """Returns detailed phase information.""" - - return { - "num_lines": self.num_lines, - # "line_diam": self.line_diam, - "line_mass": self.line_mass, - "line_length": self.line_length, - "line_cost": self.line_cost, - "anchor_type": self.anchor_type, - "anchor_mass": self.anchor_mass, - "anchor_cost": self.anchor_cost, - "system_cost": self.total_cost, - } - - @property - def design_result(self): - """Returns the results of the design phase.""" - - return {"mooring_system": self.detailed_output} diff --git a/ORBIT/phases/design/__init__.py b/ORBIT/phases/design/__init__.py index 7871e0ca..70eabc07 100644 --- a/ORBIT/phases/design/__init__.py +++ b/ORBIT/phases/design/__init__.py @@ -3,7 +3,7 @@ __author__ = ["Jake Nunemaker", "Rob Hammond"] __copyright__ = "Copyright 2020, National Renewable Energy Laboratory" __maintainer__ = ["Jake Nunemaker", "Rob Hammond"] -__email__ = ["jake.nunemaker@nrel.gov" "robert.hammond@nrel.gov"] +__email__ = ["jake.nunemaker@nrel.gov" "rob.hammond@nrel.gov"] from .design_phase import DesignPhase # isort:skip @@ -17,4 +17,3 @@ from .mooring_system_design import MooringSystemDesign from .scour_protection_design import ScourProtectionDesign from .semi_submersible_design import SemiSubmersibleDesign -from .SemiTaut_mooring_system_design import SemiTautMooringSystemDesign diff --git a/ORBIT/phases/design/_cables.py b/ORBIT/phases/design/_cables.py index 56410eea..73f34fe0 100644 --- a/ORBIT/phases/design/_cables.py +++ b/ORBIT/phases/design/_cables.py @@ -3,7 +3,7 @@ __author__ = ["Matt Shields", "Rob Hammond"] __copyright__ = "Copyright 2020, National Renewable Energy Laboratory" __maintainer__ = "Rob Hammond" -__email__ = "robert.hammond@nrel.gov" +__email__ = "rob.hammond@nrel.gov" import math diff --git a/ORBIT/phases/design/array_system_design.py b/ORBIT/phases/design/array_system_design.py index 43210d59..c6123b55 100644 --- a/ORBIT/phases/design/array_system_design.py +++ b/ORBIT/phases/design/array_system_design.py @@ -3,7 +3,7 @@ __author__ = "Rob Hammond" __copyright__ = "Copyright 2020, National Renewable Energy Laboratory" __maintainer__ = "Rob Hammond" -__email__ = "robert.hammond@nrel.gov" +__email__ = "rob.hammond@nrel.gov" import warnings diff --git a/ORBIT/phases/design/export_system_design.py b/ORBIT/phases/design/export_system_design.py index 4ad674b1..f6ab00d2 100644 --- a/ORBIT/phases/design/export_system_design.py +++ b/ORBIT/phases/design/export_system_design.py @@ -3,7 +3,7 @@ __author__ = "Rob Hammond" __copyright__ = "Copyright 2020, National Renewable Energy Laboratory" __maintainer__ = "Rob Hammond" -__email__ = "robert.hammond@nrel.gov" +__email__ = "rob.hammond@nrel.gov" from warnings import warn diff --git a/ORBIT/phases/design/oss_design_floating.py b/ORBIT/phases/design/oss_design_floating.py index 77d984b3..f1bc3610 100644 --- a/ORBIT/phases/design/oss_design_floating.py +++ b/ORBIT/phases/design/oss_design_floating.py @@ -289,7 +289,7 @@ def calc_substructure_mass_and_cost(self): substructure_mass * oss_substructure_cost_rate + substructure_pile_mass * oss_pile_cost_rate ) - # print('substructure cost:' + str(self.substructure_cost)) + self.substructure_mass = substructure_mass + substructure_pile_mass @property diff --git a/ORBIT/phases/design/scour_protection_design.py b/ORBIT/phases/design/scour_protection_design.py index cb07fa45..8dbac190 100644 --- a/ORBIT/phases/design/scour_protection_design.py +++ b/ORBIT/phases/design/scour_protection_design.py @@ -3,7 +3,7 @@ __author__ = ["Rob Hammond", "Jake Nunemaker"] __copyright__ = "Copyright 2020, National Renewable Energy Laboratory" __maintainer__ = "Rob Hammond" -__email__ = "robert.hammond@nrel.gov" +__email__ = "rob.hammond@nrel.gov" from math import ceil diff --git a/ORBIT/phases/install/__init__.py b/ORBIT/phases/install/__init__.py index 46ca4cbf..5a6d0035 100644 --- a/ORBIT/phases/install/__init__.py +++ b/ORBIT/phases/install/__init__.py @@ -3,7 +3,7 @@ __author__ = ["Jake Nunemaker", "Rob Hammond"] __copyright__ = "Copyright 2020, National Renewable Energy Laboratory" __maintainer__ = ["Jake Nunemaker", "Rob Hammond"] -__email__ = ["jake.nunemaker@nrel.gov" "robert.hammond@nrel.gov"] +__email__ = ["jake.nunemaker@nrel.gov" "rob.hammond@nrel.gov"] from .install_phase import InstallPhase # isort:skip from .oss_install import ( diff --git a/ORBIT/phases/install/cable_install/__init__.py b/ORBIT/phases/install/cable_install/__init__.py index dc52a6a0..7997fda6 100644 --- a/ORBIT/phases/install/cable_install/__init__.py +++ b/ORBIT/phases/install/cable_install/__init__.py @@ -3,7 +3,7 @@ __author__ = "Rob Hammond" __copyright__ = "Copyright 2020, National Renewable Energy Laboratory" __maintainer__ = "Rob Hammond" -__email__ = "robert.hammond@nrel.gov" +__email__ = "rob.hammond@nrel.gov" from .array import ArrayCableInstallation from .common import SimpleCable diff --git a/ORBIT/phases/install/install_phase.py b/ORBIT/phases/install/install_phase.py index 0689a2d9..930686e1 100644 --- a/ORBIT/phases/install/install_phase.py +++ b/ORBIT/phases/install/install_phase.py @@ -3,7 +3,7 @@ __author__ = ["Jake Nunemaker", "Rob Hammond"] __copyright__ = "Copyright 2020, National Renewable Energy Laboratory" __maintainer__ = ["Jake Nunemaker", "Rob Hammond"] -__email__ = ["jake.nunemaker@nrel.gov", "robert.hammond@nrel.gov"] +__email__ = ["jake.nunemaker@nrel.gov", "rob.hammond@nrel.gov"] from abc import abstractmethod diff --git a/ORBIT/phases/install/scour_protection_install/__init__.py b/ORBIT/phases/install/scour_protection_install/__init__.py index 9dde34c0..b2f99b17 100644 --- a/ORBIT/phases/install/scour_protection_install/__init__.py +++ b/ORBIT/phases/install/scour_protection_install/__init__.py @@ -1,6 +1,6 @@ __author__ = "Rob Hammond" __copyright__ = "Copyright 2020, National Renewable Energy Laboratory" __maintainer__ = "Rob Hammond" -__email__ = "robert.hammond@nrel.gov" +__email__ = "rob.hammond@nrel.gov" from .standard import ScourProtectionInstallation diff --git a/docs/index.rst b/docs/index.rst index 240c0052..1f732d55 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -41,7 +41,7 @@ the BOS process, split into :ref:`design ` and define which phases are needed to model their project or scenario using :ref:`ProjectManager `. -ORBIT is written in Python 3.7 and utilizes +ORBIT is written in Python 3.10 and utilizes `SimPy `_'s discrete event simulation framework to model individual processes during the installation phases, allowing for the effects of weather delays and vessel interactions to be diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index 6349519e..c59f37be 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -3,50 +3,80 @@ ORBIT Changelog =============== -Unreleased (TBD) ----------------- -- Relocated all the get design costs in each design class to `common_cost.yaml`. Spar, Semisub, monopile, electrical, offshore substation, and mooring designs all recieved this update. - -Merged SemiTaut Moorings -~~~~~~~~~~~~~~~~~~~~~~~~ - -- The ``MooringSystemDesign`` module now can use a Catenary or SemiTaut mooring system. User can specify "mooring_type". -- The ``FloatingOffshoreSubstation`` and ``ElectricalDesign`` modules now actually have a floating option to remove any substructure mass (and cost) from older versions. User can specify "oss_substructure_type" -- The ``MoredSubInstallation`` now utilizes an AHTS vessel which must be added to any config file as (ahts_vessel) -- "drag_embedment_install_time" increased from 5 to 12 hours -- quayside turbine tower section lift time from 12 to 4 hours per section. User specifies number of sections (default =1) -- quayside nacelle lift time changed from 7 to 12 hours -- XLPE_500mm_132kV cost_per_km changed from 200k to 500k -- example_cable_lay_vessel min_draft changed from 4.8m to 8.5m, overall_length 99m to 171m, max_mass 4000t to 13000t -- example_towing_vessel max_waveheight changed from 2.5m to 3.0m, max_windspeed 20m to 15m, transit_speed 6km/h to 14 km/h, day_rate 30k to 35k - -Merged Electrical Refactor -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- Updated ``ElectricalDesign`` module. -This class combines the elements of ``ExportSystemDesign`` and the ``OffshoreSubstationDesign`` modules. Its purpose is to represent the export system more accurately -by linking the type of cable (AC versus DC) and substation’s components (i.e. transformers versus converters).Figure 1 shows how to add ElectricalDesign() to a yaml -configuration file. Most export and substation component costs were updated to include a per-unit cost rather than a per-MW cost rate and they can be added to the -yaml file as arguments too. Otherwise, those per-unit costs use default and were determined with the help of a subcontractor. - - This module’s components’ cost scales with number of cables and substations rather than plant capacity. - - The offshore substation cost is calculated based on the cable type and number of cables, rather than scaling function based on plant capacity. - - The mass of an HVDC and HVAC substation are assumed to be the same. Without any new information the substructure mass and cost functions did not change. - - An experimental onshore cost function was also added to account for the duplicated interconnection components. Costs will vary depending on the cable type. - -.. image:: ./images/ElectricalDesignConfig.png - -Figure 1: Adding the new ElectricalDesign class to design phase in the yaml configuration file (left) versus using the original ExportDesignSystem and -OffshoreSubstationDesign classes (right). Note: ORBIT will not override output values from a design phase, so it will use the first instance and ignore -any subsequent designs that produce the same outputs. - -- Added an example notebook: `Example - Using HVDC or HVAC` -This new example showcases the capabilities of the ``ElectricalDesign`` class. It demonstrates how to create projects using HVAC or HVDC cables and -how to use ParametricManager to compare the two design decisions. - -- Expanded tests to demonstrate new features in ``ElectricalDesign``. +1.1 +--- + +New features +~~~~~~~~~~~~ +- Enhanced ``MooringSystemDesign``: + - Can specify catenary or semitaut mooring systems. (use `mooring_type`) + - Can specify drag embedment or suction pile anchors. (use `anchor_type`) + - Description: This class received some new options that the user can + specify to customize the mooring system. By default, this design uses + catenary mooring lines and suction pile anchors. The new semitaut mooring + lines use interpolation to calculate the geometry and cost based on + (Cooperman et al. 2022, https://www.nrel.gov/docs/fy22osti/82341.pdf). + - See ``5. Example Floating Project`` for more details. +- New ``ElectricalDesign``: + - Now has HVDC or HVAC transmission capabilities. + - New tests created ``test_electrical_export.py`` + - Description: This class combines the elements of ``ExportSystemDesign`` and the + ``OffshoreSubstationDesign`` modules. Its purpose is to represent the + entire export system more accurately by linking the type of cable + (AC versus DC) and substation’s components (i.e. transformers versus converters). + Most export and substation component costs were updated to include a per-unit cost + rather than a per-MW cost rate and they can be added to the project config file too. + Otherwise, those per-unit costs use default and were determined with the help of + industry experts. + - This module’s components’ cost scales with number of cables and + substations rather than plant capacity. + - The offshore substation cost is calculated based on the cable type + and number of cables, rather than scaling function based on plant capacity. + - The mass of an HVDC and HVAC substation are assumed to be the same. + Therefore, the substructure mass and cost functions did not change. + - An experimental onshore cost function was also added to account for + the duplicated interconnection components. Costs will vary depending + on the cable type. + - See new example ``Example - Using HVDC or HVAC`` for more details. +- Enhanced ``FloatingOffshoreSubStation``: + - Fixed the output substructure type from Monopile to Floating. (use `oss_substructure_type`) + - Removes any pile or fixed-bottom substructure geometry. + - See ``Example 5. Example Floating Project`` for more details. +- Updated ``MoredSubInstallation``: + - Uses an AHTS vessel which must be added to project config file. + - See ``example/example_floating_project.yaml`` (use `ahts_vessel`) +- New ``22MW_generic.yaml`` turbine. + - Based on the IEA - 22 MW reference wind turbine. + - See ``library/turbines`` for more details. +- New cables: + - Varying HVDC ratings + - Varying HVDC and HVAC "dynamic" cables for floating projects. + - See ``library/cables`` for all the cables and more details. + +Updated default values +~~~~~~~~~~~~~~~~~~~~~~ +- ``defaults/process_times.yaml`` + - `drag_embedment_install_time`` increased from 5 to 12 hours. +- ``phases/install/quayside_assembly_tow/common.py``: + - lift and attach tower section time changed from 12 to 4 hours per section, + - lift and attach nacelle time changed from 7 to 12 hours. +- ``library/cables/XLPE_500mm_132kV.yaml``: + - `cost_per_km` changed from $200k to $500k. +- ``library/vessels/example_cable_lay_vessel.yaml``: + - `min_draft` changed from 4.8m to 8.5m, + - `overall_length` changed from 99m to 171m, + - `max_mass` changed 4000t to 13000t, +- ``library/vessels/example_towing_vessel.yaml``: + - `max_waveheight` changed from 2.5m to 3.0m, + - `max_windspeed` changed 20m to 15m, + - `transit_speed` changed 6km/h to 14 km/h, + - `day_rate` changed $30k to $35k Improvements ~~~~~~~~~~~~ +- All design classes have new tests to track total cost to flag any changes that may + impact final project cost. +- Relocated all the get design costs in each design class to `common_cost.yaml`. - Fully adopted `pyproject.toml` for managing all possible tool settings, and removed the tool-specific files from the top-level of the directory. - Replaced flake8 and pylint with ruff to adopt a cleaner, faster, and easier diff --git a/examples/5. Example Floating Project-SemiTaut.ipynb b/examples/5. Example Floating Project-SemiTaut.ipynb deleted file mode 100644 index d3090455..00000000 --- a/examples/5. Example Floating Project-SemiTaut.ipynb +++ /dev/null @@ -1,642 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Jake Nunemaker\n", - "\n", - "National Renewable Energy Lab\n", - "\n", - "Last updated: 12/23/2020" - ] - }, - { - "cell_type": "code", - "execution_count": 28, - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "UserWarning: /var/folders/90/1lkt657x3n1cw5x65j3lfgd5406fb8/T/ipykernel_31846/3472246521.py:7\n", - "Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format." - ] - } - ], - "source": [ - "import pandas as pd\n", - "from pprint import pprint\n", - "from ORBIT import ProjectManager, load_config\n", - "\n", - "import warnings\n", - "warnings.filterwarnings(\"default\")\n", - "weather = pd.read_csv(\"data/example_weather.csv\", parse_dates=[\"datetime\"])\\\n", - " .set_index(\"datetime\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Load the project configuration" - ] - }, - { - "cell_type": "code", - "execution_count": 29, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Num turbines: 50\n", - "Turbine: 12MW_generic\n", - "\n", - "Site: {'depth': 900, 'distance': 100, 'distance_to_landfall': 100}\n" - ] - } - ], - "source": [ - "fixed_config = load_config(\"configs/example_floating_project_SemiTaut.yaml\")\n", - "\n", - "print(f\"Num turbines: {fixed_config['plant']['num_turbines']}\")\n", - "print(f\"Turbine: {fixed_config['turbine']}\")\n", - "print(f\"\\nSite: {fixed_config['site']}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Phases" - ] - }, - { - "cell_type": "code", - "execution_count": 30, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Design phases: ['ArraySystemDesign', 'ElectricalDesign', 'SemiTautMooringSystemDesign', 'SemiSubmersibleDesign']\n", - "\n", - "Install phases: ['ArrayCableInstallation', 'ExportCableInstallation', 'MooredSubInstallation', 'MooringSystemInstallation', 'FloatingSubstationInstallation']\n" - ] - } - ], - "source": [ - "print(f\"Design phases: {fixed_config['design_phases']}\")\n", - "print(f\"\\nInstall phases: {list(fixed_config['install_phases'].keys())}\")\n", - "# This now says \"SemiTautMooringSystemDesign\" in the design phases" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Run" - ] - }, - { - "cell_type": "code", - "execution_count": 31, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "UserWarning: /Users/nriccobo/GitHub/ORBIT/ORBIT/phases/install/quayside_assembly_tow/moored.py:193\n", - "No ['ahts_vessel'] specified. num_ahts set to 0. ahts_vessel will be required in future releases.\n", - "DeprecationWarning: /Users/nriccobo/GitHub/ORBIT/ORBIT/phases/install/quayside_assembly_tow/moored.py:93\n", - "support_vessel will be deprecated and replaced with towing_vessels and ahts_vessel in the towing groups.\n", - "DeprecationWarning: /Users/nriccobo/GitHub/ORBIT/ORBIT/phases/install/quayside_assembly_tow/moored.py:93\n", - "station_keeping_vessels will be deprecated and replaced with towing_vessels and ahts_vessels in the towing groups.\n" - ] - } - ], - "source": [ - "project = ProjectManager(fixed_config, weather=weather)\n", - "project.run()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Top Level Outputs" - ] - }, - { - "cell_type": "code", - "execution_count": 32, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Installation CapEx: 345 M\n", - "System CapEx: 1333 M\n", - "Turbine CapEx: 780 M\n", - "Soft CapEx: 387 M\n", - "Total CapEx: 2997 M\n", - "\n", - "Installation Time: 35527 h\n" - ] - } - ], - "source": [ - "print(f\"Installation CapEx: {project.installation_capex/1e6:.0f} M\")\n", - "print(f\"System CapEx: {project.system_capex/1e6:.0f} M\")\n", - "print(f\"Turbine CapEx: {project.turbine_capex/1e6:.0f} M\")\n", - "print(f\"Soft CapEx: {project.soft_capex/1e6:.0f} M\")\n", - "print(f\"Total CapEx: {project.total_capex/1e6:.0f} M\")\n", - "\n", - "print(f\"\\nInstallation Time: {project.installation_time:.0f} h\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### CapEx Breakdown" - ] - }, - { - "cell_type": "code", - "execution_count": 33, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'Array System': 56983076.60642063,\n", - " 'Export System': 259281192.288,\n", - " 'Substructure': 630709636.6,\n", - " 'Mooring System': 327467880.0,\n", - " 'Offshore Substation': 58536861.93724438,\n", - " 'Array System Installation': 63027746.845681354,\n", - " 'Export System Installation': 148076127.6910655,\n", - " 'Substructure Installation': 78801350.29354209,\n", - " 'Mooring System Installation': 48485331.05022831,\n", - " 'Offshore Substation Installation': 7070795.281582953,\n", - " 'Turbine': 780000000,\n", - " 'Soft': 387000000,\n", - " 'Project': 151250000.0}" - ] - }, - "execution_count": 33, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "project.capex_breakdown" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'Array System': 94.97179434403438,\n", - " 'Export System': 432.13532047999996,\n", - " 'Substructure': 1051.1827276666668,\n", - " 'Mooring System': 545.7798,\n", - " 'Offshore Substation': 97.56143656207396,\n", - " 'Array System Installation': 105.04624474280226,\n", - " 'Export System Installation': 246.79354615177581,\n", - " 'Substructure Installation': 131.33558382257016,\n", - " 'Mooring System Installation': 80.80888508371386,\n", - " 'Offshore Substation Installation': 11.784658802638255,\n", - " 'Turbine': 1300.0,\n", - " 'Soft': 645.0,\n", - " 'Project': 252.08333333333334}" - ] - }, - "execution_count": 34, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "project.capex_breakdown_per_kw" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Installation Actions" - ] - }, - { - "cell_type": "code", - "execution_count": 35, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
cost_multiplieragentactiondurationcostleveltimephaselocationphase_namemax_waveheightmax_windspeedtransit_speednum_vesselsnum_ahts_vessels
00.5Array Cable Installation VesselMobilize72.0000003.375000e+05ACTION0.000000ArrayCableInstallationNaNNaNNaNNaNNaNNaNNaN
10.5Export Cable Installation VesselMobilize72.0000003.375000e+05ACTION0.000000ExportCableInstallationNaNNaNNaNNaNNaNNaNNaN
2NaNOnshore ConstructionOnshore Construction0.0000001.665604e+06ACTION0.000000ExportCableInstallationLandfallNaNNaNNaNNaNNaNNaN
31.0Mooring System Installation VesselMobilize168.0000007.000000e+05ACTION0.000000MooringSystemInstallationNaNNaNNaNNaNNaNNaNNaN
4NaNSubstation Assembly Line 1Substation Substructure Assembly0.0000000.000000e+00ACTION0.000000FloatingSubstationInstallationNaNNaNNaNNaNNaNNaNNaN
................................................
2988NaNExport Cable Installation VesselPull In Cable5.5000005.156250e+04ACTION12017.280762ExportCableInstallationNaNExportCableInstallationNaNNaNNaNNaNNaN
2989NaNExport Cable Installation VesselTerminate Cable5.5000005.156250e+04ACTION12022.780762ExportCableInstallationNaNExportCableInstallationNaNNaNNaNNaNNaN
2990NaNExport Cable Installation VesselTransit8.0000007.500000e+04ACTION12030.780762ExportCableInstallationNaNNaNNaNNaNNaNNaNNaN
2991NaNExport Cable Installation VesselDelay26.0000002.437500e+05ACTION12056.780762ExportCableInstallationNaNNaNNaNNaNNaNNaNNaN
2992NaNExport Cable Installation VesselTransit0.6956526.521739e+03ACTION12057.476414ExportCableInstallationNaNNaNNaNNaNNaNNaNNaN
\n", - "

2993 rows \u00d7 15 columns

\n", - "
" - ], - "text/plain": [ - " cost_multiplier agent \\\n", - "0 0.5 Array Cable Installation Vessel \n", - "1 0.5 Export Cable Installation Vessel \n", - "2 NaN Onshore Construction \n", - "3 1.0 Mooring System Installation Vessel \n", - "4 NaN Substation Assembly Line 1 \n", - "... ... ... \n", - "2988 NaN Export Cable Installation Vessel \n", - "2989 NaN Export Cable Installation Vessel \n", - "2990 NaN Export Cable Installation Vessel \n", - "2991 NaN Export Cable Installation Vessel \n", - "2992 NaN Export Cable Installation Vessel \n", - "\n", - " action duration cost level \\\n", - "0 Mobilize 72.000000 3.375000e+05 ACTION \n", - "1 Mobilize 72.000000 3.375000e+05 ACTION \n", - "2 Onshore Construction 0.000000 1.665604e+06 ACTION \n", - "3 Mobilize 168.000000 7.000000e+05 ACTION \n", - "4 Substation Substructure Assembly 0.000000 0.000000e+00 ACTION \n", - "... ... ... ... ... \n", - "2988 Pull In Cable 5.500000 5.156250e+04 ACTION \n", - "2989 Terminate Cable 5.500000 5.156250e+04 ACTION \n", - "2990 Transit 8.000000 7.500000e+04 ACTION \n", - "2991 Delay 26.000000 2.437500e+05 ACTION \n", - "2992 Transit 0.695652 6.521739e+03 ACTION \n", - "\n", - " time phase location \\\n", - "0 0.000000 ArrayCableInstallation NaN \n", - "1 0.000000 ExportCableInstallation NaN \n", - "2 0.000000 ExportCableInstallation Landfall \n", - "3 0.000000 MooringSystemInstallation NaN \n", - "4 0.000000 FloatingSubstationInstallation NaN \n", - "... ... ... ... \n", - "2988 12017.280762 ExportCableInstallation NaN \n", - "2989 12022.780762 ExportCableInstallation NaN \n", - "2990 12030.780762 ExportCableInstallation NaN \n", - "2991 12056.780762 ExportCableInstallation NaN \n", - "2992 12057.476414 ExportCableInstallation NaN \n", - "\n", - " phase_name max_waveheight max_windspeed transit_speed \\\n", - "0 NaN NaN NaN NaN \n", - "1 NaN NaN NaN NaN \n", - "2 NaN NaN NaN NaN \n", - "3 NaN NaN NaN NaN \n", - "4 NaN NaN NaN NaN \n", - "... ... ... ... ... \n", - "2988 ExportCableInstallation NaN NaN NaN \n", - "2989 ExportCableInstallation NaN NaN NaN \n", - "2990 NaN NaN NaN NaN \n", - "2991 NaN NaN NaN NaN \n", - "2992 NaN NaN NaN NaN \n", - "\n", - " num_vessels num_ahts_vessels \n", - "0 NaN NaN \n", - "1 NaN NaN \n", - "2 NaN NaN \n", - "3 NaN NaN \n", - "4 NaN NaN \n", - "... ... ... \n", - "2988 NaN NaN \n", - "2989 NaN NaN \n", - "2990 NaN NaN \n", - "2991 NaN NaN \n", - "2992 NaN NaN \n", - "\n", - "[2993 rows x 15 columns]" - ] - }, - "execution_count": 35, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "pd.DataFrame(project.actions)" - ] - }, - { - "cell_type": "code", - "execution_count": 37, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'deck_space': 1,\n", - " 'length': 0,\n", - " 'mass': 1192.0,\n", - " 'type': 'Floating',\n", - " 'unit_cost': 3576000.0}\n", - "{'deck_space': 1, 'mass': 2980.0, 'unit_cost': 48411504.33724438}\n", - "{'anchor_cost': array(139426.2),\n", - " 'anchor_mass': 20,\n", - " 'anchor_type': 'Drag Embedment',\n", - " 'line_cost': array(1497913.2),\n", - " 'line_length': 1755.71,\n", - " 'line_mass': 579.8762530880001,\n", - " 'num_lines': 4,\n", - " 'system_cost': 327467880.0}\n", - "'Mooring System: $/kW'\n", - "545.7798\n", - "80.80888508371386\n" - ] - } - ], - "source": [ - "pprint(project.design_results[\"offshore_substation_substructure\"])\n", - "pprint(project.design_results[\"offshore_substation_topside\"])\n", - "pprint(project.design_results[\"mooring_system\"])\n", - "\n", - "pprint(\"Mooring System: $/kW\")\n", - "pprint(project.capex_breakdown_per_kw['Mooring System'])\n", - "pprint(project.capex_breakdown_per_kw['Mooring System Installation'])" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.18" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/examples/5. Example Floating Project.ipynb b/examples/5. Example Floating Project.ipynb index 911922e2..68a22700 100644 --- a/examples/5. Example Floating Project.ipynb +++ b/examples/5. Example Floating Project.ipynb @@ -4,29 +4,34 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "#### Example Floating Project\n", + "### Example Floating Project\n", "\n", "This tutorial uses prepared ORBIT configs that are stored as .yaml files in the `~/configs/` folder. These example projects each exhibit different functionalities within ORBIT. Using these examples and combinations of them, most project configurations can be modeled. \n", "\n", - "Last updated: May 2024" + "Last updated: September 2024\n", + "\n", + "1. Run the example floating project and print outputs\n", + "2. Replace the anchor_type and mooring_type and print outputs \n" ] }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 39, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "UserWarning: /var/folders/90/1lkt657x3n1cw5x65j3lfgd5406fb8/T/ipykernel_71795/2795185578.py:8\n", + "UserWarning: /var/folders/90/1lkt657x3n1cw5x65j3lfgd5406fb8/T/ipykernel_98169/3749054979.py:9\n", "Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format." ] } ], "source": [ "import pandas as pd\n", + "\n", + "from copy import deepcopy\n", "from pprint import pprint\n", "from ORBIT import ProjectManager, load_config\n", "\n", @@ -41,13 +46,15 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Load the project configuration\n", + "### 1. Run the example floating project \n", + "\n", + "#### Load the project configuration\n", "`~/configs/example_floating_project.yaml`" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 27, "metadata": {}, "outputs": [ { @@ -78,16 +85,20 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 41, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Design phases: ['ArraySystemDesign', 'ElectricalDesign', 'MooringSystemDesign', 'OffshoreFloatingSubstationDesign', 'SemiSubmersibleDesign']\n", - "\n", - "Install phases: ['ArrayCableInstallation', 'ExportCableInstallation', 'MooredSubInstallation', 'MooringSystemInstallation', 'FloatingSubstationInstallation', 'TurbineInstallation']\n" + "(\"Design phases: ['ArraySystemDesign', 'ElectricalDesign', \"\n", + " \"'MooringSystemDesign', 'OffshoreFloatingSubstationDesign', \"\n", + " \"'SemiSubmersibleDesign']\")\n", + "('\\n'\n", + " \"Install phases: ['ArrayCableInstallation', 'ExportCableInstallation', \"\n", + " \"'MooredSubInstallation', 'MooringSystemInstallation', \"\n", + " \"'FloatingSubstationInstallation', 'TurbineInstallation']\")\n" ] } ], @@ -105,24 +116,16 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 29, "metadata": {}, "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "ORBIT library intialized at '/Users/nriccobo/GitHub/ORBIT/library'\n", - "2\n" - ] - }, { "name": "stderr", "output_type": "stream", "text": [ - "DeprecationWarning: /Users/nriccobo/GitHub/ORBIT/ORBIT/phases/install/quayside_assembly_tow/moored.py:93\n", + "DeprecationWarning: /Users/nriccobo/GitHub/ORBIT/ORBIT/phases/install/quayside_assembly_tow/moored.py:94\n", "support_vessel will be deprecated and replaced with towing_vessels and ahts_vessel in the towing groups.\n", - "DeprecationWarning: /Users/nriccobo/GitHub/ORBIT/ORBIT/phases/install/quayside_assembly_tow/moored.py:93\n", + "DeprecationWarning: /Users/nriccobo/GitHub/ORBIT/ORBIT/phases/install/quayside_assembly_tow/moored.py:94\n", "['towing_vessl_groups]['station_keeping_vessels'] will be deprecated and replaced with ['towing_vessl_groups]['ahts_vessels'].\n" ] } @@ -141,20 +144,20 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 30, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Installation CapEx: 519 M\n", - "System CapEx: 1333 M\n", + "Installation CapEx: 521 M\n", + "System CapEx: 1444 M\n", "Turbine CapEx: 780 M\n", "Soft CapEx: 387 M\n", - "Total CapEx: 3171 M\n", + "Total CapEx: 3283 M\n", "\n", - "Installation Time: 40914 h\n" + "Installation Time: 41147 h\n" ] } ], @@ -177,7 +180,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 31, "metadata": {}, "outputs": [ { @@ -186,12 +189,12 @@ "{'Array System': 94.97179434403438,\n", " 'Export System': 432.13532047999996,\n", " 'Substructure': 1051.1827276666668,\n", - " 'Mooring System': 545.7798,\n", - " 'Offshore Substation': 97.56143656207396,\n", + " 'Mooring System': 552.2987080136722,\n", + " 'Offshore Substation': 276.52514805568075,\n", " 'Array System Installation': 105.04624474280226,\n", " 'Export System Installation': 246.79354615177581,\n", " 'Substructure Installation': 208.2509277379141,\n", - " 'Mooring System Installation': 80.80888508371386,\n", + " 'Mooring System Installation': 83.49086757990867,\n", " 'Offshore Substation Installation': 11.784658802638255,\n", " 'Turbine Installation': 212.89678462709279,\n", " 'Turbine': 1300.0,\n", @@ -199,7 +202,7 @@ " 'Project': 252.08333333333334}" ] }, - "execution_count": 6, + "execution_count": 31, "metadata": {}, "output_type": "execute_result" } @@ -217,7 +220,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 32, "metadata": {}, "outputs": [ { @@ -382,7 +385,7 @@ " ...\n", " \n", " \n", - " 4458\n", + " 4521\n", " NaN\n", " Export Cable Installation Vessel\n", " Pull In Cable\n", @@ -402,7 +405,7 @@ " NaN\n", " \n", " \n", - " 4459\n", + " 4522\n", " NaN\n", " Export Cable Installation Vessel\n", " Terminate Cable\n", @@ -422,7 +425,7 @@ " NaN\n", " \n", " \n", - " 4460\n", + " 4523\n", " NaN\n", " Export Cable Installation Vessel\n", " Transit\n", @@ -442,7 +445,7 @@ " NaN\n", " \n", " \n", - " 4461\n", + " 4524\n", " NaN\n", " Export Cable Installation Vessel\n", " Delay\n", @@ -462,7 +465,7 @@ " NaN\n", " \n", " \n", - " 4462\n", + " 4525\n", " NaN\n", " Export Cable Installation Vessel\n", " Transit\n", @@ -483,7 +486,7 @@ " \n", " \n", "\n", - "

4463 rows \u00d7 17 columns

\n", + "

4526 rows \u00d7 17 columns

\n", "" ], "text/plain": [ @@ -494,11 +497,11 @@ "3 1.0 Mooring System Installation Vessel \n", "4 NaN Substation Assembly Line 1 \n", "... ... ... \n", - "4458 NaN Export Cable Installation Vessel \n", - "4459 NaN Export Cable Installation Vessel \n", - "4460 NaN Export Cable Installation Vessel \n", - "4461 NaN Export Cable Installation Vessel \n", - "4462 NaN Export Cable Installation Vessel \n", + "4521 NaN Export Cable Installation Vessel \n", + "4522 NaN Export Cable Installation Vessel \n", + "4523 NaN Export Cable Installation Vessel \n", + "4524 NaN Export Cable Installation Vessel \n", + "4525 NaN Export Cable Installation Vessel \n", "\n", " action duration cost level \\\n", "0 Mobilize 72.000000 3.375000e+05 ACTION \n", @@ -507,11 +510,11 @@ "3 Mobilize 168.000000 7.000000e+05 ACTION \n", "4 Substation Substructure Assembly 0.000000 0.000000e+00 ACTION \n", "... ... ... ... ... \n", - "4458 Pull In Cable 5.500000 5.156250e+04 ACTION \n", - "4459 Terminate Cable 5.500000 5.156250e+04 ACTION \n", - "4460 Transit 8.000000 7.500000e+04 ACTION \n", - "4461 Delay 26.000000 2.437500e+05 ACTION \n", - "4462 Transit 0.695652 6.521739e+03 ACTION \n", + "4521 Pull In Cable 5.500000 5.156250e+04 ACTION \n", + "4522 Terminate Cable 5.500000 5.156250e+04 ACTION \n", + "4523 Transit 8.000000 7.500000e+04 ACTION \n", + "4524 Delay 26.000000 2.437500e+05 ACTION \n", + "4525 Transit 0.695652 6.521739e+03 ACTION \n", "\n", " time phase location site_depth \\\n", "0 0.000000 ArrayCableInstallation NaN NaN \n", @@ -520,11 +523,11 @@ "3 0.000000 MooringSystemInstallation NaN NaN \n", "4 0.000000 FloatingSubstationInstallation NaN NaN \n", "... ... ... ... ... \n", - "4458 12017.280762 ExportCableInstallation NaN NaN \n", - "4459 12022.780762 ExportCableInstallation NaN NaN \n", - "4460 12030.780762 ExportCableInstallation NaN NaN \n", - "4461 12056.780762 ExportCableInstallation NaN NaN \n", - "4462 12057.476414 ExportCableInstallation NaN NaN \n", + "4521 12017.280762 ExportCableInstallation NaN NaN \n", + "4522 12022.780762 ExportCableInstallation NaN NaN \n", + "4523 12030.780762 ExportCableInstallation NaN NaN \n", + "4524 12056.780762 ExportCableInstallation NaN NaN \n", + "4525 12057.476414 ExportCableInstallation NaN NaN \n", "\n", " hub_height phase_name max_waveheight max_windspeed \\\n", "0 NaN NaN NaN NaN \n", @@ -533,11 +536,11 @@ "3 NaN NaN NaN NaN \n", "4 NaN NaN NaN NaN \n", "... ... ... ... ... \n", - "4458 NaN ExportCableInstallation NaN NaN \n", - "4459 NaN ExportCableInstallation NaN NaN \n", - "4460 NaN NaN NaN NaN \n", - "4461 NaN NaN NaN NaN \n", - "4462 NaN NaN NaN NaN \n", + "4521 NaN ExportCableInstallation NaN NaN \n", + "4522 NaN ExportCableInstallation NaN NaN \n", + "4523 NaN NaN NaN NaN \n", + "4524 NaN NaN NaN NaN \n", + "4525 NaN NaN NaN NaN \n", "\n", " transit_speed num_vessels num_ahts_vessels \n", "0 NaN NaN NaN \n", @@ -546,16 +549,16 @@ "3 NaN NaN NaN \n", "4 NaN NaN NaN \n", "... ... ... ... \n", - "4458 NaN NaN NaN \n", - "4459 NaN NaN NaN \n", - "4460 NaN NaN NaN \n", - "4461 NaN NaN NaN \n", - "4462 NaN NaN NaN \n", + "4521 NaN NaN NaN \n", + "4522 NaN NaN NaN \n", + "4523 NaN NaN NaN \n", + "4524 NaN NaN NaN \n", + "4525 NaN NaN NaN \n", "\n", - "[4463 rows x 17 columns]" + "[4526 rows x 17 columns]" ] }, - "execution_count": 7, + "execution_count": 32, "metadata": {}, "output_type": "execute_result" } @@ -566,19 +569,145 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 49, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mooring System Design:\n", + "{'anchor_cost': 190951.03604101657,\n", + " 'anchor_mass': 50,\n", + " 'anchor_type': 'Suction Pile',\n", + " 'line_cost': 1465945.088,\n", + " 'line_diam': 0.15,\n", + " 'line_length': 1347.376,\n", + " 'line_mass': 606.3192,\n", + " 'mooring_type': 'Catenary',\n", + " 'num_lines': 4,\n", + " 'system_cost': 331379224.80820334}\n", + "\n", + "Mooring System: $/kW\n", + "$ 552.3\n", + "$ 83.49\n" + ] + } + ], + "source": [ + "print(\"Mooring System Design:\")\n", + "pprint(project.design_results[\"mooring_system\"])\n", + "\n", + "print(\"\\nMooring System: $/kW\")\n", + "print(\"$\", round(project.capex_breakdown_per_kw['Mooring System'], 2))\n", + "\n", + "print(\"$\", round(project.capex_breakdown_per_kw['Mooring System Installation'], 2))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### 2. Replace anchor and mooring types " + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "DeprecationWarning: /Users/nriccobo/GitHub/ORBIT/ORBIT/phases/install/quayside_assembly_tow/moored.py:94\n", + "support_vessel will be deprecated and replaced with towing_vessels and ahts_vessel in the towing groups.\n", + "DeprecationWarning: /Users/nriccobo/GitHub/ORBIT/ORBIT/phases/install/quayside_assembly_tow/moored.py:94\n", + "['towing_vessl_groups]['station_keeping_vessels'] will be deprecated and replaced with ['towing_vessl_groups]['ahts_vessels'].\n" + ] + } + ], + "source": [ + "semitaut_config = deepcopy(floating_config)\n", + "semitaut_config['mooring_system_design']['anchor_type'] = 'Drag Embedment'\n", + "semitaut_config['mooring_system_design']['mooring_type'] = 'Semitaut'\n", + "\n", + "project_semitaut = ProjectManager(semitaut_config, weather=weather)\n", + "project_semitaut.run()" + ] + }, + { + "cell_type": "code", + "execution_count": 35, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "{'deck_space': 1,\n", - " 'length': 0,\n", - " 'mass': 1192.0,\n", - " 'type': 'Floating',\n", - " 'unit_cost': 3576000.0}\n", - "{'deck_space': 1, 'mass': 2980.0, 'unit_cost': 48411504.33724438}\n", + "Installation CapEx: 519 M\n", + "System CapEx: 1440 M\n", + "Turbine CapEx: 780 M\n", + "Soft CapEx: 387 M\n", + "Total CapEx: 3278 M\n", + "\n", + "Installation Time: 41147 h\n" + ] + } + ], + "source": [ + "print(f\"Installation CapEx: {project_semitaut.installation_capex/1e6:.0f} M\")\n", + "print(f\"System CapEx: {project_semitaut.system_capex/1e6:.0f} M\")\n", + "print(f\"Turbine CapEx: {project_semitaut.turbine_capex/1e6:.0f} M\")\n", + "print(f\"Soft CapEx: {project_semitaut.soft_capex/1e6:.0f} M\")\n", + "print(f\"Total CapEx: {project_semitaut.total_capex/1e6:.0f} M\")\n", + "\n", + "print(f\"\\nInstallation Time: {project.installation_time:.0f} h\")" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'Array System': 94.97179434403438,\n", + " 'Export System': 432.13532047999996,\n", + " 'Substructure': 1051.1827276666668,\n", + " 'Mooring System': 545.7798,\n", + " 'Offshore Substation': 276.3947698954073,\n", + " 'Array System Installation': 105.04624474280226,\n", + " 'Export System Installation': 246.79354615177581,\n", + " 'Substructure Installation': 208.2509277379141,\n", + " 'Mooring System Installation': 80.80888508371386,\n", + " 'Offshore Substation Installation': 11.784658802638255,\n", + " 'Turbine Installation': 212.89678462709279,\n", + " 'Turbine': 1300.0,\n", + " 'Soft': 645.0,\n", + " 'Project': 252.08333333333334}" + ] + }, + "execution_count": 36, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "project_semitaut.capex_breakdown_per_kw" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mooring System Design:\n", "{'anchor_cost': 139426.2,\n", " 'anchor_mass': 20,\n", " 'anchor_type': 'Drag Embedment',\n", @@ -586,24 +715,24 @@ " 'line_diam': 0.15,\n", " 'line_length': 1755.71,\n", " 'line_mass': 579.8762530880001,\n", - " 'mooring_type': 'SemiTaut',\n", + " 'mooring_type': 'Semitaut',\n", " 'num_lines': 4,\n", " 'system_cost': 327467880.0}\n", - "'Mooring System: $/kW'\n", - "545.7798\n", - "80.80888508371386\n" + "\n", + "Mooring System: $/kW\n", + "$ 545.78\n", + "$ 80.81\n" ] } ], "source": [ - "pprint(project.design_results[\"offshore_substation_substructure\"])\n", - "pprint(project.design_results[\"offshore_substation_topside\"])\n", - "pprint(project.design_results[\"mooring_system\"])\n", + "print(\"Mooring System Design:\")\n", + "pprint(project_semitaut.design_results[\"mooring_system\"])\n", "\n", - "pprint(\"Mooring System: $/kW\")\n", - "pprint(project.capex_breakdown_per_kw['Mooring System'])\n", + "print(\"\\nMooring System: $/kW\")\n", + "print(\"$\", round(project_semitaut.capex_breakdown_per_kw['Mooring System'], 2))\n", "\n", - "pprint(project.capex_breakdown_per_kw['Mooring System Installation'])" + "print(\"$\", round(project_semitaut.capex_breakdown_per_kw['Mooring System Installation'], 2))" ] } ], @@ -623,7 +752,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.18" + "version": "3.10.14" } }, "nbformat": 4, diff --git a/examples/configs/example_floating_project.yaml b/examples/configs/example_floating_project.yaml index 28e7fd24..3bb7b468 100644 --- a/examples/configs/example_floating_project.yaml +++ b/examples/configs/example_floating_project.yaml @@ -31,8 +31,8 @@ substructure: substation_design: oss_substructure_type: Floating mooring_system_design: - anchor_type: Drag Embedment - mooring_type: SemiTaut + anchor_type: Suction Pile + mooring_type: Catenary array_system: free_cable_length: 0.5 array_system_design: diff --git a/examples/configs/example_floating_project_SemiTaut.yaml b/examples/configs/example_floating_project_SemiTaut.yaml deleted file mode 100644 index cba486b6..00000000 --- a/examples/configs/example_floating_project_SemiTaut.yaml +++ /dev/null @@ -1,58 +0,0 @@ -# Site + Plant Parameters -site: - depth: 900 - distance: 100 - distance_to_landfall: 100 -plant: - layout: ring - num_turbines: 50 - row_spacing: 7 - substation_distance: 1 - turbine_spacing: 7 -port: - monthly_rate: 2000000.0 - sub_assembly_lines: 1 - turbine_assembly_cranes: 1 -# Vessels -array_cable_install_vessel: example_cable_lay_vessel -export_cable_install_vessel: example_cable_lay_vessel -mooring_install_vessel: example_support_vessel -oss_install_vessel: floating_heavy_lift_vessel -support_vessel: example_support_vessel -#ahts_vessel: example_ahts_vessel -towing_vessel: example_towing_vessel -towing_vessel_groups: - station_keeping_vessels: 2 - ahts_vessels: 1 - towing_vessels: 3 -wtiv: floating_heavy_lift_vessel -# Module Specific -substructure: - takt_time: 168 -substation_design: - oss_substructure_type: Floating -array_system: - free_cable_length: 0.5 -array_system_design: - cables: - - XLPE_630mm_66kV -export_system_design: - cables: XLPE_500mm_132kV - percent_added_length: 0.0 -offshore_substation_substructure: - type: Floating -# Configured Phases -design_phases: -- ArraySystemDesign -- ElectricalDesign -- SemiTautMooringSystemDesign -#- OffshoreFloatingSubstationDesign -- SemiSubmersibleDesign -install_phases: - ArrayCableInstallation: 0 - ExportCableInstallation: 0 - MooredSubInstallation: 0 - MooringSystemInstallation: 0 - FloatingSubstationInstallation: 0 -# Project Inputs -turbine: 12MW_generic diff --git a/library/__init__.py b/library/__init__.py index 62fe1c84..5d3ded35 100644 --- a/library/__init__.py +++ b/library/__init__.py @@ -1,5 +1,5 @@ __author__ = ["Rob Hammond", "Jake Nunemaker"] __copyright__ = "Copyright 2020, National Renewable Energy Laboratory" __maintainer__ = "Jake Nunemaker" -__email__ = ["jake.nunemaker@nrel.gov", "robert.hammond@nrel.gov"] +__email__ = ["jake.nunemaker@nrel.gov", "rob.hammond@nrel.gov"] __status__ = "Development" diff --git a/library/cables/XLPE_1000m_220kV_dynamic.yaml b/library/cables/XLPE_1000m_220kV_dynamic.yaml deleted file mode 100644 index d179ae21..00000000 --- a/library/cables/XLPE_1000m_220kV_dynamic.yaml +++ /dev/null @@ -1,10 +0,0 @@ -ac_resistance: 0.16 # ohm/km -capacitance: 190 # nF/km -conductor_size: 1000 # mm^2 -cost_per_km: 1020000 # $ (20% adder over XLPE_1000m_220kV) -current_capacity: 825 # A -inductance: 0.38 # mH/km -linear_density: 115 # t/km -cable_type: HVAC # HVDC vs HVAC -name: XLPE_1000m_220kV -rated_voltage: 220 diff --git a/library/ports/__init__.py b/library/ports/__init__.py index 62fe1c84..5d3ded35 100644 --- a/library/ports/__init__.py +++ b/library/ports/__init__.py @@ -1,5 +1,5 @@ __author__ = ["Rob Hammond", "Jake Nunemaker"] __copyright__ = "Copyright 2020, National Renewable Energy Laboratory" __maintainer__ = "Jake Nunemaker" -__email__ = ["jake.nunemaker@nrel.gov", "robert.hammond@nrel.gov"] +__email__ = ["jake.nunemaker@nrel.gov", "rob.hammond@nrel.gov"] __status__ = "Development" diff --git a/tests/core/test_library.py b/tests/core/test_library.py index 24c253eb..002adb84 100644 --- a/tests/core/test_library.py +++ b/tests/core/test_library.py @@ -3,7 +3,7 @@ __author__ = "Rob Hammond" __copyright__ = "Copyright 2020, National Renewable Energy Laboratory" __maintainer__ = "Rob Hammond" -__email__ = "robert.hammond@nrel.gov" +__email__ = "rob.hammond@nrel.gov" import os from copy import deepcopy diff --git a/tests/phases/design/test_array_system_design.py b/tests/phases/design/test_array_system_design.py index e7e1e4b4..a7f7bb09 100644 --- a/tests/phases/design/test_array_system_design.py +++ b/tests/phases/design/test_array_system_design.py @@ -3,7 +3,7 @@ __author__ = "Rob Hammond" __copyright__ = "Copyright 2020, National Renewable Energy Laboratory" __maintainer__ = "Rob Hammond" -__email__ = "robert.hammond@nrel.gov" +__email__ = "rob.hammond@nrel.gov" from copy import deepcopy diff --git a/tests/phases/design/test_cable.py b/tests/phases/design/test_cable.py index eabab579..3973aadf 100644 --- a/tests/phases/design/test_cable.py +++ b/tests/phases/design/test_cable.py @@ -3,7 +3,7 @@ __author__ = "Rob Hammond" __copyright__ = "Copyright 2020, National Renewable Energy Laboratory" __maintainer__ = "Rob Hammond" -__email__ = "robert.hammond@nrel.gov" +__email__ = "rob.hammond@nrel.gov" import copy diff --git a/tests/phases/design/test_export_system_design.py b/tests/phases/design/test_export_system_design.py index fa5c76a5..9ef801e1 100644 --- a/tests/phases/design/test_export_system_design.py +++ b/tests/phases/design/test_export_system_design.py @@ -3,7 +3,7 @@ __author__ = "Rob Hammond" __copyright__ = "Copyright 2020, National Renewable Energy Laboratory" __maintainer__ = "Rob Hammond" -__email__ = "robert.hammond@nrel.gov" +__email__ = "rob.hammond@nrel.gov" import warnings from copy import deepcopy diff --git a/tests/phases/design/test_mooring_system_design.py b/tests/phases/design/test_mooring_system_design.py index 8265dbc1..7a2b87c0 100644 --- a/tests/phases/design/test_mooring_system_design.py +++ b/tests/phases/design/test_mooring_system_design.py @@ -10,10 +10,7 @@ import pytest -from ORBIT.phases.design import ( - MooringSystemDesign, - SemiTautMooringSystemDesign, -) +from ORBIT.phases.design import MooringSystemDesign base = { "site": {"depth": 200}, @@ -191,30 +188,3 @@ def test_custom_num_lines(): moor.run() assert moor.design_result["mooring_system"]["num_lines"] == 5 - - -def test_new_old_semitaut_mooring_system(): - """Temporary test until we delete the SemiTaut_mooring_system.""" - - config = deepcopy(base) - config["site"]["depth"] = 900.0 - config["mooring_system_design"]["mooring_type"] = "SemiTaut" - config["mooring_system_design"]["anchor_type"] = "Drag Embedment" - - old = SemiTautMooringSystemDesign(config) - old.run() - old_anchor_cost = old.anchor_cost.item() - old_line_cost = old.line_cost.item() - - new = MooringSystemDesign(config) - new.run() - - # same values - assert old.total_cost == new.total_cost - assert old_anchor_cost == new.anchor_cost - assert old.anchor_mass == new.anchor_mass - assert old_line_cost == new.line_cost - assert old.line_length == new.line_length - - # different values - assert len(old.detailed_output) != len(new.detailed_output) diff --git a/tests/phases/design/test_scour_protection_design.py b/tests/phases/design/test_scour_protection_design.py index 98c50731..88753a3c 100644 --- a/tests/phases/design/test_scour_protection_design.py +++ b/tests/phases/design/test_scour_protection_design.py @@ -3,7 +3,7 @@ __author__ = "Rob Hammond" __copyright__ = "Copyright 2020, National Renewable Energy Laboratory" __maintainer__ = "Rob Hammond" -__email__ = "robert.hammond@nrel.gov" +__email__ = "rob.hammond@nrel.gov" import pytest