DSS C-API and dss.hpp
DSS C-API and dss.hpp expose a customized and extended implementation of OpenDSS to C and C++.
dss::obj::Reactor Class Reference
Inheritance diagram for dss::obj::Reactor:
[legend]
Collaboration diagram for dss::obj::Reactor:
[legend]

Classes

struct  Properties
 

Public Member Functions

 Reactor (APIUtil *util=nullptr, void *ptr_=nullptr)
 Create wrapper directly by a given object handle/pointer.
 
 Reactor (APIUtil *util, int32_t idx)
 Create a wrapper for an element given by the integer index "idx".
 
 Reactor (APIUtil *util, char *name)
 Create a wrapper for an element given its name.
 
const char * name ()
 Returns the object's name.
 
Reactorbegin_edit ()
 Marks an object for edition. More...
 
Reactorend_edit (int32_t num_edits=1)
 Finalizes an object edition. More...
 
string bus1 ()
 Name of first bus. More...
 
Reactorbus1 (const string &value)
 
Reactorbus1 (const char *value)
 
string bus2 ()
 Name of 2nd bus. More...
 
Reactorbus2 (const string &value)
 
Reactorbus2 (const char *value)
 
int32_t phases ()
 Number of phases. More...
 
Reactorphases (int32_t value)
 
double kvar ()
 Total kvar, all phases. More...
 
Reactorkvar (double value)
 
double kv ()
 For 2, 3-phase, kV phase-phase. More...
 
Reactorkv (double value)
 
Connection conn ()
 ={wye | delta |LN |LL} Default is wye, which is equivalent to LN. More...
 
Reactorconn (int32_t value)
 
Reactorconn (Connection value)
 
Reactorconn (const string &value)
 
Reactorconn (const char *value)
 
string conn_str ()
 ={wye | delta |LN |LL} Default is wye, which is equivalent to LN. More...
 
Reactorconn_str (const string &value)
 ={wye | delta |LN |LL} Default is wye, which is equivalent to LN. More...
 
VectorXd Rmatrix ()
 Resistance matrix, lower triangle, ohms at base frequency. More...
 
ReactorRmatrix (VectorXd &value)
 
VectorXd Xmatrix ()
 Reactance matrix, lower triangle, ohms at base frequency. More...
 
ReactorXmatrix (VectorXd &value)
 
bool Parallel ()
 {Yes | No} Default=No. More...
 
ReactorParallel (bool value)
 
double R ()
 Resistance (in series with reactance), each phase, ohms. More...
 
ReactorR (double value)
 
double X ()
 Reactance, each phase, ohms at base frequency. More...
 
ReactorX (double value)
 
double Rp ()
 Resistance in parallel with R and X (the entire branch). More...
 
ReactorRp (double value)
 
complex Z1 ()
 Positive-sequence impedance, ohms, as a 2-element array representing a complex number. More...
 
ReactorZ1 (complex value)
 
complex Z2 ()
 Negative-sequence impedance, ohms, as a 2-element array representing a complex number. More...
 
ReactorZ2 (complex value)
 
complex Z0 ()
 Zer0-sequence impedance, ohms, as a 2-element array representing a complex number. More...
 
ReactorZ0 (complex value)
 
complex Z ()
 Alternative way of defining R and X properties. More...
 
ReactorZ (complex value)
 
string RCurve ()
 Name of XYCurve object, previously defined, describing per-unit variation of phase resistance, R, vs. More...
 
ReactorRCurve (const string &value)
 
ReactorRCurve (dss::obj::XYcurve &value)
 
dss::obj::XYcurve RCurve_obj ()
 Name of XYCurve object, previously defined, describing per-unit variation of phase resistance, R, vs. More...
 
ReactorRCurve_obj (dss::obj::XYcurve &value)
 
string LCurve ()
 Name of XYCurve object, previously defined, describing per-unit variation of phase inductance, L=X/w, vs. More...
 
ReactorLCurve (const string &value)
 
ReactorLCurve (dss::obj::XYcurve &value)
 
dss::obj::XYcurve LCurve_obj ()
 Name of XYCurve object, previously defined, describing per-unit variation of phase inductance, L=X/w, vs. More...
 
ReactorLCurve_obj (dss::obj::XYcurve &value)
 
double LmH ()
 Inductance, mH. More...
 
ReactorLmH (double value)
 
double normamps ()
 Normal rated current. More...
 
Reactornormamps (double value)
 
double emergamps ()
 Maximum or emerg current. More...
 
Reactoremergamps (double value)
 
double faultrate ()
 Failure rate per year. More...
 
Reactorfaultrate (double value)
 
double pctperm ()
 Percent of failures that become permanent. More...
 
Reactorpctperm (double value)
 
double repair ()
 Hours to repair. More...
 
Reactorrepair (double value)
 
double basefreq ()
 Base Frequency for ratings. More...
 
Reactorbasefreq (double value)
 
bool enabled ()
 {Yes|No or True|False} Indicates whether this element is enabled. More...
 
Reactorenabled (bool value)
 
Reactorlike (const string &value)
 Make like another object, e.g. More...
 
Reactorlike (const char *value)
 Make like another object, e.g. More...
 
- Public Member Functions inherited from dss::obj::DSSObj
 DSSObj (APIUtil *util=nullptr, void *ptr_=nullptr)
 

Static Public Attributes

static const char dss_cls_name [] = "Reactor"
 
static const int32_t dss_cls_idx = 23
 

Additional Inherited Members

- Public Attributes inherited from dss::obj::DSSObj
APIUtilapi_util
 
void * ptr
 
- Protected Member Functions inherited from dss::obj::DSSObj
void check_for_error ()
 
void set_string (int32_t index, const string &value)
 
void set_string (int32_t index, const char *value)
 
string get_prop_string (int32_t index)
 
complex get_complex (int32_t index)
 
void set_complex (int32_t index, complex value)
 
void set_string_array (int32_t index, strings &value)
 
void set_obj (int32_t index, DSSObj &value)
 
template<typename T >
get_obj (int32_t index)
 
template<typename T = VectorXd>
get_array (int32_t index)
 
template<typename T = VectorXd>
void set_array (int32_t index, T value)
 
- Static Protected Member Functions inherited from dss::obj::DSSObj
template<typename T = VectorXd>
static void set_array (void *ptr, int32_t index, T value)
 
- Protected Attributes inherited from dss::obj::DSSObj
friend DSSBatch
 

Member Function Documentation

◆ basefreq()

double dss::obj::Reactor::basefreq ( )
inline

Base Frequency for ratings.

DSS property name: basefreq, DSS property index: 25

◆ begin_edit()

Reactor & dss::obj::Reactor::begin_edit ( )
inline

Marks an object for edition.

Until end_edit is called, some actions are postponed.

◆ bus1()

string dss::obj::Reactor::bus1 ( )
inline

Name of first bus.

Examples: bus1=busname bus1=busname.1.2.3

Bus2 property will default to this bus, node 0, unless previously specified. Only Bus1 need be specified for a Yg shunt reactor.

DSS property name: bus1, DSS property index: 1

◆ bus2()

string dss::obj::Reactor::bus2 ( )
inline

Name of 2nd bus.

Defaults to all phases connected to first bus, node 0, (Shunt Wye Connection) except when Bus2 is specifically defined.

Not necessary to specify for delta (LL) connection

DSS property name: bus2, DSS property index: 2

◆ conn()

Connection dss::obj::Reactor::conn ( )
inline

={wye | delta |LN |LL} Default is wye, which is equivalent to LN.

If Delta, then only one terminal.

DSS property name: conn, DSS property index: 6

◆ conn_str() [1/2]

string dss::obj::Reactor::conn_str ( )
inline

={wye | delta |LN |LL} Default is wye, which is equivalent to LN.

If Delta, then only one terminal.

DSS property name: conn, DSS property index: 6

◆ conn_str() [2/2]

Reactor & dss::obj::Reactor::conn_str ( const string &  value)
inline

={wye | delta |LN |LL} Default is wye, which is equivalent to LN.

If Delta, then only one terminal.

DSS property name: conn, DSS property index: 6

◆ emergamps()

double dss::obj::Reactor::emergamps ( )
inline

Maximum or emerg current.

DSS property name: emergamps, DSS property index: 21

◆ enabled()

bool dss::obj::Reactor::enabled ( )
inline

{Yes|No or True|False} Indicates whether this element is enabled.

DSS property name: enabled, DSS property index: 26

◆ end_edit()

Reactor & dss::obj::Reactor::end_edit ( int32_t  num_edits = 1)
inline

Finalizes an object edition.

This will result more compelx side-effects like Yprim and other internal data recalculation, for example.

◆ faultrate()

double dss::obj::Reactor::faultrate ( )
inline

Failure rate per year.

DSS property name: faultrate, DSS property index: 22

◆ kv()

double dss::obj::Reactor::kv ( )
inline

For 2, 3-phase, kV phase-phase.

Otherwise specify actual coil rating.

DSS property name: kv, DSS property index: 5

◆ kvar()

double dss::obj::Reactor::kvar ( )
inline

Total kvar, all phases.

Evenly divided among phases. Only determines X. Specify R separately

DSS property name: kvar, DSS property index: 4

◆ LCurve()

string dss::obj::Reactor::LCurve ( )
inline

Name of XYCurve object, previously defined, describing per-unit variation of phase inductance, L=X/w, vs.

frequency. Applies to reactance specified by X, LmH, Z, or kvar property.L generally decreases somewhat with frequency above the base frequency, approaching a limit at a few kHz.

DSS property name: LCurve, DSS property index: 18

◆ LCurve_obj()

dss::obj::XYcurve dss::obj::Reactor::LCurve_obj ( )
inline

Name of XYCurve object, previously defined, describing per-unit variation of phase inductance, L=X/w, vs.

frequency. Applies to reactance specified by X, LmH, Z, or kvar property.L generally decreases somewhat with frequency above the base frequency, approaching a limit at a few kHz.

DSS property name: LCurve, DSS property index: 18

◆ like() [1/2]

Reactor & dss::obj::Reactor::like ( const char *  value)
inline

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 27

◆ like() [2/2]

Reactor & dss::obj::Reactor::like ( const string &  value)
inline

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 27

◆ LmH()

double dss::obj::Reactor::LmH ( )
inline

Inductance, mH.

Alternate way to define the reactance, X, property.

DSS property name: LmH, DSS property index: 19

◆ normamps()

double dss::obj::Reactor::normamps ( )
inline

Normal rated current.

DSS property name: normamps, DSS property index: 20

◆ Parallel()

bool dss::obj::Reactor::Parallel ( )
inline

{Yes | No} Default=No.

Indicates whether Rmatrix and Xmatrix are to be considered in parallel. Default is series. For other models, specify R and Rp.

DSS property name: Parallel, DSS property index: 9

◆ pctperm()

double dss::obj::Reactor::pctperm ( )
inline

Percent of failures that become permanent.

DSS property name: pctperm, DSS property index: 23

◆ phases()

int32_t dss::obj::Reactor::phases ( )
inline

Number of phases.

DSS property name: phases, DSS property index: 3

◆ R()

double dss::obj::Reactor::R ( )
inline

Resistance (in series with reactance), each phase, ohms.

This property applies to REACTOR specified by either kvar or X. See also help on Z.

DSS property name: R, DSS property index: 10

◆ RCurve()

string dss::obj::Reactor::RCurve ( )
inline

Name of XYCurve object, previously defined, describing per-unit variation of phase resistance, R, vs.

frequency. Applies to resistance specified by R or Z property. If actual values are not known, R often increases by approximately the square root of frequency.

DSS property name: RCurve, DSS property index: 17

◆ RCurve_obj()

dss::obj::XYcurve dss::obj::Reactor::RCurve_obj ( )
inline

Name of XYCurve object, previously defined, describing per-unit variation of phase resistance, R, vs.

frequency. Applies to resistance specified by R or Z property. If actual values are not known, R often increases by approximately the square root of frequency.

DSS property name: RCurve, DSS property index: 17

◆ repair()

double dss::obj::Reactor::repair ( )
inline

Hours to repair.

DSS property name: repair, DSS property index: 24

◆ Rmatrix()

VectorXd dss::obj::Reactor::Rmatrix ( )
inline

Resistance matrix, lower triangle, ohms at base frequency.

Order of the matrix is the number of phases. Mutually exclusive to specifying parameters by kvar or X.

DSS property name: Rmatrix, DSS property index: 7

◆ Rp()

double dss::obj::Reactor::Rp ( )
inline

Resistance in parallel with R and X (the entire branch).

Assumed infinite if not specified.

DSS property name: Rp, DSS property index: 12

◆ X()

double dss::obj::Reactor::X ( )
inline

Reactance, each phase, ohms at base frequency.

See also help on Z and LmH properties.

DSS property name: X, DSS property index: 11

◆ Xmatrix()

VectorXd dss::obj::Reactor::Xmatrix ( )
inline

Reactance matrix, lower triangle, ohms at base frequency.

Order of the matrix is the number of phases. Mutually exclusive to specifying parameters by kvar or X.

DSS property name: Xmatrix, DSS property index: 8

◆ Z()

complex dss::obj::Reactor::Z ( )
inline

Alternative way of defining R and X properties.

Enter a 2-element array representing R +jX in ohms. Example:

Z=[5 10] ! equivalent to R=5 X=10

DSS property name: Z, DSS property index: 16

◆ Z0()

complex dss::obj::Reactor::Z0 ( )
inline

Zer0-sequence impedance, ohms, as a 2-element array representing a complex number.

Example:

Z0=[3, 4] ! represents 3 + j4

Used to define the impedance matrix of the REACTOR if Z1 is also specified.

Note: Z0 defaults to Z1 if it is not specifically defined.

DSS property name: Z0, DSS property index: 15

◆ Z1()

complex dss::obj::Reactor::Z1 ( )
inline

Positive-sequence impedance, ohms, as a 2-element array representing a complex number.

Example:

Z1=[1, 2] ! represents 1 + j2

If defined, Z1, Z2, and Z0 are used to define the impedance matrix of the REACTOR. Z1 MUST BE DEFINED TO USE THIS OPTION FOR DEFINING THE MATRIX.

Side Effect: Sets Z2 and Z0 to same values unless they were previously defined.

DSS property name: Z1, DSS property index: 13

◆ Z2()

complex dss::obj::Reactor::Z2 ( )
inline

Negative-sequence impedance, ohms, as a 2-element array representing a complex number.

Example:

Z2=[1, 2] ! represents 1 + j2

Used to define the impedance matrix of the REACTOR if Z1 is also specified.

Note: Z2 defaults to Z1 if it is not specifically defined. If Z2 is not equal to Z1, the impedance matrix is asymmetrical.

DSS property name: Z2, DSS property index: 14


The documentation for this class was generated from the following file: