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:
rotor_diameter (float) -- Diameter of the swept area of the turbine blades (\(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\)).
turbine_class (int) -- Turbine classification; use 1 for IEC Wind-Class I, 2 fo IEC Wind-Class II or III.
num_blades (int, optional) -- Number of turbine blades. Defaults to 3.
num_bearings (int) -- Number of main bearings.
blade_mass_coeff (float) -- \(k\) in the blade mass equation from
calculate_blade_mass().blade_has_carbon (bool) -- Use True if the blade has carbon, False if not.
blade_mass_cost_coeff (float) -- Blade cost per kilogram (\(USD/kg\)).
blade_mass (float) -- Blade mass (\(kg\)). See
calculate_blade_mass()for details.blade_cost (float) -- Blade cost (\(USD\)). See
calculate_blade_cost()for details.hub_mass_coeff (float) -- \(k\) in the hub mass equation from
calculate_hub_mass().hub_mass_intercept (bool) -- \(b\) in the hub mass equation from
calculate_hub_mass().hub_mass_cost_coeff (float) -- Hub cost per kilogram (\(USD/kg\)) from
calculate_hub_cost().hub_mass (float) -- Hub mass (\(kg\)). See
calculate_hub_mass()for more details.hub_cost (float) -- Hub cost (\(USD\)). See
calculate_hub_cost()for more details.pitch_bearing_mass_coeff (float) -- \(k\) in the pitch bearing mass equation from
calculate_pitch_system_mass().pitch_bearing_mass_intercept (float) -- \(b1\) in the pitch bearing mass equation from
calculate_pitch_system_mass().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 from
calculate_pitch_system_mass().mass_sys_offset (float) -- \(b2\) in the pitch system mass equation from
calculate_pitch_system_mass().pitch_system_mass_cost_coeff (float) -- Pitch system cost per kilogram (\(USD/kg\)) from
calculate_pitch_system_cost().pitch_system_mass (float) -- Pitch system mass (\(kg\)). See
calculate_pitch_system_mass()for more details.pitch_system_cost (float) -- Pitch system cost (\(USD\)). See
calculate_pitch_system_cost()for more details.spinner_mass_coeff (float) -- \(k\) in the mass equation above from
calculate_spinner_mass().spinner_mass_intercept (bool) -- \(b\) in the mass equation above from
calculate_spinner_mass().spinner_mass_cost_coeff (float) -- Spinner cost per kilogram (\(USD/kg\)) from
calculate_spinner_cost().spinner_mass (float) -- Spinner mass (\(kg\)). See
calculate_spinner_mass()for more details.spinner_cost (float) -- Spinner cost (\(USD\)). See
calculate_spinner_cost()for more details.lss_mass_coeff (float) -- \(k\) in the low speed shaft mass equation from
calculate_low_speed_shaft_mass().lss_mass_exp (float) -- \(b1\) in the low speed shaft mass equation from
calculate_low_speed_shaft_mass().lss_mass_intercept (float) -- \(b2\) in the low speed shaft mass equation from
calculate_low_speed_shaft_mass().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.low_speed_shaft_cost (float) -- Low speed shaft cost (\(USD\)). See
calculate_low_speed_shaft_cost()for more details.bearing_mass_coeff (float) -- \(k\) in the bearing mass equation from
calculate_bearing_mass().bearing_mass_exp (bool) -- \(b\) in the bearing mass equation from
calculate_bearing_mass().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.bearing_cost (float) -- Main bearing cost (\(USD\)). See
calculate_bearing_cost()for more details.rated_rpm (float) -- Rated RPM of the turbine based on the
max_tip_speedandrotor_diameter. Seecalculate_rotor_torque()for more details.rotor_torque (float) -- Maximum torque produced under normal operations of the turbine (kNm). See
calculate_rotor_torque()for more details.gearbox_torque_density (float) -- Gearbox torque per kilogram of mass from
calculate_gearbox_mass()andcalculate_gearbox_cost()(\(N*m/kg\)).gearbox_torque_cost (float) -- Gearbox cost per unit of torque (\(USD/kN/m\)) from
calculate_gearbox_cost().gearbox_mass (float) -- Gearbox mass (\(kg\)). See
calculate_gearbox_mass()for more details.gearbox_cost (float) -- Gearbox cost (\(USD\)). See
calculate_gearbox_cost()for more details.brake_mass_coeff (bool) -- \(k\) in the brake mass equation from
calculate_brake_mass().brake_mass_cost_coeff (float) -- Brake cost per kilogram (\(USD/kg\)).
brake_mass (float) -- Brake mass (\(kg\)). See
calculate_brake_mass()for more details.brake_cost (float) -- Brake cost (\(USD\)). See
calculate_brake_cost()for more details.hss_mass_coeff (float) -- Mass scaling coefficient, \(k\) in the mass equation.
hss_mass_cost_coeff (float) -- High speed shaft cost, per kilogram of mass, \(k\) in the equation above (\(USD/kg\)).
high_speed_shaft_mass (float) -- High speed shaft mass (\(kg\)). See
calculate_high_speed_shaft_mass()for more details.high_speed_shaft_cost (float) -- High speed shaft cost (\(USD\)). See
calculate_high_speed_shaft_cost()for more details.generator_mass_coeff (float) -- \(k\) in the generator mass equation above (\(kg/kW\)) from
calculate_generator_mass().generator_mass_intercept (bool) -- \(b\) in the generator mass equation above (\(kg\)) from
calculate_generator_mass().generator_mass_cost_coeff (float) -- generator cost per kilogram (\(USD/kg\)).
generator_mass (float) -- Generator mass (\(kg\)). See
calculate_generator_mass()for more details.generator_cost (float) -- Generator cost (\(USD\)). See
calculate_generator_cost()for more details.bedplate_mass_exp (bool) -- \(b\) in the mass equation from
calculate_bedplate_mass().bedplate_mass_cost_coeff (float) -- bedplate cost per kilogram (\(USD/kg\)).
bedplate_mass (float) -- Bedplate mass (\(kg\)). See
calculate_bedplate_mass()for more details.bedplate_cost (float) -- Bedplate cost (\(USD\)). See
calculate_bedplate_cost()for more details.yaw_system_non_bearing_mass_coeff (float) -- \(k1\) in the mass equation from
calculate_yaw_system_mass()to account for non-bearing mass.yaw_system_mass_coeff (float) -- \(k2\) in the mass equation from
calculate_yaw_system_mass().yaw_system_mass_exp (bool) -- \(b\) in the mass equation from
calculate_yaw_system_mass()..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.yaw_system_cost (float) -- Yaw system cost (\(USD\)). See
calculate_yaw_system_cost()for more details.hvac_mass_coeff (float) -- Mass scaling coefficient. See
calculate_hydraulic_cooling_mass()for more details.hvac_mass_cost_coeff (float) -- Hydraulic cooling cost, per kilogram of mass.
hydraulic_cooling_mass (float) -- Hydraulic cooling mass (\(kg\)). See
calculate_hydraulic_cooling_mass()for more details.hydraulic_cooling_cost (float) -- Hydraulic cooling cost (\(USD\)). See
calculate_hydraulic_cooling_cost()for more details.nacelle_cover_mass_coeff (float) -- \(k\) in the mass equation from
calculate_nacelle_cover_mass().nacelle_cover_mass_intercept (bool) -- \(b\) in the mass equation from
calculate_nacelle_cover_mass().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.nacelle_cover_cost (float) -- nacelle_cover mass (\(USD\)). See
calculate_nacelle_cover_cost()for more details.platform_mainframe_mass_coeff (float) -- \(k\) from
calculate_platform_mainframe_mass().has_crane (bool) -- If True, apply
crane_masstocalculate_platform_mainframe_mass()andcrane_costtocalculate_platform_mainframe_cost(), otherwise ignore.crane_mass (bool) -- Mass of onboard crane, if
has_crane, \(m_{crane}\) fromcalculate_platform_mainframe_mass().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.platform_mainframe_cost (float) -- Platform mainframe cost (\(USD\)). See
calculate_platform_mainframe_cost()for more details.transformer_mass_coeff (float) -- \(k\) in the mass equation from
calculate_transformer_mass().transformer_mass_intercept (bool) -- \(b\) in the mass equation from
calculate_transformer_mass().transformer_mass_cost_coeff (float) -- Transformer cost per kilogram (\(USD/kg\)).
transformer_mass (float) -- Transformer cover mass (\(kg\)). See
calculate_transformer_mass()for more details.transformer_cost (float) -- Transformer cover cost (\(USD\)). See
calculate_transformer_cost()for more details.controls_cost_coeff (float) -- Controls cost per kilowatt of capacity (\(USD/kW\)).
controls_mass (float) -- Controls mass (\(kg\)). See
calculate_controls_mass()for more details.controls_cost (float) -- Controls cost (\(USD\)). See
calculate_controls_cost()for more details.electrical_connection_cost_coeff (float) -- Electrical connection cost per kilowatt (\(USD/kW\)).
electrical_connection_mass (float) -- Electrical connection mass (\(kg\)). See
calculate_electrical_connection_mass()for more details.electrical_connection_cost (float) -- Electrical connection cost (\(USD\)). See
calculate_electrical_connection_cost()for more details.converter_mass_cost_coeff (float) -- Power converter cost per kilogram (\(USD/kg\)). See
calculate_converter_cost()for more details.converter_mass (float) -- Power converter mass (\(kg\)). See
calculate_converter_mass()for more details.converter_cost (float) -- Power converter cost (\(USD\)). See
calculate_converter_cost()for more details.tower_mass_coeff (float) -- \(k\) in the mass from
calculate_tower_mass()(\(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 from
calculate_tower_mass().tower_mass_cost_coeff (float) -- Tower cover cost per kilogram (\(USD/kg\)).
tower_mass (float) -- Tower mass (\(kg\)). See
calculate_tower_mass()for more details.tower_cost (float) -- Tower cost (\(USD\)). See
calculate_tower_cost()for more details.nacelle_mass (float) -- Total nacelle mass (\(kg\)). See
calculate_nacelle_mass()for more details.nacelle_cost (float) -- Total nacelle cost (US). See
calculate_nacelle_cost()for more details.hub_system_mass (float) -- Total hub system mass (\(kg\)). See
calculate_hub_system_mass()for more details.hub_system_cost (float) -- Total hub system cost (\(USD\)). See
calculate_hub_system_cost()for more details.rotor_mass (float) -- Total rotor mass (\(kg\)). See
calculate_rotor_mass()for more details.rotor_cost (float) -- Total rotor cost (\(USD\)). See
calculate_rotor_cost()for more details.turbine_mass (float) -- Total turbine mass (\(kg\)). See
calculate_turbine_mass()for more details.turbine_cost (float) -- Total turbine cost (\(USD\)). See
calculate_turbine_cost()for more details.turbine_cost -- Total turbine cost, normalized by
rated_power_kw(\(USD/kW\)).blade_transport_cost (float) -- Total blade transportation cost (\(USD\)). See
calculate_blade_transport_cost()for more details.hub_transport_cost (float) -- Total hub transportation cost (\(USD\)). See
calculate_hub_transport_cost()for more details.power_electronics_transport_cost (float) -- Total power_electronics transportation cost (\(USD\)). See
calculate_power_electronics_transport_cost()for more details.drivetrain_transport_cost (float) -- Total drivetrain transportation cost (\(USD\)). See
calculate_drivetrain_transport_cost()for more details.tower_section_mass_max (float) -- Maximum mass of each tower section. See
calculate_num_tower_sectionsfor more details. Defaults to 80000 \(kg\).tower_transport_cost (float) -- Total tower transportation cost (\(USD\)). See
calculate_tower_transport_cost()for more details.parts_transport_cost (float) -- Total transportation cost of miscellaneous parts (\(USD\)). See
calculate_parts_transport_cost()for more details.transport_cost (float) -- Total transportation cost (\(USD\)). See
calculate_transport_cost()for more details.turbine_cost_kw (float)
num_tower_sections (float)
turbine_production_cost (float)
tower_flange_material_cost (float)
tower_flange_production_cost (float)
- 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.
- reset_values(*args)#
Resets the values for any provided
argsto the model default.- Raises:
KeyError -- Raised if any of
argsare 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
argsare 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_parametersuch ascalculate_blade_mass.- Parameters:
args (str) -- The name(s) of parameters to calculate. Each parameter provided must match the format of
calculate_parametersuch ascalculate_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_maxwith 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_kwargsare 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.MultiIndexcolumn set of all parameterized values and with an index of the results names.
- DataFrame with a
- 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 inresultswill 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_maxwith 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_kwargsare 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.MultiIndexcolumn set of all parameterized values and with an index of the results names.
- DataFrame with a
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). Seecalculate_blade_cost()for complete details.Rotor Hub: model-calculated
hub_system_cost(hub, pitch system, and spinner). Seecalculate_hub_system_cost()for complete details.Nacelle: model-calculated
nacelle_costminusconverter_cost(every nacelle component except the power converter, which is its own line below). Seecalculate_nacelle_cost()for complete details.Power Converter: model-calculated
converter_cost. Seecalculate_converter_cost()for complete details.Production: user-provided
turbine_production_cost
Wind Tower Flanges
Material: user-provided
tower_flange_material_costProduction: 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_costwill be applied. Defaults to None.(bool (with_category) -- If True, return the DataFrame with the
categorycolumn intact, otherwise drop the column to produce an IRS-ready output. Defaults to False.optional -- If True, return the DataFrame with the
categorycolumn 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
domesticthat align withirs_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
categorycolumn ofirs_mpc_breakdown().return_table (bool, optional) -- If True, return the DataFrame from
irs_mpc_breakdown()with the additional columnDomesticthat 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_kwto 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_unitsis True). Use of False forboth_as_separateand True forinclude_unitsare 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_separateis 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
namerequires.- 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
namerelies 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_xxmethod will be run.- Parameters:
parameters (list[str]) -- List of class attributes to check for valid inputs.
- Raises:
ValueError -- Raised if any of the required
parametershave not beenprovided 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_maphave 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
methodstill needs to be calculated.
- True if the method can be returned early, or False if
- 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_massif it was not provided by the user.\[k * diameter^b\]where:
\(k =\)
blade_mass_coeff\(diameter =\)
rotor_diameter/ 2\(b =\) - 2.47 if
turbine_classis 1 andblade_has_carbonis True - 2.54 ifturbine_classis 1 andblade_has_carbonis False - 2.44 ifturbine_class> 1 andblade_has_carbonis True - 2.5 ifturbine_class> 1 andblade_has_carbonis False - 2.5 ifturbine_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_costif 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_massif 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_costif 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_massif 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_costif 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_massif 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_costif 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_massfor 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_rpmandrotor_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_maxas 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_massfor 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_costif 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_massfor 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_costif 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_massfor 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_costif 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_massif 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_costif 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_massif 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_costif 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_massif 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_costif 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_massfor 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_costif 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_massif 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_costif 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_massif 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_costif 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_massif 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_costif 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_massif 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_costif 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_massif 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_costif 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_massif 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_costif 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_massif 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_costif 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_massbearing_mass*num_bearingsgearbox_massbrake_masshigh_speed_shaft_massgenerator_massbedplate_massyaw_system_masshydraulic_cooling_massnacelle_cover_massplatform_mainframe_masstransformer_masscontrols_massconverter_masselectrical_connection_mass
- Parameters:
low_speed_shaft_mass (float) -- See
calculate_low_speed_shaft_mass()for more details.num_bearings (float) -- Number of main bearings (
num_bearings).bearing_mass (float) -- See
calculate_bearing_mass()for more details.gearbox_mass (float) -- See
calculate_gearbox_mass()for more details.brake_mass (float) -- See
calculate_brake_mass()for more details.high_speed_shaft_mass (float) -- See
calculate_high_speed_shaft_mass()for more details.generator_mass (float) -- See
calculate_generator_mass()for more details.bedplate_mass (float) -- See
calculate_bedplate_mass()for more details.yaw_system_mass (float) -- See
calculate_yaw_system_mass()for more details.hydraulic_cooling_mass (float) -- See
calculate_hydraulic_cooling_mass()for more details.nacelle_cover_mass (float) -- See
calculate_nacelle_cover_mass()for more details.platform_mainframe_mass (float) -- See
calculate_platform_mainframe_mass()for more details.transformer_mass (float) -- See
calculate_transformer_mass()for more details.controls_mass (float) -- See
calculate_controls_mass()for more details.converter_mass (float) -- See
calculate_converter_mass()for more details.electrical_connection_mass (float) -- See
calculate_electrical_connection_mass()for more details.
- 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_costbearing_cost*num_bearingsgearbox_costbrake_costhigh_speed_shaft_costgenerator_costbedplate_costyaw_system_costhydraulic_cooling_costnacelle_cover_costplatform_mainframe_costtransformer_costcontrols_costconverter_costelectrical_connection_cost
- Parameters:
low_speed_shaft_cost (float) -- See
calculate_low_speed_shaft_cost()for more details.num_bearings (int) -- Number of main bearings (
num_bearings).bearing_cost (float) -- See
calculate_bearing_cost()for more details.gearbox_cost (float) -- See
calculate_gearbox_cost()for more details.brake_cost (float) -- See
calculate_brake_cost()for more details.high_speed_shaft_cost (float) -- See
calculate_high_speed_shaft_cost()for more details.generator_cost (float) -- See
calculate_generator_cost()for more details.bedplate_cost (float) -- See
calculate_bedplate_cost()for more details.yaw_system_cost (float) -- See
calculate_yaw_system_cost()for more details.hydraulic_cooling_cost (float) -- See
calculate_hydraulic_cooling_cost()for more details.nacelle_cover_cost (float) -- See
calculate_nacelle_cover_cost()for more details.platform_mainframe_cost (float) -- See
calculate_platform_mainframe_cost()for more details.transformer_cost (float) -- See
calculate_transformer_cost()for more details.controls_cost (float) -- See
calculate_controls_cost()for more details.converter_cost (float) -- See
calculate_converter_cost()for more details.electrical_connection_cost (float) -- See
calculate_electrical_connection_cost()for more details.
- 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_masspitch_system_massspinner_mass
- Parameters:
hub_mass (float) -- See
calculate_hub_mass()for more details.pitch_system_mass (float) -- See
calculate_pitch_system_mass()for more details.spinner_mass (float) -- See
calculate_spinner_mass()for more details.
- 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_costpitch_system_costspinner_cost
- Parameters:
hub_cost (float) -- See
calculate_hub_cost()for more details.pitch_system_cost (float) -- See
calculate_pitch_system_cost()for more details.spinner_cost (float) -- See
calculate_spinner_cost()for more details.
- 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:
num_blades (float) -- Number of turbine blades (
num_blades).blade_mass (float) -- See
calculate_blade_mass()for more details.hub_system_mass (float) -- See
calculate_hub_system_mass()for more details.
- 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:
num_blades (float) -- Number of turbine blades (
num_blades).blade_cost (float) -- See
calculate_blade_cost()for more details.hub_system_cost (float) -- See
calculate_hub_system_cost()for more details.
- 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), andtower_mass(calculate_tower_mass)- Parameters:
nacelle_mass (float) -- See
calculate_nacelle_mass()for more details.hub_system_mass (float) -- See
calculate_hub_system_mass()for more details.rotor_mass (float) -- See
calculate_rotor_mass()for more details.tower_mass (float) -- See
calculate_tower_mass()for more details.
- Raises:
ValueError -- Raised if the required parameters have not been provided or calculated.
- CSMBase.calculate_turbine_cost()#
Calculates and sets
turbine_cost(\(USD\)) andturbine_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), andtower_cost(calculate_tower_cost)- Parameters:
nacelle_cost (float) -- See
calculate_nacelle_cost()for more details.hub_system_cost (float) -- See
calculate_hub_system_cost()for more details.rotor_cost (float) -- See
calculate_rotor_cost()for more details.tower_cost (float) -- See
calculate_tower_cost()for more details.
- 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_costif 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_costif 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_costif 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_sectionsif 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_costif 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_costif 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_costif 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_costif it was not provided by the user.Currently sets the value to 0 as there is no base relationship.