This package hosts basic models for quasi stationary multiphase circuits. Quasi stationary theory can be found in the references.
Extends from Modelica.Icons.Package (Icon for standard packages).
Name | Description |
---|---|
Star | Star connection |
Delta | Delta (polygon) connection |
PlugToPin_p | Connect one (positive) pin |
PlugToPin_n | Connect one (negative) pin |
PlugToPins_p | Connect all (positive) pins |
PlugToPins_n | Connect all (negative) pins |
Resistor | Multiphase linear resistor |
Conductor | Multiphase linear conductor |
Capacitor | Multiphase linear capacitor |
Inductor | Multiphase linear inductor |
VariableResistor | Multiphase variable resistor |
VariableConductor | Multiphase variable conductor |
VariableCapacitor | Multiphase variable capacitor |
VariableInductor | Multiphase variable inductor |
Star (wye) connection of a multi phase circuit. The potentials at the star points are the same.
Type | Name | Default | Description |
---|---|---|---|
Integer | m | 3 | Number of phases |
Type | Name | Description |
---|---|---|
PositivePlug | plug_p | |
NegativePin | pin_n |
model Star "Star connection" parameter Integer m(final min=1) = 3 "Number of phases";Interfaces.PositivePlug plug_p(final m=m); QuasiStationary.SinglePhase.Interfaces.NegativePin pin_n; PlugToPins_p plugToPins_p; equation for j in 1:m loop connect(plugToPins_p.pin_p[j], pin_n); end for;connect(plug_p, plugToPins_p.plug_p); end Star;
Delta (polygon) connection of a multi phase circuit.
Type | Name | Default | Description |
---|---|---|---|
Integer | m | 3 | Number of phases |
Type | Name | Description |
---|---|---|
PositivePlug | plug_p | |
NegativePlug | plug_n |
model Delta "Delta (polygon) connection" parameter Integer m(final min=2) = 3 "Number of phases";Interfaces.PositivePlug plug_p(final m=m); Interfaces.NegativePlug plug_n(final m=m); PlugToPins_p plugToPins_p; PlugToPins_n plugToPins_n; equation for j in 1:m loop if j<m then connect(plugToPins_p.pin_p[j], plugToPins_n.pin_n[j+1]); else connect(plugToPins_p.pin_p[j], plugToPins_n.pin_n[1]); end if; end for;connect(plug_p, plugToPins_p.plug_p); connect(plugToPins_n.plug_n, plug_n); end Delta;
Connects the single phase (positive) pin k of the multi phase (positive) plug to a single phase (positive) pin.
PlugToPin_n, PlutToPins_p, PlugToPins_n
Type | Name | Default | Description |
---|---|---|---|
Integer | m | 3 | Number of phases |
Integer | k | 1 | Phase index |
Type | Name | Description |
---|---|---|
PositivePlug | plug_p | |
PositivePin | pin_p |
model PlugToPin_p "Connect one (positive) pin" parameter Integer m(final min=1) = 3 "Number of phases"; parameter Integer k( final min=1, final max=m) = 1 "Phase index";Interfaces.PositivePlug plug_p(final m=m); QuasiStationary.SinglePhase.Interfaces.PositivePin pin_p; equation Connections.branch(plug_p.reference, pin_p.reference); //Connections.potentialRoot(plug_p.reference); //Connections.potentialRoot(pin_p.reference); plug_p.reference.gamma = pin_p.reference.gamma; pin_p.v = plug_p.pin[k].v; for j in 1:m loop plug_p.pin[j].i = if j == k then -pin_p.i else Complex(0); end for;end PlugToPin_p;
Connects the single phase (negative) pin k of the multi phase (negative) plug to a single phase (negative) pin.
PlugToPin_p, PlutToPins_p, PlugToPins_n
Type | Name | Default | Description |
---|---|---|---|
Integer | m | 3 | Number of phases |
Integer | k | 1 | Phase index |
Type | Name | Description |
---|---|---|
NegativePlug | plug_n | |
NegativePin | pin_n |
model PlugToPin_n "Connect one (negative) pin" parameter Integer m(final min=1) = 3 "Number of phases"; parameter Integer k( final min=1, final max=m) = 1 "Phase index";Interfaces.NegativePlug plug_n(final m=m); QuasiStationary.SinglePhase.Interfaces.NegativePin pin_n; equation Connections.branch(plug_n.reference, pin_n.reference); //Connections.potentialRoot(plug_n.reference); //Connections.potentialRoot(pin_n.reference); plug_n.reference.gamma = pin_n.reference.gamma; pin_n.v = plug_n.pin[k].v; for j in 1:m loop plug_n.pin[j].i = if j == k then -pin_n.i else Complex(0); end for;end PlugToPin_n;
Connects all m single phase (positive) pins of the multi phase (positive) plug to an array of m single phase (positive) pins.
PlugToPin_p, PlugToPin_n, PlugToPins_n
Type | Name | Default | Description |
---|---|---|---|
Integer | m | 3 | number of phases |
Type | Name | Description |
---|---|---|
PositivePlug | plug_p | |
PositivePin | pin_p[m] |
model PlugToPins_p "Connect all (positive) pins" parameter Integer m(final min=1) = 3 "number of phases";Interfaces.PositivePlug plug_p(final m=m); QuasiStationary.SinglePhase.Interfaces.PositivePin pin_p[m]; PlugToPin_p plugToPin_p[m](each final m=m, final k={j for j in 1:m}); equation for j in 1:m loop /* Connections.branch(plug_p.reference, pin_p[j].reference); plug_p.reference.gamma = pin_p[j].reference.gamma; plug_p.pin[j].v = pin_p[j].v; plug_p.pin[j].i = -pin_p[j].i; */ connect(plug_p, plugToPin_p[j].plug_p); connect(plugToPin_p[j].pin_p, pin_p[j]); end for;end PlugToPins_p;
Connects all m single phase (negative) pins of the multi phase (negative) plug to an array of m single phase (negative) pins.
PlugToPin_p, PlugToPin_n, PlugToPins_p
Type | Name | Default | Description |
---|---|---|---|
Integer | m | 3 | number of phases |
Type | Name | Description |
---|---|---|
NegativePlug | plug_n | |
NegativePin | pin_n[m] |
model PlugToPins_n "Connect all (negative) pins" parameter Integer m(final min=1) = 3 "number of phases";Interfaces.NegativePlug plug_n(final m=m); QuasiStationary.SinglePhase.Interfaces.NegativePin pin_n[m]; PlugToPin_n plugToPin_n[m](each final m=m, final k={j for j in 1:m}); equation for j in 1:m loop /* Connections.branch(plug_n.reference, pin_n[j].reference); plug_n.reference.gamma = pin_n[j].reference.gamma; plug_n.pin[j].v = pin_n[j].v; plug_n.pin[j].i = -pin_n[j].i; */ connect(plug_n, plugToPin_n[j].plug_n); connect(plugToPin_n[j].pin_n, pin_n[j]); end for;end PlugToPins_n;
The linear resistor connects the complex voltages v with the complex currents i by i*R = v, using m single phase Resistors.
The resistor model also has m optional conditional heat ports. A linear temperature dependency of the resistances for enabled heat ports is also taken into account.
Resistor, Conductor, Capacitor, Inductor, Variable resistor, Variable conductor, Variable capacitor, Variable inductor
Extends from Interfaces.TwoPlug (Two plugs with pin-adapter), Modelica.Electrical.MultiPhase.Interfaces.ConditionalHeatPort (Partial model to include conditional HeatPorts in order to describe the power loss via a thermal network).
Type | Name | Default | Description |
---|---|---|---|
Integer | m | 3 | Number of phases |
Resistance | R_ref[m] | Reference resistances at T_ref [Ohm] | |
Temperature | T_ref[m] | fill(293.15, m) | Reference temperatures [K] |
LinearTemperatureCoefficient | alpha_ref[m] | zeros(m) | Temperature coefficient of resistance (R_actual = R_ref*(1 + alpha_ref*(heatPort.T - T_ref)) [1/K] |
Integer | mh | m | Number of heatPorts=number of phases |
Boolean | useHeatPort | false | =true, if all HeatPorts are enabled |
Temperature | T[mh] | T_ref | Fixed device temperatures if useHeatPort = false [K] |
Type | Name | Description |
---|---|---|
PositivePlug | plug_p | |
NegativePlug | plug_n | |
HeatPort_a | heatPort[mh] |
model Resistor "Multiphase linear resistor" extends Interfaces.TwoPlug; parameter Modelica.SIunits.Resistance R_ref[m](start=fill(1,m)) "Reference resistances at T_ref"; parameter Modelica.SIunits.Temperature T_ref[m]=fill(293.15,m) "Reference temperatures"; parameter Modelica.SIunits.LinearTemperatureCoefficient alpha_ref[m]=zeros(m) "Temperature coefficient of resistance (R_actual = R_ref*(1 + alpha_ref*(heatPort.T - T_ref))"; extends Modelica.Electrical.MultiPhase.Interfaces.ConditionalHeatPort(final mh=m, T=T_ref);QuasiStationary.SinglePhase.Basic.Resistor resistor[ m]( final R_ref=R_ref, final T_ref=T_ref, final alpha_ref=alpha_ref, each final useHeatPort=useHeatPort, final T=T); equationconnect(plugToPins_p.pin_p, resistor.pin_p); connect(resistor.pin_n, plugToPins_n.pin_n); connect(resistor.heatPort, heatPort); end Resistor;
The linear resistor connects the complex currents i with the complex voltages v by v*G = i, using m single phase Conductors.
The conductor model also has m optional conditional heat ports. A linear temperature dependency of the conductances for enabled heat ports is also taken into account.
Conductor, Resistor, Capacitor, Inductor, Variable resistor, Variable conductor, Variable capacitor, Variable inductor
Extends from Interfaces.TwoPlug (Two plugs with pin-adapter), Modelica.Electrical.MultiPhase.Interfaces.ConditionalHeatPort (Partial model to include conditional HeatPorts in order to describe the power loss via a thermal network).
Type | Name | Default | Description |
---|---|---|---|
Integer | m | 3 | Number of phases |
Conductance | G_ref[m] | Reference conductances at T_ref [S] | |
Temperature | T_ref[m] | fill(293.15, m) | Reference temperatures [K] |
LinearTemperatureCoefficient | alpha_ref[m] | zeros(m) | Temperature coefficient of conductance (G_actual = G_ref/(1 + alpha_ref*(heatPort.T - T_ref)) [1/K] |
Integer | mh | m | Number of heatPorts=number of phases |
Boolean | useHeatPort | false | =true, if all HeatPorts are enabled |
Temperature | T[mh] | T_ref | Fixed device temperatures if useHeatPort = false [K] |
Type | Name | Description |
---|---|---|
PositivePlug | plug_p | |
NegativePlug | plug_n | |
HeatPort_a | heatPort[mh] |
model Conductor "Multiphase linear conductor" extends Interfaces.TwoPlug; parameter Modelica.SIunits.Conductance G_ref[m](start=fill(1,m)) "Reference conductances at T_ref"; parameter Modelica.SIunits.Temperature T_ref[m]=fill(293.15,m) "Reference temperatures"; parameter Modelica.SIunits.LinearTemperatureCoefficient alpha_ref[m]=zeros(m) "Temperature coefficient of conductance (G_actual = G_ref/(1 + alpha_ref*(heatPort.T - T_ref))"; extends Modelica.Electrical.MultiPhase.Interfaces.ConditionalHeatPort(final mh=m, T=T_ref);QuasiStationary.SinglePhase.Basic.Conductor conductor[ m]( final G_ref=G_ref, final T_ref=T_ref, final alpha_ref=alpha_ref, each final useHeatPort=useHeatPort, final T=T); equationconnect(plugToPins_p.pin_p, conductor.pin_p); connect(conductor.pin_n, plugToPins_n.pin_n); connect(conductor.heatPort, heatPort); end Conductor;
The linear capacitor connects the complex currents i with the complex voltages v by v*j*ω*C = i, using m single phase Capacitors.
Capacitor, Resistor, Conductor, Inductor, Variable resistor, Variable conductor, Variable capacitor, Variable inductor
Extends from Interfaces.TwoPlug (Two plugs with pin-adapter).
Type | Name | Default | Description |
---|---|---|---|
Integer | m | 3 | Number of phases |
Capacitance | C[m] | Capacitances [F] |
Type | Name | Description |
---|---|---|
PositivePlug | plug_p | |
NegativePlug | plug_n |
model Capacitor "Multiphase linear capacitor" extends Interfaces.TwoPlug; parameter Modelica.SIunits.Capacitance C[m](start=fill(1,m)) "Capacitances";QuasiStationary.SinglePhase.Basic.Capacitor capacitor[ m](final C=C); equationconnect(plugToPins_p.pin_p, capacitor.pin_p); connect(capacitor.pin_n, plugToPins_n.pin_n); end Capacitor;
The linear inductor connects the complex voltages v with the complex currents i by i*j*ω*L = v, using m single phase Inductors.
Inductor, Resistor, Conductor, Capacitor, Variable resistor, Variable conductor, Variable capacitor, Variable inductor
Extends from Interfaces.TwoPlug (Two plugs with pin-adapter).
Type | Name | Default | Description |
---|---|---|---|
Integer | m | 3 | Number of phases |
Inductance | L[m] | Inductances [H] |
Type | Name | Description |
---|---|---|
PositivePlug | plug_p | |
NegativePlug | plug_n |
model Inductor "Multiphase linear inductor" extends Interfaces.TwoPlug; parameter Modelica.SIunits.Inductance L[m](start=fill(1,m)) "Inductances";QuasiStationary.SinglePhase.Basic.Inductor inductor[ m](final L=L); equationconnect(plugToPins_p.pin_p, inductor.pin_p); connect(inductor.pin_n, plugToPins_n.pin_n); end Inductor;
The linear resistor connects the complex voltages v with the complex currents i by i*R = v, using m single phase variable Resistors. The resistances R are given as m input signals.
The resistor model also has m optional conditional heat ports. A linear temperature dependency of the resistances for enabled heat ports is also taken into account.
VariableResistor, Resistor, Conductor, Capacitor, Inductor, Variable conductor, Variable capacitor, Variable inductor
Extends from Interfaces.TwoPlug (Two plugs with pin-adapter), Modelica.Electrical.MultiPhase.Interfaces.ConditionalHeatPort (Partial model to include conditional HeatPorts in order to describe the power loss via a thermal network).
Type | Name | Default | Description |
---|---|---|---|
Integer | m | 3 | Number of phases |
Temperature | T_ref[m] | fill(293.15, m) | Reference temperatures [K] |
LinearTemperatureCoefficient | alpha_ref[m] | zeros(m) | Temperature coefficient of resistance (R_actual = R_ref*(1 + alpha_ref*(heatPort.T - T_ref)) [1/K] |
Integer | mh | m | Number of heatPorts=number of phases |
Boolean | useHeatPort | false | =true, if all HeatPorts are enabled |
Temperature | T[mh] | T_ref | Fixed device temperatures if useHeatPort = false [K] |
Type | Name | Description |
---|---|---|
PositivePlug | plug_p | |
NegativePlug | plug_n | |
HeatPort_a | heatPort[mh] | |
input RealInput | R_ref[m] |
model VariableResistor "Multiphase variable resistor" extends Interfaces.TwoPlug; parameter Modelica.SIunits.Temperature T_ref[m]=fill(293.15,m) "Reference temperatures"; parameter Modelica.SIunits.LinearTemperatureCoefficient alpha_ref[m]=zeros(m) "Temperature coefficient of resistance (R_actual = R_ref*(1 + alpha_ref*(heatPort.T - T_ref))"; extends Modelica.Electrical.MultiPhase.Interfaces.ConditionalHeatPort(final mh=m, T=T_ref);Modelica.Blocks.Interfaces.RealInput R_ref[m]; QuasiStationary.SinglePhase.Basic.VariableResistor variableResistor[ m]( final T_ref=T_ref, final alpha_ref=alpha_ref, each final useHeatPort=useHeatPort, final T=T); equationconnect(variableResistor.pin_p, plugToPins_p.pin_p); connect(variableResistor.pin_n, plugToPins_n.pin_n); connect(variableResistor.heatPort, heatPort); connect(R_ref, variableResistor.R_ref); end VariableResistor;
The linear resistor connects the complex currents i with the complex voltages v by v*G = i, using m single phase variable Conductors. The conductances G are given as m input signals.
The conductor model also has m optional conditional heat ports. A linear temperature dependency of the conductances for enabled heat ports is also taken into account.
VariableConductor, Resistor, Conductor, Capacitor, Inductor, Variable resistor, Variable capacitor, Variable inductor
Extends from Interfaces.TwoPlug (Two plugs with pin-adapter), Modelica.Electrical.MultiPhase.Interfaces.ConditionalHeatPort (Partial model to include conditional HeatPorts in order to describe the power loss via a thermal network).
Type | Name | Default | Description |
---|---|---|---|
Integer | m | 3 | Number of phases |
Temperature | T_ref[m] | fill(293.15, m) | Reference temperatures [K] |
LinearTemperatureCoefficient | alpha_ref[m] | zeros(m) | Temperature coefficient of resistance (G_actual = G_ref/(1 + alpha_ref*(heatPort.T - T_ref)) [1/K] |
Integer | mh | m | Number of heatPorts=number of phases |
Boolean | useHeatPort | false | =true, if all HeatPorts are enabled |
Temperature | T[mh] | T_ref | Fixed device temperatures if useHeatPort = false [K] |
Type | Name | Description |
---|---|---|
PositivePlug | plug_p | |
NegativePlug | plug_n | |
HeatPort_a | heatPort[mh] | |
input RealInput | G_ref[m] |
model VariableConductor "Multiphase variable conductor" extends Interfaces.TwoPlug; parameter Modelica.SIunits.Temperature T_ref[m]=fill(293.15,m) "Reference temperatures"; parameter Modelica.SIunits.LinearTemperatureCoefficient alpha_ref[m]=zeros(m) "Temperature coefficient of resistance (G_actual = G_ref/(1 + alpha_ref*(heatPort.T - T_ref))"; extends Modelica.Electrical.MultiPhase.Interfaces.ConditionalHeatPort(final mh=m, T=T_ref);Modelica.Blocks.Interfaces.RealInput G_ref[m]; QuasiStationary.SinglePhase.Basic.VariableConductor variableResistor[ m]( final T_ref=T_ref, final alpha_ref=alpha_ref, each final useHeatPort=useHeatPort, final T=T); equationconnect(variableResistor.pin_p, plugToPins_p.pin_p); connect(variableResistor.pin_n, plugToPins_n.pin_n); connect(variableResistor.heatPort, heatPort); connect(G_ref, variableResistor.G_ref); end VariableConductor;
The linear capacitor connects the complex currents i with the complex voltages v by v*j*ω*C = i, using m single phase variable Capacitors. The capacitances C are given as m input signals.
VariableCapacitor, Resistor, Conductor, Capacitor, Inductor, Variable resistor, Variable conductor, Variable inductor
Extends from Interfaces.TwoPlug (Two plugs with pin-adapter).
Type | Name | Default | Description |
---|---|---|---|
Integer | m | 3 | Number of phases |
Type | Name | Description |
---|---|---|
PositivePlug | plug_p | |
NegativePlug | plug_n | |
input RealInput | C[m] |
model VariableCapacitor "Multiphase variable capacitor" extends Interfaces.TwoPlug;Modelica.Blocks.Interfaces.RealInput C[m]; QuasiStationary.SinglePhase.Basic.VariableCapacitor variableCapacitor[ m]; equationconnect(variableCapacitor.pin_p, plugToPins_p.pin_p); connect(variableCapacitor.pin_n, plugToPins_n.pin_n); connect(C, variableCapacitor.C); end VariableCapacitor;
The linear inductor connects the complex voltages v with the complex currents i by i*j*ω*L = v, using m single phase variable Inductors. The inductances L are given as m input signals.
Inductor, Resistor, Conductor, Capacitor, Inductor, Variable resistor, Variable conductor, Variable capacitor
Extends from Interfaces.TwoPlug (Two plugs with pin-adapter).
Type | Name | Default | Description |
---|---|---|---|
Integer | m | 3 | Number of phases |
Type | Name | Description |
---|---|---|
PositivePlug | plug_p | |
NegativePlug | plug_n | |
input RealInput | L[m] |
model VariableInductor "Multiphase variable inductor" extends Interfaces.TwoPlug;Modelica.Blocks.Interfaces.RealInput L[m]; QuasiStationary.SinglePhase.Basic.VariableInductor variableInductor[ m]; equationconnect(variableInductor.pin_p, plugToPins_p.pin_p); connect(variableInductor.pin_n, plugToPins_n.pin_n); connect(variableInductor.L, L); end VariableInductor;