- Index
- » Programming
- » Modelica Language
- » Trouble solving pendulum model
Page Start Prev 1 Next End
Trouble solving pendulum model
Trouble solving pendulum model
Jan-18-13 13:54:43
Hello,
I am trying to simulate the pendulum model in the user guide (release 1.9.0 beta), and am encountering the following issue:
Code:
record SimulationResult
resultFile = "C:/DOCUME~1/ajpm/LOCALS~1/Temp/OpenModelica/MyPendulum3D_res.mat",
simulationOptions = "startTime = 0.0, stopTime = 5.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'MyPendulum3D', storeInTemp = false, noClean = false, options = '', outputFormat = 'mat', variableFilter = '.*', measureTime = false, cflags = '', simflags = ''",
messages = "warning | Error solving nonlinear system residualFunc2 (size 1) at time 1.3237
warning | Error solving nonlinear system residualFunc2 (size 1) at time 1.32375
warning | Error solving nonlinear system residualFunc2 (size 1) at time 1.32373
warning | Error solving nonlinear system residualFunc2 (size 1) at time 1.32373
etc...
The model itself is as per the user guide:
Code:
class MyPendulum3D "Planar Pendulum"
constant Real PI=3.141592653589793;
parameter Real m=1, g=9.81, L=5;
Real F;
Real x(start=5),y(start=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 MyPendulum3D;
If I then try to add the 3D visulisation, it crashes in a similar manner to the one described in https://www.openmodelica.org/index.php/ … pic?id=817, even when changing the location of the SimpleVisual.PositionSize type commands to be just before the equation section.
Any suggestions?
Thanks,
Arnaud
Page Start Prev 1 Next End
- Index
- » Programming
- » Modelica Language
- » Trouble solving pendulum model
There are 0 guests and 0 other users also viewing this topic