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::XfmrCode Class Reference
Inheritance diagram for dss::obj::XfmrCode:
[legend]
Collaboration diagram for dss::obj::XfmrCode:
[legend]

Classes

struct  Properties
 

Public Member Functions

 XfmrCode (APIUtil *util=nullptr, void *ptr_=nullptr)
 Create wrapper directly by a given object handle/pointer.
 
 XfmrCode (APIUtil *util, int32_t idx)
 Create a wrapper for an element given by the integer index "idx".
 
 XfmrCode (APIUtil *util, char *name)
 Create a wrapper for an element given its name.
 
const char * name ()
 Returns the object's name.
 
XfmrCodebegin_edit ()
 Marks an object for edition. More...
 
XfmrCodeend_edit (int32_t num_edits=1)
 Finalizes an object edition. More...
 
int32_t phases ()
 Number of phases this transformer. More...
 
XfmrCodephases (int32_t value)
 
int32_t windings ()
 Number of windings, this transformers. More...
 
XfmrCodewindings (int32_t value)
 
int32_t wdg ()
 Set this = to the number of the winding you wish to define. More...
 
XfmrCodewdg (int32_t value)
 
std::vector< Connection > conn ()
 Connection of this winding. More...
 
XfmrCodeconn (std::vector< int32_t > &value)
 
XfmrCodeconn (strings &value)
 
strings conn_str ()
 Connection of this winding. More...
 
XfmrCodeconn_str (strings &value)
 
VectorXd kV ()
 For 2-or 3-phase, enter phase-phase kV rating. More...
 
XfmrCodekV (VectorXd &value)
 
VectorXd kVA ()
 Base kVA rating of the winding. More...
 
XfmrCodekVA (VectorXd &value)
 
VectorXd tap ()
 Per unit tap that this winding is normally on. More...
 
XfmrCodetap (VectorXd &value)
 
VectorXd pctR ()
 Percent resistance this winding. More...
 
XfmrCodepctR (VectorXd &value)
 
VectorXd Rneut ()
 Default = -1. More...
 
XfmrCodeRneut (VectorXd &value)
 
VectorXd Xneut ()
 Neutral reactance of wye(star)-connected winding in actual ohms. More...
 
XfmrCodeXneut (VectorXd &value)
 
std::vector< Connection > conns ()
 Use this to specify all the Winding connections at once using an array. More...
 
XfmrCodeconns (std::vector< int32_t > &value)
 
XfmrCodeconns (strings &value)
 
strings conns_str ()
 Use this to specify all the Winding connections at once using an array. More...
 
XfmrCodeconns_str (strings &value)
 
VectorXd kVs ()
 Use this to specify the kV ratings of all windings at once using an array. More...
 
XfmrCodekVs (VectorXd &value)
 
VectorXd kVAs ()
 Use this to specify the kVA ratings of all windings at once using an array. More...
 
XfmrCodekVAs (VectorXd &value)
 
VectorXd taps ()
 Use this to specify the normal p.u. More...
 
XfmrCodetaps (VectorXd &value)
 
double Xhl ()
 Use this to specify the percent reactance, H-L (winding 1 to winding 2). More...
 
XfmrCodeXhl (double value)
 
double Xht ()
 Use this to specify the percent reactance, H-T (winding 1 to winding 3). More...
 
XfmrCodeXht (double value)
 
double Xlt ()
 Use this to specify the percent reactance, L-T (winding 2 to winding 3). More...
 
XfmrCodeXlt (double value)
 
VectorXd Xscarray ()
 Use this to specify the percent reactance between all pairs of windings as an array. More...
 
XfmrCodeXscarray (VectorXd &value)
 
double thermal ()
 Thermal time constant of the transformer in hours. More...
 
XfmrCodethermal (double value)
 
double n ()
 n Exponent for thermal properties in IEEE C57. More...
 
XfmrCoden (double value)
 
double m ()
 m Exponent for thermal properties in IEEE C57. More...
 
XfmrCodem (double value)
 
double flrise ()
 Temperature rise, deg C, for full load. More...
 
XfmrCodeflrise (double value)
 
double hsrise ()
 Hot spot temperature rise, deg C. More...
 
XfmrCodehsrise (double value)
 
double pctloadloss ()
 Percent load loss at full load. More...
 
XfmrCodepctloadloss (double value)
 
double pctnoloadloss ()
 Percent no load losses at rated excitatation voltage. More...
 
XfmrCodepctnoloadloss (double value)
 
double normhkVA ()
 Normal maximum kVA rating of H winding (winding 1). More...
 
XfmrCodenormhkVA (double value)
 
double emerghkVA ()
 Emergency (contingency) kVA rating of H winding (winding 1). More...
 
XfmrCodeemerghkVA (double value)
 
VectorXd MaxTap ()
 Max per unit tap for the active winding. More...
 
XfmrCodeMaxTap (VectorXd &value)
 
VectorXd MinTap ()
 Min per unit tap for the active winding. More...
 
XfmrCodeMinTap (VectorXd &value)
 
VectorXi NumTaps ()
 Total number of taps between min and max tap. More...
 
XfmrCodeNumTaps (VectorXi &value)
 
double pctimag ()
 Percent magnetizing current. More...
 
XfmrCodepctimag (double value)
 
double ppm_antifloat ()
 Default=1 ppm. More...
 
XfmrCodeppm_antifloat (double value)
 
VectorXd pctRs ()
 Use this property to specify all the winding resistances using an array. More...
 
XfmrCodepctRs (VectorXd &value)
 
double X12 ()
 Alternative to XHL for specifying the percent reactance from winding 1 to winding 2. More...
 
XfmrCodeX12 (double value)
 
double X13 ()
 Alternative to XHT for specifying the percent reactance from winding 1 to winding 3. More...
 
XfmrCodeX13 (double value)
 
double X23 ()
 Alternative to XLT for specifying the percent reactance from winding 2 to winding 3.Use for 3-winding transformers only. More...
 
XfmrCodeX23 (double value)
 
VectorXd RdcOhms ()
 Winding dc resistance in OHMS. More...
 
XfmrCodeRdcOhms (VectorXd &value)
 
int32_t Seasons ()
 Defines the number of ratings to be defined for the transfomer, to be used only when defining seasonal ratings using the "Ratings" property. More...
 
XfmrCodeSeasons (int32_t value)
 
VectorXd Ratings ()
 An array of ratings to be used when the seasonal ratings flag is True. More...
 
XfmrCodeRatings (VectorXd &value)
 
XfmrCodelike (const string &value)
 Make like another object, e.g. More...
 
XfmrCodelike (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 [] = "XfmrCode"
 
static const int32_t dss_cls_idx = 14
 

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

◆ begin_edit()

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

Marks an object for edition.

Until end_edit is called, some actions are postponed.

◆ conn()

std::vector< Connection > dss::obj::XfmrCode::conn ( )
inline

Connection of this winding.

Default is "wye" with the neutral solidly grounded.

DSS property name: conn, DSS property index: 4

◆ conn_str()

strings dss::obj::XfmrCode::conn_str ( )
inline

Connection of this winding.

Default is "wye" with the neutral solidly grounded.

DSS property name: conn, DSS property index: 4

◆ conns()

std::vector< Connection > dss::obj::XfmrCode::conns ( )
inline

Use this to specify all the Winding connections at once using an array.

Example:

New Transformer.T1 buses="Hibus, lowbus" ~ conns=(delta, wye)

DSS property name: conns, DSS property index: 11

◆ conns_str()

strings dss::obj::XfmrCode::conns_str ( )
inline

Use this to specify all the Winding connections at once using an array.

Example:

New Transformer.T1 buses="Hibus, lowbus" ~ conns=(delta, wye)

DSS property name: conns, DSS property index: 11

◆ emerghkVA()

double dss::obj::XfmrCode::emerghkVA ( )
inline

Emergency (contingency) kVA rating of H winding (winding 1).

Usually 140% - 150% ofmaximum nameplate rating, depending on load shape. Defaults to 150% of kVA rating of Winding 1.

DSS property name: emerghkVA, DSS property index: 27

◆ end_edit()

XfmrCode & dss::obj::XfmrCode::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.

◆ flrise()

double dss::obj::XfmrCode::flrise ( )
inline

Temperature rise, deg C, for full load.

Default is 65.

DSS property name: flrise, DSS property index: 22

◆ hsrise()

double dss::obj::XfmrCode::hsrise ( )
inline

Hot spot temperature rise, deg C.

Default is 15.

DSS property name: hsrise, DSS property index: 23

◆ kV()

VectorXd dss::obj::XfmrCode::kV ( )
inline

For 2-or 3-phase, enter phase-phase kV rating.

Otherwise, kV rating of the actual winding

DSS property name: kV, DSS property index: 5

◆ kVA()

VectorXd dss::obj::XfmrCode::kVA ( )
inline

Base kVA rating of the winding.

Side effect: forces change of max normal and emerg kva ratings.If 2-winding transformer, forces other winding to same value. When winding 1 is defined, all other windings are defaulted to the same rating and the first two winding resistances are defaulted to the loadloss value.

DSS property name: kVA, DSS property index: 6

◆ kVAs()

VectorXd dss::obj::XfmrCode::kVAs ( )
inline

Use this to specify the kVA ratings of all windings at once using an array.

DSS property name: kVAs, DSS property index: 13

◆ kVs()

VectorXd dss::obj::XfmrCode::kVs ( )
inline

Use this to specify the kV ratings of all windings at once using an array.

Example:

New Transformer.T1 buses="Hibus, lowbus" ~ conns=(delta, wye) ~ kvs=(115, 12.47)

See kV= property for voltage rules.

DSS property name: kVs, DSS property index: 12

◆ like() [1/2]

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

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 40

◆ like() [2/2]

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

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 40

◆ m()

double dss::obj::XfmrCode::m ( )
inline

m Exponent for thermal properties in IEEE C57.

Typically 0.9 - 1.0

DSS property name: m, DSS property index: 21

◆ MaxTap()

VectorXd dss::obj::XfmrCode::MaxTap ( )
inline

Max per unit tap for the active winding.

Default is 1.10

DSS property name: MaxTap, DSS property index: 28

◆ MinTap()

VectorXd dss::obj::XfmrCode::MinTap ( )
inline

Min per unit tap for the active winding.

Default is 0.90

DSS property name: MinTap, DSS property index: 29

◆ n()

double dss::obj::XfmrCode::n ( )
inline

n Exponent for thermal properties in IEEE C57.

Typically 0.8.

DSS property name: n, DSS property index: 20

◆ normhkVA()

double dss::obj::XfmrCode::normhkVA ( )
inline

Normal maximum kVA rating of H winding (winding 1).

Usually 100% - 110% ofmaximum nameplate rating, depending on load shape. Defaults to 110% of kVA rating of Winding 1.

DSS property name: normhkVA, DSS property index: 26

◆ NumTaps()

VectorXi dss::obj::XfmrCode::NumTaps ( )
inline

Total number of taps between min and max tap.

Default is 32.

DSS property name: NumTaps, DSS property index: 30

◆ pctimag()

double dss::obj::XfmrCode::pctimag ( )
inline

Percent magnetizing current.

Default=0.0. Magnetizing branch is in parallel with windings in each phase. Also, see "ppm_antifloat".

DSS property name: imag, DSS property index: 31

◆ pctloadloss()

double dss::obj::XfmrCode::pctloadloss ( )
inline

Percent load loss at full load.

The R of the High and Low windings (1 and 2) are adjusted to agree at rated kVA loading.

DSS property name: loadloss, DSS property index: 24

◆ pctnoloadloss()

double dss::obj::XfmrCode::pctnoloadloss ( )
inline

Percent no load losses at rated excitatation voltage.

Default is 0. Converts to a resistance in parallel with the magnetizing impedance in each winding.

DSS property name: noloadloss, DSS property index: 25

◆ pctR()

VectorXd dss::obj::XfmrCode::pctR ( )
inline

Percent resistance this winding.

(half of total for a 2-winding).

DSS property name: R, DSS property index: 8

◆ pctRs()

VectorXd dss::obj::XfmrCode::pctRs ( )
inline

Use this property to specify all the winding resistances using an array.

Example:

New Transformer.T1 buses="Hibus, lowbus" ~ Rs=(0.2 0.3)

DSS property name: Rs, DSS property index: 33

◆ phases()

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

Number of phases this transformer.

Default is 3.

DSS property name: phases, DSS property index: 1

◆ ppm_antifloat()

double dss::obj::XfmrCode::ppm_antifloat ( )
inline

Default=1 ppm.

Parts per million of transformer winding VA rating connected to ground to protect against accidentally floating a winding without a reference. If positive then the effect is adding a very large reactance to ground. If negative, then a capacitor.

DSS property name: ppm_antifloat, DSS property index: 32

◆ Ratings()

VectorXd dss::obj::XfmrCode::Ratings ( )
inline

An array of ratings to be used when the seasonal ratings flag is True.

It can be used to insert multiple ratings to change during a QSTS simulation to evaluate different ratings in transformers.

DSS property name: Ratings, DSS property index: 39

◆ RdcOhms()

VectorXd dss::obj::XfmrCode::RdcOhms ( )
inline

Winding dc resistance in OHMS.

Useful for GIC analysis. From transformer test report. Defaults to 85% of R property

DSS property name: RdcOhms, DSS property index: 37

◆ Rneut()

VectorXd dss::obj::XfmrCode::Rneut ( )
inline

Default = -1.

Neutral resistance of wye (star)-connected winding in actual ohms.If entered as a negative value, the neutral is assumed to be open, or floating.

DSS property name: Rneut, DSS property index: 9

◆ Seasons()

int32_t dss::obj::XfmrCode::Seasons ( )
inline

Defines the number of ratings to be defined for the transfomer, to be used only when defining seasonal ratings using the "Ratings" property.

DSS property name: Seasons, DSS property index: 38

◆ tap()

VectorXd dss::obj::XfmrCode::tap ( )
inline

Per unit tap that this winding is normally on.

DSS property name: tap, DSS property index: 7

◆ taps()

VectorXd dss::obj::XfmrCode::taps ( )
inline

Use this to specify the normal p.u.

tap of all windings at once using an array.

DSS property name: taps, DSS property index: 14

◆ thermal()

double dss::obj::XfmrCode::thermal ( )
inline

Thermal time constant of the transformer in hours.

Typically about 2.

DSS property name: thermal, DSS property index: 19

◆ wdg()

int32_t dss::obj::XfmrCode::wdg ( )
inline

Set this = to the number of the winding you wish to define.

Then set the values for this winding. Repeat for each winding. Alternatively, use the array collections (buses, kvas, etc.) to define the windings. Note: reactances are BETWEEN pairs of windings; they are not the property of a single winding.

DSS property name: wdg, DSS property index: 3

◆ windings()

int32_t dss::obj::XfmrCode::windings ( )
inline

Number of windings, this transformers.

(Also is the number of terminals) Default is 2. This property triggers memory allocation for the Transformer and will cause other properties to revert to default values.

DSS property name: windings, DSS property index: 2

◆ X12()

double dss::obj::XfmrCode::X12 ( )
inline

Alternative to XHL for specifying the percent reactance from winding 1 to winding 2.

Use for 2- or 3-winding transformers. Percent on the kVA base of winding 1.

DSS property name: X12, DSS property index: 34

◆ X13()

double dss::obj::XfmrCode::X13 ( )
inline

Alternative to XHT for specifying the percent reactance from winding 1 to winding 3.

Use for 3-winding transformers only. Percent on the kVA base of winding 1.

DSS property name: X13, DSS property index: 35

◆ X23()

double dss::obj::XfmrCode::X23 ( )
inline

Alternative to XLT for specifying the percent reactance from winding 2 to winding 3.Use for 3-winding transformers only.

Percent on the kVA base of winding 1.

DSS property name: X23, DSS property index: 36

◆ Xhl()

double dss::obj::XfmrCode::Xhl ( )
inline

Use this to specify the percent reactance, H-L (winding 1 to winding 2).

Use for 2- or 3-winding transformers. On the kva base of winding 1.

DSS property name: Xhl, DSS property index: 15

◆ Xht()

double dss::obj::XfmrCode::Xht ( )
inline

Use this to specify the percent reactance, H-T (winding 1 to winding 3).

Use for 3-winding transformers only. On the kVA base of winding 1.

DSS property name: Xht, DSS property index: 16

◆ Xlt()

double dss::obj::XfmrCode::Xlt ( )
inline

Use this to specify the percent reactance, L-T (winding 2 to winding 3).

Use for 3-winding transformers only. On the kVA base of winding 1.

DSS property name: Xlt, DSS property index: 17

◆ Xneut()

VectorXd dss::obj::XfmrCode::Xneut ( )
inline

Neutral reactance of wye(star)-connected winding in actual ohms.

May be + or -.

DSS property name: Xneut, DSS property index: 10

◆ Xscarray()

VectorXd dss::obj::XfmrCode::Xscarray ( )
inline

Use this to specify the percent reactance between all pairs of windings as an array.

All values are on the kVA base of winding 1. The order of the values is as follows:

(x12 13 14... 23 24.. 34 ..)

There will be n(n-1)/2 values, where n=number of windings.

DSS property name: Xscarray, DSS property index: 18


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