Stream Mixing Temperature Increase
Moderator: jasper
Stream Mixing Temperature Increase
The attached flowsheet shows a temperature increase in the water when passed through each successive Unit. Why does the temperature change? Was something configured incorrectly?
Re: Stream Mixing Temperature Increase
Can you send me the fsd? Thank you.
Stream Mixing Temperature Increase 2
I have emailed the requested file. Thanks for your help.
Re: Stream Mixing Temperature Increase
The water package is based on the steam tables. Please see here for most of the equations:
http://www.iapws.org/relguide/IF97-Rev.pdf
(note that some revisions on backwards equation, particularly in region 3, have been used instead of the ones in this document)
Please have a look at eq 11, and particularly its deviation from the basic equation, which is given in eq 12. This is the deviation you are seeing.
It can be circumvented, I suppose, by refining the temperature answer that is obtained from the backwards equation by using an iterative approach, but this will surely make the code more complex (please note that this code also serves as example code) and the PH and PS flashes slower to solve (note that these implementations are based on the backward equations).
So let me ask you this, given that the deviation you see is the deviation that is present in the equations as presented by the steam tables themselves, do you experience this deviation as too large?
Please note that you can verify the implementation (http://www.cocosimulator.org/down.php?d ... source.zip), as it is open source. Particularly, the IAPWS document provides check data for validating correct implementation of the equations, which you can find in the code (and all tests pass); this does not necessarily imply all answers are correct (there could be logic errors) but in this case I believe the answer to be correct, in the sense that it matches both the equations and the deviation as documented by IAPWS.
To answer your actual question: no - you did not configure anything wrongly.
http://www.iapws.org/relguide/IF97-Rev.pdf
(note that some revisions on backwards equation, particularly in region 3, have been used instead of the ones in this document)
Please have a look at eq 11, and particularly its deviation from the basic equation, which is given in eq 12. This is the deviation you are seeing.
It can be circumvented, I suppose, by refining the temperature answer that is obtained from the backwards equation by using an iterative approach, but this will surely make the code more complex (please note that this code also serves as example code) and the PH and PS flashes slower to solve (note that these implementations are based on the backward equations).
So let me ask you this, given that the deviation you see is the deviation that is present in the equations as presented by the steam tables themselves, do you experience this deviation as too large?
Please note that you can verify the implementation (http://www.cocosimulator.org/down.php?d ... source.zip), as it is open source. Particularly, the IAPWS document provides check data for validating correct implementation of the equations, which you can find in the code (and all tests pass); this does not necessarily imply all answers are correct (there could be logic errors) but in this case I believe the answer to be correct, in the sense that it matches both the equations and the deviation as documented by IAPWS.
To answer your actual question: no - you did not configure anything wrongly.
Re: Stream Mixing Temperature Increase
Turns out this inconsistency was rather disturbing in some other contexts, so I implemented the iterative refinement after all. Please find the update available via CUP. The source is available for your inspection as well. Let me know if it gives you any trouble.
Re: Stream Mixing Temperature Increase
Hi Jasper,
I'm curious if this will also affect my simulations. I'm extensively using the Water package, and the flowsheets don't always converge.
Could you please have a look at this eror:
Henk
I'm curious if this will also affect my simulations. I'm extensively using the Water package, and the flowsheets don't always converge.
Could you please have a look at this eror:
Thanks!Downloading "TERNYP64.dll304239733638689633.cup"
Failed to download "TERNYP64.dll304239733638689633.cup": Problem obtaining "/cup/coco64/TERNYP64.dll304239733638689633.cup": 404 Not Found
One or more downloads failed. Please try again later.
Henk
Re: Stream Mixing Temperature Increase
The download should be fixed now; the upload failed yesterday. Thanks for reporting.
Re: Stream Mixing Temperature Increase
HenkF: What are you findings, does all work as expected?
Re: Stream Mixing Temperature Increase
Hi Jasper,
sorry for the delayed answer. All and all it is performing very well, but in complex situations (attached flowsheet) it's still pretty hard to get a converged flowsheet.
Especially in the flash (drum) area some manual aid is needed (e.g. setting the vapour fraction, and manupilating the fluegas stream temperature to get to an adiabatic drum operation). I attached the file.
Regarding the flowsheet options : which Newton type is best used? In the past I was rather succesfull in using direct substitution methods. Rather slow, but convergence is quite sure. Would it be possible to implement such a method with COFE. Or is it already available, by adapting some settings?
Regarding Excel integration I find COCO/COFE unprecedented. Love to use it!
best regards,
Henk
sorry for the delayed answer. All and all it is performing very well, but in complex situations (attached flowsheet) it's still pretty hard to get a converged flowsheet.
Especially in the flash (drum) area some manual aid is needed (e.g. setting the vapour fraction, and manupilating the fluegas stream temperature to get to an adiabatic drum operation). I attached the file.
Regarding the flowsheet options : which Newton type is best used? In the past I was rather succesfull in using direct substitution methods. Rather slow, but convergence is quite sure. Would it be possible to implement such a method with COFE. Or is it already available, by adapting some settings?
Regarding Excel integration I find COCO/COFE unprecedented. Love to use it!
best regards,
Henk
- Attachments
-
- COFE_MSW.fsd
- (423.52 KiB) Downloaded 1595 times
Re: Stream Mixing Temperature Increase
Contact me on my private mail if you are interested in testing the alpha of the new solvers. They should improve convergence in general.
To answer your question: full Newton is best, if the Jacobian is not overly expensive. I believe you have flowsheets typically with one or two compounds, so the Jacobian is cheap. Stick with full Newton.
To answer your question: full Newton is best, if the Jacobian is not overly expensive. I believe you have flowsheets typically with one or two compounds, so the Jacobian is cheap. Stick with full Newton.