Base Model

Contents

Base Model#

Provides the CSMBase base model, which serves as the basis for all inputs and outputs that subsequent subclasses will use.

Please see the ../../docs/user_guide/new_models for creating new models to implement model-specific defaults while maintaining all input validation, metadata, and functionality from the base model.

Base Parameterization#

class csm.models.CSMBase(turbine_class=None, rated_power_kw=None, rotor_diameter=None, efficiency_max=None, num_bearings=None, num_blades=3, blade_has_carbon=None, blade_mass_coeff=None, blade_mass_cost_coeff=None, blade_mass=None, blade_cost=None, hub_mass_coeff=None, hub_mass_intercept=None, hub_mass_cost_coeff=None, hub_mass=None, hub_cost=None, max_tip_speed=None, rated_rpm=None, rotor_torque=None, pitch_bearing_mass_coeff=None, pitch_bearing_mass_intercept=None, bearing_housing_fraction=None, mass_sys_offset=None, pitch_system_mass_cost_coeff=None, pitch_system_mass=None, pitch_system_cost=None, spinner_mass_coeff=None, spinner_mass_intercept=None, spinner_mass_cost_coeff=None, spinner_mass=None, spinner_cost=None, lss_mass_coeff=None, lss_mass_intercept=None, lss_mass_exp=None, lss_mass_cost_coeff=None, low_speed_shaft_mass=None, low_speed_shaft_cost=None, bearing_mass_coeff=None, bearing_mass_exp=None, bearing_mass_cost_coeff=None, bearing_mass=None, bearing_cost=None, gearbox_torque_density=None, gearbox_torque_cost=None, gearbox_mass=None, gearbox_cost=None, brake_mass_coeff=None, brake_mass_cost_coeff=None, brake_mass=None, brake_cost=None, hss_mass_coeff=None, hss_mass_cost_coeff=None, high_speed_shaft_mass=None, high_speed_shaft_cost=None, generator_mass_coeff=None, generator_mass_intercept=None, generator_mass_cost_coeff=None, generator_mass=None, generator_cost=None, bedplate_mass_exp=None, bedplate_mass_cost_coeff=None, bedplate_mass=None, bedplate_cost=None, yaw_system_non_bearing_mass_coeff=None, yaw_system_mass_coeff=None, yaw_system_mass_exp=None, yaw_system_mass_cost_coeff=None, yaw_system_mass=None, yaw_system_cost=None, hvac_mass_coeff=None, hvac_mass_cost_coeff=None, hydraulic_cooling_mass=None, hydraulic_cooling_cost=None, nacelle_cover_mass_coeff=None, nacelle_cover_mass_intercept=None, nacelle_cover_mass_cost_coeff=None, nacelle_cover_mass=None, nacelle_cover_cost=None, has_crane=None, crane_mass=None, crane_cost=None, platform_mainframe_mass_coeff=None, platform_mainframe_mass_cost_coeff=None, platform_mainframe_mass=None, platform_mainframe_cost=None, transformer_mass_coeff=None, transformer_mass_intercept=None, transformer_mass_cost_coeff=None, transformer_mass=None, transformer_cost=None, controls_mass=None, controls_cost_coeff=None, controls_cost=None, electrical_connection_mass=None, electrical_connection_cost_coeff=None, electrical_connection_cost=None, converter_mass=None, converter_mass_cost_coeff=None, converter_cost=None, tower_mass_coeff=None, tower_length=None, tower_mass_exp=None, tower_mass_cost_coeff=None, tower_mass=None, tower_cost=None, nacelle_mass=None, nacelle_cost=None, hub_system_mass=None, hub_system_cost=None, rotor_mass=None, rotor_cost=None, turbine_mass=None, turbine_cost=None, turbine_cost_kw=None, blade_transport_cost=None, hub_transport_cost=None, power_electronics_transport_cost=None, drivetrain_transport_cost=None, tower_section_mass_max=80000, num_tower_sections=None, tower_transport_cost=None, parts_transport_cost=None, transport_cost=None, turbine_production_cost=1000.0, tower_flange_material_cost=1000.0, tower_flange_production_cost=1000.0)#

Base cost and scaling model that defines universally required inputs and calculations.

Parameters:
classmethod from_dict(data, *, partial=False)#

Creates a new instance from a dictionary with simplified and intuitive error messages for extraneous and missing attributes.

Parameters:
  • data (dict) -- The data dictionary to be mapped.

  • partial (bool, optional) -- If True, don't raise errors for an incomplete definition of the model. Defaults to False.

Returns:-

CSMBase: An instance of CSMBase or one of its subclasses.

reset_values(*args)#

Resets the values for any provided args to the model default.

Raises:

KeyError -- Raised if any of args are not a class attribute

Parameters:

args (str)

Return type:

None

update(data)#

Update the value of one or multiple model parameters.

Parameters:

data (dict[str, Any]) -- Dictionary of an attribute and its new value.

Raises:

Attribute -- Raised if any of args are not a class attribute

calculate_subsystem_transport_cost()#

Runs all the transport cost calculations for the separately transported components.

classmethod get_required_inputs(*, include_units=False)#

Get a list of the inputs required for a user to provide for a user to run run().

Parameters:

include_units (bool, optional) -- Include the attribute's units, if True, othewsie only their names. Defaults to False.

Returns:

list[str] | list[tuple[str, str]] --

List of attribute names a user is required to provide

to fully define a model, or list of tuples containing the attribute name and their units.

Return type:

list[str] | list[tuple[str, str]]

Running the model#

CSMBase.calculate(*args)#

Generic method for calculating individual parameters that have an available method in the form of calculate_parameter such as calculate_blade_mass.

Parameters:

args (str) -- The name(s) of parameters to calculate. Each parameter provided must match the format of calculate_parameter such as calculate_blade_mass. Parameters will be converted to lower case with spaces replaced by underscores, i.e., "Blade Mass" converts to "blade_mass".

Raises:

ValueError -- Raised if no calculation is found for the parameter.

CSMBase.run()#

Run the mass and cost calculations.

classmethod CSMBase.parameterize(base_kwargs, parameterized_kwargs, results=None)#

Run a design loop using a set of control and independent variables as a product of all possible parameterized values.

Parameters:
  • base_kwargs (dict[str, int | float | bool]) -- Dictionary of control variables.

  • parameterized_kwargs (dict[str, int | float | bool]) --

    Dictionary of independent variables with an iterable value consisting of an explicit set of values or range of values generated by np.linspace. For both cases, the first value must be one of "inputs" or "range". Subsequent values should specified according to the case:

    • "inputs": all subsequent values will be used as inputs, e.g., {"tower_length": ("inputs", 90, 100)} will run 2 iterations, one with a 90m tower length and one with a 100 meter tower length.

    • "range": subsequent values must be start, stop, num where stop is inclusive,

      e.g., {"efficiency_max": ("range", 0.8, 1.0, 5)} will run 5 iterations of the model varying efficiency_max with values 0.8, 0.85, 0.9, 0.95, and 1.0.

  • results (str | list[str] | None, optional) -- A specific list of model results to capture. If None, then get_all_results() will be used. Defaults to None.

Raises:
  • ValueError -- Raised if any of the keys of parameterized_kwargs are not defined as a "range" or "inputs" style variable.

  • ValueError -- Raised if fewer than 2 inputs are able to be generated by the parameterization type.

Returns:

pd.DataFrame --

DataFrame with a pandas.MultiIndex column set of all parameterized

values and with an index of the results names.

classmethod CSMBase.parameterize_subset(base_kwargs, parameterized_kwargs, results=None)#

Run a design loop using a set of control and independent variables as a product of all possible parameterized values. Similar to parameterize() with the exception that only the names of the metrics provided in results will be calculated to allow for partial definitions.

Note

Users are responsible for providing the required inputs to calculate any of the metrics provided in results.

Parameters:
  • base_kwargs (dict[str, int | float | bool]) -- Dictionary of control variables.

  • parameterized_kwargs (dict[str, int | float | bool]) --

    Dictionary of independent variables with an iterable value consisting of an explicit set of values or range of values generated by np.linspace. For both cases, the first value must be one of "inputs" or "range". Subsequent values should specified according to the case:

    • "inputs": all subsequent values will be used as inputs, e.g., {"tower_length": ("inputs", 90, 100)} will run 2 iterations, one with a 90m tower length and one with a 100 meter tower length.

    • "range": subsequent values must be start, stop, num where stop is inclusive,

      e.g., {"efficiency_max": ("range", 0.8, 1.0, 5)} will run 5 iterations of the model varying efficiency_max with values 0.8, 0.85, 0.9, 0.95, and 1.0.

  • results (str | list[str] | None, optional) -- A specific list of model results to capture. If None, then get_all_results() will be used. Defaults to None.

Raises:
  • ValueError -- Raised if any of the keys of parameterized_kwargs are not defined as a "range" or "inputs" style variable.

  • ValueError -- Raised if fewer than 2 inputs are able to be generated by the parameterization type.

Returns:

pd.DataFrame --

DataFrame with a pandas.MultiIndex column set of all parameterized

values and with an index of the results names.

Getting Results#

CSMBase.get_component_breakdown()#

Create a Pandas DataFrame of all component mass and cost data.

Return type:

DataFrame

CSMBase.get_results(names)#

Retrieves a user-specified sequence of results, or single result. None will be returned for any non-matching attribute name.

Parameters:

names (str | Sequence[str]) -- The name(s) of the attributes to get values for.

Returns:

dict[str, bool | int | float | None] --

Dictionary with names as keys and their

respective values as values.

Return type:

dict[str, bool | int | float | None]

CSMBase.get_all_results()#

Gathers the core results.

Return type:

dict[str, float]

CSMBase.get_mass_results()#

Gathers all the mass-specific outputs into a dictionary of attribute: value.

Return type:

dict[str, float]

CSMBase.get_cost_results()#

Gathers all the cost-specific outputs into a dictionary of attribute: value.

Return type:

dict[str, float]

CSMBase.get_transport_results()#

Gathers all the cost-specific outputs into a dictionary of attribute: value.

Return type:

dict[str, float]

CSMBase.irs_mpc_breakdown(turbine_production_cost, tower_flange_production_cost, tower_flange_material_cost=None, *, with_category=False)#

Calculates the base cost breakdown for the United States IRS manufactured product component tables.

Component mapping is as follows:

  • Wind turbine

    • Blades: model-calculated num_blades * blade_cost (all blades, not just one). See calculate_blade_cost() for complete details.

    • Rotor Hub: model-calculated hub_system_cost (hub, pitch system, and spinner). See calculate_hub_system_cost() for complete details.

    • Nacelle: model-calculated nacelle_cost minus converter_cost (every nacelle component except the power converter, which is its own line below). See calculate_nacelle_cost() for complete details.

    • Power Converter: model-calculated converter_cost. See calculate_converter_cost() for complete details.

    • Production: user-provided turbine_production_cost

  • Wind Tower Flanges

    • Material: user-provided tower_flange_material_cost

    • Production: user-provided tower_flange_production_cost

  • Tower: not counted steel or iron product

  • Steel or iron productions in foundation: not counted steel or iron product

Parameters:
  • turbine_production_cost (float) -- Costs associated with production (i.e., not materials) of the wind turbine.

  • tower_flange_production_cost (float) -- The production cost for the tower flange.

  • tower_flange_material_cost (float) -- The materials cost for the tower flange. If None, the 6% of tower_cost will be applied. Defaults to None.

  • (bool (with_category) -- If True, return the DataFrame with the category column intact, otherwise drop the column to produce an IRS-ready output. Defaults to False.

  • optional -- If True, return the DataFrame with the category column intact, otherwise drop the column to produce an IRS-ready output. Defaults to False.

  • with_category (bool)

Returns:

pd.DataFrame --

Data Frame with indices for the APCs and MPCs, and columns for the

mapping category (if with_category), "cost" (total USD), and "Value" (component cost / total cost * 100).

Return type:

DataFrame

CSMBase.total_domestic_content(turbine_production_cost, tower_flange_material_cost, tower_flange_production_cost, domestic, *, return_table=False)#

Calculates the total, valid domestic content production percentage based on the domestic or allowed-foreign entity produced components provided in domestic that align with irs_mpc_breakdown().

Note

MPC domestic content only counts towards the domestic content production percentage if all of the MPCs in an APC have been domestically produced. See IRS notices 2023-38 and 2026-15 for complete details prior to calculation of the final proportion.

Parameters:
  • turbine_production_cost (float) -- Costs associated with production (i.e., not materials) of the wind turbine.

  • tower_flange_material_cost (float) -- The materials cost for the tower flange.

  • tower_flange_production_cost (float) -- The production cost for the tower flange.

  • domestic (list[str]) -- List of the components aligning with the category column of irs_mpc_breakdown().

  • return_table (bool, optional) -- If True, return the DataFrame from irs_mpc_breakdown() with the additional column Domestic that shows the total domestic content percentage the counts for the IRS domestic content production calculation. Defaults to False.

Return type:

float | DataFrame

Returns:-
float | pd.DataFrame: Returns the total valid domestic content as a percent, or the

DataFrame breakdown by category.

Model Helpers#

property CSMBase.rated_power_mw: float#

Converts rated_power_kw to MW.

property CSMBase.rotor_radius: float#

Calculates the rotor radius as rotor_diameter / 2.

property CSMBase.swept_area: float#

Calculates the rotor swept area as \(\pi * rotor\_radius ^ 2\).

Dependent Variable Tracking#

classmethod CSMBase._get_attr_map(*, both_as_separate=False, include_units=False)#

Creates an dictionary attribute mapping of model attribute name to either default value or a dictionary of default value and units (when include_units is True). Use of False for both_as_separate and True for include_units are geared towards WISDEM use cases.

Parameters:
  • both_as_separate (bool, optional) -- Model attributes marked as "both" in their attribute metadata io field will be included in the "both" key. If False, the attribute and its value(s) will be include in both the "inputs" and "outputs" values. Defaults to False.

  • include_units (bool, optional) -- Include the attribute's units in the attribute's values or just the default value (False). Defaults to False.

Returns:

dict[str, Any] --

Dictionary of "inputs", "outputs", and optionally "both (when

both_as_separate is True). Each of the corresponding dictionaries will have keys of model attribute name and values of either the default value or a dictionary of "default" and "units" with their respective values.

Return type:

dict[str, Any]

CSMBase.output_names: tuple[str]#
CSMBase.get_dependent_attributes(name)#

Returns a set of model attributes that depend on the value of name.

Parameters:

name (str) -- The name of a model attribute that a user inputs or can be calculated.

Returns:

set[str] -- Set of model attribute names that rely on the value of name.

Return type:

set[str]

CSMBase.get_descendant_attributes(name)#

Returns a set of model attributes name requires.

Parameters:

name (str) -- The name of a model attribute that a user inputs or can be calculated.

Returns:

set[str] -- Set of model attribute names that name relies on.

Return type:

set[str]

Data Checking#

CSMBase._has_values(*args)#

Checks if the user provided values for a given arg (True), or if they are model defaults (False).

Yields:

Generator[bool] --

Booleans indicating valid values have been implemented or provided

by the user (True) or if the base class defaults are present (False).

Parameters:

args (str)

Return type:

Generator[bool]

CSMBase._validate_inputs(parameters)#

Validates if the required parameters to calculate an attribute's value have been populated by a subclass or provided by the user. For model outputs don't have provided or calculated values, the calculate_xx method will be run.

Parameters:

parameters (list[str]) -- List of class attributes to check for valid inputs.

Raises:
  • ValueError -- Raised if any of the required parameters have not been

  • provided by the user or a subclass. --

Return type:

None

CSMBase._prepare_calculation(method)#

Checks the existence of the attribute(s) a method will set, and returns True if it exists already, or False if it still needs to be calculated. When False, the dependent parameters from parameter_map have valid inputs.

Parameters:

method (str) -- Name of the attribute the method is setting.

Returns:

bool --

True if the method can be returned early, or False if method still

needs to be calculated.

Return type:

bool

Subclassing#

CSMBase.fields: tuple[Attribute]#
CSMBase.fields_dict: dict[str, Attribute]#

Cost and Mass Calculations#

Rotor#

CSMBase.calculate_blade_mass()#

Calculates and sets blade_mass if it was not provided by the user.

\[k * diameter^b\]

where:

  • \(k =\) blade_mass_coeff

  • \(diameter =\) rotor_diameter / 2

  • \(b =\) - 2.47 if turbine_class is 1 and blade_has_carbon is True - 2.54 if turbine_class is 1 and blade_has_carbon is False - 2.44 if turbine_class > 1 and blade_has_carbon is True - 2.5 if turbine_class > 1 and blade_has_carbon is False - 2.5 if turbine_class < 1

Parameters:
  • blade_mass_coeff (float) -- \(k\) in the mass equation above.

  • rotor_diameter (float) -- Diameter of the swept area of the turbine blades.

  • turbine_class (int) -- Turbine classification; use 1 for IEC Wind-Class I, 2 fo IEC Wind-Class II or III.

  • blade_has_carbon (bool) -- Use True if the blade has carbon, False if not.

Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_blade_cost()#

Calculates and sets blade_cost if it was not provided by the user.

\[k * m\]

where:

  • \(k =\) blade_mass_cost_coeff (\(USD/kg\))

  • \(m =\) blade_mass

Parameters:
  • blade_mass_cost_coeff (float) -- Blade cost per kilogram (\(USD/kg\)).

  • blade_mass (float) -- Blade mass (\(kg\)).

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

Hub System#

CSMBase.calculate_hub_mass()#

Calculates and sets hub_mass if it was not provided by the user.

\[k * m_{blade} + b\]

where:

  • \(k =\) hub_mass_coeff

  • \(m_{blade} =\) blade_mass

  • \(b =\) hub_mass_intercept

Parameters:
  • hub_mass_coeff (float) -- \(k\) in the mass equation above.

  • blade_mass (float) -- Blade mass (\(kg\)). See calculate_blade_mass() for details.

  • hub_mass_intercept (bool) -- \(b\) in the mass equation above.

Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_hub_cost()#

Calculates and sets hub_cost if it was not provided by the user.

\[k * m\]

where:

  • \(k =\) hub_mass_cost_coeff (\(USD/kg\))

  • \(m =\) hub_mass (\(kg\)).

Parameters:
  • hub_mass_cost_coeff (float) -- Hub cost per kilogram (\(USD/kg\)).

  • hub_mass (float) -- Hub mass (\(kg\)). See calculate_hub_mass() for more details.

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

CSMBase.calculate_pitch_system_mass()#

Calculates and sets pitch_system_mass if it was not provided by the user.

First, the pitch bearing mass is calculated as \(m_{bearing} = k*m_{blade}*N_{blades} + b1\). Then the total pitch system mass, including with bearing housing is calculated as \(mass = (1+h)*m_{bearing} + b2\). The values of the constants were NOT updated in 2015 and are the same as the original CSM.

where:

  • \(k =\) pitch_bearing_mass_coeff

  • \(m_{blade} =\) blade_mass

  • \(N_{blades} =\) num_blades

  • \(b1 =\) pitch_bearing_mass_intercept

  • \(h =\) bearing_housing_fraction

  • \(b2 =\) mass_sys_offset

Parameters:
  • num_blades (int, optional) -- Number of turbine blades. Defaults to 3.

  • pitch_bearing_mass_coeff (float) -- \(k\) in the pitch bearing mass equation.

  • blade_mass (float) -- Blade mass (\(kg\)). See calculate_blade_mass() for details.

  • pitch_bearing_mass_intercept (float) -- \(b1\) in the pitch bearing mass equation.

  • bearing_housing_fraction (float) -- Mass of the housing for the bearing as a fraction of the bearing mass. \(h\) in the pitch system mass equation.

  • mass_sys_offset (float) -- \(b2\) in the pitch system mass equation.

Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_pitch_system_cost()#

Calculates and sets pitch_system_cost if it was not provided by the user.

\[k * m\]

where:

  • \(k =\) pitch_system_mass_cost_coeff (\(USD/kg\))

  • \(m =\) pitch_system_mass (\(kg\)).

Parameters:
  • pitch_system_mass_cost_coeff (float) -- Pitch system cost per kilogram (\(USD/kg\)).

  • pitch_system_mass (float) -- Pitch system mass (\(kg\)). See calculate_pitch_system_mass() for more details.

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

CSMBase.calculate_spinner_mass()#

Calculates and sets spinner_mass (nose cone mass) if it was not provided by the user.

\[k * rotor\_diameter + b\]

where:

  • \(k =\) spinner_mass_coeff

  • \(rotor_diameter =\) rotor_diameter

  • \(b =\) spinner_mass_intercept

Parameters:
  • spinner_mass_coeff (float) -- \(k\) in the mass equation above.

  • rotor_diameter (float) -- Turbine rotor diameter (\(m\)).

  • spinner_mass_intercept (bool) -- \(b\) in the mass equation above.

Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_spinner_cost()#

Calculates and sets spinner_cost (nose cone cost) if it was not provided by the user.

\[k * m\]

where:

  • \(k =\) spinner_mass_cost_coeff (\(USD/kg\))

  • \(m =\) spinner_mass (\(kg\)).

Parameters:
  • spinner_mass_cost_coeff (float) -- Spinner cost per kilogram (\(USD/kg\)).

  • spinner_mass (float) -- Spinner mass (\(kg\)). See calculate_spinner_mass() for more details.

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

Nacelle#

CSMBase.calculate_low_speed_shaft_mass()#

Calculates and sets low_speed_shaft_mass if it was not provided by the user.

\(m_{lss} = k*(m_{blade}*power)^{b_1} + b_2\).

where:

  • \(k =\) lss_mass_coeff

  • \(power =\) rated_power_kw / 1000

  • \(m_{blade} =\) blade_mass

  • \(b_1 =\) lss_mass_exp

  • \(b_2 =\) lss_mass_intercept

Parameters:
  • rated_power_kw (int, optional) -- Turbine nameplate capacity, (\(kW\)).

  • blade_mass (float) -- Blade mass (\(kg\)). See calculate_blade_mass() for details.

  • lss_mass_coeff (float) -- \(k\) in the low speed shaft mass equation.

  • lss_mass_exp (float) -- \(b1\) in the low speed shaft mass equation.

  • lss_mass_intercept (float) -- \(b2\) in the low speed shaft mass equation.

Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_low_speed_shaft_cost()#

Calculates and sets low_speed_shaft_cost if it was not provided by the user.

\[k * m\]

where:

  • \(k =\) lss_mass_cost_coeff (\(USD/kg\))

  • \(m =\) low_speed_shaft_mass (\(kg\)).

Parameters:
  • lss_mass_cost_coeff (float) -- Low speed shaft cost per kilogram (\(USD/kg\)).

  • low_speed_shaft_mass (float) -- Low speed shaft mass (\(kg\)). See calculate_low_speed_shaft_mass() for more details.

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

CSMBase.calculate_bearing_mass()#

Calculates and sets bearing_mass for the main bearing if it was not provided by the user.

\[k*rotor\_diameter^b\]

where:

  • \(k =\) bearing_mass_coeff

  • \(rotor\_diameter =\) rotor_diameter

  • \(b =\) bearing_mass_exp

Parameters:
  • rotor_diameter (float) -- Turbine rotor diameter (\(m\)).

  • bearing_mass_coeff (float) -- \(k\) in the mass equation above.

  • bearing_mass_exp (bool) -- \(b\) in the mass equation above.

Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_bearing_cost()#

Calculates and sets bearing_cost (nose cone cost) if it was not provided by the user.

\[k * m\]

where:

  • \(k =\) bearing_mass_cost_coeff (\(USD/kg\))

  • \(m =\) bearing_mass (\(kg\)).

Parameters:
  • bearing_mass_cost_coeff (float) -- Main bearing cost per kilogram (\(USD/kg\)).

  • bearing_mass (float) -- Main bearing mass (\(kg\)). See calculate_bearing_mass() for more details.

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

CSMBase.calculate_rotor_torque()#

Calculates and sets rated_rpm and rotor_torque (\(\tau\)) if they were not provided by the user.

\[\begin{split}power_{hub} = power_{turbine} / efficiency \\ v_{rotor} = v_{tip} / r \\ rated\_rpm = v_{rotor} / (2\pi) * 60.0 \\ \tau = power_{hub} / v_{rotor} \\\end{split}\]

where:

  • \(power_{turbine} =\) rated_power_kw (\(kW\))

  • \(efficiency =\) efficiency_max as a decimal.

  • \(r =\) rotor_diameter / 2 (\(m\))

  • \(v_tip =\) max_tip_speed (\(m/s\))

Parameters:
  • rotor_diameter (float) -- Turbine rotor diameter (\(m\)).

  • rated_power_kw (float) -- Turbine rated power (\(kW\)).

  • efficiency_max (float) -- Maximum possible drivetrain efficiency.

  • max_tip_speed (float) -- Maximum allowable blade tip speed (\(m/s\)).

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

CSMBase.calculate_gearbox_mass()#

Calculates and sets gearbox_mass for the gearbox if it was not provided by the user.

\[\tau * 1000 / b\]

where:

  • \(\tau =\) rotor_torque

  • \(b =\) gearbox_torque_density

Parameters:
  • rotor_torque (float) -- Turbine rotor torque at rated power (\(kNm\)).

  • gearbox_torque_density (float) -- \(k\) in the mass equation above (\(N*m/kg\)).

Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_gearbox_cost()#

Calculates and sets gearbox_cost if it was not provided by the user.

\[k * m_{gearbox} \rho_{\tau} * c_{\tau} / 1000\]

where:

  • \(k =\) gearbox_mass_cost_coeff (\(USD/kg\))

  • \(m =\) gearbox_mass (\(kg\)).

  • \(\rho_{|tau} =\) gearbox_torque_density (\(Nm/kg\)).

  • \(c_{|tau} =\) gearbox_torque_cost (\(USD/kN/m\)).

Parameters:
  • gearbox_mass (float) -- Main bearing mass (\(kg\)). See calculate_gearbox_mass() for more details.

  • gearbox_torque_density (float) -- \(k\) in the mass equation above (\(Nm/kg\)).

  • gearbox_torque_cost (float) -- Gearbox cost per \(Nm\) (\(USD/kNm\)).

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

CSMBase.calculate_brake_mass()#

Calculates and sets brake_mass for if it was not provided by the user.

\[k * \tau\]

where:

  • \(\tau =\) rotor_torque

  • \(k =\) brake_mass_coeff

Parameters:
  • rotor_torque (float) -- Turbine rotor torque at rated power (\(kNm\)).

  • brake_mass_coeff (float) -- Mass scaling coefficient, \(k\) in the mass equation.

Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_brake_cost()#

Calculates and sets brake_cost if it was not provided by the user.

\[k * m_{brake}\]

where:

  • \(k =\) brake_mass_cost_coeff (\(USD/kg\))

  • \(m =\) brake_mass (\(kg\)).

Parameters:
  • brake_mass (float) -- Brake mass (\(kg\)). See calculate_brake_mass() for more details.

  • brake_mass_cost_coeff (float) -- Brake cost, per kilogram of mass, \(k\) in the equation above (\(USD/kg\)).

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

CSMBase.calculate_high_speed_shaft_mass()#

Calculates and sets high_speed_shaft_mass for if it was not provided by the user.

\[k * power\]

where:

  • \(power =\) rated_power_kw

  • \(k =\) hss_mass_coeff

Parameters:
  • rated_power_kw (float) -- Turbine nameplate capacity (rated power) (\(kW\)).

  • hss_mass_coeff (float) -- Mass scaling coefficient, \(k\) in the mass equation.

Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_high_speed_shaft_cost()#

Calculates and sets high_speed_shaft_cost if it was not provided by the user.

\[k * m_{high\_speed\_shaft}\]

where:

  • \(k =\) hss_mass_cost_coeff (\(USD/kg\))

  • \(m =\) high_speed_shaft_mass (\(kg\)).

Parameters:
  • high_speed_shaft_mass (float) -- High speed shaft mass (\(kg\)). See calculate_high_speed_shaft_mass() for more details.

  • hss_mass_cost_coeff (float) -- High speed shaft cost, per kilogram of mass, \(k\) in the equation above (\(USD/kg\)).

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

CSMBase.calculate_generator_mass()#

Calculates and sets generator_mass if it was not provided by the user.

\[k * power + b\]

where:

  • \(k =\) generator_mass_coeff

  • \(power =\) rated_power_kw

  • \(b =\) generator_mass_intercept

Parameters:
  • generator_mass_coeff (float) -- \(k\) in the mass equation above (\(kg/kW\)).

  • rated_power_kw (float) -- Turbine nameplate capacity (rated power) (\(kW\)).

  • generator_mass_intercept (bool) -- \(b\) in the mass equation above (\(kg\)).

Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_generator_cost()#

Calculates and sets generator_cost if it was not provided by the user.

\[k * m\]

where:

  • \(k =\) generator_mass_cost_coeff (\(USD/kg\))

  • \(m =\) generator_mass (\(kg\)).

Parameters:
  • generator_mass_cost_coeff (float) -- generator cost per kilogram (\(USD/kg\)).

  • generator_mass (float) -- generator mass (\(kg\)). See calculate_generator_mass() for more details.

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

CSMBase.calculate_bedplate_mass()#

Calculates and sets bedplate_mass if it was not provided by the user.

\[rotor\_diameter ^ b\]

where:

  • \(rotor\_diameter =\) rotor_diameter

  • \(b =\) bedplate_mass_exp

Parameters:
  • rotor_diameter (float) -- Turbine rotor diameter (\(m\)).

  • bedplate_mass_exp (bool) -- \(b\) in the mass equation above.

Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_bedplate_cost()#

Calculates and sets bedplate_cost if it was not provided by the user.

\[k * m\]

where:

  • \(k =\) bedplate_mass_cost_coeff (\(USD/kg\))

  • \(m =\) bedplate_mass (\(kg\)).

Parameters:
  • bedplate_mass_cost_coeff (float) -- bedplate cost per kilogram (\(USD/kg\)).

  • bedplate_mass (float) -- bedplate mass (\(kg\)). See calculate_bedplate_mass() for more details.

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

CSMBase.calculate_yaw_system_mass()#

Calculates and sets yaw_system_mass if it was not provided by the user.

\[k_1 * (k_2 * rotor\_diameter ^ b)\]

where:

  • \(k_1 =\) yaw_system_non_bearing_mass_coeff

  • \(k_2 =\) yaw_system_mass_coeff

  • \(rotor\_diameter =\) rotor_diameter

  • \(b =\) yaw_system_mass_exp

Parameters:
  • yaw_system_non_bearing_mass_coeff (float) -- \(k_1\) in the mass equation above to account for non-bearing mass.

  • yaw_system_mass_coeff (float) -- \(k_2\) in the mass equation above (\(kg/kW\)).

  • rotor_diameter (float) -- Turbine rotor diameter (\(m\)).

  • yaw_system_mass_exp (bool) -- \(b\) in the mass equation above (\(kg\)).

Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_yaw_system_cost()#

Calculates and sets yaw_system_cost if it was not provided by the user.

\[k * m\]

where:

  • \(k =\) yaw_system_mass_cost_coeff (\(USD/kg\))

  • \(m =\) yaw_system_mass (\(kg\)).

Parameters:
  • yaw_system_mass_cost_coeff (float) -- Yaw system cost per kilogram (\(USD/kg\)).

  • yaw_system_mass (float) -- Yaw system mass (\(kg\)). See calculate_yaw_system_mass() for more details.

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

CSMBase.calculate_hydraulic_cooling_mass()#

Calculates and sets hydraulic_cooling_mass for if it was not provided by the user.

\[k * power\]

where:

  • \(power =\) rated_power_kw

  • \(k =\) hvac_mass_coeff

Parameters:
  • rated_power_kw (float) -- Turbine nameplate capacity (rated power) (\(kW\)).

  • hvac_mass_coeff (float) -- Mass scaling coefficient, \(k\) in the mass equation.

Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_hydraulic_cooling_cost()#

Calculates and sets hydraulic_cooling_cost if it was not provided by the user.

\[k * m_{hydraulic\_cooling}\]

where:

  • \(k =\) hvac_mass_cost_coeff (\(USD/kg\))

  • \(m_{hydraulic\_cooling} =\) hydraulic_cooling_mass (\(kg\)).

Parameters:
  • hydraulic_cooling_mass (float) -- Hydraulic cooling mass (\(kg\)). See calculate_hydraulic_cooling_mass() for more details.

  • hvac_mass_cost_coeff (float) -- Hydraulic cooling cost, per kilogram of mass, \(k\) in the equation above (\(USD/kg\)).

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

CSMBase.calculate_nacelle_cover_mass()#

Calculates and sets nacelle_cover_mass if it was not provided by the user.

\[k * power + b\]

where:

  • \(k =\) nacelle_cover_mass_coeff

  • \(power =\) rated_power_kw

  • \(b =\) nacelle_cover_mass_intercept

Parameters:
  • nacelle_cover_mass_coeff (float) -- \(k\) in the mass equation above (\(kg/kW\)).

  • rated_power_kw (float) -- Turbine nameplate capacity (rated power) (\(kW\)).

  • nacelle_cover_mass_intercept (bool) -- \(b\) in the mass equation above (\(kg\)).

Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_nacelle_cover_cost()#

Calculates and sets nacelle_cover_cost if it was not provided by the user.

\[k * m\]

where:

  • \(k =\) nacelle_cover_mass_cost_coeff (\(USD/kg\))

  • \(m =\) nacelle_cover_mass (\(kg\)).

Parameters:
  • nacelle_cover_mass_cost_coeff (float) -- Nacelle cover cost per kilogram (\(USD/kg\)).

  • nacelle_cover_mass (float) -- Nacelle cover mass (\(kg\)). See calculate_nacelle_cover_mass() for more details.

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

CSMBase.calculate_platform_mainframe_mass()#

Calculates and sets platform_mainframe_mass if it was not provided by the user.

\[k * m_{bedplate} + m_{crane} * has\_crane\]

where:

  • \(k =\) platform_mainframe_mass_coeff

  • \(m_{bedplate} =\) bedplate_mass

  • \(m_{crane} =\) crane_mass

  • \(has\_crane =\) has_crane

Parameters:
  • has_crane (bool) -- If True, apply crane_mass, otherwise ignore.

  • platform_mainframe_mass_coeff (float) -- \(k\) in the mass equation above.

  • bedplate_mass (float) -- Bedplate mass (\(kg\)). See calculate_bedplate_mass() for details.

  • crane_mass (bool) -- Mass of onboard crane, if has_crane, \(b\) in the mass equation above.

Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_platform_mainframe_cost()#

Calculates and sets platform_mainframe_cost if it was not provided by the user.

\[k * (m_{platform\_mainframe} - m_{crane} * has\_crane) + c_{crane} * has\_crane\]

where:

  • \(k =\) platform_mainframe_mass_cost_coeff (\(USD/kg\))

  • \(m =\) platform_mainframe_mass (\(kg\)).

  • \(m_{crane} =\) crane_mass

  • \(has\_crane =\) has_crane

  • \(c_{crane} =\) crane_cost

Parameters:
  • has_crane (bool) -- If True, apply crane_cost, otherwise ignore.

  • crane_cost (bool) -- Cost of onboard crane, if has_crane, \(b\) in the mass equation above.

  • platform_mainframe_mass_cost_coeff (float) -- Platform mainframe cost per kilogram (\(USD/kg\)).

  • platform_mainframe_mass (float) -- Platform mainframe mass (\(kg\)). See calculate_platform_mainframe_mass() for more details.

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

CSMBase.calculate_transformer_mass()#

Calculates and sets transformer_mass if it was not provided by the user.

\[k * power + b\]

where:

  • \(k =\) transformer_mass_coeff

  • \(power =\) rated_power_kw

  • \(b =\) transformer_mass_intercept

Parameters:
  • transformer_mass_coeff (float) -- \(k\) in the mass equation above (\(kg/kW\)).

  • rated_power_kw (float) -- Turbine nameplate capacity (rated power) (\(kW\)).

  • transformer_mass_intercept (bool) -- \(b\) in the mass equation above (\(kg\)).

Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_transformer_cost()#

Calculates and sets transformer_cost if it was not provided by the user.

\[k * m\]

where:

  • \(k =\) transformer_mass_cost_coeff (\(USD/kg\))

  • \(m =\) transformer_mass (\(kg\)).

Parameters:
  • transformer_mass_cost_coeff (float) -- Transformer cost per kilogram (\(USD/kg\)).

  • transformer_mass (float) -- Transformer mass (\(kg\)). See calculate_transformer_mass() for more details.

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

CSMBase.calculate_controls_mass()#

Calculates and sets the controls_mass if it was not provided by the user.

Currently sets the value to 0 as there is no base relationship.

CSMBase.calculate_controls_cost()#

Calculates and sets controls_cost if it was not provided by the user.

\[k * power\]

where:

  • \(k =\) controls_cost_coeff (\(USD/kW\))

  • \(power =\) rated_power (\(kW\)).

Parameters:
  • controls_cost_coeff (float) -- Controls cost per kW of capacity (\(USD/kW\)).

  • rated_power_kw (float) -- Turbine nameplate capacity (rated power) (\(kW\)).

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

CSMBase.calculate_electrical_connection_mass()#

Calculates and sets the electrical_connection_mass if it was not provided by the user.

Currently sets the value to 0 as there is no base relationship.

CSMBase.calculate_electrical_connection_cost()#

Calculates and sets electrical_connection_cost if it was not provided by the user.

\[k * power\]

where:

  • \(k =\) electrical_connection_cost_coeff (\(USD/kW\))

  • \(power =\) rated_power (\(kW\)).

Parameters:
  • electrical_connection_cost_coeff (float) -- Electrical connection cost per kW of capacity (\(USD/kW\)).

  • rated_power_kw (float) -- Turbine nameplate capacity (rated power) (\(kW\)).

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

CSMBase.calculate_converter_mass()#

Calculates and sets the converter_mass if it was not provided by the user.

Currently sets the value to 0 as there is no base relationship.

CSMBase.calculate_converter_cost()#

Calculates and sets converter_cost if it was not provided by the user.

\[k * m\]

where:

  • \(k =\) converter_mass_cost_coeff (\(USD/kg\))

  • \(m =\) converter_mass (\(kg\)).

Parameters:
  • converter_mass_cost_coeff (float) -- Power converter cost per kilogram (\(USD/kg\)).

  • converter_mass (float) -- Power converter mass (\(kg\)). See calculate_converter_mass() for more details.

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

Tower#

CSMBase.calculate_tower_mass()#

Calculates and sets tower_mass if it was not provided by the user.

\[k * (H_{hub})^b\]

where:

  • \(k =\) tower_mass_coeff

  • \(H_{hub} =\) tower_length

  • \(b =\) tower_mass_exp

Parameters:
  • tower_mass_coeff (float) -- \(k\) in the mass equation above (\(kg/m\)).

  • tower_length (float) -- For onshore turbines, this is the hub height (total length above ground). For offshore turbines, this is length from transition piece to hub height (\(m\)).

  • tower_mass_exp (bool) -- \(b\) in the mass equation above (\(kg\)).

Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_tower_cost()#

Calculates and sets tower_cost if it was not provided by the user.

\[k * m\]

where:

  • \(k =\) tower_mass_cost_coeff (\(USD/kg\))

  • \(m =\) tower_mass (\(kg\)).

Parameters:
  • tower_mass_cost_coeff (float) -- Tower cost per kilogram (\(USD/kg\)).

  • tower_mass (float) -- Tower mass (\(kg\)). See calculate_tower_mass() for more details.

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

Subsystem Aggregations#

CSMBase.calculate_subsystem_mass()#

Runs all the mass calculations for the non-aggregated turbine subsytems.

CSMBase.calculate_subsystem_cost()#

Runs all the cost calculations for the non-aggregated turbine subsystems.

CSMBase.calculate_system_mass()#

Calculates the mass for all aggregate turbine systems.

CSMBase.calculate_system_cost()#

Calculates the cost for all aggregate turbine systems.

CSMBase.calculate_nacelle_mass()#

Calculates and sets nacelle_mass (\(kg\)) if it was not provided by the user.

Sum of all above-tower components, excluding the blades (calculate_rotor_mass()) and hub (calculate_hub_system_mass()):

  • low_speed_shaft_mass

  • bearing_mass * num_bearings

  • gearbox_mass

  • brake_mass

  • high_speed_shaft_mass

  • generator_mass

  • bedplate_mass

  • yaw_system_mass

  • hydraulic_cooling_mass

  • nacelle_cover_mass

  • platform_mainframe_mass

  • transformer_mass

  • controls_mass

  • converter_mass

  • electrical_connection_mass

Parameters:
Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_nacelle_cost()#

Calculates and sets nacelle_cost (\(USD\)) if it was not provided by the user.

Sum of all above-tower components, excluding the blades (calculate_rotor_cost()) and hub (calculate_hub_system_cost()):

  • low_speed_shaft_cost

  • bearing_cost * num_bearings

  • gearbox_cost

  • brake_cost

  • high_speed_shaft_cost

  • generator_cost

  • bedplate_cost

  • yaw_system_cost

  • hydraulic_cooling_cost

  • nacelle_cover_cost

  • platform_mainframe_cost

  • transformer_cost

  • controls_cost

  • converter_cost

  • electrical_connection_cost

Parameters:
Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_hub_system_mass()#

Calculates and sets hub_system_mass (\(kg\)) if it was not provided by the user.

Sum of the following components:

  • hub_mass

  • pitch_system_mass

  • spinner_mass

Parameters:
Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_hub_system_cost()#

Calculates and sets hub_system_cost (\(USD\)) if it was not provided by the user.

Sum of the following components:

  • hub_cost

  • pitch_system_cost

  • spinner_cost

Parameters:
Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_rotor_mass()#

Calculates and sets rotor_mass (\(kg\)) if it was not provided by the user.

Sum of the blades and hub system (calculate_hub_system_mass()):

Parameters:
Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_rotor_cost()#

Calculates and sets rotor_cost (\(kg\)) if it was not provided by the user.

Sum of the blades and hub system (calculate_hub_system_cost()):

Parameters:
Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_turbine_mass()#

Calculates and sets turbine_mass (\(kg\)) if it was not provided by the user.

Sum of the rotor_mass (calculate_rotor_mass), hub_system_mass (calculate_hub_system_mass), nacelle_mass (calculate_nacelle_mass), and tower_mass (calculate_tower_mass)

Parameters:
Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

CSMBase.calculate_turbine_cost()#

Calculates and sets turbine_cost (\(USD\)) and turbine_cost_kw (:math:USD/kW) if neither was provided by the user, excluding any transportation costs.

Sum of the rotor_cost (calculate_rotor_cost), hub_system_cost (calculate_hub_system_cost), nacelle_cost (calculate_nacelle_cost), and tower_cost (calculate_tower_cost)

Parameters:
Raises:

ValueError -- Raised if the required parameters have not been provided or calculated.

Transportation Costs#

CSMBase.calculate_blade_transport_cost()#

Calculates and sets the blade_transport_cost if it was not provided by the user.

Currently sets the value to 0 as there is no base relationship.

CSMBase.calculate_hub_transport_cost()#

Calculates and sets the hub_transport_cost if it was not provided by the user.

Currently sets the value to 0 as there is no base relationship.

CSMBase.calculate_power_electronics_transport_cost()#

Calculates and sets the power_electronics_transport_cost if it was not provided by the user.

Currently sets the value to 0 as there is no base relationship.

CSMBase.calculate_num_tower_sections()#

Calculates and sets the num_tower_sections if not provided by the user.

\[\lceil m_{tower} / k \rceil\]

where:

  • \(m_{tower} =\) tower_mass

  • \(k =\) tower_section_mass_max

Parameters:
  • tower_mass (float) -- Mass of the tower (\(kg\)). See calculate_tower_mass().

  • tower_section_mass_max (float) -- Maximum mass of a single tower section, \(k\) in the cost equation.

Raises:

ValueError -- Raised if any of the required parameters have not been provided.

CSMBase.calculate_tower_transport_cost()#

Calculates and sets the tower_transport_cost if it was not provided by the user.

Currently sets the value to 0 as there is no base relationship.

CSMBase.calculate_drivetrain_transport_cost()#

Calculates and sets the drivetrain_transport_cost if it was not provided by the user.

Currently sets the value to 0 as there is no base relationship.

CSMBase.calculate_parts_transport_cost()#

Calculates and sets the parts_transport_cost if it was not provided by the user.

Currently sets the value to 0 as there is no base relationship.

CSMBase.calculate_transport_cost()#

Calculates and sets the transport_cost if it was not provided by the user.

Currently sets the value to 0 as there is no base relationship.