Network link (branch)
[Distribution flow solver (network)Transmission flow solver (network)]


Detailed Description

The link object implements the general solution elements for branches using the Gauss-Seidel method.

The following operations are performed on each branch during a bottom-up sync event.

The effective admittance Y is calculated by including half of the line charging capacitance B [Kundur 1993, p. 258]:

\[ \widetilde{Y}_{eff} = \widetilde{Y} + \jmath \frac{B}{2} \]

The admittance coefficient is the inverse of the transformer turns ratio n, if any [Kundur 1993, p. 236]:

\[ c \leftarrow \frac{1}{n} \]

The effective line self-admittance is the product of the admittance coefficient and component admittance

\[ \widetilde{Y}_c = \widetilde{Y}_{eff} c \]

Add the self-admittance and the shunt admittances to the busses [Kundur 1993, p. 259]

\[ \Sigma \widetilde{Y}_{from} \leftarrow \Sigma \widetilde{Y}_{from} + \widetilde{Y}_c + \widetilde{Y}_c (c-1) \]

\[ \Sigma \widetilde{Y}_{to} \leftarrow \Sigma \widetilde{Y}_{to} + \widetilde{Y}_c + \widetilde{Y}_{eff} (1-c) \]

Compute the line current injections on the busses

\[ \widetilde{I}_{from} \leftarrow \widetilde{V}_{to} Y c \]


\[ \widetilde{I}_{to} \leftarrow \widetilde{V}_{from} Y c \]


Add the current injections to the busses

\[ \Sigma \widetilde{YV}_{from} \leftarrow \Sigma \widetilde{YV} - \widetilde{I}_{from} \]


\[ \Sigma \widetilde{YV}_{to} \leftarrow \Sigma \widetilde{YV} - \widetilde{I}_{to} \]

Compute the line current (from -> to)

\[ \widetilde{I} \leftarrow \widetilde{I}_{from} - \widetilde{I}_{to} \]



Functions

int link::create (void)
EXPORT int create_link (OBJECT **obj, OBJECT *parent)
 REQUIRED: allocate and initialize an object.
int link::init (node *parent)
int link::init (void)
EXPORT int init_link (OBJECT *obj)
 Object initialization is called once after all object have been created.
void inverse (complex in[3][3], complex out[3][3])
int link::isa (char *classname)
EXPORT int isa_link (OBJECT *obj, char *classname)
 link::link (MODULE *mod)
 constructor.
void multiply (complex a[3][3], complex b[3][3], complex c[3][3])
void multiply (double a, complex b[3][3], complex c[3][3])
TIMESTAMP link::postsync (TIMESTAMP t0)
void subtract (complex a[3][3], complex b[3][3], complex c[3][3])
TIMESTAMP link::sync (TIMESTAMP t0)
EXPORT TIMESTAMP sync_link (OBJECT *obj, TIMESTAMP t0)
EXPORT TIMESTAMP sync_link (OBJECT *obj, TIMESTAMP t0, PASSCONFIG pass)
 Sync is called when the clock needs to advance on the bottom-up pass (PC_BOTTOMUP).

Variables

static linklink::defaults = NULL
static CLASSlink::oclass = NULL
static CLASSlink::pclass = NULL


Function Documentation

EXPORT int create_link ( OBJECT **  obj,
OBJECT parent 
)

REQUIRED: allocate and initialize an object.

Parameters:
obj a pointer to a pointer of the last object in the list
parent a pointer to the parent of this object
Returns:
1 for a successfully created object, 0 for error

Definition at line 179 of file link.cpp.

References gl_create_object, gl_error, gl_set_parent, OBJECTDATA, and oclass.

EXPORT int init_link ( OBJECT obj  ) 

Object initialization is called once after all object have been created.

Parameters:
parent a pointer to this object's parent
Returns:
1 on success, 0 on error

Definition at line 204 of file link.cpp.

References powerflow_object::get_id(), powerflow_object::get_name(), GL_THROW, init(), and OBJECTDATA.

link::link ( MODULE mod  )  [inherited]

constructor.

Class registration is only called once to register the class with the core.

Parameters:
module a module structure maintained by the core

Definition at line 24 of file link.cpp.

References defaults, gl_register_class, GL_THROW, powerflow_object::oclass, oclass, PC_BOTTOMUP, PC_POSTTOPDOWN, and pclass.

TIMESTAMP link::postsync ( TIMESTAMP  t0  )  [inherited]

Todo:
open the appropriate segment (this open all segments) (no ticket)

Reimplemented from powerflow_object.

Reimplemented in fuse, and relay.

Definition at line 132 of file link.cpp.

References A_mat, B_mat, powerflow_object::condition, d_mat, from, powerflow_object::is_normal(), OBJECTDATA, OC_NORMAL, node::phaseA_I_in, node::phaseA_V, node::phaseB_I_in, node::phaseB_V, node::phaseC_I_in, node::phaseC_V, to, and TS_NEVER.

Referenced by relay::postsync(), sync_line(), sync_link(), sync_overhead_line(), sync_regulator(), sync_transformer(), sync_triplex_line(), and sync_underground_line().

EXPORT TIMESTAMP sync_link ( OBJECT obj,
TIMESTAMP  t0,
PASSCONFIG  pass 
)

Sync is called when the clock needs to advance on the bottom-up pass (PC_BOTTOMUP).

Parameters:
t0 this objects current timestamp
t1 the timestamp which the object should move forward to
Returns:
t2, where t2>t1 on success, t2=t1 for retry, t2<t1 on failure

Definition at line 224 of file link.cpp.

References s_object_list::clock, powerflow_object::get_id(), powerflow_object::get_name(), GL_THROW, OBJECTDATA, PC_BOTTOMUP, PC_POSTTOPDOWN, postsync(), sync(), and TS_INVALID.


GridLAB-DTM Version 1.0
An open-source project initiated by the US Department of Energy