Esempio n. 1
0
 def test_simple_example_SSC(self):
     G = RadialPowerSystem("1")
     G.add_node("1",
                nodeType="service",
                nomVLL=480,
                nomVLN=240,
                phase=1,
                availSSC=75000.0)
     G.add_node("2",
                nomVLL=480,
                nomVLN=240,
                phase=1,
                w=2000.0,
                vAr=0.0,
                nodeType="load")
     G.add_connection("1",
                      "2",
                      wireSize="1/0",
                      conduitMat="PVC",
                      length=1400.0)
     calc_functions.per_unit_conv(G)
     calc_functions.calc_sym_ssc(G)
     self.assertGreater(G.node["1"]["SSC_LL"].real,
                        G.node["2"]["SSC_LL"].real)
     self.assertGreater(G.node["1"]["SSC_LN"].real,
                        G.node["2"]["SSC_LN"].real)
Esempio n. 2
0
 def test_simple_example_voltage(self):
     G = RadialPowerSystem("1")
     G.add_node("1",
                nodeType="service",
                nomVLL=480,
                phase=1,
                availSSC=75000.0)
     G.add_node("2",
                nomVLL=480,
                phase=1,
                w=2000.0,
                vAr=0.0,
                nodeType="load")
     G.add_connection("1",
                      "2",
                      wireSize="1/0",
                      conduitMat="PVC",
                      length=1400.0)
     calc_functions.per_unit_conv(G)
     calc_functions.calc_flows_PU(G)
     calc_functions.calc_voltages_PU(G)
     calc_functions.actual_conv(G)
     self.assertGreater(G.node["1"]["trueVoltage"].real,
                        G.node["2"]["trueVoltage"].real)
Esempio n. 3
0
 def test_transformer_FCAN_tap_single_phase_impedance(self):
     G = RadialPowerSystem("1")
     G.add_node("1",
                nodeType="service",
                nomVLL=480,
                nomVLN=240,
                phase=1,
                availSSC=100000.0)
     G.add_node("2",
                phase=1,
                pctR=1.0,
                pctX=1.0,
                tapSetting=5.0,
                rating=10.0,
                nomPrimaryV=480,
                nomSecondaryV1=120,
                nomSecondaryV2=240,
                nodeType="transformer")
     G.add_node("3",
                nomVLL=240,
                nomVLN=120,
                phase=1,
                w=10000.0,
                vAr=1000.0,
                nodeType="load")
     G.add_connection("1",
                      "2",
                      wireSize="400",
                      conduitMat="PVC",
                      length=100.0)
     G.add_connection("2",
                      "3",
                      wireSize="400",
                      conduitMat="PVC",
                      length=0.00001)
     calc_functions.per_unit_conv(G)
     calc_functions.calc_flows_PU(G)
     calc_functions.calc_voltages_PU(G)
     calc_functions.actual_conv(G)
     turnsRatio = ((G.node["2"]["nomPrimaryV"] -
                    (G.node["2"]["nomPrimaryV"].real *
                     G.node["2"]["tapSetting"] / 100.0)) /
                   G.node["2"]["nomSecondaryV2"])
     self.assertGreater(G.node["2"]["primaryVoltage"].real,
                        G.node["2"]["secondaryVoltage2"].real * turnsRatio)
Esempio n. 4
0
 def test_transformer_ssc_single_phase_impedance(self):
     G = RadialPowerSystem("1")
     G.add_node("1",
                nodeType="service",
                nomVLL=480,
                nomVLN=240,
                phase=1,
                availSSC=100000.0)
     G.add_node("2",
                phase=1,
                pctR=1.0,
                pctX=1.0,
                tapSetting=0.0,
                rating=10.0,
                nomPrimaryV=480,
                nomSecondaryV1=120,
                nomSecondaryV2=240,
                nodeType="transformer")
     G.add_node("3",
                nomVLL=240,
                nomVLN=120,
                phase=1,
                w=10000.0,
                vAr=1000.0,
                nodeType="load")
     G.add_connection("1",
                      "2",
                      wireSize="400",
                      conduitMat="PVC",
                      length=100.0)
     G.add_connection("2",
                      "3",
                      wireSize="400",
                      conduitMat="PVC",
                      length=0.00001)
     turnsRatio = G.node["2"]["nomPrimaryV"] / G.node["2"]["nomSecondaryV2"]
     calc_functions.per_unit_conv(G)
     calc_functions.calc_sym_ssc(G)
     self.assertGreater(G.node["2"]["SSC_LL"].real * turnsRatio,
                        G.node["3"]["SSC_LL"].real)
import matplotlib.pyplot as plt

#########################################################################################
"""Input Radial Power System Data Below"""
#########################################################################################
"""Instruction and usage notes:
- nomVoltage, nomSecondaryV, nomPrimaryV must be an integer.
- If the program is not working, and messages are not desribing the problem clearly, check inputs to make source
  there are no isolated nodes.
- Must instantiate a RadialPowerSystem object, then enter nodes and edges between the nodes for the program to function.
- Transformer tap settings are entered as float representations of percentages: 5% FCBN entered as -5.0, 5% FCAN entered as 5.0.
- Transformer ratings are entered in KVA.
- Transformer pctX and pctR are entered as float representations of percentages: 5% X entered as 5.0, 5% R entered as 5.0.
"""

G = RadialPowerSystem("Service #1")

G.add_node("service_xfmr",
           nodeType="service",
           nomVLL=480,
           nomVLN=240,
           phase=1,
           availSSC=75000,
           xRRatio=10.0)
G.add_node("DS5", phase=1, nodeType="bus", nomVLL=480, nomVLN=240)
G.add_connection("service_xfmr",
                 "DS5",
                 wireSize="1/0",
                 conduitMat="PVC",
                 length=35.0)