pvfactors.run.run_parallel_engine

pvfactors.run.run_parallel_engine(report_builder, pvarray_parameters, timestamps, dni, dhi, solar_zenith, solar_azimuth, surface_tilt, surface_azimuth, albedo, cls_pvarray=<class 'pvfactors.geometry.pvarray.OrderedPVArray'>, cls_engine=<class 'pvfactors.engine.PVEngine'>, cls_irradiance=<class 'pvfactors.irradiance.models.HybridPerezOrdered'>, cls_vf=<class 'pvfactors.viewfactors.calculator.VFCalculator'>, fast_mode_pvrow_index=None, fast_mode_segment_index=None, irradiance_model_params=None, vf_calculator_params=None, n_processes=2, ghi=None)[source]

Run timeseries simulation using multiprocessing. Here, instead of a function that will build the report, the users will need to pass a class (or an object).

Parameters
  • report_builder (class or object) – Class or object that will build and merge the reports. It must have a build() and a merge() method that perform the tasks

  • pvarray_parameters (dict) – The parameters defining the PV array

  • timestamps (array-like) – List of timestamps of the simulation.

  • dni (array-like) – Direct normal irradiance values [W/m2]

  • dhi (array-like) – Diffuse horizontal irradiance values [W/m2]

  • solar_zenith (array-like) – Solar zenith angles [deg]

  • solar_azimuth (array-like) – Solar azimuth angles [deg]

  • surface_tilt (array-like) – Surface tilt angles, from 0 to 180 [deg]

  • surface_azimuth (array-like) – Surface azimuth angles [deg]

  • albedo (array-like) – Albedo values (or ground reflectivity)

  • cls_pvarray (class of PV array, optional) – Class that will be used to build the PV array (Default = OrderedPVArray class)

  • cls_engine (class of PV engine, optional) – Class of the engine to use to run the simulations (Default = PVEngine class)

  • cls_irradiance (class of irradiance model, optional) – The irradiance model that will be applied to the PV array (Default = HybridPerezOrdered class)

  • cls_vf (class of VF calculator, optional) – Calculator that will be used to calculate the view factor matrices (Default = VFCalculator class)

  • fast_mode_pvrow_index (int, optional) – If a valid pvrow index is passed, then the PVEngine fast mode will be activated and the engine calculation will be done only for the back surface of the selected pvrow (Default = None)

  • fast_mode_segment_index (int, optional) – If a segment index is passed, then the PVEngine fast mode will calculate back surface irradiance only for the selected segment of the selected back surface (Default = None)

  • irradiance_model_params (dict, optional) – Dictionary of parameters that will be passed to the irradiance model class as kwargs at instantiation (Default = None)

  • vf_calculator_params (dict, optional) – Dictionary of parameters that will be passed to the VF calculator class as kwargs at instantiation (Default = None)

  • n_processes (int, optional) – Number of parallel processes to run for the calculation (Default = 2)

  • ghi (array-like, optional) – Global horizontal irradiance values [W/m2] (Default = None)

Returns

Saved results from the simulation, as specified by user’s report class (or object)

Return type

report