非线性求解器在Dymola初始化期间无法收敛

时间:2019-11-22 08:35:39

标签: modelica dymola

使用ThermoSysPro库时,初始化期间遇到错误。

Turbine5.Pe似乎大于Turbine2.Pe,因此结果为负。但是我检查了参数,应该不会有这样的问题。

这是因为非线性求解器无法解决下图中的方程式吗?

enter image description here

enter image description here

enter image description here

2 个答案:

答案 0 :(得分:2)

没有足够的信息,我建议在“仿真设置”>“调试”>“非线性求解器诊断”中设置“详细信息”和/或“非线性迭代”以获取更多信息。

引起问题的完整表达式为sqrt((Turbine2.Pe^2-Turbine5.Pe^2)/(Turbine2.Cst*Turbine2.proe.T))

由于两个Pe值均具有fixed = true,因此看来它们不太可能是错误的,但是如果没有完整的模型就无法看到。

但是,Cstproe.T也可能为负数,或基于其他值计算为负数。

没有一个无法分辨的完整模型。

答案 1 :(得分:0)

根据ThermoSysPro(来自EDF https://github.com/alex19941215/ThermoSysPro的开源库)和ThermalPower(来自Modelon https://www.modelon.com/library/thermal-power-library的商业库)之间的比较,应该为面临同样情况的人们提供一些启发。

这是ThermoSysPro库的代码形式:

Connectors.FluidInlet Ce
Connectors.FluidOutlet Cs

enter image description here

这是火电库中的类型代码:

Interfaces.FlowPort feed(
h_outflow(start=hstartin))
Interfaces.FlowPort drain(
p(start=pstart),
h_outflow(start=hstartout))

enter image description here

从代码中我们可以看到,在Thermal Power库中,每个连接器的属性均根据参数分配了值,但是在ThermoSysPro库中,连接器使用的是默认值,可能为零。这就是为什么热功率库在初始化收敛方面具有更好的性能