Opened 15 years ago

Closed 12 years ago

#1214 closed defect (worksforme)

Simple Diode Circuit model Simulation gives wrong simulation results. Dymola correct result included.

Reported by: oscarperez Owned by: oscarperez
Priority: critical Milestone:
Component: Simulation Code Generation Version: 1.5.0RC3
Keywords: Cc: oscarperez

Description (last modified by Lennart Ochel)

I made a simple model of with a diode circuit. But when I try to simulate it, diode doesn't work (diode is always an open circuit). Am I doing something wrong?
I also test the same model on Dymola and it works correctly. This is a very simple model and I don't understand what is wrong with openmodelica.

model DiodeTest
  Modelica.Electrical.Analog.Sources.SineVoltage sineVoltage(V=10 , freqHz=1);
  Modelica.Electrical.Analog.Basic.Resistor resistor(R=1000);
  Modelica.Electrical.Analog.Ideal.IdealDiode idealDiode(Vknee=0.7);
  Modelica.Electrical.Analog.Basic.Ground ground;
equation
  connect(idealDiode.n, resistor.p);
  connect(sineVoltage.p, idealDiode.p);
  connect(resistor.n, ground.p);
  connect(sineVoltage.n, ground.p);
end DiodeTest;

Attachments are images with the correct simulation result (Dymola) and the actual openmodelica simulation result. And also The onb model.

Kind Regards.

Attachments (3)

DiodeTestCircuit.onb (13.7 KB ) - added by oscarperez 15 years ago.
onb file, And simulation images (correct result and openmodelica wrong result)
DiodeTestCircuitCorrectSimulationResult.png (10.1 KB ) - added by oscarperez 15 years ago.
onb file, And simulation images (correct result and openmodelica wrong result)
DiodeTestCircuitOpenModelicaSimulationResult.png (5.0 KB ) - added by oscarperez 15 years ago.
onb file, And simulation images (correct result and openmodelica wrong result)

Download all attachments as: .zip

Change History (4)

by oscarperez, 15 years ago

onb file, And simulation images (correct result and openmodelica wrong result)

comment:1 by Martin Sjölund, 14 years ago

I'll confirm that the problem exists both for MSL2.2 and MSL3.1

comment:2 by Lennart Ochel, 12 years ago

Cc: oscarperez, → oscarperez
Description: modified (diff)

comment:3 by Lennart Ochel, 12 years ago

Resolution: worksforme
Status: acceptedclosed
Note: See TracTickets for help on using tickets.