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 | |
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. | |
XfmrCode & | begin_edit () |
Marks an object for edition. More... | |
XfmrCode & | end_edit (int32_t num_edits=1) |
Finalizes an object edition. More... | |
int32_t | phases () |
Number of phases this transformer. More... | |
XfmrCode & | phases (int32_t value) |
int32_t | windings () |
Number of windings, this transformers. More... | |
XfmrCode & | windings (int32_t value) |
int32_t | wdg () |
Set this = to the number of the winding you wish to define. More... | |
XfmrCode & | wdg (int32_t value) |
std::vector< Connection > | conn () |
Connection of this winding. More... | |
XfmrCode & | conn (std::vector< int32_t > &value) |
XfmrCode & | conn (strings &value) |
strings | conn_str () |
Connection of this winding. More... | |
XfmrCode & | conn_str (strings &value) |
VectorXd | kV () |
For 2-or 3-phase, enter phase-phase kV rating. More... | |
XfmrCode & | kV (VectorXd &value) |
VectorXd | kVA () |
Base kVA rating of the winding. More... | |
XfmrCode & | kVA (VectorXd &value) |
VectorXd | tap () |
Per unit tap that this winding is normally on. More... | |
XfmrCode & | tap (VectorXd &value) |
VectorXd | pctR () |
Percent resistance this winding. More... | |
XfmrCode & | pctR (VectorXd &value) |
VectorXd | Rneut () |
Default = -1. More... | |
XfmrCode & | Rneut (VectorXd &value) |
VectorXd | Xneut () |
Neutral reactance of wye(star)-connected winding in actual ohms. More... | |
XfmrCode & | Xneut (VectorXd &value) |
std::vector< Connection > | conns () |
Use this to specify all the Winding connections at once using an array. More... | |
XfmrCode & | conns (std::vector< int32_t > &value) |
XfmrCode & | conns (strings &value) |
strings | conns_str () |
Use this to specify all the Winding connections at once using an array. More... | |
XfmrCode & | conns_str (strings &value) |
VectorXd | kVs () |
Use this to specify the kV ratings of all windings at once using an array. More... | |
XfmrCode & | kVs (VectorXd &value) |
VectorXd | kVAs () |
Use this to specify the kVA ratings of all windings at once using an array. More... | |
XfmrCode & | kVAs (VectorXd &value) |
VectorXd | taps () |
Use this to specify the normal p.u. More... | |
XfmrCode & | taps (VectorXd &value) |
double | Xhl () |
Use this to specify the percent reactance, H-L (winding 1 to winding 2). More... | |
XfmrCode & | Xhl (double value) |
double | Xht () |
Use this to specify the percent reactance, H-T (winding 1 to winding 3). More... | |
XfmrCode & | Xht (double value) |
double | Xlt () |
Use this to specify the percent reactance, L-T (winding 2 to winding 3). More... | |
XfmrCode & | Xlt (double value) |
VectorXd | Xscarray () |
Use this to specify the percent reactance between all pairs of windings as an array. More... | |
XfmrCode & | Xscarray (VectorXd &value) |
double | thermal () |
Thermal time constant of the transformer in hours. More... | |
XfmrCode & | thermal (double value) |
double | n () |
n Exponent for thermal properties in IEEE C57. More... | |
XfmrCode & | n (double value) |
double | m () |
m Exponent for thermal properties in IEEE C57. More... | |
XfmrCode & | m (double value) |
double | flrise () |
Temperature rise, deg C, for full load. More... | |
XfmrCode & | flrise (double value) |
double | hsrise () |
Hot spot temperature rise, deg C. More... | |
XfmrCode & | hsrise (double value) |
double | pctloadloss () |
Percent load loss at full load. More... | |
XfmrCode & | pctloadloss (double value) |
double | pctnoloadloss () |
Percent no load losses at rated excitatation voltage. More... | |
XfmrCode & | pctnoloadloss (double value) |
double | normhkVA () |
Normal maximum kVA rating of H winding (winding 1). More... | |
XfmrCode & | normhkVA (double value) |
double | emerghkVA () |
Emergency (contingency) kVA rating of H winding (winding 1). More... | |
XfmrCode & | emerghkVA (double value) |
VectorXd | MaxTap () |
Max per unit tap for the active winding. More... | |
XfmrCode & | MaxTap (VectorXd &value) |
VectorXd | MinTap () |
Min per unit tap for the active winding. More... | |
XfmrCode & | MinTap (VectorXd &value) |
VectorXi | NumTaps () |
Total number of taps between min and max tap. More... | |
XfmrCode & | NumTaps (VectorXi &value) |
double | pctimag () |
Percent magnetizing current. More... | |
XfmrCode & | pctimag (double value) |
double | ppm_antifloat () |
Default=1 ppm. More... | |
XfmrCode & | ppm_antifloat (double value) |
VectorXd | pctRs () |
Use this property to specify all the winding resistances using an array. More... | |
XfmrCode & | pctRs (VectorXd &value) |
double | X12 () |
Alternative to XHL for specifying the percent reactance from winding 1 to winding 2. More... | |
XfmrCode & | X12 (double value) |
double | X13 () |
Alternative to XHT for specifying the percent reactance from winding 1 to winding 3. More... | |
XfmrCode & | 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... | |
XfmrCode & | X23 (double value) |
VectorXd | RdcOhms () |
Winding dc resistance in OHMS. More... | |
XfmrCode & | 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... | |
XfmrCode & | Seasons (int32_t value) |
VectorXd | Ratings () |
An array of ratings to be used when the seasonal ratings flag is True. More... | |
XfmrCode & | Ratings (VectorXd &value) |
XfmrCode & | like (const string &value) |
Make like another object, e.g. More... | |
XfmrCode & | 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 [] = "XfmrCode" |
static const int32_t | dss_cls_idx = 14 |
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 |
Marks an object for edition.
Until end_edit
is called, some actions are postponed.
|
inline |
Connection of this winding.
Default is "wye" with the neutral solidly grounded.
DSS property name: conn, DSS property index: 4
|
inline |
Connection of this winding.
Default is "wye" with the neutral solidly grounded.
DSS property name: conn, DSS property index: 4
|
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
|
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
|
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
|
inline |
Finalizes an object edition.
This will result more compelx side-effects like Yprim and other internal data recalculation, for example.
|
inline |
Temperature rise, deg C, for full load.
Default is 65.
DSS property name: flrise, DSS property index: 22
|
inline |
Hot spot temperature rise, deg C.
Default is 15.
DSS property name: hsrise, DSS property index: 23
|
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
|
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
|
inline |
Use this to specify the kVA ratings of all windings at once using an array.
DSS property name: kVAs, DSS property index: 13
|
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
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 40
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 40
|
inline |
m Exponent for thermal properties in IEEE C57.
Typically 0.9 - 1.0
DSS property name: m, DSS property index: 21
|
inline |
Max per unit tap for the active winding.
Default is 1.10
DSS property name: MaxTap, DSS property index: 28
|
inline |
Min per unit tap for the active winding.
Default is 0.90
DSS property name: MinTap, DSS property index: 29
|
inline |
n Exponent for thermal properties in IEEE C57.
Typically 0.8.
DSS property name: n, DSS property index: 20
|
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
|
inline |
Total number of taps between min and max tap.
Default is 32.
DSS property name: NumTaps, DSS property index: 30
|
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
|
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
|
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
|
inline |
Percent resistance this winding.
(half of total for a 2-winding).
DSS property name: R, DSS property index: 8
|
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
|
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: 32
|
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
|
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
|
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
|
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
|
inline |
Per unit tap that this winding is normally on.
DSS property name: tap, DSS property index: 7
|
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
|
inline |
Thermal time constant of the transformer in hours.
Typically about 2.
DSS property name: thermal, DSS property index: 19
|
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 |
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: 34
|
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
|
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
|
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
|
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
|
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
|
inline |
Neutral reactance of wye(star)-connected winding in actual ohms.
May be + or -.
DSS property name: Xneut, DSS property index: 10
|
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