Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Saturated inductor

Saturated inductor

Hello,

I'm trying FluxTubes library and in particular, the Saturated inductor example. The code I used is there :

model SaturatedInductor
      "Inductor with saturation in the ferromagnetic core"

      Modelica.Magnetic.FluxTubes.Basic.Ground ground_m;
      Modelica.Electrical.Analog.Sources.SineVoltage source(
        freqHz=50,
        phase=Modelica.Constants.pi/2,
        V=230*sqrt(2));
      Modelica.Electrical.Analog.Basic.Resistor r(R=7.5)
        "Inductor coil resistance";
      Modelica.Magnetic.FluxTubes.Basic.ElectroMagneticConverter coil(
                                    N=600, i(fixed=true)) "Inductor coil";
      Modelica.Magnetic.FluxTubes.Basic.ConstantReluctance r_mLeak(R_m=1.2e6) "Constant leakage reluctance";
      Modelica.Magnetic.FluxTubes.Shapes.FixedShape.Cuboid r_mAirPar(
        a=0.025,
        b=0.025,
        nonLinearPermeability=false,
        mu_rConst=1,
        l=0.0001);
      Modelica.Magnetic.FluxTubes.Shapes.FixedShape.Cuboid r_mFe(
        mu_rConst=1000,
        a=0.025,
        b=0.025,
        nonLinearPermeability=true,
        l=4*0.065,
        material=Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.ElectricSheet.M350_50A())
        "Reluctance of ferromagnetic inductor core";
      Modelica.Electrical.Analog.Basic.Ground ground;

    equation
      connect(source.p, r.p);
      connect(r.n, coil.p);
      connect(source.n, coil.n);
      connect(coil.port_p, r_mLeak.port_p);
      connect(r_mLeak.port_p, r_mAirPar.port_p);
      connect(r_mAirPar.port_n, r_mFe.port_p);
      connect(r_mFe.port_n, r_mLeak.port_n);
      connect(r_mFe.port_n, coil.port_n);
    connect(ground.p, source.n);
    connect(ground_m.port, r_mFe.port_n);
    end SaturatedInductor;

I only suppressed annotations. I'm working with the last nightly build version of OpenModelica on Windows. Simulation failed with message :

messages = "Error solving nonlinear system residualFunc11 at time 0.0685262
ERROR: Division by zero in partial equation: 1.0 / r_mFe.G_m because r_mFe.G_m == 0.

When i plotted coil.i, the current behaviour is bad because there is no periodic signal eventhough I increase numberOfIntervals. I try to plot r_mFe.G_m but it seems that its value is always equal to zero. I'm a complete newbie with OpenModelica. Is this problem with SaturatedInductor a well-known problem ?

Thanks for your reply

Best regards

There are 0 guests and 0 other users also viewing this topic