Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Volume solver stability check bypassed #96

Closed
lucpaoli opened this issue Jun 20, 2022 · 1 comment
Closed

Volume solver stability check bypassed #96

lucpaoli opened this issue Jun 20, 2022 · 1 comment

Comments

@lucpaoli
Copy link
Contributor

lucpaoli commented Jun 20, 2022

In the volume solver, should all be operating normally (under critical point, two volume roots found etc), the gibbs free energies of the phases are checked, and the phase that minimises gibbs is returned:

    if gg<gl
        isstable(model,Vg,T,z,phase)
        return Vg
    else
        isstable(model, Vl, T, z, phase)
        return Vl
    end

However, by passing the phase to the stability check isstable, the isstable function automatically returns true

function isstable(model, V, T, z, phase=:stable)
    if phase != :stable
        return true
...etc

This doesn't seem like the intended use of the stability check, is this how it's intended to be used?

@longemen3000
Copy link
Member

longemen3000 commented Jun 26, 2022

the default volume solver only performs mechanical stability (it is done in volume_compress). when passing the :stable symbol to the model, it will perform the full stability check , but this kw should be open to the api, i will fix that ASAP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants