Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Thermohydraulic system initialization

Thermohydraulic system initialization

How to set values to all the variables that could be possibly used as iteration variables, for example, there is a heat exchanger which includes a few connectors, and each connector includes a few variables, I can't know which variables could be used as iteration variables, when dealing with initialization, do I need to set values to every variable so that no matter which variable is chosen as iteration variable, there is a reasonable value?

Re: Thermohydraulic system initialization

As far as I know, you don't, but that depends on your model. In the MSL they are using "acceptable" values in types and then use these types.

Modelica tools will prioritize start values that are set via modifications close to the top level in the instance hierarchy.
So, if you have issues set the start values via variable modifications in your top model.
Also, most tools can tell you which variables are used as iteration variabels via some flags.

To make matters worse tools use different variables as iteration variables so models working in one tool (because of proper start values) will not initialize in another.

Re: Thermohydraulic system initialization

Let's take ThermoSysPro as an example, in ThermoSysPro, it deals with the initialization problem as @adrpo said, liked showed in the following screenshot which is from the example model shipped with ThermoSyspro, but when I try to use the same method, I really can't find which variable I should set values to, cause I don't know which variable causes the initialization failure in a big system.

https://imgur.com/sdV6ZCo

Here is another method from Thermal Power Library developed by Modelon, in this library, each component seems to transfer the values layer by layer until to the iteration variables, but again, I am not sure which variables are chosen as iteration variables in advance, so I have to modify the code after an initialization failure.

https://imgur.com/Dg566KJ

https://imgur.com/c18Y68V

Edited by: fuyiwei - Apr-10-20 07:42:43

Re: Thermohydraulic system initialization

Here is a similar question on StackOverflow.

https://stackoverflow.com/questions/609 … ica-models

There are 0 guests and 0 other users also viewing this topic
You are here: