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

Error with Multi-Body Example

Error with Multi-Body Example

The non-linear solver fails with a modelica standard library example "Free Body" when angles_start = 0*{0.174532925199433,0.174532925199433,0.174532925199433} is given as an initial condition instead of : angles_start = {0.174532925199433,0.174532925199433,0.174532925199433}

Code:
model FreeBody
  extends Modelica.Icons.Example;
  //inner ModelicaServices.Modelica3D.Controller m3d_control;
  inner Modelica.Mechanics.MultiBody.World world;
  parameter Boolean animation = true "= true, if animation shall be enabled";
  Modelica.Mechanics.MultiBody.Parts.BodyShape body_cg(m = 1, I_11 = 1, I_22 = 1, I_33 = 1, r = {0.4,0,0}, r_CM = {0.2,0,0}, width = 0.05, r_0(start = {0.2,-0.5,0.1}, fixed = true), v_0(fixed = true), angles_fixed = true, w_0_fixed = true,
angles_start = 0*{0.174532925199433,0.174532925199433,0.174532925199433}, shapeType = "cone");
end FreeBody;

Script:
loadModel(Modelica);
loadFile("FreeBody.mo");
simulate(FreeBody);
plot(body_cg.frame_a.r_0[2])

Script Output: omc test.mos
true
true
record SimulationResult
    resultFile = "/hsl/homes/jgoppert/Desktop/FreeBody_res.mat",
    simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 0.000001, method = 'dassl', fileNamePrefix = 'FreeBody', storeInTemp = false, noClean = false, options = '', outputFormat = 'mat', variableFilter = '.*', measureTime = false, cflags = '', simflags = ''",
    messages = "warning | Error solving nonlinear system SES_ALGORITHM 0 at time 1.7656e-07
warning | Error solving nonlinear system SES_ALGORITHM 0 at time 1.23592e-06
warning | Error solving nonlinear system SES_ALGORITHM 0 at time 2.6484e-06
warning | Error solving nonlinear system SES_ALGORITHM 0 at time 5.47335e-06
warning | Error solving nonlinear system SES_ALGORITHM 0 at time 1.11233e-05
warning | Error solving nonlinear system SES_ALGORITHM 0 at time 2.24231e-05
warning | Error solving nonlinear system SES_ALGORITHM 0 at time 4.50227e-05
warning | Error solving nonlinear system SES_ALGORITHM 0 at time 9.0222e-05
warning | Error solving nonlinear system SES_ALGORITHM 0 at time 0.000180621
warning | Error solving nonlinear system SES_ALGORITHM 0 at time 0.000361418
warning | Error solving nonlinear system SES_ALGORITHM 0 at time 0.000723012
warning | Error solving nonlinear system SES_ALGORITHM 0 at time 0.0014462
warning | Error solving nonlinear system SES_ALGORITHM 0 at time 0.00289258
info    | model terminate | Simulation terminated at time 0.002
",
    timeFrontend = 0.973176914,
    timeBackend = 1.830438558,
    timeSimCode = 0.232440043,
    timeTemplates = 0.37542255100000005,
    timeCompile = 1.307932783,
    timeSimulation = 0.10955988300000001,
    timeTotal = 4.829020529
end SimulationResult;
true

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