IM_SquirrelCage

model IM_SquirrelCage "Induction machine with squirrel cage"
    extends BaseClasses.PartialBasicMachine(Rs(start = 0.03), Lssigma(start = 3 * (1 - sqrt(0.9333)) / (2 * pi * fsNominal)), final L0(d = 2 * Lm / m / effectiveStatorTurns ^ 2, q = 2 * Lm / m / effectiveStatorTurns ^ 2), redeclare final Modelica.Electrical.Machines.Thermal.AsynchronousInductionMachines.ThermalAmbientAIMC thermalAmbient(final Tr = TrOperational), redeclare final Modelica.Electrical.Machines.Interfaces.InductionMachines.ThermalPortAIMC thermalPort, redeclare final Modelica.Electrical.Machines.Interfaces.InductionMachines.ThermalPortAIMC internalThermalPort, redeclare final Modelica.Electrical.Machines.Interfaces.InductionMachines.PowerBalanceAIMC powerBalance(final lossPowerRotorWinding = sum(rotorCage.resistor.resistor.LossPower), final lossPowerRotorCore = 0));

    parameter Modelica.SIunits.Inductance Lm(start = 3 * sqrt(0.9333) / (2 * pi * fsNominal)) "Stator main field inductance per phase"
        annotation (Dialog(
            tab = "Nominal resistances and inductances",
            groupImage = "modelica://Modelica/Resources/Images/Electrical/Machines/IMC.png"));
    parameter Modelica.SIunits.Inductance Lrsigma(start = 3 * (1 - sqrt(0.9333)) / (2 * pi * fsNominal)) "Rotor leakage inductance of equivalent m phase winding w.r.t. stator side"
        annotation (Dialog(tab = "Nominal resistances and inductances"));
    parameter Modelica.SIunits.Resistance Rr(start = 0.04) "Rotor resistance of equivalent m phase winding w.r.t. stator side"
        annotation (Dialog(tab = "Nominal resistances and inductances"));
    parameter Modelica.SIunits.Temperature TrRef(start = 293.15) "Reference temperature of rotor resistance"
        annotation (Dialog(tab = "Nominal resistances and inductances"));
    parameter Modelica.Electrical.Machines.Thermal.LinearTemperatureCoefficient20 alpha20r(start = 0) "Temperature coefficient of rotor resistance at 20 degC"
        annotation (Dialog(tab = "Nominal resistances and inductances"));
    parameter Modelica.SIunits.Temperature TrOperational(start = 293.15) "Operational temperature of rotor resistance"
        annotation (Dialog(
            group = "Operational temperatures",
            enable = not useThermalPort));
    output Modelica.SIunits.ComplexCurrent ir[m] = rotorCage.i "Rotor current";
    Modelica.SIunits.Current abs_ir[m] = Modelica.ComplexMath.'abs'(ir) "Magnitude of complex rotor current";
    Modelica.SIunits.Angle arg_ir[m] = Modelica.ComplexMath.arg(ir) "Argument of complex rotor current";
    Components.SymmetricMultiPhaseCageWinding rotorCage(final Lsigma = Lrsigma, final effectiveTurns = effectiveStatorTurns, final useHeatPort = true, final RRef = Rr, final TRef = TrRef, final TOperational = TrRef, final m = m, final alpha20 = alpha20r) "Symmetric rotor cage winding including resistances and stray inductances"
        annotation (Placement(transformation(extent = {
            {-10, -40}, 
            {10, -20}})));
equation
    connect(airGap.port_rn,rotorCage.port_p) annotation (Line(
        points = {
            {-10, -10}, 
            {-10, -30}},
        color = {255, 170, 85}));
    connect(airGap.port_rp,rotorCage.port_n) annotation (Line(
        points = {
            {10, -10}, 
            {10, -30}},
        color = {255, 170, 85}));
    connect(rotorCage.heatPortWinding,internalThermalPort.heatPortRotorWinding) annotation (Line(
        points = {
            {0, -40}, 
            {-40, -40}, 
            {-40, -90}},
        color = {191, 0, 0}));

    annotation (
        defaultComponentName = "imc",
        Documentation(info = "<html>\n<p>\nResistances and stray inductances of the machine refer to an <code>m</code> phase stator. The symmetry of the stator, rotor and supply are assumed. The machine models take the following loss effects into account:\n</p>\n\n<ul>\n<li>heat losses in the temperature dependent stator winding resistances</li>\n<li>heat losses in the temperature dependent cage resistances</li>\n<li>friction losses</li>\n<li>core losses (only eddy current losses, no hysteresis losses)</li>\n<li>stray load losses</li>\n</ul>\n\n<h4>See also</h4>\n<p>\n<a href=\"modelica://Modelica.Magnetic.QuasiStatic.FundamentalWave.BasicMachines.InductionMachines.IM_SlipRing\">\nIM_SlipRing</a>,\n<a href=\"modelica://Modelica.Magnetic.FundamentalWave.BasicMachines.AsynchronousInductionMachines.AIM_SlipRing\">\nMagnetic.FundamentalWave.BasicMachines.AsynchronousInductionMachines.AIM_SlipRing</a>,\n<a href=\"modelica://Modelica.Magnetic.FundamentalWave.BasicMachines.AsynchronousInductionMachines.AIM_SquirrelCage\">\nMagnetic.FundamentalWave.BasicMachines.AsynchronousInductionMachines.AIM_SquirrelCage</a>,\n</p>\n</html>"));
end IM_SquirrelCage;