diff --git a/Modelica/Electrical/Polyphase/Basic/Capacitor.mo b/Modelica/Electrical/Polyphase/Basic/Capacitor.mo index 5205fbd234..65d6b2e689 100644 --- a/Modelica/Electrical/Polyphase/Basic/Capacitor.mo +++ b/Modelica/Electrical/Polyphase/Basic/Capacitor.mo @@ -1,8 +1,10 @@ within Modelica.Electrical.Polyphase.Basic; model Capacitor "Ideal linear electrical capacitors" - extends Interfaces.TwoPlug(v(start=zeros(m), fixed=fill(false,m))); + extends Interfaces.TwoPlug; parameter SI.Capacitance C[m](start=fill(1, m)) "Capacitance"; + SI.Voltage vC[m](start=zeros(m), fixed=fill(false,m))=v "Capacitor voltages" + annotation(Dialog(showStartAttribute=true)); Modelica.Electrical.Analog.Basic.Capacitor capacitor[m](final C=C) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); equation diff --git a/Modelica/Electrical/Polyphase/Basic/Inductor.mo b/Modelica/Electrical/Polyphase/Basic/Inductor.mo index af5ae6eed6..278055ff9d 100644 --- a/Modelica/Electrical/Polyphase/Basic/Inductor.mo +++ b/Modelica/Electrical/Polyphase/Basic/Inductor.mo @@ -1,7 +1,9 @@ within Modelica.Electrical.Polyphase.Basic; model Inductor "Ideal linear electrical inductors" - extends Interfaces.TwoPlug(i(start=zeros(m), fixed=fill(false,m))); + extends Interfaces.TwoPlug; parameter SI.Inductance L[m](start=fill(1, m)) "Inductance"; + SI.Current iL[m](start=zeros(m), fixed=fill(false,m))=i "Inductor currents" + annotation(Dialog(showStartAttribute=true)); Modelica.Electrical.Analog.Basic.Inductor inductor[m](final L=L) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); equation diff --git a/Modelica/Electrical/Polyphase/Examples/TransformerYY.mo b/Modelica/Electrical/Polyphase/Examples/TransformerYY.mo index 3fbd7a0352..9e3649db86 100644 --- a/Modelica/Electrical/Polyphase/Examples/TransformerYY.mo +++ b/Modelica/Electrical/Polyphase/Examples/TransformerYY.mo @@ -41,7 +41,7 @@ model TransformerYY "Test example with polyphase components" Basic.Resistor transformerR(m=m, R=fill(RT, m)) annotation (Placement( transformation(extent={{0,10},{20,30}}))); Basic.Inductor transformerL(m=m, L=fill(LT, m), - i(start=zeros(m), fixed=cat(1,fill(true,m-1),{false}))) annotation (Placement( + iL(start=zeros(m), fixed=cat(1,fill(true,m-1),{false}))) annotation (Placement( transformation(extent={{30,10},{50,30}}))); Basic.Resistor loadR(m=m, R=fill(RL, m)) annotation (Placement( transformation(extent={{70,10},{90,30}}))); @@ -94,7 +94,7 @@ If this is not the case, you have to write the code manually:
Modelica.Electrical.PolyPhase.Basic.Inductor transformerL(m=m, L=fill(LT, m),
- i(start=zeros(m), fixed=cat(1,fill(true,m-1),{false})));
+ iL(start=zeros(m), fixed=cat(1,fill(true,m-1),{false})));