There are three critical pieces of information:
phases indicates the phases which are connected by this object. This may be any feasible combination of the phase flagsPHASE_A for phase A connectionsPHASE_B for phase B connectionsPHASE_C for phase C connectionsPHASE_N for neutral connectionsPHASE_D for delta connections (excludes A, B, C, and N);PHASE_A for split connections (requires one of A, B, or C);PHASE_ABC for three phase connectionsPHASE_ABCN for three phase connections with separate neutralcondition 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 followingOC_NORMAL for no abnormal configuration (excludes all others)OC_PHASE_A_CONTACT phase A in contactOC_PHASE_B_CONTACT phase B in contactOC_PHASE_C_CONTACT phase C in contactOC_NEUTRAL_CONTACT neutral in contactOC_SPLIT_1_CONTACT split line 1 in contactOC_SPLIT_2_CONTACT split line 2 in contactOC_SPLIT_N_CONTACT split line N in contactOC_GROUND_CONTACT ground in contactOC_PHASE_A_OPEN phase A is openOC_PHASE_B_OPEN phase B is openOC_PHASE_C_OPEN phase C is openOC_NEUTRAL_OPEN neutral is openOC_SPLIT_1_OPEN split line 1 is openOC_SPLIT_2_OPEN split line 2 is openOC_SPLIT_N_OPEN split neutral is openOC_GROUND_OPEN ground connection is opensolution 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_object * | powerflow_object::defaults = NULL |
| static CLASS * | powerflow_object::oclass = NULL |
| static CLASS * | powerflow_object::pclass = NULL |
| #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
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().
REQUIRED: allocate and initialize an object.
| obj | a pointer to a pointer of the last object in the list | |
| parent | a pointer to the parent of this object |
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.
| parent | a pointer to this object's parent |
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).
| t0 | this objects current timestamp | |
| t1 | the timestamp which the object should move forward to |
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().