wElectrical elements (bus-based)¶
These are electrical components that can be added to compose the grid topology.
Transformer¶
-
class
krangpower._components.
Transformer
(**parameters)¶ Transformer object
Property name type Default value windings int 2 phases int 3 conns stringarray wye,wye kvs floatarray 12.47,12.47 kvas floatarray 1000.0,1000.0 taps floatarray 1.000,1.000 %rs floatarray 0.20,0.20 xhl float 7.000 xht float 35.000 xlt float 30.000 x12 float 7.000 x13 float 35.000 x23 float 30.000 xscmatrix floatmatrix 7.00 normmaxhkva float 1100.0 emergmaxhkva float 1500.0 thermal float 2.0 n float 0.8 m float 0.8 flrise float 65.0 hsrise float 15.0 %loadloss float 0.0 %noloadloss float 0.0 normhkva float 1100.0 emerghkva float 1500.0 sub string n maxtap float 1.1 mintap float 0.9 numtaps int 32 subname string %imag float 0.0 ppm_antifloat float 1.0 bank string xfmrcode string xrconst string no x12 float 7.0 x13 float 35.0 x23 float 30.0 leadlag string lag normamps float 50.929 emergamps float 69.449 faultrate float 0.007 %perm float 100.0 repair float 36.0 basefreq float 50.0 -
__getitem__
(item)¶ Gets a parameter for the object.
-
aka
(name)¶ Aliases the object.
-
eltype
¶
-
fcs
(**hookup)¶ Generates the opendss “new…” command for the object. Needs to be passed an appropriate set of keyword arguments to fill whatever topologic parameters are needed. It’s meant primarily for internal use by krangpower itself.
-
fullname
¶ Name, in the form eltype.elname
-
classmethod
isabove
()¶ Returns True if the class is an above-graph component, like a monitor or regulator, False otherwise.
-
classmethod
isai
()¶ Returns true if the class is ai-enabled, False otherwise.
-
classmethod
isnamed
()¶ Returns True if the class is a named entity, like a LineCode, False otherwise.
-
jsonize
(all_params=False, flatten_mtx=True)¶ Returns a dict that describes the element’s parameters. It’s compatible with the json I/O functions.
-
paramhelp
()¶ Prints a cheatsheet for the object’s parameters.
-
sf_deepcopy
()¶ Returns a deep copy of the object. This method is to be used in place of the standard copy.deepcopy, that will raise an exception.
-
toe
¶
-
Line¶
-
class
krangpower._components.
Line
(**parameters)¶ Line object. Data for the conductors must specified by a LineCode or a LineGeometry.
Property name type Default value length float 1.000 switch string false rg float 0.01805 xg float 0.155081 rho float 100.0 units string none earthmodel string deri normamps float 400.0 emergamps float 600.0 -
aka
(name)¶ Aliases the object.
-
eltype
¶
-
fcs
(**hookup)¶ Generates the opendss “new…” command for the object. Needs to be passed an appropriate set of keyword arguments to fill whatever topologic parameters are needed. It’s meant primarily for internal use by krangpower itself.
-
fullname
¶ Name, in the form eltype.elname
-
classmethod
isabove
()¶ Returns True if the class is an above-graph component, like a monitor or regulator, False otherwise.
-
classmethod
isai
()¶ Returns true if the class is ai-enabled, False otherwise.
-
classmethod
isnamed
()¶ Returns True if the class is a named entity, like a LineCode, False otherwise.
-
jsonize
(all_params=False, flatten_mtx=True)¶ Returns a dict that describes the element’s parameters. It’s compatible with the json I/O functions.
-
paramhelp
()¶ Prints a cheatsheet for the object’s parameters.
-
sf_deepcopy
()¶ Returns a deep copy of the object. This method is to be used in place of the standard copy.deepcopy, that will raise an exception.
-
toe
¶
-
Vsource¶
-
class
krangpower._components.
Vsource
(**parameters)¶ Voltage source
Property name type Default value basekv float 115.0 pu float 1.0 angle float 0.0 frequency float 60.0 phases int 3 mvasc3 float 2000.0 mvasc1 float 2100.0 x1r1 float 4.0 x0r0 float 3.0 isc3 float 10000.0 isc1 float 10500.0 r1 float 1.6038 x1 float 6.4151 r0 float 1.796 x0 float 5.3881 scantype string pos sequence string pos z1 floatarray 1.6037668,6.4150673 z0 floatarray 1.7960358,5.3881075 z2 floatarray 1.6037668,6.4150673 puz1 floatarray 0.012126781,0.048507125 puz0 floatarray 0.013580611,0.040741834 puz2 floatarray 0.012126781,0.048507125 basemva float 100.0 yearly string daily string duty string spectrum string defaultvsource basefreq float 50.0 -
aka
(name)¶ Aliases the object.
-
eltype
¶
-
fcs
(**hookup)¶ Generates the opendss “new…” command for the object. Needs to be passed an appropriate set of keyword arguments to fill whatever topologic parameters are needed. It’s meant primarily for internal use by krangpower itself.
-
fullname
¶ Name, in the form eltype.elname
-
classmethod
isabove
()¶ Returns True if the class is an above-graph component, like a monitor or regulator, False otherwise.
-
classmethod
isai
()¶ Returns true if the class is ai-enabled, False otherwise.
-
classmethod
isnamed
()¶ Returns True if the class is a named entity, like a LineCode, False otherwise.
-
jsonize
(all_params=False, flatten_mtx=True)¶ Returns a dict that describes the element’s parameters. It’s compatible with the json I/O functions.
-
paramhelp
()¶ Prints a cheatsheet for the object’s parameters.
-
sf_deepcopy
()¶ Returns a deep copy of the object. This method is to be used in place of the standard copy.deepcopy, that will raise an exception.
-
toe
¶
-
Isource¶
-
class
krangpower._components.
Isource
(**parameters)¶ Current source
Property name type Default value amps floatarray 0.0 angle float 0.0 frequency float 60.0 phases int 3 scantype string pos sequence string pos yearly string daily string duty string spectrum string default basefreq float 50.0 enabled string true -
aka
(name)¶ Aliases the object.
-
eltype
¶
-
fcs
(**hookup)¶ Generates the opendss “new…” command for the object. Needs to be passed an appropriate set of keyword arguments to fill whatever topologic parameters are needed. It’s meant primarily for internal use by krangpower itself.
-
fullname
¶ Name, in the form eltype.elname
-
classmethod
isabove
()¶ Returns True if the class is an above-graph component, like a monitor or regulator, False otherwise.
-
classmethod
isai
()¶ Returns true if the class is ai-enabled, False otherwise.
-
classmethod
isnamed
()¶ Returns True if the class is a named entity, like a LineCode, False otherwise.
-
jsonize
(all_params=False, flatten_mtx=True)¶ Returns a dict that describes the element’s parameters. It’s compatible with the json I/O functions.
-
paramhelp
()¶ Prints a cheatsheet for the object’s parameters.
-
sf_deepcopy
()¶ Returns a deep copy of the object. This method is to be used in place of the standard copy.deepcopy, that will raise an exception.
-
toe
¶
-
Capacitor¶
-
class
krangpower._components.
Capacitor
(**parameters)¶ Capacitance
Property name type Default value phases int 3 kvar float 1200.0 kv float 12.470 conn string wye cuf float 20.47 r float 0.0 xl floatarray 0.0 harm intarray 0 numsteps int 1 states intarray 1 normamps float 75.0046059412345 emergamps float 100.006141254979 faultrate float 0.0 %perm float 100.0 repair float 3.0 basefreq float 50.0 -
aka
(name)¶ Aliases the object.
-
eltype
¶
-
fcs
(**hookup)¶ Generates the opendss “new…” command for the object. Needs to be passed an appropriate set of keyword arguments to fill whatever topologic parameters are needed. It’s meant primarily for internal use by krangpower itself.
-
fullname
¶ Name, in the form eltype.elname
-
classmethod
isabove
()¶ Returns True if the class is an above-graph component, like a monitor or regulator, False otherwise.
-
classmethod
isai
()¶ Returns true if the class is ai-enabled, False otherwise.
-
classmethod
isnamed
()¶ Returns True if the class is a named entity, like a LineCode, False otherwise.
-
jsonize
(all_params=False, flatten_mtx=True)¶ Returns a dict that describes the element’s parameters. It’s compatible with the json I/O functions.
-
paramhelp
()¶ Prints a cheatsheet for the object’s parameters.
-
sf_deepcopy
()¶ Returns a deep copy of the object. This method is to be used in place of the standard copy.deepcopy, that will raise an exception.
-
toe
¶
-
Reactor¶
-
class
krangpower._components.
Reactor
(**parameters)¶ Reactor object
Property name type Default value phases int 3 kvar float 1200.0 kv float 12.47 conn string wye parallel string no r float 0 x float 1555.009 rp float 0 z1 floatarray 0,0 z2 floatarray 0,0 z0 floatarray 0,0 z floatarray 0.0,1555.009 rcurve string lcurve string lmh float 4124.7895 normamps float 5.0 emergamps float 6.0 faultrate float 0.0 %perm float 100.0 repair float 3.0 basefreq float 50.0 -
aka
(name)¶ Aliases the object.
-
eltype
¶
-
fcs
(**hookup)¶ Generates the opendss “new…” command for the object. Needs to be passed an appropriate set of keyword arguments to fill whatever topologic parameters are needed. It’s meant primarily for internal use by krangpower itself.
-
fullname
¶ Name, in the form eltype.elname
-
classmethod
isabove
()¶ Returns True if the class is an above-graph component, like a monitor or regulator, False otherwise.
-
classmethod
isai
()¶ Returns true if the class is ai-enabled, False otherwise.
-
classmethod
isnamed
()¶ Returns True if the class is a named entity, like a LineCode, False otherwise.
-
jsonize
(all_params=False, flatten_mtx=True)¶ Returns a dict that describes the element’s parameters. It’s compatible with the json I/O functions.
-
paramhelp
()¶ Prints a cheatsheet for the object’s parameters.
-
sf_deepcopy
()¶ Returns a deep copy of the object. This method is to be used in place of the standard copy.deepcopy, that will raise an exception.
-
toe
¶
-
Generator¶
-
class
krangpower._components.
Generator
(**parameters)¶ Generator object
Property name type Default value phases int 3 kv float 12.47 kw float 1000.0 pf float 0.88 kvar float 60.0 model int 1 vminpu float 0.90 vmaxpu float 1.10 yearly string daily string duty string dispmode string default dispvalue float 0.0 conn string wye rneut float 0.0 xneut float 0.0 status string variable class int 1 vpu float 1.0 maxkvar float 120.0 minkvar float -120.0 pvfactor float 0.1 forceon string no kva float 1200.0 mva float 1.2 xd float 1.0 xdp float 0.28 xdpp float 0.2 h float 1.0 d float 0.0 usermodel string userdata string shaftmodel string shaftdata string dutystart float 0 debugtrace string no balanced string no xrdp float 20.0 spectrum string defaultgen basefreq float 50.0 -
aka
(name)¶ Aliases the object.
-
eltype
¶
-
fcs
(**hookup)¶ Generates the opendss “new…” command for the object. Needs to be passed an appropriate set of keyword arguments to fill whatever topologic parameters are needed. It’s meant primarily for internal use by krangpower itself.
-
fullname
¶ Name, in the form eltype.elname
-
classmethod
isabove
()¶ Returns True if the class is an above-graph component, like a monitor or regulator, False otherwise.
-
classmethod
isai
()¶ Returns true if the class is ai-enabled, False otherwise.
-
classmethod
isnamed
()¶ Returns True if the class is a named entity, like a LineCode, False otherwise.
-
jsonize
(all_params=False, flatten_mtx=True)¶ Returns a dict that describes the element’s parameters. It’s compatible with the json I/O functions.
-
paramhelp
()¶ Prints a cheatsheet for the object’s parameters.
-
sf_deepcopy
()¶ Returns a deep copy of the object. This method is to be used in place of the standard copy.deepcopy, that will raise an exception.
-
toe
¶
-
Storage¶
-
class
krangpower._components.
Storage
(**parameters)¶ Storage object
Property name type Default value phases int 3 kv float 12.47 kw float 0.0 pf float 1.0 conn string wye kvar float 0.0 kva float 25.0 kwrated float 25.0 kwhrated float 50.0 kwhstored float 50.0 %stored float 100.0 %reserve float 20.0 state string idling %discharge float 100.0 %charge float 100.0 %effcharge float 90.0 %effdischarge float 90.0 %idlingkw float 1.0 %idlingkvar float 0.0 %r float 0.0 %x float 50.0 model int 1 vminpu float 0.9 vmaxpu float 1.1 balanced string no limitcurrent string no yearly string daily string duty string dispmode string default dischargetrigger float 0.0 chargetrigger float 0.0 timechargetrig float 2.0 class int 1 dynadll string dynadata string usermodel string userdata string debugtrace string no spectrum string basefreq float 50.0 -
aka
(name)¶ Aliases the object.
-
eltype
¶
-
fcs
(**hookup)¶ Generates the opendss “new…” command for the object. Needs to be passed an appropriate set of keyword arguments to fill whatever topologic parameters are needed. It’s meant primarily for internal use by krangpower itself.
-
fullname
¶ Name, in the form eltype.elname
-
classmethod
isabove
()¶ Returns True if the class is an above-graph component, like a monitor or regulator, False otherwise.
-
classmethod
isai
()¶ Returns true if the class is ai-enabled, False otherwise.
-
classmethod
isnamed
()¶ Returns True if the class is a named entity, like a LineCode, False otherwise.
-
jsonize
(all_params=False, flatten_mtx=True)¶ Returns a dict that describes the element’s parameters. It’s compatible with the json I/O functions.
-
paramhelp
()¶ Prints a cheatsheet for the object’s parameters.
-
sf_deepcopy
()¶ Returns a deep copy of the object. This method is to be used in place of the standard copy.deepcopy, that will raise an exception.
-
toe
¶
-
PvSystem¶
-
class
krangpower._components.
PvSystem
(**parameters)¶ PvSystem object.
Property name type Default value phases int 3 kv float 12.47 irradiance float 1.0 Pmpp float 500.0 pctPmpp float 100.0 Temperature float 25.0 pf float 1.0 conn string wye kvar float 0.0 kVA float 500.0 %Cutin float 20.0 %Cutout float 20.0 EffCurve float P-TCurve float %R float 50.0 %X float 0.0 model int 1 Vminpu float 0.9 Vmaxpu float 1.1 Balanced string No LimitCurrent string No yearly string daily string duty string Tyearly string Tdaily string Tduty string class int 1 UserModel string UserData string debugtrace string NO VarFollowInverter string No kvarLimit float 500.0 DutyStart float 0.0 spectrum string basefreq float 50.0 -
aka
(name)¶ Aliases the object.
-
eltype
¶
-
fcs
(**hookup)¶ Generates the opendss “new…” command for the object. Needs to be passed an appropriate set of keyword arguments to fill whatever topologic parameters are needed. It’s meant primarily for internal use by krangpower itself.
-
fullname
¶ Name, in the form eltype.elname
-
classmethod
isabove
()¶ Returns True if the class is an above-graph component, like a monitor or regulator, False otherwise.
-
classmethod
isai
()¶ Returns true if the class is ai-enabled, False otherwise.
-
classmethod
isnamed
()¶ Returns True if the class is a named entity, like a LineCode, False otherwise.
-
jsonize
(all_params=False, flatten_mtx=True)¶ Returns a dict that describes the element’s parameters. It’s compatible with the json I/O functions.
-
paramhelp
()¶ Prints a cheatsheet for the object’s parameters.
-
sf_deepcopy
()¶ Returns a deep copy of the object. This method is to be used in place of the standard copy.deepcopy, that will raise an exception.
-
toe
¶
-