Giter Club home page Giter Club logo

Comments (4)

pw0908 avatar pw0908 commented on June 30, 2024 1

Hi Alex,

This is on us for not being clearer in the documentation. By setting up the models in this way, you've used the default ideal model which we call "BasicIdeal". This only carries a volume and composition dependence, no temperature dependence. This makes properties that depend on the first and second order temperature derivatives unusable.

Fixing this is relatively straight-forward, you can use the WalkerIdeal model since it has the parameters you need (we do need to greatly expand our database for the ideal models since these are quite lacking):

julia> using Clapeyron, Unitful

julia> N2_PR = PR(["nitrogen"];idealmodel=WalkerIdeal)
PR{WalkerIdeal} with 1 component:
 "nitrogen"
Contains parameters: a, b, acentricfactor, Tc, Pc, Mw

julia> N2_SAFT = PCSAFT(["nitrogen"];idealmodel=WalkerIdeal)
PCSAFT{WalkerIdeal} with 1 component:
 "nitrogen"
Contains parameters: Mw, segment, sigma, epsilon, epsilon_assoc, bondvol

julia> speed_of_sound(N2_PR, 101325u"Pa", 300u"K")
347.00051443031396 m s⁻¹

julia> speed_of_sound(N2_SAFT, 101325u"Pa", 300u"K")
347.0215687936945 m s⁻¹

julia> isobaric_heat_capacity(N2_PR, 101325u"Pa", 300u"K") / isochoric_heat_capacity(N2_PR, 101325u"Pa", 300u"K")
1.4016251686654189

julia> isobaric_heat_capacity(N2_SAFT, 101325u"Pa", 300u"K") / isochoric_heat_capacity(N2_SAFT, 101325u"Pa", 300u"K")
1.4014850964933816

The next area of focus for us is indeed the tests (and refining the docs); thank you for pointing this out!

from clapeyron.jl.

pw0908 avatar pw0908 commented on June 30, 2024

I've now added a very basic fix to the BasicIdeal model where it now includes the translational motions of the species; it's still not quantitatively accurate, but it will give more-reasonable values for these second derivative properties.

from clapeyron.jl.

stillyslalom avatar stillyslalom commented on June 30, 2024

Thanks, those values are now within 10-20% with BasicIdeal.

from clapeyron.jl.

pw0908 avatar pw0908 commented on June 30, 2024

Yes, it's not meant to be quantitatively accurate since nitrogen has rotational and vibrational modes not accounted for in the BasicIdeal model.

from clapeyron.jl.

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.