DanWBR / dwsim

DWSIM is a Steady-State and Dynamic Sequential Modular Chemical Process Simulator for Windows, Linux and macOS.
https://dwsim.org
GNU General Public License v3.0
285 stars 91 forks source link

[Different results]GERG-2008 PP and ISO-20765-2015 Reference data -> different results - expected behavior? #248

Closed AlexanderSemenyak closed 2 years ago

AlexanderSemenyak commented 2 years ago

GERG-2008 and ISO-20765-2015 Reference data -> different results

To Reproduce Steps to reproduce the behavior:

  1. Calculate Material stream in vapor-preffered (or default) phase
  2. See different results

Screenshots gerg2008ISOQuestions

Desktop (please complete the following information):

Additional context models.zip ISO-20765-2-2015 GERG-2008.pdf

andr1976 commented 2 years ago

Its not that far off :-)

DanWBR commented 2 years ago

@AlexanderSemenyak the GERG-2008 code is not from me, and since there are so many different parameters, it is hard to know where this difference comes from... https://github.com/DanWBR/dwsim/blob/windows/DWSIM.Thermodynamics.AdvancedEOS.GERG2008/Base.vb

andr1976 commented 2 years ago

I have spottet a bug, isobutane is used for isopentane, not sure this is the full story, let me check

andr1976 commented 2 years ago

First impression is that it made it worse :-(, not as expected, and order of iso/n-butane/pentane is swapped compared to the ISO standard, which doessnt help when spot checking parameters

andr1976 commented 2 years ago

Alright, got it, a few other naming issues, now its there, I will make a PR as soon as possible

andr1976 commented 2 years ago

Made a fix, and @AlexanderSemenyak you should use the chemsep alkanes for N-hexane N-heptane, the CheDL components hexane/heptane are not mapped to GERG componets. We should probably make some more robust fix fir this in the future image

AlexanderSemenyak commented 2 years ago

Thank's @andr1976, @DanWBR :)

andr1976 commented 2 years ago

@AlexanderSemenyak could you elaborate on your usage of GERG 2008, just out of curiosity. Do you intend to use for two-phase applications also? In gas treatment processes, dew point control, liquifaction etc?

AlexanderSemenyak commented 2 years ago

@AlexanderSemenyak could you elaborate on your usage of GERG 2008, just out of curiosity. Do you intend to use for two-phase applications also? In gas treatment processes, dew point control, liquifaction etc?

  1. Hydraulic modeling gas (and two phase flow: gas+condensate+ water) flows on wellbores for pressures from 2 kgs/cm2 to 250 kgs/cm2 (gas fields and gas storages)
  2. Thermodynamic modeling: dew points, critical points, hydrates
  3. Optimizations for two-phase flows: calculate minimum/maximum liquid holdup speeds/optimal energy rejims
  4. Network of wellbores and pipelines on top of eartch pressquer amd flow modeling and optimizations (custom scripts for pressure drop for wellbore completions (material streams on gas fields) => (Fetcovich, Jones, Productivity indexes and e.t.c. ) )
  5. Custom equations for pressure drops on two-phase streams (Beggs&Brill (from DWSIM), Ansari, Hagedorn& Brawn Modified, Try implement Unified TUFFP (unsucces).... )
andr1976 commented 2 years ago

@AlexanderSemenyak , sounds very interesting (and challenging).

I am looking a little into the two phase capabilities of DWSIM+GERG 2008. The Gas 1 example that you send, actually has a small liquid phase if you allow the flash calc to run (with Nested Loops, with Inside-Out it is mapped to all liquid, thats besides the point). This is a little interesting, since the example in the ISO standard is claimed to be gas (I guess). Any opinion on this? Anyway if you gain some experience with the ability of DWSIM+GERG to properly handle two phase bahaviour I would be interested to know (good and bad). I guess Beggs&Brill often over predicts dP (in my experience), TUFFP could be very interesting to have implemented :-)