usnistgov / COSMOSAC

A Benchmark Implementation of COSMO-SAC
MIT License
51 stars 29 forks source link

Dispersion Contribution to Overall Activity Coefficient: Multi-Component Mixtures #3

Open dmanheim89 opened 4 years ago

dmanheim89 commented 4 years ago

I was wondering if there will be a new module in the COSMO-SAC-dsp model that can handle multi-component mixtures in addition to binary mixtures. This will be very helpful for my applications.

ianhbell commented 4 years ago

This should already be possible. Can you please provide an example where you would expect it to work where it does not?

dmanheim89 commented 4 years ago

Yes, thanks. I am trying to predict the dispersive contribution to the activity coefficient using "get_lngamma_disp(z)," where z contains a mixture of three components say a, b, and c with different mole fractions. When I try to execute the following lines of code in Python, I get the response: "Multi-component mixtures not supported for dispersive contribution yet"

z = [0.1 0.3 0.6] COSMO = cCOSMO.COSMO3(identifiers,db) lngamma_disp = COSMO.get_lngamma_disp(z)

I looked through the C++ source code and it seems that the dispersive contribution can only be estimated for binary mixtures. Is there any way to extend it to multi-component mixtures? Can you somehow use a summation of binary mixtures to come up with the dispersive contribution of component a in both b and c?

ianhbell commented 4 years ago

I spoke with my colleagues, and the answer is that we intended to reproduce the existing approaches published in the literature (covering binary mixtures only), but with a small bit of work, we could get it working for multi-component mixtures as well. In order to help me help you, can you please provide a copy-pastable and runnable example in Python so that I have something to test?