Opened 11 years ago

Closed 10 years ago

#1925 closed defect (worksforme)

Failure to run the textbook simulation example of a pendulum - Error solving nonlinear system residualFunc2 (size 1) at time...

Reported by: hurak@… Owned by: somebody
Priority: high Milestone: 1.9.1
Component: Backend Version: 1.9.0Beta
Keywords: Cc:

Description

The introductory model of a pendulum given by Peter Fritzson in his older book on pages 20 and 21 fails to simulate correctly in the recent version of OpenModelica. The code is here:

model Pendulum
  parameter Real m = 1,g = 9.81,L = 0.5;
  Real F;
  Real x(start = 0.5),y(start = 0.0);
  Real vx,vy;
equation
  m * der(vx) = -(x / L) * F;
  m * der(vy) = -(y / L) * F - m * g;
  der(x) = vx;
  der(y) = vy;
  x^2 + y^2 = L^2;
end Pendulum;
simulate(Pendulum, stopTime=4);
plot(x)

In OMEdit the simulation output contains this error message repeated a number of times:

stdout | warning | Error solving nonlinear system residualFunc2 (size 1) at time 0.418728


When run in OMNotebook, the "simulate" command just returns "false".


Tested both on Windows (OpenModelica 1.9.0 Beta 2 nightly build r13781) and Linux (OpenModelica 1.9.0 Beta 2 nightly build r13764, from the deb repository).

Downgrading to OpenModelica 1.8.1 solves the issue.

Change History (2)

comment:1 Changed 11 years ago by sjoelund.se

  • Milestone changed from 1.9.0 to 1.9.1

Postponed until 1.9.1

comment:2 Changed 10 years ago by sjoelund.se

  • Resolution set to worksforme
  • Status changed from new to closed

This was fixed sometime since the problem was reported (over a year ago). The system does not contain any nonlinear system (tearing? I don't know).

Note: See TracTickets for help on using tickets.