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

OPTIMIZATION OF FLATTENED EQUATIONS

OPTIMIZATION OF FLATTENED EQUATIONS

Hello,

When we optimize a set of flattened equations using 'bltdump' command is it possible that for a linear electrical circuit, an optimized sorted equation can contain the same variable(say an inductor current or a capacitor voltage) both in normal form and inside derivative? I did not find it so. But I need the information for further processing of the set of equations.

Regards,
AC.

Re: OPTIMIZATION OF FLATTENED EQUATIONS

Hi,

I am not really sure if I got the question, but from a theoretical point of view this is possible. It depends on the model. Do you have an example?

Re: OPTIMIZATION OF FLATTENED EQUATIONS

I'm not really sure what the question it, but certainly when-equations may cause a state variable der(x) to also appear as reinit(x, ...). However, if a variable is selected as a state, it is always solved as a state in OpenModelica (which means no equation can contain x on the left handside; right handside I am not sure of though).

Re: OPTIMIZATION OF FLATTENED EQUATIONS

I can give an example for my question. Suppose I have an R-L series circuit excited with a voltage source. One of the circuit eqns can be:

V=R*i+L*der(i), where i being the inductor current is a state variable. That case state variable 'i' is inside der( )  and also in normal form(with R) in the same eqn.

Or,the other way of writing this can be something like:

V1=R*i
V2=L*der(i)
V=V1+V2

So here 'i' is present in der in one eqn & in other eqn it is in its normal form(with R).

I have chosen R-L circuit just to describe the situation. My question is can I be assured that the optimizer will always take the first or the second way in case of any linear circuit? Or can I control the optimizer (by some command line parameters or some other way) to go for either of the two ways? Presence of state variable in the left hand side or right hand side of the equation in 'der' form or in normal form is not an issue for me now.

Regards,
AC.

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