0
votes

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?

enter image description here

enter image description here

enter image description here

2

2 Answers

2
votes

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.

0
votes

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

enter image description here

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))

enter image description here

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