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

Non-liner solver couldn't converge during the initialization in Dymola

我在使用 ThermoSysPro 库时在初始化过程中遇到错误。

好像Turbine5.Pe比Turbine2.Pe大,所以结果是负数。但是我检查了我的参数,应该不会有这样的问题。

这是非线性求解器无法求解下图方程的原因吗?

信息不足,我建议在模拟设置>调试>非线性求解器诊断中设置详细信息and/or非线性迭代以获取更多信息。

导致问题的完整表达式是sqrt((Turbine2.Pe^2-Turbine5.Pe^2)/(Turbine2.Cst*Turbine2.proe.T))

因为两个Pe值都是fixed=true,看来不太可能是错的,但是没有完整的模型是不可能看出来的。

但是,Cstproe.T 也有可能是负数,或者根据其他值计算出负值。

没有完整的模型是无法分辨的

根据ThermoSysPro(来自EDF https://github.com/alex19941215/ThermoSysPro ) and ThermalPower(Commercial library from Modelon https://www.modelon.com/library/thermal-power-library 的开源库)的对比,应该对面临同样情况的人有所启发。

这是 ThermoSysPro 库的代码形式:

Connectors.FluidInlet Ce
Connectors.FluidOutlet Cs

这是 Thermal Power 库中的类型代码:

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

从代码中我们可以看出,在Thermal Power库中,每个连接器的属性都是根据参数赋值的,而在ThermoSysPro库中,连接器使用的是默认值,可能为零。所以这就是 Thermal Power 库在初始化收敛方面表现更好的原因