Friction

model Friction "Model of angular velocity dependent friction losses"
    extends Machines.Interfaces.FlangeSupport;

    parameter FrictionParameters frictionParameters "Friction loss parameters";

    extends Modelica.Thermal.HeatTransfer.Interfaces.PartialElementaryConditionalHeatPortWithoutT(useHeatPort = false);
equation
    if frictionParameters.PRef <= 0 then 
        tau = 0;
    else 
        tau = -(if noEvent(frictionParameters.wLinear < abs(w)) then frictionParameters.tauRef * sign(w) * (abs(w) / frictionParameters.wRef) ^ frictionParameters.power_w else frictionParameters.tauLinear * w / frictionParameters.wLinear);
    end if;
    lossPower = -tau * w;

    annotation (
        Icon(graphics = {
            Ellipse(
                extent = {
                    {-60, 60}, 
                    {60, -60}},
                fillColor = {175, 175, 175},
                fillPattern = FillPattern.Solid), 
            Ellipse(
                extent = {
                    {-50, 50}, 
                    {50, -50}},
                fillColor = {255, 255, 255},
                fillPattern = FillPattern.Solid), 
            Ellipse(
                extent = {
                    {-12, 50}, 
                    {8, 30}},
                fillPattern = FillPattern.Sphere,
                fillColor = {135, 135, 135}), 
            Ellipse(
                extent = {
                    {-10, -30}, 
                    {10, -50}},
                fillPattern = FillPattern.Sphere,
                fillColor = {135, 135, 135}), 
            Ellipse(
                extent = {
                    {24, -10}, 
                    {44, -30}},
                fillPattern = FillPattern.Sphere,
                fillColor = {135, 135, 135}), 
            Ellipse(
                extent = {
                    {22, 34}, 
                    {42, 14}},
                fillPattern = FillPattern.Sphere,
                fillColor = {135, 135, 135}), 
            Ellipse(
                extent = {
                    {-44, 30}, 
                    {-24, 10}},
                fillPattern = FillPattern.Sphere,
                fillColor = {135, 135, 135}), 
            Ellipse(
                extent = {
                    {-44, -12}, 
                    {-24, -32}},
                fillPattern = FillPattern.Sphere,
                fillColor = {135, 135, 135}), 
            Ellipse(
                extent = {
                    {-30, 30}, 
                    {30, -30}},
                fillColor = {175, 175, 175},
                fillPattern = FillPattern.Solid), 
            Ellipse(
                extent = {
                    {-20, 20}, 
                    {20, -20}},
                fillColor = {255, 255, 255},
                fillPattern = FillPattern.Solid), 
            Line(
                visible = useHeatPort,
                points = {
                    {-40, 0}, 
                    {-100, 0}, 
                    {-100, -90}},
                color = {255, 0, 0}), 
            Line(
                points = {
                    {0, 90}, 
                    {0, 0}},
                color = {95, 95, 95}), 
            Line(
                points = {
                    {0, -60}, 
                    {0, -90}},
                color = {95, 95, 95}), 
            Text(
                extent = {
                    {-150, 90}, 
                    {150, 60}},
                lineColor = {0, 0, 255},
                textString = "%name")}),
        Documentation(info = "<html>\n<p>\nThe friction losses are considered by the equations\n</p>\n<pre>\n   tau / tauRef = (+w / wRef) ^ power_w    for w &gt; +wLinear\n - tau / tauRef = (-w / wRef) ^ power_w    for w &lt; -wLinear\n</pre>\n<p>\nwith\n</p>\n<pre>\n  tauRef * wRef = PRef\n</pre>\n<p>\nbeing the friction torque at the reference angular velocity\n<code>wRef</code>. The exponent <code>power_w</code> is\napproximately 1.5 for axial ventilation and approximately 2.0 for radial ventilation.\n</p>\n<p>\nFor stability reasons the friction torque <code>tau</code> is approximated by a linear curve\n</p>\n<pre>\n  tau / tauLinear = w / wLinear\n</pre>\n<p>\nwith\n</p>\n<pre>\n  tauLinear = tauRef*(wLinear/wRef) ^ power_w\n</pre>\n<p>\nin the range <code> -wLinear &le; w &le; wLinear</code> with <code>wLinear = 0.001 * wRef</code>. The relationship of torque\nand angular velocity is depicted in Fig. 1\n</p>\n<table border=0 cellspacing=0 cellpadding=1>\n  <tr><td> <img src=\"modelica://Modelica/Resources/Images/Electrical/Machines/frictiontorque.png\"\n                alt=\"frictiontorque.png\"> </td>\n  </tr>\n  <tr><td> <strong> Fig. 1: </strong>Friction loss torque versus angular velocity for <code>power_w = 2</code></td>\n  </tr>\n</table>\n<h4>See also</h4>\n<p>\n<a href=\"modelica://Modelica.Electrical.Machines.Losses.FrictionParameters\">FrictionParameters</a>\n</p>\n<p>\nIf it is desired to neglect friction losses, set <code>frictionParameters.PRef = 0</code> (this is the default).\n</p>\n</html>"));
end Friction;