Menu

MS Excel: Dew Point Calculation

2013-11-27
2014-06-01
  • stefan pofahl

    stefan pofahl - 2013-11-27

    Dear all,
    I was interested to calculate the water content at the dew point of humid air.
    To achieve this, you can use the goal seek of Excel in combination with the
    two flash calculation functions "TVFFlash" and "PVFFlash".
    It seems that the "TVFFlash" function is more robust.
    I was not able to use both functions with the same Flash Algorithm Number,
    "PVFFlash" worked fine with "Inside-Out VLE", while "TVFFlash" functions well
    with "Nested Loops VLE".
    The robustness seems also be dependent on the Physical Property method,
    as far as I understood "Peng Robinson" is good implemented in DWsim,
    but for the PVFFlash it seems not to be recommended.
    The "Flashalg=0" and "Flashalg=2" should behave identically, but it seems that this
    is not always the case. I observed a different behavior for example for the "PHFlash"
    function, "Flashalg=0" works fine, "Flashalg=2" fails.
    I have uploaded my Excel sample here:
    https://dl.dropboxusercontent.com/u/3639372/humid%20air%20like%20composition%20calculations%20-%20dwsim%20based.zip
    Make sure that you install the latest DWsim 3.0 version and I recommend to disable
    automatic workbook calculation.

    Regards,

    Stefan

     
  • Daniel Medeiros

    Daniel Medeiros - 2013-12-13

    Hi Stefan,

    Thanks for your help on testing the Excel interface. I'll take a look at the issues you've pointed out and will let you know if there's anything I can do to enhance the robustness of the flash algorithms.

    Daniel

     
  • Daniel Medeiros

    Daniel Medeiros - 2013-12-13

    If you're interested on calculating saturation points in a sequence, i.e. building a phase envelope, the robustness of the flash algorithms will be greatly enhanced if you provide the previous calculated point as an initial estimate for the current calculation. I'll add this possibility for the next DWSIM version so you can get better results on your experiments.

    Daniel

     
    • stefan pofahl

      stefan pofahl - 2013-12-15

      Dear Daniel,

      I thank you so much for your effort and I'm sorry that my time is limited, I would like to contribute with some direct input to your great software. I'm looking forward to your next version ;-)
      Kindest regards,
      Stefan

       
  • Daniel Medeiros

    Daniel Medeiros - 2013-12-18

    Hi stefan,

    I created a patch that adds new functions which accept an initial estimate for T and P in the PH/PS/PVF/TVF flashes. It should enhance speed and reliability of the calculations.

    Please note that the PH and PS flashes require the input enthalpy and entropy values in kJ/kg and kJ/kg.K respectively.

    I also fixed the enthalpy and entropy bug that you pointed out in the other thread.

    To update your copy of DWSIM, just unpack this zip file replacing DWSIM.exe and DWSIM.pdb in your installation directory: http://sourceforge.net/projects/dwsim/files/DWSIM/DWSIM%203.0/Patch5099.zip/download

    Regards,
    Daniel

     
    • stefan pofahl

      stefan pofahl - 2014-01-30

      Hi Daniel,
      today I finished a comparison of the different EOS and flash algorithms
      to calculate the Dew Point of water in air. For that I utilized the new
      flash function "PVFFlash2".
      The result is that DWsim calculated the DEWpoint in Air correctly with the
      equation of state model “Peng-Robinson-Stryjek-Vera 2 (PRSV2-VL)”.

      Regards, Stefan

      P.S.: Disable automatic calculation in Excel before you open the document.

       
      • Daniel Medeiros

        Daniel Medeiros - 2014-01-30

        Thanks stefan, I'll use your results to check what's going on with the IO algorithm.

        Daniel

         
        • stefan pofahl

          stefan pofahl - 2014-05-27

          Hi Daniel,
          each time you upload a new version I run my Excel example to check,
          if the systematic off-set for the dew point calculation is still present.
          This time (new version v3.1, Build 5259) I have the impression that the
          calculation is not possible any longer. I have reduced the size of the
          file to reduce the computation time. Maybe you can give me a tip, if the
          syntax has changed and this is the reason for my problems.
          Regards,
          Stefan

           
  • Daniel Medeiros

    Daniel Medeiros - 2014-05-27

    Hi Stefan,

    The flash algorithms have been heavily modified since then, that's why this is a beta release.

    I'll take a look at your sheet and find a solution for it. There's no syntax change.

    Regards,
    Daniel

     
  • Daniel Medeiros

    Daniel Medeiros - 2014-05-28

    Stefan,

    I don't remember exactly why but I've limited the minimum and maximum temperatures in the convergence algorithm to 50 K above and below the initial estimate. Try to initialize the calcs with 300 ~ 350 K and you'll get your results.

    I'll fix that in the next build but be aware that the systematic offset won't be going away for reasons I think I already explained to you before. If not, let me know.

    Regards,
    Daniel

     
    • stefan pofahl

      stefan pofahl - 2014-05-30

      Hi Daniel,

      thanks for the help! I can reproduce your nice plot, this is what I'm looking for :-)
      But why is it possible to achieve this accuracy for the LV-phase calculation in other software with the PR model and not in DWsim? As explanation you mentioned two things:
      - the other software, like AspenPlus use an updated variant of PR equation of state model
      - the interaction parameters need to be fine tuned

      Do I miss a point?

      I tried to optimize the interaction parameters, but it seemed that variation of this parameters do not change much in the off-set of the LV-calculation.

      Regards,

      Stefan

       
  • Daniel Medeiros

    Daniel Medeiros - 2014-05-28

    Isn't the PRSV2-VM model good enough for you?

     
  • stefan pofahl

    stefan pofahl - 2014-05-31

    I guess PRSV2-VM is a typo, I tried to understand the difference between
    the two PRSV2 property methods (-VL and -M), but found no explanation.
    Therefore, I ask here in the forum. I guess -VL stands for "Vapor-Liquid",
    but what is the meaning of "-M"?

    P.S.:
    I observed that the "-M" method is not able to predict the VL fractions
    properly in a humid gas mixture for higher temperatures.

     
  • Daniel Medeiros

    Daniel Medeiros - 2014-06-01

    Hi stefan,

    Yes, VM is a typo, I meant VL... but both variations of the PRSV2 EOS should give you the same results, because:

    1 - They don't have parameters for the "Air" pseudocomponent
    2 - The difference between them is in the type of the mixing rule only. VL stands for "Van-Laar" and "M" means "Margules".

    The PRSV EOS (http://onlinelibrary.wiley.com/doi/10.1002/cjce.5450640516/abstract) is better than the original PR because it predicts the compound vapor pressures more accurately. Apart from a new alpha function and mixing rule type, the rest of the formulation is the same as the original PR.

    Anyway, if you really want to compare DWSIM implementations with others, try using a rigorous approach, replacing "Air" by a mixture of N2 and O2, and using adequate interaction parameters if necessary. By calculating the dew point of a mixture of air and water you'll want a good description of water vapor pressure and that's exactly what the PRSV model gives to you.

    Regards,
    Daniel

     

Log in to post a comment.