Code Monkey home page Code Monkey logo

Comments (27)

andr1976 avatar andr1976 commented on May 28, 2024 1

Yeah, already tried that with no significant change in the behaviour

from dwsim.

andr1976 avatar andr1976 commented on May 28, 2024 1

Much better now, testing your commit from yesterday - at least testing 10-30 repetitive flash recalcs, and get the same phasesplit everytime

from dwsim.

andr1976 avatar andr1976 commented on May 28, 2024 1

No not at the moment - over time one could think of a broad test case with varying compositions and properties. I might open at a later stage if I run into issues. What I have seen for now seems promising

from dwsim.

DanWBR avatar DanWBR commented on May 28, 2024

I've got this with a simulation created by me:

Captura de Tela 2020-11-08 às 18 00 12

Your sim file before running

Captura de Tela 2020-11-08 às 18 01 33

And after running it here

Captura de Tela 2020-11-08 às 18 01 45

Perhaps you're having issues with IPOPT?

from dwsim.

andr1976 avatar andr1976 commented on May 28, 2024

Just installed DWSIM 6.3u3 ipopt is certainly in the install folder. Hmmm, thats strange, then again when the water is reduced, suddenly the calculation shows a pahse split. I am not sure how I can investigate this, any good hints?

from dwsim.

DanWBR avatar DanWBR commented on May 28, 2024

It seems that when IPOPT doesn't work as expected, the calculation still goes on and returns a result while it should throw an exception and break the calculation. I wasn't expecting that. Investigating as we chat.

from dwsim.

andr1976 avatar andr1976 commented on May 28, 2024

Great

from dwsim.

DanWBR avatar DanWBR commented on May 28, 2024

Fixed in DTL v6.3.7617. You must copy the two IPOPT files to Windows\System32, at least for now. The definitive fix for DWSIM will be in v6.3 Update 4. 44dbfda and e3598d1

from dwsim.

andr1976 avatar andr1976 commented on May 28, 2024

Now for the above example I get similar results as you - now when lowering water moelfrac to 0.1 and increasing methane to 0.3, I get an all vapour phase (expected VLLE, withh all three phases present)

from dwsim.

DanWBR avatar DanWBR commented on May 28, 2024

The definitive fix for DWSIM will be in v6.3 Update 4.

👆🏻

from dwsim.

andr1976 avatar andr1976 commented on May 28, 2024

Just trying again with DWSIM 6.3 update 4 with the following composition again:
Include components. Water, Methane, Propane, i-Butane, N-butane, N-decane, molefrac: 0.1,0.3,0.1,0.1,0.1,0.3 it gives three phases but still spurious: 2nd liquid phase is containing water but only 6%, rest is to a large extent methane

image

When stability test under flash is ticked, then a single liquid phase is returned.

image

from dwsim.

andr1976 avatar andr1976 commented on May 28, 2024

Here is my file
flashtest2.zip

from dwsim.

DanWBR avatar DanWBR commented on May 28, 2024

The algorithm is having difficulties determining if the phase is vapor or liquid because the cubic equation is giving only one root at the specified conditions...

from dwsim.

DanWBR avatar DanWBR commented on May 28, 2024

I've messed up the flash algorithm in this update. Sorry about that. Already fixed it. 1e61d2b

from dwsim.

andr1976 avatar andr1976 commented on May 28, 2024

Blazingly fast .. did you update the version included with the installer also?

from dwsim.

DanWBR avatar DanWBR commented on May 28, 2024

Not yet, working on other parts of the simulator

from dwsim.

andr1976 avatar andr1976 commented on May 28, 2024

I just ran a check with v6.3 update 5
include components. Water, Methane, Propane, i-Butane, N-butane, N-decane, molefrac: 0.1,0.3,0.1,0.1,0.1,0.3
The mix split to V-L, but a 2 liquid/water should exist i.e VLL. The flash fails to find the 2. liquid phase.

image

Another thing: I have generally notices that when a separate water phase/liquid2 is found, the amount of water is generally higher than expected in the HC/liquid1 phase. Just a consideration.

from dwsim.

DanWBR avatar DanWBR commented on May 28, 2024

Another thing: I have generally notices that when a separate water phase/liquid2 is found, the amount of water is generally higher than expected in the HC/liquid1 phase. Just a consideration.

This can be adjusted with a BIP. DWSIM doesn't use any while HYSYS uses 0.5, for instance. I have no bibliographic reference for doing that so I left it as it is.

from dwsim.

andr1976 avatar andr1976 commented on May 28, 2024

Ok, this has certainly done some good. Compiled from source and I now get a phase split as expected (at least using my own/HYSYS BIPs for all compunds), Setting water BIPs to 0.5 does not get me there, the HC-HC BIPs also need to be altered. Not sure all are necessary. - However, there is still some perculiar behaviour.

For instance if setting the BIP for i/n-butane to zero, there is suddenly no liquid2/water phase after recalculating flowsheet (actually after a few recalcs). Ressetting this BIP may then result in a water phase, sometimes, sometimes not. Then changing the temp down and up may enable the phase in being identified.
First, I would not expect the iso/n-butane BIP to any effect in a water phase or not (also confirmed by my Michelsen Flash), secondly it seems that updated BIPs are not always re-read. I am still setting things up, in terms of debugging, and navigating the code, but if this can give you some hints, that would be great

flashtest.zip

from dwsim.

andr1976 avatar andr1976 commented on May 28, 2024

Very very strange - if setting flash to force VLLE, then every second time called the liquid2 phase is there, and then its not.

image

I am not sure I am doing this right, but when inspecting the PP.MAT_KIJ is Nothing, both for the Universal flash and VLLE, everytime I look, still this does not fully explain the on/off behaviour

from dwsim.

andr1976 avatar andr1976 commented on May 28, 2024

Every second time the StabTest2(T, P, Vx1, PP.RET_VTC, PP) returns 0

from dwsim.

DanWBR avatar DanWBR commented on May 28, 2024

Maybe because the trial compositions are random. I think we need to include a fixed set of trial compositions to make sure that one gets caught.

from dwsim.

DanWBR avatar DanWBR commented on May 28, 2024

Yes, the compositions to test for stability of the liquid phase. The current composition may not be unstable so we need to try different ones until we find one which is unstable, in order to get an initial estimate for the composition of the second liquid phase.

from dwsim.

DanWBR avatar DanWBR commented on May 28, 2024

This is Michelsen's stability test.

from dwsim.

DanWBR avatar DanWBR commented on May 28, 2024

Changed the random number generator to get a wider range of compositions.

Random number generation is an art itself.

from dwsim.

andr1976 avatar andr1976 commented on May 28, 2024

@DanWBR should this one be closed now? or are you still working on this?

from dwsim.

DanWBR avatar DanWBR commented on May 28, 2024

Will you do further testing?

from dwsim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.