Replies: 1 comment
-
|
In general, model-specific initialization methods consider only the constraints created by the unit/property model and not additional ones added by the user. Adding additional constraints on the unit model before initialization can result in too few degrees of freedom. You should wait until after initialization to add any additional constraints that you have. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I’d like to share some thoughts based on a simple example I created. The system diagram is shown below, and the objective is to calculate the outlet temperature.

In the model, I applied two constraints: one to fix the flow rate of H2feed and another to fix the outlet temperature of H2heater.


The mixer report before initialization is shown below:

As you can see, the specified values were not passed to the mixer before initialization — all parameters remain at their initial default values.
The report after initialization is as follows:

At this stage, the outlet temperature of H2heater has been successfully constrained. However, the flow rate of H2feed has not been constrained.
The report after solving the model is as follows:

Here, both constraints are correctly applied, and the flow rate of H2feed is as expected. This indicates that the constraint on H2feed itself is correctly defined but was not applied during initialization.
My guess is that because H2feed is located at the beginning of the system, it was not included in the initialization process. In this simple case, the abnormal flow value at inlet2 after initialization does not affect the final results. However, in more complex systems, such incorrect initialization values could lead to convergence failure or even model crashes (which I have already encountered in practice).
Suggested Solution:
Adding the following code during the initial parameter setup can assign a reasonable initial value to H2feed:
Summary:
Constraints applied to feed units may not take effect during the initialization process, which can potentially cause issues in later calculations. Therefore, it is important to pay special attention to this when building models.
Share the codes here:
Beta Was this translation helpful? Give feedback.
All reactions