Stand Alone vs Internal Flowsheet

Discusses use of COCO, the process simulation and modelling software suite from AmsterCHEM, downloadable from http://www.cocosimulator.org

Moderator: jasper

Stand Alone vs Internal Flowsheet

Postby HenkF » 25 July 2021, 09:23

Dear Jasper,
attached you find 2 flowsheets of steam circuit: one stand-alone, another with the stand-alone flowsheet included as an internal flowsheet. The stand-alone version solves, the one with the internal flowsheet doesn't.
Can you please give me a clue how this can be tackled. FYI: I solved the control issue by manipulation of 2 splitters. Thanks for the advice then.

Enjoy your weekend, and best regards!
Henk
Attachments
Steam Circuit Internal Flowsheet.fsd
(58.8 KiB) Downloaded 777 times
Steam Cycle Stand Alone.fsd
(46.39 KiB) Downloaded 769 times
HenkF
 
Posts: 87
Joined: 24 February 2013, 14:50
Location: Hengelo,NL

Re: Stand Alone vs Internal Flowsheet

Postby jasper » 26 July 2021, 14:14

This one is complicated. So is the answer. Sorry about that.

First some starting notes:

1) the problems are not equivalent. If you provide the same feed values and the same starting values, both are plagued with convergence issues. Also I have a feeling that the thermo is not entirely consistent between the problems (e.g. different compound parameters), but I did not check; what I did check was running one problem with the solution of the other, and this was not converged at initial guess (close, but some 0.1 K off on the measured streams).

2) the inner flowsheet has a maximum of only 5 iterations. Upon changing this I noticed that the stop button did not work when in the edit window of the embedded flowsheet. This is fixed (CUP). Also problems with paste and delete in the stream dialog of the embedded flowsheet are fixed.

3) the logs are flooded with temperature out of range for solid heat capacity. This is because of these limits that are not there:

Screenshot 2021-07-25 124553.png
Screenshot 2021-07-25 124553.png (10.08 KiB) Viewed 11039 times


I would suggest either putting those limits in, or setting the solids property package for both the inner and outer flowsheet to "suppress warnings".

4) the drum also floods the log with messages of outlet pressure exceeding inlet pressure (by very little). These can be simply suppressed by setting the pressure drop to zero instead of putting an absolute pressure drop specification.

5) with the flood of warnings disappeared, the verbosity of the embedded flowsheet can be set to normal, verbose or even debug to see more.

6) you have chosen 3 streams as manual cut streams. In addition to that, COFE cuts through an additional 3 streams to break all recycles. This makes for a total of 8 cut streams, where only 5 are needed. I think the convergence of the stand alone case with these 3 manual cut stream selections is .... lucky. And does not always work. I removed them, and let COFE decide.

7) a scale factor of 1 on the measured variables is not appropriate. Leave blank, or specify a reasonable scale factor for temperature (e.g. 300). I left it blank.

8) in the inner flowsheet you can refer to the thermo of the outer flowsheet, so that property package duplication is not needed. I did not make that change.

The problem is highly non-linear and has many local minima and maxima - this is where the convergence problems come from. I did not find an easy way out of this other than to break up the problem in smaller pieces. If you remove the two controllers, the problem seems to solve fine. Also, for this case, a parametric study on the two measured variables by varying the two controlled split factors appears to show that this part of the problem by itself is well defined and converges well. I would therefore suggest a strategy to solve the inner flowsheet without the controllers, and move the controllers to the outer flowsheet, thereby creating a separation of variables.

This creates however lots of noise on the Jacobian in the outer flowsheet, and some tuning of the convergence levels must be done. If the outer flowsheet converges to 1e-5, the inner flowsheet must converge tighter than that (or else the outer flowsheet attempts to solve as tight as the noise on the solution of the inner flowsheet). I conservatively set the convergence on the inner flowsheet to 1e-6 (might not be tight enough, not sure); on its thermo to 1e-8, and all the heat exchangers to 1e-6 as well. It set the maximum number of iterations to 50 (now that the contollers are gone it can use accelerated direct substitution which goes a lot quicker but may require more iterations).

With all of those changes the flowsheet appear to converge reasonably - let me know if not the case. I am attaching the modified version.
Attachments
Steam Circuit Internal Flowsheet_externalControllers.fsd
(52.6 KiB) Downloaded 779 times
User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain

Re: Stand Alone vs Internal Flowsheet

Postby HenkF » 27 July 2021, 07:14

Jasper! Thank you for the guiding and education :D !
It is very much appreciated. I will try the adapted flowsheet, and add your suggestions to the private basic data.
Best regards! Henk
HenkF
 
Posts: 87
Joined: 24 February 2013, 14:50
Location: Hengelo,NL


Return to COCO (AmsterCHEM)

Who is online

Users browsing this forum: No registered users and 2 guests

cron