EddyCurrent

model EddyCurrent "For modelling of eddy current in a conductive magnetic flux tube"
    extends FluxTubes.Interfaces.PartialTwoPorts;
    extends Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort(final T = 273.15);

    parameter Boolean useConductance = false "Use conductance instead of geometry data and rho"
        annotation (
            Evaluate = true,
            choices(checkBox = true));
    parameter Modelica.SIunits.Conductance G(min = 0) = 1.020408163e+7 "Equivalent loss conductance G=A/rho/l"
        annotation (
            Dialog(enable = useConductance),
            Evaluate = true);
    parameter SI.Resistivity rho = 9.8e-8 "Resistivity of flux tube material (default: Iron at 20degC)"
        annotation (Dialog(enable = not useConductance));
    parameter SI.Length l = 1 "Average length of eddy current path"
        annotation (Dialog(enable = not useConductance));
    parameter SI.Area A = 1 "Cross sectional area of eddy current path"
        annotation (Dialog(enable = not useConductance));
    final parameter SI.Resistance R = rho * l / A "Electrical resistance of eddy current path"
        annotation (Dialog(enable = not useConductance));
equation
    LossPower = V_m * der(Phi);
    V_m = (if useConductance then G else R ^ (-1)) * der(Phi);

    annotation (
        Icon(
            coordinateSystem(
                preserveAspectRatio = false,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Rectangle(
                    extent = {
                        {-70, 30}, 
                        {70, -30}},
                    lineColor = {255, 128, 0},
                    fillColor = {255, 255, 255},
                    fillPattern = FillPattern.Solid), 
                Line(
                    points = {
                        {-70, 0}, 
                        {-90, 0}},
                    color = {255, 128, 0}), 
                Line(
                    points = {
                        {70, 0}, 
                        {90, 0}},
                    color = {255, 128, 0}), 
                Rectangle(
                    extent = {
                        {-70, 30}, 
                        {70, -30}},
                    lineColor = {255, 128, 0},
                    fillColor = {255, 128, 0},
                    fillPattern = FillPattern.Solid), 
                Text(
                    extent = {
                        {-150, 50}, 
                        {150, 90}},
                    textString = "%name",
                    lineColor = {0, 0, 255})}),
        Documentation(
            info = "<html>\n<p>\nEddy currents are induced in a conductive magnetic flux tube when the flux changes with time. This causes a magnetic voltage drop in addition to the voltage drop that is due to the reluctance of this flux tube. The eddy current component can be thought of as a short-circuited secondary winding of a transformer with only one turn. Its resistance is calculated from the geometry and resistivity of the eddy current path.\n</p>\n\n<p>\nPartitioning of a solid conductive cylinder or prism into several hollow cylinders or separate nested prisms and modelling of each of these flux tubes connected in parallel with a series connection of a reluctance element and an eddy current component can model the delayed buildup of the magnetic field in the complete flux tube from the outer to the inner sections. Please refer to <a href=\"modelica://Modelica.Magnetic.FluxTubes.UsersGuide.Literature\">[Ka08]</a> for an illustration.\n</p>\n</html>",
            revisions = "<html>\n<h5>Version 3.2.2, 2014-01-15 (Christian&nbsp;Kral)</h5>\n<ul>\n<li>Added parameter <code>useConductance</code> including alternative parameterization</li>\n</ul>\n</html>"));
end EddyCurrent;