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

Bordered-Lower-Triangular Matrix | Tearing | Algebraic loops|Residuals

Bordered-Lower-Triangular Matrix | Tearing | Algebraic loops|Residuals

Hello!

I coded an algorithm to break algebraic loops based on "Practical Realization and Adaptation of Cellier’s Tearing Method". It works: residual equations, tearing variables, etc. are determined properly. The right Bordered-Lower-Triangular matrix is generated.

I tried two approaches to solve it: optimization methods and non-linear solvers. But I couldn't. If the initial guesses of the tearing variables/optimization variables are a bit far from the actual value of the variables, they don't work.

I suspect that I'm writing the objective function (optimization) and the residuals (non-linear solver) in the wrong way.

Please, could you give me any advice or reference?

Thanks a lot!



Re: Bordered-Lower-Triangular Matrix | Tearing | Algebraic loops|Residuals

In theory, should Newton-Raphson be enough?

Thanks

Re: Bordered-Lower-Triangular Matrix | Tearing | Algebraic loops|Residuals

Sometimes, NR is enough. Often it is not; especially when you have discontinuous signals (hybrid systems, events). By using tearing you have reduced the number of unknowns but the system is more sensitive to bad start-values. Are you able to solve the system without applying tearing? If you can do that you can try feeding start-values close to the true values and see if it converges better.

Re: Bordered-Lower-Triangular Matrix | Tearing | Algebraic loops|Residuals


I have continuous systems (with IF statements and calls to highly non-linear external functions).

I didn't try without tearing. I assumed that tearing was always worthy.

So, is BLT the first option and BLT + Tearing like a plan B?

Thanks!!!!!

Re: Bordered-Lower-Triangular Matrix | Tearing | Algebraic loops|Residuals

You don't really know until you try current/smile

Well, a triangular matrix is always preferred, but if you do have algebraic loops, tearing is often a good choice especially for very large algebraic loops provided you can find good tearing variables.

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