SymmetricMultiPhaseCageWinding_obsolete

model SymmetricMultiPhaseCageWinding_obsolete "Symmetrical rotor cage"
    import Modelica.Constants.pi;

    extends Modelica.Icons.ObsoleteModel;
    extends Modelica.Magnetic.FundamentalWave.Interfaces.PartialTwoPortExtended;

    parameter Integer m = 3 "Number of phases";
    parameter Boolean useHeatPort = false "Enable / disable (=fixed temperatures) thermal port"
        annotation (Evaluate = true);
    parameter Modelica.SIunits.Resistance RRef "Winding resistance per phase at TRef";
    parameter Modelica.SIunits.Temperature TRef(start = 293.15) "Reference temperature of winding";
    parameter Modelica.Electrical.Machines.Thermal.LinearTemperatureCoefficient20 alpha20(start = 0) "Temperature coefficient of winding at 20 degC";
    final parameter Modelica.SIunits.LinearTemperatureCoefficient alphaRef = Modelica.Electrical.Machines.Thermal.convertAlpha(alpha20, TRef, 293.15);
    parameter Modelica.SIunits.Temperature TOperational(start = 293.15) "Operational temperature of winding"
        annotation (Dialog(enable = not useHeatPort));
    parameter Modelica.SIunits.Inductance Lsigma "Cage stray inductance";
    parameter Real effectiveTurns = 1 "Effective number of turns";
    Modelica.SIunits.Current i[m] = strayInductor.i "Cage currents";
    Modelica.Magnetic.FundamentalWave.Components.MultiPhaseElectroMagneticConverter winding(final m = m, final effectiveTurns = fill(effectiveTurns, m), final orientation = Modelica.Electrical.MultiPhase.Functions.symmetricOrientation(m)) "Symmetric winding"
        annotation (Placement(transformation(
            origin = {0, -10},
            extent = {
                {-10, -10}, 
                {10, 10}},
            rotation = 90)));
    Modelica.Electrical.MultiPhase.Basic.Inductor strayInductor(final m = m, final L = fill(Lsigma, m)) annotation (Placement(transformation(
        origin = {-20, -30},
        extent = {
            {10, -10}, 
            {-10, 10}},
        rotation = 90)));
    Modelica.Electrical.MultiPhase.Basic.Resistor resistor(final useHeatPort = useHeatPort, final m = m, final R = fill(RRef, m), final T_ref = fill(TRef, m), final alpha = fill(alphaRef, m), final T = fill(TOperational, m)) annotation (Placement(transformation(
        origin = {-20, -70},
        extent = {
            {10, 10}, 
            {-10, -10}},
        rotation = 90)));
    Modelica.Electrical.MultiPhase.Basic.Star star(final m = m) annotation (Placement(transformation(extent = {
        {30, -30}, 
        {50, -10}})));
    Modelica.Electrical.Analog.Basic.Ground ground annotation (Placement(transformation(
        origin = {70, -20},
        extent = {
            {-10, 10}, 
            {10, -10}},
        rotation = 270)));
    Thermal.HeatTransfer.Interfaces.HeatPort_a heatPortWinding if useHeatPort "Heat ports of winding resistor"
        annotation (Placement(transformation(extent = {
            {-10, -110}, 
            {10, -90}})));
    Thermal.HeatTransfer.Components.ThermalCollector thermalCollector(final m = m) if useHeatPort "Connector of thermal rotor resistance heat ports"
        annotation (Placement(transformation(extent = {
            {-50, -90}, 
            {-30, -70}})));
    Modelica.Electrical.MultiPhase.Basic.Star starAuxiliary(final m = m) annotation (Placement(transformation(extent = {
        {30, -90}, 
        {50, -70}})));
equation
    connect(port_p,winding.port_p) annotation (Line(
        points = {
            {-100, 0}, 
            {-10, 0}},
        color = {255, 128, 0}));
    connect(ground.p,star.pin_n) annotation (Line(
        points = {
            {60, -20}, 
            {56, -20}, 
            {50, -20}},
        color = {0, 0, 255}));
    connect(resistor.plug_n,starAuxiliary.plug_p) annotation (Line(
        points = {
            {-20, -80}, 
            {30, -80}},
        color = {0, 0, 255}));
    connect(star.plug_p,winding.plug_n) annotation (Line(
        points = {
            {30, -20}, 
            {10, -20}},
        color = {0, 0, 255}));
    connect(winding.port_n,port_n) annotation (Line(
        points = {
            {10, 0}, 
            {100, 0}},
        color = {255, 128, 0}));
    connect(strayInductor.plug_n,resistor.plug_p) annotation (Line(
        points = {
            {-20, -40}, 
            {-20, -60}},
        color = {0, 0, 255}));
    connect(strayInductor.plug_p,winding.plug_p) annotation (Line(
        points = {
            {-20, -20}, 
            {-10, -20}},
        color = {0, 0, 255}));
    connect(thermalCollector.port_a,resistor.heatPort) annotation (Line(
        points = {
            {-40, -70}, 
            {-30, -70}},
        color = {191, 0, 0}));
    connect(thermalCollector.port_b,heatPortWinding) annotation (Line(
        points = {
            {-40, -90}, 
            {-40, -100}, 
            {0, -100}},
        color = {191, 0, 0}));

    annotation (
        defaultComponentName = "cage",
        obsolete = "Wrong structure of multi phase cage, see #1536 (https://github.com/modelica/ModelicaStandardLibrary/issues/1536)",
        Icon(
            coordinateSystem(
                preserveAspectRatio = false,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Ellipse(
                    extent = {
                        {-80, 80}, 
                        {80, -80}},
                    fillColor = {175, 175, 175},
                    fillPattern = FillPattern.Solid), 
                Ellipse(
                    extent = {
                        {-20, 76}, 
                        {20, 36}},
                    fillColor = {255, 255, 255},
                    fillPattern = FillPattern.Solid), 
                Ellipse(
                    extent = {
                        {28, 46}, 
                        {68, 6}},
                    fillColor = {255, 255, 255},
                    fillPattern = FillPattern.Solid), 
                Ellipse(
                    extent = {
                        {28, -8}, 
                        {68, -48}},
                    fillColor = {255, 255, 255},
                    fillPattern = FillPattern.Solid), 
                Ellipse(
                    extent = {
                        {-20, -36}, 
                        {20, -76}},
                    fillColor = {255, 255, 255},
                    fillPattern = FillPattern.Solid), 
                Ellipse(
                    extent = {
                        {-68, -6}, 
                        {-28, -46}},
                    fillColor = {255, 255, 255},
                    fillPattern = FillPattern.Solid), 
                Ellipse(
                    extent = {
                        {-66, 50}, 
                        {-26, 10}},
                    fillColor = {255, 255, 255},
                    fillPattern = FillPattern.Solid), 
                Line(
                    points = {
                        {-80, 0}, 
                        {-100, 0}},
                    color = {255, 128, 0}), 
                Line(
                    points = {
                        {100, 0}, 
                        {80, 0}},
                    color = {255, 128, 0}), 
                Text(
                    extent = {
                        {0, 100}, 
                        {0, 140}},
                    lineColor = {0, 0, 255},
                    textString = "%name")}),
        Documentation(info = "<html>\n<p>\n<img src=\"modelica://Modelica/Resources/Images/Magnetic/FundamentalWave/Machines/Components/rotorcage.png\">\n</p>\n<p>\nThe symmetric rotor cage model of this library does not consist of rotor bars and end rings. Instead the symmetric cage is modeled by an equivalent symmetrical winding. The rotor cage model consists of\n<img src=\"modelica://Modelica/Resources/Images/Magnetic/FundamentalWave/m.png\"> phases. If the cage is modeled by equivalent stator winding parameters, the number of effective turns, <img src=\"modelica://Modelica/Resources/Images/Magnetic/FundamentalWave/effectiveTurns.png\">, has to be chosen equivalent to the effective number of stator turns.\n</p>\n\n<h4>See also</h4>\n<p>\n<a href=\"modelica://Modelica.Magnetic.FundamentalWave.BasicMachines.Components.SinglePhaseWinding\">SinglePhaseWinding</a>,\n<a href=\"modelica://Modelica.Magnetic.FundamentalWave.BasicMachines.Components.SymmetricMultiPhaseWinding\">SymmetricMultiPhaseWinding</a>,\n<a href=\"modelica://Modelica.Magnetic.FundamentalWave.BasicMachines.Components.SaliencyCageWinding\">SaliencyCageWinding</a>,\n<a href=\"modelica://Modelica.Magnetic.FundamentalWave.BasicMachines.Components.RotorSaliencyAirGap\">RotorSaliencyAirGap</a>\n</p>\n</html>"));
end SymmetricMultiPhaseCageWinding_obsolete;