Powerflow_object
[Distribution flow solver (network)]


Detailed Description

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

There are three 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
  2. 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
  3. 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.


Classes

class  powerflow_object

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. no phase info.
#define OC_CONTACT   0x1000
 contact condition flag (must be combined with at least 2 connections
#define OC_CONTACT_ALL   0x10ff
 any contact
#define OC_GROUND_CONTACT   0x1080
 ground contact
#define OC_GROUND_OPEN   0x2080
 ground connection open
#define OC_INFO   0x3000
 all condition info
#define OC_NEUTRAL_CONTACT   0x1008
 neutral contact
#define OC_NEUTRAL_OPEN   0x2008
 netural connection open
#define OC_NORMAL   0x0000
 Operating condition flags Bits are combined to create abnormal conditions, e.g., operating condition flag; no problems.
#define OC_OPEN   0x2000
 open condition flag (combined with at least 1 phase connections)
#define OC_OPEN_ALL   0x20ff
 any connection open
#define OC_PHASE_A_CONTACT   0x1001
 phase A contact
#define OC_PHASE_A_OPEN   0x2001
 phase A connection open
#define OC_PHASE_B_CONTACT   0x1002
 phase B contact
#define OC_PHASE_B_OPEN   0x2002
 phase B connection open
#define OC_PHASE_C_CONTACT   0x1004
 phase C contact
#define OC_PHASE_C_OPEN   0x2004
 phase C connection open
#define OC_SPLIT_1_CONTACT   0x1010
 triplex line 1 contact
#define OC_SPLIT_1_OPEN   0x2010
 triplex line 1 connection open
#define OC_SPLIT_2_CONTACT   0x1020
 triplex line 2 contact
#define OC_SPLIT_2_OPEN   0x2020
 triplex line 2 connection open
#define OC_SPLIT_N_CONTACT   0x1040
 triplex neutral contact
#define OC_SPLIT_N_OPEN   0x2040
 triplex line 4 connection open
#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   0x010f
 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. normal powerflow solution.
#define PS_OUTAGE   0x01
 outage powerflow solution

Functions

int powerflow_object::create (void)
EXPORT int create_powerflow_object (OBJECT **obj, OBJECT *parent)
 REQUIRED: allocate and initialize an object.
int powerflow_object::init (void)
EXPORT int init_powerflow_object (OBJECT *obj)
 Object initialization is called once after all object have been created.
int powerflow_object::isa (char *classname)
EXPORT int isa_powerflow_object (OBJECT *obj, char *classname)
TIMESTAMP powerflow_object::postsync (TIMESTAMP t0)
 powerflow_object::powerflow_object (MODULE *mod)
TIMESTAMP powerflow_object::sync (TIMESTAMP t0)
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).

Variables

static powerflow_objectpowerflow_object::defaults = NULL
static CLASSpowerflow_object::oclass = NULL
static CLASSpowerflow_object::pclass = NULL


Define Documentation

#define NO_PHASE   0x0000

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

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

Definition at line 49 of file powerflow_object.h.

Referenced by powerflow_object().

#define OC_NORMAL   0x0000

Operating condition flags Bits are combined to create abnormal conditions, e.g., operating condition flag; no problems.

OC_PHASE_A_CONTACT|OC_PHASE_B_CONTACT 
is used to indicate that phase A and B are in contact (i.e., shorted).

Definition at line 18 of file powerflow_object.h.

Referenced by is_normal(), node::node(), link::postsync(), powerflow_object(), and relay::sync().

#define PS_NORMAL   0x00

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

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

Definition at line 75 of file powerflow_object.h.

Referenced by node::node(), node::postsync(), and powerflow_object().


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 138 of file powerflow_object.cpp.

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

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

References get_id(), get_name(), GL_THROW, init(), 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:
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 181 of file powerflow_object.cpp.

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


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