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

强颜欢笑 提交于 2020-01-25 08:36:08

问题


I met an error during initialization when using ThermoSysPro library.

It seems like the Turbine5.Pe is larger than Turbine2.Pe, so the result is negative. but I checked my parameters, there shouldn't be such a problem.

Is this because the nonlinear solver couldn't solve the equation in the following picture?


回答1:


There is not enough information and I would recommend to set Details and/or Nonlinear iterations in Simulation setup>Debug>Nonlinear solver diagnostics to get more information.

The full expression causing the problem is sqrt((Turbine2.Pe^2-Turbine5.Pe^2)/(Turbine2.Cst*Turbine2.proe.T))

Since the two Pe-values have fixed=true it seems unlikely that they are wrong, but it is impossible to see without the complete model.

However, it is also possible that either Cst or proe.T is negative, or computed to a negative value based on other values.

Without a complete model that is impossible to tell.




回答2:


According to the comparison between ThermoSysPro(Open source library from EDF https://github.com/alex19941215/ThermoSysPro ) and ThermalPower(Commercial library from Modelon https://www.modelon.com/library/thermal-power-library ), there should be some inspiration for people faced with the same situation.

Here is the code form ThermoSysPro library:

Connectors.FluidInlet Ce
Connectors.FluidOutlet Cs

Here is a type code from Thermal Power library:

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

From the code, we can see that in the Thermal Power library each connector's attribute is assigned values according to the parameters, but in the ThermoSysPro library, the connector is using default values, probably zero. So that's why the Thermal Power library has better performance in the term of initialization convergence



来源:https://stackoverflow.com/questions/58990360/non-liner-solver-couldnt-converge-during-the-initialization-in-dymola

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!