Advice on creating model #764
-
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 8 replies
-
@agarciadiego Might be able to offer some insight on this. I believe he has developed a property package for mixed hydrocarbons using the Pen-Robinson EoS that might be exactly what you need for this. The one thing that I can see that IDAES is missing right now is the three stream heat exchanger, for which you wound need to develop your own model. However, we we would be interested in seeing the model you come up with hand possibly adding it to the IDAES model libraries. |
Beta Was this translation helpful? Give feedback.
-
Thank you guys, much appreciated. I will try to look at how to create the heat exchanger. Kind regards |
Beta Was this translation helpful? Give feedback.
-
Hi again. I realized that it was a little bit complex and time consuming to develop my own LNG heat exchanger. However I found another method that use two shell and tube heat exchangers in a way that mimics a multistream heat exchanger. I refer to the following article: I took your advice on creating my property package from the already existing hydrocarbon package. I've changed and added all the necessary properties and values for the task at hand (I think at least). I created my IDAES model and connected all my unit models and transformed the arcs with TransformationFactory. The initialization started and found optimal results all the way until the heat exchanger. It seems like there are some scaling problems from the output logs. Anyway, attached is the Property package, Jupyter notebook IDAES model, Output log (DEBUG) from my last attempt at initialization, and pictures showing the model in HYSYS and by the visualization tool in IDAES and finally the article referred to above. Could you perhaps take a look and if possible come up with a solution to how I can get my model to initialize and also how I achieve a square problem so there are no problems with the degrees of freedom. I appreciate any help to move forward on this. Kind regards, |
Beta Was this translation helpful? Give feedback.
-
Hi Magnus,
I took a quick look at your flowsheet, and whilst I wasn’t able to work out all of what is going on, however the first thing that is obvious is that you initially had 15 degrees of freedom but that you fixed 20 operating conditions. Thus, it is not surprising that you have -5 DoF after this.
Looking at the diagram of the system, I think I see the problem: the tube side seems to be completely cyclic (i.e. there are inlets/outlets to this cycle). This means that the entire loop is self-referential – by setting the conditions at any point in the cycle this defines the conditions at every other point in the cycle and eventually cycles back around to implicitly defining that same variables you just fixed. Hence, you cannot define any conditions in that cycle without over-specifying the system. What you need to do is break the cycle at some point (i.e. leave out one of the Arcs), and then treat the break point as an inlet. Given the completely cyclic nature of your system, the “outlet” at the other end of the break should end up being identical to the conditions at the inlet, but you should verify this to be sure. To me, the most obvious point to put this break would be between the Mixer and Compressor unit.
Andrew
From: MagnusMyhre ***@***.***>
Sent: Friday, April 22, 2022 12:04 PM
To: IDAES/idaes-pse ***@***.***>
Cc: Lee, Andrew (FN) ***@***.***>; Comment ***@***.***>
Subject: [EXTERNAL] Re: [IDAES/idaes-pse] Advice on creating model (Discussion #764)
Hi again.
I realized that it was a little bit complex and time consuming to develop my own LNG heat exchanger. However I found another method that use two shell and tube heat exchangers in a way that mimics a multistream heat exchanger. I refer to the following article:
MSHE.pdf<https://github.com/IDAES/idaes-pse/files/8542234/MSHE.pdf>
I took your advice on creating my property package from the already existing hydrocarbon package. I've changed and added all the necessary properties and values for the task at hand (I think at least).
I created my IDAES model and connected all my unit models and transformed the arcs with TransformationFactory.
My problems start now with the specification and initialization of the model.
I added my conditions to the model, and the degrees of freedom are unfortunately -5. I used the sequential decomposition tool and added the tear guesses where I saw fit.
The initialization started and found optimal results all the way until the heat exchanger. It seems like there are some scaling problems from the output logs.
Anyway, attached is the Property package, Jupyter notebook IDAES model, Output log (DEBUG) from my last attempt at initialization, and pictures showing the model in HYSYS and by the visualization tool in IDAES and finally the article referred to above.
IDAES_model.zip<https://github.com/IDAES/idaes-pse/files/8542368/IDAES_model.zip>
Could you perhaps take a look and if possible come up with a solution to how I can get my model to initialize and also how I achieve a square problem so there are no problems with the degrees of freedom. I appreciate any help to move forward on this.
Kind regards,
Magnus
—
Reply to this email directly, view it on GitHub<#764 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AD4VSX7XINVMEWOR676QF5DVGLEYFANCNFSM5RLTCAGA>.
You are receiving this because you commented.Message ID: ***@***.******@***.***>>
********************************************************************
This message does not originate from a known Department of Energy email system.
Use caution if this message contains attachments, links or requests for information.
********************************************************************
|
Beta Was this translation helpful? Give feedback.
-
Hi Magnus,
Looking at the your code, I think the reason you ae seeing initializing errors with the heat exchangers is because you are fixing the outlet temperatures on both sides of the unit. I see two problems with this:
1. First, for HE101 you are defining the temperature at both outlets (shell and tube), but I am fairly certain that is making the problem degenerate. Due to the heat balance on the unit, you can only specify one of the outlet temperatures. The second degree of freedom you need to fix for the heat exchanger is either the area or heat transfer coefficient.
2. Secondly, whilst setting the outlet temperature it is a valid way to define the DoF of the heat exchanger, the in-built initialization routines were not built with that in mind (there are so many ways it could be done, unfortunately we couldn’t anticipate all options).
This could well be the reason you are seeing the evaluation errors – a degenerate problem can easily run into evaluation errors.
Andrew
From: MagnusMyhre ***@***.***>
Sent: Wednesday, May 4, 2022 1:39 PM
To: IDAES/idaes-pse ***@***.***>
Cc: Lee, Andrew (FN) ***@***.***>; Comment ***@***.***>
Subject: [EXTERNAL] Re: [IDAES/idaes-pse] Advice on creating model (Discussion #764)
Hi Andrew, thanks for your reply.
I did what you said, breaking the loop between the mixer and compressor and this solved at least the initialization heuristic tree and the DOF.
However when I try to initialize it says in the output log that there is to few degrees of freedom when initializing the heat exchangers. And I receive some evaluation errors including cutting alpha back. Could the reason for this be caused by the fact that my shell outlet is indirectly connected with the tube inlets? Because of this my other unit models get infeasible solutions and I get the initialization error.
I decided to make 2 property packages, because I had no need for the propane component beside only in two of the unit models. They are identically, but one of them include the Propane component. Also I replaced the valves with the PressureChanger set with "compressor" = False and "thermodynamically assumption" = Adiabatic
Could you take a look and see if you find a solution?
Attached is the property packages and the revised model including the last output log(DEBUG).
IDAES_model_rev.zip<https://github.com/IDAES/idaes-pse/files/8624775/IDAES_model_rev.zip>
Kind regards,
Magnus
—
Reply to this email directly, view it on GitHub<#764 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AD4VSXZTQSIK4IE5GK3MUV3VIKYZZANCNFSM5RLTCAGA>.
You are receiving this because you commented.Message ID: ***@***.******@***.***>>
********************************************************************
This message does not originate from a known Department of Energy email system.
Use caution if this message contains attachments, links or requests for information.
********************************************************************
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
@agarciadiego Might be able to offer some insight on this. I believe he has developed a property package for mixed hydrocarbons using the Pen-Robinson EoS that might be exactly what you need for this.
The one thing that I can see that IDAES is missing right now is the three stream heat exchanger, for which you wound need to develop your own model. However, we we would be interested in seeing the model you come up with hand possibly adding it to the IDAES model libraries.