Skip to content

Commit 11bcc1d

Browse files
committed
Merge branch 'main' of https://github.com/pvlib/pvlib-python into get_irrad_float
2 parents 9c06acd + 4cfda4a commit 11bcc1d

File tree

2 files changed

+44
-32
lines changed

2 files changed

+44
-32
lines changed

docs/sphinx/source/whatsnew/v0.11.2.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Enhancements
1414

1515
Documentation
1616
~~~~~~~~~~~~~
17+
* Edited docstrings for :py:func:`~pvlib.pvsystem.dc_ohms_from_percent` and
18+
:py:func:`~pvlib.pvsystem.dc_ohmic_loss` for clarity. (:issue:`1601`, :pull:`2229`)
1719

1820

1921
Testing
@@ -26,5 +28,5 @@ Requirements
2628

2729
Contributors
2830
~~~~~~~~~~~~
29-
31+
* Cliff Hansen (:ghuser:`cwhanse`)
3032

pvlib/pvsystem.py

Lines changed: 41 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2888,46 +2888,49 @@ def pvwatts_losses(soiling=2, shading=3, snow=0, mismatch=2, wiring=2,
28882888
def dc_ohms_from_percent(vmp_ref, imp_ref, dc_ohmic_percent,
28892889
modules_per_string=1,
28902890
strings=1):
2891-
"""
2892-
Calculates the equivalent resistance of the wires from a percent
2893-
ohmic loss at STC.
2894-
2895-
Equivalent resistance is calculated with the function:
2896-
2897-
.. math::
2898-
Rw = (L_{stc} / 100) * (Varray / Iarray)
2899-
2900-
:math:`Rw` is the equivalent resistance in ohms
2901-
:math:`Varray` is the Vmp of the modules times modules per string
2902-
:math:`Iarray` is the Imp of the modules times strings per array
2903-
:math:`L_{stc}` is the input dc loss percent
2891+
r"""
2892+
Calculate the equivalent resistance of the conductors from the percent
2893+
ohmic loss of an array at reference conditions.
29042894
29052895
Parameters
29062896
----------
29072897
vmp_ref: numeric
2908-
Voltage at maximum power in reference conditions [V]
2898+
Maximum power voltage of one module at reference conditions. [V]
29092899
imp_ref: numeric
2910-
Current at maximum power in reference conditions [V]
2911-
dc_ohmic_percent: numeric, default 0
2912-
input dc loss as a percent, e.g. 1.5% loss is input as 1.5
2900+
Maximum power current of one module at reference conditions. [A]
2901+
dc_ohmic_percent: numeric
2902+
Array DC power loss as a percent of DC power loss at reference
2903+
conditions. In percent, e.g. 1.5% loss is input as 1.5.
29132904
modules_per_string: int, default 1
2914-
Number of modules per string in the array.
2905+
Number of series-connected modules per string in the array.
29152906
strings: int, default 1
29162907
Number of parallel strings in the array.
29172908
29182909
Returns
29192910
----------
29202911
Rw: numeric
2921-
Equivalent resistance [ohm]
2912+
Equivalent resistance. [ohm]
29222913
29232914
See Also
29242915
--------
29252916
pvlib.pvsystem.dc_ohmic_losses
29262917
2927-
References
2928-
----------
2929-
.. [1] PVsyst 7 Help. "Array ohmic wiring loss".
2930-
https://www.pvsyst.com/help/ohmic_loss.htm
2918+
Notes
2919+
-----
2920+
Equivalent resistance is calculated as:
2921+
2922+
.. math::
2923+
2924+
R_w = \left(\frac{L_{stc}}{100}\right) \times \left(\frac{
2925+
V_{array}}{I_{array}}\right)
2926+
2927+
:math:`R_w` is the equivalent resistance in ohms.
2928+
:math:`V_{array}` is the array voltage, equal to ``vmp_ref`` times
2929+
``modules_per_string``.
2930+
:math:`I_{array}` is the array current, equal to ``imp_ref`` times
2931+
``strings``.
2932+
:math:`L_{stc}` is the input DC loss percent at reference conditions.
2933+
29312934
"""
29322935
vmp = modules_per_string * vmp_ref
29332936

@@ -2939,30 +2942,37 @@ def dc_ohms_from_percent(vmp_ref, imp_ref, dc_ohmic_percent,
29392942

29402943

29412944
def dc_ohmic_losses(resistance, current):
2942-
"""
2945+
r"""
29432946
Returns ohmic losses in units of power from the equivalent
29442947
resistance of the wires and the operating current.
29452948
29462949
Parameters
29472950
----------
29482951
resistance: numeric
2949-
Equivalent resistance of wires [ohm]
2952+
Equivalent resistance of wires. [ohm]
29502953
current: numeric, float or array-like
2951-
Operating current [A]
2954+
Operating current. [A]
29522955
29532956
Returns
29542957
----------
29552958
loss: numeric
2956-
Power Loss [W]
2959+
Power loss. [W]
29572960
29582961
See Also
29592962
--------
29602963
pvlib.pvsystem.dc_ohms_from_percent
29612964
2962-
References
2963-
----------
2964-
.. [1] PVsyst 7 Help. "Array ohmic wiring loss".
2965-
https://www.pvsyst.com/help/ohmic_loss.htm
2965+
Notes
2966+
-----
2967+
Ohmic (also termed joule or heat) loss is the power lost due to current
2968+
flowing through a conductor. Ohmic loss, :math:`L`, is computed as
2969+
2970+
.. math::
2971+
2972+
L = I \times R^2
2973+
2974+
where :math:`I` is the current (A) and :math:`R` is the resistance of the
2975+
conductor (ohms).
29662976
"""
29672977
return resistance * current * current
29682978

0 commit comments

Comments
 (0)