Skip to content

Commit

Permalink
Merge pull request #169 from nRiccobo/relocate-get-costs
Browse files Browse the repository at this point in the history
Reorganizing common costs in design modules
  • Loading branch information
nRiccobo authored Aug 1, 2024
2 parents d13c270 + b7e513e commit 7b59430
Show file tree
Hide file tree
Showing 11 changed files with 499 additions and 313 deletions.
70 changes: 68 additions & 2 deletions ORBIT/core/defaults/common_costs.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,72 @@
# Material costs
monopile_steel_cost: 3000 # USD/t
tp_steel_cost: 3000 # USD/t
monopile_design:
monopile_steel_cost: 3000 # USD/t
tp_steel_cost: 3000 # USD/t

# Port properties
port_cost_per_month: 2e6 # USD/month

# Export system component cost rates
export_system_design:
cable_crossings:
crossing_unit_cost: 500000

# Spar component cost rates
spar_design:
stiffened_column_CR: 3120 # USD/t
tapered_column_CR: 4220 # USD/t
ballast_material_CR: 100 # USD/t
secondary_steel_CR: 7250 # USD/t

# Offshore substation component cost rates
substation_design:
mpt_cost_rate: 12500 # USD/MW
topside_fab_cost_rate: 14500 # USD/t
topside_design_cost: # USD
#oldHVAC: 4.5e6
HVAC: 107.3e6
HVDC-monopole: 294e6
HVDC-bipole: 476e6
shunt_cost_rate: 35000 # USD/MW
mpt_unit_cost: 2.87e6 # USD/mpt
shunt_unit_cost: 10000 # USD/cable
switchgear_cost: 4e6 # USD/cable
dc_breaker_cost: 10.5e6 # USD/cable
backup_gen_cost: 1e6 # USD
workspace_cost: 2e6 # USD
other_ancillary_cost: 3e6 # USD
topside_assembly_factor: 0.075 # %
converter_cost: # USD
HVAC: 0
HVDC-monopole: 127e6
HVDC-bipole: 296e6
oss_substructure_cost_rate: 3000 # USD/t
oss_pile_cost_rate: 0 # USD/t

# Onshore substation component cost rates
onshore_substation_design:
onshore_converter_cost: # USD
HVAC: 0
HVDC-monopole: 157e6
HVDC-bipole: 350e6
shunt_unit_cost: 13000 # USD/cable
switchgear_cost: 9.33e6 # USD/cable
compensation_rate: # USD/cable
HVAC: 31.3e6
HVDC-monopole: 0
HVDC-bipole: 0
onshore_construction_rate: # USD
HVAC: 5e6
HVDC-monopole: 87.3e6
HVDC-bipole: 100e6

# Semisubmersible component cost rates
semisubmersible_design:
stiffened_column_CR: 3120 # USD/t
truss_CR: 6250 # USD/t
heave_plate_CR: 6250 # USD/t
secondary_steel_CR: 7250 # USD/t

# Mooring system component cost rates
mooring_system_design: # USD/m
mooring_line_cost_rate: [399.0, 721.0, 1088.0]
29 changes: 29 additions & 0 deletions ORBIT/phases/design/design_phase.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from abc import abstractmethod

from ORBIT.phases import BasePhase
from ORBIT.core.defaults import common_costs


class DesignPhase(BasePhase):
Expand All @@ -31,3 +32,31 @@ def design_result(self):
"""

return {}

def get_default_cost(self, design_name, key, subkey=None):
"""Return the cost value for a key in a design
dictionary read from common_cost.yaml.
"""

if (design_dict := common_costs.get(design_name, None)) is None:
raise KeyError(f"No {design_name} in common_cost.yaml.")

if (cost_value := design_dict.get(key, None)) is None:
raise KeyError(f"{key} not found in [{design_name}] common_costs.")

if isinstance(cost_value, dict):
if subkey is None:
raise ValueError(
f"{key} is a dictionary and requires a 'subkey' input."
)

if (sub_cost_value := cost_value.get(subkey, None)) is None:
raise KeyError(
f"{subkey} not found in [{design_name}][{cost_value}]"
" common_costs."
)

return sub_cost_value

else:
return cost_value
Loading

0 comments on commit 7b59430

Please sign in to comment.