Opened 12 years ago

Closed 12 years ago

#1818 closed defect (invalid)

Pendulum does not simulate

Reported by: Martin Sjölund Owned by: Jens Frenkel
Priority: critical Milestone: 1.9.0
Component: Backend Version: trunk
Keywords: Cc:

Description

Pendulum does not simulate, seems to be because everything is solved using division (shouldn't this be avoided at all costs?):

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;

From our forums

Change History (3)

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

Owner: changed from somebody to Jens Frenkel
Status: newassigned

comment:2 by Jens Frenkel, 12 years ago

THe pendulum model requires dynamic state selection. It is not enabled by default. You can enable it by setting

setMatchingAlgorithm("PFPlusExt");
setIndexReductionMethod("dynamicStateSelection");

comment:3 by Martin Sjölund, 12 years ago

Component: Run-timeBackend
Resolution: invalid
Status: assignedclosed

I opened up #1820 to have these options in OMEdit, and will close this since it is indeed working.

Note: See TracTickets for help on using tickets.