Firstly I apologise if this is the wrong forum, and would ask for forgiveness in advance.

My issue is as follows: I wish to make several calculations using the spreadsheet, or possibly make a program to help out with the process.

So what I would like to do is make multiple guesses and have the calculator make a few calculations based on my guesses.
The equations I wish to use are Antoine's equation and Raoult's law (chemistry).
The Antoine equation is: ln(Piº)=Ai-((Bi)/(Ci+T(K)))The Antoine constants for two components are A, B, C for cell number 1 & to for respective component.
I wish to guess the given temperature until Raoults law is true:
xi*Piº=y_i*P, where P is known, either x_i/y_i is known and Sum(x_i)=Sum(y_i)=1.
To solve Piº for each component I will normally use solve(ln(Piº)=Ai-((Bi)/(Ci+T(K))),Piº) for a guessed T, for both components, check if the sum=1 and if not, iterate with a new guess. This process can be tedious and I'd like to shorten it.


Code:
A, B, C are antoine constants, tk is temperature in kelvin

Lets says y_i is given and x_i sought (and the relevant temperature is also sougt)

The solution is as follows: Guess T ► Find Piº ► solve Xi ► Check if Sum(Xi)=1 ► [No?] ►Guess another T

►[Yes?] Great, we have found relevant T

Now how would I go about doing this on the CX CAS using spreadsheets to do the calculations for me?

What I have tried so far (mind you the X1 and X2 columns are not full calcs, just calcs for Piº, but they give errors)

Thank you in advance,
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement