DSS C-API and dss.hpp
DSS C-API and dss.hpp expose a customized and extended implementation of OpenDSS to C and C++.
|
Public Types | |
typedef XfmrCode::Properties | Properties |
typedef XfmrCode | BatchElementClass |
Public Member Functions | |
XfmrCodeBatch (APIUtil *util) | |
Create a batch of all XfmrCode elements. | |
XfmrCodeBatch (APIUtil *util, int32_t prop_idx, int32_t prop_value) | |
Create a batch of all XfmrCode elements that match an integer property value. | |
XfmrCodeBatch (APIUtil *util, const char *regexp) | |
Create a batch of all XfmrCode elements that match a regular expression. | |
XfmrCodeBatch & | begin_edit () |
XfmrCodeBatch & | end_edit (int32_t num_edits=1) |
BatchInt32ArrayProxy | phases () |
Number of phases this transformer. More... | |
XfmrCodeBatch & | phases (int32_t value) |
template<typename T > | |
XfmrCodeBatch & | phases (T &value) |
template<typename T > | |
XfmrCodeBatch & | phases (typename T::iterator it_begin, typename T::iterator it_end) |
BatchInt32ArrayProxy | windings () |
Number of windings, this transformers. More... | |
XfmrCodeBatch & | windings (int32_t value) |
template<typename T > | |
XfmrCodeBatch & | windings (T &value) |
template<typename T > | |
XfmrCodeBatch & | windings (typename T::iterator it_begin, typename T::iterator it_end) |
BatchInt32ArrayProxy | wdg () |
Set this = to the number of the winding you wish to define. More... | |
XfmrCodeBatch & | wdg (int32_t value) |
template<typename T > | |
XfmrCodeBatch & | wdg (T &value) |
template<typename T > | |
XfmrCodeBatch & | wdg (typename T::iterator it_begin, typename T::iterator it_end) |
std::vector< VectorXi > | conn () |
Connection of this winding. More... | |
XfmrCodeBatch & | conn (std::vector< int32_t > &value) |
XfmrCodeBatch & | conn (std::vector< Connection > &value) |
XfmrCodeBatch & | conn (strings &value) |
XfmrCodeBatch & | conn (std::vector< strings > &value) |
std::vector< strings > | conn_str () |
Connection of this winding. More... | |
XfmrCodeBatch & | conn_str (strings &value) |
std::vector< VectorXd > | kV () |
For 2-or 3-phase, enter phase-phase kV rating. More... | |
XfmrCodeBatch & | kV (VectorXd &value) |
std::vector< VectorXd > | kVA () |
Base kVA rating of the winding. More... | |
XfmrCodeBatch & | kVA (VectorXd &value) |
std::vector< VectorXd > | tap () |
Per unit tap that this winding is normally on. More... | |
XfmrCodeBatch & | tap (VectorXd &value) |
std::vector< VectorXd > | pctR () |
Percent resistance this winding. More... | |
XfmrCodeBatch & | pctR (VectorXd &value) |
std::vector< VectorXd > | Rneut () |
Default = -1. More... | |
XfmrCodeBatch & | Rneut (VectorXd &value) |
std::vector< VectorXd > | Xneut () |
Neutral reactance of wye(star)-connected winding in actual ohms. More... | |
XfmrCodeBatch & | Xneut (VectorXd &value) |
std::vector< VectorXi > | conns () |
Use this to specify all the Winding connections at once using an array. More... | |
XfmrCodeBatch & | conns (std::vector< int32_t > &value) |
XfmrCodeBatch & | conns (std::vector< Connection > &value) |
XfmrCodeBatch & | conns (strings &value) |
XfmrCodeBatch & | conns (std::vector< strings > &value) |
std::vector< strings > | conns_str () |
Use this to specify all the Winding connections at once using an array. More... | |
XfmrCodeBatch & | conns_str (strings &value) |
std::vector< VectorXd > | kVs () |
Use this to specify the kV ratings of all windings at once using an array. More... | |
XfmrCodeBatch & | kVs (VectorXd &value) |
std::vector< VectorXd > | kVAs () |
Use this to specify the kVA ratings of all windings at once using an array. More... | |
XfmrCodeBatch & | kVAs (VectorXd &value) |
std::vector< VectorXd > | taps () |
Use this to specify the normal p.u. More... | |
XfmrCodeBatch & | taps (VectorXd &value) |
BatchFloat64ArrayProxy | Xhl () |
Use this to specify the percent reactance, H-L (winding 1 to winding 2). More... | |
XfmrCodeBatch & | Xhl (double value) |
template<typename T > | |
XfmrCodeBatch & | Xhl (T &value) |
template<typename T > | |
XfmrCodeBatch & | Xhl (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | Xht () |
Use this to specify the percent reactance, H-T (winding 1 to winding 3). More... | |
XfmrCodeBatch & | Xht (double value) |
template<typename T > | |
XfmrCodeBatch & | Xht (T &value) |
template<typename T > | |
XfmrCodeBatch & | Xht (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | Xlt () |
Use this to specify the percent reactance, L-T (winding 2 to winding 3). More... | |
XfmrCodeBatch & | Xlt (double value) |
template<typename T > | |
XfmrCodeBatch & | Xlt (T &value) |
template<typename T > | |
XfmrCodeBatch & | Xlt (typename T::iterator it_begin, typename T::iterator it_end) |
std::vector< VectorXd > | Xscarray () |
Use this to specify the percent reactance between all pairs of windings as an array. More... | |
XfmrCodeBatch & | Xscarray (VectorXd &value) |
BatchFloat64ArrayProxy | thermal () |
Thermal time constant of the transformer in hours. More... | |
XfmrCodeBatch & | thermal (double value) |
template<typename T > | |
XfmrCodeBatch & | thermal (T &value) |
template<typename T > | |
XfmrCodeBatch & | thermal (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | n () |
n Exponent for thermal properties in IEEE C57. More... | |
XfmrCodeBatch & | n (double value) |
template<typename T > | |
XfmrCodeBatch & | n (T &value) |
template<typename T > | |
XfmrCodeBatch & | n (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | m () |
m Exponent for thermal properties in IEEE C57. More... | |
XfmrCodeBatch & | m (double value) |
template<typename T > | |
XfmrCodeBatch & | m (T &value) |
template<typename T > | |
XfmrCodeBatch & | m (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | flrise () |
Temperature rise, deg C, for full load. More... | |
XfmrCodeBatch & | flrise (double value) |
template<typename T > | |
XfmrCodeBatch & | flrise (T &value) |
template<typename T > | |
XfmrCodeBatch & | flrise (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | hsrise () |
Hot spot temperature rise, deg C. More... | |
XfmrCodeBatch & | hsrise (double value) |
template<typename T > | |
XfmrCodeBatch & | hsrise (T &value) |
template<typename T > | |
XfmrCodeBatch & | hsrise (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | pctloadloss () |
Percent load loss at full load. More... | |
XfmrCodeBatch & | pctloadloss (double value) |
template<typename T > | |
XfmrCodeBatch & | pctloadloss (T &value) |
template<typename T > | |
XfmrCodeBatch & | pctloadloss (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | pctnoloadloss () |
Percent no load losses at rated excitatation voltage. More... | |
XfmrCodeBatch & | pctnoloadloss (double value) |
template<typename T > | |
XfmrCodeBatch & | pctnoloadloss (T &value) |
template<typename T > | |
XfmrCodeBatch & | pctnoloadloss (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | normhkVA () |
Normal maximum kVA rating of H winding (winding 1). More... | |
XfmrCodeBatch & | normhkVA (double value) |
template<typename T > | |
XfmrCodeBatch & | normhkVA (T &value) |
template<typename T > | |
XfmrCodeBatch & | normhkVA (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | emerghkVA () |
Emergency (contingency) kVA rating of H winding (winding 1). More... | |
XfmrCodeBatch & | emerghkVA (double value) |
template<typename T > | |
XfmrCodeBatch & | emerghkVA (T &value) |
template<typename T > | |
XfmrCodeBatch & | emerghkVA (typename T::iterator it_begin, typename T::iterator it_end) |
std::vector< VectorXd > | MaxTap () |
Max per unit tap for the active winding. More... | |
XfmrCodeBatch & | MaxTap (VectorXd &value) |
std::vector< VectorXd > | MinTap () |
Min per unit tap for the active winding. More... | |
XfmrCodeBatch & | MinTap (VectorXd &value) |
std::vector< VectorXi > | NumTaps () |
Total number of taps between min and max tap. More... | |
XfmrCodeBatch & | NumTaps (VectorXi &value) |
XfmrCodeBatch & | NumTaps (std::vector< VectorXi > &value) |
BatchFloat64ArrayProxy | pctimag () |
Percent magnetizing current. More... | |
XfmrCodeBatch & | pctimag (double value) |
template<typename T > | |
XfmrCodeBatch & | pctimag (T &value) |
template<typename T > | |
XfmrCodeBatch & | pctimag (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | ppm_antifloat () |
Default=1 ppm. More... | |
XfmrCodeBatch & | ppm_antifloat (double value) |
template<typename T > | |
XfmrCodeBatch & | ppm_antifloat (T &value) |
template<typename T > | |
XfmrCodeBatch & | ppm_antifloat (typename T::iterator it_begin, typename T::iterator it_end) |
std::vector< VectorXd > | pctRs () |
Use this property to specify all the winding resistances using an array. More... | |
XfmrCodeBatch & | pctRs (VectorXd &value) |
BatchFloat64ArrayProxy | X12 () |
Alternative to XHL for specifying the percent reactance from winding 1 to winding 2. More... | |
XfmrCodeBatch & | X12 (double value) |
template<typename T > | |
XfmrCodeBatch & | X12 (T &value) |
template<typename T > | |
XfmrCodeBatch & | X12 (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | X13 () |
Alternative to XHT for specifying the percent reactance from winding 1 to winding 3. More... | |
XfmrCodeBatch & | X13 (double value) |
template<typename T > | |
XfmrCodeBatch & | X13 (T &value) |
template<typename T > | |
XfmrCodeBatch & | X13 (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | X23 () |
Alternative to XLT for specifying the percent reactance from winding 2 to winding 3.Use for 3-winding transformers only. More... | |
XfmrCodeBatch & | X23 (double value) |
template<typename T > | |
XfmrCodeBatch & | X23 (T &value) |
template<typename T > | |
XfmrCodeBatch & | X23 (typename T::iterator it_begin, typename T::iterator it_end) |
std::vector< VectorXd > | RdcOhms () |
Winding dc resistance in OHMS. More... | |
XfmrCodeBatch & | RdcOhms (VectorXd &value) |
BatchInt32ArrayProxy | 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... | |
XfmrCodeBatch & | Seasons (int32_t value) |
template<typename T > | |
XfmrCodeBatch & | Seasons (T &value) |
template<typename T > | |
XfmrCodeBatch & | Seasons (typename T::iterator it_begin, typename T::iterator it_end) |
std::vector< VectorXd > | Ratings () |
An array of ratings to be used when the seasonal ratings flag is True. More... | |
XfmrCodeBatch & | Ratings (VectorXd &value) |
XfmrCodeBatch & | like (const string &value) |
Make like another object, e.g. More... | |
XfmrCodeBatch & | like (const char *value) |
Make like another object, e.g. More... | |
Public Member Functions inherited from dss::obj::DSSBatch | |
DSSBatch (APIUtil *util, int32_t cls_idx) | |
Create a batch of all elements in the DSS class. | |
DSSBatch (APIUtil *util, int32_t cls_idx, int32_t prop_idx, int32_t prop_value) | |
Create a batch of all elements that match an integer property value. | |
DSSBatch (APIUtil *util, int32_t cls_idx, const char *regexp) | |
Create a batch of all elements that match a regular expression. | |
DSSBatch (APIUtil *util) | |
Create an uninitialized batch instance. | |
strings | name () |
Additional Inherited Members | |
Public Attributes inherited from dss::obj::DSSBatch | |
APIUtil * | api_util |
void ** | pointer |
int32_t | count [2] |
Protected Member Functions inherited from dss::obj::DSSBatch | |
void | check_for_error () |
bools | get_batch_bool (int32_t index) |
std::vector< complex > | get_batch_complex (int32_t index) |
template<typename T = VectorXd> | |
std::vector< T > | get_batch_valarray (int32_t index) |
void | set_batch_complex_for_each (int32_t index, std::vector< complex > &values) |
template<typename T > | |
void | set_batch_val (int32_t index, const T &value) |
template<typename T = VectorXd> | |
T | get_batch_val (int32_t index) |
template<typename T > | |
void | set_batch_val_for_each (int32_t index, typename T::iterator v, typename T::iterator v_end) |
Static Protected Member Functions inherited from dss::obj::DSSBatch | |
template<typename T = VectorXd> | |
static T | get_batch_val (int32_t index, DSSBatch &batch) |
|
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 |
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