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

Simple pendulum case crashes in v1.9

Simple pendulum case crashes in v1.9

Hi,

The simple pendulum case below worked in version 1.8 but crashes in 1.9. Is this is a new bug or am I missing something???

class pendulum
  constant Real PI = 3.14159;
  parameter Real m = 1,g = 9.81,L = 0.5;
  Real F;
  output Real x(start = 0.5),y(start = 0);
  output 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;

Re: Simple pendulum case crashes in v1.9

I opened up a ticket since this should be a bug report

Re: Simple pendulum case crashes in v1.9

Our back-end developer replied:

The pendulum model requires dynamic state selection. It is not enabled by default. You can enable it by setting
setMatchingAlgorithm("PFPlusExt");
setIndexReductionMethod("dynamicStateSelection");

I opened up a new ticket (#1820) to have these options in OMEdit as well.

Re: Simple pendulum case crashes in v1.9

OMEdit now handles this.

Adeel.

Re: Simple pendulum case crashes in v1.9

Where do you put in the the required setMatchingAlgorithm("PFPlusExt"); and setIndexReductionMethod("dynamicStateSelection"); method calls?

Re: Simple pendulum case crashes in v1.9

Hi,

Install the new nightly build https://build.openmodelica.org/omc/buil … y-builds/.
In the simulation dialog you see two new drop down boxes where you can select these options before simulation.

Adeel.

There are 0 guests and 0 other users also viewing this topic
You are here: