pvlib.modelchain.ModelChain.run_model_from_poa#

ModelChain.run_model_from_poa(data)[source]#

Run the model starting with broadband irradiance in the plane of array.

Data must include direct, diffuse and total irradiance (W/m2) in the plane of array. Reflections and spectral adjustments are made to calculate effective irradiance (W/m2).

Parameters:

data (DataFrame, or tuple or list of DataFrame) –

Required column names include 'poa_global', 'poa_direct' and 'poa_diffuse'. If optional columns 'temp_air' and 'wind_speed' are not provided, air temperature of 20 C and wind speed of 0 m/s are assumed. If optional column 'cell_temperature' is provided, these values are used instead of temperature_model. If optional column 'module_temperature' is provided, temperature_model must be 'sapm'.

If the ModelChain’s PVSystem has multiple arrays, data must be a list or tuple with the same length and order as the PVsystem’s Arrays. Each element of data provides the irradiance and weather for the corresponding array.

Returns:

self

Raises:
  • ValueError – If the number of DataFrames in data is different than the number of Arrays in the PVSystem.

  • ValueError – If the DataFrames in data have different indexes.

Examples

Single-array system:

>>> import pandas as pd
>>> from pvlib.pvsystem import PVSystem, Array, FixedMount
>>> from pvlib.location import Location
>>> from pvlib.modelchain import ModelChain
>>> location = Location(35, -110)
>>> mount = FixedMount(surface_tilt=30, surface_azimuth=180)
>>> array = Array(
...     mount=mount,
...     module_parameters={'pdc0': 300, 'gamma_pdc': -0.004},
...     temperature_model_parameters={'u0': 25.0, 'u1': 6.84}
... )
>>> system = PVSystem(
...     arrays=[array],
...     inverter_parameters={'pdc0': 300}
... )
>>> mc = ModelChain(
...     system, location,
...     dc_model="pvwatts", ac_model="pvwatts",
...     aoi_model="no_loss", spectral_model="no_loss",
...     temperature_model="faiman"
... )
>>> poa = pd.DataFrame({
...     'poa_global': [900, 850],
...     'poa_direct': [600, 560],
...     'poa_diffuse': [300, 290],},
...     index=pd.date_range("2021-06-01", periods=2, freq="h"))
>>> _ = mc.run_model_from_poa(poa)

Multi-array system:

>>> mount1 = FixedMount(surface_tilt=30, surface_azimuth=180)
>>> mount2 = FixedMount(surface_tilt=10, surface_azimuth=90)
>>> array1 = Array(
...     mount=mount1,
...     module_parameters={'pdc0': 300, 'gamma_pdc': -0.004},
...     temperature_model_parameters={'u0': 25.0, 'u1': 6.84}
... )
>>> array2 = Array(
...     mount=mount2,
...     module_parameters={'pdc0': 200, 'gamma_pdc': -0.004},
...     temperature_model_parameters={'u0': 25.0, 'u1': 6.84}
... )
>>> system = PVSystem(
...     arrays=[array1, array2],
...     inverter_parameters={'pdc0': 500}
... )
>>> mc = ModelChain(
...     system, location,
...     dc_model="pvwatts", ac_model="pvwatts",
...     aoi_model="no_loss", spectral_model="no_loss",
...     temperature_model="faiman"
... )
>>> poa1 = pd.DataFrame({
...     'poa_global': [900, 880],
...     'poa_direct': [600, 580],
...     'poa_diffuse': [300, 300],},
...     index=pd.date_range("2021-06-01", periods=2, freq="h"))
>>> poa2 = pd.DataFrame({
...     'poa_global': [700, 720],
...     'poa_direct': [400, 420],
...     'poa_diffuse': [300, 300],},
...     index=poa1.index)
>>> _ = mc.run_model_from_poa(
...         [poa1, poa2]
... )

Notes

Assigns attributes to results: times, weather, solar_position, airmass, total_irrad, aoi, aoi_modifier, spectral_modifier, and effective_irradiance, cell_temperature, dc, ac, losses, diode_params (if dc_model is a single diode model).

Examples using pvlib.modelchain.ModelChain.run_model_from_poa#

4.7 MW CdTe single-axis tracking (OEDI System 9068)

4.7 MW CdTe single-axis tracking (OEDI System 9068)