Dymola:使用非线性求解器初始化区域供热网络模拟

问题描述 投票:3回答:1

我一直在Dymola建模和模拟一些简单的区域供热网络,并且在初始化过程中经常遇到错误。

我们正在模拟的系统包括

  • 生产者:两个压力边界 - 源和汇。通过PI控制源处的压力,其确保源压力使得消费者的最小压差大于或等于某个设定值。
  • 消费者:他们有一个PI控制阀和一个固定返回温度的热交换器。阀控制质量流量,随后控制热流以在任何给定时间匹配消费者负载。
  • 管道:具有热损失的动态热水力模型和考虑延迟的空间分布。矢量化端口和混合体积用于减少非线性方程。

下图是该网络的一个大大简化的版本(此处发生相同的错误)enter image description here消费者模型如下所示:enter image description here和生产者:enter image description here

在初始化期间,发生以下错误:

        ERROR: Failed to solve non-linear system using Newton solver.
    To get more information: Turn on Simulation/Setup/Debug/Nonlinear solver diagnostics/Details
    Solution to systems of equations not found at time = 0
       Nonlinear system of equations number = 3
       Infinity-norm of residue = 118280
       Iteration is not making good progress.
       Accumulated number of residue       calc.: 389
       Accumulated number of symbolic Jacobian calc.: 5
       Last values of solution vector:
    L.PI.gainPID.y = 0
       Last values of residual vector:
    { -118280 }
Trying to solve non-linear system using global homotopy-method.
... loading "data" from "C:/Users/Sim1/Desktop/Keith Dymola Files/GrazReininghaus_UseCase/PythonScriptsforTranslation/Reininghaus.txt"
ERROR: Failed to solve non-linear system using Newton solver.
To get more information: Turn on Simulation/Setup/Debug/Nonlinear solver diagnostics/Details
Solution to systems of equations not found at time = 0
   Nonlinear system of equations number = 1
   Infinity-norm of residue = 2.22814E+018
   Iteration is not making good progress.
   Accumulated number of residue       calc.: 101
   Accumulated number of symbolic Jacobian calc.: 9
   Last values of solution vector:
M.port_a.m_flow = 0.000485868
N.valveLinear.dp = -55.8243
O.valveLinear.dp = -135.618
P.valveLinear.dp = 550.474
I.port_a.m_flow = 3.20321E-010
C.port_a.m_flow = 2.19343E-011
D.port_a.m_flow = 0.00208272
E.valveLinear.dp = 371.552
L.port_a.m_flow = -7.10982E-012
J.valveLinear.dp = 243.085
K.port_a.m_flow = 1.924E-005
   Last values of residual vector:
{ 6.60393E+013, -1.14781E+018, -1.05438E+018, -2.58754E+016, -111988,
  -1.56817E+010, 16024.9, 3.14411E+007, 3.99781E+008, 3.14412E+007,
  -15012.9 }

Error: could not solve simplified initialization for homotopy method.
Error: could not solve simplified initialization for homotopy method.
FixInitials:Init

组件A,B,C e.t.c是网络中的消费者。我正在使用Radau IIa 5阶解算器,tol = 1e-06。消费者阀门inittype中的PI控制器仅与integrtor状态集成,生产者中的PI初始化为输出值。我尝试过使用网络中质量流量和压降的各种标称值,以及PI控制器中的初始值,但始终返回相同的形式ERROR。模型通过了错误检查,但在初始化时总是失败。

我想知道是否有人有调试这种非线性系统的经验,如果有的话,关于如何初始化这些模型的一些技巧将对调试过程有很大帮​​助。

initialization modelica dymola
1个回答
2
投票

好吧,对于任何有兴趣的人,我设法最终模拟我的网络。事实证明,初始化问题出现在消费者的“一阶”区块中,该区块在热交换器中获取测量的热流信号并将其传递给PI。该组件的默认初始化类型是“noinit”,但是通过将其更改为接受初始猜测值(在这种情况下工作的标称用户负载),初始化部分通过。我想在这个例子中出现了这个问题,因为我的消费者标称负载比前面的例子高很多,因此初始值超出了合适的范围而没有手动指定。

© www.soinside.com 2019 - 2024. All rights reserved.