Opened 6 years ago
Last modified 3 years ago
#5256 assigned defect
Non-linear system iterations
Reported by: | Owned by: | Francesco Casella | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Run-time | Version: | v1.13.0-dev.beta1 |
Keywords: | non-linear solver, external function | Cc: |
Description
Good afternoon,
I'm modeling thermo-fluid systems with OpenModelica.
These vectorial equations "produce" an algebraic loop (see model "AlgebraicLoop.test"):
Dn = VaporDn(P = P, T = T);
Hn = VaporHn(P = P, T = T);
The thermo functions are highly dependent on temperature.
Every time that the algebraic loop is solved, a lot of iterations are needed:
############ Solve nonlinear system 37 at time 1 ############
initial variable values:
[ 1] volume.P = 100169.17 nom = 100000
[ 2] volume.T = 499.97788 nom = 300
Solution status: SOLVED
number of iterations : 1263
number of function evaluations : 4588
number of jacobian evaluations : 1263
solution values:
[ 1] volume.P = 100169.17
[ 2] volume.T = 499.97788
Even when the initial values are really close to the solution, a lot of iterations are needed. Why is this happening?
My time step is 1 second and the solver dassl.
The thermo belongs to my company, is there a way to share the package only with the developers?
Thanks in advance
Jose
Attachments (1)
Change History (8)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Thanks for the quick answer and sorry for the delay (I was in my honeymoon).
The nominal values and the Newton tolerance didn't change the number of iterations.
Kinsol is worse in this case because of this message:
{{{[1] Real volume.P(start=99493, nominal=100000)
[2] Real volume.T(start=773.15, nominal=500)
Fatal error on line 900, column 10: tag mismatch}}}
The library that contains the model is encrypted and attached.
Thanks!
Jose
comment:3 by , 6 years ago
Component: | *unknown* → Run-time |
---|---|
Milestone: | Future → 1.14.0 |
Owner: | changed from | to
Status: | new → assigned |
comment:4 by , 5 years ago
Milestone: | 1.14.0 → 1.16.0 |
---|
Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0
comment:6 by , 4 years ago
Milestone: | 1.17.0 → 1.18.0 |
---|
Retargeted to 1.18.0 because of 1.17.0 timed release.
Some actions you can try
-nls=kinsol
)-newtonFTol=1e-10
(the default is 1e-12, which may be too tight if the VaporDn and VaporHn functions are numerically noisy)To send the model you can encrypt the source code files as explained here and then attach it to the ticket