- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Use +d=initialization for more...
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;
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.
- adeas
- 454 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Use +d=initialization for more...