Powerflow objects (abstract)
[Distribution flow solver (radial)]


Detailed Description

The powerflow_object class is an abstract class that implements basic elements of powerflow solutions.

There are two critical pieces of information:

  1. phases indicates the phases which are connected by this object. This may be any feasible combination of the phase flags
    • PHASE_A for phase A connections
    • PHASE_B for phase B connections
    • PHASE_C for phase C connections
    • PHASE_N for neutral connections
    • PHASE_D for delta connections (implies A, B, C);
    • PHASE_A for split connections (requires one of A, B, or C);
    • PHASE_ABC for three phase connections
    • PHASE_ABCN for three phase connections with separate neutral
  2. reference_bus indicates the bus for the reference frequency and voltage at which the solution is to be computed. The current solution method does not change the frequency nor does it consider the frequency in the powerflow calculated. The parameter is only to be used to adjust frequency-sensitive loads, such as Grid-FriendlyTM devices.

In addition, each powerflow_object defined must specify what it's parent object is for the purposes of establishing the evaluation order through the ranks. The reference bus is also propagated using the rank order.

The powerflow_object provides optional support for outage conditions when compiled with the SUPPORT_OUTAGES flag is defined in powerflow_object.h. When enabled the following parameters are also defined

  1. condition indicates the device's operating condition with respect to abnormal phase configuration that would require special consideration during the powerflow solution. This can be any combination of two of the following
    • OC_NORMAL for no abnormal configuration (excludes all others)
    • OC_PHASE_A_CONTACT phase A in contact
    • OC_PHASE_B_CONTACT phase B in contact
    • OC_PHASE_C_CONTACT phase C in contact
    • OC_NEUTRAL_CONTACT neutral in contact
    • OC_SPLIT_1_CONTACT split line 1 in contact
    • OC_SPLIT_2_CONTACT split line 2 in contact
    • OC_SPLIT_N_CONTACT split line N in contact
    • OC_GROUND_CONTACT ground in contact
    • OC_PHASE_A_OPEN phase A is open
    • OC_PHASE_B_OPEN phase B is open
    • OC_PHASE_C_OPEN phase C is open
    • OC_NEUTRAL_OPEN neutral is open
    • OC_SPLIT_1_OPEN split line 1 is open
    • OC_SPLIT_2_OPEN split line 2 is open
    • OC_SPLIT_N_OPEN split neutral is open
    • OC_GROUND_OPEN ground connection is open
  2. solution indicates whether special solution methods are required. The base powerflow_object only recognized the normal solution method (PS_NORMAL), but each object may add its own identifiers, so long as it does not conflict any identifiers in the object inheritance hierarchy. When SUPPORT_OUTAGES is defined, the flag PS_OUTAGE is also defined and can be used to engage an alternate solution method.

Outage support
When SUPPORT_OUTAGES is defined, the postsync pass will examine whether condition and solution are matched. If there is an inconsistency (i.e., condition != OC_NORMAL && solution == PS_NORMAL or condition == OC_NORMAL && solution != PS_NORMAL), then they will be reconciled and the solver will iterate again. Object derived from powerflow_object can inspect the value of condition to determine whether they can use the normal powerflow solution method, or an alternative method that is appropriate for abnormal conditions. Be aware that this may result in a change of state in some other object that may cause the solver to reiterate. It is highly recommended that state changes to OC_NORMAL have a non-zero delay built in (i.e., allow the clock to advanced). Failure to do so may result in non-convergence of the solver.


Modules

 Link
 Node
 The node is one of the major components of the method used for solving a powerflow network.

Defines

#define GROUND   0x0080
 ground line connection
#define NO_PHASE   0x0000
 Phases configuration indicators The phase indicators identify which phases a powerflow component is connected to.
#define PHASE_A   0x0001
 A phase connection.
#define PHASE_ABC   0x0007
 three phases connection
#define PHASE_ABCN   0x000f
 three phases neutral connection
#define PHASE_B   0x0002
 B phase connection.
#define PHASE_C   0x0004
 C phase connection.
#define PHASE_D   0x0100
 delta connection (requires ABCN)
#define PHASE_INFO   0x01ff
 all phase info
#define PHASE_N   0x0008
 N phase connected.
#define PHASE_S   0x0070
 Split phase connection.
#define PHASE_S1   0x0010
 split line 1 connection
#define PHASE_S2   0x0020
 split line 2 connection
#define PHASE_SN   0x0040
 split line neutral connection
#define PS_NORMAL   0x00
 Powerflow solution mode indicators The solution modes are used to indicate the solution needed for the powerflow object.

Functions

EXPORT int create_powerflow_object (OBJECT **obj, OBJECT *parent)
 REQUIRED: allocate and initialize an object.
EXPORT int init_powerflow_object (OBJECT *obj)
 Object initialization is called once after all object have been created.
EXPORT TIMESTAMP sync_powerflow_object (OBJECT *obj, TIMESTAMP t0, PASSCONFIG pass)
 Sync is called when the clock needs to advance on the bottom-up pass (PC_BOTTOMUP).


Define Documentation

#define NO_PHASE   0x0000

Phases configuration indicators The phase indicators identify which phases a powerflow component is connected to.

Most combinations of bits are allowed, but some don't make sense (e.g., D|N, S|N)c no phase info

Definition at line 55 of file powerflow_object.h.

#define PS_NORMAL   0x00

Powerflow solution mode indicators The solution modes are used to indicate the solution needed for the powerflow object.

Whenever the object is in PS_NORMAL state, the powerflow solver will use the normal solution method. PS_OUTAGE is used to indicate that there is no expectation the normal solution method will work. Alternate solutions methods may be indicated using other object-specified PS codes normal powerflow solution

Definition at line 81 of file powerflow_object.h.


Function Documentation

EXPORT int create_powerflow_object ( 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 248 of file powerflow_object.cpp.

References gl_create_object, gl_error, gl_set_parent, and OBJECTDATA.

EXPORT int init_powerflow_object ( OBJECT obj  ) 

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

Parameters:
obj a pointer to this object
Returns:
1 on success, 0 on error

Definition at line 273 of file powerflow_object.cpp.

References GL_THROW, and OBJECTDATA.

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

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

Parameters:
obj the object we are sync'ing
t0 this objects current timestamp
pass the current pass for this sync call
Returns:
t1, where t1>t0 on success, t1=t0 for retry, t1<t0 on failure

Definition at line 294 of file powerflow_object.cpp.

References GL_THROW, OBJECTDATA, PC_BOTTOMUP, PC_POSTTOPDOWN, and PC_PRETOPDOWN.


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