Giter Club home page Giter Club logo

Comments (9)

ianhbell avatar ianhbell commented on September 18, 2024 1

Aside: it should be helmholtz_energy_res rather than helmholtz_free_energy_res according to IUPAC

from clapeyron.jl.

longemen3000 avatar longemen3000 commented on September 18, 2024

hi!,
on documenting that, do you mean as a preface? all functions that are volume derivatives tend to be intensive (pressure does not depend on the amount of matter), but temperature derivative functions (like Cp and Cv) are extensive. each function has their units documented, but adding additional information never hurts.

on the doc error, i'm fixing that right away

from clapeyron.jl.

larschrj avatar larschrj commented on September 18, 2024

Some comment in the preface would be helpful at least to me but I take your point that the information is there in the documentation 🙂.

As a tangent to this, it would be nice if mass could passed as an argument to f.ex. volume when dealing with single fluids like IAPWS95 (which is what I have been using so far). I noticed in the docs that this is an option when dealing with mixtures. It would save some tedious calculations for me, but perhaps it is not a good idea for some reason.

from clapeyron.jl.

longemen3000 avatar longemen3000 commented on September 18, 2024

single fluids are mixtures! (of only one component), you can pass a mass argument in the following way:

julia> using Clapeyron, Unitful

julia> model = IAPWS95()
MultiParameter Equation of state for water:
 Polynomial power terms: 7
 Exponential terms: 44
 Gaussian bell-shaped terms: 3
 Non Analytic terms: 2

julia> volume(model,1u"atm",30u"°C",1u"kg",phase = :l, output = u"L")
1.0043695560170631 L

In this particular example, i pass 1u"kg as a number, i technically abuse one of julia quirks that a number is considered a vector of length 1 in some cases. the correct way would be to pass a [1u"kg"] instead, but that would cause some slowdowns

from clapeyron.jl.

larschrj avatar larschrj commented on September 18, 2024

My mistake. I must have made an error when trying this previously. That's great 🙂 Thanks 👍

from clapeyron.jl.

longemen3000 avatar longemen3000 commented on September 18, 2024

I will keep this open in the meantime. The typo in mass_density was corrected. There is a docs PR that should fix this, but it isn't merged yet.

from clapeyron.jl.

larschrj avatar larschrj commented on September 18, 2024

Although if I pass the vector argument for the mass I get a no method matching error for a_res. But in any case your solution was what I was looking for.

from clapeyron.jl.

longemen3000 avatar longemen3000 commented on September 18, 2024

Yeah, a_res is more of an internal function 😅, but there should be an api to access those (something like helmholtz_free_energy_res that I thought we had)

from clapeyron.jl.

larschrj avatar larschrj commented on September 18, 2024

Ooops, missed your comment about keeping this open. Reopened with this.

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.