VeraGridEngine.Simulations.ShortCircuitStudies package

Submodules

VeraGridEngine.Simulations.ShortCircuitStudies.converter_fault_controls module

VeraGridEngine.Simulations.ShortCircuitStudies.converter_fault_controls.current_limit_logic(Iqcmd, vdlq, vdlp, is_blocked)[source]
VeraGridEngine.Simulations.ShortCircuitStudies.converter_fault_controls.genstat(ur, ui, iq_ref, id_ref, Sn, is_blocked)[source]
VeraGridEngine.Simulations.ShortCircuitStudies.converter_fault_controls.reec_d(u, Vpf, Qpf, Ppf)[source]
VeraGridEngine.Simulations.ShortCircuitStudies.converter_fault_controls.regc_c(Iqcmd, Ipcmd)[source]
VeraGridEngine.Simulations.ShortCircuitStudies.converter_fault_controls.vdl(x, points)[source]

Linear approximation with clamping. points: list of (x_i, y_i), sorted by x_i

VeraGridEngine.Simulations.ShortCircuitStudies.converter_fault_controls.wecc_wt_type_4b(V_measured, Vpf, St_vsc_pf, S_base_vg, S_rated_vsc)[source]

VeraGridEngine.Simulations.ShortCircuitStudies.converter_fault_controls_no_ifs module

VeraGridEngine.Simulations.ShortCircuitStudies.converter_fault_controls_no_ifs.genstat(ur, ui, iq_ref, id_ref, Sn)[source]
VeraGridEngine.Simulations.ShortCircuitStudies.converter_fault_controls_no_ifs.reec_d(u, Vpf, Paux, Qext, Pref)[source]
VeraGridEngine.Simulations.ShortCircuitStudies.converter_fault_controls_no_ifs.regc_c(Iqcmd, ir, ii, ur, ui, fref, Fnom, Vt, Ipcmd, is_blocked)[source]
VeraGridEngine.Simulations.ShortCircuitStudies.converter_fault_controls_no_ifs.wecc_wt_type_4b_no_ifs(V_measured, P_measured, Q_measured, S_base_vg, S_rated_vsc, Vpf)[source]

VeraGridEngine.Simulations.ShortCircuitStudies.short_circuit module

VeraGridEngine.Simulations.ShortCircuitStudies.short_circuit.short_circuit_3p(bus_idx: int, Ybus: csc_matrix, Vbus: ndarray[tuple[Any, ...], dtype[complex128]], Vnom: ndarray[tuple[Any, ...], dtype[float64]], Zf: ndarray[tuple[Any, ...], dtype[complex128]], baseMVA: float) Tuple[ndarray[tuple[Any, ...], dtype[complex128]], float, float][source]

Executes a 3-phase balanced short circuit study :param bus_idx: Index of the bus at which the short circuit is being studied :param Ybus: Admittance matrix :param Vbus: Voltages of the buses in the steady state :param Vnom: Nominal Voltages of the buses (kV) :param Zf: Fault impedance array :param baseMVA: :return: Voltages after the short circuit (p.u.), Short circuit power in MVA Computed as V = Vpre + V increment, where Vpre is the power flow solution and V increment is the fault contribution The short-circuit power is V_i^2 / Z[i,i], it will tend to infinity if the generator is ideal (r1 and x1 approach 0)

VeraGridEngine.Simulations.ShortCircuitStudies.short_circuit.short_circuit_unbalance(bus_idx: int, Y0: csc_matrix, Y1: csc_matrix, Y2: csc_matrix, Vbus: ndarray[tuple[Any, ...], dtype[complex128]], Vnom: ndarray[tuple[Any, ...], dtype[float64]], Zf: ndarray[tuple[Any, ...], dtype[complex128]], fault_type: FaultType, baseMVA) Tuple[ndarray[tuple[Any, ...], dtype[complex128]], ndarray[tuple[Any, ...], dtype[complex128]], ndarray[tuple[Any, ...], dtype[complex128]], ndarray[tuple[Any, ...], dtype[complex128]], ndarray[tuple[Any, ...], dtype[complex128]]][source]

Executes the unbalanced short circuits (LG, LL, LLG types)

Parameters:
  • bus_idx – bus where the fault is caused

  • Y0 – Admittance matrix for the zero sequence

  • Y1 – Admittance matrix for the positive sequence

  • Y2 – Admittance matrix for the negative sequence

  • Vbus – pre-fault voltage (positive sequence)

  • Vnom – nominal voltage (kV)

  • Zf – fault impedance

  • fault_type – type of unbalanced fault

  • baseMVA – base MVA (100 MVA)

Returns:

V0, V1, V2 for all buses

VeraGridEngine.Simulations.ShortCircuitStudies.short_circuit_driver module

class VeraGridEngine.Simulations.ShortCircuitStudies.short_circuit_driver.ShortCircuitDriver(grid: MultiCircuit, options: ShortCircuitOptions | None, pf_options: PowerFlowOptions | None, pf_results: PowerFlowResults | None, pf_results3ph: PowerFlowResults3Ph | None, opf_results: OptimalPowerFlowResults | None = None)[source]

Bases: DriverTemplate

get_steps()[source]

Get time steps list of strings

name = 'Short Circuit'
opf_results: OptimalPowerFlowResults | None
options: ShortCircuitOptions | None
pf_options: PowerFlowOptions | None
pf_results: PowerFlowResults | None
pf_results3ph: PowerFlowResults3Ph
run()[source]

Run a power flow for every circuit @return:

static single_short_circuit_phases(nc: NumericalCircuit, voltage_N: ndarray[tuple[Any, ...], dtype[complex128]], voltage_A: ndarray[tuple[Any, ...], dtype[complex128]], voltage_B: ndarray[tuple[Any, ...], dtype[complex128]], voltage_C: ndarray[tuple[Any, ...], dtype[complex128]], Zf: complex, island_bus_index: int, fault_type: FaultType, phases: PhasesShortCircuit, Sbus_N: ndarray[tuple[Any, ...], dtype[complex128]], Sbus_A: ndarray[tuple[Any, ...], dtype[complex128]], Sbus_B: ndarray[tuple[Any, ...], dtype[complex128]], Sbus_C: ndarray[tuple[Any, ...], dtype[complex128]], logger: Logger) ShortCircuitResults[source]

Run a short circuit simulation for a single island :param calculation_inputs: :param Vpf: Power flow voltage vector applicable to the island :param Zf: Short circuit impedance vector applicable to the island :param island_bus_index: bus index where the fault happens :param fault_type: FaultType :param logger: Logger @return: short circuit results

static single_short_circuit_sequences(nc: NumericalCircuit, Vpf: ndarray[tuple[Any, ...], dtype[complex128]], Zf: complex, island_bus_index: int, fault_type: FaultType) ShortCircuitResults[source]

Run a short circuit simulation for a single island :param calculation_inputs: :param Vpf: Power flow voltage vector applicable to the island :param Zf: Short circuit impedance vector applicable to the island :param island_bus_index: bus index where the fault happens :param fault_type: FaultType :param logger: Logger @return: short circuit results

static single_short_circuit_vsc(nc: NumericalCircuit, V_pf: ndarray[tuple[Any, ...], dtype[complex128]], S_pf: ndarray[tuple[Any, ...], dtype[complex128]], St_vsc_pf: ndarray[tuple[Any, ...], dtype[complex128]], Z_fault: ndarray[tuple[Any, ...], dtype[complex128]], fault_bus: int, options: PowerFlowOptions, logger: Logger)[source]
static split_branch(branch: Line | DcLine | Transformer2W | HvdcLine | VSC | UPFC | Winding | Switch | SeriesReactance, fault_position: float, r_fault: float, x_fault: float)[source]

Split a branch by a given distance :param branch: Branch of a circuit :param fault_position: per unit distance measured from the β€œfrom” bus (0 ~ 1) :param r_fault: Fault resistance in p.u. :param x_fault: Fault reactance in p.u. :return: the two new Branches and the mid short circuited bus

tpe = 'Short circuit'

VeraGridEngine.Simulations.ShortCircuitStudies.short_circuit_options module

class VeraGridEngine.Simulations.ShortCircuitStudies.short_circuit_options.ShortCircuitOptions(bus_index: int = 0, fault_type=LLLG, mid_line_fault: bool = False, branch_index: int = 0, branch_fault_locations: float = 0.5, fault_r: float = 1e-20, fault_x: float = 1e-20, verbose: int = 0, method=sequences, phases=abc)[source]

Bases: OptionsTemplate

Short circuit options

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'diff_changes')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:bus_index, prop:fault_type, prop:method, prop:phases, prop:mid_line_fault, prop:branch_index, prop:branch_fault_locations, prop:branch_fault_r, prop:branch_fault_x, prop:verbose)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:bus_index, prop:fault_type, prop:method, prop:phases, prop:mid_line_fault, prop:branch_index, prop:branch_fault_locations, prop:branch_fault_r, prop:branch_fault_x, prop:verbose)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'action': prop:action, 'branch_fault_locations': prop:branch_fault_locations, 'branch_fault_r': prop:branch_fault_r, 'branch_fault_x': prop:branch_fault_x, 'branch_index': prop:branch_index, 'bus_index': prop:bus_index, 'code': prop:code, 'comment': prop:comment, 'diff_changes': prop:diff_changes, 'fault_type': prop:fault_type, 'idtag': prop:idtag, 'method': prop:method, 'mid_line_fault': prop:mid_line_fault, 'name': prop:name, 'phases': prop:phases, 'rdfid': prop:rdfid, 'verbose': prop:verbose}
LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:bus_index, prop:fault_type, prop:method, prop:phases, prop:mid_line_fault, prop:branch_index, prop:branch_fault_locations, prop:branch_fault_r, prop:branch_fault_x, prop:verbose)
action: ActionType
comment: str
device_type: DeviceType
diff_changes
selected_to_merge

VeraGridEngine.Simulations.ShortCircuitStudies.short_circuit_results module

class VeraGridEngine.Simulations.ShortCircuitStudies.short_circuit_results.ShortCircuitResults(nsc: int, n: int, m: int, n_hvdc: int, n_vsc: int, sc_names: ndarray[tuple[Any, ...], dtype[str_]], bus_names: ndarray[tuple[Any, ...], dtype[str_]], branch_names: ndarray[tuple[Any, ...], dtype[str_]], hvdc_names: ndarray[tuple[Any, ...], dtype[str_]], vsc_names: ndarray[tuple[Any, ...], dtype[str_]], bus_types: ndarray[tuple[Any, ...], dtype[int64]], area_names: ndarray[tuple[Any, ...], dtype[str_]] | None = None)[source]

Bases: ResultsTemplate

CLASS_DATA_VARIABLES = {'F': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'ICurrent': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'ICurrentA': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'ICurrentB': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'ICurrentC': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'If0': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'If1': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'If2': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'IfA': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'IfB': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'IfC': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'IfN': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'It0': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'It1': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'It2': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'ItA': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'ItB': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'ItC': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'ItN': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'SCpower': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'SCpowerA': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'SCpowerB': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'SCpowerC': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'Sbus0': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'Sbus1': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'Sbus2': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'SbusA': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'SbusB': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'SbusC': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'SbusN': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'Sf0': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'Sf1': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'Sf2': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'SfA': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'SfB': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'SfC': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'SfN': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'St0': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'St1': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'St2': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'StA': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'StB': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'StC': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'StN': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'T': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'Vbranch0': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'Vbranch1': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'Vbranch2': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'VbranchA': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'VbranchB': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'VbranchC': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'VbranchN': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'area_names': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'branch_names': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'bus_area_indices': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'bus_names': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'bus_types': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'hvdc_F': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'hvdc_Pf': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'hvdc_Pt': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'hvdc_T': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'hvdc_loading': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'hvdc_losses': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'hvdc_names': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'loading0': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'loading1': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'loading2': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'loadingA': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'loadingB': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'loadingC': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'loadingN': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'losses0': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'losses1': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'losses2': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'lossesA': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'lossesB': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'lossesC': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'lossesN': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'sc_names': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'voltage0': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'voltage1': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'voltage2': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'voltageA': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'voltageB': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'voltageC': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'voltageN': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'vsc_If': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'vsc_It': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'vsc_Pfn': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'vsc_Pfp': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'vsc_St': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'vsc_loading': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'vsc_losses': <VeraGridEngine.Simulations.results_template.ResultsProperty object>}
CLASS_RESULTS_DECLARATIONS = (<VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>)
ICurrent
ICurrentA
ICurrentB
ICurrentC
If0
If1
If2
IfA
IfB
IfC
IfN
It0
It1
It2
ItA
ItB
ItC
ItN
LOCAL_RESULTS_DECLARATIONS = (<VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>)
SCpower
SCpowerA
SCpowerB
SCpowerC
Sbus0
Sbus1
Sbus2
SbusA
SbusB
SbusC
SbusN
Sf0
Sf1
Sf2
SfA
SfB
SfC
SfN
St0
St1
St2
StA
StB
StC
StN
Vbranch0
Vbranch1
Vbranch2
VbranchA
VbranchB
VbranchC
VbranchN
apply_from_island(sc_idx: int, results: ShortCircuitResults, b_idx: ndarray[tuple[Any, ...], dtype[int64]], br_idx: ndarray[tuple[Any, ...], dtype[int64]], hvdc_idx: ndarray[tuple[Any, ...], dtype[int64]], vsc_idx: ndarray[tuple[Any, ...], dtype[int64]])[source]

Apply results from another island circuit to the circuit results represented here.

Arguments:

results: PowerFlowResults

b_idx: bus original indices

elm_idx: branch original indices

branch_names
bus_names
bus_types
property elapsed

Check if converged in all modes :return: True / False

export_all()[source]

Exports all the results to DataFrames.

Returns:

Bus results, Branch reuslts

get_current_df(sc_idx=0) DataFrame[source]
Parameters:

sc_idx

Returns:

get_voltage_3ph_df(sc_idx: int = 0) DataFrame[source]
Parameters:

sc_idx

Returns:

get_voltage_df(sc_idx=0) DataFrame[source]
Parameters:

sc_idx

Returns:

hvdc_Pf
hvdc_Pt
hvdc_loading
hvdc_losses
hvdc_names
loading0
loading1
loading2
loadingA
loadingB
loadingC
loadingN
losses0
losses1
losses2
lossesA
lossesB
lossesC
lossesN
mdl(result_type: ResultTypes) ResultsTable[source]
Parameters:

result_type

Returns:

sc_names
voltage0
voltage1
voltage2
voltageA
voltageB
voltageC
voltageN
vsc_If
vsc_It
vsc_Pfn
vsc_Pfp
vsc_St
vsc_loading
vsc_losses

VeraGridEngine.Simulations.ShortCircuitStudies.short_circuit_worker module

VeraGridEngine.Simulations.ShortCircuitStudies.short_circuit_worker.maximum_initial_shortcircuit_current(nc: NumericalCircuit, Zf: complex, faulted_bus: int)[source]
Parameters:
  • nc

  • Zf

  • faulted_bus

Returns:

VeraGridEngine.Simulations.ShortCircuitStudies.short_circuit_worker.short_circuit_abc(nc: NumericalCircuit, voltage_N: ndarray[tuple[Any, ...], dtype[complex128]], voltage_A: ndarray[tuple[Any, ...], dtype[complex128]], voltage_B: ndarray[tuple[Any, ...], dtype[complex128]], voltage_C: ndarray[tuple[Any, ...], dtype[complex128]], Zf: ndarray[tuple[Any, ...], dtype[complex128]], bus_index: int, fault_type: FaultType, phases: PhasesShortCircuit, Sbus_N: ndarray[tuple[Any, ...], dtype[complex128]], Sbus_A: ndarray[tuple[Any, ...], dtype[complex128]], Sbus_B: ndarray[tuple[Any, ...], dtype[complex128]], Sbus_C: ndarray[tuple[Any, ...], dtype[complex128]]) ShortCircuitResults[source]

Run a short circuit simulation in the phase domain :param nc: :param Vpf: Power flow voltage vector applicable to the island :param Zf: Short circuit impedance vector applicable to the island :param bus_index: Index of the failed bus :param fault_type: FaultType :param Spf: Bus powers Sbus :param method: Method to solve the short-circuit, sequence or phase domain :param phases: Phases where the short-circuit occurs :return: short circuit results

VeraGridEngine.Simulations.ShortCircuitStudies.short_circuit_worker.short_circuit_ph3(nc: NumericalCircuit, Vpf: ndarray[tuple[Any, ...], dtype[complex128]], Zf: ndarray[tuple[Any, ...], dtype[complex128]], bus_index: int)[source]

Run a 3-phase short circuit simulation for a single island :param nc: NumericalCircuit :param Vpf: Power flow voltage vector applicable to the island :param Zf: Short circuit impedance vector applicable to the island :param bus_index: Bus index :return: short circuit results

VeraGridEngine.Simulations.ShortCircuitStudies.short_circuit_worker.short_circuit_post_process(calculation_inputs: NumericalCircuit, V: ndarray[tuple[Any, ...], dtype[complex128]], branch_rates: ndarray[tuple[Any, ...], dtype[float64]], Yf: csc_matrix, Yt: csc_matrix) Tuple[ndarray[tuple[Any, ...], dtype[complex128]], ndarray[tuple[Any, ...], dtype[complex128]], ndarray[tuple[Any, ...], dtype[complex128]], ndarray[tuple[Any, ...], dtype[complex128]], ndarray[tuple[Any, ...], dtype[complex128]], ndarray[tuple[Any, ...], dtype[complex128]], ndarray[tuple[Any, ...], dtype[complex128]]][source]

Compute the important results for short-circuits :param calculation_inputs: instance of Circuit :param V: Voltage solution array for the circuit buses :param branch_rates: Array of branch ratings :param Yf: From admittance matrix :param Yt: To admittance matrix :return: Sf (MVA), If (p.u.), loading (p.u.), losses (MVA), Sbus(MVA)

VeraGridEngine.Simulations.ShortCircuitStudies.short_circuit_worker.short_circuit_post_process_phases_abc(calculation_inputs: NumericalCircuit, V_expanded: ndarray[tuple[Any, ...], dtype[complex128]], branch_rates_expanded: ndarray[tuple[Any, ...], dtype[float64]], Yf: csc_matrix, Yt: csc_matrix, F_expanded: ndarray[tuple[Any, ...], dtype[int64]], T_expanded: ndarray[tuple[Any, ...], dtype[int64]], mask, branch_lookup) Tuple[ndarray[tuple[Any, ...], dtype[complex128]], ndarray[tuple[Any, ...], dtype[complex128]], ndarray[tuple[Any, ...], dtype[complex128]], ndarray[tuple[Any, ...], dtype[complex128]], ndarray[tuple[Any, ...], dtype[complex128]], ndarray[tuple[Any, ...], dtype[complex128]], ndarray[tuple[Any, ...], dtype[complex128]]][source]

Compute the important results for short-circuits :param calculation_inputs: instance of Circuit :param V_expanded: Voltage solution array for the circuit buses :param branch_rates_expanded: Array of branch ratings :param Yf: From admittance matrix :param Yt: To admittance matrix :param F_expanded: :param T_expanded: :param mask: :param branch_lookup: :return: Sf (MVA), If (p.u.), loading (p.u.), losses (MVA), Sbus(MVA)

VeraGridEngine.Simulations.ShortCircuitStudies.short_circuit_worker.short_circuit_unbalanced(nc: NumericalCircuit, Vpf: ndarray[tuple[Any, ...], dtype[complex128]], Zf: ndarray[tuple[Any, ...], dtype[complex128]], bus_index: int, fault_type: FaultType) ShortCircuitResults[source]

Run an unbalanced short circuit simulation for a single island :param nc: :param Vpf: Power flow voltage vector applicable to the island :param Zf: Short circuit impedance vector applicable to the island :param bus_index: Index of the failed bus :param fault_type: FaultType :return: short circuit results

VeraGridEngine.Simulations.ShortCircuitStudies.short_circuit_worker.short_circuit_vsc(nc: NumericalCircuit, V_pf: ndarray[tuple[Any, ...], dtype[complex128]], S_pf: ndarray[tuple[Any, ...], dtype[complex128]], St_vsc_pf: ndarray[tuple[Any, ...], dtype[complex128]], Z_fault: ndarray[tuple[Any, ...], dtype[complex128]], fault_bus: int, options: PowerFlowOptions, logger: Logger)[source]

Module contents