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

Simple example with activity coefficient model and antoine parameters for saturation pressure? #267

Open
thomvet opened this issue Apr 5, 2024 · 3 comments

Comments

@thomvet
Copy link

thomvet commented Apr 5, 2024

Apologies if a relevant example is already available in the documentation, but I couldn't find one.

I am wondering how one would go about setting up an activity coefficient model, say UNIFAC, with a simple Antoine equation for the saturation pressure of the pure components (to do a simple VLE envelope at fixed pressure for example).

Is it possible in Clapeyron.jl? Any pointers appreciated! (I would be happy to do a proper PR to add the example, so that others profit as well)

@longemen3000
Copy link
Member

Yes!, we use CompositeModels for defining equilibria with different models, maybe something like this?

fluidmodel = CompositeModel(["octane","heptane"],liquid = RackettLiquid,saturation = DIPPR101Sat,gas = BasicIdeal)
#we create a fluid model with rackett liquid volume, ideal gas and DIPPR 101. If you perform equilibria with this, it will be done via raoult. 

model = CompositeModel(["octane","heptane"],liquid = UNIFAC, fluid = fluidmodel)
#this model now uses activities in conjunction with the fluid model

check the CompositeModel docs for the combinations.
Funnily enough, I think we don't have an Antoine saturation method 😅, I can add one and release a new version of you wish.

@pw0908
Copy link
Member

pw0908 commented Apr 5, 2024

@longemen3000 Could they technically just use LeeKesler right away in the Activity coefficient model? And skip building the composite model.

@longemen3000
Copy link
Member

hmm, I don't remember if we support that (mainly the liquid volumes), but I can do some changes to allow just passing a saturation model, and assume BasicIdeal for gas, and a dummy method for the liquid (NaNLiquid? )

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

3 participants