...
 
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -4,7 +4,7 @@ partial model OnePortGrounded
parameter SI.Voltage Vnom = 110e3 "Nominal phase-to-phase RMS voltage";
ModPowerSystems.Base.Interfaces.ComplexPhasor.SinglePhase.Pin Pin1
ModPowerSystems.Base.Interfaces.ComplexPhasor.SinglePhase.Pin Pin1(v(re(start=Vnom), im(start=0)), i(re(start=0), im(start=0)))
annotation (Placement(transformation(extent={{-10,110},{10,90}})));
// port voltage and current
......@@ -37,11 +37,7 @@ equation
Icon(
coordinateSystem(
preserveAspectRatio=false,
extent={{-100,-100},{100,100}}), graphics={
Text(
extent={{-20,100},{0,80}},
lineColor={0,0,0},
textString="+")}),
extent={{-100,-100},{100,100}})),
Documentation(info="<html>
<p>The model represents a one port where the second pin is connected to the ground:</p>
<p><img src=\"modelica://ModPowerSystems/Resources/Images/OnePortGrounded.png\"/></p>
......
within ModPowerSystems.Base.Interfaces.ComplexPhasor.SinglePhase;
partial model OnePortGroundedCentered
"Shell model for models with one centered electrical connector "
parameter SI.Voltage Vnom = 110e3 "Nominal phase-to-phase RMS voltage";
ModPowerSystems.Base.Interfaces.ComplexPhasor.SinglePhase.Pin Pin1(v(re(start
=Vnom), im(start=0)), i(re(start=0), im(start=0)))
annotation (Placement(transformation(extent={{-10,10},{10,-10}})));
// port voltage and current
Modelica.SIunits.ComplexVoltage v;
Modelica.SIunits.ComplexCurrent i;
// characteristic values
SI.ActivePower P "Consumed Active Power";
SI.ReactivePower Q "Reactive Power";
SI.Voltage V "Voltage RMS phase-to-neutral";
SI.Voltage Vpp "Voltage RMS phase-to-phase";
SI.Current I "Current RMS";
SI.Angle Vangle "Voltage phase";
SI.Angle Iangle "Current phase";
equation
v = Pin1.v;
i = Pin1.i;
V = 'abs'(v);
Vpp = sqrt(3)*'abs'(v);
I = 'abs'(i);
P = 3*real(v*conj(i));
Q = 3*imag(v*conj(i));
Vangle = arg(v);
Iangle = arg(i);
annotation (
Icon(
coordinateSystem(
preserveAspectRatio=false,
extent={{-100,-100},{100,100}})), Documentation(info="<html>
<p>The model represents a one port where the second pin is connected to the ground:</p>
<p><img src=\"modelica://ModPowerSystems/Resources/Images/OnePortGrounded.png\"/></p>
<p>Note that, due to the fact that the second pin does not provide any additional information (voltage is zero and current the same as flowing into the port), it is not included in the model.</p>
</html>"));
end OnePortGroundedCentered;
......@@ -2,4 +2,3 @@ Pin
TwoPin
OnePort
OnePortGrounded
OnePortGroundedCentered
within ModPowerSystems.Base.Interfaces.ComplexPhasor.ThreePhase;
partial model OnePortGroundCentered
"Shell model for models with one centered electrical connector "
parameter Modelica.SIunits.Voltage Vnom = 100e3 "nominal voltage level";
ModPowerSystems.Base.Interfaces.ComplexPhasor.ThreePhase.Plug Plug1
annotation (Placement(transformation(extent={{-10,10},{10,-10}})));
// port voltage and current
SI.ComplexVoltage v[3] "Voltage between Plug1";
SI.ComplexCurrent i[3] "Current flowing from Plug1";
// characteristic values
SI.Voltage V[3] "Voltage RMS phase-to-neutral";
SI.Current I[3] "Current RMS";
equation
v[:] = Plug1.Pins[:].v;
i[:] = Plug1.Pins[:].i;
V[:] = 'abs'(v[:]);
I[:] = 'abs'(i[:]);
annotation (
Icon(
coordinateSystem(
preserveAspectRatio=false,
extent={{-100,-100},{100,100}})), Documentation(info="<html>
<p>The model represents a one port where the second pin is connected to the ground:</p>
<p><img src=\"modelica://ModPowerSystems/Resources/Images/OnePortGrounded.png\"/></p>
<p>Note that, due to the fact that the second pin does not provide any additional information (voltage is zero and current the same as flowing into the port), it is not included in the model.</p>
</html>"));
end OnePortGroundCentered;
......@@ -25,11 +25,7 @@ equation
Icon(
coordinateSystem(
preserveAspectRatio=false,
extent={{-100,-100},{100,100}}), graphics={
Text(
extent={{-20,100},{0,80}},
lineColor={0,0,0},
textString="+")}),
extent={{-100,-100},{100,100}})),
Documentation(info="<html>
<p>The model represents a one port where the second pin is connected to the ground:</p>
<p><img src=\"modelica://ModPowerSystems/Resources/Images/OnePortGrounded.png\"/></p>
......
......@@ -17,11 +17,7 @@ equation
Icon(
coordinateSystem(
preserveAspectRatio=false,
extent={{-100,-100},{100,100}}), graphics={
Text(
extent={{-20,100},{0,80}},
lineColor={0,0,0},
textString="+")}),
extent={{-100,-100},{100,100}})),
Documentation(info="<html>
<p>The model represents a one port where the second pin is connected to the ground:</p>
<p><img src=\"modelica://ModPowerSystems/Resources/Images/OnePortGrounded.png\"/></p>
......
......@@ -17,11 +17,7 @@ equation
Icon(
coordinateSystem(
preserveAspectRatio=false,
extent={{-100,-100},{100,100}}), graphics={
Text(
extent={{-20,100},{0,80}},
lineColor={0,0,0},
textString="+")}),
extent={{-100,-100},{100,100}})),
Documentation(info="<html>
<p>The model represents a one port where the second pin is connected to the ground:</p>
<p><img src=\"modelica://ModPowerSystems/Resources/Images/OnePortGrounded.png\"/></p>
......
within ModPowerSystems.DynPhasorSinglePhase.Basics;
model Capacitor
extends ModPowerSystems.Base.Interfaces.ComplexPhasor.SinglePhase.OnePort;
outer ModPowerSystems.Base.System system;
parameter SI.Capacitance C = 1e-6;
SI.Reactance X = -1/(system.omega*C);
equation
i.re = C*der(v.re) - 1/X * v.im;
i.im = C*der(v.im) + 1/X * v.re;
annotation (Icon(graphics={
Line(points={{-14,0},{-100,0}},
color={0,0,0}),
Line(points={{8,58}}, color={0,0,0}),
Line(points={{100,0},{12,0}},color={0,0,0}),
Rectangle(
extent={{-14,32},{-12,-32}},
lineColor={0,0,0},
lineThickness=1,
fillColor={0,0,0},
fillPattern=FillPattern.Solid),
Rectangle(
extent={{10,32},{12,-32}},
lineColor={0,0,0},
lineThickness=1,
fillColor={0,0,0},
fillPattern=FillPattern.Solid)}));
end Capacitor;
within ModPowerSystems.DynPhasorSinglePhase.Basics;
model Ground
extends
ModPowerSystems.Base.Interfaces.ComplexPhasor.SinglePhase.OnePortGrounded;
equation
v = Complex(0,0);
annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={
Line(points={{-60,0},{60,0}}, color={0,0,0}),
Line(points={{-40,-20},{40,-20}}, color={0,0,0}),
Line(points={{-20,-40},{20,-40}}, color={0,0,0}),
Line(points={{0,96},{0,0}}, color={0,0,0})}), Diagram(coordinateSystem(
preserveAspectRatio=false)));
end Ground;
within ModPowerSystems.DynPhasorSinglePhase.Basics;
model Inductor
extends ModPowerSystems.Base.Interfaces.ComplexPhasor.SinglePhase.OnePort;
outer ModPowerSystems.Base.System system;
parameter SI.Inductance L = 1e-3;
SI.Reactance X = system.omega*L;
equation
v.re = L*der(i.re) - X*i.im;
v.im = L*der(i.im) + X*i.re;
annotation (Icon(graphics={
Line(points={{-40,0},{-98,0}},
color={0,0,0}),
Line(points={{8,58}}, color={0,0,0}),
Line(points={{96,0},{38,0}}, color={0,0,0}),
Rectangle(
extent={{-40,20},{40,-20}},
lineColor={0,0,0},
fillColor={0,0,0},
fillPattern=FillPattern.Solid)}));
end Inductor;
within ModPowerSystems.DynPhasorSinglePhase.Basics;
model Resistor
extends ModPowerSystems.Base.Interfaces.ComplexPhasor.SinglePhase.OnePort;
parameter SI.Resistance R = 1;
equation
v = R*i;
annotation (Icon(graphics={
Rectangle(
extent={{-20,40},{20,-40}},
lineColor={0,0,0},
lineThickness=0.5,
origin={0,0},
rotation=270),
Line(points={{8,58}}, color={0,0,0}),
Line(points={{40,0},{100,0}},color={0,0,0}),
Line(points={{-54,-34}}, color={0,0,0}),
Line(points={{-100,0},{-40,0}},
color={0,0,0})}));
end Resistor;
within ModPowerSystems.DynPhasorSinglePhase.Basics;
model VoltageSource "infinite power source"
extends ModPowerSystems.Base.Interfaces.ComplexPhasor.SinglePhase.OnePort;
parameter SI.Voltage Vnom = 10 "Voltage phase-to-neutral RMS amplitude";
parameter SI.Angle phiV = 0 "Initial Voltage Angle";
equation
v = Complex(Vnom*cos(phiV), Vnom*sin(phiV));
annotation (
Icon(coordinateSystem(
preserveAspectRatio=false,
extent={{-100,-100},{100,100}},
grid={2,2}), graphics={ Ellipse(extent={{
40,40},{-40,-40}}, lineColor={0,0,0},
origin={0,0},
rotation=360),
Text(
extent={{38,-32},{-38,32}},
lineColor={0,0,0},
fillColor={0,0,0},
fillPattern=FillPattern.Solid,
textString="~",
origin={0,0},
rotation=360),
Line(points={{-100,0},{-40,0}}, color={0,0,0}),
Line(points={{40,0},{100,0}}, color={0,0,0})}),
Diagram(coordinateSystem(preserveAspectRatio=
false, extent={{-100,-100},{100,100}})));
end VoltageSource;
within ModPowerSystems.DynPhasorSinglePhase;
package Base
package Basics
extends Modelica.Icons.Package;
end Base;
end Basics;
Capacitor
Ground
Inductor
Ground
VoltageSource
Capacitor
Resistor
VoltageSource
\ No newline at end of file
within ModPowerSystems.DynPhasorSinglePhase.Examples.BasicCircuits;
model VoltageSource_RL
import ModPowerSystems;
inner ModPowerSystems.Base.System system
annotation (Placement(transformation(extent={{-100,80},{-80,100}})));
ModPowerSystems.DynPhasorSinglePhase.Basics.VoltageSource voltageSource
annotation (Placement(transformation(extent={{-42,6},{-22,26}})));
ModPowerSystems.DynPhasorSinglePhase.Basics.Resistor resistor(R=1)
annotation (Placement(transformation(
extent={{10,-10},{-10,10}},
rotation=0,
origin={-4,16})));
ModPowerSystems.DynPhasorSinglePhase.Basics.Ground ground
annotation (Placement(transformation(extent={{-62,-36},{-42,-16}})));
ModPowerSystems.DynPhasorSinglePhase.Basics.Inductor inductor(L=0.001)
annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=90,
origin={14,0})));
ModPowerSystems.DynPhasorSinglePhase.Basics.Ground ground3
annotation (Placement(transformation(extent={{4,-38},{24,-18}})));
equation
connect(resistor.Pin1, inductor.Pin2)
annotation (Line(points={{6,16},{14,16},{14,10}}, color={0,0,0}));
connect(ground.Pin1, voltageSource.Pin1) annotation (Line(points={{-52,-16},{
-52,-16},{-52,16},{-42,16}}, color={0,0,0}));
connect(inductor.Pin1, ground3.Pin1)
annotation (Line(points={{14,-10},{14,-14},{14,-18}}, color={0,0,0}));
connect(voltageSource.Pin2, resistor.Pin2)
annotation (Line(points={{-22,16},{-18,16},{-14,16}}, color={0,0,0}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)),
experiment(StopTime=0.2, Interval=5e-005));
end VoltageSource_RL;
within ModPowerSystems.DynPhasorSinglePhase.Examples.BasicCircuits;
model VoltageSource_RLC
import ModPowerSystems;
inner ModPowerSystems.Base.System system
annotation (Placement(transformation(extent={{-100,80},{-80,100}})));
ModPowerSystems.DynPhasorSinglePhase.Basics.VoltageSource voltageSource
annotation (Placement(transformation(extent={{-42,6},{-22,26}})));
ModPowerSystems.DynPhasorSinglePhase.Basics.Resistor resistor annotation (
Placement(transformation(
extent={{10,-10},{-10,10}},
rotation=-90,
origin={-8,0})));
ModPowerSystems.DynPhasorSinglePhase.Basics.Ground ground
annotation (Placement(transformation(extent={{-62,-36},{-42,-16}})));
ModPowerSystems.DynPhasorSinglePhase.Basics.Capacitor capacitor annotation (
Placement(transformation(
extent={{10,-10},{-10,10}},
rotation=-90,
origin={34,0})));
ModPowerSystems.DynPhasorSinglePhase.Basics.Ground ground2
annotation (Placement(transformation(extent={{24,-38},{44,-18}})));
ModPowerSystems.DynPhasorSinglePhase.Basics.Ground ground1
annotation (Placement(transformation(extent={{-18,-38},{2,-18}})));
ModPowerSystems.DynPhasorSinglePhase.Basics.Inductor inductor annotation (
Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=90,
origin={14,0})));
ModPowerSystems.DynPhasorSinglePhase.Basics.Ground ground3
annotation (Placement(transformation(extent={{4,-38},{24,-18}})));
equation
connect(voltageSource.Pin1, ground.Pin1)
annotation (Line(points={{-42,16},{-52,16},{-52,-16}}, color={0,0,0}));
connect(inductor.Pin1, ground3.Pin1)
annotation (Line(points={{14,-10},{14,-10},{14,-18}}, color={0,0,0}));
connect(resistor.Pin1, ground1.Pin1)
annotation (Line(points={{-8,-10},{-8,-14},{-8,-18}}, color={0,0,0}));
connect(capacitor.Pin1, ground2.Pin1)
annotation (Line(points={{34,-10},{34,-18},{34,-18}}, color={0,0,0}));
connect(voltageSource.Pin2, resistor.Pin2)
annotation (Line(points={{-22,16},{-8,16},{-8,10}}, color={0,0,0}));
connect(inductor.Pin2, resistor.Pin2) annotation (Line(points={{14,10},{14,10},{
14,16},{-8,16},{-8,10}}, color={0,0,0}));
connect(capacitor.Pin2, resistor.Pin2) annotation (Line(points={{34,10},{34,10},{
34,16},{-8,16},{-8,10}}, color={0,0,0}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)));
end VoltageSource_RLC;
within ModPowerSystems.DynPhasorSinglePhase.Examples;
package Basic
package BasicCircuits
extends Modelica.Icons.ExamplesPackage;
end Basic;
end BasicCircuits;
within ModPowerSystems.DynPhasorThreePhase.Basics;
model Capacitor
extends ModPowerSystems.Base.Interfaces.ComplexPhasor.ThreePhase.OnePort;
outer ModPowerSystems.Base.System system;
parameter SI.Capacitance C[3] = {1e-6,1e-6,1e-6};
SI.Reactance X[3] = -ones(3)./(system.omega*C[:]);
equation
v[:] = j*X[:].*i[:];
annotation (Icon(graphics={
Line(points={{-14,0},{-100,0}},
color={0,0,0}),
Line(points={{8,58}}, color={0,0,0}),
Line(points={{100,0},{12,0}},color={0,0,0}),
Rectangle(
extent={{-14,32},{-12,-32}},
lineColor={0,0,0},
lineThickness=1,
fillColor={0,0,0},
fillPattern=FillPattern.Solid),
Rectangle(
extent={{10,32},{12,-32}},
lineColor={0,0,0},
lineThickness=1,
fillColor={0,0,0},
fillPattern=FillPattern.Solid)}));
end Capacitor;
within ModPowerSystems.DynPhasorThreePhase.Basics;
model Ground
extends
ModPowerSystems.Base.Interfaces.ComplexPhasor.ThreePhase.OnePortGrounded;
equation
v[:].re = zeros(3);
v[:].im = zeros(3);
annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={
Line(points={{-40,40},{40,40}},
color={0,0,0}),
Line(points={{-30,30},{30,30}}, color={0,0,0}),
Line(points={{-20,20},{20,20}}, color={0,0,0}),
Line(points={{0,96},{0,40}},color={0,0,0})}), Diagram(coordinateSystem(
preserveAspectRatio=false)),
Icon(graphics={
Line(points={{-10,30},{30,30}}, color={0,0,0}),
Line(points={{-10,30},{30,30}}, color={0,0,0}),
Line(points={{-10,30},{30,30}}, color={0,0,0}),
Line(
points={{-10,10},{10,10}},
color={0,0,0},
thickness=0.5),
Line(
points={{-32,10},{18,-22}},
color={0,0,0},
thickness=0.5)}));
end Ground;
within ModPowerSystems.DynPhasorThreePhase.Basics;
model Inductor
extends ModPowerSystems.Base.Interfaces.ComplexPhasor.ThreePhase.OnePort;
outer ModPowerSystems.Base.System system;
parameter SI.Inductance L[3] = {1e-3,1e-3,1e-3};
SI.Reactance X[3] = system.omega*L[:];
equation
v[:].re = L[:].*der(i[:].re) - X[:].*i[:].im;
v[:].im = L[:].*der(i[:].im) + X[:].*i[:].re;
annotation (Icon(graphics={
Line(points={{-40,0},{-98,0}},
color={0,0,0}),
Line(points={{8,58}}, color={0,0,0}),
Line(points={{96,0},{38,0}}, color={0,0,0}),
Rectangle(
extent={{-40,20},{40,-20}},
lineColor={0,0,0},
fillColor={0,0,0},
fillPattern=FillPattern.Solid)}));
end Inductor;
within ModPowerSystems.DynPhasorThreePhase.Basics;
model Resistor
extends ModPowerSystems.Base.Interfaces.ComplexPhasor.ThreePhase.OnePort;
parameter SI.Resistance R[3] = {1,1,1};
equation
v[1] = R[1]*i[1];
v[2] = R[2]*i[2];
v[3] = R[3]*i[3];
annotation (Icon(graphics={
Rectangle(
extent={{-20,40},{20,-40}},
lineColor={0,0,0},
lineThickness=0.5,
origin={0,0},
rotation=270),
Line(points={{8,58}}, color={0,0,0}),
Line(points={{40,0},{100,0}},color={0,0,0}),
Line(points={{-54,-34}}, color={0,0,0}),
Line(points={{-100,0},{-40,0}},
color={0,0,0})}));
end Resistor;
within ModPowerSystems.DynPhasorThreePhase.Basics;
model VoltageSource "infinite power source"
extends ModPowerSystems.Base.Interfaces.ComplexPhasor.ThreePhase.OnePort;
parameter SI.Voltage Vnom = 10 "Voltage phase-to-neutral RMS amplitude";
parameter SI.Angle phiV = 0 "Initial voltage angle";
constant SI.Angle[3] ThreePhaseShift = (0:2)*2*pi/3 "Phase shift";
equation
v[1] = Complex(Vnom*cos(phiV), Vnom*sin(phiV));
v[2] = Complex(Vnom*cos(phiV - ThreePhaseShift[2]), Vnom*sin(phiV - ThreePhaseShift[2]));
v[3] = Complex(Vnom*cos(phiV - ThreePhaseShift[3]), Vnom*sin(phiV - ThreePhaseShift[3]));
annotation (
Icon(coordinateSystem(
preserveAspectRatio=false,
extent={{-100,-100},{100,100}},
grid={2,2}), graphics={ Ellipse(extent={{
40,40},{-40,-40}}, lineColor={0,0,0},
origin={0,0},
rotation=360),
Text(
extent={{38,-32},{-38,32}},
lineColor={0,0,0},
fillColor={0,0,0},
fillPattern=FillPattern.Solid,
textString="~",
origin={0,0},
rotation=360),
Line(points={{-100,0},{-40,0}}, color={0,0,0}),
Line(points={{40,0},{100,0}}, color={0,0,0})}),
Diagram(coordinateSystem(preserveAspectRatio=
false, extent={{-100,-100},{100,100}})));
end VoltageSource;
within ModPowerSystems.DynPhasorThreePhase;
package Base
package Basics
extends Modelica.Icons.Package;
end Base;
end Basics;
Inductor
Ground
Resistor
Capacitor
VoltageSource
within ModPowerSystems.DynPhasorThreePhase.Examples.BasicCircuits;
model VoltageSource_RL
import ModPowerSystems;
inner ModPowerSystems.Base.System system
annotation (Placement(transformation(extent={{-100,80},{-80,100}})));
ModPowerSystems.DynPhasorThreePhase.Basics.VoltageSource voltageSource
annotation (Placement(transformation(extent={{-42,6},{-22,26}})));
ModPowerSystems.DynPhasorThreePhase.Basics.Resistor resistor annotation (
Placement(transformation(
extent={{10,-10},{-10,10}},
rotation=0,
origin={-4,16})));
ModPowerSystems.DynPhasorThreePhase.Basics.Ground ground
annotation (Placement(transformation(extent={{-62,-36},{-42,-16}})));
ModPowerSystems.DynPhasorThreePhase.Basics.Inductor inductor(L={1e-3,1e-3,
1e-3}) annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=90,
origin={14,0})));
ModPowerSystems.DynPhasorThreePhase.Basics.Ground ground3
annotation (Placement(transformation(extent={{4,-38},{24,-18}})));
equation
connect(resistor.Plug1, inductor.Plug2)
annotation (Line(points={{6,16},{14,16},{14,10}}, color={0,0,0}));
connect(ground.Plug1, voltageSource.Plug1) annotation (Line(points={{-52,-16},{
-52,-16},{-52,16},{-42,16}}, color={0,0,0}));
connect(inductor.Plug1, ground3.Plug1)
annotation (Line(points={{14,-10},{14,-14},{14,-18}}, color={0,0,0}));
connect(voltageSource.Plug2, resistor.Plug2)
annotation (Line(points={{-22,16},{-18,16},{-14,16}}, color={0,0,0}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)));
end VoltageSource_RL;
within ModPowerSystems.DynPhasorThreePhase.Examples.BasicCircuits;
model VoltageSource_RLC
inner ModPowerSystems.Base.System system
annotation (Placement(transformation(extent={{-100,80},{-80,100}})));
ModPowerSystems.DynPhasorThreePhase.Basics.VoltageSource voltageSource
annotation (Placement(transformation(extent={{-42,6},{-22,26}})));
ModPowerSystems.DynPhasorThreePhase.Basics.Resistor resistor annotation (
Placement(transformation(
extent={{10,-10},{-10,10}},
rotation=-90,
origin={-8,0})));
ModPowerSystems.DynPhasorThreePhase.Basics.Ground ground
annotation (Placement(transformation(extent={{-62,-36},{-42,-16}})));
ModPowerSystems.DynPhasorThreePhase.Basics.Capacitor capacitor annotation (
Placement(transformation(
extent={{10,-10},{-10,10}},
rotation=-90,
origin={34,0})));
ModPowerSystems.DynPhasorThreePhase.Basics.Ground ground2
annotation (Placement(transformation(extent={{24,-38},{44,-18}})));
ModPowerSystems.DynPhasorThreePhase.Basics.Ground ground1
annotation (Placement(transformation(extent={{-18,-38},{2,-18}})));
ModPowerSystems.DynPhasorThreePhase.Basics.Inductor inductor annotation (
Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=90,
origin={14,0})));
ModPowerSystems.DynPhasorThreePhase.Basics.Ground ground3
annotation (Placement(transformation(extent={{4,-38},{24,-18}})));
equation
connect(voltageSource.Plug1, ground.Plug1)
annotation (Line(points={{-42,16},{-52,16},{-52,-16}}, color={0,0,0}));
connect(inductor.Plug1, ground3.Plug1)
annotation (Line(points={{14,-10},{14,-10},{14,-18}}, color={0,0,0}));
connect(resistor.Plug1, ground1.Plug1)
annotation (Line(points={{-8,-10},{-8,-14},{-8,-18}}, color={0,0,0}));
connect(capacitor.Plug1, ground2.Plug1)
annotation (Line(points={{34,-10},{34,-18},{34,-18}}, color={0,0,0}));
connect(voltageSource.Plug2, resistor.Plug2)
annotation (Line(points={{-22,16},{-8,16},{-8,10}}, color={0,0,0}));
connect(inductor.Plug2, resistor.Plug2) annotation (Line(points={{14,10},{14,10},{
14,16},{-8,16},{-8,10}}, color={0,0,0}));
connect(capacitor.Plug2, resistor.Plug2) annotation (Line(points={{34,10},{34,10},{
34,16},{-8,16},{-8,10}}, color={0,0,0}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)));
end VoltageSource_RLC;
within ModPowerSystems.DynPhasorThreePhase.Examples;
package Basic
package BasicCircuits
extends Modelica.Icons.Package;
end Basic;
end BasicCircuits;
within ModPowerSystems.EmtSinglePhase.Basics;
model Capacitor
extends ModPowerSystems.Base.Interfaces.RealValue.SinglePhase.OnePort;
parameter SI.Capacitance C = 1e-6;
initial equation
// use this only if the simulation should start with a transient
//v = 0;
equation
C*der(v) = i;
annotation (Icon(graphics={
Line(points={{-14,0},{-100,0}},
color={0,0,0}),
Line(points={{8,58}}, color={0,0,0}),
Line(points={{100,0},{12,0}},color={0,0,0}),
Rectangle(
extent={{-14,32},{-12,-32}},
lineColor={0,0,0},
lineThickness=1,
fillColor={0,0,0},
fillPattern=FillPattern.Solid),
Rectangle(
extent={{10,32},{12,-32}},
lineColor={0,0,0},
lineThickness=1,
fillColor={0,0,0},
fillPattern=FillPattern.Solid)}));
end Capacitor;
within ModPowerSystems.EmtSinglePhase.Basics;
model Ground
extends ModPowerSystems.Base.Interfaces.RealValue.SinglePhase.OnePortGrounded;
equation
v = 0;
annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={
Line(points={{-60,0},{60,0}}, color={0,0,0}),
Line(points={{-40,-20},{40,-20}}, color={0,0,0}),
Line(points={{-20,-40},{20,-40}}, color={0,0,0}),
Line(points={{0,96},{0,0}}, color={0,0,0})}), Diagram(coordinateSystem(
preserveAspectRatio=false)));
end Ground;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
within ModPowerSystems.EmtSinglePhase;
package Base
package Basics
extends Modelica.Icons.Package;
end Base;
end Basics;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.