hydesign.ems.EmsSolarX

Classes

EmsSolarX

Energy Management Optimization Model for SolarX.

Functions

ems_cplex_solarX(hpp_grid_connection, ...)

Energy Management System (EMS) Optimization for SolarX Plant.

ems_cplex_solarX_parts(hpp_grid_connection, ...)

Energy Management System (EMS) Optimization Parts for SolarX Plant.

expand_to_lifetime(x[, life_h, weeks_per_season_per_year])

Expands (by repeating) a given variable to match an expected lifetime length.

split_in_batch(array, N)

Module Contents

class hydesign.ems.EmsSolarX.EmsSolarX(N_time, max_el_buy_from_grid_mw, steam_turbine_efficiency, steam_specific_heat_capacity, hot_tank_efficiency, hot_steam_temp_ms, cold_steam_temp_ms, heat_exchanger_efficiency, hot_molten_salt_density, heat_penalty_euro_per_mwht, biogas_h2_reactor_dni_to_heat_efficiency, biogas_h2_reactor_el_to_heat_efficiency, biogas_h2_reactor_efficiency_curve, maximum_h2_production_reactor_kg_per_m2, life_h, batch_size, weeks_per_season_per_year=None)[source]

Bases: openmdao.api.ExplicitComponent

Energy Management Optimization Model for SolarX.

This OpenMDAO component models an energy management system optimized for the SolarX power plant, focusing on maximizing revenue over time while taking into account production constraints, battery degradation, and penalties for unmet production targets during peak hours. The model integrates CPV, hydrogen production, and molten salt heat storage systems.

Parameters:
  • N_time (int) – Number of simulation time steps.

  • steam_turbine_efficiency (float) – Efficiency of the steam turbine for energy conversion.

  • steam_specific_heat_capacity (float) – Specific heat capacity of steam in the system.

  • hot_tank_efficiency (float) – Efficiency of the molten salt hot storage tank.

  • hot_steam_temp_ms (float) – Temperature of hot steam, in degrees Celsius.

  • cold_steam_temp_ms (float) – Temperature of cold steam, in degrees Celsius.

  • heat_exchanger_efficiency (float) – Efficiency of the heat exchanger between molten salt and steam.

  • hot_molten_salt_density (float) – Density of molten salt in the hot storage tank.

  • biogas_h2_reactor_dni_to_heat_efficiency (float) – Efficiency of DNI to heat conversion in the biogas hydrogen reactor.

  • biogas_h2_reactor_el_to_heat_efficiency (float) – Efficiency of electricity to heat conversion in the biogas hydrogen reactor.

  • biogas_h2_reactor_efficiency_curve (dict) – Efficiency curve mapping DNI/electricity input levels to efficiencies.

  • maximum_h2_production_reactor_kg_per_m2 (float) – Maximum hydrogen production per square meter in reactor.

  • life_h (int) – Lifetime of the model in hours, typically set to 25 years.

  • batch_size (int) – Size of batches in the time series data for computation.

  • weeks_per_season_per_year (int or None, optional) – Number of weeks per season to simplify annual time series. Default is None (uses full input data).

Returns:

Key output time series over the model’s lifetime, covering power output, hydrogen production, molten salt flow, and penalty terms, among other outputs: - ‘p_hpp_t’ : ndarray

Total power output time series of the hybrid power plant.

  • ’p_curtailment_t’ndarray

    Time series for curtailed power, showing unused power due to grid constraints.

  • ’p_cpv_t’ndarray

    Power output time series specifically for CPV generation.

  • ’p_st_t’ndarray

    Power output time series for steam turbine power generation.

  • ’p_biogas_h2_t’ndarray

    Electricity consumption time series for hydrogen production.

  • ’penalty_t’ndarray

    Time series representing penalties for failure to meet production targets during peak hours.

  • ’flow_ms_heat_exchanger_t’ndarray

    Time series of molten salt flow into the heat exchanger.

  • ’flow_ms_q_t’ndarray

    Time series of molten salt flow used for heat production.

  • ’v_hot_ms_t’ndarray

    Volume of molten salt stored in the hot tank over time.

  • ’alpha_cpv_t’ndarray

    Proportion of available flux directed towards CPV.

  • ’alpha_h2_t’ndarray

    Proportion of available flux directed towards hydrogen production.

  • ’h2_t’ndarray

    Hydrogen production time series.

  • ’q_t’ndarray

    Heat output time series.

  • ’biogas_t’ndarray

    Biogas consumption time series.

  • ’water_t’ndarray

    Water consumption time series.

  • ’co2_t’ndarray

    CO2 consumption time series.

  • ’p_st_max_dni_t’ndarray

    Maximum potential steam turbine power time series, based on DNI input.

  • ’q_max_dni_t’ndarray

    Maximum potential heat production based on DNI input.

  • ’flow_steam_st_t’ndarray

    Flow rate of steam directed to the steam turbine over time.

  • ’biogas_h2_procuded_h2_kg_in_dni_reactor_t’ndarray

    Hydrogen produced in the DNI reactor.

  • ’biogas_h2_procuded_h2_kg_in_el_reactor_t’ndarray

    Hydrogen produced in the electrical reactor.

Return type:

dict

N_time[source]
max_el_buy_from_grid_mw[source]
steam_turbine_efficiency[source]
hot_tank_efficiency[source]
steam_specific_heat_capacity[source]
hot_steam_temp_ms[source]
cold_steam_temp_ms[source]
heat_exchanger_efficiency[source]
hot_molten_salt_density[source]
heat_penalty_euro_per_mwht[source]
biogas_h2_reactor_dni_to_heat_efficiency[source]
biogas_h2_reactor_el_to_heat_efficiency[source]
biogas_h2_reactor_efficiency_curve[source]
maximum_h2_production_reactor_kg_per_m2[source]
life_h[source]
batch_size[source]
weeks_per_season_per_year = None[source]
setup()[source]

Declare inputs and outputs.

Available attributes:

name pathname comm options

compute(inputs, outputs)[source]

Compute outputs given inputs. The model is assumed to be in an unscaled state.

An inherited component may choose to either override this function or to define a compute_primal function.

Parameters:
  • inputs (Vector) – Unscaled, dimensional input variables read via inputs[key].

  • outputs (Vector) – Unscaled, dimensional output variables read via outputs[key].

  • discrete_inputs (dict-like or None) – If not None, dict-like object containing discrete input values.

  • discrete_outputs (dict-like or None) – If not None, dict-like object containing discrete output values.

hydesign.ems.EmsSolarX.ems_cplex_solarX(hpp_grid_connection, max_el_buy_from_grid_mw, grid_h2_capacity, cpv_inverter_mw, cpv_rated_mw, p_cpv_max_dni_t, flow_ms_max_t, flow_ms_max_cst_receiver_capacity, v_molten_salt_tank_m3, delta_q_hot_cold_ms_per_kg, heat_exchanger_capacity, v_max_hot_ms_percentage, v_min_hot_ms_percentage, efficiency_st, hot_tank_efficiency, p_rated_st, steam_specific_heat_capacity, hot_steam_temp_ms, cold_steam_temp_ms, hot_molten_salt_density, heat_penalty_euro_per_mwht, heat_exchanger_efficiency, max_solar_flux_dni_reactor_biogas_h2_t, biogas_h2_reactor_dni_to_heat_efficiency, biogas_h2_reactor_el_to_heat_efficiency, biogas_h2_reactor_efficiency_curve, area_dni_reactor_biogas_h2, area_el_reactor_biogas_h2, maximum_h2_production_reactor_kg_per_m2, heat_mwht_per_kg_h2, biogas_h2_mass_ratio, water_h2_mass_ratio, co2_h2_mass_ratio, price_el_t, price_h2_t, demand_q_t, price_water_t, price_co2_t, price_biogas_t, peak_hr_quantile, n_full_power_hours_expected_per_day_at_peak_price, batch_size)[source]

Energy Management System (EMS) Optimization for SolarX Plant.

This function sets up and executes an optimization model to manage energy flows in the SolarX plant, balancing production, storage, and consumption across various modules (CPV, hydrogen production, molten salt storage). The model optimizes revenue while minimizing penalties for unmet energy demands during peak hours.

Parameters:
  • hpp_grid_connection (float) – Maximum grid connection capacity in MW.

  • grid_h2_capacity (float) – Maximum grid hydrogen capacity in kg/h.

  • cpv_inverter_mw (float) – Rated capacity of the CPV inverter in MW.

  • cpv_rated_mw (float) – Rated capacity of the CPV receiver in MW.

  • p_cpv_max_dni_t (pd.Series) – Maximum CPV power time series based on DNI.

  • flow_ms_max_t (pd.Series) – Maximum molten salt flow rate time series in kg/h.

  • flow_ms_max_cst_receiver_capacity (float) – Maximum flow capacity of CST receiver in kg/h.

  • v_molten_salt_tank_m3 (float) – Volume of the hot molten salt tank in cubic meters.

  • delta_q_hot_cold_ms_per_kg (float) – Heat difference (kJ/kg) between hot and cold molten salt.

  • heat_exchanger_capacity (float) – Capacity of the steam heat exchanger in MW.

  • v_max_hot_ms_percentage (float) – Maximum allowable volume percentage for the hot molten salt tank.

  • v_min_hot_ms_percentage (float) – Minimum allowable volume percentage for the hot molten salt tank.

  • efficiency_st (float) – Efficiency of the steam turbine.

  • hot_tank_efficiency (float) – Efficiency of the hot molten salt storage tank.

  • steam_specific_heat_capacity (float) – Specific heat capacity of steam.

  • hot_steam_temp_ms (float) – Temperature of hot steam.

  • cold_steam_temp_ms (float) – Temperature of cold steam.

  • hot_molten_salt_density (float) – Density of molten salt in the hot tank.

  • heat_exchanger_efficiency (float) – Efficiency of the heat exchanger.

  • max_solar_flux_dni_reactor_biogas_h2_t (pd.Series) – DNI flux for hydrogen production in biogas reactor.

  • biogas_h2_reactor_dni_to_heat_efficiency (float) – Efficiency of DNI to heat in biogas reactor.

  • biogas_h2_reactor_el_to_heat_efficiency (float) – Efficiency of electricity to heat in biogas reactor.

  • biogas_h2_reactor_efficiency_curve (dict) – Efficiency curve data for biogas reactor.

  • area_dni_reactor_biogas_h2 (float) – DNI reactor area in biogas hydrogen module.

  • area_el_reactor_biogas_h2 (float) – EL reactor area in biogas hydrogen module.

  • maximum_h2_production_reactor_kg_per_m2 (float) – Max hydrogen production for DNI reactor.

  • heat_mwht_per_kg_h2 (float) – Required heat to produce 1 kg hydrogen.

  • biogas_h2_mass_ratio (float) – Biogas needed per kg hydrogen.

  • water_h2_mass_ratio (float) – Water needed per kg hydrogen.

  • co2_h2_mass_ratio (float) – CO2 needed per kg hydrogen.

  • price_el_t (pd.Series) – Electricity price time series.

  • price_h2_t (pd.Series) – Hydrogen price time series.

  • demand_q_t (pd.Series) – Heat demand time series.

  • price_water_t (pd.Series) – Water price time series.

  • price_co2_t (pd.Series) – CO2 price time series.

  • price_biogas_t (pd.Series) – Biogas price time series.

  • peak_hr_quantile (float) – Quantile for defining peak price hours.

  • n_full_power_hours_expected_per_day_at_peak_price (int) – Expected full power hours at peak price to avoid penalty.

  • batch_size (int) – Batch size for optimization.

Returns:

Each array contains time series data for various metrics: - p_hpp_t : ndarray

HPP power time series.

  • p_curtailment_tndarray

    HPP curtailed power time series.

  • p_cpv_tndarray

    CPV power time series.

  • p_st_tndarray

    Steam turbine power time series.

  • p_biogas_h2_tndarray

    Power time series for hydrogen production.

  • penalty_tndarray

    Penalty for unmet energy at peak hours.

  • flow_ms_heat_exchanger_tndarray

    Molten salt flow into heat exchanger.

  • flow_ms_q_tndarray

    Molten salt flow for heat production.

  • v_hot_ms_tndarray

    Volume of molten salt in hot tank.

  • alpha_cpv_tndarray

    Share of solar flux to CPV.

  • alpha_h2_tndarray

    Share of solar flux to hydrogen production.

  • h2_tndarray

    Hydrogen production time series.

  • q_tndarray

    Heat production time series.

  • biogas_tndarray

    Biogas consumption.

  • water_tndarray

    Water consumption.

  • co2_tndarray

    CO2 consumption.

  • p_st_max_dni_tndarray

    Maximum steam turbine power.

  • q_max_dni_tndarray

    Maximum heat production.

  • flow_steam_st_tndarray

    Steam flow in turbine.

  • biogas_h2_procuded_h2_kg_in_dni_reactor_tndarray

    H2 produced in DNI reactor.

  • biogas_h2_procuded_h2_kg_in_el_reactor_tndarray

    H2 produced in EL reactor.

Return type:

tuple of np.ndarray

hydesign.ems.EmsSolarX.ems_cplex_solarX_parts(hpp_grid_connection, max_el_buy_from_grid_mw, grid_h2_capacity, p_cpv_max_dni_t, cpv_inverter_mw, cpv_rated_mw, flow_ms_max_t, v_molten_salt_tank_m3, delta_q_hot_cold_ms_per_kg, p_rated_st, efficiency_st, hot_tank_efficiency, heat_exchanger_capacity, v_max_hot_ms_percentage, v_min_hot_ms_percentage, flow_ms_max_cst_receiver_capacity, steam_specific_heat_capacity, hot_steam_temp_ms, cold_steam_temp_ms, hot_molten_salt_density, heat_penalty_euro_per_mwht, heat_exchanger_efficiency, heat_mwht_per_kg_h2, biogas_h2_reactor_dni_to_heat_efficiency, biogas_h2_reactor_el_to_heat_efficiency, biogas_h2_reactor_efficiency_curve, area_dni_reactor_biogas_h2, area_el_reactor_biogas_h2, maximum_h2_production_reactor_kg_per_m2, max_solar_flux_dni_reactor_biogas_h2_t, biogas_h2_mass_ratio, water_h2_mass_ratio, co2_h2_mass_ratio, price_el_t, price_h2_t, demand_q_t, price_water_t, price_co2_t, price_biogas_t, peak_hr_quantile, n_full_power_hours_expected_per_day_at_peak_price, batch_size)[source]

Energy Management System (EMS) Optimization Parts for SolarX Plant.

This function handles specific optimization calculations and constraints for CPV, hydrogen production, and molten salt storage in the SolarX energy plant. It separates parts of the EMS model for improved performance and parallel optimization.

Parameters:
  • hpp_grid_connection (float) – Maximum grid connection capacity in MW.

  • grid_h2_capacity (float) – Maximum grid hydrogen capacity in kg/h.

  • cpv_inverter_mw (float) – Rated capacity of the CPV inverter in MW.

  • cpv_rated_mw (float) – Rated capacity of the CPV receiver in MW.

  • p_cpv_max_dni_t (pd.Series) – Maximum CPV power time series based on DNI.

  • flow_ms_max_t (pd.Series) – Maximum molten salt flow rate time series in kg/h.

  • v_molten_salt_tank_m3 (float) – Volume of the hot molten salt tank in cubic meters.

  • delta_q_hot_cold_ms_per_kg (float) – Heat difference between hot and cold molten salt.

  • biogas_h2_mass_ratio (float) – Ratio of biogas required per kg hydrogen.

  • water_h2_mass_ratio (float) – Ratio of water required per kg hydrogen.

  • co2_h2_mass_ratio (float) – Ratio of CO2 required per kg hydrogen.

  • p_rated_st (float) – Rated power for steam turbine.

  • efficiency_st (float) – Efficiency of steam turbine.

  • heat_exchanger_capacity (float) – Maximum capacity of steam heat exchanger.

  • v_max_hot_ms_percentage (float) – Maximum allowable molten salt volume percentage.

  • v_min_hot_ms_percentage (float) – Minimum allowable molten salt volume percentage.

  • biogas_h2_reactor_dni_to_heat_efficiency (float) – DNI to heat efficiency for hydrogen reactor.

  • biogas_h2_reactor_el_to_heat_efficiency (float) – Electricity to heat efficiency for hydrogen reactor.

  • biogas_h2_reactor_efficiency_curve (dict) – Efficiency curve for biogas reactor.

  • area_dni_reactor_biogas_h2 (float) – Area of the DNI reactor in m².

  • area_el_reactor_biogas_h2 (float) – Area of the EL reactor in m².

  • maximum_h2_production_reactor_kg_per_m2 (float) – Maximum hydrogen production in DNI reactor.

  • heat_mwht_per_kg_h2 (float) – Required heat to produce 1 kg hydrogen.

  • parameters] (... [remaining)

Returns:

Tuple containing arrays for key metrics across the plant: - p_hpp_t : ndarray

HPP power time series.

  • p_curtailment_tndarray

    HPP curtailed power.

  • p_cpv_tndarray

    CPV power time series.

  • p_st_tndarray

    Steam turbine power time series.

  • p_biogas_h2_tndarray

    Hydrogen production power time series.

  • penalty_tndarray

    Penalty for unmet peak hour requirements.

  • flow_ms_heat_exchanger_tndarray

    Molten salt flow in steam generator.

  • flow_ms_q_tndarray

    Molten salt flow for heat production.

  • v_hot_ms_tndarray

    Volume of hot molten salt.

  • alpha_cpv_tndarray

    Share of flux to CPV.

  • alpha_h2_tndarray

    Share of flux to H2.

  • h2_tndarray

    H2 production time series.

  • q_tndarray

    Heat production time series.

  • consumed_biogas_tndarray

    Biogas consumption.

  • consumed_water_tndarray

    Water consumption.

  • consumed_co2_tndarray

    CO2 consumption.

  • p_st_max_dni_tndarray

    Maximum power in steam turbine.

  • q_max_dni_tndarray

    Maximum heat production.

  • flow_steam_st_tndarray

    Steam flow in turbine.

  • biogas_h2_procuded_h2_kg_in_dni_reactor_tndarray

    H2 produced in DNI reactor.

  • biogas_h2_procuded_h2_kg_in_el_reactor_tndarray

    H2 produced in EL reactor.

Return type:

tuple of np.ndarray

hydesign.ems.EmsSolarX.expand_to_lifetime(x, life_h=25 * 365 * 24, weeks_per_season_per_year=None)[source]

Expands (by repeating) a given variable to match an expected lifetime length.

If weeks_per_season_per_year is an int then it will first build a year out of the selected weeks

Parameters:
  • x (input variable)

  • life_h (lifetime in hours.)

  • weeks_per_season_per_year (None or int.)

Returns:

x_ext

Return type:

extended variable

hydesign.ems.EmsSolarX.split_in_batch(array, N)[source]