// $Id: powerflow_IEEE_37node.glm 4738 2014-07-03 00:55:39Z dchassin $
// Copyright (C) 2008 Battelle Memorial Institute
// IEEE 37 Node Feeder
//
// This model includes a regulator at the top of the feeder.
//
// Note: This model is for reference purposes as a basis for other models
// It does not produce output in its current form because there are
// no loadobjects attached to cause time to advance and there are no
// recorders attached to gather the output.  See residential_loads.glm
// for an example model that produces output.
#set profiler=1
#set pauseatexit=1
#set iteration_limit=20000;

clock {
	timestamp '2000-01-01 0:00:00';
	timezone EST+5EDT;
}

module powerflow {
	solver_method FBS;
};


// Phase Conductor for 721: 1,000,000 AA,CN
object underground_line_conductor:7210 { 
	 outer_diameter 1.980000;
	 conductor_gmr 0.036800;
	 conductor_diameter 1.150000;
	 conductor_resistance 0.105000;
	 neutral_gmr 0.003310;
	 neutral_resistance 5.903000;
	 neutral_diameter 0.102000;
	 neutral_strands 20.000000;
	 shield_gmr 0.000000;
	 shield_resistance 0.000000;
}

// Phase Conductor for 722: 500,000 AA,CN
object underground_line_conductor:7220 { 
	 outer_diameter 1.560000;
	 conductor_gmr 0.026000;
	 conductor_diameter 0.813000;
	 conductor_resistance 0.206000;
	 neutral_gmr 0.002620;
	 neutral_resistance 9.375000;
	 neutral_diameter 0.081000;
	 neutral_strands 16.000000;
	 shield_gmr 0.000000;
	 shield_resistance 0.000000;
}

// Phase Conductor for 723: 2/0 AA,CN
object underground_line_conductor:7230 { 
	 outer_diameter 1.100000;
	 conductor_gmr 0.012500;
	 conductor_diameter 0.414000;
	 conductor_resistance 0.769000;
	 neutral_gmr 0.002080;
	 neutral_resistance 14.872000;
	 neutral_diameter 0.064000;
	 neutral_strands 7.000000;
	 shield_gmr 0.000000;
	 shield_resistance 0.000000;
}

// Phase Conductor for 724: //2 AA,CN
object underground_line_conductor:7240 { 
	 outer_diameter 0.980000;
	 conductor_gmr 0.008830;
	 conductor_diameter 0.292000;
	 conductor_resistance 1.540000;
	 neutral_gmr 0.002080;
	 neutral_resistance 14.872000;
	 neutral_diameter 0.064000;
	 neutral_strands 6.000000;
	 shield_gmr 0.000000;
	 shield_resistance 0.000000;
}

// underground line spacing: spacing id 515 
object line_spacing:515 {
	 distance_AB 0.500000;
	 distance_BC 0.500000;
	 distance_AC 1.000000;
	 distance_AN 0.000000;
	 distance_BN 0.000000;
	 distance_CN 0.000000;
}

//line configurations:
object line_configuration:7211 {
	 conductor_A underground_line_conductor:7210;
	 conductor_B underground_line_conductor:7210;
	 conductor_C underground_line_conductor:7210;
	 spacing line_spacing:515;
}

object line_configuration:7221 {
	 conductor_A underground_line_conductor:7220;
	 conductor_B underground_line_conductor:7220;
	 conductor_C underground_line_conductor:7220;
	 spacing line_spacing:515;
}

object line_configuration:7231 {
	 conductor_A underground_line_conductor:7230;
	 conductor_B underground_line_conductor:7230;
	 conductor_C underground_line_conductor:7230;
	 spacing line_spacing:515;
}

object line_configuration:7241 {
	 conductor_A underground_line_conductor:7240;
	 conductor_B underground_line_conductor:7240;
	 conductor_C underground_line_conductor:7240;
	 spacing line_spacing:515;
}

//create lineobjects:
object underground_line:701702 {
	 phases "ABC";
	 name 701-702;
	 from load:801;
	 to node:702;
	 length 960;
	 configuration line_configuration:7221;
}

object underground_line:702705 {
	 phases "ABC";
	 name 702-705;
	 from node:702;
	 to node:705;
	 length 400;
	 configuration line_configuration:7241;
}

object underground_line:702713 {
	 phases "ABC";
	 name 702-713;
	 from node:702;
	 to load:813;
	 length 360;
	 configuration line_configuration:7231;
}

object underground_line:702703 {
	 phases "ABC";
	 name 702-703;
	 from node:702;
	 to node:703;
	 length 1320;
	 configuration line_configuration:7221;
}

object underground_line:703727 {
	 phases "ABC";
	 name 703-727;
	 from node:703;
	 to load:827;
	 length 240;
	 configuration line_configuration:7241;
}

object underground_line:703730 {
	 phases "ABC";
	 name 703-730;
	 from node:703;
	 to load:830;
	 length 600;
	 configuration line_configuration:7231;
}

object underground_line:704714 {
	 phases "ABC";
	 name 704-714;
	 from node:704;
	 to load:814;
	 length 80;
	 configuration line_configuration:7241;
}

object underground_line:704720 {
	 phases "ABC";
	 name 704-720;
	 from node:704;
	 to load:820;
	 length 800;
	 configuration line_configuration:7231;
}

object underground_line:705742 {
	 phases "ABC";
	 name 705-742;
	 from node:705;
	 to load:842;
	 length 320;
	 configuration line_configuration:7241;
}

object underground_line:705712 {
	 phases "ABC";
	 name 705-712;
	 from node:705;
	 to load:812;
	 length 240;
	 configuration line_configuration:7241;
}

object underground_line:706725 {
	 phases "ABC";
	 name 706-725;
	 from node:706;
	 to load:825;
	 length 280;
	 configuration line_configuration:7241;
}

object underground_line:707724 {
	 phases "ABC";
	 name 707-724;
	 from node:707;
	 to load:824;
	 length 760;
	 configuration line_configuration:7241;
}

object underground_line:707722 {
	 phases "ABC";
	 name 707-722;
	 from node:707;
	 to load:822;
	 length 120;
	 configuration line_configuration:7241;
}

object underground_line:708733 {
	 phases "ABC";
	 name 708-733;
	 from node:708;
	 to load:833;
	 length 320;
	 configuration line_configuration:7231;
}

object underground_line:708732 {
	 phases "ABC";
	 name 708-732;
	 from node:708;
	 to load:832;
	 length 320;
	 configuration line_configuration:7241;
}

object underground_line:709731 {
	 phases "ABC";
	 name 709-731;
	 from node:709;
	 to load:831;
	 length 600;
	 configuration line_configuration:7231;
}

object underground_line:709708 {
	 phases "ABC";
	 name 709-708;
	 from node:709;
	 to node:708;
	 length 320;
	 configuration line_configuration:7231;
}

object underground_line:710735 {
	 phases "ABC";
	 name 710-735;
	 from node:710;
	 to load:835;
	 length 200;
	 configuration line_configuration:7241;
}

object underground_line:710736 {
	 phases "ABC";
	 name 710-736;
	 from node:710;
	 to load:836;
	 length 1280;
	 configuration line_configuration:7241;
}

object underground_line:711741 {
	 phases "ABC";
	 name 711-741;
	 from node:711;
	 to load:841;
	 length 400;
	 configuration line_configuration:7231;
}

object underground_line:711740 {
	 phases "ABC";
	 name 711-740;
	 from node:711;
	 to load:840;
	 length 200;
	 configuration line_configuration:7241;
}

object underground_line:713704 {
	 phases "ABC";
	 name 713-704;
	 from load:813;
	 to node:704;
	 length 520;
	 configuration line_configuration:7231;
}

object underground_line:714718 {
	 phases "ABC";
	 name 714-718;
	 from load:814;
	 to load:818;
	 length 520;
	 configuration line_configuration:7241;
}

object underground_line:720707 {
	 phases "ABC";
	 name 720-707;
	 from load:820;
	 to node:707;
	 length 920;
	 configuration line_configuration:7241;
}

object underground_line:720706 {
	 phases "ABC";
	 name 720-706;
	 from load:820;
	 to node:706;
	 length 600;
	 configuration line_configuration:7231;
}

object underground_line:727744 {
	 phases "ABC";
	 name 727-744;
	 from load:827;
	 to load:844;
	 length 280;
	 configuration line_configuration:7231;
}

object underground_line:730709 {
	 phases "ABC";
	 name 730-709;
	 from load:830;
	 to node:709;
	 length 200;
	 configuration line_configuration:7231;
}

object underground_line:733734 {
	 phases "ABC";
	 name 733-734;
	 from load:833;
	 to load:834;
	 length 560;
	 configuration line_configuration:7231;
}

object underground_line:734737 {
	 phases "ABC";
	 name 734-737;
	 from load:834;
	 to load:837;
	 length 640;
	 configuration line_configuration:7231;
}

object underground_line:734710 {
	 phases "ABC";
	 name 734-710;
	 from load:834;
	 to node:710;
	 length 520;
	 configuration line_configuration:7241;
}

object underground_line:737738 {
	 phases "ABC";
	 name 737-738;
	 from load:837;
	 to load:838;
	 length 400;
	 configuration line_configuration:7231;
}

object underground_line:738711 {
	 phases "ABC";
	 name 738-711;
	 from load:838;
	 to node:711;
	 length 400;
	 configuration line_configuration:7231;
}

object underground_line:744728 {
	 phases "ABC";
	 name 744-728;
	 from load:844;
	 to load:828;
	 length 200;
	 configuration line_configuration:7241;
}

object underground_line:744729 {
	 phases "ABC";
	 name 744-729;
	 from load:844;
	 to load:829;
	 length 280;
	 configuration line_configuration:7241;
}

object underground_line:781701 {
	 phases "ABC";
	 name 781-701;
	 from node:781;
	 to load:801;
	 length 1850;
	 configuration line_configuration:7211;
}
//END of line

//create nodes

object node:799 {
	phases "ABC";
	name 799;
	bustype SWING;
	voltage_A 2400.000000-1385.640646j;
	voltage_B -2400.000000-1385.640646j;
	voltage_C 0.000000+2771.281292j;
	nominal_voltage 4800;
}
	
//Create extra node for other side of regulator
object node:781 {
	 phases "ABC";
	 name 781;
	 //bustype SWING;
	 voltage_A 2400.0000-1385.640646j;
	 voltage_B -2400.0000-1385.640646j;
	 voltage_C 0.0000+2771.281292j;
	 nominal_voltage 4800;
}

object node:702 {
	 phases "ABC";
	 name 702;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 nominal_voltage 4800;
}

object node:703 {
	 phases "ABC";
	 name 703;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 nominal_voltage 4800;
}

object node:704 {
	 phases "ABC";
	 name 704;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 nominal_voltage 4800;
}

object node:705 {
	 phases "ABC";
	 name 705;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 nominal_voltage 4800;
}

object node:706 {
	 phases "ABC";
	 name 706;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 nominal_voltage 4800;
}

object node:707 {
	 phases "ABC";
	 name 707;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 nominal_voltage 4800;
}

object node:708 {
	 phases "ABC";
	 name 708;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 nominal_voltage 4800;
}

object node:709 {
	 phases "ABC";
	 name 709;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 nominal_voltage 4800;
}

object node:710 {
	 phases "ABC";
	 name 710;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 nominal_voltage 4800;
}

object node:711 {
	 phases "ABC";
	 name 711;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 nominal_voltage 4800;
}

//Create loads
object load:801 {
	 phases "ABCD";
	 name 801;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_power_A 140000.000000+70000.000000j;
	 constant_power_B 140000.000000+70000.000000j;
	 constant_power_C 350000.000000+175000.000000j;
	 nominal_voltage 4800;
}

object load:812 {
	 phases "ABCD";
	 name 812;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_power_C 85000.000000+40000.000000j;
	 nominal_voltage 4800;
}

object load:813 {
	 phases "ABCD";
	 name 813;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_power_C 85000.000000+40000.000000j;
	 nominal_voltage 4800;
}

object load:814 {
	 phases "ABCD";
	 name 814;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_current_A 3.541667 -1.666667j;
	 constant_current_B -3.991720 -2.747194j;
	 nominal_voltage 4800;
}

object load:818 {
	 phases "ABCD";
	 name 818;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_impedance_A 221.915014+104.430595j;
	 nominal_voltage 4800;
}

object load:820 {
	 phases "ABCD";
	 name 820;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_power_C 85000.000000+40000.000000j;
	 nominal_voltage 4800;
}

object load:822 {
	 phases "ABCD";
	 name 822;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_current_B -27.212870 -17.967408j;
	 constant_current_C -0.383280+4.830528j;
	 nominal_voltage 4800;
}

object load:824 {
	 phases "ABCD";
	 name 824;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_impedance_B 438.857143+219.428571j;
	 nominal_voltage 4800;
}

object load:825 {
	 phases "ABCD";
	 name 825;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_power_B 42000.000000+21000.000000j;
	 nominal_voltage 4800;
}

object load:827 {
	 phases "ABCD";
	 name 827;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_power_C 42000.000000+21000.000000j;
	 nominal_voltage 4800;
}

object load:828 {
	 phases "ABCD";
	 name 828;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_power_A 42000.000000+21000.000000j;
	 constant_power_B 42000.000000+21000.000000j;
	 constant_power_C 42000.000000+21000.000000j;
	 nominal_voltage 4800;
}

object load:829 {
	 phases "ABCD";
	 name 829;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_current_A 8.750000 -4.375000j;
	 nominal_voltage 4800;
}

object load:830 {
	 phases "ABCD";
	 name 830;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_impedance_C 221.915014+104.430595j;
	 nominal_voltage 4800;
}

object load:831 {
	 phases "ABCD";
	 name 831;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_impedance_B 221.915014+104.430595j;
	 nominal_voltage 4800;
}

object load:832 {
	 phases "ABCD";
	 name 832;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_power_C 42000.000000+21000.000000j;
	 nominal_voltage 4800;
}

object load:833 {
	 phases "ABCD";
	 name 833;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_current_A 17.708333 -8.333333j;
	 nominal_voltage 4800;
}

object load:834 {
	 phases "ABCD";
	 name 834;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_power_C 42000.000000+21000.000000j;
	 nominal_voltage 4800;
}

object load:835 {
	 phases "ABCD";
	 name 835;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_power_C 85000.000000+40000.000000j;
	 nominal_voltage 4800;
}

object load:836 {
	 phases "ABCD";
	 name 836;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_impedance_B 438.857143+219.428571j;
	 nominal_voltage 4800;
}

object load:837 {
	 phases "ABCD";
	 name 837;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_current_A 29.166667 -14.583333j;
	 nominal_voltage 4800;
}

object load:838 {
	 phases "ABCD";
	 name 838;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_power_A 126000.000000+62000.000000j;
	 nominal_voltage 4800;
}

object load:840 {
	 phases "ABCD";
	 name 840;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_power_C 85000.000000+40000.000000j;
	 nominal_voltage 4800;
}

object load:841 {
	 phases "ABCD";
	 name 841;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_current_C -0.586139+9.765222j;
	 nominal_voltage 4800;
}

object load:842 {
	 phases "ABCD";
	 name 842;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_impedance_A 2304.000000+1152.000000j;
	 constant_impedance_B 221.915014+104.430595j;
	 nominal_voltage 4800;
}

object load:844 {
	 phases "ABCD";
	 name 844;
	 voltage_A 2400.000000 -1385.640646j;
	 voltage_B -2400.000000 -1385.640646j;
	 voltage_C 0.000000+2771.281292j;
	 constant_power_A 42000.000000+21000.000000j;
	 nominal_voltage 4800;
}

object transformer_configuration:400 {
	connect_type 2;
	install_type PADMOUNT;
	power_rating 500;
	primary_voltage 4800;
	secondary_voltage 480;
	resistance 0.09;
	reactance 1.81;
}

object transformer:23 {
	phases "ABC";
	from node:709;
	to node:775;
	configuration transformer_configuration:400;
}
object node:775 {
	 phases "ABC";
	 name 775;
	 voltage_A 240.000000 -138.564065j;
	 voltage_B -240.000000 -138.564065j;
	 voltage_C -0.000000+277.128129j;
	 nominal_voltage 480;
}

object regulator_configuration:79978101 {
	connect_type OPEN_DELTA_ABBC;
	band_center 122.000;
	band_width 2.0;
	time_delay 30.0;
	raise_taps 16;
	lower_taps 16;
	current_transducer_ratio 350;
	power_transducer_ratio 40;
	compensator_r_setting_A 1.5;
	compensator_x_setting_A 3.0;
	compensator_r_setting_B 1.5;
	compensator_x_setting_B 3.0;
	CT_phase "ABC";
	PT_phase "ABC";
	regulation 0.10;
	Control MANUAL;
	Type A;
	tap_pos_A 7;
	tap_pos_B 4;
}
  
object regulator:799781 {
	 phases "ABC";
	 from node:799;
	 to node:781;
	 configuration regulator_configuration:79978101;
}