diff --git a/ssc/cmod_mhk_costs.cpp b/ssc/cmod_mhk_costs.cpp index 59832fcf9..f8c94e744 100644 --- a/ssc/cmod_mhk_costs.cpp +++ b/ssc/cmod_mhk_costs.cpp @@ -53,35 +53,35 @@ static var_info _cm_vtab_mhk_costs[] = { { SSC_INPUT, SSC_NUMBER, "export_cable_length", "Export cable length", "m", "", "MHKCosts", "*", "MIN=0", "" }, // User input for CapEx dependent costs - { SSC_INPUT, SSC_NUMBER, "structural_assembly_cost_method", "Structural assembly cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value,3=Use itemized costs in $", "MHKCosts", "*", "MIN=0,MAX=3", "" }, + { SSC_INPUT, SSC_NUMBER, "structural_assembly_cost_method", "Structural assembly cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value,3=Use itemized costs in $", "MHKCosts", "*", "MIN=0,MAX=4", "" }, { SSC_INPUT, SSC_NUMBER, "structural_assembly_cost_input", "Structural assembly cost", "$", "", "MHKCosts", "*", "", "" }, //{ SSC_INPUT, SSC_NUMBER, "structural_assembly_cost_total", "Structural assembly itemized cost total", "$", "", "MHKCosts", "*", "", "" }, - { SSC_INPUT, SSC_NUMBER, "power_takeoff_system_cost_method", "Power take-off system cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value,3=Use itemized costs in $", "MHKCosts", "*", "MIN=0,MAX=3", "" }, + { SSC_INPUT, SSC_NUMBER, "power_takeoff_system_cost_method", "Power take-off system cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value,3=Use itemized costs in $", "MHKCosts", "*", "MIN=0,MAX=4", "" }, { SSC_INPUT, SSC_NUMBER, "power_takeoff_system_cost_input", "Power take-off system cost", "$", "", "MHKCosts", "*", "", "" }, //{ SSC_INPUT, SSC_NUMBER, "power_takeoff_system_cost_total", "Power take-off system cost itemized cost total", "$", "", "MHKCosts", "*", "", "" }, - { SSC_INPUT, SSC_NUMBER, "mooring_found_substruc_cost_method", "Mooring, foundation, and substructure cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value,3=Use itemized costs in $", "MHKCosts", "*", "MIN=0,MAX=3", "" }, + { SSC_INPUT, SSC_NUMBER, "mooring_found_substruc_cost_method", "Mooring, foundation, and substructure cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value,3=Use itemized costs in $", "MHKCosts", "*", "MIN=0,MAX=4", "" }, { SSC_INPUT, SSC_NUMBER, "mooring_found_substruc_cost_input", "Mooring, foundation, and substructure cost", "$", "", "MHKCosts", "*", "", "" }, //{ SSC_INPUT, SSC_NUMBER, "mooring_found_substruc_cost_total", "Mooring, foundation, and substructure itemized cost total", "$", "", "MHKCosts", "*", "", "" }, // User input BOS values - { SSC_INPUT, SSC_NUMBER, "development_cost_method", "Development cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value,3=Enter in itemized costs", "MHKCosts", "*", "MIN=0,MAX=3", "" }, + { SSC_INPUT, SSC_NUMBER, "development_cost_method", "Development cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value,3=Enter in itemized costs", "MHKCosts", "*", "MIN=0,MAX=4", "" }, { SSC_INPUT, SSC_NUMBER, "development_cost_input", "Development cost", "$", "", "MHKCosts", "*", "", "" }, - { SSC_INPUT, SSC_NUMBER, "eng_and_mgmt_cost_method", "Engineering and management cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value,3=Enter in itemized costs", "MHKCosts", "*", "MIN=0,MAX=3", "" }, + { SSC_INPUT, SSC_NUMBER, "eng_and_mgmt_cost_method", "Engineering and management cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value,3=Enter in itemized costs", "MHKCosts", "*", "MIN=0,MAX=4", "" }, { SSC_INPUT, SSC_NUMBER, "eng_and_mgmt_cost_input", "Engineering and management cost", "$", "", "MHKCosts", "*", "", "" }, - { SSC_INPUT, SSC_NUMBER, "assembly_and_install_cost_method", "Assembly and installation cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value", "MHKCosts", "*", "MIN=0,MAX=3", "" }, + { SSC_INPUT, SSC_NUMBER, "assembly_and_install_cost_method", "Assembly and installation cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value", "MHKCosts", "*", "MIN=0,MAX=4", "" }, { SSC_INPUT, SSC_NUMBER, "assembly_and_install_cost_input", "Assembly and installation cost", "$", "", "MHKCosts", "*", "", "" }, - { SSC_INPUT, SSC_NUMBER, "other_infrastructure_cost_method", "Other infrastructure cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value", "MHKCosts", "*", "MIN=0,MAX=3", "" }, + { SSC_INPUT, SSC_NUMBER, "other_infrastructure_cost_method", "Other infrastructure cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value", "MHKCosts", "*", "MIN=0,MAX=4", "" }, { SSC_INPUT, SSC_NUMBER, "other_infrastructure_cost_input", "Other infrastructure cost", "$", "", "MHKCosts", "*", "", "" }, - { SSC_INPUT, SSC_NUMBER, "array_cable_system_cost_method", "Array cable system cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value", "MHKCosts", "*", "MIN=0,MAX=3", "" }, + { SSC_INPUT, SSC_NUMBER, "array_cable_system_cost_method", "Array cable system cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value", "MHKCosts", "*", "MIN=0,MAX=4", "" }, { SSC_INPUT, SSC_NUMBER, "array_cable_system_cost_input", "Array cable system cost", "$", "", "MHKCosts", "*", "", "" }, - { SSC_INPUT, SSC_NUMBER, "export_cable_system_cost_method", "Export cable system cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value", "MHKCosts", "*", "MIN=0,MAX=3", "" }, + { SSC_INPUT, SSC_NUMBER, "export_cable_system_cost_method", "Export cable system cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value", "MHKCosts", "*", "MIN=0,MAX=4", "" }, { SSC_INPUT, SSC_NUMBER, "export_cable_system_cost_input", "Export cable system cost", "$", "", "MHKCosts", "*", "", "" }, - { SSC_INPUT, SSC_NUMBER, "onshore_substation_cost_method", "Onshore substation cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value", "MHKCosts", "*", "MIN=0,MAX=3", "" }, + { SSC_INPUT, SSC_NUMBER, "onshore_substation_cost_method", "Onshore substation cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value", "MHKCosts", "*", "MIN=0,MAX=4", "" }, { SSC_INPUT, SSC_NUMBER, "onshore_substation_cost_input", "Onshore substation cost", "$", "", "MHKCosts", "*", "", "" }, - { SSC_INPUT, SSC_NUMBER, "offshore_substation_cost_method", "Offshore substation cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value", "MHKCosts", "*", "MIN=0,MAX=3", "" }, + { SSC_INPUT, SSC_NUMBER, "offshore_substation_cost_method", "Offshore substation cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value", "MHKCosts", "*", "MIN=0,MAX=4", "" }, { SSC_INPUT, SSC_NUMBER, "offshore_substation_cost_input", "Offshore substation cost", "$", "", "MHKCosts", "*", "", "" }, - { SSC_INPUT, SSC_NUMBER, "other_elec_infra_cost_method", "Other electrical infrastructure cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value", "MHKCosts", "*", "MIN=0,MAX=3", "" }, + { SSC_INPUT, SSC_NUMBER, "other_elec_infra_cost_method", "Other electrical infrastructure cost method", "0/1/2", "0=Enter in $/kW,1=Enter in $,2=Use modeled value", "MHKCosts", "*", "MIN=0,MAX=4", "" }, { SSC_INPUT, SSC_NUMBER, "other_elec_infra_cost_input", "Other electrical infrastructure cost", "$", "", "MHKCosts", "*", "", "" }, //CapEx costs diff --git a/ssc/cmod_mhk_eqns.cpp b/ssc/cmod_mhk_eqns.cpp index d34b74ea7..5f20a71e1 100644 --- a/ssc/cmod_mhk_eqns.cpp +++ b/ssc/cmod_mhk_eqns.cpp @@ -45,7 +45,7 @@ bool me_array_cable_length(ssc_data_t data) return false; } - double devices_per_row, device_spacing_in_row, number_rows, row_spacing, cable_system_overbuild, floating_array, export_cable_redundancy, water_depth, number_devices, distance_to_shore; + double devices_per_row, device_spacing_in_row, number_rows, row_spacing, cable_system_overbuild, floating_array, export_cable_redundancy, water_depth, number_devices, distance_to_shore = 0; vt_get_number(vt, "devices_per_row", &devices_per_row); vt_get_number(vt, "device_spacing_in_row", &device_spacing_in_row); @@ -89,5 +89,295 @@ bool me_array_cable_length(ssc_data_t data) return true; } +bool tidal_turbine_calculate_powercurve(ssc_data_t data) +{ + auto vt = static_cast(data); + if (!vt) { + return false; + } + + double rotor_diameter, cut_in, + cut_out, rotor_area, generator_rated_capacity, number_rotors = 0; + util::matrix_t tidal_resource; + std::vector pto_efficiency; + std::vector max_cp; + + try { + vt_get_number(vt, "tidal_turbine_rotor_diameter", &rotor_diameter); // ssc input + vt_get_number(vt, "number_rotors", &number_rotors); + vt_get_array_vec(vt, "tidal_turbine_max_cp", max_cp); // ssc input + vt_get_array_vec(vt, "pto_efficiency", pto_efficiency); + vt_get_number(vt, "cut_in", &cut_in); + vt_get_number(vt, "cut_out", &cut_out); + vt_get_matrix(vt, "tidal_resource", tidal_resource); + vt_get_number(vt, "generator_rated_capacity", &generator_rated_capacity); + + } + catch (std::runtime_error& e) { + vt->assign("error", var_data(e.what())); + return false; + } + + util::matrix_t powercurve_tidespeeds; + util::matrix_t powercurve_powerout; + util::matrix_t powercurve_hub_efficiency; + + char errmsg[250]; + + + size_t array_size = tidal_resource.nrows(); + + powercurve_tidespeeds.resize(array_size); + powercurve_powerout.resize(array_size); + rotor_area = pow((rotor_diameter / 2), 2) * M_PI * number_rotors; + double tidal_vel, p_fluid, p_rotor, eff, p_electric; + double max_cp_value, pto_eff_value; + for (size_t i = 0; i < array_size; i += 1) { + tidal_vel = tidal_resource.at(i, 0); + p_fluid = 0.5 * pow(tidal_vel, 3) * 1.025 * rotor_area; + + if (max_cp.size() == 1) { + max_cp_value = max_cp[0]; + } + else { + max_cp_value = max_cp[i]; + } + p_rotor = p_fluid * max_cp_value; + if (pto_efficiency.size() == 1) { + pto_eff_value = pto_efficiency[0]; + } + else { + pto_eff_value = pto_efficiency[i]; + } + eff = pto_eff_value / 100.0; + if (tidal_vel < cut_in) eff = 0; + if (tidal_vel > cut_out) eff = 0; + p_electric = std::min(eff * p_rotor, generator_rated_capacity); + powercurve_powerout[i] = p_electric; + powercurve_tidespeeds[i] = tidal_vel; + + } + + var_data windspeeds = var_data(powercurve_tidespeeds.data(), powercurve_tidespeeds.ncols()); + var_data powerout = var_data(powercurve_powerout.data(), powercurve_powerout.ncols()); + + vt->assign("tidal_turbine_powercurve_tidespeeds", windspeeds); + vt->assign("tidal_turbine_powercurve_powerout", powerout); + sprintf(errmsg, "None"); + vt->assign("error", std::string(errmsg)); + return true; +}; + +bool me_array_cable_voltage(ssc_data_t data) { + + auto vt = static_cast(data); + if (!vt) { + return false; + } + + double devices_per_row, device_spacing_in_row, distance_to_shore = 0; + double device_rated_power, system_capacity, inter_array_cable_length, riser_cable_length, export_cable_length = 0; + double use_onshore_substation, load_grid_voltage = 0; + vt_get_number(vt, "devices_per_row", &devices_per_row); + vt_get_number(vt, "device_rated_power", &device_rated_power); + vt_get_number(vt, "system_capacity", &system_capacity); + vt_get_number(vt, "device_spacing_in_row", &device_spacing_in_row); + vt_get_number(vt, "inter_array_cable_length", &inter_array_cable_length); + vt_get_number(vt, "riser_cable_length", &riser_cable_length); + vt_get_number(vt, "export_cable_length", &export_cable_length); + vt_get_number(vt, "use_onshore_substation", &use_onshore_substation); + vt_get_number(vt, "load_grid_voltage", &load_grid_voltage); + vt_get_number(vt, "distance_to_shore", &distance_to_shore); + + double PF = 0.95; //Power Factor + double angle = acos(PF); + + double riser_cable_rated_power_per_device = device_rated_power / (sqrt(3.0) * PF * 1000.0); + double array_cable_rated_power_per_row = (device_rated_power * devices_per_row) / (sqrt(3.0) * PF * 1000.0); + double export_cable_rated_power_array_ac = (system_capacity) / (sqrt(3.0) * PF * 1000.0); + double export_cable_rated_power_array_hvdc = (system_capacity) / 1000.0; + double reactive_power = sqrt(3.0) * array_cable_rated_power_per_row * sin(angle); //Where is this used + //Cable Electrical Specifications + double export_cable_type = 0; //0 - AC, 1 - HVDC Appendix A Electrical Instracture Model spreadsheet + if (system_capacity >= 200000 && distance_to_shore >= 150000 || + (system_capacity >= 300000 && distance_to_shore >= 100000) || + (system_capacity >= 500000 && distance_to_shore >= 90000) || + (system_capacity >=600000 && distance_to_shore >= 80000) || + (system_capacity >= 1100000 && distance_to_shore >= 70000)) { + export_cable_type = 1; + } + vt->assign("export_cable_type", export_cable_type); + //Riser Cable + double riser_cable_voltage = 0.0; + double riser_cable_cost = 0.0; //$/m + if ( array_cable_rated_power_per_row < 4.0) { + riser_cable_voltage = 7.2; + riser_cable_cost = 57.955 * riser_cable_rated_power_per_device; + } + else if (riser_cable_rated_power_per_device >= 5.0 && riser_cable_rated_power_per_device < 9.0) { + riser_cable_voltage = 12.0; + riser_cable_cost = 47.214 * riser_cable_rated_power_per_device - 91.05; + } + else if (riser_cable_rated_power_per_device >= 9.0 && riser_cable_rated_power_per_device < 14.0) { + riser_cable_voltage = 24.0; + riser_cable_cost = 22.748 * riser_cable_rated_power_per_device - 68.376; + } + else { + riser_cable_voltage = 36.0; + riser_cable_cost = 20.82 * riser_cable_rated_power_per_device - 163.14; + } + vt->assign("riser_cable_voltage", riser_cable_voltage); + vt->assign("riser_cable_cost", riser_cable_cost); + double riser_cable_cost_total = riser_cable_cost * riser_cable_length; + vt->assign("riser_cable_cost_total", riser_cable_cost_total); + + //Array Cable + double array_cable_voltage = 0.0; + double array_cable_cost = 0.0; + if ( array_cable_rated_power_per_row < 4.0) { + array_cable_voltage = 7.2; + array_cable_cost = 44.245 * array_cable_rated_power_per_row; + } + else if ( array_cable_rated_power_per_row >= 4.0 && array_cable_rated_power_per_row < 9.0) { + array_cable_voltage = 12.0; + array_cable_cost = 31.029 * array_cable_rated_power_per_row - 40.744; + } + else if ( array_cable_rated_power_per_row >= 9.0 && array_cable_rated_power_per_row < 14.0) { + array_cable_voltage = 24.0; + array_cable_cost = 17.348 * array_cable_rated_power_per_row - 61.467; + } + else if ( array_cable_rated_power_per_row >= 14.0 && array_cable_rated_power_per_row < 30.0) { + array_cable_voltage = 36.0; + array_cable_cost = 13.791 * array_cable_rated_power_per_row - 93.272; + } + else { + array_cable_voltage = 66.0; + array_cable_cost = 11.984 * array_cable_rated_power_per_row - 155.97; + } + vt->assign("array_cable_voltage", array_cable_voltage); + vt->assign("array_cable_cost", array_cable_cost); + double array_cable_cost_total = array_cable_cost * inter_array_cable_length; + vt->assign("array_cable_cost_total", array_cable_cost_total); + + //Export Cable + double export_cable_voltage = 0; + double export_cable_cost = 0; + double offshore_substation_voltage = 0; + if (export_cable_type == 0) { + if (export_cable_rated_power_array_ac < 4.0) { + export_cable_voltage = 7.2; + export_cable_cost = 44.245 * export_cable_rated_power_array_ac; + offshore_substation_voltage = 8; //kVAC + } + else if (export_cable_rated_power_array_ac >= 4.0 && export_cable_rated_power_array_ac < 9.0) { + export_cable_voltage = 12; + export_cable_cost = 31.029 * export_cable_rated_power_array_ac - 40.744; + offshore_substation_voltage = 15; //kVAC + } + else if (export_cable_rated_power_array_ac >= 9.0 && export_cable_rated_power_array_ac < 14.0) { + export_cable_voltage = 24; + export_cable_cost = 17.348 * export_cable_rated_power_array_ac - 61.467; + offshore_substation_voltage = 25; //kVAC + } + else if (export_cable_rated_power_array_ac >= 14.0 && export_cable_rated_power_array_ac < 30.0) { + export_cable_voltage = 36; + export_cable_cost = 13.791 * export_cable_rated_power_array_ac - 93.272; + offshore_substation_voltage = 46; //kVAC + } + else if (export_cable_rated_power_array_ac >= 30.0 && export_cable_rated_power_array_ac < 40.0) { + export_cable_voltage = 66; + array_cable_cost = 11.984 * export_cable_rated_power_array_ac - 155.97; + offshore_substation_voltage = 69; //kVAC + } + else if (export_cable_rated_power_array_ac >= 40.0 && export_cable_rated_power_array_ac < 121.0) { + export_cable_voltage = 72.5; + array_cable_cost = 9.8977 * export_cable_rated_power_array_ac - 195.75; + offshore_substation_voltage = 115; //kVAC + } + else if (export_cable_rated_power_array_ac >= 121.0 && export_cable_rated_power_array_ac < 250.0) { + export_cable_voltage = 145; + array_cable_cost = 10.046 * export_cable_rated_power_array_ac - 886.49; + offshore_substation_voltage = 161; //kVAC + } + else if (export_cable_rated_power_array_ac >= 250.0 && export_cable_rated_power_array_ac < 550.0) { + export_cable_voltage = 220.0; + array_cable_cost = 5.2937 * export_cable_rated_power_array_ac - 318.15; + offshore_substation_voltage = 230.0; //kVAC + } + else { + export_cable_voltage = 400.0; + array_cable_cost = 7.7566 * export_cable_rated_power_array_ac - 2704.6; + offshore_substation_voltage = 415.0; //kVAC + } + } + else { + if (export_cable_rated_power_array_hvdc < 500.0) { + export_cable_voltage = 150.0; + export_cable_cost = 2.5026 * export_cable_rated_power_array_hvdc; + offshore_substation_voltage = 161.0; //kV HVDC + } + else { + export_cable_voltage = 300.0; + export_cable_cost = 2.0375 * export_cable_rated_power_array_hvdc - 516.02; + offshore_substation_voltage = 345.0; //kVAC + } + } + vt->assign("export_cable_voltage", export_cable_voltage); + vt->assign("export_cable_cost", export_cable_cost); + vt->assign("export_cable_type", export_cable_type); + double export_cable_cost_total = export_cable_cost * export_cable_length; + vt->assign("export_cable_cost_total", export_cable_cost_total); + + //Offshore substation costs + double offshore_foundation_cost = 303.09 * system_capacity; + //AC Electrical equipment + double circuit_breaker_cost = 818.42 * offshore_substation_voltage; + double ac_switchgear_cost = 14018 * offshore_substation_voltage; + double transformer_cost = 11879 * export_cable_rated_power_array_ac; + double shunt_reactor_cost = 35226 * reactive_power; + double series_capacitor_cost = 22047 * reactive_power; + double static_var_compensator_cost = 105060 * reactive_power; + //HVDC Electrical equipment + double hvdc_converter_station_cost = 142.61 * system_capacity; + double offshore_substation_cost_total = 0.0; + if (array_cable_voltage != export_cable_voltage && export_cable_type == 0.0) { + offshore_substation_cost_total = offshore_foundation_cost + circuit_breaker_cost + ac_switchgear_cost + transformer_cost + + shunt_reactor_cost + series_capacitor_cost + static_var_compensator_cost; + } + else if (array_cable_voltage != export_cable_voltage && export_cable_type == 1.0) { + offshore_substation_cost_total = offshore_foundation_cost + hvdc_converter_station_cost; + } + else { + //do nothing + offshore_substation_cost_total = 0.0; + } + vt->assign("offshore_substation_cost_total", offshore_substation_cost_total); + + //Onshore substation + double onshore_substation_voltage = load_grid_voltage; + double onshore_foundation_cost = 3590.4 * onshore_substation_voltage + 1000000; + double onshore_circuit_breaker_cost = 818.42 * onshore_substation_voltage; + double onshore_ac_switchgear_cost = 14018 * onshore_substation_voltage; + double onshore_transformer_cost = 11346 * export_cable_rated_power_array_ac; + double onshore_shunt_reactor_cost = 35226 * reactive_power; + double onshore_series_capacitor_cost = 22047 * reactive_power; + double onshore_static_var_compensator_cost = 105060 * reactive_power; + //HVDC Electrical equipment + double onshore_hvdc_converter_station_cost = 142.61 * system_capacity; + double onshore_substation_cost_total = 0.0; + if (use_onshore_substation== 0.0 && export_cable_type == 0.0) { + onshore_substation_cost_total = onshore_foundation_cost + onshore_circuit_breaker_cost + onshore_ac_switchgear_cost + onshore_transformer_cost + + onshore_shunt_reactor_cost + onshore_series_capacitor_cost + onshore_static_var_compensator_cost; + } + else if (use_onshore_substation== 0.0 && export_cable_type == 1.0) { + onshore_substation_cost_total = onshore_foundation_cost + onshore_hvdc_converter_station_cost; + } + else { + //do nothing + } + vt->assign("onshore_substation_cost_total", onshore_substation_cost_total); + return true; +} + diff --git a/ssc/cmod_mhk_eqns.h b/ssc/cmod_mhk_eqns.h index 112e7d193..d2756cbc5 100644 --- a/ssc/cmod_mhk_eqns.h +++ b/ssc/cmod_mhk_eqns.h @@ -53,6 +53,53 @@ static const char* me_array_cable_length_doc = SSCEXPORT bool me_array_cable_length(ssc_data_t data); +static const char* tidal_turbine_calculate_powercurve_doc = +"Calculates the tidal energy converter power output for tidal velocity bins in an ME array\\n" +"Input: var_table with key-value pairs\\n" +" 'tidal_turbine_rotor_diameter' - double [m]\\n" +" 'number_rotors' - integer [-]\\n" +" 'tidal_turbine_max_cp' - double [-]\\n" +" 'pto_efficiency' - double [%]\\n" +" 'cut_in' - double [m/s]\\n" +" 'cut_out' - double [m/s]\\n" +" 'tidal_resource' - matrix [-]\\n" +" 'generator_rated_capacity' - matrix [-]\\n" +"Output: key-value pairs added to var_table\\n" +" 'tidal_turbine_powercurve_tidespeeds' - array [m/s]\\n" +" 'tidal_turbine_powercurve_powerout' - array [kW]\\n" +" 'error - string [-]\\n"; + + +SSCEXPORT bool tidal_turbine_calculate_powercurve(ssc_data_t data); + +static const char* me_array_cable_voltage_doc = +"Calculates the cable voltages in an ME array\\n" +"Input: var_table with key-value pairs\\n" +" 'devices_per_row' - double [-]\\n" +" 'device_rated_power' - double [kW]\\n" +" 'system_capacity' - double [kW]\\n" +" 'device_spacing_in_row' - double [m]\\n" +" 'row_spacing' - double [m]\\n" +" 'inter_array_cable_length' - double [m]\\n" +" 'riser_cable_length' - double [m]\\n" +" 'export_cable_length' - double [m]\\n" +" 'use_onshore_substation' - double [-]\\n" +" 'load_grid_voltage' - double [-]\\n" +"Output: key-value pairs added to var_table\\n" +" 'array_cable_voltage' - double [V]\\n" +" 'array_cable_cost' - double [$]\\n" +" 'array_cable_cost_total' - double [$]\\n" +" 'export_cable_voltage' - double [V]\\n" +" 'export_cable_cost' - double [$]\\n" +" 'export_cable_cost_total' - double [$]\\n" +" 'riser_cable_voltage' - double [V]\\n" +" 'riser_cable_cost' - double [$]\\n" +" 'riser_cable_cost_total' - double [$]\\n" +" 'onshore_substation_cost_total' - double [$]\\n" +" 'offshore_substation_cost_total' - double [$]\\n"; + +SSCEXPORT bool me_array_cable_voltage(ssc_data_t data); + #ifdef __cplusplus } diff --git a/ssc/ssc_equations.h b/ssc/ssc_equations.h index b937850c5..a415ff107 100644 --- a/ssc/ssc_equations.h +++ b/ssc/ssc_equations.h @@ -84,6 +84,12 @@ static ssc_equation_entry ssc_equation_table [] = { // Marine energy {"me_array_cable_length", me_array_cable_length, "Marine energy", me_array_cable_length_doc, + false, true}, + {"tidal_turbine_calculate_powercurve", tidal_turbine_calculate_powercurve, + "Marine energy", tidal_turbine_calculate_powercurve_doc, + false, true}, + {"me_array_cable_voltage", me_array_cable_voltage, + "Marine energy", me_array_cable_voltage_doc, false, true}, {"mp_ancillary_services", mp_ancillary_services, "Merchant plant", mp_ancillary_services_doc,