在Dymola中,我经常会遇到一个非线性系统初始化失败,或者是一个在大型热流体系统中很难解决的刚性系统,但是对于一个简单的系统来说,不会出现这样的问题。我的问题是:
,
发布于 2020-04-29 14:00:53
这些都是相当困难的问题,要以普遍有效的方式来回答。尽管如此,我仍将尝试与Dymola和非线性系统分享我的一些经验。
有多个方面。
- I have worked on some models that made the C-Compiler run out of memory during compilation. If you have this sort of problem, forcing 64Bit compilation by setting `Advanced.CompileWith64=2` can help. Then you shouldn't run out of memory any more. This only refers to the size only.
- Performance for non-linear systems can be improved by activating DAE-mode by setting `Advanced.Define.DAEsolver=true`. This does not work with all solvers though.
- Additionally to the above it can help to set `Advanced.MoveEquationsToDynamics=true`, for which the manual states: "It forces the integrator to solve the nonlinear equations each integrator step and thereby it also updates the initial guesses more often."
- As mentioned by Erik, the `homotopy()`-operator can be very important as it helps the solver converging in case of difficult initialization.
发布于 2020-04-30 06:49:30
我非常同意Markus的建议,但也想提醒大家一下Modelica的同伦算子。一个精心选择的简化模型可以极大地帮助Dymola对一个大而困难的非线性系统的模型进行初始化。
通常,在求解非线性系统时,良好的初始猜测是非常重要的。使用同伦只是提供这些好猜测的一种隐式方法。
https://stackoverflow.com/questions/61408790
复制相似问题