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

Add advanced cubic mixing rules #56

Closed
ianhbell opened this issue Sep 15, 2023 · 8 comments · Fixed by #70
Closed

Add advanced cubic mixing rules #56

ianhbell opened this issue Sep 15, 2023 · 8 comments · Fixed by #70
Milestone

Comments

@ianhbell
Copy link
Collaborator

See method from http://dx.doi.org/10.1016/j.fluid.2016.05.015, looks pretty easy to implement.

Not clear whether to build on existing cubic approach or whether to start fresh or build a very generalized approach with lots of variants and so on.

@longemen3000
Copy link
Contributor

longemen3000 commented Sep 15, 2023

Jaubert uses that mixing rule a lot:
https://pubs.acs.org/doi/10.1021/acs.iecr.1c03003 (Wilson, van laar, UNIQUAC, NRTL)
https://doi.org/10.1016/j.molliq.2023.122480 (GC-COSMOSAC)

@ianhbell
Copy link
Collaborator Author

@longemen3000 Is this model with advanced mixing rules and Wilson AC model implemented in Clapeyron.jl? I have some confusion and looking at Clapeyron.lj source would be helpful. I don't think it is implemented as best as I can tell.

@longemen3000
Copy link
Contributor

It is implemented, in 0.5.3 (tcPR + mixing rule + residual Wilson), specifically, you can build that model with tcPRW(args...)
In theory, just Wilson suffices, (there is a specific tcPRWilson just with the parameters on the paper), but any Activity Model that defines excess_g_res could work too.
The mixing rule is implemented here: https://github.com/ClapeyronThermo/Clapeyron.jl/blob/master/src/models/cubic/mixing/gEr.jl

@ianhbell
Copy link
Collaborator Author

My question in particular is how one handles the molar volumes of the individual species since that is not documented in any of the papers as far as I can tell

@longemen3000
Copy link
Contributor

Screenshot_20230925-164146
This?

@ianhbell
Copy link
Collaborator Author

Yes, but this is not what is implemented in Clapeyon, which uses a Rackett approach

@longemen3000
Copy link
Contributor

longemen3000 commented Sep 26, 2023

when excess_g_res(model::Wilson,p,T,z) is called, it calculates the wilson volumes (via Rackett), and calls excess_g_res_wilson(model,p,T,z,wilson_volume(model,T)). that behaviour is overloaded when using that specific mixing rule, here:
https://github.com/ClapeyronThermo/Clapeyron.jl/blob/2de8ab7915dc63347dc547d5fa4c508e92968e6d/src/models/cubic/mixing/gEr.jl#L66-L70

@ianhbell
Copy link
Collaborator Author

In their paper they specifically use the covolume for v_i (minus the volume translation), so you might want to do the same

@ianhbell ianhbell added this to the 0.18 milestone Oct 3, 2023
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

Successfully merging a pull request may close this issue.

2 participants