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

Problem with diod model

Problem with diod model

I'm trying to use a simple electrical circuit with one diod on Openmodelica 1.9.3. I wrote the code below :

Code:

model TKJ1

  Modelica.Electrical.Analog.Sources.SineVoltage sinevoltage(V = 100, freqHz = 235);
  Modelica.Electrical.Analog.Basic.Resistor resistor(R = 0.001);
  Modelica.Electrical.Analog.Basic.Inductor inductor(L = 1e-6);
  Modelica.Electrical.Analog.Basic.Resistor Rcharge(R = 100);
  Modelica.Electrical.Analog.Semiconductors.Diode diode1;
  Modelica.Electrical.Analog.Basic.Ground ground;
equation
  connect(ground.p, Rcharge.n);
  connect(Rcharge.p, diode1.n);
  connect(diode1.p, inductor.n);
  connect(inductor.p, resistor.n);
  connect(resistor.p, sinevoltage.p);
  connect(ground.p, sinevoltage.n);
end TKJ1;

With the defaut simulation parameters, the simulation failed with the following message :

LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
stdout | warning | <p>The corrector could not converge.</p>
stdout | warning | <p>can't continue. time = 0.005647</p>
stdout | info | <p>model terminate | Integrator failed. | Simulation terminated at time 0.0056473</p>
LOG_STATS | info | <p>### STATISTICS ###</p>
stdout | error | <p>Process crashed<br>
Simulation process failed. Exited with code -8.</p>

I changed the maximum step size after event detection to 1e-6. The simulation finished correctly :


LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
LOG_STATS | info | <p>### STATISTICS ###</p>
stdout | OMEditInfo | <p>Simulation process finished successfully.</p>

The results are correct but the warnings are still there. It seems that diode model is very sensitive to simulation parameters. Any help on this topic will be deeply appreciated.

Edited by: jp_ducreux - Nov-12-15 20:28:59
There are 0 guests and 0 other users also viewing this topic