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
  • Index
  • » Users
  • » Changfu
  • » Profile

Posts

Posts

May-21-14 08:02:42
How to use conditional input for model with coupled state variables

Dear,


In my case, I want to use conditional input for model which consists of fully coupled state variables.
I have tried,
                   if use fixed input, it works well;
                   if use non-fully coupled state variables, it works well;
Below is a simple example from my real project:
Could anyone give me some suggestions?



model test

Real x,y,z;
Real I;

equation


if y< 4 then
  I =10;
else
  I = -10;
end if;

der(x) = 5*z + I;
z+y = 4;
y = 2*x;



end test;

May-21-14 07:32:20
How to setup Variable Initial Value?
Category: Programming

Because my model is very complex consisting of 21 partial differential algebraic equations, and I want simulate it for hundreds of cycles, I cannot update the initial values by hand.

Could you give me some suggestion?

May-21-14 07:24:24
How to setup Variable Initial Value?
Category: Programming

Thank you!

Is there some function like 'xlsread' and "xlswrite" in matlab?
Since I want to simulate a large number of loops, and the result of step j is the initialization of step j+1
Do you have any idea about this?

May-13-14 09:54:51
How to setup Variable Initial Value?
Category: Programming

Dear everyone,

I am using OpenModelica, and meet a problem.

In my model, I initialize each variable with C0, such as
Real C[N](each start = C0)

However, I need C0 to change at some certain time. For example, I use "for loop".  At the beginning of each loop, I want to update the value of C0.

How can I do this ?

Many thanks!

  • Index
  • » Users
  • » Changfu
  • » Profile
You are here: