Skip to content

Commit 3425793

Browse files
committed
Little things
1 parent 7d9f538 commit 3425793

File tree

2 files changed

+50
-44
lines changed

2 files changed

+50
-44
lines changed
Lines changed: 24 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,39 @@
11
"""
2-
Calculating power loss from partial module shading
3-
==================================================
2+
Modelling power loss due to module shading in non-monolithic Si arrays
3+
======================================================================
44
5-
Example of modeling cell-to-cell mismatch loss from partial module shading.
5+
This example demonstrates how to model power loss due to row-to-row shading in
6+
a PV array comprised of non-monolithic silicon cells.
67
"""
78

89
# %%
9-
# Even though the PV cell is the primary power generation unit, PV modeling is
10-
# often done at the module level for simplicity because module-level parameters
11-
# are much more available and it significantly reduces the computational scope
12-
# of the simulation. However, module-level simulations are too coarse to be
13-
# able to model effects like cell to cell mismatch or partial shading. This
14-
# example calculates cell-level IV curves and combines them to reconstruct
15-
# the module-level IV curve. It uses this approach to find the maximum power
16-
# under various shading and irradiance conditions.
17-
#
18-
# The primary functions used here are:
19-
#
20-
# - :py:meth:`pvlib.pvsystem.calcparams_desoto` to estimate the single
21-
# diode equation parameters at some specified operating conditions.
22-
# - :py:meth:`pvlib.singlediode.bishop88` to calculate the full cell IV curve,
23-
# including the reverse bias region.
24-
#
25-
# .. note::
26-
#
27-
# This example requires the reverse bias functionality added in pvlib 0.7.2
28-
#
29-
# .. warning::
30-
#
31-
# Modeling partial module shading is complicated and depends significantly
32-
# on the module's electrical topology. This example makes some simplifying
33-
# assumptions that are not generally applicable. For instance, it assumes
34-
# that shading only applies to beam irradiance (*i.e.* all cells receive
35-
# the same amount of diffuse irradiance) and cell temperature is uniform
36-
# and not affected by cell-level irradiance variation.
10+
# The example is based on the work of Martinez et al. [1]_.
11+
# The model is implemented in :py:func:`pvlib.shading.martinez_shade_loss`.
12+
# This model corrects the beam and circumsolar incident irradiance
13+
# based on the number of shaded *blocks*. A *block* is defined as a
14+
# group of cells that are protected by a bypass diode.
15+
# More information on the *blocks* can be found in the original paper [1]_ and
16+
# in the function documentation.
17+
#
18+
# The following key functions are used in this example:
19+
# 1. :py:func:`pvlib.shading.martinez_shade_loss` to calculate the adjustment
20+
# 2. :py:func:`pvlib.shading.shading_factor1d` to calculate the fraction of
21+
# shaded surface and the number of shaded *blocks*, due to row-to-row
22+
# shading
23+
#
24+
# .. versionadded:: 0.10.5
25+
# .. sectionauthor:: Echedey Luis <[email protected]>
3726

38-
from pvlib import pvsystem, singlediode
27+
from pvlib import shading
3928
import pandas as pd
4029
import numpy as np
4130
from scipy.interpolate import interp1d
4231
import matplotlib.pyplot as plt
4332

44-
from scipy.constants import e as qe, k as kB
45-
33+
# TODO: REBASE FROM SHADING_FACTOR1D
4634

4735
# %%
48-
# Simulating a cell IV curve
36+
# yolo
4937
# --------------------------
5038
#
51-
# First, calculate IV curves for individual cells. The process is as follows:
52-
#
39+

pvlib/shading.py

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,14 @@ def shaded_fraction1d(
540540

541541
def martinez_shade_factor(shaded_fraction, N_shaded_blocks, N_total_blocks):
542542
r"""
543-
A shading correction factor for the power yield of non-monolithic Silicon
543+
A shading correction factor for the direct and circumsolar incident
544+
irradiance of non-monolithic Silicon
544545
modules and arrays with an arbitrary number of bypass diodes.
546+
547+
.. versionadded:: 0.10.5
548+
549+
Parameters
550+
----------
545551
shaded_fraction : numeric
546552
Surface shaded fraction. Unitless.
547553
shaded_blocks : numeric
@@ -552,7 +558,7 @@ def martinez_shade_factor(shaded_fraction, N_shaded_blocks, N_total_blocks):
552558
Returns
553559
-------
554560
shading_correction_factor : numeric
555-
Multiply unshaded power by this factor.
561+
Multiply direct and circumsolar irradiance by this factor.
556562
557563
Notes
558564
-----
@@ -563,9 +569,9 @@ def martinez_shade_factor(shaded_fraction, N_shaded_blocks, N_total_blocks):
563569
(1 - F_{ES}) = (1 - F_{GS}) (1 - \frac{N_{SB}}{N_{TB} + 1})
564570
565571
Where :math:`(1 - F_{ES})` is the correction factor to be multiplied by
566-
the unshaded irradiance, :math:`F_{GS}` is the shaded fraction,
567-
:math:`N_{SB}` is the number of shaded blocks and :math:`N_{TB}` is the
568-
number of total blocks.
572+
the direct and circumsolar irradiance, :math:`F_{GS}` is the shaded
573+
fraction of the collector, :math:`N_{SB}` is the number of shaded blocks
574+
and :math:`N_{TB}` is the number of total blocks.
569575
570576
Blocks terminology
571577
^^^^^^^^^^^^^^^^^^
@@ -580,6 +586,16 @@ def martinez_shade_factor(shaded_fraction, N_shaded_blocks, N_total_blocks):
580586
- whether or not the module is comprised of *half-cut cells*
581587
The latter two are heavily correlated.
582588
589+
For example:
590+
- A module with 3 bypass diodes and 3 junction boxes is likely to have
591+
3 blocks.
592+
- A module with 1 bypass diode and 1 junction box is likely to have 1
593+
block.
594+
- A module with 3 bypass diodes and 1 junction box is likely to have 3
595+
blocks.
596+
- A module with 1 bypass diode and 3 junction boxes is likely to have 1
597+
block.
598+
583599
Examples
584600
--------
585601
Minimal example. For a complete example, see
@@ -589,15 +605,18 @@ def martinez_shade_factor(shaded_fraction, N_shaded_blocks, N_total_blocks):
589605
>>> total_blocks = 3 # blocks along the vertical of the module
590606
>>> Pwr_out_unshaded = 100 # kW
591607
>>> shaded_fraction = shading.shaded_fraction1d(
592-
TODO copy from linear loss PR
608+
80, 180, 90, 25,
609+
collector_width=0.5, row_pitch=1, surface_to_axis_offset=0,
610+
cross_axis_slope=5.711, shading_tracker_tilt=50)
593611
)
594612
>>> shaded_blocks = np.ceil(total_blocks*shaded_fraction)
595613
>>> loss_correction = shading.martinez_shade_factor()
596614
>>> Pwr_out_shaded = Pwr_out_unshaded * loss_correction
597615
598616
See Also
599617
--------
600-
pvlib.shading.linear_shade_loss for monolithic thin film modules
618+
shaded_fraction1d : to calculate 1-dimensional shaded fraction
619+
linear_shade_loss
601620
602621
References
603622
----------

0 commit comments

Comments
 (0)