DSS C-API and dss.hpp
DSS C-API and dss.hpp expose a customized and extended implementation of OpenDSS to C and C++.
|
Classes | |
struct | Properties |
Public Member Functions | |
Transformer (APIUtil *util=nullptr, void *ptr_=nullptr) | |
Create wrapper directly by a given object handle/pointer. | |
Transformer (APIUtil *util, int32_t idx) | |
Create a wrapper for an element given by the integer index "idx". | |
Transformer (APIUtil *util, char *name) | |
Create a wrapper for an element given its name. | |
const char * | name () |
Returns the object's name. | |
Transformer & | begin_edit () |
Marks an object for edition. More... | |
Transformer & | end_edit (int32_t num_edits=1) |
Finalizes an object edition. More... | |
int32_t | phases () |
Number of phases this transformer. More... | |
Transformer & | phases (int32_t value) |
int32_t | windings () |
Number of windings, this transformers. More... | |
Transformer & | windings (int32_t value) |
int32_t | wdg () |
Set this = to the number of the winding you wish to define. More... | |
Transformer & | wdg (int32_t value) |
strings | bus () |
Bus connection spec for this winding. More... | |
Transformer & | bus (strings &value) |
std::vector< Connection > | conn () |
Connection of this winding {wye*, Delta, LN, LL}. More... | |
Transformer & | conn (std::vector< int32_t > &value) |
Transformer & | conn (strings &value) |
strings | conn_str () |
Connection of this winding {wye*, Delta, LN, LL}. More... | |
Transformer & | conn_str (strings &value) |
VectorXd | kV () |
For 2-or 3-phase, enter phase-phase kV rating. More... | |
Transformer & | kV (VectorXd &value) |
VectorXd | kVA () |
Base kVA rating of the winding. More... | |
Transformer & | kVA (VectorXd &value) |
VectorXd | tap () |
Per unit tap that this winding is on. More... | |
Transformer & | tap (VectorXd &value) |
VectorXd | pctR () |
Percent resistance this winding. More... | |
Transformer & | pctR (VectorXd &value) |
VectorXd | Rneut () |
Default = -1. More... | |
Transformer & | Rneut (VectorXd &value) |
VectorXd | Xneut () |
Neutral reactance of wye(star)-connected winding in actual ohms. More... | |
Transformer & | Xneut (VectorXd &value) |
strings | buses () |
Use this to specify all the bus connections at once using an array. More... | |
Transformer & | buses (strings &value) |
std::vector< Connection > | conns () |
Use this to specify all the Winding connections at once using an array. More... | |
Transformer & | conns (std::vector< int32_t > &value) |
Transformer & | conns (strings &value) |
strings | conns_str () |
Use this to specify all the Winding connections at once using an array. More... | |
Transformer & | conns_str (strings &value) |
VectorXd | kVs () |
Use this to specify the kV ratings of all windings at once using an array. More... | |
Transformer & | kVs (VectorXd &value) |
VectorXd | kVAs () |
Use this to specify the kVA ratings of all windings at once using an array. More... | |
Transformer & | kVAs (VectorXd &value) |
VectorXd | taps () |
Use this to specify the p.u. More... | |
Transformer & | taps (VectorXd &value) |
double | XHL () |
Use this to specify the percent reactance, H-L (winding 1 to winding 2). More... | |
Transformer & | XHL (double value) |
double | XHT () |
Use this to specify the percent reactance, H-T (winding 1 to winding 3). More... | |
Transformer & | XHT (double value) |
double | XLT () |
Use this to specify the percent reactance, L-T (winding 2 to winding 3). More... | |
Transformer & | XLT (double value) |
VectorXd | Xscarray () |
Use this to specify the percent reactance between all pairs of windings as an array. More... | |
Transformer & | Xscarray (VectorXd &value) |
double | thermal () |
Thermal time constant of the transformer in hours. More... | |
Transformer & | thermal (double value) |
double | n () |
n Exponent for thermal properties in IEEE C57. More... | |
Transformer & | n (double value) |
double | m () |
m Exponent for thermal properties in IEEE C57. More... | |
Transformer & | m (double value) |
double | flrise () |
Temperature rise, deg C, for full load. More... | |
Transformer & | flrise (double value) |
double | hsrise () |
Hot spot temperature rise, deg C. More... | |
Transformer & | hsrise (double value) |
double | pctloadloss () |
Percent load loss at full load. More... | |
Transformer & | pctloadloss (double value) |
double | pctnoloadloss () |
Percent no load losses at rated excitatation voltage. More... | |
Transformer & | pctnoloadloss (double value) |
double | normhkVA () |
Normal maximum kVA rating of H winding (winding 1). More... | |
Transformer & | normhkVA (double value) |
double | emerghkVA () |
Emergency (contingency) kVA rating of H winding (winding 1). More... | |
Transformer & | emerghkVA (double value) |
bool | sub () |
={Yes|No} Designates whether this transformer is to be considered a substation.Default is No. More... | |
Transformer & | sub (bool value) |
VectorXd | MaxTap () |
Max per unit tap for the active winding. More... | |
Transformer & | MaxTap (VectorXd &value) |
VectorXd | MinTap () |
Min per unit tap for the active winding. More... | |
Transformer & | MinTap (VectorXd &value) |
VectorXi | NumTaps () |
Total number of taps between min and max tap. More... | |
Transformer & | NumTaps (VectorXi &value) |
string | subname () |
Substation Name. More... | |
Transformer & | subname (const string &value) |
Transformer & | subname (const char *value) |
double | pctimag () |
Percent magnetizing current. More... | |
Transformer & | pctimag (double value) |
double | ppm_antifloat () |
Default=1 ppm. More... | |
Transformer & | ppm_antifloat (double value) |
VectorXd | pctRs () |
Use this property to specify all the winding resistances using an array. More... | |
Transformer & | pctRs (VectorXd &value) |
string | bank () |
Name of the bank this transformer is part of, for CIM, MultiSpeak, and other interfaces. More... | |
Transformer & | bank (const string &value) |
Transformer & | bank (const char *value) |
string | XfmrCode () |
Name of a library entry for transformer properties. More... | |
Transformer & | XfmrCode (const string &value) |
Transformer & | XfmrCode (dss::obj::XfmrCode &value) |
dss::obj::XfmrCode | XfmrCode_obj () |
Name of a library entry for transformer properties. More... | |
Transformer & | XfmrCode_obj (dss::obj::XfmrCode &value) |
bool | XRConst () |
={Yes|No} Default is NO. More... | |
Transformer & | XRConst (bool value) |
double | X12 () |
Alternative to XHL for specifying the percent reactance from winding 1 to winding 2. More... | |
Transformer & | X12 (double value) |
double | X13 () |
Alternative to XHT for specifying the percent reactance from winding 1 to winding 3. More... | |
Transformer & | X13 (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... | |
Transformer & | X23 (double value) |
PhaseSequence | LeadLag () |
{Lead | Lag (default) | ANSI (default) | Euro } Designation in mixed Delta-wye connections the relationship between HV to LV winding. More... | |
Transformer & | LeadLag (int32_t value) |
Transformer & | LeadLag (PhaseSequence value) |
Transformer & | LeadLag (const string &value) |
Transformer & | LeadLag (const char *value) |
string | LeadLag_str () |
{Lead | Lag (default) | ANSI (default) | Euro } Designation in mixed Delta-wye connections the relationship between HV to LV winding. More... | |
Transformer & | LeadLag_str (const string &value) |
{Lead | Lag (default) | ANSI (default) | Euro } Designation in mixed Delta-wye connections the relationship between HV to LV winding. More... | |
string | WdgCurrents () |
(Read only) Makes winding currents available via return on query (? Transformer.TX.WdgCurrents). More... | |
CoreType | Core () |
{Shell*|5-leg|3-Leg|1-phase|core-1-phase|4-leg} Core Type. More... | |
Transformer & | Core (int32_t value) |
Transformer & | Core (CoreType value) |
Transformer & | Core (const string &value) |
Transformer & | Core (const char *value) |
string | Core_str () |
{Shell*|5-leg|3-Leg|1-phase|core-1-phase|4-leg} Core Type. More... | |
Transformer & | Core_str (const string &value) |
{Shell*|5-leg|3-Leg|1-phase|core-1-phase|4-leg} Core Type. More... | |
VectorXd | RdcOhms () |
Winding dc resistance in OHMS. More... | |
Transformer & | RdcOhms (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... | |
Transformer & | Seasons (int32_t value) |
VectorXd | Ratings () |
An array of ratings to be used when the seasonal ratings flag is True. More... | |
Transformer & | Ratings (VectorXd &value) |
double | normamps () |
Normal rated current. More... | |
Transformer & | normamps (double value) |
double | emergamps () |
Maximum or emerg current. More... | |
Transformer & | emergamps (double value) |
double | faultrate () |
Failure rate per year. More... | |
Transformer & | faultrate (double value) |
double | pctperm () |
Percent of failures that become permanent. More... | |
Transformer & | pctperm (double value) |
double | repair () |
Hours to repair. More... | |
Transformer & | repair (double value) |
double | basefreq () |
Base Frequency for ratings. More... | |
Transformer & | basefreq (double value) |
bool | enabled () |
{Yes|No or True|False} Indicates whether this element is enabled. More... | |
Transformer & | enabled (bool value) |
Transformer & | like (const string &value) |
Make like another object, e.g. More... | |
Transformer & | like (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 [] = "Transformer" |
static const int32_t | dss_cls_idx = 20 |
Additional Inherited Members | |
Public Attributes inherited from dss::obj::DSSObj | |
APIUtil * | api_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 > | |
T | get_obj (int32_t index) |
template<typename T = VectorXd> | |
T | 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 |
|
inline |
Name of the bank this transformer is part of, for CIM, MultiSpeak, and other interfaces.
DSS property name: bank, DSS property index: 38
|
inline |
Base Frequency for ratings.
DSS property name: basefreq, DSS property index: 55
|
inline |
Marks an object for edition.
Until end_edit
is called, some actions are postponed.
|
inline |
Bus connection spec for this winding.
DSS property name: bus, DSS property index: 4
|
inline |
Use this to specify all the bus connections at once using an array.
Example:
New Transformer.T1 buses="Hibus, lowbus"
DSS property name: buses, DSS property index: 12
|
inline |
Connection of this winding {wye*, Delta, LN, LL}.
Default is "wye" with the neutral solidly grounded.
DSS property name: conn, DSS property index: 5
|
inline |
Connection of this winding {wye*, Delta, LN, LL}.
Default is "wye" with the neutral solidly grounded.
DSS property name: conn, DSS property index: 5
|
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: 13
|
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: 13
|
inline |
{Shell*|5-leg|3-Leg|1-phase|core-1-phase|4-leg} Core Type.
Used for GIC analysis
DSS property name: Core, DSS property index: 46
|
inline |
{Shell*|5-leg|3-Leg|1-phase|core-1-phase|4-leg} Core Type.
Used for GIC analysis
DSS property name: Core, DSS property index: 46
|
inline |
{Shell*|5-leg|3-Leg|1-phase|core-1-phase|4-leg} Core Type.
Used for GIC analysis
DSS property name: Core, DSS property index: 46
|
inline |
Maximum or emerg current.
DSS property name: emergamps, DSS property index: 51
|
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: 29
|
inline |
{Yes|No or True|False} Indicates whether this element is enabled.
DSS property name: enabled, DSS property index: 56
|
inline |
Finalizes an object edition.
This will result more compelx side-effects like Yprim and other internal data recalculation, for example.
|
inline |
Failure rate per year.
DSS property name: faultrate, DSS property index: 52
|
inline |
Temperature rise, deg C, for full load.
Default is 65.
DSS property name: flrise, DSS property index: 24
|
inline |
Hot spot temperature rise, deg C.
Default is 15.
DSS property name: hsrise, DSS property index: 25
|
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: 6
|
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: 7
|
inline |
Use this to specify the kVA ratings of all windings at once using an array.
DSS property name: kVAs, DSS property index: 15
|
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: 14
|
inline |
{Lead | Lag (default) | ANSI (default) | Euro } Designation in mixed Delta-wye connections the relationship between HV to LV winding.
Default is ANSI 30 deg lag, e.g., Dy1 of Yd1 vector group. To get typical European Dy11 connection, specify either "lead" or "Euro"
DSS property name: LeadLag, DSS property index: 44
|
inline |
{Lead | Lag (default) | ANSI (default) | Euro } Designation in mixed Delta-wye connections the relationship between HV to LV winding.
Default is ANSI 30 deg lag, e.g., Dy1 of Yd1 vector group. To get typical European Dy11 connection, specify either "lead" or "Euro"
DSS property name: LeadLag, DSS property index: 44
|
inline |
{Lead | Lag (default) | ANSI (default) | Euro } Designation in mixed Delta-wye connections the relationship between HV to LV winding.
Default is ANSI 30 deg lag, e.g., Dy1 of Yd1 vector group. To get typical European Dy11 connection, specify either "lead" or "Euro"
DSS property name: LeadLag, DSS property index: 44
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 57
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 57
|
inline |
m Exponent for thermal properties in IEEE C57.
Typically 0.9 - 1.0
DSS property name: m, DSS property index: 23
|
inline |
Max per unit tap for the active winding.
Default is 1.10
DSS property name: MaxTap, DSS property index: 31
|
inline |
Min per unit tap for the active winding.
Default is 0.90
DSS property name: MinTap, DSS property index: 32
|
inline |
n Exponent for thermal properties in IEEE C57.
Typically 0.8.
DSS property name: n, DSS property index: 22
|
inline |
Normal rated current.
DSS property name: normamps, DSS property index: 50
|
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: 28
|
inline |
Total number of taps between min and max tap.
Default is 32 (16 raise and 16 lower taps about the neutral position). The neutral position is not counted.
DSS property name: NumTaps, DSS property index: 33
|
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: 35
|
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: 26
|
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: 27
|
inline |
Percent of failures that become permanent.
DSS property name: pctperm, DSS property index: 53
|
inline |
Percent resistance this winding.
(half of total for a 2-winding).
DSS property name: R, DSS property index: 9
|
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: 37
|
inline |
Number of phases this transformer.
Default is 3.
DSS property name: phases, DSS property index: 1
|
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: 36
|
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. Is given in kVA
DSS property name: Ratings, DSS property index: 49
|
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: 47
|
inline |
Hours to repair.
DSS property name: repair, DSS property index: 54
|
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. To solidly ground the neutral, connect the neutral conductor to Node 0 in the Bus property spec for this winding. For example: Bus=MyBusName.1.2.3.0, which is generally the default connection.
DSS property name: Rneut, DSS property index: 10
|
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: 48
|
inline |
={Yes|No} Designates whether this transformer is to be considered a substation.Default is No.
DSS property name: sub, DSS property index: 30
|
inline |
Substation Name.
Optional. Default is null. If specified, printed on plots
DSS property name: subname, DSS property index: 34
|
inline |
Per unit tap that this winding is on.
DSS property name: tap, DSS property index: 8
|
inline |
Use this to specify the p.u.
tap of all windings at once using an array.
DSS property name: taps, DSS property index: 16
|
inline |
Thermal time constant of the transformer in hours.
Typically about 2.
DSS property name: thermal, DSS property index: 21
|
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
|
inline |
(Read only) Makes winding currents available via return on query (? Transformer.TX.WdgCurrents).
Order: Phase 1, Wdg 1, Wdg 2, ..., Phase 2 ...
DSS property name: WdgCurrents, DSS property index: 45
|
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
|
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: 41
|
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: 42
|
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: 43
|
inline |
|
inline |
|
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. See also X12.
DSS property name: XHL, DSS property index: 17
|
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. See also X13.
DSS property name: XHT, DSS property index: 18
|
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. See also X23.
DSS property name: XLT, DSS property index: 19
|
inline |
Neutral reactance of wye(star)-connected winding in actual ohms.
May be + or -.
DSS property name: Xneut, DSS property index: 11
|
inline |
={Yes|No} Default is NO.
Signifies whether or not the X/R is assumed contant for harmonic studies.
DSS property name: XRConst, DSS property index: 40
|
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: 20