3

I build a model in dymola. Even though there are some errors during the initialization process, but the calculation succeeded at last. enter image description here

After the model converged successfully, I tried to use the "Save start values in the model" option to get the right iteration variable strat values stored into the model so that the model would NOT get errors in the next calculation. But after I did this and tried to do calculation once more, I still got the same errors.

So, my question is: Could I use the "Save start values in the model" to help convergence? If so, how should I do it?

enter image description here enter image description here enter image description here

Jack
  • 1,094
  • 6
  • 16
  • 1
    related: https://stackoverflow.com/questions/34661475/how-to-initialize-model-with-previous-simulation-solution – matth Dec 02 '19 at 07:44
  • I also tried the answers on https://stackoverflow.com/questions/34661475/how-to-initialize-model-with-previous-simulation-solution, and if I use the dfinal.txt to continue the simulation, it did work fine. Bu the problem is that I only have built a small part of the whole model, if I put more components in my model, the calculation just couldn't converge, so I couldn't get a useful dfinal.txt file. I thought I need to make the model converge first. – Jack Dec 02 '19 at 07:46
  • So, my guess is that there should be some methods allowing me to store the consistent start values I got from a successful calculation into the model file, and then put some more components in the model, do more test calculations, and store the result into the model again. – Jack Dec 02 '19 at 07:55
  • 1
    Previously, your start values were not updated because you had not changed them. I think after using the dsfinal.txt as dsin.txt and a second successfull simulation, you can click the store start values once more, and this time it should update the start values. – matth Dec 02 '19 at 07:58
  • 1
    After a successful calculation, I import the dfinal.txt file as initial values, then the calculation ends with no error. So I use "Save start values in the model" option again, and the start values in each component change actually. Here is the screenshot of the custom parameters generated by Dymola. https://imgur.com/qfd3LIJ . But when I tried to do another simulation, there are still errors. – Jack Dec 02 '19 at 08:12
  • 1
    The idea is from the Book " Modeling and Simulation of Thermal Power Plants with ThermoSysPro". Here is the procedure for providing better initialization values. https://imgur.com/QGmVc1G – Jack Dec 02 '19 at 08:56

2 Answers2

2

Are you certain that there are error messages?

The simulation log indicates that you have enabled Simulation Setup>Debug>Nonlinear iterations

That gives debug messages in the simulation log for every iteration of the non-linear solver, regardless of whether there is a problem or not. (Which can be good for analyzing errors, but should not be on as default as it generates large log-file.)

If disabling that flag doesn't remove all messages, it would be necessary to see the remaining messages and the model to understand the problem; as the previously indicated procedures should work.

Hans Olsson
  • 11,123
  • 15
  • 38
  • Just like you said It is not that kind of error that would cause the calculation stopped. I think it is because the provided guess values are appropriate so that it takes more steps to converge for the model. What I want to do is extract the right guess value from the result and store them into the model so as to make the model converge more quickly. – Jack Dec 03 '19 at 11:38
  • The shown messages are debug-messages, not error messages at all. And they can be disabled by disabling: Simulation Setup>Debug>Nonlinear iterations. There might be error messages as well, but we cannot see them. – Hans Olsson Dec 03 '19 at 14:02
0

The reason is I set the fixed attribute of some parameter as false, the fixed attribute of some variable as true, so I could use the variable's value to initialize the system, and the corresponding parameter would be calculated. when using "save start values in the model" option, it would store the result into the parameter's start attribute, but its value attribute would keep unchanged. When I do simulation again, Dymola would NOT use the parameter's start attribute, it would still use the parameter's value attribute. After I change the value attribute manually, there would be no error anymore.

Jack
  • 1,094
  • 6
  • 16