Skip to content

Commit f6d0e51

Browse files
committed
Little things
1 parent 852cd20 commit f6d0e51

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
@@ -557,8 +557,14 @@ def shaded_fraction1d(
557557

558558
def martinez_shade_factor(shaded_fraction, N_shaded_blocks, N_total_blocks):
559559
r"""
560-
A shading correction factor for the power yield of non-monolithic Silicon
560+
A shading correction factor for the direct and circumsolar incident
561+
irradiance of non-monolithic Silicon
561562
modules and arrays with an arbitrary number of bypass diodes.
563+
564+
.. versionadded:: 0.10.5
565+
566+
Parameters
567+
----------
562568
shaded_fraction : numeric
563569
Surface shaded fraction. Unitless.
564570
shaded_blocks : numeric
@@ -569,7 +575,7 @@ def martinez_shade_factor(shaded_fraction, N_shaded_blocks, N_total_blocks):
569575
Returns
570576
-------
571577
shading_correction_factor : numeric
572-
Multiply unshaded power by this factor.
578+
Multiply direct and circumsolar irradiance by this factor.
573579
574580
Notes
575581
-----
@@ -580,9 +586,9 @@ def martinez_shade_factor(shaded_fraction, N_shaded_blocks, N_total_blocks):
580586
(1 - F_{ES}) = (1 - F_{GS}) (1 - \frac{N_{SB}}{N_{TB} + 1})
581587
582588
Where :math:`(1 - F_{ES})` is the correction factor to be multiplied by
583-
the unshaded irradiance, :math:`F_{GS}` is the shaded fraction,
584-
:math:`N_{SB}` is the number of shaded blocks and :math:`N_{TB}` is the
585-
number of total blocks.
589+
the direct and circumsolar irradiance, :math:`F_{GS}` is the shaded
590+
fraction of the collector, :math:`N_{SB}` is the number of shaded blocks
591+
and :math:`N_{TB}` is the number of total blocks.
586592
587593
Blocks terminology
588594
^^^^^^^^^^^^^^^^^^
@@ -597,6 +603,16 @@ def martinez_shade_factor(shaded_fraction, N_shaded_blocks, N_total_blocks):
597603
- whether or not the module is comprised of *half-cut cells*
598604
The latter two are heavily correlated.
599605
606+
For example:
607+
- A module with 3 bypass diodes and 3 junction boxes is likely to have
608+
3 blocks.
609+
- A module with 1 bypass diode and 1 junction box is likely to have 1
610+
block.
611+
- A module with 3 bypass diodes and 1 junction box is likely to have 3
612+
blocks.
613+
- A module with 1 bypass diode and 3 junction boxes is likely to have 1
614+
block.
615+
600616
Examples
601617
--------
602618
Minimal example. For a complete example, see
@@ -606,15 +622,18 @@ def martinez_shade_factor(shaded_fraction, N_shaded_blocks, N_total_blocks):
606622
>>> total_blocks = 3 # blocks along the vertical of the module
607623
>>> Pwr_out_unshaded = 100 # kW
608624
>>> shaded_fraction = shading.shaded_fraction1d(
609-
TODO copy from linear loss PR
625+
80, 180, 90, 25,
626+
collector_width=0.5, row_pitch=1, surface_to_axis_offset=0,
627+
cross_axis_slope=5.711, shading_tracker_tilt=50)
610628
)
611629
>>> shaded_blocks = np.ceil(total_blocks*shaded_fraction)
612630
>>> loss_correction = shading.martinez_shade_factor()
613631
>>> Pwr_out_shaded = Pwr_out_unshaded * loss_correction
614632
615633
See Also
616634
--------
617-
pvlib.shading.linear_shade_loss for monolithic thin film modules
635+
shaded_fraction1d : to calculate 1-dimensional shaded fraction
636+
linear_shade_loss
618637
619638
References
620639
----------

0 commit comments

Comments
 (0)