Help - Search - Members - Calendar
Full Version: Is there any problem about "initial equation" in OpenModelica?
Modelica Forum > Modelica > MathModelica / OpenModelica
new_wave
Dear all,
Consider a simple test example shown below,

model stf
parameter Real Tr=0.5;
Modelica.Blocks.Continuous.TransferFunction AVR(b={1}, a={Tr,1});
output Real yy;
equation
yy=AVR.y;
AVR.u=sin(2*3.14159*2*time);
initial equation
AVR.y=5.123;
end stf;

I found that the result obtained from Dymola and OpenModelica is different. The problem is that I cannot force the output AVR.y to a specific value as I want. Is this a problem from OpenModelica ? How can I force the output at the initial in OpenModelica?

Best regards,
new_wave








MOS701
Hello
to inistializse this variable you need to use the start commant,
so

"""""""""""
Modelica.Blocks.Continuous.TransferFunction AVR(b={1}, a={Tr,1},AVR.y(start=5.123));
""""""""""""""
regards

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.