Modules

Main Module

solar_power_plants.executeModel(modelPayload: dict) list[source]

Function to execute the Solar Energy Model.

Parameters:

modelPayload (dict) –

The dictionary with the Model input payload:

Example: see "input.json" file in the root directory.

Returns:

list

solar_power_plants.executeSolarEnergyModelProcess(processPayload: dict, startTime: str, endTime: str) dict[source]

Function to execute the Solar Energy Model process.

Parameters:
  • processPayload (dict) –

    The dictionary with the process input payload:

    Example: see "input.json" file in the root directory.
    

  • startTime (str) – The start datetime, e.g., “2019-03-01T13:00:00”.

  • endTime (str) – The end datetime, e.g., “2019-03-02T13:00:00”.

Returns:

dict

solar_power_plants.main()[source]

Main function.

Parameters:
  • sys.argv[0] (str) – The current file name, e.g., “solar_power_plants.py”.

  • sys.argv[1] (str) – The process input data file path, e.g., “input.json”.

  • sys.argv[2] (str) – The start datetime, e.g., “2019-03-01T13:00:00”.

  • sys.argv[3] (str) – The end datetime, e.g., “2019-03-02T13:00:00”.

Returns:

None

Model Module

solar_energy_model.model.s01BuildSpecificConfiguration(payload: dict) tuple[source]

Model Step 01: Build the specific configuration.

Parameters:

payload (dict) –

The process payload:

Example: see "input.json" file in the root directory.

Returns:

tuple

solar_energy_model.model.s02LoadPreviousResult(nutsId: str) tuple[source]

Model Step 02: Load the previous result.

Parameters:

nutsId (str) – Identifier of NUTS2 region for which the analysis will be carried out.

Returns:

tuple

solar_energy_model.model.s03CalculateAvailableThermalArea(listParametersTH: list, systemCostTH: float, landUseTH: float) tuple[source]

Model Step 03: Calculate the available thermal area.

Parameters:
  • listParametersTH (list) –

    The list of thermal parameters. Example:

    [
        None,
        10,
        None
    ]
    

  • systemCostTH (float) – The thermal system cost in €.

  • landUseTH (int) – Land use ratio of CSP technology in W/m2 to compute required area for a given CSP power capacity.

Returns:

tuple

solar_energy_model.model.s04CalculateAvailablePVArea(listParametersPV: list, systemCostPV: float, landUsePV: float) tuple[source]

Model Step 04: Calculate the available PV area.

Parameters:
  • listParametersPV (list) –

    The list of PV parameters. Example:

    [
        None,
        200,
        None
    ]
    

  • systemCostPV (float) – The PV system cost in €.

  • landUsePV (int) – Land use ratio of PV technology in W/m2 to compute required area for a given PV power capacity.

Returns:

tuple

solar_energy_model.model.s05CalculateThermalProduction(scadaTH: DataFrame, scadaPV: DataFrame, areaTH: float, minGhiTH: float, landUseTH: float, effTH: float, effOp: float, aperture: float, convertCoord: int, year: int) tuple[source]

Model Step 05: Calculate the thermal production.

Parameters:
  • scadaTH (DataFrame) – The Dataframe corresponding to thermal scada.

  • scadaPV (DataFrame) – The Dataframe corresponding to PV scada.

  • areaTH (float) – The thermal area.

  • minGhiTH (float) – Minimum annual Global Horizontal Irradiance in kWh/m2 in a land area to install CSP systems.

  • landUseTH (float) – Land use ratio of CSP technology in W/m2 to compute required area for a given CSP power capacity.

  • effTH (float) – Thermal efficiency in % of collectors of CSP systems.

  • effOp (float) – Amount of incoming solar radiation in % captured in the collectors of CSP systems.

  • aperture (float) – Aperture area in % of solar field of CSP systems.

  • convertCoord (int) – Convert coordinates expressed into EPSG:3035 to EPSG:4326.

  • year (int) – Year for calculate time-series hourly production.

Returns:

tuple

solar_energy_model.model.s06CalculatePVProduction(scadaPV: DataFrame, areaPV: DataFrame, minGhiPV: float, landUsePV: float, tilt: float, azimuth: float, tracking: float, loss: float, convertCoord: int, year: int) tuple[source]

Model Step 06: Calculate the PV production.

Parameters:
  • scadaPV (DataFrame) – The Dataframe corresponding to PV scada.

  • areaPV (float) – The PV area.

  • minGhiPV (float) – Minimum annual Global Horizontal Irradiance in kWh/m2 in a land area to install PV systems.

  • landUsePV (float) – Land use ratio of PV technology in W/m2 to compute required area for a given PV power capacity.

  • tilt (float) – Tilt angle in º from horizontal plane.

  • azimuth (float) – Orientation (azimuth angle) of the (fixed) plane of array. Clockwise from north.

  • tracking (float) – Percentage in % of single-axis tracking systems from the total PV capacity. The rest is considered fixed mounted systems.

  • loss (float) – Percentage in % of power losses of PV systems. Please read the documentation to understand which other losses are already included in the model.

  • convertCoord (int) – Convert coordinates expressed into EPSG:3035 to EPSG:4326.

  • year (int) – Year for calculate time-series hourly production.

Returns:

tuple

solar_energy_model.model.s07CalculateAggregatedProduction(dfTH: DataFrame, dfPV: DataFrame, nameNuts2: str) DataFrame[source]

Model Step 07: Calculate the aggregated production.

Parameters:
  • dfTH (DataFrame) – The DataFrame corresponding to the thermal data.

  • dfPV (DataFrame) – The Dataframe corresponding to the PV data.

  • nameNuts2 (str) – The name of the NUTS2 region.

Returns:

pd.DataFrame

solar_energy_model.model.s08CalculateDistributedProduction(dfTH: DataFrame, nuts2TH: DataFrame, nuts2PV: DataFrame) DataFrame[source]

Model Step 08: Calculate the distributed production.

Parameters:
  • dfTH (DataFrame) – The DataFrame corresponding to the thermal data.

  • nuts2TH (DataFrame) – The Dataframe corresponding to the NUTS2 thermal data.

  • nuts2PV (DataFrame) – The Dataframe corresponding to the NUTS2 PV data.

Returns:

pd.DataFrame

solar_energy_model.model.s09SaveResults(prodAgreggated: DataFrame, nuts2Dist: DataFrame, dfTH: DataFrame, potDistTH: DataFrame, potDistPV: DataFrame, opexTH: DataFrame, opexPV: DataFrame) list[source]

Model Step 09: Save the results.

Parameters:
  • prodAgreggated (DataFrame) – The DataFrame corresponding to aggregated production.

  • nuts2Dist (DataFrame) – The Dataframe corresponding to the NUTS2 distribution data.

  • dfTH (DataFrame) – The DataFrame corresponding to the thermal data.

  • potDistTH (DataFrame) – The DataFrame corresponding to the thermal distributed power.

  • potDistPV (DataFrame) – The DataFrame corresponding to the PV distributed power.

  • opexTH (DataFrame) – The DataFrame corresponding to the thermal Opex.

  • opexPV (DataFrame) – The DataFrame corresponding to the PV Opex.

Returns:

list

solar_energy_model.model.x01GetCoord(df: DataFrame) tuple[source]

Auxiliary function 01: Get the coordinates.

Parameters:

df (DataFrame) – The source DataFrame.

Returns:

tuple

solar_energy_model.model.x02ThermalModel(radiation: DataFrame, effTH: float, effOp: float, aperture: float) list[source]

Auxiliary function 02: Get the thermal model.

Parameters:
  • radiation (DataFrame) – The radiation DataFrame.

  • effTH (float) – Thermal efficiency in % of collectors of CSP systems.

  • effOp (float) – Amount of incoming solar radiation in % captured in the collectors of CSP systems.

  • aperture (float) – Aperture area in % of solar field of CSP systems.

Returns:

list

solar_energy_model.model.x03GetAvailableArea(parameters: list, cost: float, landUse: float) tuple[source]

Auxiliary function 03: Get the available area.

Parameters:
  • parameters (list) – The list of parameters.

  • cost (float) – The system cost.

  • landUse (float) – The land use ratio.

Returns:

tuple

solar_energy_model.model.x04GetRegions(scada: DataFrame, area: float, minGHI: float) tuple[source]

Auxiliary function 04: Get the regions.

Parameters:
  • scada (DataFrame) – The source DataFrame.

  • area (float) – The source area.

  • minGHI (float) – Minimum annual Global Horizontal Irradiance in kWh/m2.

Returns:

tuple

solar_energy_model.model.x05GetThermalProduction(rows: list, landUse: float, effTH: float, effOp: float, aperture: float, convertCoord: bool, year: int) list[source]

Auxiliary function 05: Get the regions.

Parameters:
  • rows (list) – The source list of rows.

  • landUse (float) – The land use ratio.

  • effTH (float) – Thermal efficiency in % of collectors of CSP systems.

  • effOp (float) – Amount of incoming solar radiation in % captured in the collectors of CSP systems.

  • aperture (float) – Aperture area in % of solar field of CSP systems.

  • convertCoord (bool) – Convert coordinates expressed into EPSG:3035 to EPSG:4326.

  • year (int) – Year for calculate time-series hourly production.

Returns:

list

solar_energy_model.model.x06GetPVProduction(rows: list, landUse: float, tilt: float, azimuth: float, tracking: int, loss: float, convertCoord: bool, year: int) list[source]

Auxiliary function 06: Get the PV production.

Parameters:
  • rows (list) – The source list of rows.

  • landUse (float) – The land use ratio.

  • tilt (float) – Tilt angle in º from horizontal plane.

  • azimuth (float) – Orientation (azimuth angle) of the (fixed) plane of array. Clockwise from north.

  • tracking (float) – Percentage in % of single-axis tracking systems from the total PV capacity. The rest is considered fixed mounted systems.

  • loss (float) – Percentage in % of power losses of PV systems.

  • convertCoord (bool) – Convert coordinates expressed into EPSG:3035 to EPSG:4326.

  • year (int) – Year for calculate time-series hourly production.

Returns:

list

solar_energy_model.model.x07GetDistribution(rows: list, label: str) tuple[source]

Auxiliary function 07: Get the distribution.

Parameters:
  • rows (list) – The source list of rows.

  • label (str) – The label.

Returns:

tuple

solar_energy_model.model.x08CalculateOpex(dictData: dict, opexTH: float, opexPV: float) tuple[source]

Auxiliary function 08: Calculate the OPEX.

Parameters:
  • dictData (dict) – The source dictionary.

  • opexTH (float) – The thermal Opex.

  • opexPV (float) – The PV Opex.

Returns:

tuple

Validator Module

solar_energy_model.validator.validateCommandLineParameters(parameters: list)[source]

Funtion to validate the command line parameters.

Parameters:

parameters (list) –

The list of command line parameters. Example:

[
    "solar_power_plants.py",
    "input.json",
    "2019-03-01T13:00:00",
    "2019-03-02T13:00:00"
]

Returns:

None

solar_energy_model.validator.validateLimits(value: float, limitDown: float, limitUp: float) bool[source]

Function to check the limits of a given value.

Parameters:
  • value (float) – The value of the property to be evaluated.

  • limitDown (float) – The lower limit.

  • limitUp (float) – The highest limit.

Returns:

bool

solar_energy_model.validator.validateProcessOutput(result: dict) bool[source]

Funtion to validate the process output.

Parameters:

result (dict) –

The process result. Example:

{
     'time(UTC)': [
         Timestamp('2019-03-0113: 00: 00'),
         ...
         Timestamp('2019-03-0213: 00: 00')
     ],
     'Pthermal': [
         1.02e+01,
         ...
         7.73e+00
     ],
     'Ppv': [
         1.25e+02,
         ...
         1.26e+02
     ]
 }

Returns:

bool

solar_energy_model.validator.validateProcessPayload(payload: dict) dict[source]

Funtion to validate the process payload.

Parameters:

payload (dict) –

The process payload:

Example: see "input.json" file in the root directory.

Returns:

dict