StrayLoad

model StrayLoad "Model of stray load losses dependent on current and speed"
    import Modelica.Electrical.QuasiStationary.MultiPhase.Functions.quasiRMS;

    extends Modelica.Electrical.QuasiStationary.MultiPhase.Interfaces.OnePort;
    extends Modelica.Electrical.Machines.Interfaces.FlangeSupport;

    parameter Modelica.Electrical.Machines.Losses.StrayLoadParameters strayLoadParameters "Stray load loss parameters";

    extends Modelica.Thermal.HeatTransfer.Interfaces.PartialElementaryConditionalHeatPortWithoutT(useHeatPort = false);

    Modelica.SIunits.Current iRMS = quasiRMS(i);
equation
    if strayLoadParameters.PRef <= 0 then 
        tau = 0;
    else 
        tau = -strayLoadParameters.tauRef * (iRMS / strayLoadParameters.IRef) ^ 2 * sign(w) * (abs(w) / strayLoadParameters.wRef) ^ strayLoadParameters.power_w;
    end if;
    v = {Complex(0, 0) for k in 1:m};
    lossPower = -tau * w;

    annotation (
        defaultComponentName = "strayLoss",
        Icon(
            coordinateSystem(
                preserveAspectRatio = false,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Rectangle(
                    extent = {
                        {-70, 30}, 
                        {70, -30}},
                    lineColor = {85, 170, 255},
                    pattern = LinePattern.Dot), 
                Line(
                    points = {
                        {-102, 0}, 
                        {100, 0}},
                    color = {85, 170, 255}), 
                Text(
                    extent = {
                        {-150, 90}, 
                        {150, 50}},
                    lineColor = {0, 0, 255},
                    textString = "%name")}),
        Documentation(info = "<html>\n<p>\nStray load losses are modeled similar to standards EN 60034-2 and IEEE 512, i.e., they are dependent on square of current,\nbut without scaling them to zero at no-load current.\n</p>\n<p>\nFor an estimation of dependency on varying angular velocity see:\n<a href=\"modelica://Modelica.Magnetic.QuasiStatic.FundamentalWave.UsersGuide.References\">[Lang1984]</a>\n</p>\n<p>\nThe stray load losses are modeled such way that they do not cause a voltage drop in the electric circuit.\nInstead, the dissipated losses are considered through an equivalent braking torque at the shaft.\n</p>\n<p>\nThe stray load loss torque is\n</p>\n<pre>\n  tau = PRef/wRef * (i/IRef)^2 * (w/wRef)^power_w\n</pre>\n<p>\nwhere <code>i</code> is the current of the machine and <code>w</code> is the actual angular velocity.\nThe dependency of the stray load torque on the angular velocity is modeled by the exponent <code>power_w</code>.\n</p>\n<h4>See also</h4>\n<p>\n<a href=\"modelica://Modelica.Electrical.Machines.Losses.StrayLoadParameters\">StrayLoad parameters</a>\n</p>\n<p>\nIf it is desired to neglect stray load losses, set <code>strayLoadParameters.PRef = 0</code> (this is the default).\n</p>\n</html>"));
end StrayLoad;