Jack
Jack

Reputation: 1232

Could I ensure the convergence by setting the min and max boundary of state variables in Dymola?

I was struggling to improve the convergence performance of my model in Dymola during the last month. Now I am thinking about that If I define the min and max attributes of the state variables, like the max mass flow rate is 10000kg/s, the min mass flow rate is 0.01kg/s, during the iteration, when the results reaching to the max or min boundary, would the iteration be continued or it just stops? I am considering if when the iteration result reaches the boundary, the iteration would bounce back in the opposite direction, it might ensure the convergence of my model.

I prepare to do some tests about my idea, If anyone got the same question or opinion, welcome to comment or answer.

Upvotes: 1

Views: 140

Answers (1)

Hans Olsson
Hans Olsson

Reputation: 12517

Setting min/max for variables is unlikely to significantly improve performance in Dymola.

If min/max assertions are active for a variable the solver will reject the step with values out of bounds, and currently not try to map them back to valid values in a clever way. That may skip some computations based on the out-of-bounds values, but it is rare that it matters much - and there is also a cost of rejecting the step etc.

Upvotes: 3

Related Questions