Jump to content



Featured Articles

Check out the latest featured articles.

File Library

Check out the latest downloads available in the File Library.

New Article

Product Viscosity vs. Shear

Featured File

Vertical Tank Selection

New Blog Entry

Low Flow in Pipes- posted in Ankur's blog

Fitting Data To An Activity Coefficient Model

matlab margules pxy data activity coefficient

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic
Share this topic:
| More

#1 southcheme

southcheme

    Brand New Member

  • Members
  • 2 posts

Posted 25 November 2014 - 10:16 PM

I have a project to fit data to an activity coefficient model to determine if the experimental data given is reliable and to determine if a solution diverges from ideal behavior.

 

The activity coefficient model is  Margules and an objective function to be used is Barker's method which uses only experimental temperature, pressure and liquid phase mole fractions.

 

Partial data was given for the experimental pressure and liquid and vapor mole fractions for a binary system of acetone/cyclohexane at 50°C. 

 

I am supposed to fit the data using the activity coefficient but need to solve for the A12 and A21 values first to determine the activity coefficient for each different mole fraction. 

 

I am stuck as to how I am to solve for these two parameters using Matlab??

 

Any help would be appreciated, I could be going down the wrong path and would like to know if I am. Thanks.



#2 ahmadikh

ahmadikh

    Veteran Member

  • Members
  • 42 posts

Posted 26 November 2014 - 02:16 AM

 Southcheme,

 

I did exactly the same thing for the same pair but using VBA-Excel a while ago. I used Margules and van Laar activity coefficient models. For doing these you have to have a set of information available such as Antonie equation parameters for both of the components. What you have to do is:

 

1) Define a function which calculates "P" based on initial values of A12 and A21 and Psat (from Antonie equation) and liquid mole fraction

2) Calculate the vapour mole fraction based on the pressure calculated above

3) Try to define a function which sums the absolute difference of calculated vapour fraction, y_calc, and the experimental data, y_exp.

4) Try to minimize the function defined in step 3 by adjusting reasonable range for A12 and A21 values...Remember there is no unique set of (A12,A21) for each binary pair using the same activity coefficient model as there are unlimited answers for the set of equations. 

 

It is assuming that Margules is only used for calculating liquid activity coefficient, gamma, and vapour phase is ideal. However, if another model is chosen for vapour phase still the approach is the same, but the calculation gets a bit complicated. 

 

Hope this helps...

 

Best,

Milad






Similar Topics