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

Don't understand the plot of x'=-a * x

Don't understand the plot of x'=-a * x

Hi Guys,

I'm learning OpenModelica and I've already got stuck in the first example.

In the First Basic Class (HelloWorld) in OMNoteBook,
A class is defined like this:

Code:


class HelloWorld
  Real x(start = 1,fixed=true);
  parameter Real a = 1;
equation
  der(x) = - a * x;
end HelloWorld;

Then plot it

Code:


plot( x )

I was surprised about the plotted graph (BTW: how to insert local pictures to this post?)
-------------------------------
Firstly, I was expecting a linear graph like "y = -x"; Obviously I was wrong, but I don't know why.
Then I was trying to understand what is "time derivative". But still can not understand why the plotted graph started from "0, 1" and decrease as time increases.
Could you explain these basic concept for me? I searched for a while, but can not get it.

Re: Don't understand the plot of x'=-a * x

Please cosider therefore the theory of Ordinary Differential Equation.

Re: Don't understand the plot of x'=-a * x

Thank you very much!

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