Menu

Understanding the phase change in a mixed flow

2013-11-05
2016-04-07
  • stefan pofahl

    stefan pofahl - 2013-11-05

    Hi,

    I'm lost with the calculation of the Enthalpy of a mixed flow.
    My mixture includes water and now I expect a sudden drop in the
    Enthalpy if the dew point is passed.
    I tried several property methods to calculate this step in the
    property curve. At the moment it seems that only the method "IAPWS-IF97 Steam Tables"
    makes a difference in the calculation. What I do not understand,
    why neither "SRK" nor "NRTL" or "UNIFAC" work as expected. I'm lost and need some
    hints to understand this behavior.
    I have prepared a sample Excel file with a lot of "CalcProp" calls
    (be careful maybe you might want to disable the automatic calculation):
    https://dl.dropboxusercontent.com/u/3639372/DWsim%20Sample.xlsx

    Regards,

    Stefan

    P.S.:
    Is there somewhere a description of the different Property Methods available?
    Which of them are still in draft status.

     
  • Daniel Medeiros

    Daniel Medeiros - 2013-11-06

    Hi stefan,

    You'll need to check the resulting phases for each condition change (T/P), then you'll ask for property calculations on a per-phase basis. Asking for an "Overall" enthalpy won't give you the correct result, at least not in the context of the add-in. You'll have to do a PT-flash calculation, calculate properties for the resulting phases and then use a mixing rule to calculate the overall property (normally a mass/mole averaged sum). Take a look at the samples and you'll understand this a little better.

    I've created a page on the wiki to help you with your tests: http://dwsim.inforside.com.br/wiki/index.php?title=Excel_Add-In_for_Thermodynamic_Calculations

    If you need more help, just ask.

    Regards,
    Daniel

     

    Last edit: Daniel Medeiros 2013-11-06
  • Daniel Medeiros

    Daniel Medeiros - 2013-11-06

    stefan, install dwsim 3 and update the files with the ones inside this RAR package, then you'll be able to load the add-in for DWSIM 3.

     
  • stefan pofahl

    stefan pofahl - 2013-11-06

    Dear Daniel,
    thanks for the immediate reply and the patch, now my previous problems to call the PTFlash function are resolved :-)
    And thanks for the nice explanation on your Wiki.
    I will play around and will post my results here.
    Regards,
    Stefan

     
  • stefan pofahl

    stefan pofahl - 2013-11-06

    Dear Daniel,
    the error messages, when I use the PTFlash are gone, but the calculation of the phase fractions are erroneous, if I compare it with the screen shot of your example.
    Expected (Vapor, Liquid1, Liquid2): 0.923, 0,064, 0.001
    My values(Vapor, Liquid1, Liquid2): 1.000, 0.000, 0.000
    Attached the screen shot and my sample.
    Regards,
    Stefan

     
  • Daniel Medeiros

    Daniel Medeiros - 2013-11-06

    Hi Stefan,

    Try different flash algorithms and validate the results using a gibbs energy (G) comparison. You can calculate the gibbs energy before and after the flash calculation. The result of the equilibrium calculation must always have an equal or lower total gibbs energy when compared to the initial mixture.

    To calculate Gibbs energy of the initial mixture you do two calls, considering it as only vapor or only liquid. The one with the lower gibbs energy should be used.

    I don't remember if you can request a gibbs energy calculation to DWSIM through CalcProp, but you can always calculate it using the relation G = H - TS.

    DWSIM 3 does all of this behind the scenes, but if you're going to use Excel, you'll have a little bit more work to do. :-)

    Regards,
    Daniel

     
  • Daniel Medeiros

    Daniel Medeiros - 2013-11-06

    Just a tip: The Gibbs VLE and VLLE are the most reliable flash algorithms in DWSIM 3 for difficult mixtures, but they are also the slowest ones.

     
  • stefan pofahl

    stefan pofahl - 2013-11-06

    Hi Daniel,
    thanks for your tips. I do not understand you recommendations above.
    The point with checking the free Gibbs energy before and after is not clear to me.
    Attached my Excel file to compare the different Flash Algorithms.
    With no algorithm I'm able to reproduce the numbers shown in your example.
    For you convenience I add along with my sample file also a screen shot to enable you
    to compare the result.
    Regards,
    Stefan

     
  • Daniel Medeiros

    Daniel Medeiros - 2013-11-06

    Take a look at this sheet and see if you can understand what I've did.

     

    Last edit: Daniel Medeiros 2013-11-06
  • Daniel Medeiros

    Daniel Medeiros - 2013-11-06

    FYI, DWSIM doesn't have all the required Peng-Robinson binary interaction parameters for the selected compounds, so this can be a reason why you're getting some invalid results.

     
  • stefan pofahl

    stefan pofahl - 2013-11-06

    Yes, your file helps a lot to understand your tip to test, if the value is valid, thanks a lot :-).
    On your wiki page for the Excel Add-In, it is mentioned that you can retrieve the "gibbsEnergy" ("Non-constant single-phase mixture properties"). Is it planned that this feature is included for the next version of the Excel Add-In? I think the Excel Add-In is indeed a useful tool for a lot of people. Thanks a lot for that :-)
    Regards, Stefan

    P.S.:
    Attached my slightly corrected version of your file.
    P.P.S.:
    I have tried to find this nice table of binary interaction parameters that you have posted, but I failed to open the table in DWsim. Could you give me a hint, how to open this table?

     
  • Gökhan Candan

    Gökhan Candan - 2016-04-06

    Dear Daniel,

    Many thanks for the great work.
    I did came across this flash exercise above when digging into old posts.
    As adviced on DWSim wikipage I have set Nested Loops VLLE however my simulation reaches max. number of iterations. could you maybe have a look?
    Another point I wanted to ask you is, if I could use Gibbs minimization (based on the interesting discussion above) 3 phase model for this exercise? I have simply tried it but unfortunately the simulation crashed every time I've hit the run button.
    If Gibbs model is not possible, what other model in your opinion would simularte this system more realistically?

    PS: I have added same materials both from ChemSep and DWSIM database just for the sake of comparison.

    BR,
    Gökhan

     
  • Gregor Reichert

    Gregor Reichert - 2016-04-06

    Hi Gökhan,
    I tried "Modified Unifac (NIST)" with Nested Loops VLLE as property package. All required interaction parameters are available and this PP should be able to do the job.
    Unfortunaly i encountered a problem in a subroutine where the liquid/liquid equilibrium is calculated as soon as the molar fraction of methane gets above a certain value. I can do some further investigations into that matter the next days.
    Generally speaking you don't need to use an equation of state model like PengRobinson as you use moderate pressures and temperatures. In this case you can use an activity coefficient model like NRTL or UNIFAC. But you need to check if all required parameters are available.
    You also should either use ChemSep components or DWSIM components only. If you put the same components from both databases into a single simulation the calculation effort is much higher and the probability of a failing calculation may become higher.

    Gregor

     
  • Gökhan Candan

    Gökhan Candan - 2016-04-07

    Hi Gregor,

    thank you very much for your fast and elaborated response to the matter above.
    Could you maybe very briefly explain how can I check/ensure that all requiered interaction parameters are in place? Am sorry in case my questions comes irrelevant to you, the thing is that am just beginning to discover DWsim after some years without working actively on process simulations.

    Regards,
    Gökhan

     
  • Gökhan Candan

    Gökhan Candan - 2016-04-07

    Dear Gregor,

    I have followed your instructions above; meaning have changed my model as well as removed DWsim materials from my simulation.
    I assume you are also missing the same error saying that the temperature does not converge right? I have tried both NIST and NRTL and btoh give the same error while with NIST model the result is calculated faster.
    Also wanted to ask you if you could very briefly on second liquid main component selection. I understand that this is the one with highest molar/mass fraction in second liquid, which is Toluen in our case, correct? So question is how my simulation would be affected by your experience if I choose my main component wrongly for some reason?
    I am asking beacuase if I do not choose any main component than my simulation calculates at least capor stream. If I choose Toluent for 2nd liquid stream main component then all three streams (VLL) unfortunately cannot be calculated.

    Thanks in advance.

    Regards,
    Gökhan

     
  • Daniel Medeiros

    Daniel Medeiros - 2016-04-07

    Hi Göhkan,

    The VLLE calculation is tricky. It is very difficult to converge rigorously, so what I usually do is to try different combinations of flash algorithms and key compounds / search severity. When I found one combination that works, I stick with it.

    I was able to converge your simulation only for a negative temperature using Peng-Robinson and Nested Loops VLLE. It doesn't converge at 25 C. See attached.

    If you don't want to calculate liquid solubility, you can use the Nested Loops immiscible flash algorithm and select "Water" as the key compound. It will create a second liquid phase with just water where necessary.

    Daniel

     

Log in to post a comment.