ClapeyronThermo / Clapeyron.jl

Clapeyron provides a framework for the development and use of fluid-thermodynamic models, including SAFT, cubic, activity, multi-parameter, and COSMO-SAC.
MIT License
199 stars 51 forks source link

Help with modelling activity coefficients in UNIFAC #252

Open ivypch opened 8 months ago

ivypch commented 8 months ago

Hey guys, I'm interested in modelling activity coefficients of an API molecule with UNIFAC to determine a solubility limit in a solvent. The molecule is 3,5-dinitro-L-tyrosine and the solvent is DMSO (image of the API attached). image I'm not very familiar with Julia, so I'm not doing this in clapeyron but I am using the ogUNIFAC database in this github, and plugging it into a Python script. One thing I've noticed is that unlike interactions aren't symmetrical, i.e. the value for the CH2 - ACNO2 interaction differs from the ACNO2 - CH2 interaction by an order of magnitude. I had always thought that the unlike interactions would be the same regardless of which molecule is first. What am I missing here - is it perhaps a misunderstanding of how the dataset is laid out? And if the unlike interactions are indeed asymmetrical, meaning order matters, then what exactly determines the order of molecules in this dataset? Any help would be greatly appreciated!

pw0908 commented 8 months ago

Hi! The unlike parameters in UNIFAC are indeed asymmetric where, for a parameter A_ij, we are refering to the effect of species j when it is surrounding species i. This is the order we've written it in our databank. I'd recommend taking a look at the course we've developed on this where it describes in more detail how these activity coefficient models are derived.

Some additional comments:

  1. I'd recommend using the standard (Dortmund) UNIFAC model as it has far more parameters than ogUNIFAC.
  2. Although you may not be using Julia, I'd recommend taking a look at another package we've developed: GCIdentifier.jl which will assign all the groups for a given species, automating the whole process for you.
ivypch commented 8 months ago

Hi! The unlike parameters in UNIFAC are indeed asymmetric where, for a parameter A_ij, we are refering to the effect of species j when it is surrounding species i. This is the order we've written it in our databank. I'd recommend taking a look at the course we've developed on this where it describes in more detail how these activity coefficient models are derived.

Some additional comments:

  1. I'd recommend using the standard (Dortmund) UNIFAC model as it has far more parameters than ogUNIFAC.
  2. Although you may not be using Julia, I'd recommend taking a look at another package we've developed: GCIdentifier.jl which will assign all the groups for a given species, automating the whole process for you.

Hey, thanks for the reply. I'm trying to get the solubility directly from julia, but I'm running into the following error: image

I've updated Clapeyron to the latest version, and attempted restarting Julia, but the error persists. Any ideas what the problem could be?

longemen3000 commented 8 months ago

try using SolidHfus, with lowercase f