Commit 7835e53d authored by Markus Mirz's avatar Markus Mirz
Browse files

Merge branch 'shared-factory' into 'development'

Use Shared factory template for creating new components

See merge request acs/core/simulation/dpsim!25
parents 6e58914b 30b562dc
......@@ -23,6 +23,7 @@
#include "Utilities.h"
using namespace DPsim;
using namespace DPsim::Components::DP;
int main(int argc, char* argv[])
{
......@@ -33,13 +34,13 @@ int main(int argc, char* argv[])
String simName = "PiLine1_" + std::to_string(timeStep);
Components::Base::List comps = {
std::make_shared<Components::DP::VoltageSourceIdeal>("v_1", 1, 0, Complex(345, 0)),
std::make_shared<Components::DP::Resistor>("r1", 1, 2, 5),
std::make_shared<Components::DP::Capacitor>("c_1", 2, 0, 0.002),
std::make_shared<Components::DP::Resistor>("r_load", 2, 4, 6.4),
std::make_shared<Components::DP::Inductor>("l_1", 4, 3, 0.186),
std::make_shared<Components::DP::Capacitor>("c_2", 3, 0, 0.002),
std::make_shared<Components::DP::Resistor>("r_load", 3, 0, 150)
VoltageSourceIdeal::make("v_1", 1, 0, Complex(345, 0)),
Resistor::make("r1", 1, 2, 5),
Capacitor::make("c_1", 2, 0, 0.002),
Resistor::make("r_load", 2, 4, 6.4),
Inductor::make("l_1", 4, 3, 0.186),
Capacitor::make("c_2", 3, 0, 0.002),
Resistor::make("r_load", 3, 0, 150)
};
// Set up simulation and start main simulation loop
......
......@@ -23,6 +23,7 @@
#include "Utilities.h"
using namespace DPsim;
using namespace DPsim::Components::DP;
int main(int argc, char* argv[])
{
......@@ -33,10 +34,10 @@ int main(int argc, char* argv[])
String simName = "IdealVS1_" + std::to_string(timeStep);
Components::Base::List comps = {
std::make_shared<Components::DP::VoltageSourceIdeal>("v_in", 1, 2, Complex(10, 0)),
std::make_shared<Components::DP::Resistor>("r_1", 1, 0, 1),
std::make_shared<Components::DP::Resistor>("r_2", 2, 0, 1),
std::make_shared<Components::DP::Resistor>("r_3", 2, 0, 1)
VoltageSourceIdeal::make("v_in", 1, 2, Complex(10, 0)),
Resistor::make("r_1", 1, 0, 1),
Resistor::make("r_2", 2, 0, 1),
Resistor::make("r_3", 2, 0, 1)
};
// Set up simulation and start main simulation loop
......
......@@ -23,6 +23,7 @@
#include "Utilities.h"
using namespace DPsim;
using namespace DPsim::Components::DP;
int main(int argc, char* argv[])
{
......@@ -33,13 +34,13 @@ int main(int argc, char* argv[])
String simName = "IdealVS3_" + std::to_string(timeStep);
Components::Base::List comps = {
std::make_shared<Components::DP::VoltageSourceIdeal>("v_1", 1, 0, Complex(10, 0)),
std::make_shared<Components::DP::Resistor>("r_1", 1, 2, 1),
std::make_shared<Components::DP::Resistor>("r_2", 2, 0, 1),
std::make_shared<Components::DP::Resistor>("r_3", 2, 3, 1),
std::make_shared<Components::DP::Resistor>("r_4", 3, 0, 1),
std::make_shared<Components::DP::Resistor>("r_5", 3, 4, 1),
std::make_shared<Components::DP::VoltageSourceIdeal>("v_2", 4, 0, Complex(20, 0))
VoltageSourceIdeal::make("v_1", 1, 0, Complex(10, 0)),
Resistor::make("r_1", 1, 2, 1),
Resistor::make("r_2", 2, 0, 1),
Resistor::make("r_3", 2, 3, 1),
Resistor::make("r_4", 3, 0, 1),
Resistor::make("r_5", 3, 4, 1),
VoltageSourceIdeal::make("v_2", 4, 0, Complex(20, 0))
};
// Set up simulation and start main simulation loop
......
......@@ -23,6 +23,7 @@
#include "Utilities.h"
using namespace DPsim;
using namespace DPsim::Components::DP;
int main(int argc, char* argv[])
{
......@@ -33,11 +34,11 @@ int main(int argc, char* argv[])
String simName = "IdealVS2_" + std::to_string(timeStep);
Components::Base::List comps = {
std::make_shared<Components::DP::VoltageSourceIdeal>("v_in", 1, 0, Complex(10, 0)),
std::make_shared<Components::DP::Resistor>("r_1", 1, 2, 1),
std::make_shared<Components::DP::Capacitor>("c_1", 2, 3, 0.001),
std::make_shared<Components::DP::Inductor>("l_1", 3, 0, 0.001),
std::make_shared<Components::DP::Resistor>("r_2", 3, 0, 1)
VoltageSourceIdeal::make("v_in", 1, 0, Complex(10, 0)),
Resistor::make("r_1", 1, 2, 1),
Capacitor::make("c_1", 2, 3, 0.001),
Inductor::make("l_1", 3, 0, 0.001),
Resistor::make("r_2", 3, 0, 1)
};
// Set up simulation and start main simulation loop
......
......@@ -23,6 +23,7 @@
#include "Utilities.h"
using namespace DPsim;
using namespace DPsim::Components::DP;
int main(int argc, char* argv[])
{
......@@ -31,11 +32,11 @@ int main(int argc, char* argv[])
Real omega = 2.0*M_PI*50.0;
Real finalTime = 0.3;
String simName = "RxLine1_" + std::to_string(timeStep);
Components::Base::List comps = {
std::make_shared<Components::DP::VoltageSourceIdeal>("v_1", 1, 0, Complex(10, 0)),
std::make_shared<Components::DP::RxLine>("Line_1", 1, 2, 0.1, 0.001),
std::make_shared<Components::DP::Resistor>("r_1", 2, 0, 20)
VoltageSourceIdeal::make("v_1", 1, 0, Complex(10, 0)),
RxLine::make("Line_1", 1, 2, 0.1, 0.001),
Resistor::make("r_1", 2, 0, 20)
};
// Set up simulation and start main simulation loop
......
......@@ -23,6 +23,7 @@
#include "Utilities.h"
using namespace DPsim;
using namespace DPsim::Components::DP;
int main(int argc, char* argv[])
{
......@@ -33,10 +34,10 @@ int main(int argc, char* argv[])
String simName = "RxLine2_" + std::to_string(timeStep);
Components::Base::List comps = {
std::make_shared<Components::DP::VoltageSourceIdeal>("v_1", 1, 0, Complex(10, 0)),
std::make_shared<Components::DP::Inductor>("l_L", 2, 3, 0.001),
std::make_shared<Components::DP::Resistor>("r_L", 1, 2, 0.1),
std::make_shared<Components::DP::Resistor>("r_1", 3, 0, 20)
VoltageSourceIdeal::make("v_1", 1, 0, Complex(10, 0)),
Inductor::make("l_L", 2, 3, 0.001),
Resistor::make("r_L", 1, 2, 0.1),
Resistor::make("r_1", 3, 0, 20)
};
// Set up simulation and start main simulation loop
......
......@@ -23,6 +23,7 @@
#include "Utilities.h"
using namespace DPsim;
using namespace DPsim::Components::DP;
int main(int argc, char* argv[])
{
......@@ -33,9 +34,9 @@ int main(int argc, char* argv[])
String simName = "IdealVS_Trafo_" + std::to_string(timeStep);
Components::Base::List comps = {
std::make_shared<Components::DP::VoltageSourceIdeal>("v_1", -1, 0, Complex(100, 0), Logger::Level::DEBUG, false),
std::make_shared<Components::DP::Transformer>("trafo_1", 0, 1, 10, 0, 0, 0.001, Logger::Level::DEBUG, false),
std::make_shared<Components::DP::Resistor>("r_1", 1, -1, 1, Logger::Level::DEBUG, false)
VoltageSourceIdeal::make("v_1", -1, 0, Complex(100, 0), Logger::Level::DEBUG, false),
Transformer::make("trafo_1", 0, 1, 10, 0, 0, 0.001, Logger::Level::DEBUG, false),
Resistor::make("r_1", 1, -1, 1, Logger::Level::DEBUG, false)
};
// Set up simulation and start main simulation loop
......
......@@ -23,6 +23,7 @@
#include "Utilities.h"
using namespace DPsim;
using namespace DPsim::Components::DP;
int tmpmain(int argc, char* argv[])
{
......@@ -33,9 +34,9 @@ int tmpmain(int argc, char* argv[])
String simName = "IdealVS_TrafoIdeal_" + std::to_string(timeStep);
Components::Base::List comps = {
std::make_shared<Components::DP::VoltageSourceIdeal>("v_1", 0, 1, Complex(10, 0)),
std::make_shared<Components::DP::TransformerIdeal>("trafo_1", 1, 2, 10, 0),
std::make_shared<Components::DP::Resistor>("r_1", 2, 0, 1)
VoltageSourceIdeal::make("v_1", 0, 1, Complex(10, 0)),
TransformerIdeal::make("trafo_1", 1, 2, 10, 0),
Resistor::make("r_1", 2, 0, 1)
};
// Set up simulation and start main simulation loop
......
......@@ -23,6 +23,7 @@
#include "Utilities.h"
using namespace DPsim;
using namespace DPsim::Components::DP;
int main(int argc, char* argv[])
{
......@@ -33,11 +34,11 @@ int main(int argc, char* argv[])
String simName = "PiLine2_" + std::to_string(timeStep);
Components::Base::List comps = {
std::make_shared<Components::DP::VoltageSource>("v_in", 1, 0, Complex(10, 0), 1),
std::make_shared<Components::DP::Inductor>("l_1", 1, 2, 0.02),
std::make_shared<Components::DP::Inductor>("l_2", 2, 0, 0.1),
std::make_shared<Components::DP::Inductor>("l_3", 2, 3, 0.05),
std::make_shared<Components::DP::Resistor>("r_2", 3, 0, 2)
VoltageSource::make("v_in", 1, 0, Complex(10, 0), 1),
Inductor::make("l_1", 1, 2, 0.02),
Inductor::make("l_2", 2, 0, 0.1),
Inductor::make("l_3", 2, 3, 0.05),
Resistor::make("r_2", 3, 0, 2)
};
// Set up simulation and start main simulation loop
......
......@@ -23,6 +23,7 @@
#include "Utilities.h"
using namespace DPsim;
using namespace DPsim::Components::DP;
int main(int argc, char* argv[])
{
......@@ -33,11 +34,11 @@ int main(int argc, char* argv[])
String simName = "Example1_" + std::to_string(timeStep);
Components::Base::List comps = {
std::make_shared<Components::DP::VoltageSource>("v_in", 1, 0, Complex(10, 0), 1),
std::make_shared<Components::DP::Inductor>("l_1", 1, 2, 0.02),
std::make_shared<Components::DP::Inductor>("l_2", 2, 0, 0.1),
std::make_shared<Components::DP::Inductor>("l_3", 2, 3, 0.05),
std::make_shared<Components::DP::Resistor>("r_2", 3, 0, 2)
VoltageSource::make("v_in", 1, 0, Complex(10, 0), 1),
Inductor::make("l_1", 1, 2, 0.02),
Inductor::make("l_2", 2, 0, 0.1),
Inductor::make("l_3", 2, 3, 0.05),
Resistor::make("r_2", 3, 0, 2)
};
// Set up simulation and start main simulation loop
......
......@@ -23,6 +23,7 @@
#include "Utilities.h"
using namespace DPsim;
using namespace DPsim::Components::DP;
int main(int argc, char* argv[])
{
......@@ -33,9 +34,9 @@ int main(int argc, char* argv[])
String simName = "Example2_" + std::to_string(timeStep);
Components::Base::List comps = {
std::make_shared<Components::DP::VoltageSource>("v_in", 1, 0, Complex(10, 0), 1),
std::make_shared<Components::DP::Inductor>("l_1", 1, 2, 0.02),
std::make_shared<Components::DP::Inductor>("l_2", 2, 0, 0.1)
VoltageSource::make("v_in", 1, 0, Complex(10, 0), 1),
Inductor::make("l_1", 1, 2, 0.02),
Inductor::make("l_2", 2, 0, 0.1)
};
// Set up simulation and start main simulation loop
......
......@@ -23,6 +23,7 @@
#include "Utilities.h"
using namespace DPsim;
using namespace DPsim::Components::DP;
int main(int argc, char* argv[])
{
......@@ -33,10 +34,10 @@ int main(int argc, char* argv[])
String simName = "Example3_" + std::to_string(timeStep);
Components::Base::List comps = {
std::make_shared<Components::DP::VoltageSource>("v_in", 1, 0, Complex(10, 0), 1),
std::make_shared<Components::DP::Capacitor>("c_1", 1, 2, 0.001),
std::make_shared<Components::DP::Inductor>("l_1", 2, 0, 0.001),
std::make_shared<Components::DP::Resistor>("r_2", 2, 0, 1)
VoltageSource::make("v_in", 1, 0, Complex(10, 0), 1),
Capacitor::make("c_1", 1, 2, 0.001),
Inductor::make("l_1", 2, 0, 0.001),
Resistor::make("r_2", 2, 0, 1)
};
// Set up simulation and start main simulation loop
......
......@@ -23,6 +23,7 @@
#include "Utilities.h"
using namespace DPsim;
using namespace DPsim::Components::DP;
int main(int argc, char* argv[])
{
......@@ -33,15 +34,15 @@ int main(int argc, char* argv[])
String simName = "RxLineResLoad_" + std::to_string(timeStep);
Components::Base::List comps0 = {
std::make_shared<Components::DP::VoltageSource>("v_s", 1, 0, Complex(10000, 0), 1),
std::make_shared<Components::DP::Resistor>("r_line", 1, 2, 1),
std::make_shared<Components::DP::Inductor>("l_line", 2, 3, 1)
VoltageSource::make("v_s", 1, 0, Complex(10000, 0), 1),
Resistor::make("r_line", 1, 2, 1),
Inductor::make("l_line", 2, 3, 1)
};
Components::Base::List comps1 = comps0;
Components::Base::List comps2 = comps0;
comps1.push_back(std::make_shared<Components::DP::Resistor>("r_load", 3, 0, 1000));
comps2.push_back(std::make_shared<Components::DP::Resistor>("r_load", 3, 0, 800));
comps1.push_back(Resistor::make("r_load", 3, 0, 1000));
comps2.push_back(Resistor::make("r_load", 3, 0, 800));
// Set up simulation and start main simulation loop
Simulation newSim(simName, comps1, omega, timeStep, finalTime);
......
......@@ -23,6 +23,7 @@
#include "Utilities.h"
using namespace DPsim;
using namespace DPsim::Components::EMT;
int main(int argc, char* argv[])
{
......@@ -33,10 +34,10 @@ int main(int argc, char* argv[])
String simName = "IdealVS_EMT_" + std::to_string(timeStep);
Components::Base::List comps = {
std::make_shared<Components::EMT::VoltageSourceIdeal>("v_in", 1, 2, 10),
std::make_shared<Components::EMT::Resistor>("r_1", 1, 0, 5),
std::make_shared<Components::EMT::Resistor>("r_2", 2, 0, 10),
std::make_shared<Components::EMT::Resistor>("r_3", 2, 0, 2)
VoltageSourceIdeal::make("v_in", 1, 2, 10),
Resistor::make("r_1", 1, 0, 5),
Resistor::make("r_2", 2, 0, 10),
Resistor::make("r_3", 2, 0, 2)
};
// Set up simulation and start main simulation loop
......
......@@ -23,6 +23,7 @@
#include "Utilities.h"
using namespace DPsim;
using namespace DPsim::Components::EMT;
int main(int argc, char* argv[])
{
......@@ -33,15 +34,15 @@ int main(int argc, char* argv[])
String simName = "RxLineResLoad_EMT_" + std::to_string(timeStep);
Components::Base::List comps0 = {
std::make_shared<Components::EMT::VoltageSource>("v_s", 1, 0, Complex(10000, 0), 1),
std::make_shared<Components::EMT::Resistor>("r_line", 1, 2, 1),
std::make_shared<Components::EMT::Inductor>("l_line", 2, 3, 1)
VoltageSource::make("v_s", 1, 0, Complex(10000, 0), 1),
Resistor::make("r_line", 1, 2, 1),
Inductor::make("l_line", 2, 3, 1)
};
Components::Base::List comps1 = comps0;
Components::Base::List comps2 = comps0;
comps1.push_back(std::make_shared<Components::EMT::Resistor>("r_load", 3, 0, 1000));
comps2.push_back(std::make_shared<Components::EMT::Resistor>("r_load", 3, 0, 800));
comps1.push_back(Resistor::make("r_load", 3, 0, 1000));
comps2.push_back(Resistor::make("r_load", 3, 0, 800));
// Set up simulation and start main simulation loop
Simulation newSim(simName, comps1, omega, timeStep, finalTime, Logger::Level::INFO, SimulationType::EMT);
......
......@@ -23,16 +23,17 @@
#include "Utilities.h"
using namespace DPsim;
using namespace DPsim::Components::DP;
int main(int argc, char* argv[])
{
Real timeStep = 0.00005;
Logger log;
Components::Base::List comps = {
std::make_shared<Components::DP::VoltageSource>("v_s", 1, 0, Complex(10000, 0), 1),
std::make_shared<Components::DP::Resistor>("r_line", 1, 2, 1),
std::make_shared<Components::DP::Inductor>("l_line", 2, 3, 1),
std::make_shared<Components::DP::Resistor>("r_load", 3, 0, 1000)
VoltageSource::make("v_s", 1, 0, Complex(10000, 0), 1),
Resistor::make("r_line", 1, 2, 1),
Inductor::make("l_line", 2, 3, 1),
Resistor::make("r_load", 3, 0, 1000)
};
// Set up simulation
......
......@@ -22,6 +22,7 @@
#include "Simulation.h"
using namespace DPsim;
using namespace DPsim::Components::DP;
int main(int argc, char* argv[])
{
......@@ -55,13 +56,13 @@ int main(int argc, char* argv[])
Real Llkq2 = 0.125;
// Declare circuit components
Components::Base::Ptr gen = std::make_shared<Components::DP::SynchronGenerator>("gen", 1, 2, 3,
Components::Base::Ptr gen = SynchronGenerator::make("gen", 1, 2, 3,
nomPower, nomPhPhVoltRMS, nomFreq, poleNum, nomFieldCurr,
Rs, Ll, Lmd, Lmd0, Lmq, Lmq0, Rfd, Llfd, Rkd, Llkd, Rkq1, Llkq1, Rkq2, Llkq2, H);
Real loadRes = 1037.8378;
Components::Base::Ptr r1 = std::make_shared<Components::DP::Resistor>("r1", 0, 1, loadRes);
Components::Base::Ptr r2 = std::make_shared<Components::DP::Resistor>("r2", 0, 2, loadRes);
Components::Base::Ptr r3 = std::make_shared<Components::DP::Resistor>("r3", 0, 3, loadRes);
Components::Base::Ptr r1 = Resistor::make("r1", 0, 1, loadRes);
Components::Base::Ptr r2 = Resistor::make("r2", 0, 2, loadRes);
Components::Base::Ptr r3 = Resistor::make("r3", 0, 3, loadRes);
Components::Base::List comps = { gen, r1, r2, r3 };
......
......@@ -23,6 +23,7 @@
#include "Simulation.h"
using namespace DPsim;
using namespace DPsim::Components::DP;
int main(int argc, char* argv[])
{
......@@ -78,21 +79,21 @@ int main(int argc, char* argv[])
//Real Llkq2 = 0;
// Declare circuit components
Components::Base::Ptr gen = std::make_shared<Components::DP::SynchronGeneratorVBR>("gen", 1, 2, 3,
Components::Base::Ptr gen = SynchronGeneratorVBR::make("gen", 1, 2, 3,
nomPower, nomPhPhVoltRMS, nomFreq, poleNum, nomFieldCurr,
Rs, Ll, Lmd, Lmd0, Lmq, Lmq0, Rfd, Llfd, Rkd, Llkd, Rkq1, Llkq1, Rkq2, Llkq2, H);
Real loadRes = 1037.8378;
Components::Base::Ptr r1 = std::make_shared<Components::DP::Resistor>("r1", 1, 0, loadRes);
Components::Base::Ptr r2 = std::make_shared<Components::DP::Resistor>("r2", 2, 0, loadRes);
Components::Base::Ptr r3 = std::make_shared<Components::DP::Resistor>("r3", 3, 0, loadRes);
Components::Base::Ptr r1 = Resistor::make("r1", 1, 0, loadRes);
Components::Base::Ptr r2 = Resistor::make("r2", 2, 0, loadRes);
Components::Base::Ptr r3 = Resistor::make("r3", 3, 0, loadRes);
Components::Base::List comps = { gen, r1, r2, r3 };
// Declare circuit components for resistance change
Real breakerRes = 1037.8378;
Components::Base::Ptr rBreaker1 = std::make_shared<Components::DP::Resistor>("rbreak1", 1, 0, breakerRes);
Components::Base::Ptr rBreaker2 = std::make_shared<Components::DP::Resistor>("rbreak2", 2, 0, breakerRes);
Components::Base::Ptr rBreaker3 = std::make_shared<Components::DP::Resistor>("rbreak3", 3, 0, breakerRes);
Components::Base::Ptr rBreaker1 = Resistor::make("rbreak1", 1, 0, breakerRes);
Components::Base::Ptr rBreaker2 = Resistor::make("rbreak2", 2, 0, breakerRes);
Components::Base::Ptr rBreaker3 = Resistor::make("rbreak3", 3, 0, breakerRes);
Components::Base::List compsBreakerOn = { gen, rBreaker1, rBreaker2, rBreaker3, r1, r2, r3 };
......
......@@ -23,6 +23,7 @@
#include "Simulation.h"
using namespace DPsim;
using namespace DPsim::Components::DP;
int main(int argc, char* argv[])
{
......@@ -66,21 +67,21 @@ int main(int argc, char* argv[])
Real Llkq2 = 0;
// Declare circuit components
Components::Base::Ptr gen = std::make_shared<Components::DP::SynchronGenerator>("gen", 1, 2, 3,
Components::Base::Ptr gen = SynchronGenerator::make("gen", 1, 2, 3,
nomPower, nomPhPhVoltRMS, nomFreq, poleNum, nomFieldCurr,
Rs, Ll, Lmd, Lmd0, Lmq, Lmq0, Rfd, Llfd, Rkd, Llkd, Rkq1, Llkq1, Rkq2, Llkq2, H);
Real loadRes = 1037.8378;
Components::Base::Ptr r1 = std::make_shared<Components::DP::Resistor>("r1", 1, 0, loadRes);
Components::Base::Ptr r2 = std::make_shared<Components::DP::Resistor>("r2", 2, 0, loadRes);
Components::Base::Ptr r3 = std::make_shared<Components::DP::Resistor>("r3", 3, 0, loadRes);
Components::Base::Ptr r1 = Resistor::make("r1", 1, 0, loadRes);
Components::Base::Ptr r2 = Resistor::make("r2", 2, 0, loadRes);
Components::Base::Ptr r3 = Resistor::make("r3", 3, 0, loadRes);
Components::Base::List comps = { gen, r1, r2, r3 };
// Declare circuit components for resistance change
Real breakerRes = 0.001;
Components::Base::Ptr rBreaker1 = std::make_shared<Components::DP::Resistor>("rbreak1", 1, 0, breakerRes);
Components::Base::Ptr rBreaker2 = std::make_shared<Components::DP::Resistor>("rbreak2", 2, 0, breakerRes);
Components::Base::Ptr rBreaker3 = std::make_shared<Components::DP::Resistor>("rbreak3", 3, 0, breakerRes);
Components::Base::Ptr rBreaker1 = Resistor::make("rbreak1", 1, 0, breakerRes);
Components::Base::Ptr rBreaker2 = Resistor::make("rbreak2", 2, 0, breakerRes);
Components::Base::Ptr rBreaker3 = Resistor::make("rbreak3", 3, 0, breakerRes);
Components::Base::List compsBreakerOn = { gen, rBreaker1, rBreaker2, rBreaker3, r1, r2, r3 };
......
......@@ -22,6 +22,7 @@
#include "Simulation.h"
using namespace DPsim;
using namespace DPsim::Components::DP;
int main(int argc, char* argv[])
{
......@@ -57,21 +58,21 @@ int main(int argc, char* argv[])
//Real Llkq2 = 0;
// Declare circuit components
Components::Base::Ptr gen = std::make_shared<Components::DP::SynchronGenerator>("gen", 1, 2, 3,
Components::Base::Ptr gen = SynchronGenerator::make("gen", 1, 2, 3,
nomPower, nomPhPhVoltRMS, nomFreq, poleNum, nomFieldCurr,
Rs, Ll, Lmd, Lmd0, Lmq, Lmq0, Rfd, Llfd, Rkd, Llkd, Rkq1, Llkq1, Rkq2, Llkq2, H);
Real loadRes = 1037.8378;
Components::Base::Ptr r1 = std::make_shared<Components::DP::Resistor>("r1", 1, 0, loadRes);
Components::Base::Ptr r2 = std::make_shared<Components::DP::Resistor>("r2", 2, 0, loadRes);
Components::Base::Ptr r3 = std::make_shared<Components::DP::Resistor>("r3", 3, 0, loadRes);
Components::Base::Ptr r1 = Resistor::make("r1", 1, 0, loadRes);
Components::Base::Ptr r2 = Resistor::make("r2", 2, 0, loadRes);
Components::Base::Ptr r3 = Resistor::make("r3", 3, 0, loadRes);
Components::Base::List comps = { gen, r1, r2, r3 };
// Declare circuit components for resistance change
Real breakerRes = 0.001;
Components::Base::Ptr rBreaker1 = std::make_shared<Components::DP::Resistor>("rbreak1", 1, 0, breakerRes);
Components::Base::Ptr rBreaker2 = std::make_shared<Components::DP::Resistor>("rbreak2", 2, 0, breakerRes);
Components::Base::Ptr rBreaker3 = std::make_shared<Components::DP::Resistor>("rbreak3", 3, 0, breakerRes);
Components::Base::Ptr rBreaker1 = Resistor::make("rbreak1", 1, 0, breakerRes);
Components::Base::Ptr rBreaker2 = Resistor::make("rbreak2", 2, 0, breakerRes);