Skip to content

Non-existent parameter in the split_branch() function of the short-circuit driver #426

@slazar394

Description

@slazar394

Bug description
The function split_branch() used for calculations of short-circuits at a predefined distance from the line attempts to access the conductance property of the branch (G), which doesn't exist for lines. This property is not used later in the function. In addition, the function attempts to modify bus.Zf property which doesn't exist.

To reproduce
import VeraGridEngine as vge
import os

folder = os.path.join('..', 'Grids_and_profiles', 'grids')
fname = os.path.join(folder, 'South Island of New Zealand.veragrid')

network = vge.open_file(filename=fname)

pf_options = vge.PowerFlowOptions()
pf = vge.PowerFlowDriver(network, pf_options)
pf.run()

sc_options = vge.ShortCircuitOptions(mid_line_fault=True, branch_index=1, branch_fault_locations=0.5, fault_type=vge.FaultType.LG)

sc = vge.ShortCircuitDriver(network, options=sc_options, pf_options=pf_options, pf_results=pf.results)
vge.run()

Fix
Line 108 (g = branch.G) should be removed from the split_branch() function in the ShortCircuitDriver class.
Line 123 (middle_bus.Zf = complex(r_fault, x_fault)) should be changed to (middle_bus.r_fault = r_fault and middle_bus.x_fault = x_fault).

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions