VeraGridEngine.Devices.Branches package

Submodules

VeraGridEngine.Devices.Branches.branch module

class VeraGridEngine.Devices.Branches.branch.Branch(bus_from: Bus = None, bus_to: Bus = None, name='Branch', idtag=None, r=1e-20, x=1e-05, g=1e-20, b=1e-20, design_rate: float = 9999.0, rate=9999.0, tap=1.0, shift_angle=0, active=True, tolerance=0.0, cost=0.0, mttf=0, mttr=0, r_fault=0.0, x_fault=0.0, fault_pos=0.5, branch_type: BranchType = line, length=1.0, vset=1.0, temp_base=20, temp_oper=20, alpha=0.0033, bus_to_regulated=False, template=None)[source]

Bases: BranchParent

property B: float

Get B.

Returns:

float

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'selected_to_merge', 'diff_changes', 'bus_from', 'bus_to')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {'Cost': 'Cost_prof', 'active': 'active_prof', 'contingency_factor': 'contingency_factor_prof', 'protection_rating_factor': 'protection_rating_factor_prof', 'rate': 'rate_prof', 'temp_oper': 'temp_oper_prof'}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:R, prop:X, prop:B, prop:G, prop:tolerance, prop:length, prop:tap_module, prop:angle, prop:bus_to_regulated, prop:vset, prop:r_fault, prop:x_fault, prop:fault_pos)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:R, prop:X, prop:B, prop:G, prop:tolerance, prop:length, prop:tap_module, prop:angle, prop:bus_to_regulated, prop:vset, prop:r_fault, prop:x_fault, prop:fault_pos)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'B': prop:B, 'Cost': prop:Cost, 'G': prop:G, 'R': prop:R, 'X': prop:X, 'action': prop:action, 'active': prop:active, 'alpha': prop:alpha, 'angle': prop:angle, 'build_status': prop:build_status, 'bus_from': prop:bus_from, 'bus_from_pos': prop:bus_from_pos, 'bus_to': prop:bus_to, 'bus_to_pos': prop:bus_to_pos, 'bus_to_regulated': prop:bus_to_regulated, 'capex': prop:capex, 'code': prop:code, 'color': prop:color, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'contingency_factor': prop:contingency_factor, 'decommissioned_date': prop:decommissioned_date, 'design_rate': prop:design_rate, 'diff_changes': prop:diff_changes, 'emt_fmu_import_config': prop:emt_fmu_import_config, 'emt_fmu_me_import_config': prop:emt_fmu_me_import_config, 'emt_fmu_template': prop:emt_fmu_template, 'emt_model': prop:emt_model, 'emt_template': prop:emt_template, 'fault_pos': prop:fault_pos, 'group': prop:group, 'idtag': prop:idtag, 'length': prop:length, 'modelling_authority': prop:modelling_authority, 'monitor_loading': prop:monitor_loading, 'mttf': prop:mttf, 'mttr': prop:mttr, 'name': prop:name, 'opex': prop:opex, 'owners': prop:owners, 'protection_rating_factor': prop:protection_rating_factor, 'r_fault': prop:r_fault, 'rate': prop:rate, 'rdfid': prop:rdfid, 'reducible': prop:reducible, 'rms_fmu_import_config': prop:rms_fmu_import_config, 'rms_fmu_me_import_config': prop:rms_fmu_me_import_config, 'rms_fmu_template': prop:rms_fmu_template, 'rms_model': prop:rms_model, 'rms_template': prop:rms_template, 'selected_to_merge': prop:selected_to_merge, 'tap_module': prop:tap_module, 'temp_base': prop:temp_base, 'temp_oper': prop:temp_oper, 'tolerance': prop:tolerance, 'vset': prop:vset, 'x_fault': prop:x_fault}
property G: float

Get G.

Returns:

float

LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:R, prop:X, prop:B, prop:G, prop:tolerance, prop:length, prop:tap_module, prop:angle, prop:bus_to_regulated, prop:vset, prop:r_fault, prop:x_fault, prop:fault_pos)
property R: float

Get R.

Returns:

float

property R_corrected

Returns a temperature corrected resistance based on a formula provided by: NFPA 70-2005, National Electrical Code, Table 8, footnote #2; and https://en.wikipedia.org/wiki/Electrical_resistivity_and_conductivity#Linear_approximation (version of 2019-01-03 at 15:20 EST).

property X: float

Get X.

Returns:

float

property angle: float

Get angle.

Returns:

float

apply_tap_changer(tap_changer: TapChanger)[source]

Apply a new tap changer

Argument:

tap_changer (VeraGridEngine.Devices.branch.TapChanger): Tap changer object

branch_type
branch_type_converter(val_string)[source]

function to convert the branch type string into the BranchType :param val_string: :return: branch type conversion

property bus_to_regulated: bool

Get bus_to_regulated.

Returns:

bool

conv
copy(bus_dict=None)[source]

Returns a copy of the branch @return: A new with the same content as this

property fault_pos: float

Get fault_pos.

Returns:

float

get_coordinates()[source]

Get the branch defining coordinates

get_equivalent_line(index: DatetimeIndex | None = None) Line[source]

Get the equivalent line object :return:

get_equivalent_transformer(index: DatetimeIndex | None = None) Transformer2W[source]

Convert this line into a transformer This is necessary if the buses’ voltage differ too much :return: Transformer2W

get_save_data()[source]

Return the data that matches the edit_headers :return:

get_weight()[source]

Get a weight of this line for graph purposes :return: weight value

inv_conv
property length: float

Get length.

Returns:

float

measurements
plot_profiles(time_series=None, my_index=0, show_fig=True)[source]

Plot the time series results of this object :param time_series: TimeSeries Instance :param my_index: index of this object in the simulation :param show_fig: Show the figure?

property r_fault: float

Get r_fault.

Returns:

float

property rate_prof: ProfileFloat

Cost profile :return: Profile

tap_changer
tap_down()[source]

Move the tap changer one position up

property tap_module: float

Get tap_module.

Returns:

float

tap_up()[source]

Move the tap changer one position up

property temp_oper_prof: ProfileFloat

Cost profile :return: Profile

template
property tolerance: float

Get tolerance.

Returns:

float

property vset: float

Get vset.

Returns:

float

property x_fault: float

Get x_fault.

Returns:

float

class VeraGridEngine.Devices.Branches.branch.BranchType(value)[source]

Bases: Enum

Branch = 'branch'
BranchTemplate = 'BranchTemplate'
DCLine = 'DC-line'
Line = 'line'
Reactance = 'reactance'
Switch = 'switch'
Transformer = 'transformer'
UPFC = 'UPFC'
VSC = 'VSC'
Winding = 'Winding'
static argparse(s)[source]
classmethod list()[source]
VeraGridEngine.Devices.Branches.branch.SQRT3 = np.float64(1.7320508075688772)
NOTE: This device is legacy and unsupported

It only exists because older VeraGrid versions used it Now when this devices is used it is immediately converted to either a line or transformer

VeraGridEngine.Devices.Branches.branch.convert_branch(branch: Branch)[source]
Parameters:

branch

Returns:

VeraGridEngine.Devices.Branches.dc_line module

class VeraGridEngine.Devices.Branches.dc_line.DcLine(bus_from: Bus | None = None, bus_to: Bus | None = None, name: str = 'Dc Line', idtag: str | None = None, code: str = '', r=1e-20, design_rate: float = 9999, rate=9999.0, active=True, tolerance=0, cost=0.0, mttf=0, mttr=0, r_fault=0.0, fault_pos=0.5, length=1, temp_base=20, temp_oper=20, alpha=0.0033, template=None, contingency_factor=1.0, protection_rating_factor: float = 1.4, contingency_enabled=True, monitor_loading=True, capex=0, opex=0, build_status: BuildStatus = Commissioned)[source]

Bases: BranchParent

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'selected_to_merge', 'diff_changes', 'bus_from', 'bus_to', 'template', 'locations')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {'Cost': 'Cost_prof', 'active': 'active_prof', 'contingency_factor': 'contingency_factor_prof', 'protection_rating_factor': 'protection_rating_factor_prof', 'rate': 'rate_prof', 'temp_oper': 'temp_oper_prof'}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:R, prop:length, prop:r_fault, prop:fault_pos, prop:template, prop:locations)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:R, prop:length, prop:r_fault, prop:fault_pos, prop:template, prop:locations)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'Cost': prop:Cost, 'R': prop:R, 'action': prop:action, 'active': prop:active, 'alpha': prop:alpha, 'build_status': prop:build_status, 'bus_from': prop:bus_from, 'bus_from_pos': prop:bus_from_pos, 'bus_to': prop:bus_to, 'bus_to_pos': prop:bus_to_pos, 'capex': prop:capex, 'code': prop:code, 'color': prop:color, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'contingency_factor': prop:contingency_factor, 'decommissioned_date': prop:decommissioned_date, 'design_rate': prop:design_rate, 'diff_changes': prop:diff_changes, 'emt_fmu_import_config': prop:emt_fmu_import_config, 'emt_fmu_me_import_config': prop:emt_fmu_me_import_config, 'emt_fmu_template': prop:emt_fmu_template, 'emt_model': prop:emt_model, 'emt_template': prop:emt_template, 'fault_pos': prop:fault_pos, 'group': prop:group, 'idtag': prop:idtag, 'length': prop:length, 'locations': prop:locations, 'modelling_authority': prop:modelling_authority, 'monitor_loading': prop:monitor_loading, 'mttf': prop:mttf, 'mttr': prop:mttr, 'name': prop:name, 'opex': prop:opex, 'owners': prop:owners, 'protection_rating_factor': prop:protection_rating_factor, 'r_fault': prop:r_fault, 'rate': prop:rate, 'rdfid': prop:rdfid, 'reducible': prop:reducible, 'rms_fmu_import_config': prop:rms_fmu_import_config, 'rms_fmu_me_import_config': prop:rms_fmu_me_import_config, 'rms_fmu_template': prop:rms_fmu_template, 'rms_model': prop:rms_model, 'rms_template': prop:rms_template, 'selected_to_merge': prop:selected_to_merge, 'temp_base': prop:temp_base, 'temp_oper': prop:temp_oper, 'template': prop:template}
LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:R, prop:length, prop:r_fault, prop:fault_pos, prop:template, prop:locations)
property R: float

Get R.

Returns:

float

property R_corrected

Returns a temperature corrected resistance based on a formula provided by: NFPA 70-2005, National Electrical Code, Table 8, footnote #2; and https://en.wikipedia.org/wiki/Electrical_resistivity_and_conductivity#Linear_approximation (version of 2019-01-03 at 15:20 EST).

change_base(Sbase_old, Sbase_new)[source]
Parameters:
  • Sbase_old

  • Sbase_new

copy(bus_dict=None)[source]

Returns a copy of the dc line @return: A new with the same content as this

property fault_pos: float

Get fault_pos.

Returns:

float

get_coordinates()[source]

Get the branch defining coordinates

get_weight()[source]
Returns:

property length: float

Line length in km :return: float

property locations: LineLocations

Cost profile :return: Profile

measurements
plot_profiles(time_series=None, my_index=0, show_fig=True)[source]

Plot the time series results of this object :param time_series: TimeSeries Instance :param my_index: index of this object in the simulation :param show_fig: Show the figure?

property r_fault: float

Get r_fault.

Returns:

float

property temp_oper_prof: ProfileFloat

Cost profile :return: Profile

template
tolerance

VeraGridEngine.Devices.Branches.hvdc_line module

class VeraGridEngine.Devices.Branches.hvdc_line.HvdcLine[source]

Bases: BranchParent

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'selected_to_merge', 'diff_changes', 'bus_from', 'bus_to', 'locations')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {'Cost': 'Cost_prof', 'Pset': 'Pset_prof', 'Vset_f': 'Vset_f_prof', 'Vset_t': 'Vset_t_prof', 'active': 'active_prof', 'angle_droop': 'angle_droop_prof', 'contingency_factor': 'contingency_factor_prof', 'protection_rating_factor': 'protection_rating_factor_prof', 'rate': 'rate_prof', 'temp_oper': 'temp_oper_prof'}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:dispatchable, prop:control_mode, prop:Pset, prop:r, prop:dc_link_voltage, prop:angle_droop, prop:Vset_f, prop:Vset_t, prop:min_firing_angle_f, prop:max_firing_angle_f, prop:min_firing_angle_t, prop:max_firing_angle_t, prop:length, prop:locations)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:dispatchable, prop:control_mode, prop:Pset, prop:r, prop:dc_link_voltage, prop:angle_droop, prop:Vset_f, prop:Vset_t, prop:min_firing_angle_f, prop:max_firing_angle_f, prop:min_firing_angle_t, prop:max_firing_angle_t, prop:length, prop:locations)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'Cost': prop:Cost, 'Pset': prop:Pset, 'Vset_f': prop:Vset_f, 'Vset_t': prop:Vset_t, 'action': prop:action, 'active': prop:active, 'alpha': prop:alpha, 'angle_droop': prop:angle_droop, 'build_status': prop:build_status, 'bus_from': prop:bus_from, 'bus_from_pos': prop:bus_from_pos, 'bus_to': prop:bus_to, 'bus_to_pos': prop:bus_to_pos, 'capex': prop:capex, 'code': prop:code, 'color': prop:color, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'contingency_factor': prop:contingency_factor, 'control_mode': prop:control_mode, 'dc_link_voltage': prop:dc_link_voltage, 'decommissioned_date': prop:decommissioned_date, 'design_rate': prop:design_rate, 'diff_changes': prop:diff_changes, 'dispatchable': prop:dispatchable, 'emt_fmu_import_config': prop:emt_fmu_import_config, 'emt_fmu_me_import_config': prop:emt_fmu_me_import_config, 'emt_fmu_template': prop:emt_fmu_template, 'emt_model': prop:emt_model, 'emt_template': prop:emt_template, 'group': prop:group, 'idtag': prop:idtag, 'length': prop:length, 'locations': prop:locations, 'max_firing_angle_f': prop:max_firing_angle_f, 'max_firing_angle_t': prop:max_firing_angle_t, 'min_firing_angle_f': prop:min_firing_angle_f, 'min_firing_angle_t': prop:min_firing_angle_t, 'modelling_authority': prop:modelling_authority, 'monitor_loading': prop:monitor_loading, 'mttf': prop:mttf, 'mttr': prop:mttr, 'name': prop:name, 'opex': prop:opex, 'owners': prop:owners, 'protection_rating_factor': prop:protection_rating_factor, 'r': prop:r, 'rate': prop:rate, 'rdfid': prop:rdfid, 'reducible': prop:reducible, 'rms_fmu_import_config': prop:rms_fmu_import_config, 'rms_fmu_me_import_config': prop:rms_fmu_me_import_config, 'rms_fmu_template': prop:rms_fmu_template, 'rms_model': prop:rms_model, 'rms_template': prop:rms_template, 'selected_to_merge': prop:selected_to_merge, 'temp_base': prop:temp_base, 'temp_oper': prop:temp_oper}
LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:dispatchable, prop:control_mode, prop:Pset, prop:r, prop:dc_link_voltage, prop:angle_droop, prop:Vset_f, prop:Vset_t, prop:min_firing_angle_f, prop:max_firing_angle_f, prop:min_firing_angle_t, prop:max_firing_angle_t, prop:length, prop:locations)
property Pset: float

Get Pset.

Returns:

float

property Pset_prof: ProfileFloat

Cost profile :return: Profile

property Vset_f: float

Get Vset_f.

Returns:

float

property Vset_f_prof: ProfileFloat

Cost profile :return: Profile

property Vset_t: float

Get Vset_t.

Returns:

float

property Vset_t_prof: ProfileFloat

Cost profile :return: Profile

property angle_droop: float

Get angle_droop.

Returns:

float

property angle_droop_prof: ProfileFloat

Cost profile :return: Profile

build_status
capex
control_mode: HvdcControlType

Get dc_link_voltage.

Returns:

float

property dispatchable: bool

Get dispatchable.

Returns:

bool

get_Pset_at(t: int | None) float[source]
Parameters:

t

Returns:

get_Vset_f_at(t: int | None) float[source]
Parameters:

t

Returns:

get_Vset_t_at(t: int | None) float[source]
Parameters:

t

Returns:

get_angle_droop_at(t: int | None) float[source]
Parameters:

t

Returns:

get_coordinates()[source]

Get the branch defining coordinates

get_from_and_to_power(theta_f, theta_t, Sbase, in_pu=False)[source]

Get the power set at both ends accounting for meaningful losses :return: power from, power to

get_from_and_to_power_at(t, theta_f, theta_t, Sbase, in_pu=False)[source]

Get the power set at both ends accounting for meaningful losses :return: power from, power to

get_max_bus_nominal_voltage()[source]

GEt the maximum nominal voltage :return:

get_min_bus_nominal_voltage()[source]

Get the minimum nominal voltage :return:

get_q_limits(P: float) Tuple[float, float, float, float][source]

Get reactive power limits :param P: Pset value :return: Qmin_f, Qmax_f, Qmin_t, Qmax_t

get_save_data()[source]

Return the data that matches the edit_headers :return:

property length: float

Line length in km :return: float

property locations: LineLocations

Cost profile :return: Profile

loss_factor
property max_firing_angle_f: float

Get max_firing_angle_f.

Returns:

float

property max_firing_angle_t: float

Get max_firing_angle_t.

Returns:

float

property min_firing_angle_f: float

Get min_firing_angle_f.

Returns:

float

property min_firing_angle_t: float

Get min_firing_angle_t.

Returns:

float

mttf
mttr
opex
plot_profiles(time_series=None, my_index=0, show_fig=True)[source]

Plot the time series results of this object :param time_series: TimeSeries Instance :param my_index: index of this object in the simulation :param show_fig: Show the figure?

property r: float

Get r.

Returns:

float

VeraGridEngine.Devices.Branches.hvdc_line.firing_angles_to_reactive_limits(P: float, alphamin: float, alphamax: float) Tuple[float, float][source]

Convert firing angles to reactive power limits :param P: Active power (MW) :param alphamin: minimum firing angle (rad) :param alphamax: Maximum firing angle (rad) :return: Qmin (MVAr), Qmax (MVAr)

VeraGridEngine.Devices.Branches.hvdc_line.getFromAndToPowerAt(Pset: float, theta_f: float, theta_t: float, Vnf: float, Vnt: float, v_set_f: float, v_set_t: float, Sbase: float, r1: float, angle_droop: float, rate: float, free: bool, in_pu: bool = False)[source]

Compute the power and losses :param Pset: set power in MW :param theta_f: angle from (rad) :param theta_t: angle to (rad) :param Vnf: nominal voltage from (kV) :param Vnt: nominal voltage to (kV) :param v_set_f: control voltage from (p.u.) :param v_set_t: control voltage to (p.u.) :param Sbase: base power MVA :param r1: line resistance (ohm) :param angle_droop: angle droop control (MW/deg) :param rate: Rate (MW) :param free: is free to use the angle droop? :param in_pu: return power in per unit? otherwise the power comes in MW :return: Pf, Pt, losses (in MW or p.u. depending on in_pu)

VeraGridEngine.Devices.Branches.line module

class VeraGridEngine.Devices.Branches.line.Line(bus_from: Bus = None, bus_to: Bus = None, name='Line', idtag=None, code='', r=1e-20, x=1e-05, b=1e-20, design_rate: float = 9999.0, rate=9999.0, active=True, tolerance=0.0, cost=100.0, mttf=0.0, mttr=0, r_fault=0.0, x_fault=0.0, fault_pos=0.5, length=1.0, temp_base=20, temp_oper=20, alpha=0.0033, template=None, contingency_factor=1.0, protection_rating_factor: float = 1.4, contingency_enabled=True, monitor_loading=True, r0=1e-20, x0=1e-20, b0=1e-20, r2=1e-20, x2=1e-20, b2=1e-20, capex=0, opex=0, circuit_idx: int = 1, build_status: BuildStatus = Commissioned)[source]

Bases: BranchParent

property B
property B0
property B2
CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'selected_to_merge', 'diff_changes', 'bus_from', 'bus_to', 'ys', 'ysh', 'circuit_idx', 'template', 'locations')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {'Cost': 'Cost_prof', 'active': 'active_prof', 'contingency_factor': 'contingency_factor_prof', 'protection_rating_factor': 'protection_rating_factor_prof', 'rate': 'rate_prof', 'temp_oper': 'temp_oper_prof'}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:R, prop:X, prop:B, prop:R0, prop:X0, prop:B0, prop:R2, prop:X2, prop:B2, prop:ys, prop:ysh, prop:tolerance, prop:circuit_idx, prop:length, prop:template, prop:locations, prop:possible_tower_types, prop:possible_underground_line_types, prop:possible_sequence_line_types)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:R, prop:X, prop:B, prop:R0, prop:X0, prop:B0, prop:R2, prop:X2, prop:B2, prop:ys, prop:ysh, prop:tolerance, prop:circuit_idx, prop:length, prop:template, prop:locations, prop:possible_tower_types, prop:possible_underground_line_types, prop:possible_sequence_line_types)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'B': prop:B, 'B0': prop:B0, 'B2': prop:B2, 'Cost': prop:Cost, 'R': prop:R, 'R0': prop:R0, 'R2': prop:R2, 'X': prop:X, 'X0': prop:X0, 'X2': prop:X2, 'action': prop:action, 'active': prop:active, 'alpha': prop:alpha, 'build_status': prop:build_status, 'bus_from': prop:bus_from, 'bus_from_pos': prop:bus_from_pos, 'bus_to': prop:bus_to, 'bus_to_pos': prop:bus_to_pos, 'capex': prop:capex, 'circuit_idx': prop:circuit_idx, 'code': prop:code, 'color': prop:color, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'contingency_factor': prop:contingency_factor, 'decommissioned_date': prop:decommissioned_date, 'design_rate': prop:design_rate, 'diff_changes': prop:diff_changes, 'emt_fmu_import_config': prop:emt_fmu_import_config, 'emt_fmu_me_import_config': prop:emt_fmu_me_import_config, 'emt_fmu_template': prop:emt_fmu_template, 'emt_model': prop:emt_model, 'emt_template': prop:emt_template, 'group': prop:group, 'idtag': prop:idtag, 'length': prop:length, 'locations': prop:locations, 'modelling_authority': prop:modelling_authority, 'monitor_loading': prop:monitor_loading, 'mttf': prop:mttf, 'mttr': prop:mttr, 'name': prop:name, 'opex': prop:opex, 'owners': prop:owners, 'possible_sequence_line_types': prop:possible_sequence_line_types, 'possible_tower_types': prop:possible_tower_types, 'possible_underground_line_types': prop:possible_underground_line_types, 'protection_rating_factor': prop:protection_rating_factor, 'rate': prop:rate, 'rdfid': prop:rdfid, 'reducible': prop:reducible, 'rms_fmu_import_config': prop:rms_fmu_import_config, 'rms_fmu_me_import_config': prop:rms_fmu_me_import_config, 'rms_fmu_template': prop:rms_fmu_template, 'rms_model': prop:rms_model, 'rms_template': prop:rms_template, 'selected_to_merge': prop:selected_to_merge, 'temp_base': prop:temp_base, 'temp_oper': prop:temp_oper, 'template': prop:template, 'tolerance': prop:tolerance, 'ys': prop:ys, 'ysh': prop:ysh}
LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:R, prop:X, prop:B, prop:R0, prop:X0, prop:B0, prop:R2, prop:X2, prop:B2, prop:ys, prop:ysh, prop:tolerance, prop:circuit_idx, prop:length, prop:template, prop:locations, prop:possible_tower_types, prop:possible_underground_line_types, prop:possible_sequence_line_types)
Pf
Pt
Qf
Qt
property R
property R0
property R2
property R_corrected

Returns a temperature corrected resistance based on a formula provided by: NFPA 70-2005, National Electrical Code, Table 8, footnote #2; and https://en.wikipedia.org/wiki/Electrical_resistivity_and_conductivity#Linear_approximation (version of 2019-01-03 at 15:20 EST).

Vaf
Vat
Vmf
Vmt
property X
property X0
property X2
alpha
apply_template(obj: OverheadLineType | UndergroundLineType | SequenceLineType, Sbase: float, freq: float, logger=<VeraGridEngine.basic_structures.Logger object>, decimals_rounding: int = 6)[source]

Apply a line template to this object :param obj: OverheadLineType, UndergroundLineType, SequenceLineType :param Sbase: Nominal power in MVA :param freq: Frequency in Hz :param logger: Logger :param decimals_rounding: Number of decimals to round to

change_base(Sbase_old: float, Sbase_new: float)[source]

Change the impedance base :param Sbase_old: old base (MVA) :param Sbase_new: new base (MVA)

property circuit_idx
Returns:

property fault_pos: float

Get fault_pos.

Returns:

float

fill_3_phase_from_sequence() None[source]

Fill the 3x3 from the sequence values

fill_design_properties(r_ohm: float, x_ohm: float, c_nf: float, length: float, Imax: float, freq: float, Sbase: float, apply_to_profile: bool = True, logger: Logger = <VeraGridEngine.basic_structures.Logger object>) Line[source]

Fill R, X, B from not-in-per-unit parameters :param r_ohm: Resistance per km in OHM/km :param x_ohm: Reactance per km in OHM/km :param c_nf: Capacitance per km in nF/km :param length: length in kn :param Imax: Maximum current in kA :param freq: System frequency in Hz :param Sbase: Base power in MVA (take always 100 MVA) :param apply_to_profile: modify the ratings profile if checked :param logger: Logger :return self pointer

fix_inconsistencies(logger: Logger) bool[source]

Fix the inconsistencies :param logger: :return: any error

get_equivalent_transformer(index: DatetimeIndex | None = None) Transformer2W[source]

Convert this line into a transformer This is necessary if the buses’ voltage differ too much :return: Transformer2W

get_line_type() SequenceLineType[source]

Get the equivalent sequence line type of this line :return: SequenceLineType

get_tau(w: float) float[source]

get EMT delay parameter (tau) in seconds :param w: 2 * pi * freq :return: tau value

get_weight() float[source]

Get a weight of this line for graph purposes the weight is the impedance module (sqrt(r^2 + x^2)) :return: weight value

property length: float

Line length in km :return: float

property locations: LineLocations

Cost profile :return: Profile

possible_sequence_line_types: Associations
possible_tower_types: Associations
possible_underground_line_types: Associations
property r_fault: float

Get r_fault.

Returns:

float

set_circuit_idx(val: int, obj: OverheadLineType | UndergroundLineType | SequenceLineType)[source]

Set the circuit_idx with additional behavior based on the is_user_action flag. Ensure that the template exists and is valid. :param val: The value to set :param obj: Template

set_length(val: float)[source]

Set the line length and change the electric parameters of the line as a consequence. :param val: value in km

temp_base
temp_oper
template: OverheadLineType | SequenceLineType | UndergroundLineType | None
property tolerance: float

Get tolerance.

Returns:

float

property x_fault: float

Get x_fault.

Returns:

float

property ys: AdmittanceMatrix
Returns:

property ysh: AdmittanceMatrix
Returns:

VeraGridEngine.Devices.Branches.line.accept_line_connection(V1: float, V2: float, branch_connection_voltage_tolerance=0.1) float[source]

This function checks if a line can be connected between 2 voltages :param V1: Voltage 1 :param V2: Voltage 2 :param branch_connection_voltage_tolerance: :return: Can be connected?

VeraGridEngine.Devices.Branches.line_locations module

class VeraGridEngine.Devices.Branches.line_locations.LineLocation(lat: float, lon: float, z: float, seq: int = 0, name: str = '', idtag: str | None = None, code: str = '')[source]

Bases: EditableDevice

Line location object

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'selected_to_merge', '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:selected_to_merge, prop:comment, prop:diff_changes)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'action': prop:action, 'code': prop:code, 'comment': prop:comment, 'diff_changes': prop:diff_changes, 'idtag': prop:idtag, 'name': prop:name, 'rdfid': prop:rdfid, 'selected_to_merge': prop:selected_to_merge}
action: ActionType
comment: str
copy(forced_new_idtag: bool = False)[source]

Create a deep copy of this object

device_type: DeviceType
diff_changes
selected_to_merge
class VeraGridEngine.Devices.Branches.line_locations.LineLocations[source]

Bases: EditableDevice

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'selected_to_merge', '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:selected_to_merge, prop:comment, prop:diff_changes)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'action': prop:action, 'code': prop:code, 'comment': prop:comment, 'diff_changes': prop:diff_changes, 'idtag': prop:idtag, 'name': prop:name, 'rdfid': prop:rdfid, 'selected_to_merge': prop:selected_to_merge}
add(sequence: int, latitude: float, longitude: float, altitude: float = 0.0, idtag: str = '')[source]

Append row to this object (very slow) :param sequence: Sequence of the point :param latitude: Latitude (deg) :param longitude: Longitude (deg) :param altitude: Altitude (m) :param idtag: Known idtag

add_location(lat: float, long: float, alt: float = 0.0)[source]

Add a location to the line :param lat: Latitude (deg) :param long: Longitude (deg) :param alt: Altitude (m)

copy(forced_new_idtag: bool = False)[source]
Parameters:

forced_new_idtag

Returns:

data: List[LineLocation]
get_locations() List[LineLocation][source]

Get list of LineLocation

parse(data: List[Tuple[int, float, float, float] | Tuple[int, float, float, float, str]])[source]

Parse Json data :param data: List of lists with (latitude, longitude, altitude)

remove(loc: LineLocation)[source]
set(data: ndarray)[source]

Parse Json data :param data: List of lists with (sequence, latitude, longitude, altitude)

to_df() DataFrame[source]

Convert data to DataFrame :return: DataFrame

to_list() List[Tuple[int, float, float, float, str]][source]

Convert data to list of lists for Json usage :return: List[Tuple[int, float, float, float]] -> [(sequence, latitude, longitude, altitude)]

VeraGridEngine.Devices.Branches.overhead_line_type module

class VeraGridEngine.Devices.Branches.overhead_line_type.ListOfWires[source]

Bases: object

append(elm: WireInTower)[source]
copy()[source]
data: List[WireInTower]
get_circuits()[source]

Get the introduced circuits :return: list of circuit numbers

get_phases()[source]

Get the introduced phases :return: list of phase numbers

parse(data: List[Dict[str, str | int | float]], wire_dict: dict[str, Wire])[source]

Parse data from json dictionary :param data: :param wire_dict: :return:

to_list()[source]

Generate list of WireInTower objects :return:

class VeraGridEngine.Devices.Branches.overhead_line_type.OverheadLineType(name='Tower', idtag: str | None = None, Vnom: float = 1.0, earth_resistivity: float = 100, frequency: float = 50, capex: float = 0.0, opex: float = 0.0)[source]

Bases: DynamicDevice

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'selected_to_merge', 'diff_changes', 'wires_in_tower')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:earth_resistivity, prop:frequency, prop:Vnom, prop:wires_in_tower, prop:capex, prop:opex)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:earth_resistivity, prop:frequency, prop:Vnom, prop:wires_in_tower, prop:capex, prop:opex)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'Vnom': prop:Vnom, 'action': prop:action, 'build_status': prop:build_status, 'capex': prop:capex, 'code': prop:code, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'decommissioned_date': prop:decommissioned_date, 'diff_changes': prop:diff_changes, 'earth_resistivity': prop:earth_resistivity, 'emt_fmu_import_config': prop:emt_fmu_import_config, 'emt_fmu_me_import_config': prop:emt_fmu_me_import_config, 'emt_fmu_template': prop:emt_fmu_template, 'emt_model': prop:emt_model, 'emt_template': prop:emt_template, 'frequency': prop:frequency, 'idtag': prop:idtag, 'modelling_authority': prop:modelling_authority, 'name': prop:name, 'opex': prop:opex, 'owners': prop:owners, 'rdfid': prop:rdfid, 'rms_fmu_import_config': prop:rms_fmu_import_config, 'rms_fmu_me_import_config': prop:rms_fmu_me_import_config, 'rms_fmu_template': prop:rms_fmu_template, 'rms_model': prop:rms_model, 'rms_template': prop:rms_template, 'selected_to_merge': prop:selected_to_merge, 'wires_in_tower': prop:wires_in_tower}
property Imax: ndarray[tuple[Any, ...], dtype[float64]] | None

Current rating of the tower in kA.

LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:earth_resistivity, prop:frequency, prop:Vnom, prop:wires_in_tower, prop:capex, prop:opex)
property Vnom: float
Returns:

add_wire_relationship(wire: Wire, xpos: float = 0.0, ypos: float = 0.0, phase: int = 1)[source]

Wire in a tower :param wire: Wire instance :param xpos: x position in m :param ypos: y position in m :param phase: 0->Neutral, 1->A, 2->B, 3->C

property capex: float

Get capex.

Returns:

float

check(logger=<VeraGridEngine.basic_structures.Logger object>)[source]

Check that the wires configuration make sense :return:

compute()[source]

Compute the tower matrices :return:

compute_rating()[source]

Compute the sum of the wires max current in A :return: vector of max current (I) of the circuits in A

property earth_resistivity: float

Get earth_resistivity.

Returns:

float

property frequency: float

Get frequency.

Returns:

float

get_phA()[source]
Returns:

get_phB()[source]
Returns:

get_phC()[source]
Returns:

get_phN()[source]
Returns:

get_sequence_values(circuit_idx: int, seq: int = 1)[source]

Get the positive sequence values R1 [Ohm], X1[Ohm] and Bsh1 [S]. :param circuit_idx: Circuit indexation (starts at 1) :param seq: Sequence number (0, 1, 2) :return: R1 [Ohm], X1[Ohm] and Bsh1 [S]

get_values(Sbase, length, circuit_index: int = 1, round_vals: bool = False, Vnom: float | None = None)[source]

Get the sequence values of the template :param Sbase: Base power :param length: Length of the line :param circuit_index: index of the circuit :param round_vals: Boolean to round parameter values :param Vnom: nominal voltage for the per unit calculation (kV) :return: Line parameters and rate

get_ys(circuit_idx: int, Sbase: float, length: float, Vnom: float) AdmittanceMatrix[source]

get the series admittance matrix in p.u. (total) :param circuit_idx: Circuit index (starting by 1) :param Sbase: Base power (MVA) :param length: Line length (km) :param Vnom: Nominal voltage (kV) :return: AdmittanceMatrix with series admittance in p.u.

get_ysh(circuit_idx: int, Sbase: float, length: float, Vnom: float) AdmittanceMatrix[source]

get the shunt admittance matrix in p.u. (total) :param circuit_idx: Circuit index (starting by 1) :param Sbase: Base power (MVA) :param length: Line length (km) :param Vnom: Nominal voltage (kV) :return: AdmittanceMatrix with shunt admittance in p.u.

has_sequence_data() bool[source]

Boolean that tells if the template has already been computed or not :return: if computed or not

is_computed() bool[source]

Boolean that tells if the template has already been computed or not :return: if computed or not

is_used(wire)[source]
Parameters:

wire

Returns:

property n_circuits: int

Get the number of circuits :return:

property opex: float

Get opex.

Returns:

float

plot(ax=None)[source]

Plot wires position :param ax: Axis object

wires_in_tower: ListOfWires
property y_0123: ndarray[tuple[Any, ...], dtype[complex128]] | None
Returns:

property y_abc: ndarray[tuple[Any, ...], dtype[complex128]] | None
Returns:

property y_nabc: ndarray[tuple[Any, ...], dtype[complex128]] | None
Returns:

property y_phases_abc: ndarray[tuple[Any, ...], dtype[complex128]] | None
Returns:

property y_phases_nabc: ndarray[tuple[Any, ...], dtype[complex128]] | None
Returns:

property y_seq: ndarray[tuple[Any, ...], dtype[complex128]] | None
Returns:

property z_0123: ndarray[tuple[Any, ...], dtype[complex128]] | None
Returns:

property z_abc: ndarray[tuple[Any, ...], dtype[complex128]]
Returns:

property z_nabc: ndarray[tuple[Any, ...], dtype[complex128]] | None
Returns:

property z_phases_abc: ndarray[tuple[Any, ...], dtype[complex128]] | None
Returns:

property z_phases_nabc: ndarray[tuple[Any, ...], dtype[complex128]] | None
Returns:

property z_seq: ndarray[tuple[Any, ...], dtype[complex128]] | None
Returns:

class VeraGridEngine.Devices.Branches.overhead_line_type.WireInTower(wire: Wire, xpos: float = 0.0, ypos: float = 0.0, phase: int = 1)[source]

Bases: object

Wire -> Tower association

circuit_index: int
device_type
name: str
parse(data: Dict[str, str | int | float], wire_dict: dict[str, Wire])[source]

Parse data from json dictionary :param data: data to parse :param wire_dict: wires dictionary :return:

property phase
phase_type: str
set_phase(phase: int)[source]

Pase setter

A B C circuit_idx

7 8 9 3 …

Parameters:

phase

Returns:

None

to_dict() Dict[str, str | int | float][source]

data to dict :return: json like dictionary

wire: Wire | None
xpos: float
ypos: float
VeraGridEngine.Devices.Branches.overhead_line_type.abc_2_seq(mat)[source]

Convert ABC to sequence components :param mat: ABC impedances matrix (3x3, 6x6, 9x9, etc…) Returns: Sequence matrix (3x3, 6x6, 9x9, etc…) where the 3x3 blocks are the sequences

VeraGridEngine.Devices.Branches.overhead_line_type.build_y_4x4(y_nxn: ndarray, circuit_idx: int) ndarray[source]
Parameters:
  • y_nxn

  • circuit_idx

Returns:

VeraGridEngine.Devices.Branches.overhead_line_type.calc_GMR(is_tube: bool, r: float, q: float)[source]

Calculates geometric mean radius (GMR) of solid or tubular conductor Note that calculations assume uniform current distribution in the conductor, thus conductor stranding is not taken into account.

Parameters:
  • is_tube

  • r – radius of the conductor [m]

  • q – radius of the inner tube [m] (only relevant for tubes)

Returns:

GMR the geometric mean radius [m]

VeraGridEngine.Devices.Branches.overhead_line_type.calc_L_int(is_tube, r, q)[source]

Calculates internal inductance of solid or tubular conductor Note that calculations assume uniform current distribution in the conductor, thus conductor stranding is not taken into account.

Usage:

L_int = calc_L_int(type, r, q)

where:
type is β€˜solid’ or β€˜tube’

r is the radius of the conductor [m] q is the radius of the inner tube [m]

Returns:

L_int the internal inductance of the conductor [H/m]

VeraGridEngine.Devices.Branches.overhead_line_type.calc_y_matrix(wires_in_tower: ListOfWires, f: float = 50)[source]

Impedance matrix :param wires_in_tower: ListOfWires :param f: system frequency (Hz) :return: 4 by 4 impedance matrix where the order of the phases is: N, A, B, C

VeraGridEngine.Devices.Branches.overhead_line_type.calc_z_ii(R_int, is_tube, r_outer, r_inner, y_i, f, rho, err_tol=1e-06, use_dubanton_aprox: bool = False)[source]

Calculates self impedance term [Ohm/km] NOTE: No allowance has been made for skin effects :param R_int: AC conductor resistance [Ohm/km] :param is_tube: is it a tube conductor? otherwise is solid :param r_outer: radius of the conductor [m] :param r_inner: radius of the inner tube [m] :param y_i: height of conductor i above ground [m] :param f: frequency [Hz] :param rho: earth resistivity [Ohm.m] :param err_tol: error tolerance for the calculation (default = 1e-6) :param use_dubanton_aprox: Use dubanton’s approximation (default = False) :return: self impedance term of line impedance matrix [Ohm/km]

VeraGridEngine.Devices.Branches.overhead_line_type.calc_z_ij(y_i, y_j, x_i, x_j, f, rho, err_tol=1e-06, use_dubanton_aprox: bool = False)[source]

Calculates mutual impedance term [Ohm/km] :param y_i: height of conductor i above ground [m] :param y_j: height of conductor j above ground [m] :param x_i: x position of the conductor i [m] :param x_j: x position of the conductor j [m] :param f: frequency [Hz] :param rho: earth resistivity [ohmΒ·m] :param err_tol: error tolerance for the calculation (default = 1e-6) :param use_dubanton_aprox: Use dubanton’s approximation (default = False) :return:self impedance term of line impedance matrix (Ohm/km)

VeraGridEngine.Devices.Branches.overhead_line_type.calc_z_matrix(wires_in_tower: ListOfWires, f: float = 50, rho: float = 100, use_dubanton_aprox: bool = False)[source]

Impedance matrix :param wires_in_tower: WireInTower :param f: system frequency (Hz) :param rho: earth resistivity :param use_dubanton_aprox: Use dubanton’s approximation (default = False) :return: 4 by 4 impedance matrix where the order of the phases is: N, A, B, C

VeraGridEngine.Devices.Branches.overhead_line_type.carsons(is_self: bool, h_i: float, h_k: float, x_ik: float, f: float, rho: float, err_tol: float = 1e-06)[source]

Calculates Carson’s earth return correction factors Rp and Xp for both self and mutual terms. The number of terms evaluated in the infinite loop is based on convergence to the desired error tolerance.

Usage:

Rp, Xp = carsons(type, h_i, h_k, x_ik, f, rho, err_tol)

where type is β€˜self’ or β€˜mutual’

h_i is the height of conductor i above ground (m) h_k is the height of conductor k above ground (m) x_ik is the horizontal distance between conductors i and k (m) f is the frequency (Hz) rho is the earth resistivity (Ohm.m) err_tol is the error tolerance for the calculation (default = 1e-6)

Returns:

Rp, Xp the Carson earth return correction factors (in Ohm/km)

VeraGridEngine.Devices.Branches.overhead_line_type.create_known_abc_overhead_template(name: str, z_nabc: ndarray[tuple[Any, ...], dtype[complex128]], ysh_nabc: ndarray[tuple[Any, ...], dtype[complex128]], phases: ndarray[tuple[Any, ...], dtype[int64]], Vnom: float = 1.0, earth_resistivity: float = 100, frequency: float = 50) OverheadLineType[source]
Parameters:
  • name

  • z_nabc

  • ysh_nabc

  • phases

  • Vnom

  • earth_resistivity

  • frequency

Returns:

VeraGridEngine.Devices.Branches.overhead_line_type.get_D_ij(xi, yi, xj, yj)[source]

Distance module between the wire i and the image of the wire j :param xi: x position of the wire i :param yi: y position of the wire i :param xj: x position of the wire j :param yj: y position of the wire j :return: Distance module between the wire i and the image of the wire j

VeraGridEngine.Devices.Branches.overhead_line_type.get_d_ij(xi, yi, xj, yj)[source]

Distance module between wires :param xi: x position of the wire i :param yi: y position of the wire i :param xj: x position of the wire j :param yj: y position of the wire j :return: distance module

VeraGridEngine.Devices.Branches.overhead_line_type.kron_reduction(mat, keep, embed)[source]

Perform the Kron reduction :param mat: primitive matrix :param keep: indices to keep :param embed: indices to delete / embed :return:

VeraGridEngine.Devices.Branches.overhead_line_type.n_circuits(idx: ndarray[tuple[Any, ...], dtype[complex128]])[source]
Parameters:

idx

Returns:

VeraGridEngine.Devices.Branches.overhead_line_type.phase2circuit(phase: int) int[source]

Convert a phase to a circuit number :param phase: phase index, starting at 1 to n (i.e. phase 5, would be B from circuit 2) :return: circuit number starting by 1

VeraGridEngine.Devices.Branches.overhead_line_type.wire_bundling(phases_set: List[int], primitive: ndarray[tuple[Any, ...], dtype[float64]] | ndarray[tuple[int, int], dtype[float64]], phases_vector: ndarray[tuple[Any, ...], dtype[int64]])[source]

Algorithm to bundle wires per phase :param phases_set: set of phases (list with unique occurrences of each phase values, i.e. [0, 1, 2, 3]) :param primitive: Primitive matrix to reduce by bundling wires :param phases_vector: Vector that contains the phase of each wire :return: reduced primitive matrix, corresponding phases

VeraGridEngine.Devices.Branches.sequence_line_type module

class VeraGridEngine.Devices.Branches.sequence_line_type.SequenceLineType(name='SequenceLine', idtag: str | None = None, Imax: float = 1, Vnom: float = 1, R=1e-20, X=1e-20, B=1e-20, R0=1e-20, X0=1e-20, B0=1e-20, CnF=1e-20, CnF0=1e-20, use_conductance: bool = False, capex: float = 0.0, opex: float = 0.0, n_circuits: int = 1)[source]

Bases: DynamicDevice

property B: float

Get B.

Returns:

float

property B0: float

Get B0.

Returns:

float

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'selected_to_merge', '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:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:Imax, prop:Vnom, prop:R, prop:X, prop:B, prop:R0, prop:X0, prop:B0, prop:Cnf, prop:Cnf0, prop:use_conductance, prop:n_circuits, prop:capex, prop:opex)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:Imax, prop:Vnom, prop:R, prop:X, prop:B, prop:R0, prop:X0, prop:B0, prop:Cnf, prop:Cnf0, prop:use_conductance, prop:n_circuits, prop:capex, prop:opex)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'B': prop:B, 'B0': prop:B0, 'Cnf': prop:Cnf, 'Cnf0': prop:Cnf0, 'Imax': prop:Imax, 'R': prop:R, 'R0': prop:R0, 'Vnom': prop:Vnom, 'X': prop:X, 'X0': prop:X0, 'action': prop:action, 'build_status': prop:build_status, 'capex': prop:capex, 'code': prop:code, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'decommissioned_date': prop:decommissioned_date, 'diff_changes': prop:diff_changes, 'emt_fmu_import_config': prop:emt_fmu_import_config, 'emt_fmu_me_import_config': prop:emt_fmu_me_import_config, 'emt_fmu_template': prop:emt_fmu_template, 'emt_model': prop:emt_model, 'emt_template': prop:emt_template, 'idtag': prop:idtag, 'modelling_authority': prop:modelling_authority, 'n_circuits': prop:n_circuits, 'name': prop:name, 'opex': prop:opex, 'owners': prop:owners, 'rdfid': prop:rdfid, 'rms_fmu_import_config': prop:rms_fmu_import_config, 'rms_fmu_me_import_config': prop:rms_fmu_me_import_config, 'rms_fmu_template': prop:rms_fmu_template, 'rms_model': prop:rms_model, 'rms_template': prop:rms_template, 'selected_to_merge': prop:selected_to_merge, 'use_conductance': prop:use_conductance}
property Cnf: float

Get Cnf.

Returns:

float

property Cnf0: float

Get Cnf0.

Returns:

float

property Imax: float

Get Imax.

Returns:

float

LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:Imax, prop:Vnom, prop:R, prop:X, prop:B, prop:R0, prop:X0, prop:B0, prop:Cnf, prop:Cnf0, prop:use_conductance, prop:n_circuits, prop:capex, prop:opex)
property R: float

Get R.

Returns:

float

property R0: float

Get R0.

Returns:

float

property Vnom: float

Get Vnom.

Returns:

float

property X: float

Get X.

Returns:

float

property X0: float

Get X0.

Returns:

float

property capex: float

Get capex.

Returns:

float

get_values(Sbase: float, freq: float, length: float, line_Vnom: float, logger: Logger = <VeraGridEngine.basic_structures.Logger object>, decimals_rounding: int = 6)[source]

Get the per-unit values :param Sbase: Base power (MVA, always use 100MVA) :param freq: Frequency (Hz) :param length: length in km :param line_Vnom: Line nominal voltage :param logger: Logger instance :param decimals_rounding: Number of decimal digits to display :return: R (p.u.), x(p.u.), B(p.u.), Rate (MVA)

get_ys_nabc() AdmittanceMatrix[source]

Get the series 3x3 admittance matrix :return: AdmittanceMatrix

get_ysh_nabc() AdmittanceMatrix[source]

get the 3x3 shunt admittance matrix from the sequence values :return AdmittanceMatrix

property n_circuits: int

Get n_circuits.

Returns:

int

property opex: float

Get opex.

Returns:

float

property use_conductance: bool

Get use_conductance.

Returns:

bool

VeraGridEngine.Devices.Branches.sequence_line_type.get_line_impedances_with_b(r_ohm: float, x_ohm: float, b_us: float, length: float, Imax: float, Sbase: float, Vnom: float, logger: Logger = <VeraGridEngine.basic_structures.Logger object>, decimals_rounding: int = 6) Tuple[float, float, float, float][source]

Fill R, X, B from not-in-per-unit parameters :param r_ohm: Resistance per km in OHM/km :param x_ohm: Reactance per km in OHM/km :param b_us: Susceptance per km in uS/km :param length: length in kn :param Imax: Maximum current in kA :param Sbase: Base power in MVA (take always 100 MVA) :param Vnom: nominal voltage (kV) :param logger: Logger (optional) :param decimals_rounding: number of decimals to round :return R, X, B, rate

VeraGridEngine.Devices.Branches.sequence_line_type.get_line_impedances_with_c(r_ohm: float, x_ohm: float, c_nf: float, length: float, Imax: float, freq: float, Sbase: float, Vnom: float, logger: Logger = <VeraGridEngine.basic_structures.Logger object>, decimals_rounding: int = 6) Tuple[float, float, float, float][source]

Fill R, X, B from not-in-per-unit parameters :param r_ohm: Resistance per km in OHM/km :param x_ohm: Reactance per km in OHM/km :param c_nf: Capacitance per km in nF/km :param length: length in kn :param Imax: Maximum current in kA :param freq: System frequency in Hz :param Sbase: Base power in MVA (take always 100 MVA) :param Vnom: nominal voltage (kV) :param logger: logger :param decimals_rounding: Number of decimals to round to :return R, X, B, rate

VeraGridEngine.Devices.Branches.series_reactance module

class VeraGridEngine.Devices.Branches.series_reactance.SeriesReactance(bus_from: Bus = None, bus_to: Bus = None, name='SeriesReactance', idtag=None, code='', r=1e-20, x=1e-05, design_rate: float = 9999.0, rate=9999.0, active=True, tolerance=0, cost=100.0, mttf=0, mttr=0, r_fault=0.0, x_fault=0.0, fault_pos=0.5, temp_base=20, temp_oper=20, alpha=0.0033, contingency_factor=1.0, protection_rating_factor: float = 1.4, contingency_enabled=True, monitor_loading=True, r0=1e-20, x0=1e-20, r2=1e-20, x2=1e-20, capex=0, opex=0, build_status: BuildStatus = Commissioned)[source]

Bases: BranchParent

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'selected_to_merge', 'diff_changes', 'bus_from', 'bus_to')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {'Cost': 'Cost_prof', 'active': 'active_prof', 'contingency_factor': 'contingency_factor_prof', 'protection_rating_factor': 'protection_rating_factor_prof', 'rate': 'rate_prof', 'temp_oper': 'temp_oper_prof'}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:R, prop:X, prop:R0, prop:X0, prop:R2, prop:X2, prop:tolerance)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:R, prop:X, prop:R0, prop:X0, prop:R2, prop:X2, prop:tolerance)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'Cost': prop:Cost, 'R': prop:R, 'R0': prop:R0, 'R2': prop:R2, 'X': prop:X, 'X0': prop:X0, 'X2': prop:X2, 'action': prop:action, 'active': prop:active, 'alpha': prop:alpha, 'build_status': prop:build_status, 'bus_from': prop:bus_from, 'bus_from_pos': prop:bus_from_pos, 'bus_to': prop:bus_to, 'bus_to_pos': prop:bus_to_pos, 'capex': prop:capex, 'code': prop:code, 'color': prop:color, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'contingency_factor': prop:contingency_factor, 'decommissioned_date': prop:decommissioned_date, 'design_rate': prop:design_rate, 'diff_changes': prop:diff_changes, 'emt_fmu_import_config': prop:emt_fmu_import_config, 'emt_fmu_me_import_config': prop:emt_fmu_me_import_config, 'emt_fmu_template': prop:emt_fmu_template, 'emt_model': prop:emt_model, 'emt_template': prop:emt_template, 'group': prop:group, 'idtag': prop:idtag, 'modelling_authority': prop:modelling_authority, 'monitor_loading': prop:monitor_loading, 'mttf': prop:mttf, 'mttr': prop:mttr, 'name': prop:name, 'opex': prop:opex, 'owners': prop:owners, 'protection_rating_factor': prop:protection_rating_factor, 'rate': prop:rate, 'rdfid': prop:rdfid, 'reducible': prop:reducible, 'rms_fmu_import_config': prop:rms_fmu_import_config, 'rms_fmu_me_import_config': prop:rms_fmu_me_import_config, 'rms_fmu_template': prop:rms_fmu_template, 'rms_model': prop:rms_model, 'rms_template': prop:rms_template, 'selected_to_merge': prop:selected_to_merge, 'temp_base': prop:temp_base, 'temp_oper': prop:temp_oper, 'tolerance': prop:tolerance}
LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:R, prop:X, prop:R0, prop:X0, prop:R2, prop:X2, prop:tolerance)
property R: float

Get R.

Returns:

float

property R0: float

Get R0.

Returns:

float

property R2: float

Get R2.

Returns:

float

property R_corrected

Returns a temperature corrected resistance based on a formula provided by: NFPA 70-2005, National Electrical Code, Table 8, footnote #2; and https://en.wikipedia.org/wiki/Electrical_resistivity_and_conductivity#Linear_approximation (version of 2019-01-03 at 15:20 EST).

property X: float

Get X.

Returns:

float

property X0: float

Get X0.

Returns:

float

property X2: float

Get X2.

Returns:

float

change_base(Sbase_old, Sbase_new)[source]

Change the impedance base :param Sbase_old: old base (MVA) :param Sbase_new: new base (MVA)

property fault_pos: float

Get fault_pos.

Returns:

float

fill_design_properties(r_ohm, x_ohm, length, Imax, Sbase)[source]

Fill R, X, B from not-in-per-unit parameters :param r_ohm: Resistance per km in OHM :param x_ohm: Reactance per km in OHM :param length: length in kn :param Imax: Maximum current in kA :param Sbase: Base power in MVA (take always 100 MVA)

fix_inconsistencies(logger: Logger)[source]

Fix the inconsistencies :param logger: :return:

get_weight() float[source]

Get a weight of this line for graph purposes the weight is the impedance module (sqrt(r^2 + x^2)) :return: weight value

property r_fault: float

Get r_fault.

Returns:

float

property tolerance: float

Get tolerance.

Returns:

float

property x_fault: float

Get x_fault.

Returns:

float

VeraGridEngine.Devices.Branches.switch module

class VeraGridEngine.Devices.Branches.switch.Switch(bus_from: Bus = None, bus_to: Bus = None, name='Switch', idtag=None, code='', r=1e-20, x=1e-20, design_rate: float = 9999, rate=9999.0, active=True, contingency_factor=1.0, protection_rating_factor: float = 1.4, retained=False, normal_open=False, rated_current=0.0, graphic_type: SwitchGraphicType = CircuitBreaker)[source]

Bases: BranchParent

The Switch class represents the connections between nodes (i.e. buses) in VeraGrid. A Switch is a devices that cuts or allows the flow.

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'selected_to_merge', 'diff_changes', 'bus_from', 'bus_to')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {'Cost': 'Cost_prof', 'active': 'active_prof', 'contingency_factor': 'contingency_factor_prof', 'protection_rating_factor': 'protection_rating_factor_prof', 'rate': 'rate_prof', 'temp_oper': 'temp_oper_prof'}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:R, prop:X, prop:retained, prop:normal_open, prop:rated_current, prop:graphic_type)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:R, prop:X, prop:retained, prop:normal_open, prop:rated_current, prop:graphic_type)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'Cost': prop:Cost, 'R': prop:R, 'X': prop:X, 'action': prop:action, 'active': prop:active, 'alpha': prop:alpha, 'build_status': prop:build_status, 'bus_from': prop:bus_from, 'bus_from_pos': prop:bus_from_pos, 'bus_to': prop:bus_to, 'bus_to_pos': prop:bus_to_pos, 'capex': prop:capex, 'code': prop:code, 'color': prop:color, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'contingency_factor': prop:contingency_factor, 'decommissioned_date': prop:decommissioned_date, 'design_rate': prop:design_rate, 'diff_changes': prop:diff_changes, 'emt_fmu_import_config': prop:emt_fmu_import_config, 'emt_fmu_me_import_config': prop:emt_fmu_me_import_config, 'emt_fmu_template': prop:emt_fmu_template, 'emt_model': prop:emt_model, 'emt_template': prop:emt_template, 'graphic_type': prop:graphic_type, 'group': prop:group, 'idtag': prop:idtag, 'modelling_authority': prop:modelling_authority, 'monitor_loading': prop:monitor_loading, 'mttf': prop:mttf, 'mttr': prop:mttr, 'name': prop:name, 'normal_open': prop:normal_open, 'opex': prop:opex, 'owners': prop:owners, 'protection_rating_factor': prop:protection_rating_factor, 'rate': prop:rate, 'rated_current': prop:rated_current, 'rdfid': prop:rdfid, 'reducible': prop:reducible, 'retained': prop:retained, 'rms_fmu_import_config': prop:rms_fmu_import_config, 'rms_fmu_me_import_config': prop:rms_fmu_me_import_config, 'rms_fmu_template': prop:rms_fmu_template, 'rms_model': prop:rms_model, 'rms_template': prop:rms_template, 'selected_to_merge': prop:selected_to_merge, 'temp_base': prop:temp_base, 'temp_oper': prop:temp_oper}
LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:R, prop:X, prop:retained, prop:normal_open, prop:rated_current, prop:graphic_type)
property R: float

Get R.

Returns:

float

property X: float

Get X.

Returns:

float

change_base(Sbase_old: float, Sbase_new: float)[source]

Change the impedance base :param Sbase_old: old base (MVA) :param Sbase_new: new base (MVA)

graphic_type: SwitchGraphicType
property normal_open: bool

Get normal_open.

Returns:

bool

property rated_current: float

Get rated_current.

Returns:

float

property retained: bool

Get retained.

Returns:

bool

VeraGridEngine.Devices.Branches.tap_changer module

class VeraGridEngine.Devices.Branches.tap_changer.TapChanger(total_positions: int = 5, neutral_position: int = 2, normal_position: int = 2, dV: float = 0.01, asymmetry_angle: float = 90.0, tc_type: TapChangerTypes = NoRegulation)[source]

Bases: object

Tap changer

property asymmetry_angle: float
copy() TapChanger[source]
Returns:

property dV: float
get_cgmes_values()[source]

Returns with values of a Tap Changer in CGMES

Returns:

Return type:

get_tap_module() float[source]

Get the tap voltage regulation module :return: voltage regulation module

get_tap_module2(tap_position: int | ndarray) float | ndarray[source]

Get the tap voltage regulation module :return: voltage regulation module (single value or array)

get_tap_module_max() float[source]

Max tap module, computed on the fly :return: float

get_tap_module_min() float[source]

Min tap module, computed on the fly :return: float

get_tap_phase() float[source]

Get the tap phase in radians :return: phase in radians

get_tap_phase2(tap_position: int | ndarray) float | ndarray[source]

Get the tap phase in radians :return: phase in radians (single value or array)

get_tap_phase_max() float[source]

Maximum tap phase (calculated) :return: float

get_tap_phase_min() float[source]

Min tap phase, computed on the fly :return: float

property impedance_correction_imag_array: ndarray

Get the imaginary impedance correction factors per tap position. A value of 1.0 at every position means no correction (default). :return: array of length total_positions

init_from_cgmes(low: int, high: int, normal: int, neutral: int, stepVoltageIncrement: float, step: int, asymmetry_angle: float = 0.0, tc_type: TapChangerTypes = NoRegulation) None[source]

Import TapChanger object from CGMES

Parameters:
  • low

  • high

  • normal

  • neutral

  • stepVoltageIncrement

  • step

  • asymmetry_angle

  • tc_type

Returns:

property neutral_position: int

Get the neutral position :return: int

property normal_position: int
parse(data: ~typing.Dict[str, str | float], logger: ~VeraGridEngine.basic_structures.Logger = <VeraGridEngine.basic_structures.Logger object>) None[source]

Parse the tap data :param data: dictionary representation of the tap :param logger: logger instance

recalc() None[source]

Recalculate the phase and modules corresponding to each tap position

reset() None[source]

Resets the tap changer to the neutral position

resize() None[source]

Resize and recalc the tap positions array

set_tap_module(tap_module: float) float[source]

Set the tap position closest to the tap module :param tap_module: float value of the tap module

set_tap_phase(tap_phase: float) float[source]

Set the tap position closest to the tap phase :param tap_phase: float value of the tap phase

property tap_angles_array
Returns:

tap_down() None[source]

Go to the next upper tap position

property tap_modules_array

Get the tap modules array :return:

property tap_position: int

Get the tap position :return: int

tap_up() None[source]

Go to the next upper tap position

property tc_type: TapChangerTypes
to_df() DataFrame[source]

Get DaraFrame of the values :return: DataFrame

to_dict() Dict[str, str | float][source]

Get a dictionary representation of the tap :return:

property total_positions: int

Tap changer total number of positions :return: int

VeraGridEngine.Devices.Branches.transformer module

class VeraGridEngine.Devices.Branches.transformer.Transformer2W(bus_from: Bus | None = None, bus_to: Bus | None = None, name='Branch', idtag: str | None = None, code: str = '', HV: float | None = None, LV: float | None = None, nominal_power: float = 0.001, copper_losses: float = 0.0, iron_losses: float = 0.0, no_load_current: float = 0.0, short_circuit_voltage: float = 0.0, r: float = 1e-20, x: float = 1e-05, g: float = 1e-20, b: float = 1e-20, design_rate: float = 9999.0, rate: float = 9999.0, tap_module: float = 1.0, tap_module_max: float = 1.2, tap_module_min: float = 0.5, tap_phase: float = 0.0, tap_phase_max: float = 6.28, tap_phase_min: float = -6.28, active: bool = True, reducible: bool = False, tolerance: float = 0.0, cost: float = 100.0, mttf: float = 0.0, mttr: float = 0.0, vset: float = 1.0, Pset: float = 0.0, Qset: float = 0.0, temp_base: float = 20.0, temp_oper: float = 20.0, alpha: float = 0.0033, tap_module_control_mode: TapModuleControl = Fixed, tap_phase_control_mode: TapPhaseControl = Fixed, template: TransformerType | None = None, contingency_factor: float = 1.0, protection_rating_factor: float = 1.4, contingency_enabled: bool = True, monitor_loading: bool = True, r0: float = 1e-20, x0: float = 1e-20, g0: float = 1e-20, b0: float = 1e-20, r2: float = 1e-20, x2: float = 1e-20, g2: float = 1e-20, b2: float = 1e-20, conn: WindingsConnection = GG, capex: float = 0.0, opex: float = 0.0, build_status: BuildStatus = Commissioned, tc_total_positions: int = 5, tc_neutral_position: int = 2, tc_normal_position: int = 2, tc_dV: float = 0.01, tc_asymmetry_angle=90, tc_type: TapChangerTypes = NoRegulation)[source]

Bases: ControllableBranchParent

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'selected_to_merge', 'diff_changes', 'bus_from', 'bus_to', 'tap_changer', 'template')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {'Cost': 'Cost_prof', 'Pset': 'Pset_prof', 'Qset': 'Qset_prof', 'active': 'active_prof', 'contingency_factor': 'contingency_factor_prof', 'protection_rating_factor': 'protection_rating_factor_prof', 'rate': 'rate_prof', 'tap_module': 'tap_module_prof', 'tap_module_control_mode': 'tap_module_control_mode_prof', 'tap_phase': 'tap_phase_prof', 'tap_phase_control_mode': 'tap_phase_control_mode_prof', 'temp_oper': 'temp_oper_prof', 'vset': 'vset_prof'}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:R, prop:X, prop:G, prop:B, prop:R0, prop:X0, prop:G0, prop:B0, prop:R2, prop:X2, prop:G2, prop:B2, prop:tolerance, prop:tap_changer, prop:tap_module, prop:tap_module_max, prop:tap_module_min, prop:tap_module_control_mode, prop:vset, prop:Qset, prop:regulation_bus, prop:tap_phase, prop:tap_phase_max, prop:tap_phase_min, prop:tap_phase_control_mode, prop:Pset, prop:HV, prop:LV, prop:Sn, prop:Pcu, prop:Pfe, prop:I0, prop:Vsc, prop:conn, prop:conn_f, prop:conn_t, prop:vector_group_number, prop:template)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:R, prop:X, prop:G, prop:B, prop:R0, prop:X0, prop:G0, prop:B0, prop:R2, prop:X2, prop:G2, prop:B2, prop:tolerance, prop:tap_changer, prop:tap_module, prop:tap_module_max, prop:tap_module_min, prop:tap_module_control_mode, prop:vset, prop:Qset, prop:regulation_bus, prop:tap_phase, prop:tap_phase_max, prop:tap_phase_min, prop:tap_phase_control_mode, prop:Pset, prop:HV, prop:LV, prop:Sn, prop:Pcu, prop:Pfe, prop:I0, prop:Vsc, prop:conn, prop:conn_f, prop:conn_t, prop:vector_group_number, prop:template)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'B': prop:B, 'B0': prop:B0, 'B2': prop:B2, 'Cost': prop:Cost, 'G': prop:G, 'G0': prop:G0, 'G2': prop:G2, 'HV': prop:HV, 'I0': prop:I0, 'LV': prop:LV, 'Pcu': prop:Pcu, 'Pfe': prop:Pfe, 'Pset': prop:Pset, 'Qset': prop:Qset, 'R': prop:R, 'R0': prop:R0, 'R2': prop:R2, 'Sn': prop:Sn, 'Vsc': prop:Vsc, 'X': prop:X, 'X0': prop:X0, 'X2': prop:X2, 'action': prop:action, 'active': prop:active, 'alpha': prop:alpha, 'build_status': prop:build_status, 'bus_from': prop:bus_from, 'bus_from_pos': prop:bus_from_pos, 'bus_to': prop:bus_to, 'bus_to_pos': prop:bus_to_pos, 'capex': prop:capex, 'code': prop:code, 'color': prop:color, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'conn': prop:conn, 'conn_f': prop:conn_f, 'conn_t': prop:conn_t, 'contingency_factor': prop:contingency_factor, 'decommissioned_date': prop:decommissioned_date, 'design_rate': prop:design_rate, 'diff_changes': prop:diff_changes, 'emt_fmu_import_config': prop:emt_fmu_import_config, 'emt_fmu_me_import_config': prop:emt_fmu_me_import_config, 'emt_fmu_template': prop:emt_fmu_template, 'emt_model': prop:emt_model, 'emt_template': prop:emt_template, 'group': prop:group, 'idtag': prop:idtag, 'modelling_authority': prop:modelling_authority, 'monitor_loading': prop:monitor_loading, 'mttf': prop:mttf, 'mttr': prop:mttr, 'name': prop:name, 'opex': prop:opex, 'owners': prop:owners, 'protection_rating_factor': prop:protection_rating_factor, 'rate': prop:rate, 'rdfid': prop:rdfid, 'reducible': prop:reducible, 'regulation_bus': prop:regulation_bus, 'rms_fmu_import_config': prop:rms_fmu_import_config, 'rms_fmu_me_import_config': prop:rms_fmu_me_import_config, 'rms_fmu_template': prop:rms_fmu_template, 'rms_model': prop:rms_model, 'rms_template': prop:rms_template, 'selected_to_merge': prop:selected_to_merge, 'tap_changer': prop:tap_changer, 'tap_module': prop:tap_module, 'tap_module_control_mode': prop:tap_module_control_mode, 'tap_module_max': prop:tap_module_max, 'tap_module_min': prop:tap_module_min, 'tap_phase': prop:tap_phase, 'tap_phase_control_mode': prop:tap_phase_control_mode, 'tap_phase_max': prop:tap_phase_max, 'tap_phase_min': prop:tap_phase_min, 'temp_base': prop:temp_base, 'temp_oper': prop:temp_oper, 'template': prop:template, 'tolerance': prop:tolerance, 'vector_group_number': prop:vector_group_number, 'vset': prop:vset}
property HV: float

Get HV.

Returns:

float

property I0: float

Get I0.

Returns:

float

LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:HV, prop:LV, prop:Sn, prop:Pcu, prop:Pfe, prop:I0, prop:Vsc, prop:conn, prop:conn_f, prop:conn_t, prop:vector_group_number, prop:template)
property LV: float

Get LV.

Returns:

float

property Pcu: float

Get Pcu.

Returns:

float

property Pfe: float

Get Pfe.

Returns:

float

property Sn: float

Get Sn.

Returns:

float

property Vsc: float

Get Vsc.

Returns:

float

apply_template(obj: TransformerType, Sbase: float, logger=<VeraGridEngine.basic_structures.Logger object>)[source]

Apply a branch template to this object :param obj: TransformerType or Tower object :param Sbase: circuit base power in MVA :param logger: Log list

conn: WindingsConnection
property conn_f: WindingType
property conn_t: WindingType
delete_virtual_taps()[source]

Set the HV and LV parameters such that any virtual tap is null

fill_design_properties(Pcu: float, Pfe: float, I0: float, Vsc: float, Sbase: float, round_vals: bool = False) Transformer2W[source]

Fill R, X, G, B from the short circuit study values :param Pcu: copper_losses (kW) :param Pfe: Iron losses (kW) :param I0: No load current in % :param Vsc: Short circuit voltage (%) :param Sbase: Base power in MVA (take always 100 MVA) :param round_vals: round the values? :return: self pointer

fix_inconsistencies(logger: Logger, maximum_difference=0.1) bool[source]

Fix the inconsistencies :param logger: :param maximum_difference: proportion to be under or above (i.e. Transformer HV=41.9, bus HV=45 41.9/45 = 0.93 -> 0.9 <= 0.93 <= 1.1, so it’s ok :return: were there any errors?

get_from_to_nominal_voltages() Tuple[float, float, bool][source]
Returns:

get_transformer_type(Sbase: float = 100.0) TransformerType[source]

Get the equivalent transformer type of this transformer :return: SequenceLineType :param Sbase: :return:

get_vcc() float[source]

Get the short circuit voltage in % This is the value from the short circuit study :return: value in %

get_virtual_taps() Tuple[float, float][source]

Get the branch virtual taps

The virtual taps generate when a transformer nominal winding voltage differs from the bus nominal voltage. :return: Virtual tap at the from side, tap_t (float, 1.0): Virtual tap at the to side

property phases: ndarray[tuple[Any, ...], dtype[int64]]
possible_transformer_types
set_hv_and_lv(HV: float | None, LV: float | None)[source]

set the high and low voltage values :param HV: higher voltage value (kV) :param LV: lower voltage value (kV)

template: TransformerType | None
transformer_admittance(vtap_f: float, vtap_t: float, logger: Logger) Tuple[ndarray[tuple[Any, ...], dtype[float64]] | ndarray[tuple[int, int], dtype[float64]], ndarray[tuple[Any, ...], dtype[float64]] | ndarray[tuple[int, int], dtype[float64]], ndarray[tuple[Any, ...], dtype[float64]] | ndarray[tuple[int, int], dtype[float64]], ndarray[tuple[Any, ...], dtype[float64]] | ndarray[tuple[int, int], dtype[float64]]][source]

Get the transformer 3-phase primitives :param vtap_f: virtual tap from :param vtap_t: virtual tap to :param logger: Logger :return: 3x3 matrices -> Yff, Yft, Ytf, Ytt

transformer_phases(logger: Logger)[source]
property vector_group_number: int

VeraGridEngine.Devices.Branches.transformer3w module

class VeraGridEngine.Devices.Branches.transformer3w.Transformer3W(idtag: str | None = None, code: str = '', name: str = 'Branch', bus0: Bus | None = None, bus1: Bus = None, bus2: Bus = None, bus3: Bus = None, w1_idtag: str | None = None, w2_idtag: str | None = None, w3_idtag: str | None = None, V1=10.0, V2=10.0, V3=10.0, active=True, r12=0.0, r23=0.0, r31=0.0, x12=0.0, x23=0.0, x31=0.0, rate12=0.0, rate23=0.0, rate31=0.0, x=0.0, y=0.0, build_status: BuildStatus = Commissioned)[source]

Bases: DynamicDevice

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'selected_to_merge', 'diff_changes', 'bus0', 'bus1', 'bus2', 'bus3', 'winding1', 'winding2', 'winding3')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {'active': 'active_prof'}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus0, prop:bus1, prop:bus2, prop:bus3, prop:active, prop:winding1, prop:winding2, prop:winding3, prop:V1, prop:V2, prop:V3, prop:r12, prop:r23, prop:r31, prop:x12, prop:x23, prop:x31, prop:rate1, prop:rate2, prop:rate3, prop:Pcu12, prop:Pcu23, prop:Pcu31, prop:Vsc12, prop:Vsc23, prop:Vsc31, prop:Pfe, prop:I0, prop:x, prop:y)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus0, prop:bus1, prop:bus2, prop:bus3, prop:active, prop:winding1, prop:winding2, prop:winding3, prop:V1, prop:V2, prop:V3, prop:r12, prop:r23, prop:r31, prop:x12, prop:x23, prop:x31, prop:rate1, prop:rate2, prop:rate3, prop:Pcu12, prop:Pcu23, prop:Pcu31, prop:Vsc12, prop:Vsc23, prop:Vsc31, prop:Pfe, prop:I0, prop:x, prop:y)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'I0': prop:I0, 'Pcu12': prop:Pcu12, 'Pcu23': prop:Pcu23, 'Pcu31': prop:Pcu31, 'Pfe': prop:Pfe, 'V1': prop:V1, 'V2': prop:V2, 'V3': prop:V3, 'Vsc12': prop:Vsc12, 'Vsc23': prop:Vsc23, 'Vsc31': prop:Vsc31, 'action': prop:action, 'active': prop:active, 'build_status': prop:build_status, 'bus0': prop:bus0, 'bus1': prop:bus1, 'bus2': prop:bus2, 'bus3': prop:bus3, 'code': prop:code, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'decommissioned_date': prop:decommissioned_date, 'diff_changes': prop:diff_changes, 'emt_fmu_import_config': prop:emt_fmu_import_config, 'emt_fmu_me_import_config': prop:emt_fmu_me_import_config, 'emt_fmu_template': prop:emt_fmu_template, 'emt_model': prop:emt_model, 'emt_template': prop:emt_template, 'idtag': prop:idtag, 'modelling_authority': prop:modelling_authority, 'name': prop:name, 'owners': prop:owners, 'r12': prop:r12, 'r23': prop:r23, 'r31': prop:r31, 'rate1': prop:rate1, 'rate2': prop:rate2, 'rate3': prop:rate3, 'rdfid': prop:rdfid, 'rms_fmu_import_config': prop:rms_fmu_import_config, 'rms_fmu_me_import_config': prop:rms_fmu_me_import_config, 'rms_fmu_template': prop:rms_fmu_template, 'rms_model': prop:rms_model, 'rms_template': prop:rms_template, 'selected_to_merge': prop:selected_to_merge, 'winding1': prop:winding1, 'winding2': prop:winding2, 'winding3': prop:winding3, 'x': prop:x, 'x12': prop:x12, 'x23': prop:x23, 'x31': prop:x31, 'y': prop:y}
property I0: float
Returns:

LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:bus0, prop:bus1, prop:bus2, prop:bus3, prop:active, prop:winding1, prop:winding2, prop:winding3, prop:V1, prop:V2, prop:V3, prop:r12, prop:r23, prop:r31, prop:x12, prop:x23, prop:x31, prop:rate1, prop:rate2, prop:rate3, prop:Pcu12, prop:Pcu23, prop:Pcu31, prop:Vsc12, prop:Vsc23, prop:Vsc31, prop:Pfe, prop:I0, prop:x, prop:y)
property Pcu12: float
Returns:

property Pcu23: float
Returns:

property Pcu31: float
Returns:

property Pfe: float
Returns:

property V1: float

Nominal voltage 1 in kV

property V2

Nominal voltage 2 in kV

property V3

Nominal voltage 3 in kV

property Vsc12: float
Returns:

property Vsc23: float
Returns:

property Vsc31: float
Returns:

property active: bool

Get active.

Returns:

bool

property active_prof: ProfileBool

Cost profile :return: Profile

all_connected()[source]

Check that all three windings are connected to something

bus0: Bus
property bus1: Bus

Bus 1

property bus2: Bus

Bus 2

property bus3: Bus

Bus 3

cn0
compute_delta_to_star() None[source]

Perform the delta -> star transformation and apply it to the windings

fill_from_design_values(V1: float, V2: float, V3: float, Sn1: float, Sn2: float, Sn3: float, Pcu12: float, Pcu23: float, Pcu31: float, Vsc12: float, Vsc23: float, Vsc31: float, Pfe: float, I0: float, Sbase: float)[source]

Fill winding per unit impedances from the short circuit study values :param V1: Primary voltage (kV) :param V2: Secondary voltage (kV) :param V3: Tertiary Voltage (kV) :param Sn1: Primary power (MVA) :param Sn2: Secondary power (MVA) :param Sn3: Tertiary power (MVA) :param Pcu12: Pcu 1-2(kW) :param Pcu23: Pcu 2-3(kW) :param Pcu31: Pcu 3-1(kW) :param Vsc12: Vsc 1-2(%) :param Vsc23: Vsc 2-3(%) :param Vsc31: Vsc 3-1(%) :param Pfe: Pfe(kW) :param I0: I0(%) :param Sbase: base power :return:

fill_from_star(r1: float, r2: float, r3: float, x1: float, x2: float, x3: float) None[source]

Fill from Star values :param r1: resistance of branch 1 (p.u.) :param r2: resistance of branch 2 (p.u.) :param r3: resistance of branch 3 (p.u.) :param x1: reactance of branch 1 (p.u.) :param x2: reactance of branch 2 (p.u.) :param x3: reactance of branch 3 (p.u.)

get_active_at(t: int | None) float[source]
Parameters:

t

Returns:

get_winding(i: int) Winding[source]

Get winding from an integer :param i: winding index :return: Winding at i

property r12

1->2 measured resistance in p.u.

property r23

2->3 measured resistance in p.u.

property r31

3->1 measured resistance in p.u.

property rate1

1 measured rate in MVA

property rate2

2 measured rate in MVA

property rate3

3->1 measured rate in MVA

property winding1: Winding

Winding 1 getter :return: Winding

property winding2: Winding

Winding 2 getter :return: Winding

property winding3: Winding

Winding 3 getter :return: Winding

property x: float

Get x.

Returns:

float

property x12

1->2 measured reactance in p.u.

property x23

2->3 measured reactance in p.u.

property x31

3->1 measured reactance in p.u.

property y: float

Get y.

Returns:

float

VeraGridEngine.Devices.Branches.transformer3w.delta_to_star(z12: float, z23: float, z31: float) Tuple[float, float, float][source]

Perform the delta->star transformation See: https://www.electronics-tutorials.ws/dccircuits/dcp_10.html :param z12: 1 to 2 delta value :param z23: 2 to 3 delta value :param z31: 3 to 1 delta value :return: 0->1, 0->2, 0->3 star values

VeraGridEngine.Devices.Branches.transformer3w.star_to_delta(z1: float, z2: float, z3: float) Tuple[float, float, float][source]

Perform the star->delta transformation See: https://www.electronics-tutorials.ws/dccircuits/dcp_10.html :param z1: 0->1 impedance :param z2: 0->2 impedance :param z3: 0->3 impedance :return: z12, z23, z31 impedances

VeraGridEngine.Devices.Branches.transformerNw module

class VeraGridEngine.Devices.Branches.transformerNw.ImpedanceTriplet(i: int = 0, j: int = 0, imp: complex = 0j)[source]

Bases: object

from_list(value: List[int | float]) ImpedanceTriplet[source]
i
imp
j
to_list() List[int | float][source]
class VeraGridEngine.Devices.Branches.transformerNw.ImpedanceTripletList[source]

Bases: object

append(imp: ImpedanceTriplet) None[source]
parse(data: List[List[int | float]]) None[source]
to_list() List[ImpedanceTripletList][source]
class VeraGridEngine.Devices.Branches.transformerNw.TransformerNW(idtag: str | None = None, code: str = '', name: str = 'TransformerNW', bus0: Bus | None = None, winding_count: int | None = None, buses: Sequence[Bus | None] | None = None, active: bool = True, Pfe: float = 0.0, I0: float = 0.0, x: float = 0.0, y: float = 0.0, build_status: BuildStatus = Commissioned)[source]

Bases: PhysicalDevice

Generic N-winding transformer represented as a set of windings connected to a common internal star bus.

The leakage data is stored per winding. Shared core-loss data is represented by Pfe and I0 at the transformer level and mapped through get_impedances. To avoid counting the magnetizing branch multiple times, the resulting shunt admittance is assigned to the first winding only.

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'selected_to_merge', 'diff_changes', 'bus0', 'winding_count')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {'active': 'active_prof'}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:bus0, prop:active, prop:winding_count, prop:Pfe, prop:I0, prop:x, prop:y, prop:internal_impedances)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:bus0, prop:active, prop:winding_count, prop:Pfe, prop:I0, prop:x, prop:y, prop:internal_impedances)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'I0': prop:I0, 'Pfe': prop:Pfe, 'action': prop:action, 'active': prop:active, 'build_status': prop:build_status, 'bus0': prop:bus0, 'code': prop:code, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'decommissioned_date': prop:decommissioned_date, 'diff_changes': prop:diff_changes, 'idtag': prop:idtag, 'internal_impedances': prop:internal_impedances, 'modelling_authority': prop:modelling_authority, 'name': prop:name, 'owners': prop:owners, 'rdfid': prop:rdfid, 'selected_to_merge': prop:selected_to_merge, 'winding_count': prop:winding_count, 'x': prop:x, 'y': prop:y}
property I0: float

Shared no-load current in %.

LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:bus0, prop:active, prop:winding_count, prop:Pfe, prop:I0, prop:x, prop:y, prop:internal_impedances)
property Pfe: float

Shared iron loss in kW.

property active: bool

Get active.

property active_prof: ProfileBool

Cost profile :return: Profile

add_winding(bus: Bus | None = None, winding: Winding | None = None, w_idtag: str | None = None, nominal_voltage: float | None = None, nominal_power: float = 0.0) Winding[source]

Add a winding to the transformer.

all_connected() bool[source]

Check that all windings are connected to a terminal bus.

bus0
property buses: Tuple[Bus | None, ...]

Terminal buses attached to the windings.

cn0
delete_winding(i: int) Winding[source]

Delete a winding by index and return it.

fill_from_design_values(Pfe: float, I0: float, Sbase: float) None[source]

Fill winding per-unit values from each winding’s design data and the shared transformer core-loss data.

get_active_at(t: int | None) float[source]
Parameters:

t

Returns:

get_bus(i: int) Bus | None[source]

Get terminal bus from an integer index.

get_winding(i: int) Winding[source]

Get winding from an integer index.

initialize_windings(winding_count: int | None = None, buses: Sequence[Bus | None] | None = None) None[source]

Initialize the transformer winding set from a winding count and optional buses.

property internal_impedances: ImpedanceTripletList

Internal impedances of transformer model

recalculate_windings_from_definition(Sbase: float = 100.0) None[source]

Recompute the winding per-unit values from the design data stored in each winding plus the shared core-loss values stored at the transformer level.

set_bus(i: int, bus: Bus | None) None[source]

Set terminal bus and keep the associated winding in sync.

set_winding(i: int, winding: Winding, bus: Bus | None = None) None[source]

Replace a winding at position i.

set_winding_count(count: int) None[source]

Resize the winding list preserving existing winding objects when possible.

property winding_count: int

Number of windings in the transformer.

property windings: Tuple[Winding, ...]

Winding objects connected to the internal bus.

property x: float

Get x.

property y: float

Get y.

VeraGridEngine.Devices.Branches.transformer_type module

class VeraGridEngine.Devices.Branches.transformer_type.TransformerType(hv_nominal_voltage: float = 0.0, lv_nominal_voltage: float = 0.0, nominal_power: float = 0.001, copper_losses: float = 0.0, iron_losses: float = 0.0, no_load_current: float = 0.0, short_circuit_voltage: float = 0.0, gr_hv1: float = 0.5, gx_hv1: float = 0.5, total_positions: int = 5, neutral_position: int = 2, dV: float = 0.01, asymmetry_angle: float = 90.0, tc_type: TapChangerTypes = NoRegulation, name: str = 'TransformerType', idtag: None | str = None, capex: float = 0.0, opex: float = 0.0, vector_group_number: int = 0)[source]

Bases: DynamicDevice

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'selected_to_merge', 'diff_changes', 'tap_module_min', 'tap_module_max', 'tap_phase_min', 'tap_phase_max')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:HV, prop:LV, prop:Sn, prop:Pcu, prop:Pfe, prop:I0, prop:Vsc, prop:capex, prop:opex, prop:tc_type, prop:total_positions, prop:dV, prop:neutral_position, prop:asymmetry_angle, prop:conn_hv, prop:conn_lv, prop:vector_group_number, prop:tap_module_min, prop:tap_module_max, prop:tap_phase_min, prop:tap_phase_max)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:HV, prop:LV, prop:Sn, prop:Pcu, prop:Pfe, prop:I0, prop:Vsc, prop:capex, prop:opex, prop:tc_type, prop:total_positions, prop:dV, prop:neutral_position, prop:asymmetry_angle, prop:conn_hv, prop:conn_lv, prop:vector_group_number, prop:tap_module_min, prop:tap_module_max, prop:tap_phase_min, prop:tap_phase_max)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'HV': prop:HV, 'I0': prop:I0, 'LV': prop:LV, 'Pcu': prop:Pcu, 'Pfe': prop:Pfe, 'Sn': prop:Sn, 'Vsc': prop:Vsc, 'action': prop:action, 'asymmetry_angle': prop:asymmetry_angle, 'build_status': prop:build_status, 'capex': prop:capex, 'code': prop:code, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'conn_hv': prop:conn_hv, 'conn_lv': prop:conn_lv, 'dV': prop:dV, 'decommissioned_date': prop:decommissioned_date, 'diff_changes': prop:diff_changes, 'emt_fmu_import_config': prop:emt_fmu_import_config, 'emt_fmu_me_import_config': prop:emt_fmu_me_import_config, 'emt_fmu_template': prop:emt_fmu_template, 'emt_model': prop:emt_model, 'emt_template': prop:emt_template, 'idtag': prop:idtag, 'modelling_authority': prop:modelling_authority, 'name': prop:name, 'neutral_position': prop:neutral_position, 'opex': prop:opex, 'owners': prop:owners, 'rdfid': prop:rdfid, 'rms_fmu_import_config': prop:rms_fmu_import_config, 'rms_fmu_me_import_config': prop:rms_fmu_me_import_config, 'rms_fmu_template': prop:rms_fmu_template, 'rms_model': prop:rms_model, 'rms_template': prop:rms_template, 'selected_to_merge': prop:selected_to_merge, 'tap_module_max': prop:tap_module_max, 'tap_module_min': prop:tap_module_min, 'tap_phase_max': prop:tap_phase_max, 'tap_phase_min': prop:tap_phase_min, 'tc_type': prop:tc_type, 'total_positions': prop:total_positions, 'vector_group_number': prop:vector_group_number}
GR_hv1
GX_hv1
property HV: float

Get HV.

Returns:

float

property I0: float

Get I0.

Returns:

float

LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:HV, prop:LV, prop:Sn, prop:Pcu, prop:Pfe, prop:I0, prop:Vsc, prop:capex, prop:opex, prop:tc_type, prop:total_positions, prop:dV, prop:neutral_position, prop:asymmetry_angle, prop:conn_hv, prop:conn_lv, prop:vector_group_number, prop:tap_module_min, prop:tap_module_max, prop:tap_phase_min, prop:tap_phase_max)
property LV: float

Get LV.

Returns:

float

property Pcu: float

Get Pcu.

Returns:

float

property Pfe: float

Get Pfe.

Returns:

float

property Sn: float

Get Sn.

Returns:

float

property Vsc: float

Get Vsc.

Returns:

float

property asymmetry_angle: float

Tap changer assymetry angle (deg) :return: float

property capex: float

Get capex.

Returns:

float

conn_hv: WindingType
conn_lv: WindingType
property dV: float

Tap changer Voltage increment per step (p.u.) :return: float

get_impedances(VH: float, VL: float, Sbase: float)[source]

Compute the branch parameters of a transformer from the short circuit test values. :param VH: High voltage bus nominal voltage in kV :param VL: Low voltage bus nominal voltage in kV :param Sbase: Base power in MVA (normally 100 MVA) :return: Zseries and Yshunt in system per unit

get_tap_changer() TapChanger[source]

Get tap changer object :return: TapChanger

property neutral_position: int

Tap changer neutral position :return: int

property opex: float

Get opex.

Returns:

float

property tap_module_max: float

Max tap module, computed on the fly :return: float

property tap_module_min: float

Min tap module, computed on the fly :return: float

property tap_phase_max: float

Maximum tap phase (calculated) :return: float

property tap_phase_min: float

Min tap phase, cputed on the fly :return: float

property tc_type: TapChangerTypes

Get the tap changer type :return: TapChangerTypes

property total_positions: int

Tap changer total number of positions :return: int

property vector_group_number: int

Get vector_group_number.

Returns:

int

VeraGridEngine.Devices.Branches.transformer_type.get_impedances(VH_bus: float, VL_bus: float, Sn: float, HV: float, LV: float, Pcu: float, Pfe: float, I0: float, Vsc: float, Sbase: float, GR_hv1: float) Tuple[complex, complex][source]

Compute the branch parameters of a transformer from the short circuit test values. :param VH_bus: High voltage bus nominal voltage in kV :param VL_bus: Low voltage bus nominal voltage in kV :param Sn: Nominal power (MVA) :param HV: Transformer high voltage nominal voltage in kV :param LV: Transformer low voltage nominal voltage in kV :param Pcu: Copper losses, AKA resistive losses (kW) :param Pfe: Iron losses, AKA magnetic losses (kW) :param I0: No-load current (%) :param Vsc: Short-circuit voltage (%) :param Sbase: Base power in MVA (normally 100 MVA) :param GR_hv1: Share of impedance of towards the high voltage side (0 to 1) :return: Zseries and Yshunt in system per unit

VeraGridEngine.Devices.Branches.transformer_type.reverse_transformer_short_circuit_study(R: float, X: float, G: float, B: float, rate: float, Sbase: float) Tuple[float, float, float, float, float][source]

Get the short circuit study values from the impedance values :param R: :param X: :param G: :param B: :param rate: :param Sbase: base power in MVA (100 MVA) :return:

VeraGridEngine.Devices.Branches.underground_line_type module

class VeraGridEngine.Devices.Branches.underground_line_type.UndergroundLineType(name: str = 'UndergroundLine', idtag: None | str = None, Imax: float = 1.0, Vnom: float = 1.0, R: float = 0.0, X: float = 0.0, B: float = 0.0, C: float = 0.0, R0: float = 0.0, X0: float = 0.0, B0: float = 0.0, C0: float = 0.0, freq: float = 50.0, capex: float = 0.0, opex: float = 0.0)[source]

Bases: DynamicDevice

property B: float

Get B.

Returns:

float

property B0: float

Get B0.

Returns:

float

property C: float
property C0: float
CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'selected_to_merge', '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:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:Imax, prop:Vnom, prop:freq, prop:R, prop:X, prop:B, prop:C, prop:R0, prop:X0, prop:B0, prop:C0, prop:n_circuits, prop:capex, prop:opex)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:Imax, prop:Vnom, prop:freq, prop:R, prop:X, prop:B, prop:C, prop:R0, prop:X0, prop:B0, prop:C0, prop:n_circuits, prop:capex, prop:opex)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'B': prop:B, 'B0': prop:B0, 'C': prop:C, 'C0': prop:C0, 'Imax': prop:Imax, 'R': prop:R, 'R0': prop:R0, 'Vnom': prop:Vnom, 'X': prop:X, 'X0': prop:X0, 'action': prop:action, 'build_status': prop:build_status, 'capex': prop:capex, 'code': prop:code, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'decommissioned_date': prop:decommissioned_date, 'diff_changes': prop:diff_changes, 'emt_fmu_import_config': prop:emt_fmu_import_config, 'emt_fmu_me_import_config': prop:emt_fmu_me_import_config, 'emt_fmu_template': prop:emt_fmu_template, 'emt_model': prop:emt_model, 'emt_template': prop:emt_template, 'freq': prop:freq, 'idtag': prop:idtag, 'modelling_authority': prop:modelling_authority, 'n_circuits': prop:n_circuits, 'name': prop:name, 'opex': prop:opex, 'owners': prop:owners, 'rdfid': prop:rdfid, 'rms_fmu_import_config': prop:rms_fmu_import_config, 'rms_fmu_me_import_config': prop:rms_fmu_me_import_config, 'rms_fmu_template': prop:rms_fmu_template, 'rms_model': prop:rms_model, 'rms_template': prop:rms_template, 'selected_to_merge': prop:selected_to_merge}
property Imax: float

Get Imax.

Returns:

float

LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:Imax, prop:Vnom, prop:freq, prop:R, prop:X, prop:B, prop:C, prop:R0, prop:X0, prop:B0, prop:C0, prop:n_circuits, prop:capex, prop:opex)
property R: float

Get R.

Returns:

float

property R0: float

Get R0.

Returns:

float

property Vnom: float

Get Vnom.

Returns:

float

property X: float

Get X.

Returns:

float

property X0: float

Get X0.

Returns:

float

property capex: float

Get capex.

Returns:

float

property freq: float
get_values(Sbase: float, length: float)[source]

Get the per-unit values :param Sbase: Base power (MVA, always use 100MVA) :param length: length in km :return: R (p.u.), x(p.u.), B(p.u.), Rate (MVA)

property n_circuits: int

Get n_circuits.

Returns:

int

property opex: float

Get opex.

Returns:

float

y_shunt()[source]

positive sequence shunt admittance in S per unit of length

z_series()[source]

positive sequence series impedance in Ohm per unit of length

VeraGridEngine.Devices.Branches.upfc module

class VeraGridEngine.Devices.Branches.upfc.UPFC(bus_from: Bus = None, bus_to: Bus = None, name='UPFC', code='', idtag=None, active=True, rs=0.0, xs=1e-05, rp=0.0, xp=0.0, vp=1.0, Pset=0.0, Qset=0.0, design_rate: float = 9999, rate=9999, mttf=0, mttr=0, cost=100, contingency_factor=1.0, protection_rating_factor: float = 1.4, contingency_enabled=True, monitor_loading=True, rs0=0.0, xs0=1e-05, rp0=0.0, xp0=0.0, rs2=0.0, xs2=1e-05, rp2=0.0, xp2=0.0, capex=0, opex=0, build_status: BuildStatus = Commissioned)[source]

Bases: BranchParent

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'selected_to_merge', 'diff_changes', 'bus_from', 'bus_to')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {'Cost': 'Cost_prof', 'active': 'active_prof', 'contingency_factor': 'contingency_factor_prof', 'protection_rating_factor': 'protection_rating_factor_prof', 'rate': 'rate_prof', 'temp_oper': 'temp_oper_prof'}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:R, prop:X, prop:Rsh, prop:Xsh, prop:R0, prop:X0, prop:Rsh0, prop:Xsh0, prop:R2, prop:X2, prop:Rsh2, prop:Xsh2, prop:Vsh, prop:Pfset, prop:Qfset)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:R, prop:X, prop:Rsh, prop:Xsh, prop:R0, prop:X0, prop:Rsh0, prop:Xsh0, prop:R2, prop:X2, prop:Rsh2, prop:Xsh2, prop:Vsh, prop:Pfset, prop:Qfset)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'Cost': prop:Cost, 'Pfset': prop:Pfset, 'Qfset': prop:Qfset, 'R': prop:R, 'R0': prop:R0, 'R2': prop:R2, 'Rsh': prop:Rsh, 'Rsh0': prop:Rsh0, 'Rsh2': prop:Rsh2, 'Vsh': prop:Vsh, 'X': prop:X, 'X0': prop:X0, 'X2': prop:X2, 'Xsh': prop:Xsh, 'Xsh0': prop:Xsh0, 'Xsh2': prop:Xsh2, 'action': prop:action, 'active': prop:active, 'alpha': prop:alpha, 'build_status': prop:build_status, 'bus_from': prop:bus_from, 'bus_from_pos': prop:bus_from_pos, 'bus_to': prop:bus_to, 'bus_to_pos': prop:bus_to_pos, 'capex': prop:capex, 'code': prop:code, 'color': prop:color, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'contingency_factor': prop:contingency_factor, 'decommissioned_date': prop:decommissioned_date, 'design_rate': prop:design_rate, 'diff_changes': prop:diff_changes, 'emt_fmu_import_config': prop:emt_fmu_import_config, 'emt_fmu_me_import_config': prop:emt_fmu_me_import_config, 'emt_fmu_template': prop:emt_fmu_template, 'emt_model': prop:emt_model, 'emt_template': prop:emt_template, 'group': prop:group, 'idtag': prop:idtag, 'modelling_authority': prop:modelling_authority, 'monitor_loading': prop:monitor_loading, 'mttf': prop:mttf, 'mttr': prop:mttr, 'name': prop:name, 'opex': prop:opex, 'owners': prop:owners, 'protection_rating_factor': prop:protection_rating_factor, 'rate': prop:rate, 'rdfid': prop:rdfid, 'reducible': prop:reducible, 'rms_fmu_import_config': prop:rms_fmu_import_config, 'rms_fmu_me_import_config': prop:rms_fmu_me_import_config, 'rms_fmu_template': prop:rms_fmu_template, 'rms_model': prop:rms_model, 'rms_template': prop:rms_template, 'selected_to_merge': prop:selected_to_merge, 'temp_base': prop:temp_base, 'temp_oper': prop:temp_oper}
LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:R, prop:X, prop:Rsh, prop:Xsh, prop:R0, prop:X0, prop:Rsh0, prop:Xsh0, prop:R2, prop:X2, prop:Rsh2, prop:Xsh2, prop:Vsh, prop:Pfset, prop:Qfset)
property Pfset: float

Get Pfset.

Returns:

float

property Qfset: float

Get Qfset.

Returns:

float

property R: float

Get R.

Returns:

float

property R0: float

Get R0.

Returns:

float

property R2: float

Get R2.

Returns:

float

property Rsh: float

Get Rsh.

Returns:

float

property Rsh0: float

Get Rsh0.

Returns:

float

property Rsh2: float

Get Rsh2.

Returns:

float

property Vsh: float

Get Vsh.

Returns:

float

property X: float

Get X.

Returns:

float

property X0: float

Get X0.

Returns:

float

property X2: float

Get X2.

Returns:

float

property Xsh: float

Get Xsh.

Returns:

float

property Xsh0: float

Get Xsh0.

Returns:

float

property Xsh2: float

Get Xsh2.

Returns:

float

change_base(Sbase_old: float, Sbase_new: float)[source]
Parameters:
  • Sbase_old

  • Sbase_new

Returns:

get_max_bus_nominal_voltage()[source]

GEt the maximum nominal voltage :return:

get_min_bus_nominal_voltage()[source]

Get the minimum nominal voltage :return:

get_ysh0()[source]
Returns:

get_ysh1()[source]
Returns:

get_ysh2()[source]
Returns:

plot_profiles(time_series=None, my_index=0, show_fig=True)[source]

Plot the time series results of this object :param time_series: TimeSeries Instance :param my_index: index of this object in the simulation :param show_fig: Show the figure?

VeraGridEngine.Devices.Branches.vsc module

class VeraGridEngine.Devices.Branches.vsc.VSC(bus_from: Bus | None = None, bus_to: Bus | None = None, bus_dc_n: Bus | None = None, name='VSC', idtag: str | None = None, code='', active=True, design_rate: float = 9999.0, rate: float = 9999.0, alpha1=0.0001, alpha2=0.015, alpha3=0.2, mttf=0.0, mttr=0.0, cost=100, contingency_factor=1.0, protection_rating_factor: float = 1.4, contingency_enabled=True, monitor_loading=True, capex=0.0, opex=0.0, build_status: BuildStatus = Commissioned, control1: ConverterControlType = Q_droop, control1_dev: Bus | BRANCH_TYPES | None = None, control1_val: float = 1.0, control1_val_min: float = -9999.0, control1_val_max: float = 9999.0, control1_droop: float = 0.1, control1_droop_val: float = 1.0, control1_droop_val_min: float = 0.9, control1_droop_val_max: float = 1.1, control2: ConverterControlType = Vm_dc, control2_dev: Bus | BRANCH_TYPES | None = None, control2_val: float = 0.0, control2_val_min: float = -9999.0, control2_val_max: float = 9999.0, control2_droop: float = 0.1, control2_droop_val: float = 1.0, control2_droop_val_min: float = 0.9, control2_droop_val_max: float = 1.1, fault_control: ConverterFaultControlType = Standard, min_ac_voltage: float = 0.1, ysvs: float = 0.0, x: float = 0.0, y: float = 0.0)[source]

Bases: BranchParent

CLASS_NON_EDITABLE_PROPERTIES = ('idtag', 'selected_to_merge', 'diff_changes', 'bus_from', 'bus_to', 'bus_dc_n', 'control1_dev', 'control2_dev')
CLASS_PROPERTIES_WITH_PROFILE = {'Cost': 'Cost_prof', 'active': 'active_prof', 'contingency_factor': 'contingency_factor_prof', 'control1': 'control1_prof', 'control1_dev': 'control1_dev_prof', 'control1_droop_val': 'control1_droop_val_prof', 'control1_val': 'control1_val_prof', 'control1_val_droop': 'control1_val_droop_prof', 'control2': 'control2_prof', 'control2_dev': 'control2_dev_prof', 'control2_droop_val': 'control2_droop_val_prof', 'control2_val': 'control2_val_prof', 'control2_val_droop': 'control2_val_droop_prof', 'fault_control': 'fault_control_prof', 'protection_rating_factor': 'protection_rating_factor_prof', 'rate': 'rate_prof', 'temp_oper': 'temp_oper_prof'}
CLASS_PROPERTY_DECLARATIONS = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:bus_dc_n, prop:alpha1, prop:alpha2, prop:alpha3, prop:control1, prop:control1_dev, prop:control1_val, prop:control1_val_min, prop:control1_val_max, prop:control1_val_droop, prop:control1_droop_val, prop:control1_droop_val_min, prop:control1_droop_val_max, prop:control2, prop:control2_dev, prop:control2_val, prop:control2_val_min, prop:control2_val_max, prop:control2_val_droop, prop:control2_droop_val, prop:control2_droop_val_min, prop:control2_droop_val_max, prop:fault_control, prop:min_ac_voltage, prop:ysvs, prop:x, prop:y)
CLASS_PROPERTY_LIST = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:bus_dc_n, prop:alpha1, prop:alpha2, prop:alpha3, prop:control1, prop:control1_dev, prop:control1_val, prop:control1_val_min, prop:control1_val_max, prop:control1_val_droop, prop:control1_droop_val, prop:control1_droop_val_min, prop:control1_droop_val_max, prop:control2, prop:control2_dev, prop:control2_val, prop:control2_val_min, prop:control2_val_max, prop:control2_val_droop, prop:control2_droop_val, prop:control2_droop_val_min, prop:control2_droop_val_max, prop:fault_control, prop:min_ac_voltage, prop:ysvs, prop:x, prop:y)
CLASS_REGISTERED_PROPERTIES = {'Cost': prop:Cost, 'action': prop:action, 'active': prop:active, 'alpha': prop:alpha, 'alpha1': prop:alpha1, 'alpha2': prop:alpha2, 'alpha3': prop:alpha3, 'build_status': prop:build_status, 'bus_dc_n': prop:bus_dc_n, 'bus_from': prop:bus_from, 'bus_from_pos': prop:bus_from_pos, 'bus_to': prop:bus_to, 'bus_to_pos': prop:bus_to_pos, 'capex': prop:capex, 'code': prop:code, 'color': prop:color, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'contingency_factor': prop:contingency_factor, 'control1': prop:control1, 'control1_dev': prop:control1_dev, 'control1_droop_val': prop:control1_droop_val, 'control1_droop_val_max': prop:control1_droop_val_max, 'control1_droop_val_min': prop:control1_droop_val_min, 'control1_val': prop:control1_val, 'control1_val_droop': prop:control1_val_droop, 'control1_val_max': prop:control1_val_max, 'control1_val_min': prop:control1_val_min, 'control2': prop:control2, 'control2_dev': prop:control2_dev, 'control2_droop_val': prop:control2_droop_val, 'control2_droop_val_max': prop:control2_droop_val_max, 'control2_droop_val_min': prop:control2_droop_val_min, 'control2_val': prop:control2_val, 'control2_val_droop': prop:control2_val_droop, 'control2_val_max': prop:control2_val_max, 'control2_val_min': prop:control2_val_min, 'decommissioned_date': prop:decommissioned_date, 'design_rate': prop:design_rate, 'diff_changes': prop:diff_changes, 'emt_fmu_import_config': prop:emt_fmu_import_config, 'emt_fmu_me_import_config': prop:emt_fmu_me_import_config, 'emt_fmu_template': prop:emt_fmu_template, 'emt_model': prop:emt_model, 'emt_template': prop:emt_template, 'fault_control': prop:fault_control, 'group': prop:group, 'idtag': prop:idtag, 'min_ac_voltage': prop:min_ac_voltage, 'modelling_authority': prop:modelling_authority, 'monitor_loading': prop:monitor_loading, 'mttf': prop:mttf, 'mttr': prop:mttr, 'name': prop:name, 'opex': prop:opex, 'owners': prop:owners, 'protection_rating_factor': prop:protection_rating_factor, 'rate': prop:rate, 'rdfid': prop:rdfid, 'reducible': prop:reducible, 'rms_fmu_import_config': prop:rms_fmu_import_config, 'rms_fmu_me_import_config': prop:rms_fmu_me_import_config, 'rms_fmu_template': prop:rms_fmu_template, 'rms_model': prop:rms_model, 'rms_template': prop:rms_template, 'selected_to_merge': prop:selected_to_merge, 'temp_base': prop:temp_base, 'temp_oper': prop:temp_oper, 'x': prop:x, 'y': prop:y, 'ysvs': prop:ysvs}
LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:bus_dc_n, prop:alpha1, prop:alpha2, prop:alpha3, prop:control1, prop:control1_dev, prop:control1_val, prop:control1_val_min, prop:control1_val_max, prop:control1_val_droop, prop:control1_droop_val, prop:control1_droop_val_min, prop:control1_droop_val_max, prop:control2, prop:control2_dev, prop:control2_val, prop:control2_val_min, prop:control2_val_max, prop:control2_val_droop, prop:control2_droop_val, prop:control2_droop_val_min, prop:control2_droop_val_max, prop:fault_control, prop:min_ac_voltage, prop:ysvs, prop:x, prop:y)
property alpha1: float

Get alpha1.

Returns:

float

property alpha2: float

Get alpha2.

Returns:

float

property alpha3: float

Get alpha3.

Returns:

float

property bus_dc_n: Bus

Get the DC negative bus

property bus_from: Bus

Get the DC positive bus

property bus_to: Bus

Get the AC bus

property control1
Returns:

property control1_dev
Returns:

property control1_dev_prof: ProfileDevice

Cost profile :return: Profile

property control1_droop_val: float

Get control1_droop_val.

Returns:

float

property control1_droop_val_max: float

Get control1_droop_val_max.

Returns:

float

property control1_droop_val_min: float

Get control1_droop_val_min.

Returns:

float

property control1_droop_val_prof: ProfileFloat

Cost profile :return: Profile

property control1_prof: ProfileEnum

Cost profile :return: Profile

property control1_val
Returns:

property control1_val_droop: float

Get control1_val_droop.

Returns:

float

property control1_val_droop_prof: ProfileFloat

Cost profile :return: Profile

property control1_val_max: float

Get control1_val_max.

Returns:

float

property control1_val_min: float

Get control1_val_min.

Returns:

float

property control1_val_prof: ProfileFloat

Cost profile :return: Profile

property control2
Returns:

property control2_dev
Returns:

property control2_dev_prof: ProfileDevice

Cost profile :return: Profile

property control2_droop_val: float

Get control2_droop_val.

Returns:

float

property control2_droop_val_max: float

Get control2_droop_val_max.

Returns:

float

property control2_droop_val_min: float

Get control2_droop_val_min.

Returns:

float

property control2_droop_val_prof: ProfileFloat

Cost profile :return: Profile

property control2_prof: ProfileEnum

Cost profile :return: Profile

property control2_val
Returns:

property control2_val_droop: float

Get control2_val_droop.

Returns:

float

property control2_val_droop_prof: ProfileFloat

Cost profile :return: Profile

property control2_val_max: float

Get control2_val_max.

Returns:

float

property control2_val_min: float

Get control2_val_min.

Returns:

float

property control2_val_prof: ProfileFloat

Cost profile :return: Profile

property fault_control
Returns:

property fault_control_prof: ProfileEnum

Cost profile :return: Profile

get_control1_at(t: int | None) ConverterControlType[source]
Parameters:

t

Returns:

get_control1_dev_at(t: int | None) Bus | BranchParent | None[source]
Parameters:

t

Returns:

get_control1_droop_val_at(t: int | None) float[source]
Parameters:

t

Returns:

get_control1_val_at(t: int | None) float[source]
Parameters:

t

Returns:

get_control1_val_droop_at(t: int | None) float[source]
Parameters:

t

Returns:

get_control2_at(t: int | None) ConverterControlType[source]
Parameters:

t

Returns:

get_control2_dev_at(t: int | None) Bus | BranchParent | None[source]
Parameters:

t

Returns:

get_control2_droop_val_at(t: int | None) float[source]
Parameters:

t

Returns:

get_control2_val_at(t: int | None) float[source]
Parameters:

t

Returns:

get_control2_val_droop_at(t: int | None) float[source]
Parameters:

t

Returns:

get_coordinates() List[Tuple[float, float]][source]

Get the line defining coordinates

get_fault_control_at(t: int | None) ConverterControlType[source]
Parameters:

t

Returns:

is_3term()[source]

Is this a 3-terminal VSC?

property min_ac_voltage: float

Get min_ac_voltage.

Returns:

float

plot_profiles(time_series=None, my_index=0, show_fig=True)[source]

Plot the time series results of this object :param time_series: TimeSeries Instance :param my_index: index of this object in the simulation :param show_fig: Show the figure?

property x: float

Get x.

Returns:

float

property y: float

Get y.

Returns:

float

property ysvs: float

Get ysvs.

Returns:

float

VeraGridEngine.Devices.Branches.winding module

class VeraGridEngine.Devices.Branches.winding.Winding(bus_from: Bus = None, bus_to: Bus = None, name='Winding', idtag: None | str = None, code: str = '', HV: None | float = None, LV: None | float = None, nominal_power: float = 0.001, copper_losses: float = 0.0, iron_losses: float = 0.0, no_load_current: float = 0.0, short_circuit_voltage: float = 0.0, r: float = 1e-20, x: float = 1e-05, g: float = 1e-20, b: float = 1e-20, design_rate: float = 9999.0, rate: float = 9999.0, tap_module: float = 1.0, tap_module_max: float = 1.2, tap_module_min: float = 0.5, tap_phase: float = 0.0, tap_phase_max: float = 6.28, tap_phase_min: float = -6.28, active: bool = True, tolerance: float = 0.0, cost: float = 100.0, mttf: float = 0.0, mttr: float = 0.0, vset: float = 1.0, Pset: float = 0.0, Qset: float = 0.0, temp_base: float = 20.0, temp_oper: float = 20.0, alpha: float = 0.0033, tap_module_control_mode: TapModuleControl = Fixed, tap_phase_control_mode: TapPhaseControl = Fixed, contingency_factor: float = 1.0, protection_rating_factor: float = 1.4, contingency_enabled: bool = True, monitor_loading: bool = True, r0: float = 1e-20, x0: float = 1e-20, g0: float = 1e-20, b0: float = 1e-20, r2: float = 1e-20, x2: float = 1e-20, g2: float = 1e-20, b2: float = 1e-20, conn: WindingsConnection = GG, capex: float = 0.0, opex: float = 0.0, build_status: BuildStatus = Commissioned)[source]

Bases: Transformer2W

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'selected_to_merge', 'diff_changes', 'bus_from', 'bus_to', 'tap_changer', 'template')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {'Cost': 'Cost_prof', 'Pset': 'Pset_prof', 'Qset': 'Qset_prof', 'active': 'active_prof', 'contingency_factor': 'contingency_factor_prof', 'protection_rating_factor': 'protection_rating_factor_prof', 'rate': 'rate_prof', 'tap_module': 'tap_module_prof', 'tap_module_control_mode': 'tap_module_control_mode_prof', 'tap_phase': 'tap_phase_prof', 'tap_phase_control_mode': 'tap_phase_control_mode_prof', 'temp_oper': 'temp_oper_prof', 'vset': 'vset_prof'}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:R, prop:X, prop:G, prop:B, prop:R0, prop:X0, prop:G0, prop:B0, prop:R2, prop:X2, prop:G2, prop:B2, prop:tolerance, prop:tap_changer, prop:tap_module, prop:tap_module_max, prop:tap_module_min, prop:tap_module_control_mode, prop:vset, prop:Qset, prop:regulation_bus, prop:tap_phase, prop:tap_phase_max, prop:tap_phase_min, prop:tap_phase_control_mode, prop:Pset, prop:HV, prop:LV, prop:Sn, prop:Pcu, prop:Pfe, prop:I0, prop:Vsc, prop:conn, prop:conn_f, prop:conn_t, prop:vector_group_number, prop:template)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:R, prop:X, prop:G, prop:B, prop:R0, prop:X0, prop:G0, prop:B0, prop:R2, prop:X2, prop:G2, prop:B2, prop:tolerance, prop:tap_changer, prop:tap_module, prop:tap_module_max, prop:tap_module_min, prop:tap_module_control_mode, prop:vset, prop:Qset, prop:regulation_bus, prop:tap_phase, prop:tap_phase_max, prop:tap_phase_min, prop:tap_phase_control_mode, prop:Pset, prop:HV, prop:LV, prop:Sn, prop:Pcu, prop:Pfe, prop:I0, prop:Vsc, prop:conn, prop:conn_f, prop:conn_t, prop:vector_group_number, prop:template)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'B': prop:B, 'B0': prop:B0, 'B2': prop:B2, 'Cost': prop:Cost, 'G': prop:G, 'G0': prop:G0, 'G2': prop:G2, 'HV': prop:HV, 'I0': prop:I0, 'LV': prop:LV, 'Pcu': prop:Pcu, 'Pfe': prop:Pfe, 'Pset': prop:Pset, 'Qset': prop:Qset, 'R': prop:R, 'R0': prop:R0, 'R2': prop:R2, 'Sn': prop:Sn, 'Vsc': prop:Vsc, 'X': prop:X, 'X0': prop:X0, 'X2': prop:X2, 'action': prop:action, 'active': prop:active, 'alpha': prop:alpha, 'build_status': prop:build_status, 'bus_from': prop:bus_from, 'bus_from_pos': prop:bus_from_pos, 'bus_to': prop:bus_to, 'bus_to_pos': prop:bus_to_pos, 'capex': prop:capex, 'code': prop:code, 'color': prop:color, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'conn': prop:conn, 'conn_f': prop:conn_f, 'conn_t': prop:conn_t, 'contingency_factor': prop:contingency_factor, 'decommissioned_date': prop:decommissioned_date, 'design_rate': prop:design_rate, 'diff_changes': prop:diff_changes, 'emt_fmu_import_config': prop:emt_fmu_import_config, 'emt_fmu_me_import_config': prop:emt_fmu_me_import_config, 'emt_fmu_template': prop:emt_fmu_template, 'emt_model': prop:emt_model, 'emt_template': prop:emt_template, 'group': prop:group, 'idtag': prop:idtag, 'modelling_authority': prop:modelling_authority, 'monitor_loading': prop:monitor_loading, 'mttf': prop:mttf, 'mttr': prop:mttr, 'name': prop:name, 'opex': prop:opex, 'owners': prop:owners, 'protection_rating_factor': prop:protection_rating_factor, 'rate': prop:rate, 'rdfid': prop:rdfid, 'reducible': prop:reducible, 'regulation_bus': prop:regulation_bus, 'rms_fmu_import_config': prop:rms_fmu_import_config, 'rms_fmu_me_import_config': prop:rms_fmu_me_import_config, 'rms_fmu_template': prop:rms_fmu_template, 'rms_model': prop:rms_model, 'rms_template': prop:rms_template, 'selected_to_merge': prop:selected_to_merge, 'tap_changer': prop:tap_changer, 'tap_module': prop:tap_module, 'tap_module_control_mode': prop:tap_module_control_mode, 'tap_module_max': prop:tap_module_max, 'tap_module_min': prop:tap_module_min, 'tap_phase': prop:tap_phase, 'tap_phase_control_mode': prop:tap_phase_control_mode, 'tap_phase_max': prop:tap_phase_max, 'tap_phase_min': prop:tap_phase_min, 'temp_base': prop:temp_base, 'temp_oper': prop:temp_oper, 'template': prop:template, 'tolerance': prop:tolerance, 'vector_group_number': prop:vector_group_number, 'vset': prop:vset}
conn: WindingsConnection
possible_transformer_types
template: TransformerType | None

VeraGridEngine.Devices.Branches.wire module

class VeraGridEngine.Devices.Branches.wire.Wire(name='', idtag: str | None = None, r: float = 0.01, max_current: float = 1.0, stranding: str = '', material: str = '', diameter: float = 0.0, diameter_internal: float = 0.0, is_tube: bool = False, code: str = '')[source]

Bases: EditableDevice

This class represents a wire (an actual wire) to compose towers

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'selected_to_merge', '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:selected_to_merge, prop:comment, prop:diff_changes, prop:R, prop:diameter, prop:diameter_internal, prop:is_tube, prop:max_current, prop:stranding, prop:material)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:R, prop:diameter, prop:diameter_internal, prop:is_tube, prop:max_current, prop:stranding, prop:material)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'R': prop:R, 'action': prop:action, 'code': prop:code, 'comment': prop:comment, 'diameter': prop:diameter, 'diameter_internal': prop:diameter_internal, 'diff_changes': prop:diff_changes, 'idtag': prop:idtag, 'is_tube': prop:is_tube, 'material': prop:material, 'max_current': prop:max_current, 'name': prop:name, 'rdfid': prop:rdfid, 'selected_to_merge': prop:selected_to_merge, 'stranding': prop:stranding}
LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:R, prop:diameter, prop:diameter_internal, prop:is_tube, prop:max_current, prop:stranding, prop:material)
property R: float
property diameter: float
property diameter_internal: float
property is_tube: bool
property material: str

Material of wire :return:

property max_current: float
property stranding: str

Stranding of wire :return:

Module contents