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

Use +d=initialization for more information.

Use +d=initialization for more information.

After clicking 'Simulate' on a new model, the following warning appeared:

[:0:0-0:0] Warning: The initial conditions are not fully specified. Use +d=initialization for more information.

I would like to know exactly how I might '[use] +d=initialization for more information.'  Presumably I need to type this somewhere, but where?

I would also like to know how to specify fully the initial conditions for the model (the code for which is posted below, which I copied from a video tutorial here https://www.youtube.com/watch?v=fHA0U8l … r_embedded) so as to avoid receiving this warning:

Code:

model Pendulum


  parameter Real M = 1;
  // Mass of pendulum
  parameter Real L = 1;
  // Length of pendulum
  parameter Real g = 9.81;
  // Acceleration of gravity
  Real u;
  // Input torque
  Real y;
  // Output angular displacement
  Real x1(start = 1);
  // Pendulum angular displacement
  Real x2(start = 0);
  // Pendulum angular velocity
equation
  der(x1) = x2;
  der(x2) = (u - M * g * L * sin(x1)) / (M * L ^ 2);
  y = x1;
  u = 0;
 
end Pendulum;

Edited by: George Tomlinson - Mar-12-14 21:05:01

Re: Use +d=initialization for more information.

Go to Tools->Options->Simulation->OMC Flags and type +d=initialization and then press OK.

You can specify the initial conditions like this

Code:

(start = 0, fixed = true)

Adeel.

Re: Use +d=initialization for more information.

That's brilliant: thanks.

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