Skip to content

Commit

Permalink
Determine current through Y and Z #138
Browse files Browse the repository at this point in the history
  • Loading branch information
mph- committed Sep 9, 2024
1 parent 6df00a4 commit 748aefd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion lcapy/mna.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def _solve(self):
# Calculate the branch currents. These should be lazily
# evaluated as required.
for elt in cct.elements.values():
if elt.type in ('R', 'NR', 'C'):
if elt.type in ('R', 'NR', 'C', 'Y', 'Z'):
n1 = cct.node_map[elt.node_names[0]]
n2 = cct.node_map[elt.node_names[1]]
V1, V2 = self._Vdict[n1], self._Vdict[n2]
Expand Down
2 changes: 0 additions & 2 deletions lcapy/mnacpts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2278,15 +2278,13 @@ class XT(Misc):
class Y(RC):
"""Admittance"""

need_branch_current = True
is_reactive = True
add_parallel = True


class Z(RC):
"""Impedance"""

need_branch_current = True
is_reactive = True
add_series = True

Expand Down

0 comments on commit 748aefd

Please sign in to comment.