EddyCurrent

model EddyCurrent "Constant loss model under sinusoidal magnetic conditions"
    import Modelica.Constants.pi;

    constant Complex j = Complex(0, 1);

    extends Interfaces.PartialTwoPortElementary;

    parameter Modelica.SIunits.Conductance G(min = 0) "Equivalent symmetric loss conductance";

    extends Modelica.Thermal.HeatTransfer.Interfaces.PartialElementaryConditionalHeatPort(final T = 273.15);

    Modelica.SIunits.AngularVelocity omega = der(port_p.reference.gamma) "Angular velocity";
equation
    if 0 < G then 
        0.5 * pi * V_m = j * omega * G * Phi;
    else 
        V_m = Complex(0, 0);
    end if;
    lossPower = 0.5 * pi * Modelica.ComplexMath.imag(omega * V_m * Modelica.ComplexMath.conj(Phi));

    annotation (
        Icon(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Rectangle(
                    extent = {
                        {-70, 30}, 
                        {70, -30}},
                    lineColor = {255, 170, 85},
                    fillColor = {255, 170, 85},
                    fillPattern = FillPattern.Solid), 
                Line(
                    points = {
                        {-96, 0}, 
                        {-70, 0}},
                    color = {255, 170, 85}), 
                Line(
                    points = {
                        {70, 0}, 
                        {96, 0}},
                    color = {255, 170, 85}), 
                Text(
                    extent = {
                        {0, -40}, 
                        {0, -80}},
                    textString = "G=%G"), 
                Text(
                    extent = {
                        {150, 90}, 
                        {-150, 50}},
                    lineColor = {0, 0, 255},
                    textString = "%name")}),
        Documentation(info = "<html>\n<p>\nThe eddy current loss model with respect to fundamental wave effects is designed in accordance to\n<a href=\"modelica://Modelica.Magnetic.FluxTubes.Basic.EddyCurrent\">FluxTubes.Basic.EddyCurrent</a> and\n<a href=\"modelica://Modelica.Magnetic.FundamentalWave.Components.EddyCurrent\">FundamentalWave.Components.EddyCurrent</a>.\n</p>\n\n<p>\n&nbsp;&nbsp;<img src=\"modelica://Modelica/Resources/Images/Magnetic/FundamentalWave/Components/eddycurrent.png\">.\n</p>\n\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n  <caption align=\"bottom\">Fig. 1: equivalent models of eddy current losses</caption>\n  <tr>\n    <td>\n      <img src=\"modelica://Modelica/Resources/Images/Magnetic/FundamentalWave/Components/eddycurrent_electric.png\">\n    </td>\n  </tr>\n</table>\n\n<p>Due to the nature of eddy current losses, which can be represented by symmetric\nconductors in an equivalent electric circuit (Fig. 1), the respective\nnumber of phases <img src=\"modelica://Modelica/Resources/Images/Magnetic/FundamentalWave/m.png\"> has to be taken into account.\nAssume that the <img src=\"modelica://Modelica/Resources/Images/Magnetic/FundamentalWave/m.png\"> conductances\nof the equivalent circuit are <img src=\"modelica://Modelica/Resources/Images/Magnetic/FundamentalWave/Components/Gc.png\">,\nthe conductance for the eddy current loss model is determined by</p>\n\n<p>\n&nbsp;&nbsp;<img src=\"modelica://Modelica/Resources/Images/Magnetic/FundamentalWave/Components/GGc.png\">\n</p>\n\n<p>\nwhere <img src=\"modelica://Modelica/Resources/Images/Magnetic/FundamentalWave/N.png\"> is the number of turns of the symmetric electro magnetic coupling.\n</p>\n\n<p>For such an <img src=\"modelica://Modelica/Resources/Images/Magnetic/FundamentalWave/m.png\"> phase system\nthe relationship between the voltage and current <a href=\"https://www.haumer.at/refimg/SpacePhasors.pdf\">space phasors</a>\nand the magnetic flux and magnetic potential difference phasor is\n</p>\n\n<p>\n&nbsp;&nbsp;<img src=\"modelica://Modelica/Resources/Images/Magnetic/FundamentalWave/Components/vPhi.png\">,<br>\n&nbsp;&nbsp;<img src=\"modelica://Modelica/Resources/Images/Magnetic/FundamentalWave/Components/iV_m.png\">,\n</p>\n\n<p>\nwhere <img src=\"modelica://Modelica/Resources/Images/Magnetic/FundamentalWave/v_k.png\">\nand <img src=\"modelica://Modelica/Resources/Images/Magnetic/FundamentalWave/i_k.png\">\nare the phase voltages and currents, respectively.\n</p>\n\n<p>\nThe dissipated loss power\n</p>\n<p>\n&nbsp;&nbsp;<img src=\"modelica://Modelica/Resources/Images/Magnetic/FundamentalWave/Components/lossPower.png\">\n</p>\n<p>\ncan be determined for the <a href=\"https://www.haumer.at/refimg/SpacePhasors.pdf\">space phasor</a>\nrelationship of the voltage and current space phasor.\n</p>\n<h4>See also</h4>\n\n<p><a href=\"modelica://Modelica.Magnetic.FluxTubes.Basic.EddyCurrent\">FluxTubes.Basic.EddyCurrent</a></p>\n</html>"));
end EddyCurrent;