Help - Search - Members - Calendar
Full Version: setting initial conditions
Modelica Forum > Modelica > Dymola
daniel@ka
Hello dear forum,

I am trying to understand why setting emk to zero (fixed)
leads dymola to the conclusion that initial conditions
are overconstrained?

Here is the whole code ...

package Anfahren

model DCMotor
input Real u;
Real emk(start = 0, fixed = true);
Real m;
Real i;
Real R;
Real phi;
Real omega;
parameter Real J = 1;
parameter Real kPhi = 1;
parameter Real Ra = 0.5;
equation
omega = der(phi);
R = exp(-time/10);
u = (R+Ra)*i + emk; // i,emk are to choose => fix emk => i
m = kPhi * i; // i determined by fixed emk => m
emk = kPhi * omega; // emk fixed => omega
m = J*der(phi);
end DCMotor;

model Test
DCMotor m;
equation
m.u = 250;
end Test;

end Anfahren;

and here is the error message

DAE having 7 scalar unknowns and 7 scalar equations.
Error: The initial conditions for variables of type Real
are overspecified.
There are 1 too many scalar conditions.
To correct it you can
inactivate start values for
m.emk(start = 0)

if I let dymola choose the initial conditions
it comes with omega(time=0) != 0
that is not what I want

thanks in advance

regards, daniel
daniel@ka

>> m = J*der(phi);

the error was on my side wink.gif

that definitly should be

m = J*der(omega);


This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.