Skip to content

Commit 865bfdf

Browse files
committed
updated formatting of docstring
1 parent aa31498 commit 865bfdf

File tree

1 file changed

+30
-27
lines changed

1 file changed

+30
-27
lines changed

pvlib/transformer.py

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,38 @@ def simple_efficiency(
1717
1818
The equation used in this function can be derived from [1]_.
1919
20+
21+
Parameters
22+
----------
23+
input_power : numeric
24+
The real power input to the transformer. [W]
25+
26+
no_load_loss : numeric
27+
The constant losses experienced by a transformer, even
28+
when the transformer is not under load. Fraction of transformer rating,
29+
value from 0 to 1. [unitless]
30+
31+
load_loss: numeric
32+
The load dependent losses experienced by the transformer.
33+
Fraction of transformer rating, value from 0 to 1. [unitless]
34+
35+
transformer_rating: numeric
36+
The nominal output power of the transformer. [VA]
37+
38+
Returns
39+
-------
40+
output_power : numeric
41+
Real power output. [W]
42+
43+
Notes
44+
-------
2045
First, assume that the load loss is proportional to the square of output
2146
power.
2247
2348
.. math::
24-
L_{load}(P_{out}) = L_{load}(P_{out}) * P^2_{out}
25-
L_{load}(P_{out}) = L_{full, load} * P^2_{out}
49+
50+
L_{load}(P_{out}) = L_{load}(P_{out}) * P^2_{out}
51+
L_{load}(P_{out}) = L_{full, load} * P^2_{out}
2652
2753
Total loss is the variable load loss, plus a constant no-load loss:
2854
@@ -41,7 +67,7 @@ def simple_efficiency(
4167
4268
Now use quadratic formula to solve for $P_{out}$ as a function of $P_in$.
4369
44-
..math::
70+
.. math::
4571
4672
P_{out} = \frac{-b +- \sqrt{b^2 - 4ac}}{2a}
4773
a = L_{full, load}
@@ -50,7 +76,7 @@ def simple_efficiency(
5076
5177
Therefore:
5278
53-
..math::
79+
.. math::
5480
5581
P_{out} = \frac{-1 +- \sqrt{1 - 4*L_{full, load}*L_{no, load} -
5682
P_{in}}}{2*L_{no, load} - P_{in}}
@@ -59,29 +85,6 @@ def simple_efficiency(
5985
positive.
6086
6187
62-
Parameters
63-
----------
64-
input_power : numeric
65-
The real power input to the transformer. [W]
66-
67-
no_load_loss : numeric
68-
The constant losses experienced by a transformer, even
69-
when the transformer is not under load. Fraction of transformer rating,
70-
value from 0 to 1. [unitless]
71-
72-
load_loss: numeric
73-
The load dependent losses experienced by the transformer.
74-
Fraction of transformer rating, value from 0 to 1. [unitless]
75-
76-
transformer_rating: numeric
77-
The nominal output power of the transformer. [VA]
78-
79-
Returns
80-
-------
81-
output_power : numeric
82-
Real power output. [W]
83-
84-
8588
References
8689
----------
8790
.. [1] Central Station Engineers of the Westinghouse Electric Corporation,

0 commit comments

Comments
 (0)