Giter Club home page Giter Club logo

Comments (12)

ianhbell avatar ianhbell commented on July 17, 2024 1

You sort of already have this in your model hierarchy, but I am working on a generic SAFT model in teqp at the moment that allows you to specify the nonpolar contribution, the polar contribution (not yet implemented) and the association contribution independently so you can plug-and-play with models and don't have to name each individual model combination uniquely. The model permutations result in a lot of names as I know you realize.

from clapeyron.jl.

pw0908 avatar pw0908 commented on July 17, 2024

Huh, good catch. Not quite sure what happened there. Logically, this won't affect phase equilibrium calculations since it just adds a constant in both phases; perhaps that's why we never noticed the issue.

I remember spending a week trying to figure out the soft-SAFT implementation and desperately trying whatever seemed reasonable at the time.

from clapeyron.jl.

ianhbell avatar ianhbell commented on July 17, 2024

Ok, seems like a typo then.

Related: the chain term seems to be evaluated by different methods in the literature, and they don't seem consistent. For instance in Blas, what is referenced in the docs:

image

where one should use the value of $\sigma$ for each component $i$ to evaluate the $g_{LJ}$ with the corresponding $\rho_{S}^*$ if I understand correctly, the energy being the same for all components (or should all $T^*$, $\rho^*$ going into $g_{LJ}$ be for the component rather than the mixture)?

from clapeyron.jl.

ianhbell avatar ianhbell commented on July 17, 2024

One of the soft-SAFT people will be at the Boulder conference next week so perhaps we can get some clarity

from clapeyron.jl.

pw0908 avatar pw0908 commented on July 17, 2024

Oh yes, there are a few versions of soft-SAFT. In Clapeyron, we have two (see softSAFT2016). The primarily differ by what reference EoS they use.

from clapeyron.jl.

ianhbell avatar ianhbell commented on July 17, 2024

Yes, but the chain approach should be the same always, no?

from clapeyron.jl.

pw0908 avatar pw0908 commented on July 17, 2024

Do you mean the expression should be the same (i.e. use the Johnson correlation) or the use of WTPT1? If its the latter then yes, that's a hard requirement for all SAFTs. However, I do believe different correlations exist for the PDF of an LJ.

from clapeyron.jl.

ianhbell avatar ianhbell commented on July 17, 2024

I mean whether what arguments go into $g_{LJ}$. It takes a $T^*$ and a $\rho^*$ as arguments. If they are always the same, things are clear enough (I think) as the $\ln(g_{LJ})$ factors out of the summation and you are left with:

alpha_chain = (1-m)*ln(g_LJ)

from clapeyron.jl.

longemen3000 avatar longemen3000 commented on July 17, 2024

Yes, the chain approach is the same, softSAFT2016only changes the reference model to the thol one

from clapeyron.jl.

pw0908 avatar pw0908 commented on July 17, 2024

I see what you mean now. I think I got those mixing rules from one of the papers... Your idea of being able to swap out the different terms sounds very powerful! For the association term, Im guessing it will just be the association strength that changes?

from clapeyron.jl.

ianhbell avatar ianhbell commented on July 17, 2024

I think that is correct about association.

But it is implemented very generically in the code - you just provide T, rho, mole_fraction to each contribution, and JSON is used to select models at construction-time, to instantiate type-generic std::variants. I think all of that should be possible in Julia too. Probably even easier I expect. I can show you my code once I push it.

from clapeyron.jl.

longemen3000 avatar longemen3000 commented on July 17, 2024

i just saw the code, impressive.
i was thinking on doing something like that, some thoughts:

  • maybe adding a way to change the diameters? at first glance, some options come to mind, like the CK diameter (the one used on PCSAFT, and sPCSAFT), and the Mie one. there is also a modified expression used by the Critical point based PCSAFT (CPPCSAFT). A default option used for other other earlier eos is just using the current sigma values as diameter.
  • you can just reuse some mie functions if you set λr = 12, λa = 6, like the mie diameter on PCSAFT.
  • adding a translation would be useful, I-PCSAFT seems to use it
  • on some PCSAFT versions, a temperature-dependent sigma is used, and as far as i know there are two versions of this temperature dependence. an optional field supporting this would be great.

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.