We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f2f6132 commit 113082eCopy full SHA for 113082e
1 file changed
tests/test_transformer.py
@@ -58,3 +58,24 @@ def test_simple_efficiency_known_values():
58
*args),
59
rating,
60
)
61
+
62
63
+def test_simple_efficiency_zero_load_loss():
64
65
+ input_power = 1000.0
66
+ no_load_loss = 0.01
67
+ load_loss = 0.0
68
+ transformer_rating = 1000.0
69
70
+ result = transformer.simple_efficiency(
71
+ input_power=input_power,
72
+ no_load_loss=no_load_loss,
73
+ load_loss=load_loss,
74
+ transformer_rating=transformer_rating,
75
+ )
76
77
+ # for load_loss = 0, the model reduces to:
78
+ # P_out = P_in - L_no_load * P_nom
79
+ expected = input_power - no_load_loss * transformer_rating
80
81
+ assert_allclose(result, expected)
0 commit comments