VariableCapacitor

model VariableCapacitor "Multiphase variable capacitor"
    extends Interfaces.TwoPlug;

    Modelica.Blocks.Interfaces.RealInput C[m](each unit = "F") "Variable capacitance"
        annotation (Placement(
            transformation(
                origin = {0, 120},
                extent = {
                    {-20, -20}, 
                    {20, 20}},
                rotation = 270),
            iconTransformation(
                extent = {
                    {-20, -20}, 
                    {20, 20}},
                rotation = 270,
                origin = {0, 120})));
    QuasiStationary.SinglePhase.Basic.VariableCapacitor variableCapacitor[m] annotation (Placement(transformation(extent = {
        {-10, -10}, 
        {10, 10}})));
equation
    connect(C,variableCapacitor.C) annotation (Line(
        points = {
            {0, 120}, 
            {0, 12}},
        color = {0, 0, 127}));
    connect(variableCapacitor.pin_n,plugToPins_n.pin_n) annotation (Line(
        points = {
            {10, 0}, 
            {39, 0}, 
            {39, 0}, 
            {68, 0}},
        color = {85, 170, 255}));
    connect(variableCapacitor.pin_p,plugToPins_p.pin_p) annotation (Line(
        points = {
            {-10, 0}, 
            {-24.5, 0}, 
            {-24.5, 0}, 
            {-39, 0}, 
            {-39, 0}, 
            {-68, 0}},
        color = {85, 170, 255}));

    annotation (
        defaultComponentName = "capacitor",
        Icon(graphics = {
            Line(
                points = {
                    {-90, 0}, 
                    {-6, 0}},
                color = {85, 170, 255}), 
            Line(
                points = {
                    {6, 0}, 
                    {90, 0}},
                color = {85, 170, 255}), 
            Line(
                points = {
                    {-6, 28}, 
                    {-6, -28}},
                color = {0, 128, 255}), 
            Line(
                points = {
                    {6, 28}, 
                    {6, -28}},
                color = {0, 128, 255}), 
            Text(
                extent = {
                    {-150, 90}, 
                    {150, 50}},
                textString = "%name",
                lineColor = {0, 0, 255}), 
            Text(
                extent = {
                    {150, -80}, 
                    {-150, -40}},
                textString = "m=%m")}),
        Documentation(info = "<html>\n<p>\nThe linear capacitors connect the complex currents <code><u>i</u></code> with the complex\nvoltages <code><u>v</u></code> by <code><u>v</u>*j*&omega;*C = <u>i</u></code>,\nusing <code>m</code> <a href=\"modelica://Modelica.Electrical.QuasiStationary.SinglePhase.Basic.VariableCapacitor\">single phase variable Capacitors</a>.\nThe capacitances <code>C</code> are given as <code>m</code> input signals.\n</p>\n\n<h4>See also</h4>\n<p>\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.SinglePhase.Basic.VariableCapacitor\">VariableCapacitor</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.Resistor\">Resistor</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.Conductor\">Conductor</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.Capacitor\">Capacitor</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.Inductor\">Inductor</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.Impedance\">Impedance</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.Admittance\">Admittance</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.VariableResistor\">Variable resistor</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.VariableConductor\">Variable conductor</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.VariableInductor\">Variable inductor</a>\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.VariableImpedance\">Variable impedance</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.VariableAdmittance\">Variable admittance</a>\n</p>\n</html>"));
end VariableCapacitor;