SaliencyCageWinding_obsolete

model SaliencyCageWinding_obsolete "Rotor cage with saliency in d- and q-axis"
    extends Modelica.Icons.ObsoleteModel;
    extends Modelica.Magnetic.FundamentalWave.Interfaces.PartialTwoPortExtended;

    parameter Boolean useHeatPort = false "Enable / disable (=fixed temperatures) thermal port"
        annotation (Evaluate = true);
    parameter Modelica.Magnetic.FundamentalWave.Types.SalientResistance RRef(d(start = 1), q(start = 1)) "Salient cage resistance";
    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.Magnetic.FundamentalWave.Types.SalientInductance Lsigma(d(start = 1), q(start = 1)) "Salient cage stray inductance";
    parameter Real effectiveTurns = 1 "Effective number of turns";
    Modelica.Blocks.Interfaces.RealOutput i[2](each final quantity = "ElectricCurrent", each final unit = "A") = resistor.i "Currents out from damper";
    Modelica.Blocks.Interfaces.RealOutput lossPower(final quantity = "Power", final unit = "W") = sum(resistor.resistor.LossPower) "Damper losses";
    Modelica.Magnetic.FundamentalWave.Components.MultiPhaseElectroMagneticConverter winding(final m = 2, final orientation = {0, 0.5 * Modelica.Constants.pi}, final effectiveTurns = fill(effectiveTurns, 2)) "Symmetric winding"
        annotation (Placement(transformation(
            origin = {0, -10},
            extent = {
                {-10, -10}, 
                {10, 10}},
            rotation = 90)));
    Modelica.Electrical.MultiPhase.Basic.Inductor strayInductor(final m = 2, final L = {Lsigma.d, Lsigma.q}) annotation (Placement(transformation(
        origin = {-20, -30},
        extent = {
            {10, -10}, 
            {-10, 10}},
        rotation = 90)));
    Modelica.Electrical.MultiPhase.Basic.Resistor resistor(final useHeatPort = useHeatPort, final m = 2, final R = {RRef.d, RRef.q}, final T_ref = fill(TRef, 2), final alpha = fill(alphaRef, 2), final T = fill(TOperational, 2)) annotation (Placement(transformation(
        origin = {-20, -70},
        extent = {
            {10, 10}, 
            {-10, -10}},
        rotation = 90)));
    Modelica.Electrical.MultiPhase.Basic.Star star(final m = 2) annotation (Placement(transformation(extent = {
        {30, -90}, 
        {50, -70}})));
    Modelica.Electrical.Analog.Basic.Ground ground annotation (Placement(transformation(
        origin = {70, -80},
        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 = 2) if useHeatPort "Connector of thermal rotor resistance heat ports"
        annotation (Placement(transformation(extent = {
            {-50, -90}, 
            {-30, -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, -80}, 
            {50, -80}},
        color = {0, 0, 255}));
    connect(resistor.heatPort,thermalCollector.port_a) annotation (Line(
        points = {
            {-30, -70}, 
            {-40, -70}},
        color = {191, 0, 0}));
    connect(star.plug_p,winding.plug_n) annotation (Line(
        points = {
            {30, -80}, 
            {20, -80}, 
            {20, -20}, 
            {10, -20}},
        color = {0, 0, 255}));
    connect(winding.plug_n,resistor.plug_n) annotation (Line(
        points = {
            {10, -20}, 
            {20, -20}, 
            {20, -80}, 
            {-20, -80}},
        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_b,heatPortWinding) annotation (Line(
        points = {
            {-40, -90}, 
            {-40, -100}, 
            {0, -100}},
        color = {191, 0, 0}));

    annotation (
        defaultComponentName = "cage",
        obsolete = "Wrong structure of saliency 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\n<p>\nThe salient cage model is a two axis model with two phases. The electromagnetic coupling therefore is also two phase coupling model. The angles of the two orientations are 0 and <img src=\"modelica://Modelica/Resources/Images/Magnetic/FundamentalWave/pi_over_2.png\">. This way an asymmetrical rotor cage with different resistances and stray inductances in d- and q-axis can be modeled.\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.SymmetricMultiPhaseCageWinding\">SymmetricMultiPhaseCageWinding</a>\n<a href=\"modelica://Modelica.Magnetic.FundamentalWave.BasicMachines.Components.RotorSaliencyAirGap\">RotorSaliencyAirGap</a>\n</p>\n</html>"));
end SaliencyCageWinding_obsolete;